aboutsummaryrefslogtreecommitdiffstats
path: root/lcc/x86/linux/tst/cf.sbk
blob: 9058d0b02b62d1b6a9500d957864b63f76bec9a8 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
.globl main
.text
.align 16
.type main,@function
main:
pushl %ebp
pushl %ebx
pushl %esi
pushl %edi
movl %esp,%ebp
subl $24,%esp
cmpl $1,20(%ebp)
jg .LC2
flds .LC4
fstps -16(%ebp)
jmp .LC3
.LC2:
movl 24(%ebp),%edi
pushl 4(%edi)
call atof
addl $4,%esp
fstps -20(%ebp)
flds -20(%ebp)
fdivs .LC5
fstps -16(%ebp)
.LC3:
movl $0,-4(%ebp)
.LC6:
movl -4(%ebp),%edi
leal 1(%edi),%esi
movl %esi,-4(%ebp)
flds .LC4
fstps f(,%edi,4)
.LC7:
cmpl $127,-4(%ebp)
jle .LC6
movl $0,-8(%ebp)
jmp .LC11
.LC10:
movl -12(%ebp),%edi
leal f(,%edi,4),%edi
flds (,%edi)
fadds .LC13
fstps (,%edi)
incl -8(%ebp)
.LC11:
call getchar
movl %eax,-12(%ebp)
cmpl $-1,%eax
jne .LC10
pushl $.LC14
call printf
addl $4,%esp
movl $0,-4(%ebp)
.LC15:
movl -4(%ebp),%edi
flds f(,%edi,4)
fstps -24(%ebp)
flds .LC4
fcomps -24(%ebp)
fstsw %ax
sahf
je .LC19
flds -24(%ebp)
fildl -8(%ebp)
fdivp %st(1),%st
flds -16(%ebp)
fcompp
fstsw %ax
sahf
ja .LC19
cmpl $32,-4(%ebp)
jg .LC21
pushl -4(%ebp)
pushl $.LC23
call printf
addl $8,%esp
jmp .LC22
.LC21:
pushl -4(%ebp)
pushl $.LC24
call printf
addl $8,%esp
.LC22:
flds .LC5
movl -4(%ebp),%edi
fmuls f(,%edi,4)
fildl -8(%ebp)
fdivp %st(1),%st
subl $8,%esp
fstpl (%esp)
pushl $.LC25
call printf
addl $12,%esp
.LC19:
.LC16:
incl -4(%ebp)
cmpl $127,-4(%ebp)
jle .LC15
movl $0,%eax
.LC1:
movl %ebp,%esp
popl %edi
popl %esi
popl %ebx
popl %ebp
ret
.Lf26:
.size main,.Lf26-main
.bss
.globl f
.align 4
.type f,@object
.size f,512
.comm f,512
.data
.align 1
.LC25:
.byte 9
.byte 37
.byte 46
.byte 49
.byte 102
.byte 10
.byte 0
.align 1
.LC24:
.byte 37
.byte 99
.byte 0
.align 1
.LC23:
.byte 37
.byte 48
.byte 51
.byte 111
.byte 0
.align 1
.LC14:
.byte 99
.byte 104
.byte 97
.byte 114
.byte 9
.byte 102
.byte 114
.byte 101
.byte 113
.byte 10
.byte 0
.align 4
.LC13:
.long 1065353216
.align 4
.LC5:
.long 1120403456
.align 4
.LC4:
.long 0
.text
.ident "LCC: 4.1"