-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.s
More file actions
57 lines (57 loc) · 951 Bytes
/
test.s
File metadata and controls
57 lines (57 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.file "test.c"
.text
.globl main
.type main, @function
main:
subl $4032, %esp
movb $1, 4015(%esp)
movl $0, 4028(%esp)
movl $2, 4024(%esp)
jmp .L2
.L8:
movl $1, 4020(%esp)
movl $0, 4016(%esp)
jmp .L3
.L6:
movl 4016(%esp), %eax
movl 12(%esp,%eax,4), %ecx
movl 4024(%esp), %eax
cltd
idivl %ecx
movl %edx, %eax
testl %eax, %eax
jne .L4
movl $0, 4020(%esp)
.L4:
addl $1, 4016(%esp)
.L3:
movl 4016(%esp), %eax
cmpl 4028(%esp), %eax
jge .L5
movl 4016(%esp), %eax
movl 12(%esp,%eax,4), %edx
movl 4016(%esp), %eax
movl 12(%esp,%eax,4), %eax
imull %edx, %eax
cmpl %eax, 4024(%esp)
jl .L5
cmpl $0, 4020(%esp)
jne .L6
.L5:
cmpl $0, 4020(%esp)
je .L7
movl 4028(%esp), %eax
leal 1(%eax), %edx
movl %edx, 4028(%esp)
movl 4024(%esp), %edx
movl %edx, 12(%esp,%eax,4)
.L7:
addl $1, 4024(%esp)
.L2:
cmpl $999, 4028(%esp)
jle .L8
movl $0, %eax
addl $4032, %esp
ret
.size main, .-main
.section .note.GNU-stack,"",@progbits