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 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357
| .file "arm.c" .text .globl myFunctiontrue1 .type myFunctiontrue1, @function myFunctiontrue1: .LFB2: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE2: .size myFunctiontrue1, .-myFunctiontrue1 .globl myFunctionfalse1 .type myFunctionfalse1, @function myFunctionfalse1: .LFB3: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE3: .size myFunctionfalse1, .-myFunctionfalse1 .globl myFunctiontrue2 .type myFunctiontrue2, @function myFunctiontrue2: .LFB4: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE4: .size myFunctiontrue2, .-myFunctiontrue2 .globl myFunctionfalse2 .type myFunctionfalse2, @function myFunctionfalse2: .LFB5: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE5: .size myFunctionfalse2, .-myFunctionfalse2 .globl myFunctiontrue3 .type myFunctiontrue3, @function myFunctiontrue3: .LFB6: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE6: .size myFunctiontrue3, .-myFunctiontrue3 .globl myFunctionfalse3 .type myFunctionfalse3, @function myFunctionfalse3: .LFB7: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE7: .size myFunctionfalse3, .-myFunctionfalse3 .globl myFunctiontrue4 .type myFunctiontrue4, @function myFunctiontrue4: .LFB8: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE8: .size myFunctiontrue4, .-myFunctiontrue4 .globl myFunctionfalse4 .type myFunctionfalse4, @function myFunctionfalse4: .LFB9: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE9: .size myFunctionfalse4, .-myFunctionfalse4 .globl myFunctiontrue5 .type myFunctiontrue5, @function myFunctiontrue5: .LFB10: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE10: .size myFunctiontrue5, .-myFunctiontrue5 .globl myFunctionfalse5 .type myFunctionfalse5, @function myFunctionfalse5: .LFB11: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 nop popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE11: .size myFunctionfalse5, .-myFunctionfalse5 .globl myfunc6True .type myfunc6True, @function myfunc6True: .LFB12: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 pushq %rbx subq $24, %rsp .cfi_offset 3, -24 call rand movslq %eax, %rbx movl $0, %edi call time movq %rax, %rcx movq %rbx, %rax cqto idivq %rcx movq %rdx, %rax movl %eax, -20(%rbp) cmpl $10, -20(%rbp) jle .L12 movl $20, %eax jmp .L13 .L12: movl $1, %eax .L13: addq $24, %rsp popq %rbx popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE12: .size myfunc6True, .-myfunc6True .section .rodata .LC0: .string "hello random %d\n" .LC1: .string "%d<10, gotb ++\n" .LC2: .string "%d<15, gotb ++ \n" .LC3: .string " end %d" .text .globl main .type main, @function main: .LFB13: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 pushq %rbx subq $40, %rsp .cfi_offset 3, -24 call rand movslq %eax, %rbx movl $0, %edi call time movq %rax, %rcx movq %rbx, %rax cqto idivq %rcx movq %rdx, %rax movl %eax, -36(%rbp) movl -36(%rbp), %eax movl %eax, %esi movl $.LC0, %edi movl $0, %eax call printf movl -36(%rbp), %eax movl %eax, -32(%rbp) movl $2, -28(%rbp) movl $5, -40(%rbp) .L15: movl -32(%rbp), %eax subl $2, %eax cmpl $2, %eax jle .L16 movl $0, %eax call myFunctiontrue1 jmp .L17 //直接执行.L17 .L17是主程序的部分代码 .L16: movl $0, %eax call myFunctionfalse1 //s顺序执行 .L17: movl -32(%rbp), %eax subl $2, %eax cmpl $2, %eax setg %al movzbl %al, %eax movl %eax, -24(%rbp) cmpl $0, -24(%rbp) je .L18 //成立就跳转到 L18 下面 不会走 movl $0, %eax call myFunctiontrue2 jmp .L19 .L18: movl $0, %eax call myFunctionfalse2 .L19: movl -32(%rbp), %eax subl $2, %eax cmpl $2, %eax setg %al movzbl %al, %eax movl %eax, -24(%rbp) cmpl $5, -24(%rbp) jle .L20 movl $0, %eax call myFunctiontrue3 jmp .L21 .L20: movl $0, %eax call myFunctionfalse3 .L21: movl -32(%rbp), %eax subl $2, %eax cmpl $2, %eax setg %al movzbl %al, %eax movl %eax, -24(%rbp) cmpl $4, -24(%rbp) jg .L22 movl $0, %eax call myFunctiontrue4 jmp .L23 .L22: movl $0, %eax call myFunctionfalse4 .L23: cmpl $5, -24(%rbp) jg .L24 cmpl $1, -24(%rbp) jg .L25 .L24: movl $0, %eax call myFunctiontrue5 .L25: movl $0, %eax call myfunc6True movl %eax, -20(%rbp) //取返回值 .L26: addl $1, -40(%rbp) cmpl $9, -40(%rbp) jg .L27 movl -40(%rbp), %eax movl %eax, %esi movl $.LC1, %edi movl $0, %eax call printf jmp .L26 .L27: cmpl $14, -40(%rbp) jg .L28 movl -40(%rbp), %eax movl %eax, %esi movl $.LC2, %edi movl $0, %eax call printf jmp .L26 .L28: movl -20(%rbp), %eax movl %eax, %esi movl $.LC3, %edi movl $0, %eax call printf movl $0, %eax addq $40, %rsp popq %rbx popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE13: .size main, .-main .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609" .section .note.GNU-stack,"",@progbits
|