Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "cc2.c"
- .intel_syntax noprefix
- .globl _x
- .data
- _x:
- .byte 45
- .globl _y
- _y:
- .byte 50
- .comm _r_1, 2, 1
- .comm _r_2, 2, 1
- .comm _n, 4, 2
- .def ___main; .scl 2; .type 32; .endef
- .section .rdata,"dr"
- LC0:
- .ascii "(x + y)/2 + (y * x)/30 = %d\12\0"
- LC1:
- .ascii "%d\0"
- .text
- .globl _main
- .def _main; .scl 2; .type 32; .endef
- _main:
- LFB6:
- .cfi_startproc
- push ebp
- .cfi_def_cfa_offset 8
- .cfi_offset 5, -8
- mov ebp, esp
- .cfi_def_cfa_register 5
- push ebx
- and esp, -16
- sub esp, 16
- .cfi_offset 3, -12
- call ___main
- mov al, BYTE PTR _x
- movsx dx, al
- mov al, BYTE PTR _y
- cbw
- add eax, edx
- mov WORD PTR _r_1, ax
- mov ax, WORD PTR _r_1
- mov edx, eax
- shr dx, 15
- add eax, edx
- sar ax
- mov WORD PTR _r_1, ax
- mov al, BYTE PTR _x
- movsx dx, al
- mov al, BYTE PTR _y
- cbw
- imul ax, dx
- mov WORD PTR _r_2, ax
- mov dx, WORD PTR _r_2
- movsx ecx, dx
- mov eax, ecx
- sal eax, 4
- add eax, ecx
- mov ebx, eax
- sal ebx, 8
- add eax, ebx
- sal eax, 3
- add eax, ecx
- shr eax, 16
- sub ax, dx
- add eax, edx
- mov ecx, eax
- sar cx, 4
- mov eax, edx
- sar ax, 15
- mov edx, ecx
- sub dx, ax
- mov eax, edx
- mov WORD PTR _r_2, ax
- mov ax, WORD PTR _r_1
- movsx edx, ax
- mov ax, WORD PTR _r_2
- cwde
- add eax, edx
- mov DWORD PTR [esp+4], eax
- mov DWORD PTR [esp], OFFSET FLAT:LC0
- call _printf
- mov DWORD PTR [esp+4], OFFSET FLAT:_n
- mov DWORD PTR [esp], OFFSET FLAT:LC1
- call _scanf
- mov ebx, DWORD PTR [ebp-4]
- leave
- .cfi_restore 5
- .cfi_def_cfa 4, 4
- .cfi_restore 3
- ret
- .cfi_endproc
- LFE6:
- .def _printf; .scl 2; .type 32; .endef
- .def _scanf; .scl 2; .type 32; .endef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement