#include <stdio.h>
int main()
{
int a[20];
int i;
for (i = 0; i < 30; i++)
a[i] = i;
return 0;
}
#if 0
/*
* intel
*/
0000000000001149 <main>:
1149: f3 0f 1e fa endbr64
114d: 55 push %rbp
114e: 48 89 e5 mov %rsp,%rbp
1151: 48 83 ec 70 sub $0x70,%rsp
1155: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax
115c: 00 00
115e: 48 89 45 f8 mov %rax,-0x8(%rbp)
1162: 31 c0 xor %eax,%eax
1164: c7 45 9c 00 00 00 00 movl $0x0,-0x64(%rbp)
116b: eb 10 jmp 117d <main+0x34>
116d: 8b 45 9c mov -0x64(%rbp),%eax
1170: 48 98 cltq
1172: 8b 55 9c mov -0x64(%rbp),%edx
1175: 89 54 85 a0 mov %edx,-0x60(%rbp,%rax,4)
1179: 83 45 9c 01 addl $0x1,-0x64(%rbp) // i++
117d: 83 7d 9c 1d cmpl $0x1d,-0x64(%rbp) // 0x1d=29
1181: 7e ea jle 116d <main+0x24>
1183: b8 00 00 00 00 mov $0x0,%eax
1188: 48 8b 4d f8 mov -0x8(%rbp),%rcx
118c: 64 48 33 0c 25 28 00 xor %fs:0x28,%rcx
1193: 00 00
1195: 74 05 je 119c <main+0x53>
1197: e8 b4 fe ff ff callq 1050 <__stack_chk_fail@plt>
119c: c9 leaveq
119d: c3 retq
119e: 66 90 xchg %ax,%ax
/*
* arm
*/
000000000040051c <main>:
40051c: d10183ff sub sp, sp, #0x60
400520: b9005fff str wzr, [sp, #92]
400524: 14000009 b 400548 <main+0x2c>
400528: b9805fe0 ldrsw x0, [sp, #92]
40052c: d37ef400 lsl x0, x0, #2
400530: 910023e1 add x1, sp, #0x8
400534: b9405fe2 ldr w2, [sp, #92]
400538: b8206822 str w2, [x1, x0]
40053c: b9405fe0 ldr w0, [sp, #92]
400540: 11000400 add w0, w0, #0x1 // i++
400544: b9005fe0 str w0, [sp, #92]
400548: b9405fe0 ldr w0, [sp, #92]
40054c: 7100741f cmp w0, #0x1d // 0x1d=29
400550: 54fffecd b.le 400528 <main+0xc>
400554: 52800000 mov w0, #0x0 // #0
400558: 910183ff add sp, sp, #0x60
40055c: d65f03c0 ret
#endif