text
stringlengths
197
24.1M
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global g .type g, %function g: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] cmp x0, 0 beq .L2 ldr x0, [sp, 8] b .L3 .L2: mov x0, 0 .L3: add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size g, .-g ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global stack .bss .align 3 .type stack, %object .size stack, 512 stack: .zero 512 .global top .align 2 .type top, %object .size top, 4 top: .zero 4 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global i .bss .align 3 .type i, %object .size i, 48 i: .zero 48 .global c .align 3 .type c, %object .size c, 48 c: .zero 48 .global l .align 3 .type l, %object .size l, 96 l: .zero 96 .global t .align 3 .type t, %object .size t, 96 t: .zero 96 .global sf .align 3 .type sf, %object .size sf, 80 sf: .zero 80 .global co .data .align 2 .type co, %object .size co, 4 co: .word -1 .section .rodata .align 3 .LC0: .string "Menu: Enter Choice To Enter Table Data" .align 3 .LC1: .string "1.Item Dimension" .align 3 .LC2: .string "2.Customer Dimension" .align 3 .LC3: .string "3.Location Dimension" .align 3 .LC4: .string "4.Time Dimension" .align 3 .LC5: .string "5.Sales Fact Dimension" .align 3 .LC6: .string "6.Display All Tables and Average Sales" .align 3 .LC7: .string "Choice : " .align 3 .LC8: .string "%d" .align 3 .LC9: .string "item" .align 3 .LC10: .string "customer" .align 3 .LC11: .string "location" .align 3 .LC12: .string "time" .align 3 .LC13: .string "salesfact" .align 3 .LC14: .string "Wrong choice:" .text .align 2 .global main .type main, %function main: .LFB6: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 mov w0, -1 str w0, [sp, 44] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl printf .L10: adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl printf add x0, sp, 44 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf ldr w0, [sp, 44] cmp w0, 6 beq .L2 cmp w0, 6 bgt .L3 cmp w0, 5 beq .L4 cmp w0, 5 bgt .L3 cmp w0, 4 beq .L5 cmp w0, 4 bgt .L3 cmp w0, 3 beq .L6 cmp w0, 3 bgt .L3 cmp w0, 1 beq .L7 cmp w0, 2 beq .L8 b .L3 .L7: add x2, sp, 48 adrp x0, .LC9 add x1, x0, :lo12:.LC9 mov x0, x2 bl sprintf add x0, sp, 48 bl insert b .L9 .L8: add x2, sp, 48 adrp x0, .LC10 add x1, x0, :lo12:.LC10 mov x0, x2 bl sprintf add x0, sp, 48 bl insert b .L9 .L6: add x2, sp, 48 adrp x0, .LC11 add x1, x0, :lo12:.LC11 mov x0, x2 bl sprintf add x0, sp, 48 bl insert b .L9 .L5: add x2, sp, 48 adrp x0, .LC12 add x1, x0, :lo12:.LC12 mov x0, x2 bl sprintf add x0, sp, 48 bl insert b .L9 .L4: add x2, sp, 48 adrp x0, .LC13 add x1, x0, :lo12:.LC13 mov x0, x2 bl sprintf add x0, sp, 48 bl insert b .L9 .L2: bl display b .L9 .L3: adrp x0, .LC14 add x0, x0, :lo12:.LC14 bl printf nop .L9: adrp x0, co add x0, x0, :lo12:co ldr w0, [x0] cmp w0, 0 beq .L10 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 72] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L12 bl __stack_chk_fail .L12: mov w0, w1 ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size main, .-main .section .rodata .align 3 .LC15: .string "Enter %s Table Entries\n" .align 3 .LC16: .string "ID%d (Primary) " .align 3 .LC17: .string "No Duplicates/Null Allowed" .align 3 .LC18: .string "Stock%d: " .align 3 .LC19: .string "PPI%d: " .align 3 .LC20: .string "Quant%d: " .align 3 .LC21: .string "Price%d: " .align 3 .LC22: .string "%d\n" .align 3 .LC23: .string "Location Name%d: " .align 3 .LC24: .string "%s" .align 3 .LC25: .string "Date%d: " .align 3 .LC26: .string "Item ID%d " .align 3 .LC27: .string "Item Id Must Match With Item Table" .align 3 .LC28: .string "Customer ID%d " .align 3 .LC29: .string "Customer Id Must Match With Customer Table" .align 3 .LC30: .string "Location ID%d " .align 3 .LC31: .string "Location Id Must Match With Location Table" .align 3 .LC32: .string "Time ID%d " .align 3 .LC33: .string "Time Id Must Match With Time Table" .align 3 .LC34: .string "Sales%d %d\n" .align 3 .LC35: .string "Continue? enter 0: " .text .align 2 .global insert .type insert, %function insert: .LFB7: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 mov x29, sp str x0, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 104] mov x1, 0 str wzr, [sp, 44] str wzr, [sp, 48] str wzr, [sp, 52] ldr x1, [sp, 24] adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl printf adrp x0, .LC9 add x1, x0, :lo12:.LC9 ldr x0, [sp, 24] bl strcmp cmp w0, 0 bne .L14 str wzr, [sp, 44] b .L15 .L20: ldr w1, [sp, 44] adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 adrp x1, i add x1, x1, :lo12:i add x0, x0, x1 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf str wzr, [sp, 48] b .L16 .L19: adrp x0, i add x2, x0, :lo12:i ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w2, [x0] adrp x0, i add x3, x0, :lo12:i ldrsw x1, [sp, 48] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x3, x0 ldr w0, [x0] cmp w2, w0 bne .L17 adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl printf ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] b .L18 .L17: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L16: ldr w1, [sp, 48] ldr w0, [sp, 44] cmp w1, w0 blt .L19 .L18: ldr w1, [sp, 44] adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 adrp x1, i add x1, x1, :lo12:i add x0, x0, x1 add x0, x0, 4 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf ldr w1, [sp, 44] adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 adrp x1, i add x1, x1, :lo12:i add x0, x0, x1 add x0, x0, 8 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L15: ldr w0, [sp, 44] cmp w0, 2 ble .L20 .L14: adrp x0, .LC10 add x1, x0, :lo12:.LC10 ldr x0, [sp, 24] bl strcmp cmp w0, 0 bne .L21 str wzr, [sp, 44] b .L22 .L27: ldr w1, [sp, 44] adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 adrp x1, c add x1, x1, :lo12:c add x0, x0, x1 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf str wzr, [sp, 48] b .L23 .L26: adrp x0, c add x2, x0, :lo12:c ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w2, [x0] adrp x0, c add x3, x0, :lo12:c ldrsw x1, [sp, 48] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x3, x0 ldr w0, [x0] cmp w2, w0 bne .L24 adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl printf ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] b .L25 .L24: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L23: ldr w1, [sp, 48] ldr w0, [sp, 44] cmp w1, w0 blt .L26 .L25: ldr w1, [sp, 44] adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 adrp x1, c add x1, x1, :lo12:c add x0, x0, x1 add x0, x0, 4 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf ldr w1, [sp, 44] adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl printf adrp x0, c add x2, x0, :lo12:c ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w2, [x0, 4] adrp x0, i add x3, x0, :lo12:i ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x3, x0 ldr w0, [x0, 8] mul w2, w2, w0 adrp x0, c add x3, x0, :lo12:c ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x3, x0 str w2, [x0, 8] adrp x0, c add x2, x0, :lo12:c ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w0, [x0, 8] mov w1, w0 adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl printf ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L22: ldr w0, [sp, 44] cmp w0, 2 ble .L27 .L21: adrp x0, .LC11 add x1, x0, :lo12:.LC11 ldr x0, [sp, 24] bl strcmp cmp w0, 0 bne .L28 str wzr, [sp, 44] b .L29 .L34: ldr w1, [sp, 44] adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 adrp x1, l add x1, x1, :lo12:l add x0, x0, x1 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf str wzr, [sp, 48] b .L30 .L33: adrp x0, l add x2, x0, :lo12:l ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x2, x0 ldr w2, [x0] adrp x0, l add x3, x0, :lo12:l ldrsw x1, [sp, 48] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x3, x0 ldr w0, [x0] cmp w2, w0 bne .L31 adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl printf ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] b .L32 .L31: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L30: ldr w1, [sp, 48] ldr w0, [sp, 44] cmp w1, w0 blt .L33 .L32: ldr w1, [sp, 44] adrp x0, .LC23 add x0, x0, :lo12:.LC23 bl printf add x0, sp, 56 mov x1, x0 adrp x0, .LC24 add x0, x0, :lo12:.LC24 bl __isoc99_scanf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 adrp x1, l add x1, x1, :lo12:l add x0, x0, x1 add x3, x0, 4 add x0, sp, 56 mov x2, x0 adrp x0, .LC24 add x1, x0, :lo12:.LC24 mov x0, x3 bl sprintf ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L29: ldr w0, [sp, 44] cmp w0, 2 ble .L34 .L28: adrp x0, .LC12 add x1, x0, :lo12:.LC12 ldr x0, [sp, 24] bl strcmp cmp w0, 0 bne .L35 str wzr, [sp, 44] b .L36 .L41: ldr w1, [sp, 44] adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 adrp x1, t add x1, x1, :lo12:t add x0, x0, x1 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf str wzr, [sp, 48] b .L37 .L40: adrp x0, t add x2, x0, :lo12:t ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x2, x0 ldr w2, [x0] adrp x0, t add x3, x0, :lo12:t ldrsw x1, [sp, 48] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x3, x0 ldr w0, [x0] cmp w2, w0 bne .L38 adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl printf ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] b .L39 .L38: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L37: ldr w1, [sp, 48] ldr w0, [sp, 44] cmp w1, w0 blt .L40 .L39: ldr w1, [sp, 44] adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl printf add x0, sp, 80 mov x1, x0 adrp x0, .LC24 add x0, x0, :lo12:.LC24 bl __isoc99_scanf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 adrp x1, t add x1, x1, :lo12:t add x0, x0, x1 add x3, x0, 4 add x0, sp, 80 mov x2, x0 adrp x0, .LC24 add x1, x0, :lo12:.LC24 mov x0, x3 bl sprintf ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L36: ldr w0, [sp, 44] cmp w0, 2 ble .L41 .L35: adrp x0, .LC13 add x1, x0, :lo12:.LC13 ldr x0, [sp, 24] bl strcmp cmp w0, 0 bne .L42 str wzr, [sp, 44] b .L43 .L60: ldr w1, [sp, 44] adrp x0, .LC26 add x0, x0, :lo12:.LC26 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 adrp x1, sf add x1, x1, :lo12:sf add x0, x0, x1 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf str wzr, [sp, 48] b .L44 .L47: adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w2, [x0] adrp x0, i add x3, x0, :lo12:i ldrsw x1, [sp, 48] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x3, x0 ldr w0, [x0] cmp w2, w0 bne .L45 adrp x0, .LC27 add x0, x0, :lo12:.LC27 bl printf ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] b .L46 .L45: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L44: ldr w1, [sp, 48] ldr w0, [sp, 44] cmp w1, w0 blt .L47 .L46: ldr w1, [sp, 44] adrp x0, .LC28 add x0, x0, :lo12:.LC28 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 adrp x1, sf add x1, x1, :lo12:sf add x0, x0, x1 add x0, x0, 4 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf str wzr, [sp, 48] b .L48 .L51: adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w2, [x0, 4] adrp x0, c add x3, x0, :lo12:c ldrsw x1, [sp, 48] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x3, x0 ldr w0, [x0] cmp w2, w0 bne .L49 adrp x0, .LC29 add x0, x0, :lo12:.LC29 bl printf ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] b .L50 .L49: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L48: ldr w1, [sp, 48] ldr w0, [sp, 44] cmp w1, w0 blt .L51 .L50: ldr w1, [sp, 44] adrp x0, .LC30 add x0, x0, :lo12:.LC30 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 adrp x1, sf add x1, x1, :lo12:sf add x0, x0, x1 add x0, x0, 8 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf str wzr, [sp, 48] b .L52 .L55: adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w2, [x0, 8] adrp x0, l add x3, x0, :lo12:l ldrsw x1, [sp, 48] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x3, x0 ldr w0, [x0] cmp w2, w0 bne .L53 adrp x0, .LC31 add x0, x0, :lo12:.LC31 bl printf ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] b .L54 .L53: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L52: ldr w1, [sp, 48] ldr w0, [sp, 44] cmp w1, w0 blt .L55 .L54: ldr w1, [sp, 44] adrp x0, .LC32 add x0, x0, :lo12:.LC32 bl printf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 adrp x1, sf add x1, x1, :lo12:sf add x0, x0, x1 add x0, x0, 12 mov x1, x0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf str wzr, [sp, 48] b .L56 .L59: adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w2, [x0, 12] adrp x0, t add x3, x0, :lo12:t ldrsw x1, [sp, 48] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x3, x0 ldr w0, [x0] cmp w2, w0 bne .L57 adrp x0, .LC33 add x0, x0, :lo12:.LC33 bl printf ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] b .L58 .L57: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L56: ldr w1, [sp, 48] ldr w0, [sp, 44] cmp w1, w0 blt .L59 .L58: adrp x0, c add x2, x0, :lo12:c ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w2, [x0, 4] adrp x0, i add x3, x0, :lo12:i ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x3, x0 ldr w0, [x0, 8] mul w2, w2, w0 adrp x0, sf add x3, x0, :lo12:sf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x3, x0 str w2, [x0, 16] adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w0, [x0, 16] mov w2, w0 ldr w1, [sp, 44] adrp x0, .LC34 add x0, x0, :lo12:.LC34 bl printf ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L43: ldr w0, [sp, 44] cmp w0, 2 ble .L60 .L42: adrp x0, .LC35 add x0, x0, :lo12:.LC35 bl printf adrp x0, co add x1, x0, :lo12:co adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 104] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L61 bl __stack_chk_fail .L61: ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size insert, .-insert .section .rodata .align 3 .LC36: .string "Item Table:" .align 3 .LC37: .string "ID\tStock\tPPI" .align 3 .LC38: .string "%d\t%d\t%d\n" .align 3 .LC39: .string "Customer Table:" .align 3 .LC40: .string "ID\tQuant\tPrice" .align 3 .LC41: .string "Location Table:" .align 3 .LC42: .string "ID\tLocation Name" .align 3 .LC43: .string "%d\t%s\n" .align 3 .LC44: .string "Time Table:" .align 3 .LC45: .string "ID\tTime" .align 3 .LC46: .string "Sales Fact Table:" .align 3 .LC47: .string "I_ID\tC_ID\tL_ID\tT_ID\tTotal Sales" .align 3 .LC48: .string "%d\t%d\t%d\t%d\t%d\n" .align 3 .LC49: .string "\n Average Sales = %d" .text .align 2 .global display .type display, %function display: .LFB8: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str wzr, [sp, 24] str wzr, [sp, 28] adrp x0, .LC36 add x0, x0, :lo12:.LC36 bl puts adrp x0, .LC37 add x0, x0, :lo12:.LC37 bl puts str wzr, [sp, 20] b .L63 .L64: adrp x0, i add x2, x0, :lo12:i ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w4, [x0] adrp x0, i add x2, x0, :lo12:i ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w5, [x0, 4] adrp x0, i add x2, x0, :lo12:i ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w0, [x0, 8] mov w3, w0 mov w2, w5 mov w1, w4 adrp x0, .LC38 add x0, x0, :lo12:.LC38 bl printf ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L63: ldr w0, [sp, 20] cmp w0, 2 ble .L64 adrp x0, .LC39 add x0, x0, :lo12:.LC39 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts str wzr, [sp, 20] b .L65 .L66: adrp x0, c add x2, x0, :lo12:c ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w4, [x0] adrp x0, c add x2, x0, :lo12:c ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w5, [x0, 4] adrp x0, c add x2, x0, :lo12:c ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w0, [x0, 8] mov w3, w0 mov w2, w5 mov w1, w4 adrp x0, .LC38 add x0, x0, :lo12:.LC38 bl printf ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L65: ldr w0, [sp, 20] cmp w0, 2 ble .L66 adrp x0, .LC41 add x0, x0, :lo12:.LC41 bl puts adrp x0, .LC42 add x0, x0, :lo12:.LC42 bl puts str wzr, [sp, 20] b .L67 .L68: adrp x0, l add x2, x0, :lo12:l ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x2, x0 ldr w3, [x0] ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 adrp x1, l add x1, x1, :lo12:l add x0, x0, x1 add x0, x0, 4 mov x2, x0 mov w1, w3 adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl printf ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L67: ldr w0, [sp, 20] cmp w0, 2 ble .L68 adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl puts adrp x0, .LC45 add x0, x0, :lo12:.LC45 bl puts str wzr, [sp, 20] b .L69 .L70: adrp x0, t add x2, x0, :lo12:t ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x2, x0 ldr w3, [x0] ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 adrp x1, t add x1, x1, :lo12:t add x0, x0, x1 add x0, x0, 4 mov x2, x0 mov w1, w3 adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl printf ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L69: ldr w0, [sp, 20] cmp w0, 2 ble .L70 adrp x0, .LC46 add x0, x0, :lo12:.LC46 bl puts adrp x0, .LC47 add x0, x0, :lo12:.LC47 bl puts str wzr, [sp, 20] b .L71 .L72: adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w6, [x0] adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w7, [x0, 4] adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w3, [x0, 8] adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w4, [x0, 12] adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w0, [x0, 16] mov w5, w0 mov w2, w7 mov w1, w6 adrp x0, .LC48 add x0, x0, :lo12:.LC48 bl printf adrp x0, sf add x2, x0, :lo12:sf ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 2 add x0, x2, x0 ldr w0, [x0, 16] ldr w1, [sp, 24] add w0, w1, w0 str w0, [sp, 24] ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L71: ldr w0, [sp, 20] cmp w0, 2 ble .L72 ldr w0, [sp, 24] mov w1, 21846 movk w1, 0x5555, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w0, w0, 31 sub w0, w1, w0 mov w1, w0 adrp x0, .LC49 add x0, x0, :lo12:.LC49 bl printf adrp x0, .LC35 add x0, x0, :lo12:.LC35 bl printf adrp x0, co add x1, x0, :lo12:co adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl __isoc99_scanf nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size display, .-display ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global f .type f, %function f: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 24] mov x1, 0 str wzr, [sp, 16] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 24] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L2 bl __stack_chk_fail .L2: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size f, .-f .align 2 .global f2 .type f2, %function f2: .LFB1: .cfi_startproc stp x29, x30, [sp, -144]! .cfi_def_cfa_offset 144 .cfi_offset 29, -144 .cfi_offset 30, -136 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 136] mov x1, 0 str wzr, [sp, 24] mov w0, 1 str w0, [sp, 28] stp xzr, xzr, [sp, 56] stp xzr, xzr, [sp, 72] str xzr, [sp, 88] ldr w0, [sp, 28] str w0, [sp, 56] ldr w0, [sp, 24] str w0, [sp, 60] mov w0, 2 str w0, [sp, 64] mov w0, 3 str w0, [sp, 68] stp xzr, xzr, [sp, 96] stp xzr, xzr, [sp, 112] str xzr, [sp, 128] mov w0, 2 str w0, [sp, 96] mov w0, 4 str w0, [sp, 100] ldr w0, [sp, 24] str w0, [sp, 104] mov w0, 6 str w0, [sp, 108] ldr w0, [sp, 28] str w0, [sp, 112] mov w0, 8 str w0, [sp, 116] stp xzr, xzr, [sp, 32] str wzr, [sp, 48] mov w0, 1 str w0, [sp, 36] mov w0, 2 str w0, [sp, 40] mov w0, 3 str w0, [sp, 44] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 136] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L4 bl __stack_chk_fail .L4: ldp x29, x30, [sp], 144 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size f2, .-f2 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "Enter a number(in hex(0x100, etc), 16-based numeric system):" .align 3 .LC1: .string "%x" .align 3 .LC2: .string "%o\n" .align 3 .LC3: .string "%d\n" .align 3 .LC4: .string "%o" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 24] mov x1, 0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts add x0, sp, 16 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf ldr w0, [sp, 16] mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf ldr w0, [sp, 16] mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf ldr w0, [sp, 16] str w0, [sp, 20] ldr w0, [sp, 16] lsl w0, w0, 1 str w0, [sp, 16] ldr w0, [sp, 16] mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf ldr w1, [sp, 20] adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl printf ldr w0, [sp, 20] mvn w0, w0 mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf add x0, sp, 16 mov x1, x0 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl __isoc99_scanf ldr w1, [sp, 16] ldr w0, [sp, 20] and w0, w1, w0 mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 24] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L3 bl __stack_chk_fail .L3: mov w0, w1 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global font .section .rodata .align 3 .type font, %object .size font, 288 font: .string "" .string "" .string "" .string "" .string "." .string "\006" .ascii "\006" .ascii ">\024>" .ascii "\f6\030" .ascii "2\b&" .ascii "\024*4" .string "" .string "\006" .string "" .ascii "\034\"" .string "\"\034" .ascii "\024\b\024" .ascii "\b\034\b" .string "@`" .ascii "\b\b\b" .string "" .string " " .ascii "`\034\002" .ascii ">\">" .ascii "$> " .ascii "2*&" .ascii "\"*>" .ascii "\016\b>" .ascii ".*:" .ascii ">*:" .ascii "\002:\006" .ascii ">*>" .ascii ".*>" .string "" .string "\024" .string "@d" .ascii "\b\024\"" .ascii "\024\024\024" .ascii "\"\024\b" .ascii "\002*\006" .ascii ">\"." .ascii ">\n>" .ascii ">*6" .ascii ">\"\"" .ascii ">\"\034" .ascii ">*\"" .ascii ">\n\002" .ascii ">\":" .ascii ">\b>" .ascii "\">\"" .ascii "0 >" .ascii ">\b6" .ascii "> " .ascii ">\004>" .ascii "<\b\036" .ascii ">\">" .ascii ">\n\016" .ascii ">\"~" .ascii ">\n4" .ascii ".*:" .ascii "\002>\002" .ascii "> >" .ascii "\036 \036" .ascii ">\020>" .ascii "6\b6" .ascii "\0068\006" .ascii "2*&" .string "" .ascii ">\"" .ascii "\002\034`" .string "\">" .ascii "\004\002\004" .ascii "@@@" .string "" .string "\002" .ascii ">\n>" .ascii ">*6" .ascii ">\"\"" .ascii ">\"\034" .ascii ">*\"" .ascii ">\n\002" .ascii ">\":" .ascii ">\b>" .ascii "\">\"" .ascii "0 >" .ascii ">\b6" .ascii "> " .ascii ">\004>" .ascii "<\b\036" .ascii ">\">" .ascii ">\n\016" .ascii ">\"~" .ascii ">\n4" .ascii ".*:" .ascii "\002>\002" .ascii "> >" .ascii "\036 \036" .ascii ">\020>" .ascii "6\b6" .ascii "\0068\006" .ascii "2*&" .ascii "\b>\"" .string "" .string "~" .ascii "\">\b" .ascii "\002\006\004" .string "" .string "" .string "" ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%x" .text .align 2 .global main .type main, %function main: .LFB6: .cfi_startproc sub sp, sp, #65536 .cfi_def_cfa_offset 65536 str xzr, [sp, 1024] sub sp, sp, #65536 .cfi_def_cfa_offset 131072 str xzr, [sp, 1024] sub sp, sp, #96 .cfi_def_cfa_offset 131168 stp x29, x30, [sp] .cfi_offset 29, -131168 .cfi_offset 30, -131160 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] add x1, sp, 131072 ldr x2, [x0] str x2, [x1, 88] mov x2, 0 add x0, sp, 131072 add x0, x0, 64 add x0, x0, 5 str x0, [sp, 56] str wzr, [sp, 44] b .L2 .L11: add x0, sp, 40 add x3, sp, 131072 add x3, x3, 64 mov x2, x0 adrp x0, .LC0 add x1, x0, :lo12:.LC0 mov x0, x3 bl __isoc99_sscanf cmp w0, 1 bne .L13 str wzr, [sp, 52] str wzr, [sp, 48] b .L4 .L8: ldrsw x0, [sp, 48] ldr x1, [sp, 56] add x0, x1, x0 ldrb w0, [x0] cmp w0, 48 beq .L5 ldrsw x0, [sp, 48] ldr x1, [sp, 56] add x0, x1, x0 ldrb w0, [x0] cmp w0, 49 beq .L5 mov w0, -1 str w0, [sp, 52] b .L6 .L5: ldrsw x0, [sp, 48] ldr x1, [sp, 56] add x0, x1, x0 ldrb w0, [x0] cmp w0, 49 bne .L6 mov w1, 15 ldr w0, [sp, 48] sub w0, w1, w0 mov w1, 1 lsl w0, w1, w0 ldr w1, [sp, 52] add w0, w1, w0 str w0, [sp, 52] .L6: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L4: ldr w0, [sp, 48] cmp w0, 15 bgt .L7 ldr w0, [sp, 52] cmn w0, #1 bne .L8 .L7: ldr w0, [sp, 52] cmn w0, #1 beq .L13 ldr w0, [sp, 40] ldr w1, [sp, 44] cmp w1, w0 bge .L9 ldr w0, [sp, 40] str w0, [sp, 44] .L9: ldr w0, [sp, 40] ldr w1, [sp, 52] and w2, w1, 65535 sxtw x0, w0 lsl x0, x0, 1 add x1, sp, 64 strh w2, [x1, x0] .L13: nop .L10: adrp x0, :got:stdin ldr x0, [x0, #:got_lo12:stdin] ldr x0, [x0] bl fgetc cmp w0, 10 bne .L10 .L2: adrp x0, :got:stdin ldr x0, [x0, #:got_lo12:stdin] ldr x1, [x0] add x0, sp, 131072 add x0, x0, 64 mov x3, x1 mov x2, 21 mov x1, 1 bl fread cmp x0, 21 beq .L11 ldr w0, [sp, 44] add w0, w0, 1 sxtw x1, w0 adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x2, [x0] add x0, sp, 64 mov x3, x2 mov x2, x1 mov x1, 2 bl fwrite mov w0, 0 bl exit .cfi_endproc .LFE6: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global foo .type foo, %function foo: .LFB0: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 strb w0, [sp, 15] ldrb w0, [sp, 15] cmp w0, 63 bls .L18 ldrb w0, [sp, 15] cmp w0, 127 beq .L18 nop .L5: ldrb w0, [sp, 15] cmp w0, 252 bhi .L19 .L7: nop .L8: ldrb w0, [sp, 15] strb w0, [sp, 31] ldrsb w0, [sp, 31] cmp w0, 0 blt .L20 nop .L10: ldrb w0, [sp, 31] sub w0, w0, #64 strb w0, [sp, 15] b .L12 .L20: nop .L11: ldrb w0, [sp, 31] sub w0, w0, #65 strb w0, [sp, 15] .L12: ldrb w0, [sp, 15] cmp w0, 93 bhi .L21 nop .L14: ldrb w0, [sp, 15] add w0, w0, 33 strb w0, [sp, 15] b .L16 .L21: nop .L15: ldrb w0, [sp, 15] sub w0, w0, #61 strb w0, [sp, 15] .L16: ldrsb w0, [sp, 15] b .L17 .L18: nop b .L4 .L19: nop .L4: mov w0, -1 .L17: add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size foo, .-foo .align 2 .global main .type main, %function main: .LFB1: .cfi_startproc stp x29, x30, [sp, -288]! .cfi_def_cfa_offset 288 .cfi_offset 29, -288 .cfi_offset 30, -280 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 280] mov x1, 0 adrp x0, .LC0 add x1, x0, :lo12:.LC0 add x0, sp, 24 ldp q0, q1, [x1] stp q0, q1, [x0] ldp q0, q1, [x1, 32] stp q0, q1, [x0, 32] ldp q0, q1, [x1, 64] stp q0, q1, [x0, 64] ldp q0, q1, [x1, 96] stp q0, q1, [x0, 96] ldp q0, q1, [x1, 128] stp q0, q1, [x0, 128] ldp q0, q1, [x1, 160] stp q0, q1, [x0, 160] ldp q0, q1, [x1, 192] stp q0, q1, [x0, 192] ldp q0, q1, [x1, 224] stp q0, q1, [x0, 224] str wzr, [sp, 20] b .L23 .L25: ldr w0, [sp, 20] and w0, w0, 255 bl foo sxtb w1, w0 ldr w0, [sp, 20] add x2, sp, 24 ldrsb w0, [x2, x0] cmp w1, w0 beq .L24 bl abort .L24: ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L23: ldr w0, [sp, 20] cmp w0, 255 bls .L25 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 280] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L27 bl __stack_chk_fail .L27: mov w0, w1 ldp x29, x30, [sp], 288 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size main, .-main .section .rodata .align 3 .LC0: .ascii "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" .ascii "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" .ascii "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" .ascii "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" .ascii "\377\377\377\377!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK" .ascii "LMNOPQRSTUVWXYZ[\\]^_\377`abcdefghijklmnopqrstuvwxyz{|}~!\"#" .ascii "$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^" .ascii "_`abcdefghijklmnopqrstuvwxyz{|}~\377\377\377" .text ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global compute_crc32 .type compute_crc32, %function compute_crc32: .LFB0: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, 24] str x1, [sp, 16] str w2, [sp, 12] ldr x0, [sp, 16] str x0, [sp, 40] b .L2 .L3: ldr x0, [sp, 24] lsr x1, x0, 24 ldr x0, [sp, 40] add x2, x0, 1 str x2, [sp, 40] ldrb w0, [x0] and x0, x0, 255 eor x0, x1, x0 and x1, x0, 255 adrp x0, rgLookup.0 add x0, x0, :lo12:rgLookup.0 ldr x1, [x0, x1, lsl 3] ldr x0, [sp, 24] lsl x0, x0, 8 eor x0, x1, x0 str x0, [sp, 24] .L2: ldr w0, [sp, 12] sub w1, w0, #1 str w1, [sp, 12] cmp w0, 0 bne .L3 ldr x0, [sp, 24] add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size compute_crc32, .-compute_crc32 .section .rodata .align 3 .type rgLookup.0, %object .size rgLookup.0, 2048 rgLookup.0: .xword 0 .xword 79764919 .xword 159529838 .xword 222504665 .xword 319059676 .xword 398814059 .xword 445009330 .xword 507990021 .xword 638119352 .xword 583659535 .xword 797628118 .xword 726387553 .xword 890018660 .xword 835552979 .xword 1015980042 .xword 944750013 .xword 1276238704 .xword 1221641927 .xword 1167319070 .xword 1095957929 .xword 1595256236 .xword 1540665371 .xword 1452775106 .xword 1381403509 .xword 1780037320 .xword 1859660671 .xword 1671105958 .xword 1733955601 .xword 2031960084 .xword 2111593891 .xword 1889500026 .xword 1952343757 .xword 2552477408 .xword 2632100695 .xword 2443283854 .xword 2506133561 .xword 2334638140 .xword 2414271883 .xword 2191915858 .xword 2254759653 .xword 3190512472 .xword 3135915759 .xword 3081330742 .xword 3009969537 .xword 2905550212 .xword 2850959411 .xword 2762807018 .xword 2691435357 .xword 3560074640 .xword 3505614887 .xword 3719321342 .xword 3648080713 .xword 3342211916 .xword 3287746299 .xword 3467911202 .xword 3396681109 .xword 4063920168 .xword 4143685023 .xword 4223187782 .xword 4286162673 .xword 3779000052 .xword 3858754371 .xword 3904687514 .xword 3967668269 .xword 881225847 .xword 809987520 .xword 1023691545 .xword 969234094 .xword 662832811 .xword 591600412 .xword 771767749 .xword 717299826 .xword 311336399 .xword 374308984 .xword 453813921 .xword 533576470 .xword 25881363 .xword 88864420 .xword 134795389 .xword 214552010 .xword 2023205639 .xword 2086057648 .xword 1897238633 .xword 1976864222 .xword 1804852699 .xword 1867694188 .xword 1645340341 .xword 1724971778 .xword 1587496639 .xword 1516133128 .xword 1461550545 .xword 1406951526 .xword 1302016099 .xword 1230646740 .xword 1142491917 .xword 1087903418 .xword 2896545431 .xword 2825181984 .xword 2770861561 .xword 2716262478 .xword 3215044683 .xword 3143675388 .xword 3055782693 .xword 3001194130 .xword 2326604591 .xword 2389456536 .xword 2200899649 .xword 2280525302 .xword 2578013683 .xword 2640855108 .xword 2418763421 .xword 2498394922 .xword 3769900519 .xword 3832873040 .xword 3912640137 .xword 3992402750 .xword 4088425275 .xword 4151408268 .xword 4197601365 .xword 4277358050 .xword 3334271071 .xword 3263032808 .xword 3476998961 .xword 3422541446 .xword 3585640067 .xword 3514407732 .xword 3694837229 .xword 3640369242 .xword 1762451694 .xword 1842216281 .xword 1619975040 .xword 1682949687 .xword 2047383090 .xword 2127137669 .xword 1938468188 .xword 2001449195 .xword 1325665622 .xword 1271206113 .xword 1183200824 .xword 1111960463 .xword 1543535498 .xword 1489069629 .xword 1434599652 .xword 1363369299 .xword 622672798 .xword 568075817 .xword 748617968 .xword 677256519 .xword 907627842 .xword 853037301 .xword 1067152940 .xword 995781531 .xword 51762726 .xword 131386257 .xword 177728840 .xword 240578815 .xword 269590778 .xword 349224269 .xword 429104020 .xword 491947555 .xword 4046411278 .xword 4126034873 .xword 4172115296 .xword 4234965207 .xword 3794477266 .xword 3874110821 .xword 3953728444 .xword 4016571915 .xword 3609705398 .xword 3555108353 .xword 3735388376 .xword 3664026991 .xword 3290680682 .xword 3236090077 .xword 3449943556 .xword 3378572211 .xword 3174993278 .xword 3120533705 .xword 3032266256 .xword 2961025959 .xword 2923101090 .xword 2868635157 .xword 2813903052 .xword 2742672763 .xword 2604032198 .xword 2683796849 .xword 2461293480 .xword 2524268063 .xword 2284983834 .xword 2364738477 .xword 2175806836 .xword 2238787779 .xword 1569362073 .xword 1498123566 .xword 1409854455 .xword 1355396672 .xword 1317987909 .xword 1246755826 .xword 1192025387 .xword 1137557660 .xword 2072149281 .xword 2135122070 .xword 1912620623 .xword 1992383480 .xword 1753615357 .xword 1816598090 .xword 1627664531 .xword 1707420964 .xword 295390185 .xword 358241886 .xword 404320391 .xword 483945776 .xword 43990325 .xword 106832002 .xword 186451547 .xword 266083308 .xword 932423249 .xword 861060070 .xword 1041341759 .xword 986742920 .xword 613929101 .xword 542559546 .xword 756411363 .xword 701822548 .xword 3316196985 .xword 3244833742 .xword 3425377559 .xword 3370778784 .xword 3601682597 .xword 3530312978 .xword 3744426955 .xword 3689838204 .xword 3819031489 .xword 3881883254 .xword 3928223919 .xword 4007849240 .xword 4037393693 .xword 4100235434 .xword 4180117107 .xword 4259748804 .xword 2310601993 .xword 2373574846 .xword 2151335527 .xword 2231098320 .xword 2596047829 .xword 2659030626 .xword 2470359227 .xword 2550115596 .xword 2947551409 .xword 2876312838 .xword 2788305887 .xword 2733848168 .xword 3165939309 .xword 3094707162 .xword 3040238851 .xword 2985771188 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 2 .type MAX_BLOCK_SERIALIZED_SIZE, %object .size MAX_BLOCK_SERIALIZED_SIZE, 4 MAX_BLOCK_SERIALIZED_SIZE: .word 20000000 .align 2 .type MAX_BLOCK_WEIGHT, %object .size MAX_BLOCK_WEIGHT, 4 MAX_BLOCK_WEIGHT: .word 20000000 .align 2 .type MAX_BLOCK_BASE_SIZE, %object .size MAX_BLOCK_BASE_SIZE, 4 MAX_BLOCK_BASE_SIZE: .word 10000000 .align 3 .type MAX_BLOCK_SIGOPS_COST, %object .size MAX_BLOCK_SIGOPS_COST, 8 MAX_BLOCK_SIGOPS_COST: .xword 500000 .align 2 .type COINBASE_MATURITY, %object .size COINBASE_MATURITY, 4 COINBASE_MATURITY: .word 100 .align 2 .type WITNESS_SCALE_FACTOR, %object .size WITNESS_SCALE_FACTOR, 4 WITNESS_SCALE_FACTOR: .word 4 .align 3 .type MIN_TRANSACTION_WEIGHT, %object .size MIN_TRANSACTION_WEIGHT, 8 MIN_TRANSACTION_WEIGHT: .xword 240 .align 3 .type MIN_SERIALIZABLE_TRANSACTION_WEIGHT, %object .size MIN_SERIALIZABLE_TRANSACTION_WEIGHT, 8 MIN_SERIALIZABLE_TRANSACTION_WEIGHT: .xword 40 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .type nds32_r45map, %object .size nds32_r45map, 64 nds32_r45map: .word 0 .word 1 .word 2 .word 3 .word 4 .word 5 .word 6 .word 7 .word 8 .word 9 .word 10 .word 11 .word 16 .word 17 .word 18 .word 19 .align 3 .type nds32_r54map, %object .size nds32_r54map, 128 nds32_r54map: .word 0 .word 1 .word 2 .word 3 .word 4 .word 5 .word 6 .word 7 .word 8 .word 9 .word 10 .word 11 .word -1 .word -1 .word -1 .word -1 .word 12 .word 13 .word 14 .word 15 .word -1 .word -1 .word -1 .word -1 .word -1 .word -1 .word -1 .word -1 .word -1 .word -1 .word -1 .word -1 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global dsu_init .type dsu_init, %function dsu_init: .LFB6: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str w0, [sp, 28] mov x0, 24 bl malloc str x0, [sp, 40] ldrsw x0, [sp, 28] lsl x0, x0, 2 bl malloc mov x1, x0 ldr x0, [sp, 40] str x1, [x0] ldrsw x0, [sp, 28] lsl x0, x0, 2 bl malloc mov x1, x0 ldr x0, [sp, 40] str x1, [x0, 8] ldrsw x0, [sp, 28] lsl x0, x0, 2 bl malloc mov x1, x0 ldr x0, [sp, 40] str x1, [x0, 16] str wzr, [sp, 36] b .L2 .L3: ldr x0, [sp, 40] ldr x1, [x0] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w1, [sp, 36] str w1, [x0] ldr x0, [sp, 40] ldr x1, [x0, 8] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 mov w1, 1 str w1, [x0] ldr x0, [sp, 40] ldr x1, [x0, 16] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 str wzr, [x0] ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L2: ldr w1, [sp, 36] ldr w0, [sp, 28] cmp w1, w0 blt .L3 ldr x0, [sp, 40] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size dsu_init, .-dsu_init .align 2 .global dsu_release .type dsu_release, %function dsu_release: .LFB7: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] cmp x0, 0 beq .L10 ldr x0, [sp, 24] ldr x0, [x0] cmp x0, 0 beq .L7 ldr x0, [sp, 24] ldr x0, [x0] bl free .L7: ldr x0, [sp, 24] ldr x0, [x0, 8] cmp x0, 0 beq .L8 ldr x0, [sp, 24] ldr x0, [x0, 8] bl free .L8: ldr x0, [sp, 24] ldr x0, [x0, 16] cmp x0, 0 beq .L9 ldr x0, [sp, 24] ldr x0, [x0, 16] bl free .L9: ldr x0, [sp, 24] bl free .L10: nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size dsu_release, .-dsu_release .align 2 .global dsu_find .type dsu_find, %function dsu_find: .LFB8: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -32 str x0, [sp, 40] str w1, [sp, 36] ldr x0, [sp, 40] ldr x1, [x0] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 36] cmp w1, w0 beq .L12 ldr x0, [sp, 40] ldr x1, [x0] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w2, [x0] ldr x0, [sp, 40] ldr x1, [x0] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x19, x1, x0 mov w1, w2 ldr x0, [sp, 40] bl dsu_find str w0, [x19] .L12: ldr x0, [sp, 40] ldr x1, [x0] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] ldr x19, [sp, 16] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size dsu_find, .-dsu_find .align 2 .global dsu_union .type dsu_union, %function dsu_union: .LFB9: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] str w2, [sp, 16] ldr w1, [sp, 20] ldr x0, [sp, 24] bl dsu_find str w0, [sp, 40] ldr w1, [sp, 16] ldr x0, [sp, 24] bl dsu_find str w0, [sp, 44] ldr w1, [sp, 40] ldr w0, [sp, 44] cmp w1, w0 bne .L15 mov w0, 0 b .L16 .L15: ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 44] lsl x0, x0, 2 add x0, x1, x0 ldr w1, [sp, 40] str w1, [x0] ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 40] lsl x0, x0, 2 add x0, x1, x0 ldr w2, [x0] ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 44] lsl x0, x0, 2 add x0, x1, x0 ldr w1, [x0] ldr x0, [sp, 24] ldr x3, [x0, 8] ldrsw x0, [sp, 40] lsl x0, x0, 2 add x0, x3, x0 add w1, w2, w1 str w1, [x0] mov w0, 1 .L16: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size dsu_union, .-dsu_union .align 2 .global dsu_addmalware .type dsu_addmalware, %function dsu_addmalware: .LFB10: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -32 str x0, [sp, 40] str w1, [sp, 36] ldr x0, [sp, 40] ldr x19, [x0, 16] ldr w1, [sp, 36] ldr x0, [sp, 40] bl dsu_find sxtw x0, w0 lsl x0, x0, 2 add x0, x19, x0 ldr w1, [x0] add w1, w1, 1 str w1, [x0] nop ldr x19, [sp, 16] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size dsu_addmalware, .-dsu_addmalware .align 2 .global dsu_getmaxspreadnode .type dsu_getmaxspreadnode, %function dsu_getmaxspreadnode: .LFB11: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] ldr w1, [sp, 20] ldr x0, [sp, 24] bl dsu_find str w0, [sp, 44] ldr x0, [sp, 24] ldr x1, [x0, 16] ldrsw x0, [sp, 44] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] cmp w0, 1 bne .L19 ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 44] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] b .L20 .L19: mov w0, 0 .L20: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size dsu_getmaxspreadnode, .-dsu_getmaxspreadnode .align 2 .global minMalwareSpread .type minMalwareSpread, %function minMalwareSpread: .LFB12: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] str w4, [sp, 32] ldr w0, [sp, 36] bl dsu_init str x0, [sp, 88] str wzr, [sp, 60] b .L22 .L26: ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 64] b .L23 .L25: ldrsw x0, [sp, 60] lsl x0, x0, 3 ldr x1, [sp, 40] add x0, x1, x0 ldr x1, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] cmp w0, 1 bne .L24 ldr w2, [sp, 64] ldr w1, [sp, 60] ldr x0, [sp, 88] bl dsu_union .L24: ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] .L23: ldr x0, [sp, 24] ldr w0, [x0] ldr w1, [sp, 64] cmp w1, w0 blt .L25 ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 60] .L22: ldr w1, [sp, 60] ldr w0, [sp, 36] cmp w1, w0 blt .L26 str wzr, [sp, 68] b .L27 .L28: ldrsw x0, [sp, 68] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr w0, [x0] mov w1, w0 ldr x0, [sp, 88] bl dsu_addmalware ldr w0, [sp, 68] add w0, w0, 1 str w0, [sp, 68] .L27: ldr w1, [sp, 68] ldr w0, [sp, 32] cmp w1, w0 blt .L28 mov w0, -1 str w0, [sp, 72] str wzr, [sp, 76] str wzr, [sp, 80] b .L29 .L32: ldrsw x0, [sp, 80] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr w0, [x0] mov w1, w0 ldr x0, [sp, 88] bl dsu_getmaxspreadnode str w0, [sp, 84] ldr w1, [sp, 84] ldr w0, [sp, 72] cmp w1, w0 ble .L30 ldr w0, [sp, 84] str w0, [sp, 72] ldrsw x0, [sp, 80] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr w0, [x0] str w0, [sp, 76] b .L31 .L30: ldr w1, [sp, 84] ldr w0, [sp, 72] cmp w1, w0 bne .L31 ldrsw x0, [sp, 80] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 76] cmp w1, w0 ble .L31 ldrsw x0, [sp, 80] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr w0, [x0] str w0, [sp, 76] .L31: ldr w0, [sp, 80] add w0, w0, 1 str w0, [sp, 80] .L29: ldr w1, [sp, 80] ldr w0, [sp, 32] cmp w1, w0 blt .L32 ldr w0, [sp, 76] ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size minMalwareSpread, .-minMalwareSpread ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp mov w0, 33963 movk w0, 0xff64, lsl 16 bl ft_putnbr mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "A" .align 3 .LC1: .string "B" .align 3 .LC2: .string "C" .align 3 .LC3: .string "Unknown" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov w0, 11 str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 11 bne .L2 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts b .L3 .L2: ldr w0, [sp, 28] cmp w0, 12 bne .L4 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts b .L3 .L4: ldr w0, [sp, 28] cmp w0, 13 bne .L5 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts b .L3 .L5: adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts .L3: mov w0, 0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "Hello world!!" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "hello world" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global queue .bss .align 3 .type queue, %object .size queue, 20 queue: .zero 20 .global front .data .align 2 .type front, %object .size front, 4 front: .word -1 .global rear .align 2 .type rear, %object .size rear, 4 rear: .word -1 .section .rodata .align 3 .LC0: .string "\nEnter the value to insert -: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "\nOverflow" .text .align 2 .global enqueue .type enqueue, %function enqueue: .LFB6: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 24] mov x1, 0 adrp x0, front add x0, x0, :lo12:front ldr w0, [x0] cmn w0, #1 bne .L2 adrp x0, rear add x0, x0, :lo12:rear ldr w0, [x0] cmn w0, #1 bne .L2 adrp x0, rear add x0, x0, :lo12:rear str wzr, [x0] adrp x0, rear add x0, x0, :lo12:rear ldr w1, [x0] adrp x0, front add x0, x0, :lo12:front str w1, [x0] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf add x0, sp, 20 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf adrp x0, rear add x0, x0, :lo12:rear ldr w1, [x0] ldr w2, [sp, 20] adrp x0, queue add x0, x0, :lo12:queue sxtw x1, w1 str w2, [x0, x1, lsl 2] b .L6 .L2: adrp x0, rear add x0, x0, :lo12:rear ldr w0, [x0] add w2, w0, 1 mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w2, w0 lsr x0, x0, 32 asr w1, w0, 1 asr w0, w2, 31 sub w1, w1, w0 mov w0, w1 lsl w0, w0, 2 add w0, w0, w1 sub w1, w2, w0 adrp x0, front add x0, x0, :lo12:front ldr w0, [x0] cmp w1, w0 bne .L4 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts b .L6 .L4: adrp x0, rear add x0, x0, :lo12:rear ldr w0, [x0] add w2, w0, 1 mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w2, w0 lsr x0, x0, 32 asr w1, w0, 1 asr w0, w2, 31 sub w1, w1, w0 mov w0, w1 lsl w0, w0, 2 add w0, w0, w1 sub w1, w2, w0 adrp x0, rear add x0, x0, :lo12:rear str w1, [x0] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf add x0, sp, 20 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf adrp x0, rear add x0, x0, :lo12:rear ldr w1, [x0] ldr w2, [sp, 20] adrp x0, queue add x0, x0, :lo12:queue sxtw x1, w1 str w2, [x0, x1, lsl 2] .L6: nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 24] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L5 bl __stack_chk_fail .L5: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size enqueue, .-enqueue .section .rodata .align 3 .LC3: .string "\nUnderflow" .align 3 .LC4: .string "\nDequed element is %d\n" .text .align 2 .global dequeue .type dequeue, %function dequeue: .LFB7: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, front add x0, x0, :lo12:front ldr w0, [x0] cmn w0, #1 bne .L8 adrp x0, rear add x0, x0, :lo12:rear ldr w0, [x0] cmn w0, #1 bne .L8 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts b .L11 .L8: adrp x0, front add x0, x0, :lo12:front ldr w1, [x0] adrp x0, rear add x0, x0, :lo12:rear ldr w0, [x0] cmp w1, w0 bne .L10 adrp x0, front add x0, x0, :lo12:front ldr w1, [x0] adrp x0, queue add x0, x0, :lo12:queue sxtw x1, w1 ldr w0, [x0, x1, lsl 2] mov w1, w0 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf adrp x0, rear add x0, x0, :lo12:rear mov w1, -1 str w1, [x0] adrp x0, rear add x0, x0, :lo12:rear ldr w1, [x0] adrp x0, front add x0, x0, :lo12:front str w1, [x0] b .L11 .L10: adrp x0, front add x0, x0, :lo12:front ldr w1, [x0] adrp x0, queue add x0, x0, :lo12:queue sxtw x1, w1 ldr w0, [x0, x1, lsl 2] mov w1, w0 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf adrp x0, front add x0, x0, :lo12:front ldr w0, [x0] add w2, w0, 1 mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w2, w0 lsr x0, x0, 32 asr w1, w0, 1 asr w0, w2, 31 sub w1, w1, w0 mov w0, w1 lsl w0, w0, 2 add w0, w0, w1 sub w1, w2, w0 adrp x0, front add x0, x0, :lo12:front str w1, [x0] .L11: nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size dequeue, .-dequeue .section .rodata .align 3 .LC5: .string "\nQueue is empty" .align 3 .LC6: .string "\nFront element is %d\n" .text .align 2 .global peek .type peek, %function peek: .LFB8: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, front add x0, x0, :lo12:front ldr w0, [x0] cmn w0, #1 bne .L13 adrp x0, rear add x0, x0, :lo12:rear ldr w0, [x0] cmn w0, #1 bne .L13 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts b .L14 .L13: adrp x0, front add x0, x0, :lo12:front ldr w1, [x0] adrp x0, queue add x0, x0, :lo12:queue sxtw x1, w1 ldr w0, [x0, x1, lsl 2] mov w1, w0 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl printf nop .L14: nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size peek, .-peek .section .rodata .align 3 .LC7: .string "\nQueue is -: " .align 3 .LC8: .string "%d\t" .text .align 2 .global display .type display, %function display: .LFB9: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, front add x0, x0, :lo12:front ldr w0, [x0] str w0, [sp, 28] adrp x0, front add x0, x0, :lo12:front ldr w0, [x0] cmn w0, #1 bne .L16 adrp x0, rear add x0, x0, :lo12:rear ldr w0, [x0] cmn w0, #1 bne .L16 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts b .L17 .L16: adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl printf b .L18 .L19: adrp x0, queue add x0, x0, :lo12:queue ldrsw x1, [sp, 28] ldr w0, [x0, x1, lsl 2] mov w1, w0 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl printf ldr w0, [sp, 28] add w1, w0, 1 mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w1, w0 lsr x0, x0, 32 asr w2, w0, 1 asr w0, w1, 31 sub w2, w2, w0 mov w0, w2 lsl w0, w0, 2 add w0, w0, w2 sub w0, w1, w0 str w0, [sp, 28] .L18: adrp x0, rear add x0, x0, :lo12:rear ldr w0, [x0] ldr w1, [sp, 28] cmp w1, w0 bne .L19 adrp x0, rear add x0, x0, :lo12:rear ldr w1, [x0] adrp x0, queue add x0, x0, :lo12:queue sxtw x1, w1 ldr w0, [x0, x1, lsl 2] mov w1, w0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf nop .L17: nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size display, .-display .section .rodata .align 3 .LC9: .string "\n1. Insert\n2. Delete\n3. Peek\n4. Display\n5. Exit" .align 3 .LC10: .string "\nEnter your choice -: " .align 3 .LC11: .string "\nInvalid choice!!\nPlease make a valid choice" .text .align 2 .global main .type main, %function main: .LFB10: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 24] mov x1, 0 .L28: adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl printf adrp x0, .LC10 add x0, x0, :lo12:.LC10 bl printf add x0, sp, 20 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf ldr w0, [sp, 20] cmp w0, 5 beq .L21 cmp w0, 5 bgt .L22 cmp w0, 4 beq .L23 cmp w0, 4 bgt .L22 cmp w0, 3 beq .L24 cmp w0, 3 bgt .L22 cmp w0, 1 beq .L25 cmp w0, 2 beq .L26 b .L22 .L25: bl enqueue b .L27 .L26: bl dequeue b .L27 .L24: bl peek b .L27 .L23: bl display b .L27 .L21: mov w0, 0 bl exit .L22: adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl puts nop .L27: b .L28 .cfi_endproc .LFE10: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%d" .align 3 .LC1: .string "clear" .align 3 .LC2: .string "%d x %d = %d\n" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 24] mov x1, 0 add x0, sp, 16 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl system ldr w0, [sp, 16] cmp w0, 2 ble .L2 ldr w0, [sp, 16] cmp w0, 999 bgt .L2 mov w0, 1 str w0, [sp, 20] b .L3 .L4: ldr w2, [sp, 16] ldr w1, [sp, 16] ldr w0, [sp, 20] mul w0, w1, w0 mov w3, w0 ldr w1, [sp, 20] adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L3: ldr w0, [sp, 20] cmp w0, 10 ble .L4 .L2: mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 24] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L6 bl __stack_chk_fail .L6: mov w0, w1 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global fix_fft .type fix_fft, %function fix_fft: .LFB0: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -96 str x0, [sp, 40] str w1, [sp, 36] str w2, [sp, 32] ldr w0, [sp, 36] mov w1, 1 lsl w0, w1, w0 str w0, [sp, 100] ldr w0, [sp, 100] cmp w0, 1024 ble .L2 mov w0, -1 b .L3 .L2: str wzr, [sp, 72] ldr w0, [sp, 100] sub w0, w0, #1 str w0, [sp, 104] str wzr, [sp, 92] mov w0, 1 str w0, [sp, 36] b .L4 .L8: ldr w0, [sp, 100] str w0, [sp, 84] .L5: ldr w0, [sp, 84] asr w0, w0, 1 str w0, [sp, 84] ldr w1, [sp, 72] ldr w0, [sp, 84] add w0, w1, w0 ldr w1, [sp, 104] cmp w1, w0 blt .L5 ldr w0, [sp, 84] sub w1, w0, #1 ldr w0, [sp, 72] and w0, w1, w0 ldr w1, [sp, 84] add w0, w1, w0 str w0, [sp, 72] ldr w1, [sp, 72] ldr w0, [sp, 36] cmp w1, w0 ble .L27 ldr w0, [sp, 36] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrh w0, [x0] strh w0, [sp, 68] ldr w0, [sp, 72] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x1, x1, x0 ldr w0, [sp, 36] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x2, [sp, 40] add x0, x2, x0 ldrsh w1, [x1] strh w1, [x0] ldr w0, [sp, 72] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrh w1, [sp, 68] strh w1, [x0] ldr w0, [sp, 36] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrh w0, [x0] strh w0, [sp, 70] ldr w0, [sp, 72] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x1, x1, x0 ldr w0, [sp, 36] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x2, [sp, 40] add x0, x2, x0 ldrsh w1, [x1] strh w1, [x0] ldr w0, [sp, 72] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrh w1, [sp, 70] strh w1, [x0] b .L7 .L27: nop .L7: ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L4: ldr w1, [sp, 36] ldr w0, [sp, 104] cmp w1, w0 ble .L8 mov w0, 1 str w0, [sp, 84] mov w0, 9 str w0, [sp, 88] b .L9 .L26: ldr w0, [sp, 32] cmp w0, 0 beq .L10 str wzr, [sp, 96] str wzr, [sp, 76] b .L11 .L17: ldr w0, [sp, 76] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrsh w0, [x0] str w0, [sp, 80] ldr w0, [sp, 80] cmp w0, 0 bge .L12 ldr w0, [sp, 80] neg w0, w0 str w0, [sp, 80] .L12: ldr w0, [sp, 76] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrsh w0, [x0] str w0, [sp, 36] ldr w0, [sp, 36] cmp w0, 0 bge .L13 ldr w0, [sp, 36] neg w0, w0 str w0, [sp, 36] .L13: ldr w1, [sp, 80] mov w0, 16383 cmp w1, w0 bgt .L14 ldr w1, [sp, 36] mov w0, 16383 cmp w1, w0 ble .L15 .L14: mov w0, 1 str w0, [sp, 96] b .L16 .L15: ldr w0, [sp, 76] add w0, w0, 1 str w0, [sp, 76] .L11: ldr w1, [sp, 76] ldr w0, [sp, 100] cmp w1, w0 blt .L17 .L16: ldr w0, [sp, 96] cmp w0, 0 beq .L18 ldr w0, [sp, 92] add w0, w0, 1 str w0, [sp, 92] b .L18 .L10: mov w0, 1 str w0, [sp, 96] .L18: ldr w0, [sp, 84] lsl w0, w0, 1 str w0, [sp, 108] str wzr, [sp, 36] b .L19 .L25: ldr w0, [sp, 88] ldr w1, [sp, 36] lsl w0, w1, w0 str w0, [sp, 80] ldr w0, [sp, 80] add w1, w0, 256 adrp x0, Sinewave add x0, x0, :lo12:Sinewave sxtw x1, w1 ldrh w0, [x0, x1, lsl 1] strh w0, [sp, 64] adrp x0, Sinewave add x0, x0, :lo12:Sinewave ldrsw x1, [sp, 80] ldrsh w0, [x0, x1, lsl 1] and w0, w0, 65535 neg w0, w0 and w0, w0, 65535 strh w0, [sp, 66] ldr w0, [sp, 32] cmp w0, 0 beq .L20 ldrh w0, [sp, 66] neg w0, w0 and w0, w0, 65535 strh w0, [sp, 66] .L20: ldr w0, [sp, 96] cmp w0, 0 beq .L21 ldrsh w0, [sp, 64] asr w0, w0, 1 strh w0, [sp, 64] ldrsh w0, [sp, 66] asr w0, w0, 1 strh w0, [sp, 66] .L21: ldr w0, [sp, 36] str w0, [sp, 76] b .L22 .L24: ldr w1, [sp, 76] ldr w0, [sp, 84] add w0, w1, w0 str w0, [sp, 80] ldr w0, [sp, 80] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrsh w0, [x0] mov w1, w0 ldrh w0, [sp, 64] bl fix_mpy sxth w0, w0 and w19, w0, 65535 ldr w0, [sp, 80] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrsh w0, [x0] mov w1, w0 ldrh w0, [sp, 66] bl fix_mpy sxth w0, w0 and w0, w0, 65535 sub w0, w19, w0 and w0, w0, 65535 strh w0, [sp, 68] ldr w0, [sp, 80] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrsh w0, [x0] mov w1, w0 ldrh w0, [sp, 64] bl fix_mpy sxth w0, w0 and w19, w0, 65535 ldr w0, [sp, 80] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrsh w0, [x0] mov w1, w0 ldrh w0, [sp, 66] bl fix_mpy sxth w0, w0 and w0, w0, 65535 add w0, w19, w0 and w0, w0, 65535 strh w0, [sp, 70] ldr w0, [sp, 76] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrh w0, [x0] strh w0, [sp, 60] ldr w0, [sp, 76] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 ldrh w0, [x0] strh w0, [sp, 62] ldr w0, [sp, 96] cmp w0, 0 beq .L23 ldrsh w0, [sp, 60] asr w0, w0, 1 strh w0, [sp, 60] ldrsh w0, [sp, 62] asr w0, w0, 1 strh w0, [sp, 62] .L23: ldrh w1, [sp, 60] ldrh w0, [sp, 68] sub w0, w1, w0 and w2, w0, 65535 ldr w0, [sp, 80] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 sxth w1, w2 strh w1, [x0] ldrh w1, [sp, 62] ldrh w0, [sp, 70] sub w0, w1, w0 and w2, w0, 65535 ldr w0, [sp, 80] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 sxth w1, w2 strh w1, [x0] ldrh w1, [sp, 60] ldrh w0, [sp, 68] add w0, w1, w0 and w2, w0, 65535 ldr w0, [sp, 76] lsl w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 sxth w1, w2 strh w1, [x0] ldrh w1, [sp, 62] ldrh w0, [sp, 70] add w0, w1, w0 and w2, w0, 65535 ldr w0, [sp, 76] lsl w0, w0, 1 add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 1 ldr x1, [sp, 40] add x0, x1, x0 sxth w1, w2 strh w1, [x0] ldr w1, [sp, 76] ldr w0, [sp, 108] add w0, w1, w0 str w0, [sp, 76] .L22: ldr w1, [sp, 76] ldr w0, [sp, 100] cmp w1, w0 blt .L24 ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L19: ldr w1, [sp, 36] ldr w0, [sp, 84] cmp w1, w0 blt .L25 ldr w0, [sp, 88] sub w0, w0, #1 str w0, [sp, 88] ldr w0, [sp, 108] str w0, [sp, 84] .L9: ldr w1, [sp, 84] ldr w0, [sp, 100] cmp w1, w0 blt .L26 ldr w0, [sp, 92] .L3: ldr x19, [sp, 16] ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size fix_fft, .-fix_fft .align 2 .global fix_mpy .type fix_mpy, %function fix_mpy: .LFB1: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strh w0, [sp, 14] strh w1, [sp, 12] ldrsh x1, [sp, 14] ldrsh x0, [sp, 12] mul x0, x1, x0 asr x0, x0, 15 strh w0, [sp, 14] ldrsh w0, [sp, 14] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size fix_mpy, .-fix_mpy .global Sinewave .data .align 3 .type Sinewave, %object .size Sinewave, 2048 Sinewave: .hword 0 .hword 201 .hword 402 .hword 603 .hword 804 .hword 1005 .hword 1206 .hword 1406 .hword 1607 .hword 1808 .hword 2009 .hword 2209 .hword 2410 .hword 2610 .hword 2811 .hword 3011 .hword 3211 .hword 3411 .hword 3611 .hword 3811 .hword 4011 .hword 4210 .hword 4409 .hword 4608 .hword 4807 .hword 5006 .hword 5205 .hword 5403 .hword 5601 .hword 5799 .hword 5997 .hword 6195 .hword 6392 .hword 6589 .hword 6786 .hword 6982 .hword 7179 .hword 7375 .hword 7571 .hword 7766 .hword 7961 .hword 8156 .hword 8351 .hword 8545 .hword 8739 .hword 8932 .hword 9126 .hword 9319 .hword 9511 .hword 9703 .hword 9895 .hword 10087 .hword 10278 .hword 10469 .hword 10659 .hword 10849 .hword 11038 .hword 11227 .hword 11416 .hword 11604 .hword 11792 .hword 11980 .hword 12166 .hword 12353 .hword 12539 .hword 12724 .hword 12909 .hword 13094 .hword 13278 .hword 13462 .hword 13645 .hword 13827 .hword 14009 .hword 14191 .hword 14372 .hword 14552 .hword 14732 .hword 14911 .hword 15090 .hword 15268 .hword 15446 .hword 15623 .hword 15799 .hword 15975 .hword 16150 .hword 16325 .hword 16499 .hword 16672 .hword 16845 .hword 17017 .hword 17189 .hword 17360 .hword 17530 .hword 17699 .hword 17868 .hword 18036 .hword 18204 .hword 18371 .hword 18537 .hword 18702 .hword 18867 .hword 19031 .hword 19194 .hword 19357 .hword 19519 .hword 19680 .hword 19840 .hword 20000 .hword 20159 .hword 20317 .hword 20474 .hword 20631 .hword 20787 .hword 20942 .hword 21096 .hword 21249 .hword 21402 .hword 21554 .hword 21705 .hword 21855 .hword 22004 .hword 22153 .hword 22301 .hword 22448 .hword 22594 .hword 22739 .hword 22883 .hword 23027 .hword 23169 .hword 23311 .hword 23452 .hword 23592 .hword 23731 .hword 23869 .hword 24006 .hword 24143 .hword 24278 .hword 24413 .hword 24546 .hword 24679 .hword 24811 .hword 24942 .hword 25072 .hword 25201 .hword 25329 .hword 25456 .hword 25582 .hword 25707 .hword 25831 .hword 25954 .hword 26077 .hword 26198 .hword 26318 .hword 26437 .hword 26556 .hword 26673 .hword 26789 .hword 26905 .hword 27019 .hword 27132 .hword 27244 .hword 27355 .hword 27466 .hword 27575 .hword 27683 .hword 27790 .hword 27896 .hword 28001 .hword 28105 .hword 28208 .hword 28309 .hword 28410 .hword 28510 .hword 28608 .hword 28706 .hword 28802 .hword 28897 .hword 28992 .hword 29085 .hword 29177 .hword 29268 .hword 29358 .hword 29446 .hword 29534 .hword 29621 .hword 29706 .hword 29790 .hword 29873 .hword 29955 .hword 30036 .hword 30116 .hword 30195 .hword 30272 .hword 30349 .hword 30424 .hword 30498 .hword 30571 .hword 30643 .hword 30713 .hword 30783 .hword 30851 .hword 30918 .hword 30984 .hword 31049 .hword 31113 .hword 31175 .hword 31236 .hword 31297 .hword 31356 .hword 31413 .hword 31470 .hword 31525 .hword 31580 .hword 31633 .hword 31684 .hword 31735 .hword 31785 .hword 31833 .hword 31880 .hword 31926 .hword 31970 .hword 32014 .hword 32056 .hword 32097 .hword 32137 .hword 32176 .hword 32213 .hword 32249 .hword 32284 .hword 32318 .hword 32350 .hword 32382 .hword 32412 .hword 32441 .hword 32468 .hword 32495 .hword 32520 .hword 32544 .hword 32567 .hword 32588 .hword 32609 .hword 32628 .hword 32646 .hword 32662 .hword 32678 .hword 32692 .hword 32705 .hword 32717 .hword 32727 .hword 32736 .hword 32744 .hword 32751 .hword 32757 .hword 32761 .hword 32764 .hword 32766 .hword 32767 .hword 32766 .hword 32764 .hword 32761 .hword 32757 .hword 32751 .hword 32744 .hword 32736 .hword 32727 .hword 32717 .hword 32705 .hword 32692 .hword 32678 .hword 32662 .hword 32646 .hword 32628 .hword 32609 .hword 32588 .hword 32567 .hword 32544 .hword 32520 .hword 32495 .hword 32468 .hword 32441 .hword 32412 .hword 32382 .hword 32350 .hword 32318 .hword 32284 .hword 32249 .hword 32213 .hword 32176 .hword 32137 .hword 32097 .hword 32056 .hword 32014 .hword 31970 .hword 31926 .hword 31880 .hword 31833 .hword 31785 .hword 31735 .hword 31684 .hword 31633 .hword 31580 .hword 31525 .hword 31470 .hword 31413 .hword 31356 .hword 31297 .hword 31236 .hword 31175 .hword 31113 .hword 31049 .hword 30984 .hword 30918 .hword 30851 .hword 30783 .hword 30713 .hword 30643 .hword 30571 .hword 30498 .hword 30424 .hword 30349 .hword 30272 .hword 30195 .hword 30116 .hword 30036 .hword 29955 .hword 29873 .hword 29790 .hword 29706 .hword 29621 .hword 29534 .hword 29446 .hword 29358 .hword 29268 .hword 29177 .hword 29085 .hword 28992 .hword 28897 .hword 28802 .hword 28706 .hword 28608 .hword 28510 .hword 28410 .hword 28309 .hword 28208 .hword 28105 .hword 28001 .hword 27896 .hword 27790 .hword 27683 .hword 27575 .hword 27466 .hword 27355 .hword 27244 .hword 27132 .hword 27019 .hword 26905 .hword 26789 .hword 26673 .hword 26556 .hword 26437 .hword 26318 .hword 26198 .hword 26077 .hword 25954 .hword 25831 .hword 25707 .hword 25582 .hword 25456 .hword 25329 .hword 25201 .hword 25072 .hword 24942 .hword 24811 .hword 24679 .hword 24546 .hword 24413 .hword 24278 .hword 24143 .hword 24006 .hword 23869 .hword 23731 .hword 23592 .hword 23452 .hword 23311 .hword 23169 .hword 23027 .hword 22883 .hword 22739 .hword 22594 .hword 22448 .hword 22301 .hword 22153 .hword 22004 .hword 21855 .hword 21705 .hword 21554 .hword 21402 .hword 21249 .hword 21096 .hword 20942 .hword 20787 .hword 20631 .hword 20474 .hword 20317 .hword 20159 .hword 20000 .hword 19840 .hword 19680 .hword 19519 .hword 19357 .hword 19194 .hword 19031 .hword 18867 .hword 18702 .hword 18537 .hword 18371 .hword 18204 .hword 18036 .hword 17868 .hword 17699 .hword 17530 .hword 17360 .hword 17189 .hword 17017 .hword 16845 .hword 16672 .hword 16499 .hword 16325 .hword 16150 .hword 15975 .hword 15799 .hword 15623 .hword 15446 .hword 15268 .hword 15090 .hword 14911 .hword 14732 .hword 14552 .hword 14372 .hword 14191 .hword 14009 .hword 13827 .hword 13645 .hword 13462 .hword 13278 .hword 13094 .hword 12909 .hword 12724 .hword 12539 .hword 12353 .hword 12166 .hword 11980 .hword 11792 .hword 11604 .hword 11416 .hword 11227 .hword 11038 .hword 10849 .hword 10659 .hword 10469 .hword 10278 .hword 10087 .hword 9895 .hword 9703 .hword 9511 .hword 9319 .hword 9126 .hword 8932 .hword 8739 .hword 8545 .hword 8351 .hword 8156 .hword 7961 .hword 7766 .hword 7571 .hword 7375 .hword 7179 .hword 6982 .hword 6786 .hword 6589 .hword 6392 .hword 6195 .hword 5997 .hword 5799 .hword 5601 .hword 5403 .hword 5205 .hword 5006 .hword 4807 .hword 4608 .hword 4409 .hword 4210 .hword 4011 .hword 3811 .hword 3611 .hword 3411 .hword 3211 .hword 3011 .hword 2811 .hword 2610 .hword 2410 .hword 2209 .hword 2009 .hword 1808 .hword 1607 .hword 1406 .hword 1206 .hword 1005 .hword 804 .hword 603 .hword 402 .hword 201 .hword 0 .hword -201 .hword -402 .hword -603 .hword -804 .hword -1005 .hword -1206 .hword -1406 .hword -1607 .hword -1808 .hword -2009 .hword -2209 .hword -2410 .hword -2610 .hword -2811 .hword -3011 .hword -3211 .hword -3411 .hword -3611 .hword -3811 .hword -4011 .hword -4210 .hword -4409 .hword -4608 .hword -4807 .hword -5006 .hword -5205 .hword -5403 .hword -5601 .hword -5799 .hword -5997 .hword -6195 .hword -6392 .hword -6589 .hword -6786 .hword -6982 .hword -7179 .hword -7375 .hword -7571 .hword -7766 .hword -7961 .hword -8156 .hword -8351 .hword -8545 .hword -8739 .hword -8932 .hword -9126 .hword -9319 .hword -9511 .hword -9703 .hword -9895 .hword -10087 .hword -10278 .hword -10469 .hword -10659 .hword -10849 .hword -11038 .hword -11227 .hword -11416 .hword -11604 .hword -11792 .hword -11980 .hword -12166 .hword -12353 .hword -12539 .hword -12724 .hword -12909 .hword -13094 .hword -13278 .hword -13462 .hword -13645 .hword -13827 .hword -14009 .hword -14191 .hword -14372 .hword -14552 .hword -14732 .hword -14911 .hword -15090 .hword -15268 .hword -15446 .hword -15623 .hword -15799 .hword -15975 .hword -16150 .hword -16325 .hword -16499 .hword -16672 .hword -16845 .hword -17017 .hword -17189 .hword -17360 .hword -17530 .hword -17699 .hword -17868 .hword -18036 .hword -18204 .hword -18371 .hword -18537 .hword -18702 .hword -18867 .hword -19031 .hword -19194 .hword -19357 .hword -19519 .hword -19680 .hword -19840 .hword -20000 .hword -20159 .hword -20317 .hword -20474 .hword -20631 .hword -20787 .hword -20942 .hword -21096 .hword -21249 .hword -21402 .hword -21554 .hword -21705 .hword -21855 .hword -22004 .hword -22153 .hword -22301 .hword -22448 .hword -22594 .hword -22739 .hword -22883 .hword -23027 .hword -23169 .hword -23311 .hword -23452 .hword -23592 .hword -23731 .hword -23869 .hword -24006 .hword -24143 .hword -24278 .hword -24413 .hword -24546 .hword -24679 .hword -24811 .hword -24942 .hword -25072 .hword -25201 .hword -25329 .hword -25456 .hword -25582 .hword -25707 .hword -25831 .hword -25954 .hword -26077 .hword -26198 .hword -26318 .hword -26437 .hword -26556 .hword -26673 .hword -26789 .hword -26905 .hword -27019 .hword -27132 .hword -27244 .hword -27355 .hword -27466 .hword -27575 .hword -27683 .hword -27790 .hword -27896 .hword -28001 .hword -28105 .hword -28208 .hword -28309 .hword -28410 .hword -28510 .hword -28608 .hword -28706 .hword -28802 .hword -28897 .hword -28992 .hword -29085 .hword -29177 .hword -29268 .hword -29358 .hword -29446 .hword -29534 .hword -29621 .hword -29706 .hword -29790 .hword -29873 .hword -29955 .hword -30036 .hword -30116 .hword -30195 .hword -30272 .hword -30349 .hword -30424 .hword -30498 .hword -30571 .hword -30643 .hword -30713 .hword -30783 .hword -30851 .hword -30918 .hword -30984 .hword -31049 .hword -31113 .hword -31175 .hword -31236 .hword -31297 .hword -31356 .hword -31413 .hword -31470 .hword -31525 .hword -31580 .hword -31633 .hword -31684 .hword -31735 .hword -31785 .hword -31833 .hword -31880 .hword -31926 .hword -31970 .hword -32014 .hword -32056 .hword -32097 .hword -32137 .hword -32176 .hword -32213 .hword -32249 .hword -32284 .hword -32318 .hword -32350 .hword -32382 .hword -32412 .hword -32441 .hword -32468 .hword -32495 .hword -32520 .hword -32544 .hword -32567 .hword -32588 .hword -32609 .hword -32628 .hword -32646 .hword -32662 .hword -32678 .hword -32692 .hword -32705 .hword -32717 .hword -32727 .hword -32736 .hword -32744 .hword -32751 .hword -32757 .hword -32761 .hword -32764 .hword -32766 .hword -32767 .hword -32766 .hword -32764 .hword -32761 .hword -32757 .hword -32751 .hword -32744 .hword -32736 .hword -32727 .hword -32717 .hword -32705 .hword -32692 .hword -32678 .hword -32662 .hword -32646 .hword -32628 .hword -32609 .hword -32588 .hword -32567 .hword -32544 .hword -32520 .hword -32495 .hword -32468 .hword -32441 .hword -32412 .hword -32382 .hword -32350 .hword -32318 .hword -32284 .hword -32249 .hword -32213 .hword -32176 .hword -32137 .hword -32097 .hword -32056 .hword -32014 .hword -31970 .hword -31926 .hword -31880 .hword -31833 .hword -31785 .hword -31735 .hword -31684 .hword -31633 .hword -31580 .hword -31525 .hword -31470 .hword -31413 .hword -31356 .hword -31297 .hword -31236 .hword -31175 .hword -31113 .hword -31049 .hword -30984 .hword -30918 .hword -30851 .hword -30783 .hword -30713 .hword -30643 .hword -30571 .hword -30498 .hword -30424 .hword -30349 .hword -30272 .hword -30195 .hword -30116 .hword -30036 .hword -29955 .hword -29873 .hword -29790 .hword -29706 .hword -29621 .hword -29534 .hword -29446 .hword -29358 .hword -29268 .hword -29177 .hword -29085 .hword -28992 .hword -28897 .hword -28802 .hword -28706 .hword -28608 .hword -28510 .hword -28410 .hword -28309 .hword -28208 .hword -28105 .hword -28001 .hword -27896 .hword -27790 .hword -27683 .hword -27575 .hword -27466 .hword -27355 .hword -27244 .hword -27132 .hword -27019 .hword -26905 .hword -26789 .hword -26673 .hword -26556 .hword -26437 .hword -26318 .hword -26198 .hword -26077 .hword -25954 .hword -25831 .hword -25707 .hword -25582 .hword -25456 .hword -25329 .hword -25201 .hword -25072 .hword -24942 .hword -24811 .hword -24679 .hword -24546 .hword -24413 .hword -24278 .hword -24143 .hword -24006 .hword -23869 .hword -23731 .hword -23592 .hword -23452 .hword -23311 .hword -23169 .hword -23027 .hword -22883 .hword -22739 .hword -22594 .hword -22448 .hword -22301 .hword -22153 .hword -22004 .hword -21855 .hword -21705 .hword -21554 .hword -21402 .hword -21249 .hword -21096 .hword -20942 .hword -20787 .hword -20631 .hword -20474 .hword -20317 .hword -20159 .hword -20000 .hword -19840 .hword -19680 .hword -19519 .hword -19357 .hword -19194 .hword -19031 .hword -18867 .hword -18702 .hword -18537 .hword -18371 .hword -18204 .hword -18036 .hword -17868 .hword -17699 .hword -17530 .hword -17360 .hword -17189 .hword -17017 .hword -16845 .hword -16672 .hword -16499 .hword -16325 .hword -16150 .hword -15975 .hword -15799 .hword -15623 .hword -15446 .hword -15268 .hword -15090 .hword -14911 .hword -14732 .hword -14552 .hword -14372 .hword -14191 .hword -14009 .hword -13827 .hword -13645 .hword -13462 .hword -13278 .hword -13094 .hword -12909 .hword -12724 .hword -12539 .hword -12353 .hword -12166 .hword -11980 .hword -11792 .hword -11604 .hword -11416 .hword -11227 .hword -11038 .hword -10849 .hword -10659 .hword -10469 .hword -10278 .hword -10087 .hword -9895 .hword -9703 .hword -9511 .hword -9319 .hword -9126 .hword -8932 .hword -8739 .hword -8545 .hword -8351 .hword -8156 .hword -7961 .hword -7766 .hword -7571 .hword -7375 .hword -7179 .hword -6982 .hword -6786 .hword -6589 .hword -6392 .hword -6195 .hword -5997 .hword -5799 .hword -5601 .hword -5403 .hword -5205 .hword -5006 .hword -4807 .hword -4608 .hword -4409 .hword -4210 .hword -4011 .hword -3811 .hword -3611 .hword -3411 .hword -3211 .hword -3011 .hword -2811 .hword -2610 .hword -2410 .hword -2209 .hword -2009 .hword -1808 .hword -1607 .hword -1406 .hword -1206 .hword -1005 .hword -804 .hword -603 .hword -402 .hword -201 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global c .data .type c, %object .size c, 1 c: .byte 97 .global cp .section .data.rel.local,"aw" .align 3 .type cp, %object .size cp, 8 cp: .xword c .global uc .data .type uc, %object .size uc, 1 uc: .byte 98 .global ucp .section .data.rel.local .align 3 .type ucp, %object .size ucp, 8 ucp: .xword uc .global s .data .align 1 .type s, %object .size s, 2 s: .hword 1 .global sp .section .data.rel.local .align 3 .type sp, %object .size sp, 8 sp: .xword s .global us .data .align 1 .type us, %object .size us, 2 us: .hword 6 .global usp .section .data.rel.local .align 3 .type usp, %object .size usp, 8 usp: .xword us .global i .data .align 2 .type i, %object .size i, 4 i: .word 2 .global ip .section .data.rel.local .align 3 .type ip, %object .size ip, 8 ip: .xword i .global ui .data .align 2 .type ui, %object .size ui, 4 ui: .word 7 .global uip .section .data.rel.local .align 3 .type uip, %object .size uip, 8 uip: .xword ui .global l .data .align 3 .type l, %object .size l, 8 l: .xword 3 .global lp .section .data.rel.local .align 3 .type lp, %object .size lp, 8 lp: .xword l .global ul .data .align 3 .type ul, %object .size ul, 8 ul: .xword 8 .global ulp .section .data.rel.local .align 3 .type ulp, %object .size ulp, 8 ulp: .xword ul .global f .data .align 2 .type f, %object .size f, 4 f: .word 1082130432 .global fp .section .data.rel.local .align 3 .type fp, %object .size fp, 8 fp: .xword f .global d .data .align 3 .type d, %object .size d, 8 d: .word 0 .word 1075052544 .global dp .section .data.rel.local .align 3 .type dp, %object .size dp, 8 dp: .xword d .global st .data .align 3 .type st, %object .size st, 8 st: .word 101 .word 102 .global stp .section .data.rel.local .align 3 .type stp, %object .size stp, 8 stp: .xword st .global un .bss .align 3 .type un, %object .size un, 8 un: .zero 8 .global unp .section .data.rel.local .align 3 .type unp, %object .size unp, 8 unp: .xword un .global carray .data .align 3 .type carray, %object .size carray, 9 carray: .string "an array" .text .align 2 .global call0a .type call0a, %function call0a: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strb w0, [sp, 15] strh w1, [sp, 12] str w2, [sp, 8] str x3, [sp] mov w0, 97 strb w0, [sp, 15] mov w0, 5 strh w0, [sp, 12] mov w0, 6 str w0, [sp, 8] mov x0, 7 str x0, [sp] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size call0a, .-call0a .align 2 .global call0b .type call0b, %function call0b: .LFB1: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strh w0, [sp, 14] str w1, [sp, 8] str x2, [sp] strb w3, [sp, 13] mov w0, 6 strh w0, [sp, 14] mov w0, 7 str w0, [sp, 8] mov x0, 8 str x0, [sp] mov w0, 106 strb w0, [sp, 13] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size call0b, .-call0b .align 2 .global call0c .type call0c, %function call0c: .LFB2: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] str x1, [sp] strb w2, [sp, 11] strh w3, [sp, 8] mov w0, 3 str w0, [sp, 12] mov x0, 4 str x0, [sp] mov w0, 107 strb w0, [sp, 11] mov w0, 5 strh w0, [sp, 8] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size call0c, .-call0c .align 2 .global call0d .type call0d, %function call0d: .LFB3: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] strb w1, [sp, 7] strh w2, [sp, 4] str w3, [sp] mov x0, 7 str x0, [sp, 8] mov w0, 122 strb w0, [sp, 7] mov w0, 8 strh w0, [sp, 4] mov w0, 9 str w0, [sp] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size call0d, .-call0d .align 2 .global call0e .type call0e, %function call0e: .LFB4: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 strb w0, [sp, 31] str x1, [sp, 16] strb w2, [sp, 30] str w3, [sp, 24] strb w4, [sp, 29] strh w5, [sp, 14] strb w6, [sp, 28] strb w7, [sp, 13] mov w0, 97 strb w0, [sp, 31] mov x0, 5 str x0, [sp, 16] mov w0, 98 strb w0, [sp, 30] mov w0, 7 str w0, [sp, 24] mov w0, 99 strb w0, [sp, 29] mov w0, 7 strh w0, [sp, 14] mov w0, 102 strb w0, [sp, 28] mov w0, 103 strb w0, [sp, 13] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size call0e, .-call0e .align 2 .global call1a .type call1a, %function call1a: .LFB5: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strb w0, [sp, 15] strh w1, [sp, 12] str w2, [sp, 8] str x3, [sp] mov w0, 5 strb w0, [sp, 15] mov w0, 6 strh w0, [sp, 12] mov w0, 7 str w0, [sp, 8] mov x0, 8 str x0, [sp] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE5: .size call1a, .-call1a .align 2 .global call1b .type call1b, %function call1b: .LFB6: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strh w0, [sp, 14] str w1, [sp, 8] str x2, [sp] strb w3, [sp, 13] mov w0, 5 strb w0, [sp, 13] mov w0, 6 strh w0, [sp, 14] mov w0, 7 str w0, [sp, 8] mov x0, 8 str x0, [sp] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size call1b, .-call1b .align 2 .global call1c .type call1c, %function call1c: .LFB7: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] str x1, [sp] strb w2, [sp, 11] strh w3, [sp, 8] mov w0, 5 strb w0, [sp, 11] mov w0, 6 strh w0, [sp, 8] mov w0, 7 str w0, [sp, 12] mov x0, 8 str x0, [sp] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size call1c, .-call1c .align 2 .global call1d .type call1d, %function call1d: .LFB8: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] strb w1, [sp, 7] strh w2, [sp, 4] str w3, [sp] mov w0, 5 strb w0, [sp, 7] mov w0, 6 strh w0, [sp, 4] mov w0, 7 str w0, [sp] mov x0, 8 str x0, [sp, 8] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size call1d, .-call1d .align 2 .global call1e .type call1e, %function call1e: .LFB9: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 strb w0, [sp, 31] str x1, [sp, 16] strb w2, [sp, 30] str w3, [sp, 24] strb w4, [sp, 29] strh w5, [sp, 14] strb w6, [sp, 28] strb w7, [sp, 13] mov w0, 5 strb w0, [sp, 31] mov x0, 7 str x0, [sp, 16] mov w0, 8 strb w0, [sp, 30] mov w0, 9 str w0, [sp, 24] mov w0, 10 strb w0, [sp, 29] mov w0, 11 strh w0, [sp, 14] mov w0, 12 strb w0, [sp, 28] mov w0, 55 strb w0, [sp, 13] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size call1e, .-call1e .align 2 .global call2a .type call2a, %function call2a: .LFB10: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 strb w0, [sp, 47] str s0, [sp, 40] strh w1, [sp, 44] str d1, [sp, 32] str w2, [sp, 28] str s2, [sp, 24] str x3, [sp, 16] str d3, [sp, 8] mov w0, 97 strb w0, [sp, 47] str wzr, [sp, 40] mov w0, 5 strh w0, [sp, 44] str xzr, [sp, 32] mov w0, 6 str w0, [sp, 28] mov w0, 52429 movk w0, 0x3dcc, lsl 16 fmov s0, w0 str s0, [sp, 24] mov x0, 7 str x0, [sp, 16] adrp x0, .LC0 ldr d0, [x0, #:lo12:.LC0] str d0, [sp, 8] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size call2a, .-call2a .align 2 .global call2b .type call2b, %function call2b: .LFB11: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str s0, [sp, 44] strh w0, [sp, 42] str d1, [sp, 32] str w1, [sp, 28] str s2, [sp, 24] str x2, [sp, 16] str d3, [sp, 8] strb w3, [sp, 41] mov w0, 97 strb w0, [sp, 41] str wzr, [sp, 44] mov w0, 5 strh w0, [sp, 42] str xzr, [sp, 32] mov w0, 6 str w0, [sp, 28] mov w0, 52429 movk w0, 0x3dcc, lsl 16 fmov s0, w0 str s0, [sp, 24] mov x0, 7 str x0, [sp, 16] adrp x0, .LC0 ldr d0, [x0, #:lo12:.LC0] str d0, [sp, 8] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size call2b, .-call2b .align 2 .global call2c .type call2c, %function call2c: .LFB12: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 strh w0, [sp, 46] str d0, [sp, 32] str w1, [sp, 40] str s1, [sp, 28] str x2, [sp, 16] str d2, [sp, 8] strb w3, [sp, 27] str s3, [sp, 4] mov w0, 97 strb w0, [sp, 27] str wzr, [sp, 4] mov w0, 5 strh w0, [sp, 46] str xzr, [sp, 32] mov w0, 6 str w0, [sp, 40] mov w0, 52429 movk w0, 0x3dcc, lsl 16 fmov s0, w0 str s0, [sp, 28] mov x0, 7 str x0, [sp, 16] adrp x0, .LC0 ldr d0, [x0, #:lo12:.LC0] str d0, [sp, 8] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size call2c, .-call2c .align 2 .global call2d .type call2d, %function call2d: .LFB13: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str d0, [sp, 40] str w0, [sp, 36] str s1, [sp, 32] str x1, [sp, 24] str d2, [sp, 16] strb w2, [sp, 15] str s3, [sp, 8] strh w3, [sp, 12] mov w0, 97 strb w0, [sp, 15] str wzr, [sp, 8] mov w0, 5 strh w0, [sp, 12] str xzr, [sp, 40] mov w0, 6 str w0, [sp, 36] mov w0, 52429 movk w0, 0x3dcc, lsl 16 fmov s0, w0 str s0, [sp, 32] mov x0, 7 str x0, [sp, 24] adrp x0, .LC0 ldr d0, [x0, #:lo12:.LC0] str d0, [sp, 16] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size call2d, .-call2d .align 2 .global call2e .type call2e, %function call2e: .LFB14: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str w0, [sp, 44] str s0, [sp, 40] str x1, [sp, 32] str d1, [sp, 24] strb w2, [sp, 23] str s2, [sp, 16] strh w3, [sp, 20] str d3, [sp, 8] mov w0, 97 strb w0, [sp, 23] str wzr, [sp, 16] mov w0, 5 strh w0, [sp, 20] str xzr, [sp, 8] mov w0, 6 str w0, [sp, 44] mov w0, 52429 movk w0, 0x3dcc, lsl 16 fmov s0, w0 str s0, [sp, 40] mov x0, 7 str x0, [sp, 32] adrp x0, .LC0 ldr d0, [x0, #:lo12:.LC0] str d0, [sp, 24] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE14: .size call2e, .-call2e .align 2 .global call2f .type call2f, %function call2f: .LFB15: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str s0, [sp, 44] str x0, [sp, 32] str d1, [sp, 24] strb w1, [sp, 43] str s2, [sp, 20] strh w2, [sp, 40] str d3, [sp, 8] str w3, [sp, 16] mov w0, 97 strb w0, [sp, 43] str wzr, [sp, 20] mov w0, 5 strh w0, [sp, 40] str xzr, [sp, 8] mov w0, 6 str w0, [sp, 16] mov w0, 52429 movk w0, 0x3dcc, lsl 16 fmov s0, w0 str s0, [sp, 44] mov x0, 7 str x0, [sp, 32] adrp x0, .LC0 ldr d0, [x0, #:lo12:.LC0] str d0, [sp, 24] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE15: .size call2f, .-call2f .align 2 .global call2g .type call2g, %function call2g: .LFB16: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, 40] str d0, [sp, 32] strb w1, [sp, 31] str s1, [sp, 24] strh w2, [sp, 28] str d2, [sp, 16] str w3, [sp, 12] str s3, [sp, 8] mov w0, 97 strb w0, [sp, 31] str wzr, [sp, 24] mov w0, 5 strh w0, [sp, 28] str xzr, [sp, 16] mov w0, 6 str w0, [sp, 12] mov w0, 52429 movk w0, 0x3dcc, lsl 16 fmov s0, w0 str s0, [sp, 8] mov x0, 7 str x0, [sp, 40] adrp x0, .LC0 ldr d0, [x0, #:lo12:.LC0] str d0, [sp, 32] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE16: .size call2g, .-call2g .align 2 .global call2h .type call2h, %function call2h: .LFB17: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str d0, [sp, 40] strb w0, [sp, 39] str s1, [sp, 32] strh w1, [sp, 36] str d2, [sp, 24] str w2, [sp, 20] str s3, [sp, 16] str x3, [sp, 8] mov w0, 97 strb w0, [sp, 39] str wzr, [sp, 32] mov w0, 5 strh w0, [sp, 36] str xzr, [sp, 24] mov w0, 6 str w0, [sp, 20] mov w0, 52429 movk w0, 0x3dcc, lsl 16 fmov s0, w0 str s0, [sp, 16] mov x0, 7 str x0, [sp, 8] adrp x0, .LC0 ldr d0, [x0, #:lo12:.LC0] str d0, [sp, 40] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE17: .size call2h, .-call2h .align 2 .global call2i .type call2i, %function call2i: .LFB18: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 strb w0, [sp, 47] str s0, [sp, 40] strb w1, [sp, 46] strb w2, [sp, 45] str d1, [sp, 32] strb w3, [sp, 44] strb w4, [sp, 31] strb w5, [sp, 30] str s2, [sp, 24] strh w6, [sp, 28] strb w7, [sp, 23] str d3, [sp, 8] mov w0, 97 strb w0, [sp, 47] str wzr, [sp, 40] mov w0, 5 strb w0, [sp, 46] str xzr, [sp, 32] mov w0, 6 strb w0, [sp, 45] mov w0, 52429 movk w0, 0x3dcc, lsl 16 fmov s0, w0 str s0, [sp, 24] mov w0, 7 strb w0, [sp, 44] adrp x0, .LC0 ldr d0, [x0, #:lo12:.LC0] str d0, [sp, 8] mov w0, 115 strb w0, [sp, 31] mov w0, 102 strb w0, [sp, 30] mov w0, 122 strb w0, [sp, 23] mov w0, 77 strh w0, [sp, 28] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE18: .size call2i, .-call2i .align 2 .global call3a .type call3a, %function call3a: .LFB19: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 24] str x1, [sp, 16] str x2, [sp, 8] str x3, [sp] str xzr, [sp, 24] str xzr, [sp, 16] str xzr, [sp, 8] str xzr, [sp] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE19: .size call3a, .-call3a .align 2 .global call3b .type call3b, %function call3b: .LFB20: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 24] str x1, [sp, 16] str x2, [sp, 8] str x3, [sp] str xzr, [sp, 24] str xzr, [sp, 16] str xzr, [sp, 8] str xzr, [sp] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE20: .size call3b, .-call3b .align 2 .global call3c .type call3c, %function call3c: .LFB21: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] str x1, [sp] str xzr, [sp, 8] str xzr, [sp] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE21: .size call3c, .-call3c .align 2 .global call4a .type call4a, %function call4a: .LFB22: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] str xzr, [sp, 8] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE22: .size call4a, .-call4a .align 2 .global call4b .type call4b, %function call4b: .LFB23: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] str xzr, [sp, 8] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size call4b, .-call4b .align 2 .global call5a .type call5a, %function call5a: .LFB24: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] mov w0, 5 str w0, [sp, 8] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE24: .size call5a, .-call5a .align 2 .global call5b .type call5b, %function call5b: .LFB25: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] mov w0, 7 str w0, [sp, 8] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE25: .size call5b, .-call5b .align 2 .global call6k .type call6k, %function call6k: .LFB26: .cfi_startproc nop ret .cfi_endproc .LFE26: .size call6k, .-call6k .align 2 .global call6j .type call6j, %function call6j: .LFB27: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] bl call6k nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE27: .size call6j, .-call6j .align 2 .global call6i .type call6i, %function call6i: .LFB28: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] ldr x0, [sp, 16] bl call6j nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE28: .size call6i, .-call6i .align 2 .global call6h .type call6h, %function call6h: .LFB29: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp strh w0, [sp, 30] str w1, [sp, 24] str x2, [sp, 16] ldr x1, [sp, 16] ldr w0, [sp, 24] bl call6i nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE29: .size call6h, .-call6h .align 2 .global call6g .type call6g, %function call6g: .LFB30: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp strb w0, [sp, 31] strh w1, [sp, 28] str w2, [sp, 24] str x3, [sp, 16] ldr x2, [sp, 16] ldr w1, [sp, 24] ldrh w0, [sp, 28] bl call6h nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE30: .size call6g, .-call6g .align 2 .global call6f .type call6f, %function call6f: .LFB31: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str d0, [sp, 40] strb w0, [sp, 39] strh w1, [sp, 36] str w2, [sp, 32] str x3, [sp, 24] ldr x3, [sp, 24] ldr w2, [sp, 32] ldrh w1, [sp, 36] ldrb w0, [sp, 39] bl call6g nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE31: .size call6f, .-call6f .align 2 .global call6e .type call6e, %function call6e: .LFB32: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str s0, [sp, 44] str d1, [sp, 32] strb w0, [sp, 43] strh w1, [sp, 40] str w2, [sp, 28] str x3, [sp, 16] ldr x3, [sp, 16] ldr w2, [sp, 28] ldrh w1, [sp, 40] ldrb w0, [sp, 43] ldr d0, [sp, 32] bl call6f nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE32: .size call6e, .-call6e .align 2 .global call6d .type call6d, %function call6d: .LFB33: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 56] str s0, [sp, 52] str d1, [sp, 40] strb w1, [sp, 51] strh w2, [sp, 48] str w3, [sp, 36] str x4, [sp, 24] ldr x3, [sp, 24] ldr w2, [sp, 36] ldrh w1, [sp, 48] ldrb w0, [sp, 51] ldr d1, [sp, 40] ldr s0, [sp, 52] bl call6e nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE33: .size call6d, .-call6d .align 2 .global call6c .type call6c, %function call6c: .LFB34: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str w0, [sp, 60] str x1, [sp, 48] str s0, [sp, 56] str d1, [sp, 40] strb w2, [sp, 39] strh w3, [sp, 36] str w4, [sp, 32] str x5, [sp, 24] ldr x4, [sp, 24] ldr w3, [sp, 32] ldrh w2, [sp, 36] ldrb w1, [sp, 39] ldr d1, [sp, 40] ldr s0, [sp, 56] ldr x0, [sp, 48] bl call6d nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE34: .size call6c, .-call6c .align 2 .global call6b .type call6b, %function call6b: .LFB35: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp strh w0, [sp, 62] str w1, [sp, 56] str x2, [sp, 48] str s0, [sp, 44] str d1, [sp, 32] strb w3, [sp, 43] strh w4, [sp, 40] str w5, [sp, 28] str x6, [sp, 16] ldr x5, [sp, 16] ldr w4, [sp, 28] ldrh w3, [sp, 40] ldrb w2, [sp, 43] ldr d1, [sp, 32] ldr s0, [sp, 44] ldr x1, [sp, 48] ldr w0, [sp, 56] bl call6c nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE35: .size call6b, .-call6b .align 2 .global call6a .type call6a, %function call6a: .LFB36: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp strb w0, [sp, 63] strh w1, [sp, 60] str w2, [sp, 56] str x3, [sp, 48] str s0, [sp, 44] str d1, [sp, 32] strb w4, [sp, 43] strh w5, [sp, 40] str w6, [sp, 28] str x7, [sp, 16] ldr x6, [sp, 16] ldr w5, [sp, 28] ldrh w4, [sp, 40] ldrb w3, [sp, 43] ldr d1, [sp, 32] ldr s0, [sp, 44] ldr x2, [sp, 48] ldr w1, [sp, 56] ldrh w0, [sp, 60] bl call6b nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE36: .size call6a, .-call6a .align 2 .global call7k .type call7k, %function call7k: .LFB37: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 strb w0, [sp, 47] str w1, [sp, 40] strh w2, [sp, 44] str x3, [sp, 32] str s0, [sp, 28] strb w4, [sp, 46] str d1, [sp, 16] strh w5, [sp, 26] str x6, [sp, 8] str w7, [sp, 4] mov w0, 97 strb w0, [sp, 47] mov w0, 7 str w0, [sp, 40] mov w0, 8 strh w0, [sp, 44] mov x0, 7 str x0, [sp, 32] mov w0, 39322 movk w0, 0x3e99, lsl 16 fmov s0, w0 str s0, [sp, 28] mov w0, 44 strb w0, [sp, 46] adrp x0, .LC1 ldr d0, [x0, #:lo12:.LC1] str d0, [sp, 16] mov w0, 77 strh w0, [sp, 26] mov x0, 43 str x0, [sp, 8] mov w0, 33 str w0, [sp, 4] nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE37: .size call7k, .-call7k .align 2 .global call7j .type call7j, %function call7j: .LFB38: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str w0, [sp, 60] strb w1, [sp, 59] str w2, [sp, 52] strh w3, [sp, 56] str x4, [sp, 40] str s0, [sp, 48] strb w5, [sp, 58] str d1, [sp, 32] strh w6, [sp, 30] str x7, [sp, 16] ldr w7, [sp, 60] ldr x6, [sp, 16] ldrh w5, [sp, 30] ldr d1, [sp, 32] ldrb w4, [sp, 58] ldr s0, [sp, 48] ldr x3, [sp, 40] ldrh w2, [sp, 56] ldr w1, [sp, 52] ldrb w0, [sp, 59] bl call7k nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE38: .size call7j, .-call7j .align 2 .global call7i .type call7i, %function call7i: .LFB39: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 56] str w1, [sp, 52] strb w2, [sp, 51] str w3, [sp, 44] strh w4, [sp, 48] str x5, [sp, 32] str s0, [sp, 40] strb w6, [sp, 50] str d1, [sp, 24] strh w7, [sp, 22] ldr x7, [sp, 56] ldrh w6, [sp, 22] ldr d1, [sp, 24] ldrb w5, [sp, 50] ldr s0, [sp, 40] ldr x4, [sp, 32] ldrh w3, [sp, 48] ldr w2, [sp, 44] ldrb w1, [sp, 51] ldr w0, [sp, 52] bl call7j nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE39: .size call7i, .-call7i .align 2 .global call7h .type call7h, %function call7h: .LFB40: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp strh w0, [sp, 62] str x1, [sp, 48] str w2, [sp, 56] strb w3, [sp, 61] str w4, [sp, 44] strh w5, [sp, 42] str x6, [sp, 32] str s0, [sp, 28] strb w7, [sp, 41] str d1, [sp, 16] ldrh w7, [sp, 62] ldr d1, [sp, 16] ldrb w6, [sp, 41] ldr s0, [sp, 28] ldr x5, [sp, 32] ldrh w4, [sp, 42] ldr w3, [sp, 44] ldrb w2, [sp, 61] ldr w1, [sp, 56] ldr x0, [sp, 48] bl call7i nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE40: .size call7h, .-call7h .align 2 .global call7g .type call7g, %function call7g: .LFB41: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str d0, [sp, 56] strh w0, [sp, 54] str x1, [sp, 40] str w2, [sp, 48] strb w3, [sp, 53] str w4, [sp, 36] strh w5, [sp, 34] str x6, [sp, 24] str s1, [sp, 20] strb w7, [sp, 33] ldr d1, [sp, 56] ldrb w7, [sp, 33] ldr s0, [sp, 20] ldr x6, [sp, 24] ldrh w5, [sp, 34] ldr w4, [sp, 36] ldrb w3, [sp, 53] ldr w2, [sp, 48] ldr x1, [sp, 40] ldrh w0, [sp, 54] bl call7h nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size call7g, .-call7g .align 2 .global call7f .type call7f, %function call7f: .LFB42: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp strb w0, [sp, 63] str d0, [sp, 48] strh w1, [sp, 60] str x2, [sp, 40] str w3, [sp, 56] strb w4, [sp, 62] str w5, [sp, 36] strh w6, [sp, 34] str x7, [sp, 24] str s1, [sp, 20] ldrb w7, [sp, 63] ldr s1, [sp, 20] ldr x6, [sp, 24] ldrh w5, [sp, 34] ldr w4, [sp, 36] ldrb w3, [sp, 62] ldr w2, [sp, 56] ldr x1, [sp, 40] ldrh w0, [sp, 60] ldr d0, [sp, 48] bl call7g nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE42: .size call7f, .-call7f .align 2 .global call7e .type call7e, %function call7e: .LFB43: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str s0, [sp, 60] strb w0, [sp, 59] str d1, [sp, 48] strh w1, [sp, 56] str x2, [sp, 40] str w3, [sp, 36] strb w4, [sp, 58] str w5, [sp, 32] strh w6, [sp, 30] str x7, [sp, 16] ldr s1, [sp, 60] ldr x7, [sp, 16] ldrh w6, [sp, 30] ldr w5, [sp, 32] ldrb w4, [sp, 58] ldr w3, [sp, 36] ldr x2, [sp, 40] ldrh w1, [sp, 56] ldr d0, [sp, 48] ldrb w0, [sp, 59] bl call7f nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE43: .size call7e, .-call7e .align 2 .global call7d .type call7d, %function call7d: .LFB44: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 56] str s0, [sp, 52] strb w1, [sp, 51] str d1, [sp, 40] strh w2, [sp, 48] str x3, [sp, 32] str w4, [sp, 28] strb w5, [sp, 50] str w6, [sp, 24] strh w7, [sp, 22] ldr x7, [sp, 56] ldrh w6, [sp, 22] ldr w5, [sp, 24] ldrb w4, [sp, 50] ldr w3, [sp, 28] ldr x2, [sp, 32] ldrh w1, [sp, 48] ldr d1, [sp, 40] ldrb w0, [sp, 51] ldr s0, [sp, 52] bl call7e nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE44: .size call7d, .-call7d .align 2 .global call7c .type call7c, %function call7c: .LFB45: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp strh w0, [sp, 62] str x1, [sp, 48] str s0, [sp, 56] strb w2, [sp, 61] str d1, [sp, 40] strh w3, [sp, 38] str x4, [sp, 24] str w5, [sp, 32] strb w6, [sp, 37] str w7, [sp, 20] ldrh w7, [sp, 62] ldr w6, [sp, 20] ldrb w5, [sp, 37] ldr w4, [sp, 32] ldr x3, [sp, 24] ldrh w2, [sp, 38] ldr d1, [sp, 40] ldrb w1, [sp, 61] ldr s0, [sp, 56] ldr x0, [sp, 48] bl call7d nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE45: .size call7c, .-call7c .align 2 .global call7b .type call7b, %function call7b: .LFB46: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str w0, [sp, 60] strh w1, [sp, 58] str x2, [sp, 48] str s0, [sp, 44] strb w3, [sp, 57] str d1, [sp, 32] strh w4, [sp, 42] str x5, [sp, 24] str w6, [sp, 20] strb w7, [sp, 41] ldr w7, [sp, 60] ldrb w6, [sp, 41] ldr w5, [sp, 20] ldr x4, [sp, 24] ldrh w3, [sp, 42] ldr d1, [sp, 32] ldrb w2, [sp, 57] ldr s0, [sp, 44] ldr x1, [sp, 48] ldrh w0, [sp, 58] bl call7c nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE46: .size call7b, .-call7b .align 2 .global call7a .type call7a, %function call7a: .LFB47: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp strb w0, [sp, 63] str w1, [sp, 56] strh w2, [sp, 60] str x3, [sp, 48] str s0, [sp, 44] strb w4, [sp, 62] str d1, [sp, 32] strh w5, [sp, 42] str x6, [sp, 24] str w7, [sp, 20] ldrb w7, [sp, 63] ldr w6, [sp, 20] ldr x5, [sp, 24] ldrh w4, [sp, 42] ldr d1, [sp, 32] ldrb w3, [sp, 62] ldr s0, [sp, 44] ldr x2, [sp, 48] ldrh w1, [sp, 60] ldr w0, [sp, 56] bl call7b nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE47: .size call7a, .-call7a .align 2 .global hitbottom .type hitbottom, %function hitbottom: .LFB48: .cfi_startproc nop ret .cfi_endproc .LFE48: .size hitbottom, .-hitbottom .align 2 .global use_a .type use_a, %function use_a: .LFB49: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 stp x0, x1, [sp] ldp x0, x1, [sp] stp x0, x1, [sp, 16] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE49: .size use_a, .-use_a .align 2 .global recurse .type recurse, %function recurse: .LFB50: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x0, x1, [sp, 32] str w2, [sp, 28] ldr w0, [sp, 28] sub w0, w0, #1 str w0, [sp, 28] ldrsw x0, [sp, 28] str x0, [sp, 40] ldr x0, [sp, 40] str w0, [sp, 36] ldr w0, [sp, 36] sxth w0, w0 strh w0, [sp, 32] ldr w0, [sp, 28] cmp w0, 0 bne .L52 bl hitbottom b .L53 .L52: ldr w2, [sp, 28] ldp x0, x1, [sp, 32] bl recurse .L53: ldp x0, x1, [sp, 32] bl use_a nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE50: .size recurse, .-recurse .align 2 .global test_struct_args .type test_struct_args, %function test_struct_args: .LFB51: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov w0, 5 strh w0, [sp, 16] mov w0, 5 str w0, [sp, 20] mov x0, 5 str x0, [sp, 24] mov w2, 5 ldp x0, x1, [sp, 16] bl recurse nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE51: .size test_struct_args, .-test_struct_args .align 2 .global localvars_after_alloca .type localvars_after_alloca, %function localvars_after_alloca: .LFB52: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp .cfi_def_cfa_register 29 sub sp, sp, #16 strb w0, [x29, 31] strh w1, [x29, 28] str w2, [x29, 24] str x3, [x29, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [x29, 40] mov x1, 0 ldrsh w0, [x29, 28] add w0, w0, 50 sxtw x0, w0 add x0, x0, 15 lsr x0, x0, 4 lsl x0, x0, 4 and x1, x0, -65536 sub x1, sp, x1 .L56: cmp sp, x1 beq .L57 sub sp, sp, #65536 str xzr, [sp, 1024] b .L56 .L57: and x1, x0, 65535 sub sp, sp, x1 str xzr, [sp] and x0, x0, 65535 cmp x0, 1024 bcc .L58 str xzr, [sp, 1024] .L58: add x0, sp, 16 add x0, x0, 15 lsr x0, x0, 4 lsl x0, x0, 4 str x0, [x29, 32] mov w0, 97 strb w0, [x29, 31] mov w0, 5 strh w0, [x29, 28] mov w0, 6 str w0, [x29, 24] mov x0, 7 str x0, [x29, 16] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [x29, 40] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L59 bl __stack_chk_fail .L59: mov sp, x29 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa 31, 0 ret .cfi_endproc .LFE52: .size localvars_after_alloca, .-localvars_after_alloca .align 2 .global call_after_alloca_subr .type call_after_alloca_subr, %function call_after_alloca_subr: .LFB53: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 strb w0, [sp, 31] strh w1, [sp, 28] str w2, [sp, 24] str x3, [sp, 16] strb w4, [sp, 30] strh w5, [sp, 14] str w6, [sp, 8] str x7, [sp] mov w0, 97 strb w0, [sp, 31] mov w0, 7 str w0, [sp, 24] mov w0, 8 strh w0, [sp, 28] mov x0, 7 str x0, [sp, 16] mov w0, 44 strb w0, [sp, 30] mov w0, 77 strh w0, [sp, 14] mov x0, 43 str x0, [sp] mov w0, 33 str w0, [sp, 8] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE53: .size call_after_alloca_subr, .-call_after_alloca_subr .align 2 .global call_after_alloca .type call_after_alloca, %function call_after_alloca: .LFB54: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp .cfi_def_cfa_register 29 sub sp, sp, #16 strb w0, [x29, 31] strh w1, [x29, 28] str w2, [x29, 24] str x3, [x29, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [x29, 40] mov x1, 0 ldrsh w0, [x29, 28] add w0, w0, 50 sxtw x0, w0 add x0, x0, 15 lsr x0, x0, 4 lsl x0, x0, 4 and x1, x0, -65536 sub x1, sp, x1 .L62: cmp sp, x1 beq .L63 sub sp, sp, #65536 str xzr, [sp, 1024] b .L62 .L63: and x1, x0, 65535 sub sp, sp, x1 str xzr, [sp] and x0, x0, 65535 cmp x0, 1024 bcc .L64 str xzr, [sp, 1024] .L64: add x0, sp, 16 add x0, x0, 15 lsr x0, x0, 4 lsl x0, x0, 4 str x0, [x29, 32] mov x7, 13 mov w6, 12 mov w5, 11 mov w4, 98 ldr x3, [x29, 16] ldr w2, [x29, 24] ldrh w1, [x29, 28] ldrb w0, [x29, 31] bl call_after_alloca_subr nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [x29, 40] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L65 bl __stack_chk_fail .L65: mov sp, x29 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa 31, 0 ret .cfi_endproc .LFE54: .size call_after_alloca, .-call_after_alloca .align 2 .global call_with_trampolines .type call_with_trampolines, %function call_with_trampolines: .LFB55: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str d0, [sp, 8] ldr d0, [sp, 8] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE55: .size call_with_trampolines, .-call_with_trampolines .align 2 .global marker_indirect_call .type marker_indirect_call, %function marker_indirect_call: .LFB56: .cfi_startproc nop ret .cfi_endproc .LFE56: .size marker_indirect_call, .-marker_indirect_call .align 2 .global marker_call_with_trampolines .type marker_call_with_trampolines, %function marker_call_with_trampolines: .LFB57: .cfi_startproc nop ret .cfi_endproc .LFE57: .size marker_call_with_trampolines, .-marker_call_with_trampolines .align 2 .global main .type main, %function main: .LFB58: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, call0a add x0, x0, :lo12:call0a str x0, [sp, 16] adrp x0, call_with_trampolines add x0, x0, :lo12:call_with_trampolines str x0, [sp, 24] adrp x0, c add x0, x0, :lo12:c ldrb w4, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w5, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, l add x0, x0, :lo12:l ldr x0, [x0] mov x3, x0 mov w2, w1 mov w1, w5 mov w0, w4 bl call0a adrp x0, s add x0, x0, :lo12:s ldrsh w4, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, l add x0, x0, :lo12:l ldr x2, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w0, [x0] mov w3, w0 mov w0, w4 bl call0b adrp x0, i add x0, x0, :lo12:i ldr w4, [x0] adrp x0, l add x0, x0, :lo12:l ldr x1, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w2, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w0, [x0] mov w3, w0 mov w0, w4 bl call0c adrp x0, l add x0, x0, :lo12:l ldr x4, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w1, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w2, [x0] adrp x0, i add x0, x0, :lo12:i ldr w0, [x0] mov w3, w0 mov x0, x4 bl call0d adrp x0, c add x0, x0, :lo12:c ldrb w8, [x0] adrp x0, l add x0, x0, :lo12:l ldr x1, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w9, [x0] adrp x0, i add x0, x0, :lo12:i ldr w2, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w3, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w4, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w5, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w0, [x0] mov w7, w0 mov w6, w5 mov w5, w4 mov w4, w3 mov w3, w2 mov w2, w9 mov w0, w8 bl call0e adrp x0, uc add x0, x0, :lo12:uc ldrb w4, [x0] adrp x0, us add x0, x0, :lo12:us ldrh w5, [x0] adrp x0, ui add x0, x0, :lo12:ui ldr w1, [x0] adrp x0, ul add x0, x0, :lo12:ul ldr x0, [x0] mov x3, x0 mov w2, w1 mov w1, w5 mov w0, w4 bl call1a adrp x0, us add x0, x0, :lo12:us ldrh w4, [x0] adrp x0, ui add x0, x0, :lo12:ui ldr w1, [x0] adrp x0, ul add x0, x0, :lo12:ul ldr x2, [x0] adrp x0, uc add x0, x0, :lo12:uc ldrb w0, [x0] mov w3, w0 mov w0, w4 bl call1b adrp x0, ui add x0, x0, :lo12:ui ldr w4, [x0] adrp x0, ul add x0, x0, :lo12:ul ldr x1, [x0] adrp x0, uc add x0, x0, :lo12:uc ldrb w2, [x0] adrp x0, us add x0, x0, :lo12:us ldrh w0, [x0] mov w3, w0 mov w0, w4 bl call1c adrp x0, ul add x0, x0, :lo12:ul ldr x4, [x0] adrp x0, uc add x0, x0, :lo12:uc ldrb w1, [x0] adrp x0, us add x0, x0, :lo12:us ldrh w2, [x0] adrp x0, ui add x0, x0, :lo12:ui ldr w0, [x0] mov w3, w0 mov x0, x4 bl call1d adrp x0, uc add x0, x0, :lo12:uc ldrb w8, [x0] adrp x0, ul add x0, x0, :lo12:ul ldr x1, [x0] adrp x0, uc add x0, x0, :lo12:uc ldrb w9, [x0] adrp x0, ui add x0, x0, :lo12:ui ldr w2, [x0] adrp x0, uc add x0, x0, :lo12:uc ldrb w3, [x0] adrp x0, us add x0, x0, :lo12:us ldrh w4, [x0] adrp x0, uc add x0, x0, :lo12:uc ldrb w5, [x0] adrp x0, uc add x0, x0, :lo12:uc ldrb w0, [x0] mov w7, w0 mov w6, w5 mov w5, w4 mov w4, w3 mov w3, w2 mov w2, w9 mov w0, w8 bl call1e adrp x0, c add x0, x0, :lo12:c ldrb w4, [x0] adrp x0, f add x0, x0, :lo12:f ldr s0, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w5, [x0] adrp x0, d add x0, x0, :lo12:d ldr d1, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, f add x0, x0, :lo12:f ldr s2, [x0] adrp x0, l add x0, x0, :lo12:l ldr x2, [x0] adrp x0, d add x0, x0, :lo12:d ldr d3, [x0] mov x3, x2 mov w2, w1 mov w1, w5 mov w0, w4 bl call2a adrp x0, f add x0, x0, :lo12:f ldr s0, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w4, [x0] adrp x0, d add x0, x0, :lo12:d ldr d1, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, f add x0, x0, :lo12:f ldr s2, [x0] adrp x0, l add x0, x0, :lo12:l ldr x2, [x0] adrp x0, d add x0, x0, :lo12:d ldr d3, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w0, [x0] mov w3, w0 mov w0, w4 bl call2b adrp x0, s add x0, x0, :lo12:s ldrsh w4, [x0] adrp x0, d add x0, x0, :lo12:d ldr d0, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, f add x0, x0, :lo12:f ldr s1, [x0] adrp x0, l add x0, x0, :lo12:l ldr x2, [x0] adrp x0, d add x0, x0, :lo12:d ldr d2, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w3, [x0] adrp x0, f add x0, x0, :lo12:f ldr s3, [x0] mov w0, w4 bl call2c adrp x0, d add x0, x0, :lo12:d ldr d0, [x0] adrp x0, i add x0, x0, :lo12:i ldr w4, [x0] adrp x0, f add x0, x0, :lo12:f ldr s1, [x0] adrp x0, l add x0, x0, :lo12:l ldr x1, [x0] adrp x0, d add x0, x0, :lo12:d ldr d2, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w2, [x0] adrp x0, f add x0, x0, :lo12:f ldr s3, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w0, [x0] mov w3, w0 mov w0, w4 bl call2d adrp x0, i add x0, x0, :lo12:i ldr w4, [x0] adrp x0, f add x0, x0, :lo12:f ldr s0, [x0] adrp x0, l add x0, x0, :lo12:l ldr x1, [x0] adrp x0, d add x0, x0, :lo12:d ldr d1, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w2, [x0] adrp x0, f add x0, x0, :lo12:f ldr s2, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w3, [x0] adrp x0, d add x0, x0, :lo12:d ldr d3, [x0] mov w0, w4 bl call2e adrp x0, f add x0, x0, :lo12:f ldr s0, [x0] adrp x0, l add x0, x0, :lo12:l ldr x4, [x0] adrp x0, d add x0, x0, :lo12:d ldr d1, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w1, [x0] adrp x0, f add x0, x0, :lo12:f ldr s2, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w2, [x0] adrp x0, d add x0, x0, :lo12:d ldr d3, [x0] adrp x0, i add x0, x0, :lo12:i ldr w0, [x0] mov w3, w0 mov x0, x4 bl call2f adrp x0, l add x0, x0, :lo12:l ldr x4, [x0] adrp x0, d add x0, x0, :lo12:d ldr d0, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w5, [x0] adrp x0, f add x0, x0, :lo12:f ldr s1, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w2, [x0] adrp x0, d add x0, x0, :lo12:d ldr d2, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, f add x0, x0, :lo12:f ldr s3, [x0] mov w3, w1 mov w1, w5 mov x0, x4 bl call2g adrp x0, d add x0, x0, :lo12:d ldr d0, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w4, [x0] adrp x0, f add x0, x0, :lo12:f ldr s1, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w5, [x0] adrp x0, d add x0, x0, :lo12:d ldr d2, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, f add x0, x0, :lo12:f ldr s3, [x0] adrp x0, l add x0, x0, :lo12:l ldr x0, [x0] mov x3, x0 mov w2, w1 mov w1, w5 mov w0, w4 bl call2h adrp x0, c add x0, x0, :lo12:c ldrb w8, [x0] adrp x0, f add x0, x0, :lo12:f ldr s0, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w1, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w2, [x0] adrp x0, d add x0, x0, :lo12:d ldr d1, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w3, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w4, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w5, [x0] adrp x0, f add x0, x0, :lo12:f ldr s2, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w6, [x0] adrp x0, c add x0, x0, :lo12:c ldrb w7, [x0] adrp x0, d add x0, x0, :lo12:d ldr d3, [x0] mov w0, w8 bl call2i adrp x0, cp add x0, x0, :lo12:cp ldr x4, [x0] adrp x0, sp add x0, x0, :lo12:sp ldr x1, [x0] adrp x0, ip add x0, x0, :lo12:ip ldr x2, [x0] adrp x0, lp add x0, x0, :lo12:lp ldr x0, [x0] mov x3, x0 mov x0, x4 bl call3a adrp x0, ucp add x0, x0, :lo12:ucp ldr x4, [x0] adrp x0, usp add x0, x0, :lo12:usp ldr x1, [x0] adrp x0, uip add x0, x0, :lo12:uip ldr x2, [x0] adrp x0, ulp add x0, x0, :lo12:ulp ldr x0, [x0] mov x3, x0 mov x0, x4 bl call3b adrp x0, fp add x0, x0, :lo12:fp ldr x2, [x0] adrp x0, dp add x0, x0, :lo12:dp ldr x0, [x0] mov x1, x0 mov x0, x2 bl call3c adrp x0, stp add x0, x0, :lo12:stp ldr x0, [x0] bl call4a adrp x0, un add x0, x0, :lo12:un mov w1, 1 str w1, [x0] adrp x0, unp add x0, x0, :lo12:unp ldr x0, [x0] bl call4b adrp x0, st add x0, x0, :lo12:st ldr x0, [x0] bl call5a adrp x0, un add x0, x0, :lo12:un mov w1, 2 str w1, [x0] adrp x0, un add x0, x0, :lo12:un ldr x0, [x0] bl call5b adrp x0, c add x0, x0, :lo12:c ldrb w8, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w9, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, l add x0, x0, :lo12:l ldr x2, [x0] adrp x0, f add x0, x0, :lo12:f ldr s0, [x0] adrp x0, d add x0, x0, :lo12:d ldr d1, [x0] adrp x0, uc add x0, x0, :lo12:uc ldrb w4, [x0] adrp x0, us add x0, x0, :lo12:us ldrh w5, [x0] adrp x0, ui add x0, x0, :lo12:ui ldr w3, [x0] adrp x0, ul add x0, x0, :lo12:ul ldr x0, [x0] mov x7, x0 mov w6, w3 mov x3, x2 mov w2, w1 mov w1, w9 mov w0, w8 bl call6a adrp x0, c add x0, x0, :lo12:c ldrb w8, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w9, [x0] adrp x0, l add x0, x0, :lo12:l ldr x2, [x0] adrp x0, f add x0, x0, :lo12:f ldr s0, [x0] adrp x0, uc add x0, x0, :lo12:uc ldrb w4, [x0] adrp x0, d add x0, x0, :lo12:d ldr d1, [x0] adrp x0, us add x0, x0, :lo12:us ldrh w5, [x0] adrp x0, ul add x0, x0, :lo12:ul ldr x3, [x0] adrp x0, ui add x0, x0, :lo12:ui ldr w0, [x0] mov w7, w0 mov x6, x3 mov x3, x2 mov w2, w9 mov w0, w8 bl call7a bl test_struct_args adrp x0, c add x0, x0, :lo12:c ldrb w4, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w5, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, l add x0, x0, :lo12:l ldr x0, [x0] mov x3, x0 mov w2, w1 mov w1, w5 mov w0, w4 bl localvars_after_alloca adrp x0, c add x0, x0, :lo12:c ldrb w4, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w5, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, l add x0, x0, :lo12:l ldr x0, [x0] mov x3, x0 mov w2, w1 mov w1, w5 mov w0, w4 bl call_after_alloca bl marker_indirect_call adrp x0, c add x0, x0, :lo12:c ldrb w5, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w6, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, l add x0, x0, :lo12:l ldr x0, [x0] ldr x4, [sp, 16] mov x3, x0 mov w2, w1 mov w1, w6 mov w0, w5 blr x4 adrp x0, c add x0, x0, :lo12:c ldrb w5, [x0] adrp x0, s add x0, x0, :lo12:s ldrsh w6, [x0] adrp x0, i add x0, x0, :lo12:i ldr w1, [x0] adrp x0, l add x0, x0, :lo12:l ldr x0, [x0] ldr x4, [sp, 16] mov x3, x0 mov w2, w1 mov w1, w6 mov w0, w5 blr x4 bl marker_call_with_trampolines adrp x0, d add x0, x0, :lo12:d ldr d0, [x0] ldr x0, [sp, 24] blr x0 mov w0, 0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE58: .size main, .-main .section .rodata .align 3 .LC0: .word -1717986918 .word 1070176665 .align 3 .LC1: .word -1030792151 .word 1071393013 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global parent .bss .align 3 .type parent, %object .size parent, 40004 parent: .zero 40004 .global groupSIZE .align 3 .type groupSIZE, %object .size groupSIZE, 40004 groupSIZE: .zero 40004 .section .data.rel.local,"aw" .align 3 .type end.2, %object .size end.2, 8 end.2: .xword buf.0+65536 .text .align 2 .type readChar, %function readChar: .LFB0: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, temp.1 add x0, x0, :lo12:temp.1 ldr x1, [x0] adrp x0, end.2 add x0, x0, :lo12:end.2 ldr x0, [x0] cmp x1, x0 bne .L2 adrp x0, end.2 add x0, x0, :lo12:end.2 ldr x1, [x0] adrp x0, buf.0+65536 add x0, x0, :lo12:buf.0+65536 cmp x1, x0 bcs .L3 mov w0, 255 b .L4 .L3: adrp x0, :got:stdin ldr x0, [x0, #:got_lo12:stdin] ldr x0, [x0] mov x3, x0 mov x2, 65536 mov x1, 1 adrp x0, buf.0 add x0, x0, :lo12:buf.0 bl fread mov x1, x0 adrp x0, buf.0 add x0, x0, :lo12:buf.0 add x1, x1, x0 adrp x0, end.2 add x0, x0, :lo12:end.2 str x1, [x0] adrp x0, temp.1 add x0, x0, :lo12:temp.1 adrp x1, buf.0 add x1, x1, :lo12:buf.0 str x1, [x0] .L2: adrp x0, temp.1 add x0, x0, :lo12:temp.1 ldr x0, [x0] add x2, x0, 1 adrp x1, temp.1 add x1, x1, :lo12:temp.1 str x2, [x1] ldrb w0, [x0] .L4: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size readChar, .-readChar .align 2 .type readUint, %function readUint: .LFB1: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x20, x0 mov w0, 1 str w0, [sp, 44] nop .L7: bl readChar and w19, w0, 255 cmp w19, 47 bhi .L6 cmp w19, 45 bne .L7 .L6: eor w0, w19, 48 and w0, w0, 255 str w0, [x20] b .L8 .L9: ldr w0, [x20] lsl w1, w0, 3 ldr w0, [x20] lsl w0, w0, 1 add w0, w1, w0 eor w1, w19, 48 and w1, w1, 255 add w0, w0, w1 str w0, [x20] .L8: bl readChar and w19, w0, 255 cmp w19, 47 bhi .L9 ldr w1, [x20] ldr w0, [sp, 44] mul w0, w1, w0 str w0, [x20] mov w0, 1 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size readUint, .-readUint .align 2 .global findParnent .type findParnent, %function findParnent: .LFB2: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str w0, [sp, 28] adrp x0, parent add x0, x0, :lo12:parent ldrsw x1, [sp, 28] ldr w0, [x0, x1, lsl 2] ldr w1, [sp, 28] cmp w1, w0 beq .L12 adrp x0, parent add x0, x0, :lo12:parent ldrsw x1, [sp, 28] ldr w0, [x0, x1, lsl 2] bl findParnent mov w2, w0 adrp x0, parent add x0, x0, :lo12:parent ldrsw x1, [sp, 28] str w2, [x0, x1, lsl 2] adrp x0, parent add x0, x0, :lo12:parent ldrsw x1, [sp, 28] ldr w0, [x0, x1, lsl 2] b .L14 .L12: ldr w0, [sp, 28] .L14: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size findParnent, .-findParnent .section .rodata .align 3 .LC0: .string ":)" .align 3 .LC1: .string ":(" .text .align 2 .type solve, %function solve: .LFB3: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -48 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 b .L16 .L25: add x0, sp, 36 bl readUint add x0, sp, 40 bl readUint str wzr, [sp, 52] b .L17 .L18: adrp x0, parent add x0, x0, :lo12:parent ldrsw x1, [sp, 52] ldr w2, [sp, 52] str w2, [x0, x1, lsl 2] adrp x0, groupSIZE add x0, x0, :lo12:groupSIZE ldrsw x1, [sp, 52] mov w2, 1 str w2, [x0, x1, lsl 2] ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L17: ldr w0, [sp, 32] ldr w1, [sp, 52] cmp w1, w0 blt .L18 b .L19 .L21: add x0, sp, 44 bl readUint add x0, sp, 48 bl readUint ldr w0, [sp, 44] bl findParnent str w0, [sp, 44] ldr w0, [sp, 48] bl findParnent str w0, [sp, 48] ldr w1, [sp, 44] ldr w0, [sp, 48] cmp w1, w0 beq .L19 ldr w1, [sp, 44] adrp x0, groupSIZE add x0, x0, :lo12:groupSIZE sxtw x1, w1 ldr w1, [x0, x1, lsl 2] ldr w2, [sp, 48] adrp x0, groupSIZE add x0, x0, :lo12:groupSIZE sxtw x2, w2 ldr w0, [x0, x2, lsl 2] cmp w1, w0 ble .L20 ldr w1, [sp, 48] ldr w2, [sp, 44] adrp x0, parent add x0, x0, :lo12:parent sxtw x1, w1 str w2, [x0, x1, lsl 2] ldr w1, [sp, 44] adrp x0, groupSIZE add x0, x0, :lo12:groupSIZE sxtw x1, w1 ldr w1, [x0, x1, lsl 2] ldr w2, [sp, 48] adrp x0, groupSIZE add x0, x0, :lo12:groupSIZE sxtw x2, w2 ldr w0, [x0, x2, lsl 2] ldr w3, [sp, 44] add w2, w1, w0 adrp x0, groupSIZE add x0, x0, :lo12:groupSIZE sxtw x1, w3 str w2, [x0, x1, lsl 2] b .L19 .L20: ldr w1, [sp, 44] ldr w2, [sp, 48] adrp x0, parent add x0, x0, :lo12:parent sxtw x1, w1 str w2, [x0, x1, lsl 2] ldr w1, [sp, 48] adrp x0, groupSIZE add x0, x0, :lo12:groupSIZE sxtw x1, w1 ldr w1, [x0, x1, lsl 2] ldr w2, [sp, 44] adrp x0, groupSIZE add x0, x0, :lo12:groupSIZE sxtw x2, w2 ldr w0, [x0, x2, lsl 2] ldr w3, [sp, 48] add w2, w1, w0 adrp x0, groupSIZE add x0, x0, :lo12:groupSIZE sxtw x1, w3 str w2, [x0, x1, lsl 2] .L19: ldr w0, [sp, 36] sub w1, w0, #1 str w1, [sp, 36] cmp w0, 0 bne .L21 b .L22 .L24: add x0, sp, 44 bl readUint add x0, sp, 48 bl readUint ldr w0, [sp, 44] bl findParnent mov w19, w0 ldr w0, [sp, 48] bl findParnent cmp w19, w0 bne .L23 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts b .L22 .L23: adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts .L22: ldr w0, [sp, 40] sub w1, w0, #1 str w1, [sp, 40] cmp w0, 0 bne .L24 .L16: add x0, sp, 32 bl readUint and w0, w0, 255 cmp w0, 0 bne .L25 nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 56] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L26 bl __stack_chk_fail .L26: ldr x19, [sp, 16] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size solve, .-solve .align 2 .global main .type main, %function main: .LFB4: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp bl solve mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size main, .-main .section .data.rel.local .align 3 .type temp.1, %object .size temp.1, 8 temp.1: .xword buf.0+65536 .local buf.0 .comm buf.0,65536,8 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc mov x12, 40848 sub sp, sp, x12 .cfi_def_cfa_offset 40848 stp x29, x30, [sp] .cfi_offset 29, -40848 .cfi_offset 30, -40840 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] add x1, sp, 32768 ldr x2, [x0] str x2, [x1, 8072] mov x2, 0 mov w0, 1 str w0, [sp, 28] b .L2 .L3: ldrsw x0, [sp, 28] lsl x0, x0, 2 add x1, sp, 440 str wzr, [x1, x0] ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L2: ldr w1, [sp, 28] ldr w0, [sp, 36] cmp w1, w0 ble .L3 mov w0, 1 str w0, [sp, 28] b .L4 .L7: mov w0, 1 str w0, [sp, 32] b .L5 .L6: ldrsw x0, [sp, 28] lsl x0, x0, 2 add x1, sp, 440 ldr s1, [x1, x0] ldrsw x2, [sp, 32] ldrsw x1, [sp, 28] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x2 lsl x0, x0, 2 add x1, sp, 840 ldr s2, [x1, x0] ldrsw x0, [sp, 32] lsl x0, x0, 2 add x1, sp, 40 ldr s0, [x1, x0] fmul s0, s2, s0 fadd s0, s1, s0 ldrsw x0, [sp, 28] lsl x0, x0, 2 add x1, sp, 440 str s0, [x1, x0] ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L5: ldr w1, [sp, 32] ldr w0, [sp, 36] cmp w1, w0 ble .L6 ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L4: ldr w1, [sp, 28] ldr w0, [sp, 36] cmp w1, w0 ble .L7 nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] add x2, sp, 32768 ldr x3, [x2, 8072] ldr x1, [x0] subs x3, x3, x1 mov x1, 0 beq .L8 bl __stack_chk_fail .L8: ldp x29, x30, [sp] mov x12, 40848 add sp, sp, x12 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "Introduce the number of seconds: " .align 3 .LC1: .string "%f" .align 3 .LC2: .string "The number of minutes is %f\n The number of hours is %f\n The number of days is %f" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 str wzr, [sp, 24] str wzr, [sp, 28] str wzr, [sp, 32] str wzr, [sp, 36] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf add x0, sp, 24 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl scanf_s ldr s0, [sp, 24] mov w0, 1114636288 fmov s1, w0 fdiv s0, s0, s1 str s0, [sp, 28] mov w0, 1114636288 fmov s1, w0 ldr s0, [sp, 28] fdiv s0, s0, s1 str s0, [sp, 32] fmov s0, 2.4e+1 ldr s1, [sp, 32] fdiv s0, s1, s0 str s0, [sp, 36] ldr s0, [sp, 28] fcvt d3, s0 ldr s0, [sp, 32] fcvt d1, s0 ldr s0, [sp, 36] fcvt d0, s0 fmov d2, d0 fmov d0, d3 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 40] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L3 bl __stack_chk_fail .L3: mov w0, w1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%i " .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -176]! .cfi_def_cfa_offset 176 .cfi_offset 29, -176 .cfi_offset 30, -168 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 168] mov x1, 0 mov w0, 6 str w0, [sp, 32] mov w0, 8 str w0, [sp, 56] mov w0, 10 str w0, [sp, 80] mov w0, 15 str w0, [sp, 104] mov w0, 17 str w0, [sp, 128] add x0, sp, 144 str x0, [sp, 24] add x0, sp, 24 str x0, [sp, 48] add x0, sp, 48 str x0, [sp, 72] add x0, sp, 72 str x0, [sp, 96] add x0, sp, 96 str x0, [sp, 120] add x0, sp, 24 str x0, [sp, 160] add x0, sp, 48 str x0, [sp, 40] add x0, sp, 72 str x0, [sp, 64] add x0, sp, 96 str x0, [sp, 88] add x0, sp, 120 str x0, [sp, 112] str xzr, [sp, 136] ldr x0, [sp, 160] str x0, [sp, 16] b .L2 .L3: ldr x0, [sp, 16] ldr w0, [x0, 8] mov w1, w0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf ldr x0, [sp, 16] ldr x0, [x0, 16] str x0, [sp, 16] .L2: ldr x0, [sp, 16] cmp x0, 0 bne .L3 mov w0, 10 bl putchar mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 168] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L5 bl __stack_chk_fail .L5: mov w0, w1 ldp x29, x30, [sp], 176 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global __MRAID_mraid_js .data .align 3 .type __MRAID_mraid_js, %object .size __MRAID_mraid_js, 26698 __MRAID_mraid_js: .ascii "//\n// mraid.js\n// MRAID\n//\n// Created by Jay Tucker o" .ascii "n 9/16/13.\n// Copyright (c) 2013 Nexage, Inc. All rights r" .ascii "eserved.\n//\n(function() {\n\n/****************************" .ascii "***********************************************\n * console " .ascii "logging helper\n *******************************************" .ascii "*******************************/\n\nLogLevelEnum = {\n \"" .ascii "DEBUG\" : 0,\n \"INFO\" : 1,\n \"WARNING\" : 2,\n" .ascii " \"ERROR\" : 3\n}\n\nvar logLevel = LogLevelEnum.DEBUG;" .ascii "\nvar log = {};\n\nlog.d = function(msg) {\n if (logLevel" .ascii " <= LogLevelEnum.DEBUG) {\n console.log(\"(D) \" + ms" .ascii "g);\n }\n}\n\nlog.i = function(msg) {\n if (logLevel <" .ascii "= LogLevelEnum.INFO) {\n console.log(\"(I) \" + msg);" .ascii "\n }\n}\n\nlog.w = function(msg) {\n if (logLevel <= L" .ascii "ogLevelEnum.WARN) {\n console.log(\"(W) \" + msg);\n " .ascii " }\n}\n\nlog.e = function(msg) {\n console.log(\"(E) \"" .ascii " + msg);\n}\n\n/********************************************" .ascii "*******************************\n * MRAID declaration\n ****" .ascii "************************************************************" .ascii "**********/\n\nlog.i(\"Setting up mraid object\");\n\nvar mr" .ascii "aid = window.mraid = {};\n\n/*******************************" .ascii "********************************************\n * constants\n" .ascii " ***********************************************************" .ascii "***************/\n\nvar VERSION = \"2.0\";\n\nvar STATES = m" .ascii "raid.STATES = {\n \"LOADING\" : \"loading\",\n \"DEFAU" .ascii "LT\" : \"default\",\n \"EXPANDED\" : \"expanded\",\n \"" .ascii "RESIZED\" : \"resized\",\n \"HIDDEN\" : \"hidden\"\n};\n\n" .ascii "var PLACEMENT_TYPES = mraid.PLACEMENT_TYPES = {\n \"INLIN" .ascii "E\" : \"inline\",\n \"INTERSTITIAL\" : \"interstitial\"\n" .ascii "};\n\nvar RESIZE_PROPERTIES_CUSTOM_CLOSE_POSITION = mraid.RE" .ascii "SIZE_PROPERTIES_CUSTOM_CLOSE_POSITION = {\n \"TOP_LEFT\" " .ascii ": \"top-left\",\n \"TOP_CENTER\" : \"top-center\",\n \"" .ascii "TOP_RIGHT\" : \"top-right\",\n \"CENTER\" : \"center\",\n" .ascii " \"BOTTOM_LEFT\" : \"bottom-left\",\n \"BOTTOM_CENTER\"" .ascii " : \"bottom-center\",\n \"BOTTOM_RIGHT\" : \"bottom-right" .ascii "\"\n};\n\nvar ORIENTATION_PROPERTIES_FORCE_ORIENTATION = mra" .ascii "id.ORIENTATION_PROPERTIES_FORCE_ORIENTATION = {\n \"P" .ascii "ORTRAIT\" : \"portrait\",\n \"LANDSCAPE\" : \"landscape\"" .ascii ",\n \"NONE\" : \"none\"\n};\n\nvar EVENTS = mraid.EVENTS " .ascii "= {\n \"ERROR\" : \"error\",\n \"READY\" : \"ready\",\n" .ascii " \"SIZECHANGE\" : \"sizeChange\",\n \"STATECHANGE\" : " .ascii "\"stateChange\",\n \"VIEWABLECHANGE\" : \"viewableChange\"" .ascii "\n};\n\nvar SUPPORTED_FEATURES = mraid.SUPPORTED_FEATURES = " .ascii "{\n \"SMS\" : \"sms\",\n \"TEL\" : \"tel\",\n \"CAL" .ascii "ENDAR\" : \"calendar\",\n \"STOREPICTURE\" : \"storePictu" .ascii "re\",\n \"INLINEVIDEO\" : \"inlineVideo\"\n};\n\n/*******" .ascii "************************************************************" .ascii "********\n * state\n ***************************************" .ascii "***********************************/\n\nvar state = STATES.L" .ascii "OADING;\nvar placementType = PLACEMENT_TYPES.INLINE;\nvar su" .ascii "pportedFeatures = {};\nvar isViewable = false;\nvar isResize" .ascii "Ready = false;\n\nvar expandProperties = {\n \"width\" : " .ascii "0,\n \"height\" : 0,\n \"useCustomClose\" : false,\n " .ascii " \"isModal\" : true\n};\n\nvar orientationProperties = {\n " .ascii " \"allowOrientationChange\" : true,\n \"forceOrientatio" .ascii "n\" : ORIENTATION_PROPERTIES_FORCE_ORIENTATION.NONE\n};\n\nv" .ascii "ar resizeProperties = {\n \"width\" : 0,\n \"height\" " .ascii ": 0,\n \"customClosePosition\" : RESIZE_PROPERTIES_CUSTOM" .ascii "_CLOSE_POSITION.TOP_RIGHT,\n \"offsetX\" : 0,\n \"offs" .ascii "etY\" : 0,\n \"allowOffscreen\" : true\n};\n\nvar current" .ascii "Position = {\n \"x\" : 0,\n \"y\" : 0,\n \"width\" " .ascii ": 0,\n \"height\" : 0\n};\n\nvar defaultPosition = {\n " .ascii " \"x\" : 0,\n \"y\" : 0,\n \"width\" : 0,\n \"heigh" .ascii "t\" : 0\n};\n\nvar maxSize = {\n \"width\" : 0,\n \"he" .ascii "ight\" : 0\n};\n\nvar screenSize = {\n \"width\" : 0,\n " .ascii " \"height\" : 0\n};\n\nvar currentOrientation = 0;\n\nvar l" .ascii "isteners = {};\n\n/*****************************************" .ascii "**********************************\n * \"official\" API: met" .ascii "hods called by creative\n **********************************" .ascii "****************************************/\n\nmraid.addEventL" .ascii "istener = function(event, listener) {\n log.i(\"mraid.add" .ascii "EventListener \" + event + \": \" + String(listener));\n " .ascii "if (!event || !listener) {\n mraid.fireErrorEvent(\"B" .ascii "oth event and listener are requ" .ascii "ired.\", \"addEventListener\");\n return;\n }\n " .ascii " if (!contains(event, EVENTS)) {\n mraid.fireErrorEve" .ascii "nt(\"Unknown MRAID event: \" + event, \"addEventListener\");" .ascii "\n return;\n }\n var listenersForEvent = listen" .ascii "ers[event] = listeners[event] || [];\n // check to make s" .ascii "ure that the listener isn't already registered\n for (var" .ascii " i = 0; i < listenersForEvent.length; i++) {\n var st" .ascii "r1 = String(listener);\n var str2 = String(listenersF" .ascii "orEvent[i]);\n if (listener === listenersForEvent[i] " .ascii "|| str1 === str2) {\n log.i(\"listener \" + str1 " .ascii "+ \" is already registered for event \" + event);\n " .ascii " return;\n }\n }\n listenersForEvent.push(lis" .ascii "tener);\n};\n\nmraid.createCalendarEvent = function(paramete" .ascii "rs) {\n log.i(\"mraid.createCalendarEvent with \" + param" .ascii "eters);\n callNative(\"createCalendarEvent?eventJSON=\"+J" .ascii "SON.stringify(parameters));\n};\n\nmraid.close = function() " .ascii "{\n log.i(\"mraid.close\");\n if (state === STATES.LOA" .ascii "DING ||\n (state === STATES.DEFAULT && placementType " .ascii "=== PLACEMENT_TYPES.INLINE) ||\n state === STATES.HID" .ascii "DEN) {\n // do nothing\n return;\n }\n c" .ascii "allNative(\"close\");\n};\n\nmraid.expand = function(url) {\n" .ascii " if (url === undefined) {\n log.i(\"mraid.expand (" .ascii "1-part)\");\n } else {\n log.i(\"mraid.expand \" +" .ascii " url);\n }\n // The only time it is valid to call expa" .ascii "nd is when the ad is\n // a banner currently in either de" .ascii "fault or resized state.\n if (placementType !== PLACEMENT" .ascii "_TYPES.INLINE ||\n (state !== STATES.DEFAULT && state" .ascii " !== STAES.RESIZED)) {\n return;\n }\n if (url " .ascii "=== undefined) {\n callNative(\"expand\");\n } els" .ascii "e {\n callNative(\"expand?url=\" + encodeURIComponent" .ascii "(url));\n }\n};\n\nmraid.getCurrentPosition = function() " .ascii "{\n log.i(\"mraid.getCurrentPosition\");\n return curr" .ascii "entPosition;\n};\n\nmraid.getDefaultPosition = function() {\n" .ascii " log.i(\"mraid.getDefaultPosition\");\n return default" .ascii "Position;\n};\n\nmraid.getExpandProperties = function(" .ascii ") {\n log.i(\"mraid.getExpandProperties\");\n return e" .ascii "xpandProperties;\n};\n\nmraid.getMaxSize = function() {\n " .ascii " log.i(\"mraid.getMaxSize \" + maxSize.width + \" x \" + max" .ascii "Size.height);\n return maxSize;\n};\n\nmraid.getOrientati" .ascii "onProperties = function() {\n log.i(\"mraid.getOrientatio" .ascii "nProperties\");\n return orientationProperties;\n};\n\nmr" .ascii "aid.getPlacementType = function() {\n log.i(\"mraid.getPl" .ascii "acementType\");\n return placementType;\n};\n\nmraid.getR" .ascii "esizeProperties = function() {\n log.i(\"mraid.getResizeP" .ascii "roperties\");\n return resizeProperties;\n};\n\nmraid.get" .ascii "ScreenSize = function() {\n log.i(\"mraid.getScreenSize\"" .ascii ");\n return screenSize;\n};\n\nmraid.getState = function(" .ascii ") {\n log.i(\"mraid.getState\");\n return state;\n};\n" .ascii "\nmraid.getVersion = function() {\n log.i(\"mraid.getVers" .ascii "ion\");\n return VERSION;\n};\n\nmraid.isViewable = funct" .ascii "ion() {\n log.i(\"mraid.isViewable\");\n return isView" .ascii "able;\n};\n\nmraid.open = function(url) {\n log.i(\"mraid" .ascii ".open \" + url);\n callNative(\"open?url=\" + encodeURICo" .ascii "mponent(url));\n};\n\nmraid.playVideo = function(url) {\n " .ascii " log.i(\"mraid.playVideo \" + url);\n callNative(\"playVi" .ascii "deo?url=\" + encodeURIComponent(url));\n};\n\nmraid.removeEv" .ascii "entListener = function(event, listener) {\n log.i(\"mraid" .ascii ".removeEventListener \" + event + \" : \" + String(listener)" .ascii ");\n if (!event) {\n mraid.fireErrorEvent(\"Event " .ascii "is required.\", \"removeEventListener\");\n return;\n" .ascii " }\n if (!contains(event, EVENTS)) {\n mraid.fi" .ascii "reErrorEvent(\"Unknown MRAID event: \" + event, \"removeEven" .ascii "tListener\");\n return;\n }\n if (listeners.has" .ascii "OwnProperty(event)) {\n if (listener) {\n " .ascii "var listenersForEvent = listeners[event];\n // tr" .ascii "y to find the given listener\n var len = listener" .ascii "sForEvent.length;\n for (var i = 0; i < len; i++)" .ascii " {\n var registeredListener = listenersForEve" .ascii "nt[i];\n var str1 = String(listener);\n " .ascii " var str2 = String(registeredListener);\n " .ascii " if (list" .ascii "ener === registeredListener || str1 === str2) {\n " .ascii " listenersForEvent.splice(i, 1);\n " .ascii " break;\n }\n }\n if (" .ascii "i === len) {\n log.i(\"listener \" + str1 + \"" .ascii " not found for event \" + event);\n }\n " .ascii " if (listenersForEvent.length === 0) {\n del" .ascii "ete listeners[event];\n }\n } else {\n " .ascii " // no listener to remove was provided, so remove all" .ascii " listeners for given event\n delete listeners[eve" .ascii "nt];\n }\n } else {\n log.i(\"no listeners " .ascii "registered for event \" + event);\n }\n};\n\nmraid.resize" .ascii " = function() {\n log.i(\"mraid.resize\");\n // The on" .ascii "ly time it is valid to call resize is when the ad is\n //" .ascii " a banner currently in either default or resized state.\n " .ascii " // Trigger an error if the current state is expanded.\n " .ascii "if (placementType === PLACEMENT_TYPES.INTERSTITIAL || state " .ascii "=== STATES.LOADING || state === STATES.HIDDEN) {\n //" .ascii " do nothing\n return;\n }\n if (state === STATE" .ascii "S.EXPANDED) {\n mraid.fireErrorEvent(\"mraid.resize c" .ascii "alled when ad is in expanded state\", \"mraid.resize\");\n " .ascii " return;\n }\n if (!isResizeReady) {\n mra" .ascii "id.fireErrorEvent(\"mraid.resize is not ready to be called\"" .ascii ", \"mraid.resize\");\n return;\n }\n callNative" .ascii "(\"resize\");\n};\n\nmraid.setExpandProperties = function(pr" .ascii "operties) {\n log.i(\"mraid.setExpandProperties\");\n " .ascii "\n if (!validate(properties, \"setExpandProperties\")) {\n" .ascii " log.e(\"failed validation\");\n return;\n\t}\n" .ascii " \n var oldUseCustomClose = expandProperties.useCustom" .ascii "Close;\n \n // expandProperties contains 3 read-write " .ascii "properties: width, height, and useCustomClose;\n // the i" .ascii "sModal property is read-only\n var rwProps = [ \"width\"," .ascii " \"height\", \"useCustomClose\" ];\n for (var i = 0; i < " .ascii "rwProps.length; i++) {\n var propname = rwProps[i];\n" .ascii " if (properties.hasOwnProperty(propname)) {\n " .ascii " expandProperties[propname] = properties[" .ascii "propname];\n }\n }\n \n // In MRAID v2.0, al" .ascii "l expanded ads by definition cover the entire screen,\n /" .ascii "/ so the only property that the native side has to know abou" .ascii "t is useCustomClose.\n // (That is, the width and height " .ascii "properties are not needed by the native code.)\n if (expa" .ascii "ndProperties.useCustomClose !== oldUseCustomClose) {\n " .ascii " callNative(\"useCustomClose?useCustomClose=\" + expandProp" .ascii "erties.useCustomClose);\n }\n};\n\nmraid.setOrientationPr" .ascii "operties = function(properties) {\n log.i(\"mraid.setOrie" .ascii "ntationProperties\");\n \n if (!validate(properties, \"" .ascii "setOrientationProperties\")) {\n log.e(\"failed valid" .ascii "ation\");\n return;\n\t}\n \n var newOrientatio" .ascii "nProperties = {};\n newOrientationProperties.allowOrienta" .ascii "tionChange = orientationProperties.allowOrientationChange,\n" .ascii " newOrientationProperties.forceOrientation = orientationP" .ascii "roperties.forceOrientation;\n \n // orientationPropert" .ascii "ies contains 2 read-write properties: allowOrientationChange" .ascii " and forceOrientation\n var rwProps = [ \"allowOrientatio" .ascii "nChange\", \"forceOrientation\" ];\n for (var i = 0; i < " .ascii "rwProps.length; i++) {\n var propname = rwProps[i];\n" .ascii " if (properties.hasOwnProperty(propname)) {\n " .ascii " newOrientationProperties[propname] = properties[propname" .ascii "];\n }\n }\n \n // Setting allowOrientationC" .ascii "hange to true while setting forceOrientation to either portr" .ascii "ait or landscape\n // is considered an error condition.\n" .ascii " if (newOrientationProperties.allowOrientationChange &&\n" .ascii " newOrientationProperties.forceOrientation !== mraid." .ascii "ORIENTATION_PROPERTIES_FORCE_ORIENTATION.NONE) {\n mr" .ascii "aid.fireErrorEvent(\"allowOrientationChange is true but forc" .ascii "eOrientation is \" + newOrientationProperties.forceOrientati" .ascii "on,\n \"setOrientationProperties" .ascii "\");\n return;\n }\n \n orientationPropertie" .ascii "s.allowOrientationChange = newOrientationProperties.allowOri" .ascii "entationChange;\n orientationProperties.forceOrientation " .ascii "= newOrientationPro" .ascii "perties.forceOrientation;\n \n var params =\n \"all" .ascii "owOrientationChange=\" + orientationProperties.allowOrientat" .ascii "ionChange +\n \"&forceOrientation=\" + orientationPropert" .ascii "ies.forceOrientation;\n \n callNative(\"setOrientation" .ascii "Properties?\" + params);\n};\n \nmraid.setResizeProperties =" .ascii " function(properties) {\n log.i(\"mraid.setResizeProperti" .ascii "es\");\n \n isResizeReady = false;\n \n // resizePrope" .ascii "rties contains 6 read-write properties:\n // width, heigh" .ascii "t, offsetX, offsetY, customClosePosition, allowOffscreen\n \n" .ascii " // The properties object passed into this function must " .ascii "contain width, height, offsetX, offsetY.\n // The remaini" .ascii "ng two properties are optional.\n var requiredProps = [ \"" .ascii "width\", \"height\", \"offsetX\", \"offsetY\" ];\n for (v" .ascii "ar i = 0; i < requiredProps.length; i++) {\n var prop" .ascii "name = requiredProps[i];\n if (!properties.hasOwnProp" .ascii "erty(propname)) {\n mraid.fireErrorEvent(\n " .ascii " \"required property \" + propname + \" is mi" .ascii "ssing\",\n \"mraid.setResizeProperties\"" .ascii ");\n return;\n }\n }\n \n if (!valid" .ascii "ate(properties, \"setResizeProperties\")) {\n mraid.f" .ascii "ireErrorEvent(\"failed validation\", \"mraid.setResizeProper" .ascii "ties\");\n return;\n }\n \n var adjustments = {" .ascii " \"x\": 0, \"y\": 0 };\n \n var allowOffscreen = properti" .ascii "es.hasOwnProperty(\"allowOffscreen\") ? properties.allowOffs" .ascii "creen : resizeProperties.allowOffscreen;\n if (!allowOffs" .ascii "creen) {\n if (properties.width > maxSize.width || pr" .ascii "operties.height > maxSize.height) {\n mraid.fireE" .ascii "rrorEvent(\"resize width or height is greater than the maxSi" .ascii "ze width or height\", \"mraid.setResizeProperties\");\n " .ascii " return;\n }\n adjustments = fitResizeVi" .ascii "ewOnScreen(properties);\n } else if (!isCloseRegionOnScre" .ascii "en(properties)) {\n mraid.fireErrorEvent(\"close even" .ascii "t region will not appear entirely onscreen\", \"mraid.setRes" .ascii "izeProperties\");\n return;\n }\n \n var rwProp" .ascii "s = [ \"width\", \"height\", \"offsetX\", \"offsetY\", \"" .ascii "customClosePosition\", \"allowOffscreen\" ];\n for (var i" .ascii " = 0; i < rwProps.length; i++) {\n var propname = rwP" .ascii "rops[i];\n if (properties.hasOwnProperty(propname)) {" .ascii "\n resizeProperties[propname] = properties[propna" .ascii "me];\n }\n }\n \n var params =\n \"width=\" " .ascii "+ resizeProperties.width +\n \"&height=\" + resizePropert" .ascii "ies.height +\n \"&offsetX=\" + (resizeProperties.offsetX " .ascii "+ adjustments.x) +\n \"&offsetY=\" + (resizeProperties.of" .ascii "fsetY + adjustments.y) +\n \"&customClosePosition=\" + re" .ascii "sizeProperties.customClosePosition +\n \"&allowOffscreen=" .ascii "\" + resizeProperties.allowOffscreen;\n \n callNative(\"s" .ascii "etResizeProperties?\" + params);\n \n isResizeReady = tru" .ascii "e;\n };\n\nmraid.storePicture = function(url) {\n log.i(\"" .ascii "mraid.storePicture \" + url);\n callNative(\"storePicture" .ascii "?url=\" + encodeURIComponent(url));\n};\n\nmraid.supports = " .ascii "function(feature) {\n log.i(\"mraid.supports \" + feature" .ascii " + \" \" + supportedFeatures[feature]);\n var retval = su" .ascii "pportedFeatures[feature];\n if (typeof retval === \"undef" .ascii "ined\") {\n retval = false;\n }\n return retval" .ascii ";\n};\n\nmraid.useCustomClose = function(isCustomClose) {\n " .ascii " log.i(\"mraid.useCustomClose \" + isCustomClose);\n if" .ascii " (expandProperties.useCustomClose !== isCustomClose) {\n " .ascii " expandProperties.useCustomClose = isCustomClose;\n " .ascii " callNative(\"useCustomClose?useCustomClose=\" + expandProp" .ascii "erties.useCustomClose);\n }\n};\n\n/*********************" .ascii "******************************************************\n * h" .ascii "elper methods called by SDK\n ******************************" .ascii "********************************************/\n\n// setters " .ascii "to change state\n\nmraid.setCurrentPosition = function(x, y," .ascii " width, height) {\n log.i(\"mraid.setCurrentPosition \" +" .ascii " x + \",\" + y + \",\" + width + \",\" + height);\n \n " .ascii " var previousSize = {};\n previousSize.width = currentPos" .ascii "ition.width;\n previousSize.height = currentPosition.heig" .ascii "ht;\n log.i(\"previousSize \" + previousSize.width + \",\"" .ascii " + previousSize.height);\n \n currentPosition.x = x;" .ascii "\n currentPosition.y = y;\n currentPosition.width = wi" .ascii "dth;\n currentPosition.height = height;\n \n if (wi" .ascii "dth !== previousSize.width || height !== previousSize.height" .ascii ") {\n mraid.fireSizeChangeEvent(width, height);\n " .ascii "}\n};\n\nmraid.setDefaultPosition = function(x, y, width, he" .ascii "ight) {\n log.i(\"mraid.setDefaultPosition \" + x + \",\"" .ascii " + y + \",\" + width + \",\" + height);\n defaultPosition" .ascii ".x = x;\n defaultPosition.y = y;\n defaultPosition.wid" .ascii "th = width;\n defaultPosition.height = height;\n};\n\nmra" .ascii "id.setExpandSize = function(width, height) {\n log.i(\"mr" .ascii "aid.setExpandSize \" + width + \"x\" + height);\n expandP" .ascii "roperties.width = width;\n expandProperties.height = heig" .ascii "ht;\n};\n\nmraid.setMaxSize = function(width, height) {\n " .ascii " log.i(\"mraid.setMaxSize \" + width + \"x\" + height);\n " .ascii " maxSize.width = width;\n maxSize.height = height;\n};\n\n" .ascii "mraid.setPlacementType = function(pt) {\n log.i(\"mraid.s" .ascii "etPlacementType \" + pt);\n placementType = pt;\n};\n\nmr" .ascii "aid.setScreenSize = function(width, height) {\n log.i(\"m" .ascii "raid.setScreenSize \" + width + \"x\" + height);\n screen" .ascii "Size.width = width;\n screenSize.height = height;\n};\n\n" .ascii "mraid.setSupports = function(feature, supported) {\n log." .ascii "i(\"mraid.setSupports \" + feature + \" \" + supported);\n " .ascii " supportedFeatures[feature] = supported;\n};\n\n// methods " .ascii "to fire events\n\nmraid.fireErrorEvent = function(message, a" .ascii "ction) {\n log.i(\"mraid.fireErrorEvent \" + message + \"" .ascii " \" + action);\n fireEvent(mraid.EVENTS.ERROR, message, a" .ascii "ction);\n};\n\nmraid.fireReadyEvent = function() {\n log." .ascii "i(\"mraid.fireReadyEvent\");\n fireEvent(mraid.EVENTS.REA" .ascii "DY);\n};\n\nmraid.fireSizeChangeEvent = function(width, heig" .ascii "ht) {\n log.i(\"mraid.fireSizeChangeEvent \" + width + \"" .ascii "x\" + height);\n fireEvent(mraid.EVENTS.SIZECHANGE, width" .ascii ", height);\n};\n\nmraid.fireStateChangeEvent = function(newS" .ascii "tate) {\n log.i(\"mraid.fireStateChangeEvent \" + newStat" .ascii "e);\n if (state !== newState) {\n state = newState" .ascii ";\n fireEvent(mraid.EVENTS.STATECHANGE, state);\n " .ascii "}\n};\n" .ascii "\nmraid.fireViewableChangeEvent = function(newIsViewable) {\n" .ascii " log.i(\"mraid.fireViewableChangeEvent \" + newIsViewable" .ascii ");\n if (isViewable !== newIsViewable) {\n isViewa" .ascii "ble = newIsViewable;\n fireEvent(mraid.EVENTS.VIEWABL" .ascii "ECHANGE, isViewable);\n }\n};\n \n /*********************" .ascii "******************************************************\n * " .ascii "Appodeal methods\n ****************************************" .ascii "**********************************/\n \nmraid.adLoaded = fal" .ascii "se;\n \nmraid.noFill = function() {\n if (!mraid.adLoaded" .ascii ") {\n log.i(\"mraid.noFill\");\n callNative(\"" .ascii "noFill\");\n }\n};\n \nmraid.loaded = function() {\n l" .ascii "og.i(\"mraid.loaded\");\n mraid.adLoaded = true;\n cal" .ascii "lNative(\"loaded\");\n};\n\n/*******************************" .ascii "********************************************\n * internal he" .ascii "lper methods\n *********************************************" .ascii "*****************************/\n\nvar callNative = function(" .ascii "command) {\n window.webkit.messageHandlers.observe.postMe" .ascii "ssage(command);\n};\n\nvar fireEvent = function(event) {\n " .ascii " var args = Array.prototype.slice.call(arguments);\n arg" .ascii "s.shift();\n log.i(\"fireEvent \" + event + \" [\" + args" .ascii ".toString() + \"]\");\n \n var tempEventListeners = liste" .ascii "ners[event];\n if (tempEventListeners) {\n var eve" .ascii "ntListeners = tempEventListeners.slice();\n var len =" .ascii " eventListeners.length;\n log.i(len + \" listener(s) " .ascii "found\");\n for (var i = 0; i < len; i++) {\n " .ascii " eventListeners[i].apply(null, args);\n }\n } e" .ascii "lse {\n log.i(\"no listeners found for \" + event);\n" .ascii " }\n };\n\nvar contains = function(value, array) {\n f" .ascii "or (var i in array) {\n if (array[i] === value) {\n " .ascii " return true;\n }\n }\n return false;\n" .ascii "};\n\n// The action parameter is a string which is the name " .ascii "of the setter function which called this function\n// (in ot" .ascii "her words, setExpandPropeties, setOrientationProperties, or " .ascii "setResizeProperties).\n// It serves both as the key to get t" .ascii "he the appropriate set of validating functi" .ascii "ons from the allValidators object\n// as well as the action " .ascii "parameter of any error event that may be thrown.\nvar valida" .ascii "te = function(properties, action) {\n var retval = true;\n" .ascii " var validators = allValidators[action];\n for (var pr" .ascii "op in properties) {\n var validator = validators[prop" .ascii "];\n var value = properties[prop];\n if (valid" .ascii "ator && !validator(value)) {\n mraid.fireErrorEve" .ascii "nt(\"Value of property \" + prop + \" (\" + value + \") is i" .ascii "nvalid\", \"mraid.\" + action);\n retval = false;" .ascii "\n }\n }\n return retval;\n};\n\nvar allValidat" .ascii "ors = {\n \"setExpandProperties\": {\n // In MRAID" .ascii " 2.0, the only property in expandProperties we actually care" .ascii " about is useCustomClose.\n // Still, we'll do a basi" .ascii "c sanity check on the width and height properties, too.\n " .ascii " \"width\" : function(width) {\n return !isNa" .ascii "N(width);\n },\n \"height\" : function(height)" .ascii " {\n return !isNaN(height);\n },\n " .ascii "\"useCustomClose\" : function(useCustomClose) {\n " .ascii " return (typeof useCustomClose === \"boolean\");\n }\n" .ascii " },\n \"setOrientationProperties\": {\n \"allow" .ascii "OrientationChange\" : function(allowOrientationChange) {\n " .ascii " return (typeof allowOrientationChange === \"boolea" .ascii "n\");\n },\n \"forceOrientation\" : function(f" .ascii "orceOrientation) {\n var validValues = [ \"portra" .ascii "it\",\"landscape\",\"none\" ];\n return validValu" .ascii "es.indexOf(forceOrientation) !== -1;\n }\n },\n " .ascii " \"setResizeProperties\": {\n \"width\" : function(wi" .ascii "dth) {\n return !isNaN(width) && width >= 50;\n " .ascii " },\n \"height\" : function(height) {\n " .ascii " return !isNaN(height) && height >= 50;\n },\n " .ascii " \"offsetX\" : function(offsetX) {\n return !is" .ascii "NaN(offsetX);\n },\n \"offsetY\" : function(of" .ascii "fsetY) {\n return !isNaN(offsetY);\n },\n " .ascii " \"customClosePosition\" : function(customClosePositio" .ascii "n) {\n var validPositions = [ \"top-left\",\"to" .ascii "p-center\",\"top-right\",\"center\",\"bottom-left\",\"bottom" .ascii "-center\",\"bottom-right\" ];\n return validPosit" .ascii "ions.indexOf(customClosePosition) !== -1;\n },\n " .ascii " \"allowOffscreen\" : function(allowOffscreen) {\n " .ascii " return (typeof allowOffscreen === \"boolean\");\n " .ascii " }\n }\n};\n\nfunction isCloseRegionOnScreen(properties) " .ascii "{\n log.d(\"isCloseRegionOnScreen\");\n log.d(\"defaul" .ascii "tPosition \" + defaultPosition.x + \" \" + defaultPosition.y" .ascii ");\n log.d(\"offset \" + properties.offsetX + \" \" + pro" .ascii "perties.offsetY);\n \n var resizeRect = {};\n resizeRe" .ascii "ct.x = defaultPosition.x + properties.offsetX;\n resizeRe" .ascii "ct.y = defaultPosition.y + properties.offsetY;\n resizeRe" .ascii "ct.width = properties.width;\n resizeRect.height = proper" .ascii "ties.height;\n printRect(\"resizeRect\", resizeRect);\n \n" .ascii " var customClosePosition = properties.hasOwnProperty(\"cu" .ascii "stomClosePosition\") ?\n properties.customClosePosition :" .ascii " resizeProperties.customClosePosition;\n log.d(\"customCl" .ascii "osePosition \" + customClosePosition);\n \n var closeRect" .ascii " = { \"width\": 50, \"height\": 50 };\n \n if (customClos" .ascii "ePosition.search(\"left\") !== -1) {\n closeRect.x = " .ascii "resizeRect.x;\n } else if (customClosePosition.search(\"c" .ascii "enter\") !== -1) {\n closeRect.x = resizeRect.x + (re" .ascii "sizeRect.width / 2) - 25;\n } else if (customClosePositio" .ascii "n.search(\"right\") !== -1) {\n closeRect.x = resizeR" .ascii "ect.x + resizeRect.width - 50;\n }\n \n if (customClos" .ascii "ePosition.search(\"top\") !== -1) {\n closeRect.y = r" .ascii "esizeRect.y;\n } else if (customClosePosition === \"cente" .ascii "r\") {\n closeRect.y = resizeRect.y + (resizeRect.hei" .ascii "ght / 2) - 25;\n } else if (customClosePosition.search(\"" .ascii "bottom\") !== -1) {\n closeRect.y = resizeRect.y + re" .ascii "sizeRect.height - 50;\n }\n \n var maxRect = { \"x\": " .ascii "0, \"y\": 0 };\n maxRect.width = maxSize.width;\n maxR" .ascii "ect.height = maxSize.height;\n \n return isRectContained(" .ascii "maxRect, closeRect);\n}\n \nfunction fitResizeViewOnScreen(p" .ascii "roperties) {\n log.d(\"fitResizeViewOnScreen\");\n log" .ascii ".d(\"" .ascii "defaultPosition \" + defaultPosition.x + \" \" + defaultPosi" .ascii "tion.y);\n log.d(\"offset \" + properties.offsetX + \" \"" .ascii " + properties.offsetY);\n \n var resizeRect = {};\n re" .ascii "sizeRect.x = defaultPosition.x + properties.offsetX;\n re" .ascii "sizeRect.y = defaultPosition.y + properties.offsetY;\n re" .ascii "sizeRect.width = properties.width;\n resizeRect.height = " .ascii "properties.height;\n printRect(\"resizeRect\", resizeRect" .ascii ");\n \n var maxRect = { \"x\": 0, \"y\": 0 };\n maxRec" .ascii "t.width = maxSize.width;\n maxRect.height = maxSize.heigh" .ascii "t;\n \n var adjustments = { \"x\": 0, \"y\": 0 };\n \n " .ascii " if (isRectContained(maxRect, resizeRect)) {\n log.d(" .ascii "\"no adjustment necessary\");\n return adjustments;\n" .ascii " }\n \n if (resizeRect.x < maxRect.x) {\n adjus" .ascii "tments.x = maxRect.x - resizeRect.x;\n } else if ((resize" .ascii "Rect.x + resizeRect.width) > (maxRect.x + maxRect.width)) {\n" .ascii " adjustments.x = (maxRect.x + maxRect.width) - (resiz" .ascii "eRect.x + resizeRect.width);\n }\n log.d(\"adjustments" .ascii ".x \" + adjustments.x);\n \n if (resizeRect.y < maxRect.y" .ascii ") {\n adjustments.y = maxRect.y - resizeRect.y;\n " .ascii "} else if ((resizeRect.y + resizeRect.height) > (maxRect.y +" .ascii " maxRect.height)) {\n adjustments.y = (maxRect.y + ma" .ascii "xRect.height) - (resizeRect.y + resizeRect.height);\n }\n" .ascii " log.d(\"adjustments.y \" + adjustments.y);\n \n resiz" .ascii "eRect.x = defaultPosition.x + properties.offsetX + adjustmen" .ascii "ts.x;\n resizeRect.y = defaultPosition.y + properties.off" .ascii "setY + adjustments.y;\n printRect(\"adjusted resizeRect\"" .ascii ", resizeRect);\n \n return adjustments;\n}\n \nfunction i" .ascii "sRectContained(containingRect, containedRect) {\n log.d(\"" .ascii "isRectContained\");\n printRect(\"containingRect\", conta" .ascii "iningRect);\n printRect(\"containedRect\", containedRect)" .ascii ";\n return (containedRect.x >= containingRect.x &&\n " .ascii " (containedRect.x + containedRect.width) <= (containingRec" .ascii "t.x + containingRect.width) &&\n containedRect.y >= c" .ascii "ontainingRect.y &&\n (containedRect.y + containedRect" .ascii ".height) <= (containingRect.y + contai" .ascii "ningRect.height));\n}\n\n\nfunction printRect(label, rect) {" .ascii "\n log.d(label +\n \" [\" + rect.x + \",\" + rec" .ascii "t.y + \"]\" +\n \",[\" + (rect.x + rect.width) + \"" .ascii ",\" + (rect.y + rect.height) + \"]\" +\n \" (\" + r" .ascii "ect.width + \"x\" + rect.height + \")\");\n}\n \nmraid.dumpL" .ascii "isteners = function() {\n var nEvents = Object.keys(liste" .ascii "ners).length\n log.i(\"dumping listeners (\" + nEvents + " .ascii "\" events)\");\n for (var event in listeners) {\n " .ascii "var eventListeners = listeners[event];\n log.i(\" \"" .ascii " + event + \" contains \" + eventListeners.length + \" liste" .ascii "ners\");\n for (var i = 0; i < eventListeners.length;" .ascii " i++) {\n log.i(\" \" + eventListeners[i]);\n" .ascii " }\n }\n};\n\n }());\n" .global __MRAID_mraid_js_len .align 2 .type __MRAID_mraid_js_len, %object .size __MRAID_mraid_js_len, 4 __MRAID_mraid_js_len: .word 26698 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global WPD_CONTACT_OTHER_POSTAL_ADDRESS_LINE2 .section .rodata .align 3 .type WPD_CONTACT_OTHER_POSTAL_ADDRESS_LINE2, %object .size WPD_CONTACT_OTHER_POSTAL_ADDRESS_LINE2, 24 WPD_CONTACT_OTHER_POSTAL_ADDRESS_LINE2: .xword 4225039787 .hword -26499 .hword 18295 .ascii "\263\371ra\205\2511+" .zero 4 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global foo .type foo, %function foo: .LFB0: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 mov w0, 1 str w0, [sp, 44] ldr w0, [sp, 20] cmp w0, 0 beq .L2 add x0, sp, 44 str x0, [sp, 48] b .L3 .L2: str xzr, [sp, 48] .L3: ldr x0, [sp, 48] mov w1, 2 str w1, [x0] ldr w0, [sp, 44] mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L5 bl __stack_chk_fail .L5: mov w0, w1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size foo, .-foo ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global __multf3 .align 2 .global cexpl .type cexpl, %function cexpl: .LFB0: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 mov x29, sp mov v2.16b, v0.16b mov v0.16b, v1.16b str q2, [sp, 16] str q0, [sp, 32] ldr q0, [sp, 16] str q0, [sp, 96] ldr q0, [sp, 32] str q0, [sp, 112] ldr q0, [sp, 96] bl expl str q0, [sp, 80] ldr q0, [sp, 112] bl cosl mov v1.16b, v0.16b ldr q0, [sp, 80] bl __multf3 str q0, [sp, 48] ldr q0, [sp, 64] ldr q2, [sp, 48] str q2, [sp, 128] str q0, [sp, 144] ldr q0, [sp, 112] bl sinl mov v1.16b, v0.16b ldr q0, [sp, 80] bl __multf3 str q0, [sp, 64] ldr q0, [sp, 64] ldr q2, [sp, 48] str q2, [sp, 128] str q0, [sp, 144] ldr q2, [sp, 48] ldr q0, [sp, 64] mov v4.16b, v2.16b mov v2.16b, v0.16b mov v0.16b, v4.16b mov v1.16b, v2.16b ldp x29, x30, [sp], 160 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size cexpl, .-cexpl ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .local g_magic .comm g_magic,8,8 .section .rodata .align 3 .LC0: .string "Hello I'm child proc!\n" .align 3 .LC1: .string "Arg is: %s\n" .align 3 .LC2: .string "Magic is: %d\n" .text .align 2 .type childproc, %function childproc: .LFB6: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] mov x3, x0 mov x2, 22 mov x1, 1 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl fwrite adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldr x2, [sp, 24] adrp x0, .LC1 add x1, x0, :lo12:.LC1 mov x0, x3 bl fprintf adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] adrp x0, g_magic add x0, x0, :lo12:g_magic ldr x0, [x0] ldr w0, [x0] mov w2, w0 adrp x0, .LC2 add x1, x0, :lo12:.LC2 mov x0, x3 bl fprintf mov w0, 0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size childproc, .-childproc .section .rodata .align 3 .LC3: .string "Need an argument to be passed to childproc!\n" .align 3 .LC4: .string "malloc magic" .align 3 .LC5: .string "magic at %p is set to: %d\n" .align 3 .LC6: .string "malloc child stack" .align 3 .LC7: .string "clone" .align 3 .LC8: .string "clone() returned %ld\n" .align 3 .LC9: .string "waitpid" .align 3 .LC10: .string "child has terminated with status %d\n" .text .align 2 .global main .type main, %function main: .LFB7: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 ldr w0, [sp, 28] cmp w0, 1 bne .L4 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] mov x3, x0 mov x2, 44 mov x1, 1 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl fwrite mov w0, 1 b .L10 .L4: mov x0, 4 bl malloc mov x1, x0 adrp x0, g_magic add x0, x0, :lo12:g_magic str x1, [x0] adrp x0, g_magic add x0, x0, :lo12:g_magic ldr x0, [x0] cmp x0, 0 bne .L6 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl perror mov w0, 1 bl exit .L6: adrp x0, g_magic add x0, x0, :lo12:g_magic ldr x0, [x0] mov w1, 4919 str w1, [x0] adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x4, [x0] adrp x0, g_magic add x0, x0, :lo12:g_magic ldr x1, [x0] adrp x0, g_magic add x0, x0, :lo12:g_magic ldr x0, [x0] ldr w0, [x0] mov w3, w0 mov x2, x1 adrp x0, .LC5 add x1, x0, :lo12:.LC5 mov x0, x4 bl fprintf mov x0, 4096 bl malloc str x0, [sp, 48] ldr x0, [sp, 48] cmp x0, 0 bne .L7 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl perror mov w0, 1 bl exit .L7: ldr x0, [sp, 48] add x1, x0, 4096 ldr x0, [sp, 16] add x0, x0, 8 ldr x0, [x0] mov x3, x0 mov w2, 17 adrp x0, childproc add x0, x0, :lo12:childproc bl clone str w0, [sp, 44] ldr w0, [sp, 44] cmn w0, #1 bne .L8 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl perror mov w0, 1 bl exit .L8: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldrsw x0, [sp, 44] mov x2, x0 adrp x0, .LC8 add x1, x0, :lo12:.LC8 mov x0, x3 bl fprintf add x0, sp, 40 mov w2, 0 mov x1, x0 ldr w0, [sp, 44] bl waitpid cmn w0, #1 bne .L9 adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl perror mov w0, 1 bl exit .L9: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldr w0, [sp, 40] mov w2, w0 adrp x0, .LC10 add x1, x0, :lo12:.LC10 mov x0, x3 bl fprintf mov w0, 0 .L10: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L11 bl __stack_chk_fail .L11: mov w0, w1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "\"Programming is like building a multilingual puzzle" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global main .type main, %function main: .LFB6: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] bl create_process_child mov w0, 0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size main, .-main .section .rodata .align 3 .LC0: .string "Error en el fork" .align 3 .LC1: .string "exit" .text .align 2 .global create_process_child .type create_process_child, %function create_process_child: .LFB7: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 mov w0, 1 str w0, [sp, 24] b .L4 .L7: bl get_command str x0, [sp, 32] bl fork str w0, [sp, 28] ldr w0, [sp, 28] cmn w0, #1 bne .L5 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, 1 bl exit .L5: ldr w0, [sp, 28] cmp w0, 0 bne .L6 ldr x0, [sp, 32] bl call_proc_from_string bl exit .L6: add x0, sp, 20 bl wait str w0, [sp, 28] adrp x0, .LC1 add x1, x0, :lo12:.LC1 ldr x0, [sp, 32] bl strcmp str w0, [sp, 24] .L4: ldr w0, [sp, 24] cmp w0, 0 bne .L7 nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 40] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L8 bl __stack_chk_fail .L8: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size create_process_child, .-create_process_child .section .rodata .align 3 .LC2: .string " " .align 3 .LC3: .string "./comando.out" .text .align 2 .global call_proc_from_string .type call_proc_from_string, %function call_proc_from_string: .LFB8: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 mov x29, sp .cfi_def_cfa_register 29 stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] stp x25, x26, [sp, 64] str x27, [sp, 80] sub sp, sp, #16 .cfi_offset 19, -144 .cfi_offset 20, -136 .cfi_offset 21, -128 .cfi_offset 22, -120 .cfi_offset 23, -112 .cfi_offset 24, -104 .cfi_offset 25, -96 .cfi_offset 26, -88 .cfi_offset 27, -80 str x0, [x29, 104] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [x29, 152] mov x1, 0 mov x0, sp mov x19, x0 mov w0, 1 str w0, [x29, 120] ldr x0, [x29, 104] bl get_arg_count add w0, w0, 1 sxtw x1, w0 sub x1, x1, #1 str x1, [x29, 136] sxtw x1, w0 mov x26, x1 mov x27, 0 lsr x1, x26, 58 lsl x23, x27, 6 orr x23, x1, x23 lsl x22, x26, 6 sxtw x1, w0 mov x24, x1 mov x25, 0 lsr x1, x24, 58 lsl x21, x25, 6 orr x21, x1, x21 lsl x20, x24, 6 sxtw x0, w0 lsl x0, x0, 3 add x0, x0, 15 lsr x0, x0, 4 lsl x0, x0, 4 and x1, x0, -65536 sub x1, sp, x1 .L10: cmp sp, x1 beq .L11 sub sp, sp, #65536 str xzr, [sp, 1024] b .L10 .L11: and x1, x0, 65535 sub sp, sp, x1 str xzr, [sp] and x0, x0, 65535 cmp x0, 1024 bcc .L12 str xzr, [sp, 1024] .L12: add x0, sp, 16 add x0, x0, 7 lsr x0, x0, 3 lsl x0, x0, 3 str x0, [x29, 144] adrp x0, .LC2 add x1, x0, :lo12:.LC2 ldr x0, [x29, 104] bl strtok str x0, [x29, 128] ldr x0, [x29, 144] adrp x1, .LC3 add x1, x1, :lo12:.LC3 str x1, [x0] b .L13 .L14: ldr x0, [x29, 144] ldrsw x1, [x29, 120] ldr x2, [x29, 128] str x2, [x0, x1, lsl 3] ldr w0, [x29, 120] add w0, w0, 1 str w0, [x29, 120] adrp x0, .LC2 add x1, x0, :lo12:.LC2 mov x0, 0 bl strtok str x0, [x29, 128] .L13: ldr x0, [x29, 128] cmp x0, 0 bne .L14 ldr x0, [x29, 144] ldrsw x1, [x29, 120] str xzr, [x0, x1, lsl 3] ldr x0, [x29, 144] ldr x0, [x0] ldr x1, [x29, 144] bl execvp str w0, [x29, 124] ldr w0, [x29, 124] mov sp, x19 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [x29, 152] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L16 bl __stack_chk_fail .L16: mov w0, w1 mov sp, x29 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldp x25, x26, [sp, 64] ldr x27, [sp, 80] ldp x29, x30, [sp], 160 .cfi_restore 30 .cfi_restore 29 .cfi_restore 27 .cfi_restore 25 .cfi_restore 26 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa 31, 0 ret .cfi_endproc .LFE8: .size call_proc_from_string, .-call_proc_from_string .align 2 .global get_arg_count .type get_arg_count, %function get_arg_count: .LFB9: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -48 str x0, [sp, 40] str wzr, [sp, 56] str wzr, [sp, 60] b .L18 .L20: ldrsw x0, [sp, 60] ldr x1, [sp, 40] add x0, x1, x0 ldrb w0, [x0] cmp w0, 32 bne .L19 ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 56] .L19: ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 60] .L18: ldrsw x19, [sp, 60] ldr x0, [sp, 40] bl strlen cmp x19, x0 bcc .L20 ldr w0, [sp, 56] ldr x19, [sp, 16] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size get_arg_count, .-get_arg_count .section .rodata .align 3 .LC4: .string "Introduce el comando>\t" .align 3 .LC5: .string "%[^\n]" .text .align 2 .global get_command .type get_command, %function get_command: .LFB10: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov x0, 100 bl malloc str x0, [sp, 24] adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf ldr x1, [sp, 24] adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl __isoc99_scanf adrp x0, :got:stdin ldr x0, [x0, #:got_lo12:stdin] ldr x0, [x0] bl fflush ldr x0, [sp, 24] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size get_command, .-get_command ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "\033[%d;%dH" .text .align 2 .global con_move .type con_move, %function con_move: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str w0, [sp, 28] str w1, [sp, 24] ldr w2, [sp, 28] ldr w1, [sp, 24] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size con_move, .-con_move ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "Informe o raio do circulo: " .align 3 .LC1: .string "%f" .align 3 .LC2: .string "O tamanho em centimetros eh %.2f" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 mov w0, 3670 movk w0, 0x4049, lsl 16 fmov s0, w0 str s0, [sp, 32] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf add x0, sp, 28 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf ldr s1, [sp, 28] ldr s0, [sp, 32] fmul s1, s1, s0 ldr s0, [sp, 28] fmul s0, s1, s0 str s0, [sp, 36] ldr s0, [sp, 36] fcvt d0, s0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 40] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L3 bl __stack_chk_fail .L3: mov w0, w1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%i\n" .text .align 2 .global main .type main, %function main: .LFB6: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -48 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 mov w0, 24 str w0, [sp, 40] mov w0, 10 str w0, [sp, 44] mov w19, 0 b .L2 .L3: sxtw x0, w19 lsl x0, x0, 2 add x1, sp, 40 ldr w0, [x1, x0] mov w1, w0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf add w19, w19, 1 .L2: cmp w19, 1 ble .L3 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L5 bl __stack_chk_fail .L5: mov w0, w1 ldr x19, [sp, 16] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "app_main running" .text .align 2 .global app_main .type app_main, %function app_main: .LFB0: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size app_main, .-app_main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global min .type min, %function min: .LFB0: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] ldr x0, [sp, 8] ldr w0, [x0] str w0, [sp, 24] mov w0, 1 str w0, [sp, 28] b .L2 .L4: ldr x0, [sp, 8] ldr w0, [x0] ldr w1, [sp, 24] cmp w1, w0 ble .L3 ldr x0, [sp, 8] ldr w0, [x0] str w0, [sp, 24] .L3: ldr x0, [sp, 8] add x0, x0, 4 str x0, [sp, 8] ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L2: ldr w1, [sp, 28] ldr w0, [sp, 4] cmp w1, w0 blt .L4 ldr w0, [sp, 24] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size min, .-min .section .rodata .align 3 .LC0: .string "Please enter a number: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "The minimum number entered is %d\n" .text .align 2 .global main .type main, %function main: .LFB1: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp .cfi_def_cfa_register 29 str x19, [sp, 16] sub sp, sp, #16 .cfi_offset 19, -48 adrp x8, :got:__stack_chk_guard ldr x8, [x8, #:got_lo12:__stack_chk_guard] ldr x9, [x8] str x9, [x29, 56] mov x9, 0 mov x8, sp mov x19, x8 mov w8, 25 str w8, [x29, 36] ldr w8, [x29, 36] sxtw x9, w8 sub x9, x9, #1 str x9, [x29, 40] sxtw x9, w8 mov x6, x9 mov x7, 0 lsr x9, x6, 59 lsl x3, x7, 5 orr x3, x9, x3 lsl x2, x6, 5 sxtw x2, w8 mov x4, x2 mov x5, 0 lsr x2, x4, 59 lsl x1, x5, 5 orr x1, x2, x1 lsl x0, x4, 5 sxtw x0, w8 lsl x0, x0, 2 add x0, x0, 15 lsr x0, x0, 4 lsl x0, x0, 4 and x1, x0, -65536 sub x1, sp, x1 .L7: cmp sp, x1 beq .L8 sub sp, sp, #65536 str xzr, [sp, 1024] b .L7 .L8: and x1, x0, 65535 sub sp, sp, x1 str xzr, [sp] and x0, x0, 65535 cmp x0, 1024 bcc .L9 str xzr, [sp, 1024] .L9: add x0, sp, 16 add x0, x0, 3 lsr x0, x0, 2 lsl x0, x0, 2 str x0, [x29, 48] str wzr, [x29, 32] b .L10 .L11: adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf ldrsw x0, [x29, 32] lsl x0, x0, 2 ldr x1, [x29, 48] add x0, x1, x0 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf ldr w0, [x29, 32] add w0, w0, 1 str w0, [x29, 32] .L10: ldr w1, [x29, 32] ldr w0, [x29, 36] cmp w1, w0 blt .L11 ldr x0, [x29, 48] ldr w1, [x29, 36] bl min mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf mov sp, x19 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [x29, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L13 bl __stack_chk_fail .L13: mov w0, w1 mov sp, x29 ldr x19, [sp, 16] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa 31, 0 ret .cfi_endproc .LFE1: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "Cantidad de numeros: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Numero: " .align 3 .LC3: .string "%hd" .align 3 .LC4: .string "%s\n\n" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 str wzr, [sp, 36] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf add x0, sp, 28 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf mov w0, 1 str w0, [sp, 32] b .L2 .L3: adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf add x0, sp, 26 mov x1, x0 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl __isoc99_scanf ldrsh w0, [sp, 26] cmp w0, 0 beq .L3 ldrsh w0, [sp, 26] bl func_posneg str w0, [sp, 36] ldr w1, [sp, 36] adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L2: ldr w0, [sp, 28] ldr w1, [sp, 32] cmp w1, w0 ble .L3 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 40] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L5 bl __stack_chk_fail .L5: mov w0, w1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .section .rodata .align 3 .LC5: .string "Positivo" .align 3 .LC6: .string "Negativo" .text .align 2 .global func_posneg .type func_posneg, %function func_posneg: .LFB1: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strh w0, [sp, 14] ldrsh w0, [sp, 14] cmp w0, 0 ble .L7 adrp x0, .LC5 add x0, x0, :lo12:.LC5 b .L8 .L7: adrp x0, .LC6 add x0, x0, :lo12:.LC6 .L8: add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size func_posneg, .-func_posneg ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global printf .type printf, %function printf: .LFB0: .cfi_startproc stp x29, x30, [sp, -304]! .cfi_def_cfa_offset 304 .cfi_offset 29, -304 .cfi_offset 30, -296 mov x29, sp str x0, [sp, 56] str x1, [sp, 248] str x2, [sp, 256] str x3, [sp, 264] str x4, [sp, 272] str x5, [sp, 280] str x6, [sp, 288] str x7, [sp, 296] str q0, [sp, 112] str q1, [sp, 128] str q2, [sp, 144] str q3, [sp, 160] str q4, [sp, 176] str q5, [sp, 192] str q6, [sp, 208] str q7, [sp, 224] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 104] mov x1, 0 add x0, sp, 304 str x0, [sp, 72] add x0, sp, 304 str x0, [sp, 80] add x0, sp, 240 str x0, [sp, 88] mov w0, -56 str w0, [sp, 96] mov w0, -128 str w0, [sp, 100] adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x3, [x0] add x0, sp, 16 add x1, sp, 72 ldp q0, q1, [x1] stp q0, q1, [x0] add x0, sp, 16 mov x2, x0 ldr x1, [sp, 56] mov x0, x3 bl vfprintf str w0, [sp, 68] ldr w0, [sp, 68] mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 104] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L3 bl __stack_chk_fail .L3: mov w0, w1 ldp x29, x30, [sp], 304 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size printf, .-printf ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "Pattern is not found" .align 3 .LC1: .string "Pattern with shift 0" .align 3 .LC2: .string "Pattern occurs with shift %d\n" .text .align 2 .global KnuthMorrisPratt .type KnuthMorrisPratt, %function KnuthMorrisPratt: .LFB6: .cfi_startproc stp x29, x30, [sp, -176]! .cfi_def_cfa_offset 176 .cfi_offset 29, -176 .cfi_offset 30, -168 mov x29, sp .cfi_def_cfa_register 29 stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] stp x25, x26, [sp, 64] str x27, [sp, 80] sub sp, sp, #16 .cfi_offset 19, -160 .cfi_offset 20, -152 .cfi_offset 21, -144 .cfi_offset 22, -136 .cfi_offset 23, -128 .cfi_offset 24, -120 .cfi_offset 25, -112 .cfi_offset 26, -104 .cfi_offset 27, -96 str x0, [x29, 120] str x1, [x29, 112] str w2, [x29, 108] str w3, [x29, 104] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [x29, 168] mov x1, 0 mov x0, sp mov x19, x0 ldr x0, [x29, 120] ldrb w0, [x0] cmp w0, 0 beq .L2 ldr w1, [x29, 108] ldr w0, [x29, 104] cmp w1, w0 bge .L3 .L2: adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf .L3: ldr x0, [x29, 120] ldrb w0, [x0] cmp w0, 0 beq .L4 ldr w1, [x29, 108] ldr w0, [x29, 104] cmp w1, w0 bge .L5 .L4: adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf .L5: ldr x0, [x29, 112] ldrb w0, [x0] cmp w0, 0 beq .L6 ldr w0, [x29, 104] cmp w0, 0 bne .L7 .L6: adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf .L7: ldr w0, [x29, 104] add w0, w0, 1 sxtw x1, w0 sub x1, x1, #1 str x1, [x29, 152] sxtw x1, w0 mov x26, x1 mov x27, 0 lsr x1, x26, 59 lsl x23, x27, 5 orr x23, x1, x23 lsl x22, x26, 5 sxtw x1, w0 mov x24, x1 mov x25, 0 lsr x1, x24, 59 lsl x21, x25, 5 orr x21, x1, x21 lsl x20, x24, 5 sxtw x0, w0 lsl x0, x0, 2 add x0, x0, 15 lsr x0, x0, 4 lsl x0, x0, 4 and x1, x0, -65536 sub x1, sp, x1 .L8: cmp sp, x1 beq .L9 sub sp, sp, #65536 str xzr, [sp, 1024] b .L8 .L9: and x1, x0, 65535 sub sp, sp, x1 str xzr, [sp] and x0, x0, 65535 cmp x0, 1024 bcc .L10 str xzr, [sp, 1024] .L10: add x0, sp, 16 add x0, x0, 3 lsr x0, x0, 2 lsl x0, x0, 2 str x0, [x29, 160] str wzr, [x29, 132] b .L11 .L12: ldr x0, [x29, 160] ldrsw x1, [x29, 132] str wzr, [x0, x1, lsl 2] ldr w0, [x29, 132] add w0, w0, 1 str w0, [x29, 132] .L11: ldr w1, [x29, 104] ldr w0, [x29, 132] cmp w1, w0 bge .L12 mov w0, 1 str w0, [x29, 136] b .L13 .L19: ldr w0, [x29, 136] add w1, w0, 1 ldr x0, [x29, 160] sxtw x1, w1 ldr w0, [x0, x1, lsl 2] str w0, [x29, 140] b .L14 .L16: ldr x0, [x29, 160] ldrsw x1, [x29, 140] ldr w0, [x0, x1, lsl 2] str w0, [x29, 140] .L14: ldr w0, [x29, 140] cmp w0, 0 ble .L15 ldrsw x0, [x29, 140] ldr x1, [x29, 112] add x0, x1, x0 ldrb w1, [x0] ldrsw x0, [x29, 136] ldr x2, [x29, 112] add x0, x2, x0 ldrb w0, [x0] cmp w1, w0 bne .L16 .L15: ldr w0, [x29, 140] cmp w0, 0 bgt .L17 ldrsw x0, [x29, 140] ldr x1, [x29, 112] add x0, x1, x0 ldrb w1, [x0] ldrsw x0, [x29, 136] ldr x2, [x29, 112] add x0, x2, x0 ldrb w0, [x0] cmp w1, w0 bne .L18 .L17: ldr w0, [x29, 136] add w1, w0, 1 ldr w0, [x29, 140] add w2, w0, 1 ldr x0, [x29, 160] sxtw x1, w1 str w2, [x0, x1, lsl 2] .L18: ldr w0, [x29, 136] add w0, w0, 1 str w0, [x29, 136] .L13: ldr w1, [x29, 136] ldr w0, [x29, 104] cmp w1, w0 blt .L19 str wzr, [x29, 144] str wzr, [x29, 148] b .L20 .L23: ldrsw x0, [x29, 144] ldr x1, [x29, 120] add x0, x1, x0 ldrb w1, [x0] ldrsw x0, [x29, 148] ldr x2, [x29, 112] add x0, x2, x0 ldrb w0, [x0] cmp w1, w0 bne .L21 ldr w0, [x29, 148] add w0, w0, 1 str w0, [x29, 148] ldr w1, [x29, 148] ldr w0, [x29, 104] cmp w1, w0 bne .L22 ldr w1, [x29, 144] ldr w0, [x29, 148] sub w0, w1, w0 add w0, w0, 1 mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf b .L22 .L21: ldr w0, [x29, 148] cmp w0, 0 ble .L22 ldr x0, [x29, 160] ldrsw x1, [x29, 148] ldr w0, [x0, x1, lsl 2] str w0, [x29, 148] ldr w0, [x29, 144] sub w0, w0, #1 str w0, [x29, 144] .L22: ldr w0, [x29, 144] add w0, w0, 1 str w0, [x29, 144] .L20: ldr w1, [x29, 144] ldr w0, [x29, 108] cmp w1, w0 blt .L23 mov sp, x19 nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [x29, 168] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L24 bl __stack_chk_fail .L24: mov sp, x29 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldp x25, x26, [sp, 64] ldr x27, [sp, 80] ldp x29, x30, [sp], 176 .cfi_restore 30 .cfi_restore 29 .cfi_restore 27 .cfi_restore 25 .cfi_restore 26 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa 31, 0 ret .cfi_endproc .LFE6: .size KnuthMorrisPratt, .-KnuthMorrisPratt .align 2 .global main .type main, %function main: .LFB7: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 add x0, sp, 24 bl gets add x0, sp, 48 bl gets add x0, sp, 24 bl strlen str w0, [sp, 16] add x0, sp, 48 bl strlen str w0, [sp, 20] add x1, sp, 48 add x0, sp, 24 ldr w3, [sp, 20] ldr w2, [sp, 16] bl KnuthMorrisPratt mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 72] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L27 bl __stack_chk_fail .L27: mov w0, w1 ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "ERROR: %s\n" .text .align 2 .global die .type die, %function die: .LFB6: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] bl __errno_location ldr w0, [x0] cmp w0, 0 beq .L2 ldr x0, [sp, 24] bl perror b .L3 .L2: ldr x1, [sp, 24] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf .L3: mov w0, 1 bl exit .cfi_endproc .LFE6: .size die, .-die .section .rodata .align 3 .LC1: .string "%d %s %s\n" .text .align 2 .global Address_print .type Address_print, %function Address_print: .LFB7: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] ldr w1, [x0] ldr x0, [sp, 24] add x2, x0, 8 ldr x0, [sp, 24] add x0, x0, 520 mov x3, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size Address_print, .-Address_print .section .rodata .align 3 .LC2: .string "Failed to load database." .text .align 2 .global Database_load .type Database_load, %function Database_load: .LFB8: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] ldr x4, [x0, 8] ldr x0, [sp, 24] ldr x0, [x0] mov x3, x0 mov x2, 1 mov x1, 37664 movk x1, 0x1, lsl 16 mov x0, x4 bl fread str w0, [sp, 44] ldr w0, [sp, 44] cmp w0, 1 beq .L7 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl die .L7: nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size Database_load, .-Database_load .section .rodata .align 3 .LC3: .string "Memory error" .align 3 .LC4: .string "w" .align 3 .LC5: .string "r+" .align 3 .LC6: .string "Failed to open the file" .text .align 2 .global Database_open .type Database_open, %function Database_open: .LFB9: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] strb w1, [sp, 23] mov x0, 16 bl malloc str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L9 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl die .L9: mov x0, 37664 movk x0, 0x1, lsl 16 bl malloc mov x1, x0 ldr x0, [sp, 40] str x1, [x0, 8] ldr x0, [sp, 40] ldr x0, [x0, 8] cmp x0, 0 bne .L10 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl die .L10: ldrb w0, [sp, 23] cmp w0, 99 bne .L11 adrp x0, .LC4 add x1, x0, :lo12:.LC4 ldr x0, [sp, 24] bl fopen mov x1, x0 ldr x0, [sp, 40] str x1, [x0] b .L12 .L11: adrp x0, .LC5 add x1, x0, :lo12:.LC5 ldr x0, [sp, 24] bl fopen mov x1, x0 ldr x0, [sp, 40] str x1, [x0] ldr x0, [sp, 40] ldr x0, [x0] cmp x0, 0 beq .L12 ldr x0, [sp, 40] bl Database_load .L12: ldr x0, [sp, 40] ldr x0, [x0] cmp x0, 0 bne .L13 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl die .L13: ldr x0, [sp, 40] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size Database_open, .-Database_open .align 2 .global Database_close .type Database_close, %function Database_close: .LFB10: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] cmp x0, 0 beq .L19 ldr x0, [sp, 24] ldr x0, [x0] cmp x0, 0 beq .L17 ldr x0, [sp, 24] ldr x0, [x0] bl fclose .L17: ldr x0, [sp, 24] ldr x0, [x0, 8] cmp x0, 0 beq .L18 ldr x0, [sp, 24] ldr x0, [x0, 8] bl free .L18: ldr x0, [sp, 24] bl free .L19: nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size Database_close, .-Database_close .section .rodata .align 3 .LC7: .string "Failed to write database." .align 3 .LC8: .string "Cannot flush database." .text .align 2 .global Database_write .type Database_write, %function Database_write: .LFB11: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] ldr x0, [x0] bl rewind ldr x0, [sp, 24] ldr x4, [x0, 8] ldr x0, [sp, 24] ldr x0, [x0] mov x3, x0 mov x2, 1 mov x1, 37664 movk x1, 0x1, lsl 16 mov x0, x4 bl fwrite str w0, [sp, 44] ldr w0, [sp, 44] cmp w0, 1 beq .L21 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl die .L21: ldr x0, [sp, 24] ldr x0, [x0] bl fflush str w0, [sp, 44] ldr w0, [sp, 44] cmp w0, 1 bne .L23 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl die .L23: nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size Database_write, .-Database_write .align 2 .global Database_create .type Database_create, %function Database_create: .LFB12: .cfi_startproc sub sp, sp, #1088 .cfi_def_cfa_offset 1088 stp x29, x30, [sp] .cfi_offset 29, -1088 .cfi_offset 30, -1080 mov x29, sp str x0, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1080] mov x1, 0 str wzr, [sp, 44] str wzr, [sp, 44] b .L25 .L26: add x0, sp, 48 mov x1, 1032 mov x2, x1 mov w1, 0 bl memset ldr w0, [sp, 44] str w0, [sp, 48] ldr x0, [sp, 24] ldr x2, [x0, 8] ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 7 add x0, x0, x1 lsl x0, x0, 3 add x0, x2, x0 mov x3, x0 add x0, sp, 48 mov x1, 1032 mov x2, x1 mov x1, x0 mov x0, x3 bl memcpy ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L25: ldr w0, [sp, 44] cmp w0, 99 ble .L26 nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1080] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L27 bl __stack_chk_fail .L27: ldp x29, x30, [sp] add sp, sp, 1088 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size Database_create, .-Database_create .section .rodata .align 3 .LC9: .string "Already set, delete it first" .align 3 .LC10: .string "Name copy failed" .align 3 .LC11: .string "Email copy failed" .text .align 2 .global Database_set .type Database_set, %function Database_set: .LFB13: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] ldr x0, [sp, 40] ldr x2, [x0, 8] ldrsw x1, [sp, 36] mov x0, x1 lsl x0, x0, 7 add x0, x0, x1 lsl x0, x0, 3 add x0, x2, x0 str x0, [sp, 48] ldr x0, [sp, 48] ldr w0, [x0, 4] cmp w0, 0 beq .L29 adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl die .L29: ldr x0, [sp, 48] mov w1, 1 str w1, [x0, 4] ldr x0, [sp, 48] add x0, x0, 8 mov x2, 512 ldr x1, [sp, 24] bl strncpy str x0, [sp, 56] ldr x0, [sp, 56] cmp x0, 0 bne .L30 adrp x0, .LC10 add x0, x0, :lo12:.LC10 bl die .L30: ldr x0, [sp, 48] add x0, x0, 520 mov x2, 512 ldr x1, [sp, 16] bl strncpy str x0, [sp, 56] ldr x0, [sp, 56] cmp x0, 0 bne .L32 adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl die .L32: nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size Database_set, .-Database_set .section .rodata .align 3 .LC12: .string "ID is not set" .text .align 2 .global Database_get .type Database_get, %function Database_get: .LFB14: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] ldr x0, [sp, 24] ldr x2, [x0, 8] ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 7 add x0, x0, x1 lsl x0, x0, 3 add x0, x2, x0 str x0, [sp, 40] ldr x0, [sp, 40] ldr w0, [x0, 4] cmp w0, 0 beq .L34 ldr x0, [sp, 40] bl Address_print b .L36 .L34: adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl die .L36: nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE14: .size Database_get, .-Database_get .align 2 .global Database_delete .type Database_delete, %function Database_delete: .LFB15: .cfi_startproc sub sp, sp, #1072 .cfi_def_cfa_offset 1072 stp x29, x30, [sp] .cfi_offset 29, -1072 .cfi_offset 30, -1064 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1064] mov x1, 0 add x0, sp, 32 mov x1, 1032 mov x2, x1 mov w1, 0 bl memset ldr w0, [sp, 20] str w0, [sp, 32] ldr x0, [sp, 24] ldr x2, [x0, 8] ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 7 add x0, x0, x1 lsl x0, x0, 3 add x0, x2, x0 mov x3, x0 add x0, sp, 32 mov x1, 1032 mov x2, x1 mov x1, x0 mov x0, x3 bl memcpy nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1064] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L38 bl __stack_chk_fail .L38: ldp x29, x30, [sp] add sp, sp, 1072 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE15: .size Database_delete, .-Database_delete .align 2 .global Database_list .type Database_list, %function Database_list: .LFB16: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 24] str wzr, [sp, 44] ldr x0, [sp, 24] ldr x0, [x0, 8] str x0, [sp, 48] str wzr, [sp, 44] b .L40 .L42: ldrsw x1, [sp, 44] mov x0, x1 lsl x0, x0, 7 add x0, x0, x1 lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 str x0, [sp, 56] ldr x0, [sp, 56] ldr w0, [x0, 4] cmp w0, 0 beq .L41 ldr x0, [sp, 56] bl Address_print .L41: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L40: ldr w0, [sp, 44] cmp w0, 99 ble .L42 nop nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE16: .size Database_list, .-Database_list .align 2 .global Database_find .type Database_find, %function Database_find: .LFB17: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] str wzr, [sp, 32] ldr x0, [sp, 24] ldr x0, [x0, 8] str x0, [sp, 40] str wzr, [sp, 32] b .L44 .L46: ldrsw x1, [sp, 32] mov x0, x1 lsl x0, x0, 7 add x0, x0, x1 lsl x0, x0, 3 ldr x1, [sp, 40] add x0, x1, x0 str x0, [sp, 48] ldr x0, [sp, 48] ldr w0, [x0, 4] cmp w0, 0 beq .L45 ldr x0, [sp, 48] add x0, x0, 8 str x0, [sp, 56] str wzr, [sp, 36] ldr x1, [sp, 56] ldr x0, [sp, 16] bl strcmp str w0, [sp, 36] ldr w0, [sp, 36] cmp w0, 0 bne .L45 ldr x0, [sp, 48] bl Address_print .L45: ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L44: ldr w0, [sp, 32] cmp w0, 99 ble .L46 nop nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE17: .size Database_find, .-Database_find .section .rodata .align 3 .LC13: .string "USAGE: ex17 <dbfile> <action> [action params]" .align 3 .LC14: .string "There's not that many records." .align 3 .LC15: .string "Need an id to get" .align 3 .LC16: .string "Need a name to search for" .align 3 .LC17: .string "Need id, name, email to set" .align 3 .LC18: .string "Need id to delete" .align 3 .LC19: .string "Invalid action: c=create, g=get, s=set, d=del, l=list" .text .align 2 .global main .type main, %function main: .LFB18: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] ldr w0, [sp, 28] cmp w0, 2 bgt .L48 adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl die .L48: ldr x0, [sp, 16] ldr x0, [x0, 8] str x0, [sp, 48] ldr x0, [sp, 16] add x0, x0, 16 ldr x0, [x0] ldrb w0, [x0] strb w0, [sp, 35] str xzr, [sp, 40] ldrb w1, [sp, 35] ldr x0, [sp, 48] bl Database_open str x0, [sp, 56] str wzr, [sp, 36] ldr w0, [sp, 28] cmp w0, 3 ble .L49 ldr x0, [sp, 16] add x0, x0, 24 ldr x0, [x0] bl atoi str w0, [sp, 36] .L49: ldr w0, [sp, 28] cmp w0, 3 ble .L50 ldrb w0, [sp, 35] cmp w0, 102 bne .L50 ldr x0, [sp, 16] ldr x0, [x0, 24] str x0, [sp, 40] .L50: ldr w0, [sp, 36] cmp w0, 99 ble .L51 adrp x0, .LC14 add x0, x0, :lo12:.LC14 bl die .L51: ldrb w0, [sp, 35] cmp w0, 115 beq .L52 cmp w0, 115 bgt .L53 cmp w0, 108 beq .L54 cmp w0, 108 bgt .L53 cmp w0, 103 beq .L55 cmp w0, 103 bgt .L53 cmp w0, 102 beq .L56 cmp w0, 102 bgt .L53 cmp w0, 99 beq .L57 cmp w0, 100 beq .L58 b .L53 .L57: ldr x0, [sp, 56] bl Database_create ldr x0, [sp, 56] bl Database_write b .L59 .L55: ldr w0, [sp, 28] cmp w0, 4 beq .L60 adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl die .L60: ldr w1, [sp, 36] ldr x0, [sp, 56] bl Database_get b .L59 .L56: ldr w0, [sp, 28] cmp w0, 4 beq .L61 adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl die .L61: ldr x1, [sp, 40] ldr x0, [sp, 56] bl Database_find b .L59 .L52: ldr w0, [sp, 28] cmp w0, 6 beq .L62 adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl die .L62: ldr x0, [sp, 16] add x0, x0, 32 ldr x1, [x0] ldr x0, [sp, 16] add x0, x0, 40 ldr x0, [x0] mov x3, x0 mov x2, x1 ldr w1, [sp, 36] ldr x0, [sp, 56] bl Database_set ldr x0, [sp, 56] bl Database_write b .L59 .L58: ldr w0, [sp, 28] cmp w0, 4 beq .L63 adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl die .L63: ldr w1, [sp, 36] ldr x0, [sp, 56] bl Database_delete ldr x0, [sp, 56] bl Database_write b .L59 .L54: ldr x0, [sp, 56] bl Database_list b .L59 .L53: adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl die .L59: ldr x0, [sp, 56] bl Database_close mov w0, 0 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE18: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global current .bss .align 3 .type current, %object .size current, 8 current: .zero 8 .global best .align 3 .type best, %object .size best, 8 best: .zero 8 .section .rodata .align 3 .LC0: .string "%[^\n]s" .align 3 .LC1: .string "%d %d" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc sub sp, sp, #672 .cfi_def_cfa_offset 672 stp x29, x30, [sp] .cfi_offset 29, -672 .cfi_offset 30, -664 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -656 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 664] mov x1, 0 add x0, sp, 256 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf adrp x0, best add x0, x0, :lo12:best str wzr, [x0] adrp x0, best add x0, x0, :lo12:best str wzr, [x0, 4] str wzr, [sp, 36] b .L2 .L17: str wzr, [sp, 40] b .L3 .L4: ldrsw x0, [sp, 40] add x1, sp, 48 mov w2, 48 strb w2, [x1, x0] ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L3: ldr w0, [sp, 40] cmp w0, 200 ble .L4 str wzr, [sp, 40] b .L5 .L6: ldrsw x0, [sp, 36] add x1, sp, 256 ldrb w2, [x1, x0] ldrsw x0, [sp, 40] add x1, sp, 48 strb w2, [x1, x0] ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L5: ldrsw x0, [sp, 36] add x1, sp, 256 ldrb w0, [x1, x0] cmp w0, 32 bne .L6 ldr w0, [sp, 40] sub w0, w0, #1 sxtw x0, w0 add x1, sp, 48 ldrb w0, [x1, x0] cmp w0, 108 bne .L7 ldr w0, [sp, 40] sub w0, w0, #2 sxtw x0, w0 add x1, sp, 48 ldrb w0, [x1, x0] cmp w0, 97 bne .L7 ldr w0, [sp, 40] sub w0, w0, #3 sxtw x0, w0 add x1, sp, 48 ldrb w0, [x1, x0] cmp w0, 115 bne .L7 ldr w0, [sp, 40] sub w0, w0, #4 sxtw x0, w0 add x1, sp, 48 ldrb w0, [x1, x0] cmp w0, 105 bne .L7 ldr w0, [sp, 40] sub w0, w0, #5 sxtw x0, w0 add x1, sp, 48 ldrb w0, [x1, x0] cmp w0, 109 bne .L7 ldr w0, [sp, 40] sub w0, w0, #6 sxtw x0, w0 add x1, sp, 48 ldrb w0, [x1, x0] cmp w0, 115 bne .L7 ldr w0, [sp, 40] sub w0, w0, #7 sxtw x0, w0 add x1, sp, 48 ldrb w0, [x1, x0] cmp w0, 118 beq .L20 .L7: adrp x0, current add x0, x0, :lo12:current mov w1, 1 str w1, [x0] add x0, sp, 48 bl hash mov w1, w0 adrp x0, current add x0, x0, :lo12:current str w1, [x0, 4] ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 44] b .L9 .L16: str wzr, [sp, 40] b .L10 .L11: ldrsw x0, [sp, 40] add x1, sp, 48 mov w2, 48 strb w2, [x1, x0] ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L10: ldr w0, [sp, 40] cmp w0, 200 ble .L11 str wzr, [sp, 40] b .L12 .L13: ldrsw x0, [sp, 44] add x1, sp, 256 ldrb w2, [x1, x0] ldrsw x0, [sp, 40] add x1, sp, 48 strb w2, [x1, x0] ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L12: ldrsw x0, [sp, 44] add x1, sp, 256 ldrb w0, [x1, x0] cmp w0, 32 bne .L13 add x0, sp, 48 bl hash mov x1, x0 adrp x0, current add x0, x0, :lo12:current ldr w0, [x0, 4] sxtw x0, w0 cmp x1, x0 bne .L14 adrp x0, current add x0, x0, :lo12:current ldr w0, [x0] add w1, w0, 1 adrp x0, current add x0, x0, :lo12:current str w1, [x0] .L14: adrp x0, current add x0, x0, :lo12:current ldr w1, [x0] adrp x0, best add x0, x0, :lo12:best ldr w0, [x0] cmp w1, w0 ble .L15 adrp x0, current add x0, x0, :lo12:current ldr w1, [x0] adrp x0, best add x0, x0, :lo12:best str w1, [x0] adrp x0, current add x0, x0, :lo12:current ldr w1, [x0, 4] adrp x0, best add x0, x0, :lo12:best str w1, [x0, 4] .L15: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L9: ldrsw x19, [sp, 44] add x0, sp, 256 bl strlen cmp x19, x0 bcc .L16 ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L2: ldrsw x19, [sp, 36] add x0, sp, 256 bl strlen cmp x19, x0 bcc .L17 b .L8 .L20: nop .L8: adrp x0, best add x0, x0, :lo12:best ldr w1, [x0] adrp x0, best add x0, x0, :lo12:best ldr w0, [x0, 4] mov w2, w0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 664] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L19 bl __stack_chk_fail .L19: mov w0, w1 ldr x19, [sp, 16] ldp x29, x30, [sp] add sp, sp, 672 .cfi_restore 29 .cfi_restore 30 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .align 2 .global hash .type hash, %function hash: .LFB1: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] mov w0, 42 str w0, [sp, 24] str wzr, [sp, 28] b .L22 .L23: ldrsw x0, [sp, 28] ldr x1, [sp, 8] add x0, x1, x0 ldrb w0, [x0] mov w1, w0 ldr w0, [sp, 28] add w0, w0, 1 mul w0, w1, w0 ldr w1, [sp, 24] add w0, w1, w0 str w0, [sp, 24] ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L22: ldrsw x0, [sp, 28] ldr x1, [sp, 8] add x0, x1, x0 ldrb w0, [x0] cmp w0, 48 bne .L23 ldrsw x0, [sp, 24] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size hash, .-hash ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global order .data .align 2 .type order, %object .size order, 4 order: .word 4 .global queue .bss .align 3 .type queue, %object .size queue, 8 queue: .zero 8 .global verbose_output .type verbose_output, %object .size verbose_output, 1 verbose_output: .zero 1 .section .rodata .align 3 .LC0: .string "B+ Tree of Order %d.\n" .align 3 .LC1: .string "1.2" .align 3 .LC2: .string "\tAmittai Aviram -- [email protected] Version %s\n" .align 3 .LC3: .string "\tfollowing Silberschatz, Korth, Sidarshan, Database Concepts, 5th ed.\n" .align 3 .LC4: .string "To build a B+ tree of a different order, start again and enter the order" .align 3 .LC5: .string "as an integer argument: bpt <order>. " .align 3 .LC6: .string "3 <= order <=20" .align 3 .LC7: .string "To start with input from a file of newline-delimited integers, start again and enter" .align 3 .LC8: .string "the order followed by the filename: bpt <order> <inputfile>." .text .align 2 .global usage_1 .type usage_1, %function usage_1: .LFB6: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] mov w1, w0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf adrp x0, .LC1 add x1, x0, :lo12:.LC1 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl printf adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size usage_1, .-usage_1 .section .rodata .align 3 .LC9: .string "Enter any of the following commands after the prompt > :" .align 3 .LC10: .string "\ti <k> -- Insert <k> (an integer) as both key and value)." .align 3 .LC11: .string "\tf <k> -- Find the value under key <k>." .align 3 .LC12: .string "\tp <k> -- Print the path from the root to key k and its associated value." .align 3 .LC13: .string "\td <k> -- Delete key <k> and its associated value." .align 3 .LC14: .string "\tx -- Destroy the whole tree. Start again with an empty tree of the same order." .align 3 .LC15: .string "\tt -- Print the B+ tree." .align 3 .LC16: .string "\tl -- Print the keys of the leaves (bottom row of the tree)." .align 3 .LC17: .string "\tv -- Toggle output of pointer addresses (\"verbose\") in tree and leaves." .align 3 .LC18: .string "\tq -- Quit. (Or use Ctl-D.)" .align 3 .LC19: .string "\t? -- Print this help message." .text .align 2 .global usage_2 .type usage_2, %function usage_2: .LFB7: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts adrp x0, .LC10 add x0, x0, :lo12:.LC10 bl puts adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl puts adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl puts adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts adrp x0, .LC14 add x0, x0, :lo12:.LC14 bl puts adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl puts adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl puts adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl puts adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl puts adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl puts nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size usage_2, .-usage_2 .align 2 .global enqueue .type enqueue, %function enqueue: .LFB8: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] adrp x0, queue add x0, x0, :lo12:queue ldr x0, [x0] cmp x0, 0 bne .L4 adrp x0, queue add x0, x0, :lo12:queue ldr x1, [sp, 8] str x1, [x0] adrp x0, queue add x0, x0, :lo12:queue ldr x0, [x0] str xzr, [x0, 32] b .L8 .L4: adrp x0, queue add x0, x0, :lo12:queue ldr x0, [x0] str x0, [sp, 24] b .L6 .L7: ldr x0, [sp, 24] ldr x0, [x0, 32] str x0, [sp, 24] .L6: ldr x0, [sp, 24] ldr x0, [x0, 32] cmp x0, 0 bne .L7 ldr x0, [sp, 24] ldr x1, [sp, 8] str x1, [x0, 32] ldr x0, [sp, 8] str xzr, [x0, 32] .L8: nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size enqueue, .-enqueue .align 2 .global dequeue .type dequeue, %function dequeue: .LFB9: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 adrp x0, queue add x0, x0, :lo12:queue ldr x0, [x0] str x0, [sp, 8] adrp x0, queue add x0, x0, :lo12:queue ldr x0, [x0] ldr x1, [x0, 32] adrp x0, queue add x0, x0, :lo12:queue str x1, [x0] ldr x0, [sp, 8] str xzr, [x0, 32] ldr x0, [sp, 8] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size dequeue, .-dequeue .section .rodata .align 3 .LC20: .string "Empty tree." .align 3 .LC21: .string "%x " .align 3 .LC22: .string "%d " .align 3 .LC23: .string " | " .text .align 2 .global print_leaves .type print_leaves, %function print_leaves: .LFB10: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] str x0, [sp, 40] ldr x0, [sp, 24] cmp x0, 0 bne .L14 adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl puts b .L11 .L15: ldr x0, [sp, 40] ldr x0, [x0] ldr x0, [x0] str x0, [sp, 40] .L14: ldr x0, [sp, 40] ldrb w0, [x0, 24] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 bne .L15 .L23: str wzr, [sp, 36] b .L16 .L18: adrp x0, verbose_output add x0, x0, :lo12:verbose_output ldrb w0, [x0] cmp w0, 0 beq .L17 ldr x0, [sp, 40] ldr x1, [x0] ldrsw x0, [sp, 36] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] mov w1, w0 adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl printf .L17: ldr x0, [sp, 40] ldr x1, [x0, 8] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] mov w1, w0 adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl printf ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L16: ldr x0, [sp, 40] ldr w0, [x0, 28] ldr w1, [sp, 36] cmp w1, w0 blt .L18 adrp x0, verbose_output add x0, x0, :lo12:verbose_output ldrb w0, [x0] cmp w0, 0 beq .L19 ldr x0, [sp, 40] ldr x1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x0, x1, x0 ldr x0, [x0] mov w1, w0 adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl printf .L19: ldr x0, [sp, 40] ldr x1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x0, x1, x0 ldr x0, [x0] cmp x0, 0 beq .L24 adrp x0, .LC23 add x0, x0, :lo12:.LC23 bl printf ldr x0, [sp, 40] ldr x1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x0, x1, x0 ldr x0, [x0] str x0, [sp, 40] b .L23 .L24: nop mov w0, 10 bl putchar .L11: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size print_leaves, .-print_leaves .align 2 .global height .type height, %function height: .LFB11: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str wzr, [sp, 20] ldr x0, [sp, 8] str x0, [sp, 24] b .L26 .L27: ldr x0, [sp, 24] ldr x0, [x0] ldr x0, [x0] str x0, [sp, 24] ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L26: ldr x0, [sp, 24] ldrb w0, [x0, 24] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 bne .L27 ldr w0, [sp, 20] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size height, .-height .align 2 .global path_to_root .type path_to_root, %function path_to_root: .LFB12: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str x1, [sp] str wzr, [sp, 20] ldr x0, [sp] str x0, [sp, 24] b .L30 .L31: ldr x0, [sp, 24] ldr x0, [x0, 16] str x0, [sp, 24] ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L30: ldr x1, [sp, 24] ldr x0, [sp, 8] cmp x1, x0 bne .L31 ldr w0, [sp, 20] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size path_to_root, .-path_to_root .section .rodata .align 3 .LC24: .string "(%x)" .align 3 .LC25: .string "| " .text .align 2 .global print_tree .type print_tree, %function print_tree: .LFB13: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 24] str xzr, [sp, 56] str wzr, [sp, 40] str wzr, [sp, 44] str wzr, [sp, 48] str wzr, [sp, 52] ldr x0, [sp, 24] cmp x0, 0 bne .L34 adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl puts b .L33 .L34: adrp x0, queue add x0, x0, :lo12:queue str xzr, [x0] ldr x0, [sp, 24] bl enqueue b .L36 .L47: bl dequeue str x0, [sp, 56] ldr x0, [sp, 56] ldr x0, [x0, 16] cmp x0, 0 beq .L37 ldr x0, [sp, 56] ldr x0, [x0, 16] ldr x0, [x0] ldr x0, [x0] ldr x1, [sp, 56] cmp x1, x0 bne .L37 ldr x1, [sp, 56] ldr x0, [sp, 24] bl path_to_root str w0, [sp, 52] ldr w1, [sp, 52] ldr w0, [sp, 48] cmp w1, w0 beq .L37 ldr w0, [sp, 52] str w0, [sp, 48] mov w0, 10 bl putchar .L37: adrp x0, verbose_output add x0, x0, :lo12:verbose_output ldrb w0, [x0] cmp w0, 0 beq .L38 ldr x0, [sp, 56] mov w1, w0 adrp x0, .LC24 add x0, x0, :lo12:.LC24 bl printf .L38: str wzr, [sp, 40] b .L39 .L44: adrp x0, verbose_output add x0, x0, :lo12:verbose_output ldrb w0, [x0] cmp w0, 0 beq .L40 ldr x0, [sp, 56] ldr x1, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] mov w1, w0 adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl printf .L40: ldr x0, [sp, 56] ldr x1, [x0, 8] ldrsw x0, [sp, 40] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] mov w1, w0 adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl printf ldr x0, [sp, 56] ldrb w0, [x0, 24] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L41 str wzr, [sp, 44] b .L42 .L43: ldr x0, [sp, 56] ldr x1, [x0] ldrsw x0, [sp, 44] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] bl enqueue ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L42: ldr x0, [sp, 56] ldr w0, [x0, 28] ldr w1, [sp, 44] cmp w1, w0 ble .L43 .L41: ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L39: ldr x0, [sp, 56] ldr w0, [x0, 28] ldr w1, [sp, 40] cmp w1, w0 blt .L44 adrp x0, verbose_output add x0, x0, :lo12:verbose_output ldrb w0, [x0] cmp w0, 0 beq .L45 ldr x0, [sp, 56] ldrb w0, [x0, 24] cmp w0, 0 beq .L46 ldr x0, [sp, 56] ldr x1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x0, x1, x0 ldr x0, [x0] mov w1, w0 adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl printf b .L45 .L46: ldr x0, [sp, 56] ldr x1, [x0] ldr x0, [sp, 56] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] mov w1, w0 adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl printf .L45: adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl printf .L36: adrp x0, queue add x0, x0, :lo12:queue ldr x0, [x0] cmp x0, 0 bne .L47 mov w0, 10 bl putchar .L33: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size print_tree, .-print_tree .section .rodata .align 3 .LC26: .string "%d] " .align 3 .LC27: .string "%d ->\n" .align 3 .LC28: .string "Leaf [" .align 3 .LC29: .string "%d] ->\n" .text .align 2 .global find_leaf .type find_leaf, %function find_leaf: .LFB14: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] strb w2, [sp, 19] str wzr, [sp, 36] ldr x0, [sp, 24] str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L52 ldrb w0, [sp, 19] cmp w0, 0 beq .L50 adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl puts .L50: ldr x0, [sp, 40] b .L51 .L61: ldrb w0, [sp, 19] cmp w0, 0 beq .L53 mov w0, 91 bl putchar str wzr, [sp, 36] b .L54 .L55: ldr x0, [sp, 40] ldr x1, [x0, 8] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] mov w1, w0 adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl printf ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L54: ldr x0, [sp, 40] ldr w0, [x0, 28] sub w0, w0, #1 ldr w1, [sp, 36] cmp w1, w0 blt .L55 ldr x0, [sp, 40] ldr x1, [x0, 8] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] mov w1, w0 adrp x0, .LC26 add x0, x0, :lo12:.LC26 bl printf .L53: str wzr, [sp, 36] b .L56 .L59: ldr x0, [sp, 40] ldr x1, [x0, 8] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 20] cmp w1, w0 blt .L65 ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L56: ldr x0, [sp, 40] ldr w0, [x0, 28] ldr w1, [sp, 36] cmp w1, w0 blt .L59 b .L58 .L65: nop .L58: ldrb w0, [sp, 19] cmp w0, 0 beq .L60 ldr w1, [sp, 36] adrp x0, .LC27 add x0, x0, :lo12:.LC27 bl printf .L60: ldr x0, [sp, 40] ldr x1, [x0] ldrsw x0, [sp, 36] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] str x0, [sp, 40] .L52: ldr x0, [sp, 40] ldrb w0, [x0, 24] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 bne .L61 ldrb w0, [sp, 19] cmp w0, 0 beq .L62 adrp x0, .LC28 add x0, x0, :lo12:.LC28 bl printf str wzr, [sp, 36] b .L63 .L64: ldr x0, [sp, 40] ldr x1, [x0, 8] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] mov w1, w0 adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl printf ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L63: ldr x0, [sp, 40] ldr w0, [x0, 28] sub w0, w0, #1 ldr w1, [sp, 36] cmp w1, w0 blt .L64 ldr x0, [sp, 40] ldr x1, [x0, 8] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] mov w1, w0 adrp x0, .LC29 add x0, x0, :lo12:.LC29 bl printf .L62: ldr x0, [sp, 40] .L51: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE14: .size find_leaf, .-find_leaf .align 2 .global find .type find, %function find: .LFB15: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] strb w2, [sp, 19] str wzr, [sp, 36] ldrb w2, [sp, 19] ldr w1, [sp, 20] ldr x0, [sp, 24] bl find_leaf str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L67 mov x0, 0 b .L68 .L67: str wzr, [sp, 36] b .L69 .L72: ldr x0, [sp, 40] ldr x1, [x0, 8] ldrsw x0, [sp, 36] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 20] cmp w1, w0 beq .L74 ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L69: ldr x0, [sp, 40] ldr w0, [x0, 28] ldr w1, [sp, 36] cmp w1, w0 blt .L72 b .L71 .L74: nop .L71: ldr x0, [sp, 40] ldr w0, [x0, 28] ldr w1, [sp, 36] cmp w1, w0 bne .L73 mov x0, 0 b .L68 .L73: ldr x0, [sp, 40] ldr x1, [x0] ldrsw x0, [sp, 36] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] .L68: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE15: .size find, .-find .align 2 .global cut .type cut, %function cut: .LFB16: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] ldr w0, [sp, 12] and w0, w0, 1 cmp w0, 0 bne .L76 ldr w0, [sp, 12] lsr w1, w0, 31 add w0, w1, w0 asr w0, w0, 1 b .L77 .L76: ldr w0, [sp, 12] lsr w1, w0, 31 add w0, w1, w0 asr w0, w0, 1 add w0, w0, 1 .L77: add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE16: .size cut, .-cut .section .rodata .align 3 .LC30: .string "Record creation." .text .align 2 .global make_record .type make_record, %function make_record: .LFB17: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str w0, [sp, 28] mov x0, 4 bl malloc str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L79 adrp x0, .LC30 add x0, x0, :lo12:.LC30 bl perror mov w0, 1 bl exit .L79: ldr x0, [sp, 40] ldr w1, [sp, 28] str w1, [x0] ldr x0, [sp, 40] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE17: .size make_record, .-make_record .section .rodata .align 3 .LC31: .string "Node creation." .align 3 .LC32: .string "New node keys array." .align 3 .LC33: .string "New node pointers array." .text .align 2 .global make_node .type make_node, %function make_node: .LFB18: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov x0, 40 bl malloc str x0, [sp, 24] ldr x0, [sp, 24] cmp x0, 0 bne .L82 adrp x0, .LC31 add x0, x0, :lo12:.LC31 bl perror mov w0, 1 bl exit .L82: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 sxtw x0, w0 lsl x0, x0, 2 bl malloc mov x1, x0 ldr x0, [sp, 24] str x1, [x0, 8] ldr x0, [sp, 24] ldr x0, [x0, 8] cmp x0, 0 bne .L83 adrp x0, .LC32 add x0, x0, :lo12:.LC32 bl perror mov w0, 1 bl exit .L83: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 bl malloc mov x1, x0 ldr x0, [sp, 24] str x1, [x0] ldr x0, [sp, 24] ldr x0, [x0] cmp x0, 0 bne .L84 adrp x0, .LC33 add x0, x0, :lo12:.LC33 bl perror mov w0, 1 bl exit .L84: ldr x0, [sp, 24] strb wzr, [x0, 24] ldr x0, [sp, 24] str wzr, [x0, 28] ldr x0, [sp, 24] str xzr, [x0, 16] ldr x0, [sp, 24] str xzr, [x0, 32] ldr x0, [sp, 24] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE18: .size make_node, .-make_node .align 2 .global make_leaf .type make_leaf, %function make_leaf: .LFB19: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp bl make_node str x0, [sp, 24] ldr x0, [sp, 24] mov w1, 1 strb w1, [x0, 24] ldr x0, [sp, 24] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE19: .size make_leaf, .-make_leaf .align 2 .global get_left_index .type get_left_index, %function get_left_index: .LFB20: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str x1, [sp] str wzr, [sp, 28] b .L89 .L91: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L89: ldr x0, [sp, 8] ldr w0, [x0, 28] ldr w1, [sp, 28] cmp w1, w0 bgt .L90 ldr x0, [sp, 8] ldr x1, [x0] ldrsw x0, [sp, 28] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] ldr x1, [sp] cmp x1, x0 bne .L91 .L90: ldr w0, [sp, 28] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE20: .size get_left_index, .-get_left_index .align 2 .global insert_into_leaf .type insert_into_leaf, %function insert_into_leaf: .LFB21: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, 24] str w1, [sp, 20] str x2, [sp, 8] str wzr, [sp, 44] b .L94 .L96: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L94: ldr x0, [sp, 24] ldr w0, [x0, 28] ldr w1, [sp, 44] cmp w1, w0 bge .L95 ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 44] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 20] cmp w1, w0 bgt .L96 .L95: ldr x0, [sp, 24] ldr w0, [x0, 28] str w0, [sp, 40] b .L97 .L98: ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 40] lsl x0, x0, 2 sub x0, x0, #4 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0, 8] ldrsw x0, [sp, 40] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 sub x0, x0, #8 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr w0, [sp, 40] sub w0, w0, #1 str w0, [sp, 40] .L97: ldr w1, [sp, 40] ldr w0, [sp, 44] cmp w1, w0 bgt .L98 ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 44] lsl x0, x0, 2 add x0, x1, x0 ldr w1, [sp, 20] str w1, [x0] ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 44] lsl x0, x0, 3 add x0, x1, x0 ldr x1, [sp, 8] str x1, [x0] ldr x0, [sp, 24] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 24] str w1, [x0, 28] ldr x0, [sp, 24] add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE21: .size insert_into_leaf, .-insert_into_leaf .section .rodata .align 3 .LC34: .string "Temporary keys array." .align 3 .LC35: .string "Temporary pointers array." .text .align 2 .global insert_into_leaf_after_splitting .type insert_into_leaf_after_splitting, %function insert_into_leaf_after_splitting: .LFB22: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp str x0, [sp, 40] str x1, [sp, 32] str w2, [sp, 28] str x3, [sp, 16] bl make_leaf str x0, [sp, 72] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 2 bl malloc str x0, [sp, 80] ldr x0, [sp, 80] cmp x0, 0 bne .L101 adrp x0, .LC34 add x0, x0, :lo12:.LC34 bl perror mov w0, 1 bl exit .L101: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 bl malloc str x0, [sp, 88] ldr x0, [sp, 88] cmp x0, 0 bne .L102 adrp x0, .LC35 add x0, x0, :lo12:.LC35 bl perror mov w0, 1 bl exit .L102: str wzr, [sp, 52] b .L103 .L105: ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L103: ldr x0, [sp, 32] ldr x1, [x0, 8] ldrsw x0, [sp, 52] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 28] cmp w1, w0 ble .L104 adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 ldr w1, [sp, 52] cmp w1, w0 blt .L105 .L104: str wzr, [sp, 56] str wzr, [sp, 60] b .L106 .L108: ldr w1, [sp, 60] ldr w0, [sp, 52] cmp w1, w0 bne .L107 ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 60] .L107: ldr x0, [sp, 32] ldr x1, [x0, 8] ldrsw x0, [sp, 56] lsl x0, x0, 2 add x1, x1, x0 ldrsw x0, [sp, 60] lsl x0, x0, 2 ldr x2, [sp, 80] add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 32] ldr x1, [x0] ldrsw x0, [sp, 56] lsl x0, x0, 3 add x1, x1, x0 ldrsw x0, [sp, 60] lsl x0, x0, 3 ldr x2, [sp, 88] add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 56] ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 60] .L106: ldr x0, [sp, 32] ldr w0, [x0, 28] ldr w1, [sp, 56] cmp w1, w0 blt .L108 ldrsw x0, [sp, 52] lsl x0, x0, 2 ldr x1, [sp, 80] add x0, x1, x0 ldr w1, [sp, 28] str w1, [x0] ldrsw x0, [sp, 52] lsl x0, x0, 3 ldr x1, [sp, 88] add x0, x1, x0 ldr x1, [sp, 16] str x1, [x0] ldr x0, [sp, 32] str wzr, [x0, 28] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 bl cut str w0, [sp, 64] str wzr, [sp, 56] b .L109 .L110: ldrsw x0, [sp, 56] lsl x0, x0, 3 ldr x1, [sp, 88] add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0] ldrsw x0, [sp, 56] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldrsw x0, [sp, 56] lsl x0, x0, 2 ldr x1, [sp, 80] add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0, 8] ldrsw x0, [sp, 56] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 32] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 32] str w1, [x0, 28] ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 56] .L109: ldr w1, [sp, 56] ldr w0, [sp, 64] cmp w1, w0 blt .L110 ldr w0, [sp, 64] str w0, [sp, 56] str wzr, [sp, 60] b .L111 .L112: ldrsw x0, [sp, 56] lsl x0, x0, 3 ldr x1, [sp, 88] add x1, x1, x0 ldr x0, [sp, 72] ldr x2, [x0] ldrsw x0, [sp, 60] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldrsw x0, [sp, 56] lsl x0, x0, 2 ldr x1, [sp, 80] add x1, x1, x0 ldr x0, [sp, 72] ldr x2, [x0, 8] ldrsw x0, [sp, 60] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 72] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 72] str w1, [x0, 28] ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 56] ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 60] .L111: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] ldr w1, [sp, 56] cmp w1, w0 blt .L112 ldr x0, [sp, 88] bl free ldr x0, [sp, 80] bl free ldr x0, [sp, 32] ldr x1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x1, x1, x0 ldr x0, [sp, 72] ldr x2, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr x0, [sp, 32] ldr x1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x0, x1, x0 ldr x1, [sp, 72] str x1, [x0] ldr x0, [sp, 32] ldr w0, [x0, 28] str w0, [sp, 56] b .L113 .L114: ldr x0, [sp, 32] ldr x1, [x0] ldrsw x0, [sp, 56] lsl x0, x0, 3 add x0, x1, x0 str xzr, [x0] ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 56] .L113: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 ldr w1, [sp, 56] cmp w1, w0 blt .L114 ldr x0, [sp, 72] ldr w0, [x0, 28] str w0, [sp, 56] b .L115 .L116: ldr x0, [sp, 72] ldr x1, [x0] ldrsw x0, [sp, 56] lsl x0, x0, 3 add x0, x1, x0 str xzr, [x0] ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 56] .L115: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 ldr w1, [sp, 56] cmp w1, w0 blt .L116 ldr x0, [sp, 32] ldr x1, [x0, 16] ldr x0, [sp, 72] str x1, [x0, 16] ldr x0, [sp, 72] ldr x0, [x0, 8] ldr w0, [x0] str w0, [sp, 68] ldr x3, [sp, 72] ldr w2, [sp, 68] ldr x1, [sp, 32] ldr x0, [sp, 40] bl insert_into_parent ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE22: .size insert_into_leaf_after_splitting, .-insert_into_leaf_after_splitting .align 2 .global insert_into_node .type insert_into_node, %function insert_into_node: .LFB23: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, 24] str x1, [sp, 16] str w2, [sp, 12] str w3, [sp, 8] str x4, [sp] ldr x0, [sp, 16] ldr w0, [x0, 28] str w0, [sp, 44] b .L119 .L120: ldr x0, [sp, 16] ldr x1, [x0] ldrsw x0, [sp, 44] lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 16] ldr x2, [x0] ldrsw x0, [sp, 44] add x0, x0, 1 lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr x0, [sp, 16] ldr x1, [x0, 8] ldrsw x0, [sp, 44] lsl x0, x0, 2 sub x0, x0, #4 add x1, x1, x0 ldr x0, [sp, 16] ldr x2, [x0, 8] ldrsw x0, [sp, 44] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] .L119: ldr w1, [sp, 44] ldr w0, [sp, 12] cmp w1, w0 bgt .L120 ldr x0, [sp, 16] ldr x1, [x0] ldrsw x0, [sp, 12] add x0, x0, 1 lsl x0, x0, 3 add x0, x1, x0 ldr x1, [sp] str x1, [x0] ldr x0, [sp, 16] ldr x1, [x0, 8] ldrsw x0, [sp, 12] lsl x0, x0, 2 add x0, x1, x0 ldr w1, [sp, 8] str w1, [x0] ldr x0, [sp, 16] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 16] str w1, [x0, 28] ldr x0, [sp, 24] add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size insert_into_node, .-insert_into_node .section .rodata .align 3 .LC36: .string "Temporary pointers array for splitting nodes." .align 3 .LC37: .string "Temporary keys array for splitting nodes." .text .align 2 .global insert_into_node_after_splitting .type insert_into_node_after_splitting, %function insert_into_node_after_splitting: .LFB24: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp str x0, [sp, 40] str x1, [sp, 32] str w2, [sp, 28] str w3, [sp, 24] str x4, [sp, 16] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 3 bl malloc str x0, [sp, 64] ldr x0, [sp, 64] cmp x0, 0 bne .L123 adrp x0, .LC36 add x0, x0, :lo12:.LC36 bl perror mov w0, 1 bl exit .L123: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 2 bl malloc str x0, [sp, 72] ldr x0, [sp, 72] cmp x0, 0 bne .L124 adrp x0, .LC37 add x0, x0, :lo12:.LC37 bl perror mov w0, 1 bl exit .L124: str wzr, [sp, 48] str wzr, [sp, 52] b .L125 .L127: ldr w0, [sp, 28] add w0, w0, 1 ldr w1, [sp, 52] cmp w1, w0 bne .L126 ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L126: ldr x0, [sp, 32] ldr x1, [x0] ldrsw x0, [sp, 48] lsl x0, x0, 3 add x1, x1, x0 ldrsw x0, [sp, 52] lsl x0, x0, 3 ldr x2, [sp, 64] add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L125: ldr x0, [sp, 32] ldr w0, [x0, 28] ldr w1, [sp, 48] cmp w1, w0 ble .L127 str wzr, [sp, 48] str wzr, [sp, 52] b .L128 .L130: ldr w1, [sp, 52] ldr w0, [sp, 28] cmp w1, w0 bne .L129 ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L129: ldr x0, [sp, 32] ldr x1, [x0, 8] ldrsw x0, [sp, 48] lsl x0, x0, 2 add x1, x1, x0 ldrsw x0, [sp, 52] lsl x0, x0, 2 ldr x2, [sp, 72] add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L128: ldr x0, [sp, 32] ldr w0, [x0, 28] ldr w1, [sp, 48] cmp w1, w0 blt .L130 ldrsw x0, [sp, 28] add x0, x0, 1 lsl x0, x0, 3 ldr x1, [sp, 64] add x0, x1, x0 ldr x1, [sp, 16] str x1, [x0] ldrsw x0, [sp, 28] lsl x0, x0, 2 ldr x1, [sp, 72] add x0, x1, x0 ldr w1, [sp, 24] str w1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] bl cut str w0, [sp, 56] bl make_node str x0, [sp, 80] ldr x0, [sp, 32] str wzr, [x0, 28] str wzr, [sp, 48] b .L131 .L132: ldrsw x0, [sp, 48] lsl x0, x0, 3 ldr x1, [sp, 64] add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0] ldrsw x0, [sp, 48] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldrsw x0, [sp, 48] lsl x0, x0, 2 ldr x1, [sp, 72] add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0, 8] ldrsw x0, [sp, 48] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 32] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 32] str w1, [x0, 28] ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L131: ldr w0, [sp, 56] sub w0, w0, #1 ldr w1, [sp, 48] cmp w1, w0 blt .L132 ldrsw x0, [sp, 48] lsl x0, x0, 3 ldr x1, [sp, 64] add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0] ldrsw x0, [sp, 48] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldrsw x0, [sp, 56] lsl x0, x0, 2 sub x0, x0, #4 ldr x1, [sp, 72] add x0, x1, x0 ldr w0, [x0] str w0, [sp, 60] ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] str wzr, [sp, 52] b .L133 .L134: ldrsw x0, [sp, 48] lsl x0, x0, 3 ldr x1, [sp, 64] add x1, x1, x0 ldr x0, [sp, 80] ldr x2, [x0] ldrsw x0, [sp, 52] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldrsw x0, [sp, 48] lsl x0, x0, 2 ldr x1, [sp, 72] add x1, x1, x0 ldr x0, [sp, 80] ldr x2, [x0, 8] ldrsw x0, [sp, 52] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 80] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 80] str w1, [x0, 28] ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L133: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] ldr w1, [sp, 48] cmp w1, w0 blt .L134 ldrsw x0, [sp, 48] lsl x0, x0, 3 ldr x1, [sp, 64] add x1, x1, x0 ldr x0, [sp, 80] ldr x2, [x0] ldrsw x0, [sp, 52] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr x0, [sp, 64] bl free ldr x0, [sp, 72] bl free ldr x0, [sp, 32] ldr x1, [x0, 16] ldr x0, [sp, 80] str x1, [x0, 16] str wzr, [sp, 48] b .L135 .L136: ldr x0, [sp, 80] ldr x1, [x0] ldrsw x0, [sp, 48] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] str x0, [sp, 88] ldr x0, [sp, 88] ldr x1, [sp, 80] str x1, [x0, 16] ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L135: ldr x0, [sp, 80] ldr w0, [x0, 28] ldr w1, [sp, 48] cmp w1, w0 ble .L136 ldr x3, [sp, 80] ldr w2, [sp, 60] ldr x1, [sp, 32] ldr x0, [sp, 40] bl insert_into_parent ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE24: .size insert_into_node_after_splitting, .-insert_into_node_after_splitting .align 2 .global insert_into_parent .type insert_into_parent, %function insert_into_parent: .LFB25: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str x1, [sp, 32] str w2, [sp, 28] str x3, [sp, 16] ldr x0, [sp, 32] ldr x0, [x0, 16] str x0, [sp, 56] ldr x0, [sp, 56] cmp x0, 0 bne .L139 ldr x2, [sp, 16] ldr w1, [sp, 28] ldr x0, [sp, 32] bl insert_into_new_root b .L140 .L139: ldr x1, [sp, 32] ldr x0, [sp, 56] bl get_left_index str w0, [sp, 52] ldr x0, [sp, 56] ldr w1, [x0, 28] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 cmp w1, w0 bge .L141 ldr x4, [sp, 16] ldr w3, [sp, 28] ldr w2, [sp, 52] ldr x1, [sp, 56] ldr x0, [sp, 40] bl insert_into_node b .L140 .L141: ldr x4, [sp, 16] ldr w3, [sp, 28] ldr w2, [sp, 52] ldr x1, [sp, 56] ldr x0, [sp, 40] bl insert_into_node_after_splitting .L140: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE25: .size insert_into_parent, .-insert_into_parent .align 2 .global insert_into_new_root .type insert_into_new_root, %function insert_into_new_root: .LFB26: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] bl make_node str x0, [sp, 56] ldr x0, [sp, 56] ldr x0, [x0, 8] ldr w1, [sp, 36] str w1, [x0] ldr x0, [sp, 56] ldr x0, [x0] ldr x1, [sp, 40] str x1, [x0] ldr x0, [sp, 56] ldr x0, [x0] add x0, x0, 8 ldr x1, [sp, 24] str x1, [x0] ldr x0, [sp, 56] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 56] str w1, [x0, 28] ldr x0, [sp, 56] str xzr, [x0, 16] ldr x0, [sp, 40] ldr x1, [sp, 56] str x1, [x0, 16] ldr x0, [sp, 24] ldr x1, [sp, 56] str x1, [x0, 16] ldr x0, [sp, 56] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE26: .size insert_into_new_root, .-insert_into_new_root .align 2 .global start_new_tree .type start_new_tree, %function start_new_tree: .LFB27: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] bl make_leaf str x0, [sp, 40] ldr x0, [sp, 40] ldr x0, [x0, 8] ldr w1, [sp, 28] str w1, [x0] ldr x0, [sp, 40] ldr x0, [x0] ldr x1, [sp, 16] str x1, [x0] ldr x0, [sp, 40] ldr x1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x0, x1, x0 str xzr, [x0] ldr x0, [sp, 40] str xzr, [x0, 16] ldr x0, [sp, 40] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 40] str w1, [x0, 28] ldr x0, [sp, 40] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE27: .size start_new_tree, .-start_new_tree .align 2 .global insert .type insert, %function insert: .LFB28: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] str w2, [sp, 16] mov w2, 0 ldr w1, [sp, 20] ldr x0, [sp, 24] bl find cmp x0, 0 beq .L147 ldr x0, [sp, 24] b .L148 .L147: ldr w0, [sp, 16] bl make_record str x0, [sp, 32] ldr x0, [sp, 24] cmp x0, 0 bne .L149 ldr x1, [sp, 32] ldr w0, [sp, 20] bl start_new_tree b .L148 .L149: mov w2, 0 ldr w1, [sp, 20] ldr x0, [sp, 24] bl find_leaf str x0, [sp, 40] ldr x0, [sp, 40] ldr w1, [x0, 28] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 cmp w1, w0 bge .L150 ldr x2, [sp, 32] ldr w1, [sp, 20] ldr x0, [sp, 40] bl insert_into_leaf str x0, [sp, 40] ldr x0, [sp, 24] b .L148 .L150: ldr x3, [sp, 32] ldr w2, [sp, 20] ldr x1, [sp, 40] ldr x0, [sp, 24] bl insert_into_leaf_after_splitting .L148: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE28: .size insert, .-insert .section .rodata .align 3 .LC38: .string "Search for nonexistent pointer to node in parent." .align 3 .LC39: .string "Node: %#x\n" .text .align 2 .global get_neighbor_index .type get_neighbor_index, %function get_neighbor_index: .LFB29: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str wzr, [sp, 44] b .L152 .L155: ldr x0, [sp, 24] ldr x0, [x0, 16] ldr x1, [x0] ldrsw x0, [sp, 44] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] ldr x1, [sp, 24] cmp x1, x0 bne .L153 ldr w0, [sp, 44] sub w0, w0, #1 b .L156 .L153: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L152: ldr x0, [sp, 24] ldr x0, [x0, 16] ldr w0, [x0, 28] ldr w1, [sp, 44] cmp w1, w0 ble .L155 adrp x0, .LC38 add x0, x0, :lo12:.LC38 bl puts ldr x0, [sp, 24] mov w1, w0 adrp x0, .LC39 add x0, x0, :lo12:.LC39 bl printf mov w0, 1 bl exit .L156: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE29: .size get_neighbor_index, .-get_neighbor_index .align 2 .global remove_entry_from_node .type remove_entry_from_node, %function remove_entry_from_node: .LFB30: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, 24] str w1, [sp, 20] str x2, [sp, 8] str wzr, [sp, 40] b .L158 .L159: ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L158: ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 40] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 20] cmp w1, w0 bne .L159 ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] b .L160 .L161: ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 40] lsl x0, x0, 2 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0, 8] ldrsw x0, [sp, 40] lsl x0, x0, 2 sub x0, x0, #4 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L160: ldr x0, [sp, 24] ldr w0, [x0, 28] ldr w1, [sp, 40] cmp w1, w0 blt .L161 ldr x0, [sp, 24] ldrb w0, [x0, 24] cmp w0, 0 beq .L162 ldr x0, [sp, 24] ldr w0, [x0, 28] b .L163 .L162: ldr x0, [sp, 24] ldr w0, [x0, 28] add w0, w0, 1 .L163: str w0, [sp, 44] str wzr, [sp, 40] b .L164 .L165: ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L164: ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] ldr x1, [sp, 8] cmp x1, x0 bne .L165 ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] b .L166 .L167: ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 sub x0, x0, #8 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L166: ldr w1, [sp, 40] ldr w0, [sp, 44] cmp w1, w0 blt .L167 ldr x0, [sp, 24] ldr w0, [x0, 28] sub w1, w0, #1 ldr x0, [sp, 24] str w1, [x0, 28] ldr x0, [sp, 24] ldrb w0, [x0, 24] cmp w0, 0 beq .L168 ldr x0, [sp, 24] ldr w0, [x0, 28] str w0, [sp, 40] b .L169 .L170: ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 add x0, x1, x0 str xzr, [x0] ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L169: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 ldr w1, [sp, 40] cmp w1, w0 blt .L170 b .L171 .L168: ldr x0, [sp, 24] ldr w0, [x0, 28] add w0, w0, 1 str w0, [sp, 40] b .L172 .L173: ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 add x0, x1, x0 str xzr, [x0] ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L172: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] ldr w1, [sp, 40] cmp w1, w0 blt .L173 .L171: ldr x0, [sp, 24] add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE30: .size remove_entry_from_node, .-remove_entry_from_node .align 2 .global adjust_root .type adjust_root, %function adjust_root: .LFB31: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] ldr w0, [x0, 28] cmp w0, 0 ble .L176 ldr x0, [sp, 24] b .L177 .L176: ldr x0, [sp, 24] ldrb w0, [x0, 24] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L178 ldr x0, [sp, 24] ldr x0, [x0] ldr x0, [x0] str x0, [sp, 40] ldr x0, [sp, 40] str xzr, [x0, 16] b .L179 .L178: str xzr, [sp, 40] .L179: ldr x0, [sp, 24] ldr x0, [x0, 8] bl free ldr x0, [sp, 24] ldr x0, [x0] bl free ldr x0, [sp, 24] bl free ldr x0, [sp, 40] .L177: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE31: .size adjust_root, .-adjust_root .align 2 .global coalesce_nodes .type coalesce_nodes, %function coalesce_nodes: .LFB32: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp str x0, [sp, 40] str x1, [sp, 32] str x2, [sp, 24] str w3, [sp, 20] str w4, [sp, 16] ldr w0, [sp, 20] cmn w0, #1 bne .L181 ldr x0, [sp, 32] str x0, [sp, 88] ldr x0, [sp, 24] str x0, [sp, 32] ldr x0, [sp, 88] str x0, [sp, 24] .L181: ldr x0, [sp, 24] ldr w0, [x0, 28] str w0, [sp, 84] strb wzr, [sp, 63] ldr x0, [sp, 32] ldrb w0, [x0, 24] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L182 ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 84] lsl x0, x0, 2 add x0, x1, x0 ldr w1, [sp, 16] str w1, [x0] ldr x0, [sp, 24] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 24] str w1, [x0, 28] ldr x0, [sp, 32] ldr w0, [x0, 28] str w0, [sp, 76] str wzr, [sp, 72] ldr x0, [sp, 32] ldr w1, [x0, 28] ldr x0, [sp, 24] ldr w0, [x0, 28] add w1, w1, w0 adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] cmp w1, w0 blt .L183 mov w0, 1 strb w0, [sp, 63] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] bl cut sub w0, w0, #2 str w0, [sp, 76] .L183: ldr w0, [sp, 84] add w0, w0, 1 str w0, [sp, 64] str wzr, [sp, 68] b .L184 .L185: ldr x0, [sp, 32] ldr x1, [x0, 8] ldrsw x0, [sp, 68] lsl x0, x0, 2 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0, 8] ldrsw x0, [sp, 64] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 32] ldr x1, [x0] ldrsw x0, [sp, 68] lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr x0, [sp, 24] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 24] str w1, [x0, 28] ldr x0, [sp, 32] ldr w0, [x0, 28] sub w1, w0, #1 ldr x0, [sp, 32] str w1, [x0, 28] ldr w0, [sp, 72] add w0, w0, 1 str w0, [sp, 72] ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] ldr w0, [sp, 68] add w0, w0, 1 str w0, [sp, 68] .L184: ldr w1, [sp, 68] ldr w0, [sp, 76] cmp w1, w0 blt .L185 ldr x0, [sp, 32] ldr x1, [x0] ldrsw x0, [sp, 68] lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldrb w0, [sp, 63] cmp w0, 0 beq .L186 ldr x0, [sp, 32] ldr x1, [x0, 8] ldrsw x0, [sp, 72] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] str w0, [sp, 80] str wzr, [sp, 64] ldr w0, [sp, 72] add w0, w0, 1 str w0, [sp, 68] b .L187 .L188: ldr x0, [sp, 32] ldr x1, [x0, 8] ldrsw x0, [sp, 68] lsl x0, x0, 2 add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0, 8] ldrsw x0, [sp, 64] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 32] ldr x1, [x0] ldrsw x0, [sp, 68] lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] ldr w0, [sp, 68] add w0, w0, 1 str w0, [sp, 68] .L187: ldr x0, [sp, 32] ldr w0, [x0, 28] ldr w1, [sp, 64] cmp w1, w0 blt .L188 ldr x0, [sp, 32] ldr x1, [x0] ldrsw x0, [sp, 68] lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr x0, [sp, 32] ldr w0, [x0, 28] sub w1, w0, #1 ldr x0, [sp, 32] str w1, [x0, 28] .L186: str wzr, [sp, 64] b .L189 .L190: ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] str x0, [sp, 88] ldr x0, [sp, 88] ldr x1, [sp, 24] str x1, [x0, 16] ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] .L189: ldr x0, [sp, 24] ldr w0, [x0, 28] ldr w1, [sp, 64] cmp w1, w0 ble .L190 b .L191 .L182: ldr w0, [sp, 84] str w0, [sp, 64] str wzr, [sp, 68] b .L192 .L193: ldr x0, [sp, 32] ldr x1, [x0, 8] ldrsw x0, [sp, 68] lsl x0, x0, 2 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0, 8] ldrsw x0, [sp, 64] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 32] ldr x1, [x0] ldrsw x0, [sp, 68] lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr x0, [sp, 24] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 24] str w1, [x0, 28] ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] ldr w0, [sp, 68] add w0, w0, 1 str w0, [sp, 68] .L192: ldr x0, [sp, 32] ldr w0, [x0, 28] ldr w1, [sp, 68] cmp w1, w0 blt .L193 ldr x0, [sp, 32] ldr x1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x0, x2, x0 ldr x1, [x1] str x1, [x0] .L191: ldrb w0, [sp, 63] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L194 ldr x0, [sp, 32] ldr x0, [x0, 16] ldr x3, [sp, 32] ldr w2, [sp, 16] mov x1, x0 ldr x0, [sp, 40] bl delete_entry str x0, [sp, 40] ldr x0, [sp, 32] ldr x0, [x0, 8] bl free ldr x0, [sp, 32] ldr x0, [x0] bl free ldr x0, [sp, 32] bl free b .L195 .L194: str wzr, [sp, 64] b .L196 .L198: ldr x0, [sp, 32] ldr x0, [x0, 16] ldr x1, [x0] ldrsw x0, [sp, 64] add x0, x0, 1 lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] ldr x1, [sp, 32] cmp x1, x0 bne .L197 ldr x0, [sp, 32] ldr x0, [x0, 16] ldr x1, [x0, 8] ldrsw x0, [sp, 64] lsl x0, x0, 2 add x0, x1, x0 ldr w1, [sp, 80] str w1, [x0] b .L195 .L197: ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] .L196: ldr x0, [sp, 32] ldr x0, [x0, 16] ldr w0, [x0, 28] ldr w1, [sp, 64] cmp w1, w0 blt .L198 .L195: ldr x0, [sp, 40] ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE32: .size coalesce_nodes, .-coalesce_nodes .align 2 .global redistribute_nodes .type redistribute_nodes, %function redistribute_nodes: .LFB33: .cfi_startproc sub sp, sp, #64 .cfi_def_cfa_offset 64 str x0, [sp, 40] str x1, [sp, 32] str x2, [sp, 24] str w3, [sp, 20] str w4, [sp, 16] str w5, [sp, 12] ldr w0, [sp, 20] cmn w0, #1 beq .L201 ldr x0, [sp, 32] ldrb w0, [x0, 24] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L202 ldr x0, [sp, 32] ldr x1, [x0] ldr x0, [sp, 32] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0] ldr x0, [sp, 32] ldr w0, [x0, 28] sxtw x0, w0 add x0, x0, 1 lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] .L202: ldr x0, [sp, 32] ldr w0, [x0, 28] str w0, [sp, 52] b .L203 .L204: ldr x0, [sp, 32] ldr x1, [x0, 8] ldrsw x0, [sp, 52] lsl x0, x0, 2 sub x0, x0, #4 add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0, 8] ldrsw x0, [sp, 52] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 32] ldr x1, [x0] ldrsw x0, [sp, 52] lsl x0, x0, 3 sub x0, x0, #8 add x1, x1, x0 ldr x0, [sp, 32] ldr x2, [x0] ldrsw x0, [sp, 52] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr w0, [sp, 52] sub w0, w0, #1 str w0, [sp, 52] .L203: ldr w0, [sp, 52] cmp w0, 0 bgt .L204 ldr x0, [sp, 32] ldrb w0, [x0, 24] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L205 ldr x0, [sp, 24] ldr x1, [x0] ldr x0, [sp, 24] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 32] ldr x0, [x0] ldr x1, [x1] str x1, [x0] ldr x0, [sp, 32] ldr x0, [x0] ldr x0, [x0] str x0, [sp, 56] ldr x0, [sp, 56] ldr x1, [sp, 32] str x1, [x0, 16] ldr x0, [sp, 24] ldr x1, [x0] ldr x0, [sp, 24] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 3 add x0, x1, x0 str xzr, [x0] ldr x0, [sp, 32] ldr x0, [x0, 8] ldr w1, [sp, 12] str w1, [x0] ldr x0, [sp, 24] ldr x1, [x0, 8] ldr x0, [sp, 24] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 2 sub x0, x0, #4 add x1, x1, x0 ldr x0, [sp, 32] ldr x0, [x0, 16] ldr x2, [x0, 8] ldrsw x0, [sp, 16] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] b .L206 .L205: ldr x0, [sp, 24] ldr x1, [x0] ldr x0, [sp, 24] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x1, x1, x0 ldr x0, [sp, 32] ldr x0, [x0] ldr x1, [x1] str x1, [x0] ldr x0, [sp, 24] ldr x1, [x0] ldr x0, [sp, 24] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 3 sub x0, x0, #8 add x0, x1, x0 str xzr, [x0] ldr x0, [sp, 24] ldr x1, [x0, 8] ldr x0, [sp, 24] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 2 sub x0, x0, #4 add x1, x1, x0 ldr x0, [sp, 32] ldr x0, [x0, 8] ldr w1, [x1] str w1, [x0] ldr x0, [sp, 32] ldr x1, [x0, 8] ldr x0, [sp, 32] ldr x0, [x0, 16] ldr x2, [x0, 8] ldrsw x0, [sp, 16] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] b .L206 .L201: ldr x0, [sp, 24] ldr x1, [x0, 8] ldr x0, [sp, 32] ldr x2, [x0, 8] ldr x0, [sp, 32] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 32] ldrb w0, [x0, 24] cmp w0, 0 beq .L207 ldr x0, [sp, 24] ldr x1, [x0] ldr x0, [sp, 32] ldr x2, [x0] ldr x0, [sp, 32] ldr w0, [x0, 28] sxtw x0, w0 lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] b .L208 .L207: ldr x0, [sp, 24] ldr x1, [x0] ldr x0, [sp, 32] ldr x2, [x0] ldr x0, [sp, 32] ldr w0, [x0, 28] sxtw x0, w0 add x0, x0, 1 lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr x0, [sp, 32] ldr x1, [x0] ldr x0, [sp, 32] ldr w0, [x0, 28] sxtw x0, w0 add x0, x0, 1 lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] str x0, [sp, 56] ldr x0, [sp, 56] ldr x1, [sp, 32] str x1, [x0, 16] .L208: str wzr, [sp, 52] b .L209 .L210: ldr x0, [sp, 24] ldr x1, [x0, 8] ldrsw x0, [sp, 52] add x0, x0, 1 lsl x0, x0, 2 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0, 8] ldrsw x0, [sp, 52] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 52] add x0, x0, 1 lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0] ldrsw x0, [sp, 52] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L209: ldr x0, [sp, 24] ldr w0, [x0, 28] ldr w1, [sp, 52] cmp w1, w0 blt .L210 ldr x0, [sp, 32] ldrb w0, [x0, 24] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L211 ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 52] add x0, x0, 1 lsl x0, x0, 3 add x1, x1, x0 ldr x0, [sp, 24] ldr x2, [x0] ldrsw x0, [sp, 52] lsl x0, x0, 3 add x0, x2, x0 ldr x1, [x1] str x1, [x0] .L211: ldr x0, [sp, 24] ldr x1, [x0, 8] ldr x0, [sp, 32] ldr x0, [x0, 16] ldr x2, [x0, 8] ldrsw x0, [sp, 16] lsl x0, x0, 2 add x0, x2, x0 ldr w1, [x1] str w1, [x0] .L206: ldr x0, [sp, 32] ldr w0, [x0, 28] add w1, w0, 1 ldr x0, [sp, 32] str w1, [x0, 28] ldr x0, [sp, 24] ldr w0, [x0, 28] sub w1, w0, #1 ldr x0, [sp, 24] str w1, [x0, 28] ldr x0, [sp, 40] add sp, sp, 64 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE33: .size redistribute_nodes, .-redistribute_nodes .align 2 .global delete_entry .type delete_entry, %function delete_entry: .LFB34: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 40] str x1, [sp, 32] str w2, [sp, 28] str x3, [sp, 16] ldr x2, [sp, 16] ldr w1, [sp, 28] ldr x0, [sp, 32] bl remove_entry_from_node str x0, [sp, 32] ldr x1, [sp, 32] ldr x0, [sp, 40] cmp x1, x0 bne .L214 ldr x0, [sp, 40] bl adjust_root b .L215 .L214: ldr x0, [sp, 32] ldrb w0, [x0, 24] cmp w0, 0 beq .L216 adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 bl cut b .L217 .L216: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] bl cut sub w0, w0, #1 .L217: str w0, [sp, 52] ldr x0, [sp, 32] ldr w0, [x0, 28] ldr w1, [sp, 52] cmp w1, w0 bgt .L218 ldr x0, [sp, 40] b .L215 .L218: ldr x0, [sp, 32] bl get_neighbor_index str w0, [sp, 56] ldr w0, [sp, 56] cmn w0, #1 beq .L219 ldr w0, [sp, 56] b .L220 .L219: mov w0, 0 .L220: str w0, [sp, 60] ldr x0, [sp, 32] ldr x0, [x0, 16] ldr x1, [x0, 8] ldrsw x0, [sp, 60] lsl x0, x0, 2 add x0, x1, x0 ldr w0, [x0] str w0, [sp, 64] ldr w0, [sp, 56] cmn w0, #1 bne .L221 ldr x0, [sp, 32] ldr x0, [x0, 16] ldr x0, [x0] ldr x0, [x0, 8] b .L222 .L221: ldr x0, [sp, 32] ldr x0, [x0, 16] ldr x1, [x0] ldrsw x0, [sp, 56] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] .L222: str x0, [sp, 72] ldr x0, [sp, 32] ldrb w0, [x0, 24] cmp w0, 0 beq .L223 adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] b .L224 .L223: adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] sub w0, w0, #1 .L224: str w0, [sp, 68] ldr x0, [sp, 72] ldr w1, [x0, 28] ldr x0, [sp, 32] ldr w0, [x0, 28] add w0, w1, w0 ldr w1, [sp, 68] cmp w1, w0 ble .L225 ldr w4, [sp, 64] ldr w3, [sp, 56] ldr x2, [sp, 72] ldr x1, [sp, 32] ldr x0, [sp, 40] bl coalesce_nodes b .L215 .L225: ldr w5, [sp, 64] ldr w4, [sp, 60] ldr w3, [sp, 56] ldr x2, [sp, 72] ldr x1, [sp, 32] ldr x0, [sp, 40] bl redistribute_nodes .L215: ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE34: .size delete_entry, .-delete_entry .align 2 .global delete .type delete, %function delete: .LFB35: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] mov w2, 0 ldr w1, [sp, 20] ldr x0, [sp, 24] bl find str x0, [sp, 32] mov w2, 0 ldr w1, [sp, 20] ldr x0, [sp, 24] bl find_leaf str x0, [sp, 40] ldr x0, [sp, 32] cmp x0, 0 beq .L227 ldr x0, [sp, 40] cmp x0, 0 beq .L227 ldr x0, [sp, 32] bl free ldr x3, [sp, 32] ldr w2, [sp, 20] ldr x1, [sp, 40] ldr x0, [sp, 24] bl delete_entry str x0, [sp, 24] .L227: ldr x0, [sp, 24] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE35: .size delete, .-delete .align 2 .global destroy_tree_nodes .type destroy_tree_nodes, %function destroy_tree_nodes: .LFB36: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] ldrb w0, [x0, 24] cmp w0, 0 beq .L230 str wzr, [sp, 44] b .L231 .L232: ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 44] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] bl free ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L231: ldr x0, [sp, 24] ldr w0, [x0, 28] ldr w1, [sp, 44] cmp w1, w0 blt .L232 b .L233 .L230: str wzr, [sp, 44] b .L234 .L235: ldr x0, [sp, 24] ldr x1, [x0] ldrsw x0, [sp, 44] lsl x0, x0, 3 add x0, x1, x0 ldr x0, [x0] bl destroy_tree_nodes ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L234: ldr x0, [sp, 24] ldr w0, [x0, 28] ldr w1, [sp, 44] cmp w1, w0 ble .L235 .L233: ldr x0, [sp, 24] ldr x0, [x0] bl free ldr x0, [sp, 24] ldr x0, [x0, 8] bl free ldr x0, [sp, 24] bl free nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE36: .size destroy_tree_nodes, .-destroy_tree_nodes .align 2 .global destroy_tree .type destroy_tree, %function destroy_tree: .LFB37: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] bl destroy_tree_nodes mov x0, 0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE37: .size destroy_tree, .-destroy_tree .section .rodata .align 3 .LC40: .string "r" .align 3 .LC41: .string "Failure to open input file." .align 3 .LC42: .string "%d\n" .align 3 .LC43: .string "> " .align 3 .LC44: .string "%d" .align 3 .LC45: .string "Record not found under key %d.\n" .align 3 .LC46: .string "Record at %x -- key %d, value %d.\n" .align 3 .LC47: .string "%c" .text .align 2 .global main .type main, %function main: .LFB38: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 bl usage_1 bl usage_2 str xzr, [sp, 40] adrp x0, verbose_output add x0, x0, :lo12:verbose_output strb wzr, [x0] adrp x0, order add x0, x0, :lo12:order mov w1, 4 str w1, [x0] ldr w0, [sp, 28] cmp w0, 1 ble .L239 ldr x0, [sp, 16] add x0, x0, 8 ldr x0, [x0] bl atoi mov w1, w0 adrp x0, order add x0, x0, :lo12:order str w1, [x0] adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] cmp w0, 2 ble .L240 adrp x0, order add x0, x0, :lo12:order ldr w0, [x0] cmp w0, 20 ble .L239 .L240: mov w0, 1 bl exit .L239: ldr w0, [sp, 28] cmp w0, 2 ble .L241 ldr x0, [sp, 16] ldr x0, [x0, 16] str x0, [sp, 48] adrp x0, .LC40 add x1, x0, :lo12:.LC40 ldr x0, [sp, 48] bl fopen str x0, [sp, 56] ldr x0, [sp, 56] cmp x0, 0 bne .L243 adrp x0, .LC41 add x0, x0, :lo12:.LC41 bl perror mov w0, 1 bl exit .L244: add x0, sp, 36 mov x2, x0 adrp x0, .LC42 add x1, x0, :lo12:.LC42 ldr x0, [sp, 56] bl __isoc99_fscanf ldr w0, [sp, 36] ldr w1, [sp, 36] mov w2, w1 mov w1, w0 ldr x0, [sp, 40] bl insert str x0, [sp, 40] .L243: ldr x0, [sp, 56] bl feof cmp w0, 0 beq .L244 ldr x0, [sp, 56] bl fclose ldr x0, [sp, 40] bl print_tree .L241: adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl printf b .L245 .L267: ldrb w0, [sp, 35] cmp w0, 120 beq .L270 cmp w0, 120 bgt .L247 cmp w0, 118 beq .L271 cmp w0, 118 bgt .L247 cmp w0, 116 beq .L272 cmp w0, 116 bgt .L247 cmp w0, 113 beq .L273 cmp w0, 113 bgt .L247 cmp w0, 112 beq .L251 cmp w0, 112 bgt .L247 cmp w0, 108 beq .L274 cmp w0, 108 bgt .L247 cmp w0, 105 beq .L253 cmp w0, 105 bgt .L247 cmp w0, 100 beq .L254 cmp w0, 102 beq .L251 b .L247 .L253: add x0, sp, 36 mov x1, x0 adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl __isoc99_scanf nop .L255: bl getchar cmp w0, 10 bne .L255 ldr w0, [sp, 36] ldr w1, [sp, 36] mov w2, w1 mov w1, w0 ldr x0, [sp, 40] bl insert str x0, [sp, 40] ldr x0, [sp, 40] bl print_tree b .L256 .L251: add x0, sp, 36 mov x1, x0 adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl __isoc99_scanf nop .L257: bl getchar cmp w0, 10 bne .L257 ldr w1, [sp, 36] ldrb w0, [sp, 35] cmp w0, 112 cset w0, eq and w0, w0, 255 mov w2, w0 ldr x0, [sp, 40] bl find str x0, [sp, 64] ldr x0, [sp, 64] cmp x0, 0 bne .L258 ldr w0, [sp, 36] mov w1, w0 adrp x0, .LC45 add x0, x0, :lo12:.LC45 bl printf b .L256 .L258: ldr x0, [sp, 64] mov w4, w0 ldr w1, [sp, 36] ldr x0, [sp, 64] ldr w0, [x0] mov w3, w0 mov w2, w1 mov w1, w4 adrp x0, .LC46 add x0, x0, :lo12:.LC46 bl printf b .L256 .L254: add x0, sp, 36 mov x1, x0 adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl __isoc99_scanf nop .L260: bl getchar cmp w0, 10 bne .L260 ldr w0, [sp, 36] mov w1, w0 ldr x0, [sp, 40] bl delete str x0, [sp, 40] ldr x0, [sp, 40] bl print_tree b .L256 .L270: nop .L261: bl getchar cmp w0, 10 bne .L261 ldr x0, [sp, 40] bl destroy_tree str x0, [sp, 40] ldr x0, [sp, 40] bl print_tree b .L256 .L274: nop .L262: bl getchar cmp w0, 10 bne .L262 ldr x0, [sp, 40] bl print_leaves b .L256 .L272: nop .L263: bl getchar cmp w0, 10 bne .L263 ldr x0, [sp, 40] bl print_tree b .L256 .L271: nop .L264: bl getchar cmp w0, 10 bne .L264 adrp x0, verbose_output add x0, x0, :lo12:verbose_output ldrb w0, [x0] cmp w0, 0 cset w0, ne and w0, w0, 255 eor w0, w0, 1 and w0, w0, 255 and w0, w0, 1 and w1, w0, 255 adrp x0, verbose_output add x0, x0, :lo12:verbose_output strb w1, [x0] b .L256 .L273: nop .L265: bl getchar cmp w0, 10 bne .L265 mov w0, 0 b .L268 .L247: bl usage_2 nop .L256: adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl printf .L245: add x0, sp, 35 mov x1, x0 adrp x0, .LC47 add x0, x0, :lo12:.LC47 bl __isoc99_scanf cmn w0, #1 bne .L267 mov w0, 10 bl putchar mov w0, 0 .L268: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 72] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L269 bl __stack_chk_fail .L269: mov w0, w1 ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE38: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global pause .type pause, %function pause: .LFB6: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 152] mov x1, 0 add x0, sp, 24 bl sigfillset add x0, sp, 24 mov x2, 0 mov x1, 0 bl sigtimedwait str w0, [sp, 20] ldr w0, [sp, 20] mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 152] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L3 bl __stack_chk_fail .L3: mov w0, w1 ldp x29, x30, [sp], 160 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size pause, .-pause ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "You've got it!" .text .align 2 .global fuzzme .type fuzzme, %function fuzzme: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] bl strlen cmp x0, 2 bls .L2 ldr x0, [sp, 24] ldrb w0, [x0] cmp w0, 98 bne .L2 ldr x0, [sp, 24] add x0, x0, 1 ldrb w0, [x0] cmp w0, 117 bne .L2 ldr x0, [sp, 24] add x0, x0, 2 ldrb w0, [x0] cmp w0, 103 bne .L2 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf bl abort .L2: mov w0, 0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size fuzzme, .-fuzzme .section .rodata .align 3 .LC1: .string "Must supply a text file\n" .align 3 .LC2: .string "r" .align 3 .LC3: .string "Could not open %s\n" .align 3 .LC4: .string "Could not read from %s\n" .text .align 2 .global main .type main, %function main: .LFB1: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 ldr w0, [sp, 28] cmp w0, 2 beq .L5 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] mov x3, x0 mov x2, 24 mov x1, 1 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl fwrite mov w0, -1 b .L9 .L5: ldr x0, [sp, 16] add x0, x0, 8 ldr x2, [x0] adrp x0, .LC2 add x1, x0, :lo12:.LC2 mov x0, x2 bl fopen str x0, [sp, 32] ldr x0, [sp, 32] cmp x0, 0 bne .L7 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldr x0, [sp, 16] add x0, x0, 8 ldr x0, [x0] mov x2, x0 adrp x0, .LC3 add x1, x0, :lo12:.LC3 mov x0, x3 bl fprintf mov w0, -1 b .L9 .L7: add x0, sp, 40 ldr x2, [sp, 32] mov w1, 12 bl fgets cmp x0, 0 bne .L8 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldr x0, [sp, 16] add x0, x0, 8 ldr x0, [x0] mov x2, x0 adrp x0, .LC4 add x1, x0, :lo12:.LC4 mov x0, x3 bl fprintf mov w0, -1 b .L9 .L8: add x0, sp, 40 bl fuzzme mov w0, 0 .L9: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L10 bl __stack_chk_fail .L10: mov w0, w1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global PKEY_Image_Copyright .section .rodata .align 3 .type PKEY_Image_Copyright, %object .size PKEY_Image_Copyright, 24 PKEY_Image_Copyright: .xword 347610529 .hword 309 .hword 19761 .ascii "\226\331l\277\311g\032\231" .zero 4 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .local tc .comm tc,4,4 .local x .comm x,4,4 .local y .comm y,4,4 .local res .comm res,4,4 .section .rodata .align 3 .LC0: .string "%d" .align 3 .LC1: .string "%d %d" .align 3 .LC2: .string "No Number" .align 3 .LC3: .string "%d\n" .text .align 2 .global main .type main, %function main: .LFB6: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, tc add x1, x0, :lo12:tc adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf b .L2 .L6: adrp x0, y add x2, x0, :lo12:y adrp x0, x add x1, x0, :lo12:x adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf adrp x0, res add x0, x0, :lo12:res mov w1, -1 str w1, [x0] adrp x0, x add x0, x0, :lo12:x ldr w1, [x0] adrp x0, y add x0, x0, :lo12:y ldr w0, [x0] cmp w1, w0 bne .L3 adrp x0, x add x0, x0, :lo12:x ldr w0, [x0] lsl w1, w0, 1 adrp x0, res add x0, x0, :lo12:res str w1, [x0] adrp x0, x add x0, x0, :lo12:x ldr w0, [x0] and w0, w0, 1 cmp w0, 0 beq .L3 adrp x0, res add x0, x0, :lo12:res ldr w0, [x0] sub w1, w0, #1 adrp x0, res add x0, x0, :lo12:res str w1, [x0] .L3: adrp x0, x add x0, x0, :lo12:x ldr w0, [x0] sub w1, w0, #2 adrp x0, y add x0, x0, :lo12:y ldr w0, [x0] cmp w1, w0 bne .L4 adrp x0, x add x0, x0, :lo12:x ldr w1, [x0] adrp x0, y add x0, x0, :lo12:y ldr w0, [x0] add w1, w1, w0 adrp x0, res add x0, x0, :lo12:res str w1, [x0] adrp x0, x add x0, x0, :lo12:x ldr w0, [x0] and w0, w0, 1 cmp w0, 0 beq .L4 adrp x0, res add x0, x0, :lo12:res ldr w0, [x0] sub w1, w0, #1 adrp x0, res add x0, x0, :lo12:res str w1, [x0] .L4: adrp x0, res add x0, x0, :lo12:res ldr w0, [x0] cmn w0, #1 bne .L5 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts b .L2 .L5: adrp x0, res add x0, x0, :lo12:res ldr w0, [x0] mov w1, w0 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl printf .L2: adrp x0, tc add x0, x0, :lo12:tc ldr w0, [x0] sub w2, w0, #1 adrp x1, tc add x1, x1, :lo12:tc str w2, [x1] cmp w0, 0 bne .L6 mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .type set_size, %object .size set_size, 8 set_size: .xword 136 .align 3 .type object_size, %object .size object_size, 8 object_size: .xword 4 .global set .section .data.rel.local,"aw" .align 3 .type set, %object .size set, 8 set: .xword set_size .global object .align 3 .type object, %object .size object, 8 object: .xword object_size .section .rodata .align 3 .LC0: .string "program.c" .align 3 .LC1: .string "p" .text .align 2 .global new .type new, %function new: .LFB6: .cfi_startproc stp x29, x30, [sp, -240]! .cfi_def_cfa_offset 240 .cfi_offset 29, -240 .cfi_offset 30, -232 mov x29, sp str x0, [sp, 24] str x1, [sp, 184] str x2, [sp, 192] str x3, [sp, 200] str x4, [sp, 208] str x5, [sp, 216] str x6, [sp, 224] str x7, [sp, 232] str q0, [sp, 48] str q1, [sp, 64] str q2, [sp, 80] str q3, [sp, 96] str q4, [sp, 112] str q5, [sp, 128] str q6, [sp, 144] str q7, [sp, 160] ldr x0, [sp, 24] ldr x0, [x0] str x0, [sp, 32] ldr x1, [sp, 32] mov x0, 1 bl calloc str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L2 adrp x0, __PRETTY_FUNCTION__.0 add x3, x0, :lo12:__PRETTY_FUNCTION__.0 mov w2, 86 adrp x0, .LC0 add x1, x0, :lo12:.LC0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __assert_fail .L2: ldr x0, [sp, 40] ldp x29, x30, [sp], 240 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size new, .-new .align 2 .global delete .type delete, %function delete: .LFB7: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] bl free nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size delete, .-delete .align 2 .global add .type add, %function add: .LFB8: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, 8] str x1, [sp] ldr x0, [sp, 8] str x0, [sp, 32] ldr x0, [sp] str x0, [sp, 40] strb wzr, [sp, 27] str wzr, [sp, 28] b .L6 .L9: ldr x0, [sp, 32] ldr w1, [sp, 28] ldr x0, [x0, x1, lsl 3] ldr x1, [sp, 40] cmp x1, x0 bne .L7 mov w0, 1 strb w0, [sp, 27] .L7: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L6: ldr x0, [sp, 32] ldr w0, [x0, 128] ldr w1, [sp, 28] cmp w1, w0 bcs .L8 ldrb w0, [sp, 27] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 bne .L9 .L8: ldrb w0, [sp, 27] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L10 ldr x0, [sp, 32] ldr w0, [x0, 128] cmp w0, 15 bhi .L11 ldr x0, [sp, 32] ldr w1, [x0, 128] ldr x0, [sp, 32] uxtw x1, w1 ldr x2, [sp, 40] str x2, [x0, x1, lsl 3] ldr x0, [sp, 32] ldr w0, [x0, 128] add w1, w0, 1 ldr x0, [sp, 32] str w1, [x0, 128] b .L10 .L11: mov x0, 0 b .L12 .L10: ldr x0, [sp, 40] .L12: add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size add, .-add .align 2 .global find .type find, %function find: .LFB9: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, 8] str x1, [sp] ldr x0, [sp, 8] str x0, [sp, 32] ldr x0, [sp] str x0, [sp, 40] strb wzr, [sp, 27] str wzr, [sp, 28] b .L14 .L16: ldr x0, [sp, 32] ldr w1, [sp, 28] ldr x0, [x0, x1, lsl 3] ldr x1, [sp, 40] cmp x1, x0 bne .L15 mov w0, 1 strb w0, [sp, 27] .L15: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L14: ldr x0, [sp, 32] ldr w0, [x0, 128] ldr w1, [sp, 28] cmp w1, w0 bcc .L16 ldrb w0, [sp, 27] cmp w0, 0 beq .L17 ldr x0, [sp, 40] b .L18 .L17: mov x0, 0 .L18: add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size find, .-find .align 2 .global drop .type drop, %function drop: .LFB10: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] ldr x0, [sp, 24] str x0, [sp, 48] ldr x1, [sp, 16] ldr x0, [sp, 48] bl find str x0, [sp, 56] str wzr, [sp, 44] strb wzr, [sp, 43] ldr x0, [sp, 56] cmp x0, 0 bne .L22 mov x0, 0 b .L21 .L25: ldr x0, [sp, 48] ldr w1, [sp, 44] ldr x0, [x0, x1, lsl 3] ldr x1, [sp, 56] cmp x1, x0 bne .L23 mov w0, 1 strb w0, [sp, 43] b .L22 .L23: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L22: ldr x0, [sp, 48] ldr w0, [x0, 128] ldr w1, [sp, 44] cmp w1, w0 bcs .L24 ldrb w0, [sp, 43] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 bne .L25 .L24: ldr x0, [sp, 48] ldr w0, [x0, 128] sub w1, w0, #1 ldr x0, [sp, 48] str w1, [x0, 128] ldr x0, [sp, 48] ldr w1, [x0, 128] ldr x0, [sp, 48] uxtw x1, w1 ldr x2, [x0, x1, lsl 3] ldr x0, [sp, 48] ldr w1, [sp, 44] str x2, [x0, x1, lsl 3] ldr x0, [sp, 48] ldr w1, [x0, 128] ldr x0, [sp, 48] uxtw x1, w1 str xzr, [x0, x1, lsl 3] ldr x0, [sp, 56] .L21: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size drop, .-drop .align 2 .global count .type count, %function count: .LFB11: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] ldr x0, [sp, 8] str x0, [sp, 24] ldr x0, [sp, 24] ldr w0, [x0, 128] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size count, .-count .align 2 .global differ .type differ, %function differ: .LFB12: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] str x1, [sp] ldr x1, [sp, 8] ldr x0, [sp] cmp x1, x0 cset w0, ne and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size differ, .-differ .align 2 .global contains .type contains, %function contains: .LFB13: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] ldr x1, [sp, 16] ldr x0, [sp, 24] bl find cmp x0, 0 cset w0, ne and w0, w0, 255 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size contains, .-contains .section .rodata .align 3 .LC2: .string "%p\n" .text .align 2 .global store .type store, %function store: .LFB14: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] ldr x0, [sp, 24] str x0, [sp, 40] ldr x2, [sp, 40] adrp x0, .LC2 add x1, x0, :lo12:.LC2 ldr x0, [sp, 16] bl fprintf ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE14: .size store, .-store .align 2 .global storev .type storev, %function storev: .LFB15: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -48 str x0, [sp, 40] mov x19, x1 ldr x0, [sp, 40] str x0, [sp, 48] ldr w1, [x19, 24] ldr x0, [x19] cmp w1, 0 blt .L35 add x1, x0, 15 and x1, x1, -8 str x1, [x19] b .L36 .L35: add w2, w1, 8 str w2, [x19, 24] ldr w2, [x19, 24] cmp w2, 0 ble .L37 add x1, x0, 15 and x1, x1, -8 str x1, [x19] b .L36 .L37: ldr x2, [x19, 8] sxtw x0, w1 add x0, x2, x0 .L36: ldr x0, [x0] str x0, [sp, 56] ldr x2, [sp, 48] adrp x0, .LC2 add x1, x0, :lo12:.LC2 ldr x0, [sp, 56] bl fprintf ldr x19, [sp, 16] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE15: .size storev, .-storev .align 2 .global apply .type apply, %function apply: .LFB16: .cfi_startproc stp x29, x30, [sp, -304]! .cfi_def_cfa_offset 304 .cfi_offset 29, -304 .cfi_offset 30, -296 mov x29, sp str x0, [sp, 56] str x1, [sp, 48] str x2, [sp, 256] str x3, [sp, 264] str x4, [sp, 272] str x5, [sp, 280] str x6, [sp, 288] str x7, [sp, 296] str q0, [sp, 128] str q1, [sp, 144] str q2, [sp, 160] str q3, [sp, 176] str q4, [sp, 192] str q5, [sp, 208] str q6, [sp, 224] str q7, [sp, 240] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 120] mov x1, 0 ldr x0, [sp, 56] str x0, [sp, 80] str wzr, [sp, 76] add x0, sp, 304 str x0, [sp, 88] add x0, sp, 304 str x0, [sp, 96] add x0, sp, 256 str x0, [sp, 104] mov w0, -48 str w0, [sp, 112] mov w0, -128 str w0, [sp, 116] b .L41 .L42: add x0, sp, 304 str x0, [sp, 88] add x0, sp, 304 str x0, [sp, 96] add x0, sp, 256 str x0, [sp, 104] mov w0, -48 str w0, [sp, 112] mov w0, -128 str w0, [sp, 116] ldr x0, [sp, 80] ldr w1, [sp, 76] ldr x3, [x0, x1, lsl 3] add x0, sp, 16 add x1, sp, 88 ldp q0, q1, [x1] stp q0, q1, [x0] add x0, sp, 16 ldr x2, [sp, 48] mov x1, x0 mov x0, x3 blr x2 ldr w0, [sp, 76] add w0, w0, 1 str w0, [sp, 76] .L41: ldr x0, [sp, 80] ldr w0, [x0, 128] ldr w1, [sp, 76] cmp w1, w0 bcc .L42 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 120] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L44 bl __stack_chk_fail .L44: mov w0, w1 ldp x29, x30, [sp], 304 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE16: .size apply, .-apply .section .rodata .align 3 .type __PRETTY_FUNCTION__.0, %object .size __PRETTY_FUNCTION__.0, 4 __PRETTY_FUNCTION__.0: .string "new" ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global strstr .type strstr, %function strstr: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] ldr x0, [sp, 16] add x1, x0, 1 str x1, [sp, 16] ldrb w0, [x0] strb w0, [sp, 38] ldrb w0, [sp, 38] cmp w0, 0 beq .L2 ldr x0, [sp, 16] bl strlen str x0, [sp, 40] .L5: ldr x0, [sp, 24] add x1, x0, 1 str x1, [sp, 24] ldrb w0, [x0] strb w0, [sp, 39] ldrb w0, [sp, 39] cmp w0, 0 bne .L3 mov x0, 0 b .L4 .L3: ldrb w1, [sp, 39] ldrb w0, [sp, 38] cmp w1, w0 bne .L5 ldr x2, [sp, 40] ldr x1, [sp, 16] ldr x0, [sp, 24] bl strncmp cmp w0, 0 bne .L5 ldr x0, [sp, 24] sub x0, x0, #1 str x0, [sp, 24] .L2: ldr x0, [sp, 24] .L4: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size strstr, .-strstr ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global Pods_ParseChatVersionString .section .rodata .align 3 .type Pods_ParseChatVersionString, %object .size Pods_ParseChatVersionString, 44 Pods_ParseChatVersionString: .string "@(#)PROGRAM:Pods_ParseChat PROJECT:Pods-1\n" .global Pods_ParseChatVersionNumber .align 3 .type Pods_ParseChatVersionNumber, %object .size Pods_ParseChatVersionNumber, 8 Pods_ParseChatVersionNumber: .word 0 .word 1072693248 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%d\n" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov w0, 1 bl factorial str w0, [sp, 28] ldr w1, [sp, 28] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, 5 bl factorial str w0, [sp, 28] ldr w1, [sp, 28] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, 10 bl factorial str w0, [sp, 28] ldr w1, [sp, 28] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, -1024 bl factorial str w0, [sp, 28] ldr w1, [sp, 28] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, 0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global __extenddftf2 .global __unordtf2 .global __getf2 .align 2 .global foo .type foo, %function foo: .LFB0: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -64 str d0, [sp, 72] str q1, [sp, 48] ldr d0, [sp, 72] bl __extenddftf2 mov w19, 1 str q0, [sp, 32] mov v1.16b, v0.16b ldr q0, [sp, 48] bl __unordtf2 cmp w0, 0 bne .L2 ldr q1, [sp, 32] ldr q0, [sp, 48] bl __getf2 cmp w0, 0 bge .L2 mov w19, 0 .L2: and w0, w19, 255 eor w0, w0, 1 and w0, w0, 255 ldr x19, [sp, 16] ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size foo, .-foo ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .local procid .comm procid,8,8 .align 2 .type sleep_ms, %function sleep_ms: .LFB34: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] mov w1, w0 mov w0, 1000 mul w0, w1, w0 bl usleep nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE34: .size sleep_ms, .-sleep_ms .align 2 .type current_time_ms, %function current_time_ms: .LFB35: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 add x0, sp, 24 mov x1, x0 mov w0, 1 bl clock_gettime cmp w0, 0 beq .L3 mov w0, 1 bl exit .L3: ldr x0, [sp, 24] mov x1, x0 mov x0, x1 lsl x0, x0, 5 sub x0, x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 32] mov x2, x0 mov x0, 13531 movk x0, 0xd7b6, lsl 16 movk x0, 0xde82, lsl 32 movk x0, 0x431b, lsl 48 umulh x0, x2, x0 lsr x0, x0, 18 add x0, x1, x0 mov x1, x0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 40] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L5 bl __stack_chk_fail .L5: mov x0, x1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE35: .size current_time_ms, .-current_time_ms .align 2 .type thread_start, %function thread_start: .LFB36: .cfi_startproc stp x29, x30, [sp, -128]! .cfi_def_cfa_offset 128 .cfi_offset 29, -128 .cfi_offset 30, -120 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 120] mov x1, 0 add x0, sp, 56 bl pthread_attr_init add x0, sp, 56 mov x1, 131072 bl pthread_attr_setstacksize str wzr, [sp, 44] b .L7 .L13: add x1, sp, 56 add x0, sp, 48 ldr x3, [sp, 16] ldr x2, [sp, 24] bl pthread_create cmp w0, 0 bne .L8 add x0, sp, 56 bl pthread_attr_destroy nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 120] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L14 b .L15 .L8: bl __errno_location ldr w0, [x0] cmp w0, 11 bne .L16 mov w0, 50 bl usleep nop ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L7: ldr w0, [sp, 44] cmp w0, 99 ble .L13 b .L12 .L16: nop .L12: mov w0, 1 bl exit .L15: bl __stack_chk_fail .L14: ldp x29, x30, [sp], 128 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE36: .size thread_start, .-thread_start .align 2 .type event_init, %function event_init: .LFB37: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] str wzr, [x0] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE37: .size event_init, .-event_init .align 2 .type event_reset, %function event_reset: .LFB38: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] str wzr, [x0] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE38: .size event_reset, .-event_reset .align 2 .type event_set, %function event_set: .LFB39: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] ldr w0, [x0] cmp w0, 0 beq .L20 mov w0, 1 bl exit .L20: ldr x0, [sp, 24] mov w1, 1 stlr w1, [x0] ldr x0, [sp, 24] mov w3, 16960 movk w3, 0xf, lsl 16 mov w2, 129 mov x1, x0 mov x0, 98 bl syscall nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE39: .size event_set, .-event_set .align 2 .type event_wait, %function event_wait: .LFB40: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] b .L22 .L23: ldr x0, [sp, 24] mov w4, 0 mov w3, 0 mov w2, 128 mov x1, x0 mov x0, 98 bl syscall .L22: ldr x0, [sp, 24] ldar w0, [x0] cmp w0, 0 beq .L23 nop nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE40: .size event_wait, .-event_wait .align 2 .type event_isset, %function event_isset: .LFB41: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] ldar w0, [x0] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size event_isset, .-event_isset .align 2 .type event_timedwait, %function event_timedwait: .LFB42: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 bl current_time_ms str x0, [sp, 40] ldr x0, [sp, 40] str x0, [sp, 32] .L30: ldr x1, [sp, 40] ldr x0, [sp, 32] sub x0, x1, x0 ldr x1, [sp, 16] add x0, x1, x0 str x0, [sp, 48] ldr x0, [sp, 48] lsr x1, x0, 3 mov x0, 63439 movk x0, 0xe353, lsl 16 movk x0, 0x9ba5, lsl 32 movk x0, 0x20c4, lsl 48 umulh x0, x1, x0 lsr x0, x0, 4 str x0, [sp, 56] ldr x2, [sp, 48] lsr x1, x2, 3 mov x0, 63439 movk x0, 0xe353, lsl 16 movk x0, 0x9ba5, lsl 32 movk x0, 0x20c4, lsl 48 umulh x0, x1, x0 lsr x1, x0, 4 mov x0, x1 lsl x0, x0, 5 sub x0, x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 sub x1, x2, x0 mov x0, 16960 movk x0, 0xf, lsl 16 mul x0, x1, x0 str x0, [sp, 64] ldr x0, [sp, 24] add x1, sp, 56 mov x4, x1 mov w3, 0 mov w2, 128 mov x1, x0 mov x0, 98 bl syscall ldr x0, [sp, 24] ldar w0, [x0] cmp w0, 0 beq .L27 mov w0, 1 b .L31 .L27: bl current_time_ms str x0, [sp, 32] ldr x1, [sp, 32] ldr x0, [sp, 40] sub x0, x1, x0 ldr x1, [sp, 16] cmp x1, x0 bcs .L30 mov w0, 0 .L31: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 72] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L32 bl __stack_chk_fail .L32: mov w0, w1 ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE42: .size event_timedwait, .-event_timedwait .align 2 .type write_file, %function write_file: .LFB43: .cfi_startproc sub sp, sp, #1328 .cfi_def_cfa_offset 1328 stp x29, x30, [sp] .cfi_offset 29, -1328 .cfi_offset 30, -1320 mov x29, sp str x0, [sp, 56] str x1, [sp, 48] str x2, [sp, 1280] str x3, [sp, 1288] str x4, [sp, 1296] str x5, [sp, 1304] str x6, [sp, 1312] str x7, [sp, 1320] add x0, sp, 1024 str q0, [x0, 128] add x0, sp, 1024 str q1, [x0, 144] add x0, sp, 1024 str q2, [x0, 160] add x0, sp, 1024 str q3, [x0, 176] add x0, sp, 1024 str q4, [x0, 192] add x0, sp, 1024 str q5, [x0, 208] add x0, sp, 1024 str q6, [x0, 224] add x0, sp, 1024 str q7, [x0, 240] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1144] mov x1, 0 add x0, sp, 1328 str x0, [sp, 88] add x0, sp, 1328 str x0, [sp, 96] add x0, sp, 1280 str x0, [sp, 104] mov w0, -48 str w0, [sp, 112] mov w0, -128 str w0, [sp, 116] add x0, sp, 16 add x1, sp, 88 ldp q0, q1, [x1] stp q0, q1, [x0] add x1, sp, 16 add x0, sp, 120 mov x3, x1 ldr x2, [sp, 48] mov x1, 1024 bl vsnprintf strb wzr, [sp, 1143] add x0, sp, 120 bl strlen str w0, [sp, 76] mov w1, 1 movk w1, 0x8, lsl 16 ldr x0, [sp, 56] bl open str w0, [sp, 80] ldr w0, [sp, 80] cmn w0, #1 bne .L34 mov w0, 0 b .L37 .L34: ldrsw x1, [sp, 76] add x0, sp, 120 mov x2, x1 mov x1, x0 ldr w0, [sp, 80] bl write mov x1, x0 ldrsw x0, [sp, 76] cmp x1, x0 beq .L36 bl __errno_location ldr w0, [x0] str w0, [sp, 84] ldr w0, [sp, 80] bl close bl __errno_location mov x1, x0 ldr w0, [sp, 84] str w0, [x1] mov w0, 0 b .L37 .L36: ldr w0, [sp, 80] bl close mov w0, 1 .L37: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 1144] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L38 bl __stack_chk_fail .L38: mov w0, w1 ldp x29, x30, [sp] add sp, sp, 1328 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE43: .size write_file, .-write_file .local nlmsg .comm nlmsg,1104,8 .align 2 .type netlink_init, %function netlink_init: .LFB44: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str w2, [sp, 32] str x3, [sp, 24] str w4, [sp, 20] mov x2, 1104 mov w1, 0 ldr x0, [sp, 40] bl memset ldr x0, [sp, 40] add x0, x0, 80 str x0, [sp, 56] ldr w0, [sp, 36] and w1, w0, 65535 ldr x0, [sp, 56] strh w1, [x0, 4] ldr w0, [sp, 32] sxth w1, w0 mov w0, 5 orr w0, w1, w0 sxth w0, w0 and w1, w0, 65535 ldr x0, [sp, 56] strh w1, [x0, 6] ldr x0, [sp, 56] add x0, x0, 16 ldrsw x1, [sp, 20] mov x2, x1 ldr x1, [sp, 24] bl memcpy ldr w0, [sp, 20] add w0, w0, 3 uxtw x0, w0 and x0, x0, 4294967292 add x0, x0, 16 ldr x1, [sp, 56] add x1, x1, x0 ldr x0, [sp, 40] str x1, [x0] nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE44: .size netlink_init, .-netlink_init .align 2 .type netlink_attr, %function netlink_attr: .LFB45: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str w3, [sp, 32] ldr x0, [sp, 40] ldr x0, [x0] str x0, [sp, 56] ldr w0, [sp, 32] and w0, w0, 65535 add w0, w0, 4 and w1, w0, 65535 ldr x0, [sp, 56] strh w1, [x0] ldr w0, [sp, 36] and w1, w0, 65535 ldr x0, [sp, 56] strh w1, [x0, 2] ldr x0, [sp, 56] add x0, x0, 4 ldrsw x1, [sp, 32] mov x2, x1 ldr x1, [sp, 24] bl memcpy ldr x0, [sp, 40] ldr x1, [x0] ldr x0, [sp, 56] ldrh w0, [x0] add w0, w0, 3 uxtw x0, w0 and x0, x0, 4294967292 add x1, x1, x0 ldr x0, [sp, 40] str x1, [x0] nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE45: .size netlink_attr, .-netlink_attr .align 2 .type netlink_nest, %function netlink_nest: .LFB46: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] ldr x0, [sp, 8] ldr x0, [x0] str x0, [sp, 24] ldr w0, [sp, 4] and w1, w0, 65535 ldr x0, [sp, 24] strh w1, [x0, 2] ldr x0, [sp, 8] ldr x0, [x0] add x1, x0, 4 ldr x0, [sp, 8] str x1, [x0] ldr x0, [sp, 8] ldr w0, [x0, 8] add w2, w0, 1 ldr x1, [sp, 8] str w2, [x1, 8] ldr x1, [sp, 8] sxtw x0, w0 add x0, x0, 2 ldr x2, [sp, 24] str x2, [x1, x0, lsl 3] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE46: .size netlink_nest, .-netlink_nest .align 2 .type netlink_done, %function netlink_done: .LFB47: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] ldr x0, [sp, 8] ldr w0, [x0, 8] sub w1, w0, #1 ldr x0, [sp, 8] str w1, [x0, 8] ldr x0, [sp, 8] ldr w1, [x0, 8] ldr x0, [sp, 8] sxtw x1, w1 add x1, x1, 2 ldr x0, [x0, x1, lsl 3] str x0, [sp, 24] ldr x0, [sp, 8] ldr x1, [x0] ldr x0, [sp, 24] sub x0, x1, x0 and w1, w0, 65535 ldr x0, [sp, 24] strh w1, [x0] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE47: .size netlink_done, .-netlink_done .align 2 .type netlink_send_ext, %function netlink_send_ext: .LFB48: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] strh w2, [sp, 34] str x3, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 88] mov x1, 0 ldr x0, [sp, 40] ldr x1, [x0] ldr x0, [sp, 40] add x0, x0, 80 add x0, x0, 1024 cmp x1, x0 bhi .L44 ldr x0, [sp, 40] ldr w0, [x0, 8] cmp w0, 0 beq .L45 .L44: mov w0, 1 bl exit .L45: ldr x0, [sp, 40] add x0, x0, 80 str x0, [sp, 64] ldr x0, [sp, 40] ldr x1, [x0] ldr x0, [sp, 40] add x0, x0, 80 sub x0, x1, x0 mov w1, w0 ldr x0, [sp, 64] str w1, [x0] add x0, sp, 72 mov x2, 12 mov w1, 0 bl memset mov w0, 16 strh w0, [sp, 72] ldr x0, [sp, 40] add x1, x0, 80 ldr x0, [sp, 64] ldr w0, [x0] uxtw x0, w0 add x2, sp, 72 mov w5, 12 mov x4, x2 mov w3, 0 mov x2, x0 ldr w0, [sp, 36] bl sendto str w0, [sp, 60] ldr x0, [sp, 64] ldr w0, [x0] ldr w1, [sp, 60] cmp w1, w0 beq .L46 mov w0, 1 bl exit .L46: ldr x0, [sp, 40] add x0, x0, 80 mov w3, 0 mov x2, 1024 mov x1, x0 ldr w0, [sp, 36] bl recv str w0, [sp, 60] ldr x0, [sp, 64] ldrh w0, [x0, 4] cmp w0, 3 bne .L47 ldr x0, [sp, 24] str wzr, [x0] mov w0, 0 b .L53 .L47: ldr w0, [sp, 60] cmp w0, 15 bhi .L49 mov w0, 1 bl exit .L49: ldr x0, [sp, 24] cmp x0, 0 beq .L50 ldr x0, [sp, 64] ldrh w0, [x0, 4] ldrh w1, [sp, 34] cmp w1, w0 bne .L50 ldr w1, [sp, 60] ldr x0, [sp, 24] str w1, [x0] mov w0, 0 b .L53 .L50: ldr w0, [sp, 60] cmp w0, 35 bhi .L51 mov w0, 1 bl exit .L51: ldr x0, [sp, 64] ldrh w0, [x0, 4] cmp w0, 2 beq .L52 mov w0, 1 bl exit .L52: ldr x0, [sp, 64] add x0, x0, 16 ldr w0, [x0] neg w0, w0 .L53: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 88] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L54 bl __stack_chk_fail .L54: mov w0, w1 ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE48: .size netlink_send_ext, .-netlink_send_ext .align 2 .type netlink_send, %function netlink_send: .LFB49: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] mov x3, 0 mov w2, 0 ldr w1, [sp, 20] ldr x0, [sp, 24] bl netlink_send_ext ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE49: .size netlink_send, .-netlink_send .align 2 .type netlink_next_msg, %function netlink_next_msg: .LFB50: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] str w2, [sp] ldr x0, [sp, 8] add x1, x0, 80 ldr w0, [sp, 4] add x0, x1, x0 str x0, [sp, 24] ldr w1, [sp, 4] ldr w0, [sp] cmp w1, w0 beq .L58 ldr x0, [sp, 24] ldr w1, [x0] ldr w0, [sp, 4] add w0, w1, w0 ldr w1, [sp] cmp w1, w0 bcs .L59 .L58: mov w0, -1 b .L60 .L59: ldr x0, [sp, 24] ldr w0, [x0] .L60: add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE50: .size netlink_next_msg, .-netlink_next_msg .align 2 .type netlink_add_device_impl, %function netlink_add_device_impl: .LFB51: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 40] str x1, [sp, 32] str x2, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 add x0, sp, 56 mov x2, 16 mov w1, 0 bl memset add x0, sp, 56 mov w4, 16 mov x3, x0 mov w2, 1536 mov w1, 16 ldr x0, [sp, 40] bl netlink_init ldr x0, [sp, 24] cmp x0, 0 beq .L62 ldr x0, [sp, 24] bl strlen mov w3, w0 ldr x2, [sp, 24] mov w1, 3 ldr x0, [sp, 40] bl netlink_attr .L62: mov w1, 18 ldr x0, [sp, 40] bl netlink_nest ldr x0, [sp, 32] bl strlen mov w3, w0 ldr x2, [sp, 32] mov w1, 1 ldr x0, [sp, 40] bl netlink_attr nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 72] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L63 bl __stack_chk_fail .L63: ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE51: .size netlink_add_device_impl, .-netlink_add_device_impl .align 2 .type netlink_add_device, %function netlink_add_device: .LFB52: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] ldr x2, [sp, 16] ldr x1, [sp, 24] ldr x0, [sp, 40] bl netlink_add_device_impl ldr x0, [sp, 40] bl netlink_done ldr w1, [sp, 36] ldr x0, [sp, 40] bl netlink_send str w0, [sp, 60] nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE52: .size netlink_add_device, .-netlink_add_device .section .rodata .align 3 .LC6: .string "veth" .text .align 2 .type netlink_add_veth, %function netlink_add_veth: .LFB53: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] ldr x2, [sp, 24] adrp x0, .LC6 add x1, x0, :lo12:.LC6 ldr x0, [sp, 40] bl netlink_add_device_impl mov w1, 2 ldr x0, [sp, 40] bl netlink_nest mov w1, 1 ldr x0, [sp, 40] bl netlink_nest ldr x0, [sp, 40] ldr x0, [x0] add x1, x0, 16 ldr x0, [sp, 40] str x1, [x0] ldr x0, [sp, 16] bl strlen mov w3, w0 ldr x2, [sp, 16] mov w1, 3 ldr x0, [sp, 40] bl netlink_attr ldr x0, [sp, 40] bl netlink_done ldr x0, [sp, 40] bl netlink_done ldr x0, [sp, 40] bl netlink_done ldr w1, [sp, 36] ldr x0, [sp, 40] bl netlink_send str w0, [sp, 60] nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE53: .size netlink_add_veth, .-netlink_add_veth .section .rodata .align 3 .LC7: .string "hsr" .text .align 2 .type netlink_add_hsr, %function netlink_add_hsr: .LFB54: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp str x0, [sp, 56] str w1, [sp, 52] str x2, [sp, 40] str x3, [sp, 32] str x4, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 88] mov x1, 0 ldr x2, [sp, 40] adrp x0, .LC7 add x1, x0, :lo12:.LC7 ldr x0, [sp, 56] bl netlink_add_device_impl mov w1, 2 ldr x0, [sp, 56] bl netlink_nest ldr x0, [sp, 32] bl if_nametoindex str w0, [sp, 76] add x0, sp, 76 mov w3, 4 mov x2, x0 mov w1, 1 ldr x0, [sp, 56] bl netlink_attr ldr x0, [sp, 24] bl if_nametoindex str w0, [sp, 80] add x0, sp, 80 mov w3, 4 mov x2, x0 mov w1, 2 ldr x0, [sp, 56] bl netlink_attr ldr x0, [sp, 56] bl netlink_done ldr x0, [sp, 56] bl netlink_done ldr w1, [sp, 52] ldr x0, [sp, 56] bl netlink_send str w0, [sp, 84] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 88] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L67 bl __stack_chk_fail .L67: ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE54: .size netlink_add_hsr, .-netlink_add_hsr .align 2 .type netlink_add_linked, %function netlink_add_linked: .LFB55: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 56] str w1, [sp, 52] str x2, [sp, 40] str x3, [sp, 32] str x4, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 ldr x2, [sp, 32] ldr x1, [sp, 40] ldr x0, [sp, 56] bl netlink_add_device_impl ldr x0, [sp, 56] bl netlink_done ldr x0, [sp, 24] bl if_nametoindex str w0, [sp, 64] add x0, sp, 64 mov w3, 4 mov x2, x0 mov w1, 5 ldr x0, [sp, 56] bl netlink_attr ldr w1, [sp, 52] ldr x0, [sp, 56] bl netlink_send str w0, [sp, 68] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 72] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L69 bl __stack_chk_fail .L69: ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE55: .size netlink_add_linked, .-netlink_add_linked .section .rodata .align 3 .LC8: .string "vlan" .text .align 2 .type netlink_add_vlan, %function netlink_add_vlan: .LFB56: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] strh w4, [sp, 34] strh w5, [sp, 32] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 ldr x2, [sp, 24] adrp x0, .LC8 add x1, x0, :lo12:.LC8 ldr x0, [sp, 40] bl netlink_add_device_impl mov w1, 2 ldr x0, [sp, 40] bl netlink_nest add x0, sp, 34 mov w3, 2 mov x2, x0 mov w1, 1 ldr x0, [sp, 40] bl netlink_attr add x0, sp, 32 mov w3, 2 mov x2, x0 mov w1, 5 ldr x0, [sp, 40] bl netlink_attr ldr x0, [sp, 40] bl netlink_done ldr x0, [sp, 40] bl netlink_done ldr x0, [sp, 16] bl if_nametoindex str w0, [sp, 48] add x0, sp, 48 mov w3, 4 mov x2, x0 mov w1, 5 ldr x0, [sp, 40] bl netlink_attr ldr w1, [sp, 36] ldr x0, [sp, 40] bl netlink_send str w0, [sp, 52] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 56] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L71 bl __stack_chk_fail .L71: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE56: .size netlink_add_vlan, .-netlink_add_vlan .section .rodata .align 3 .LC9: .string "macvlan" .text .align 2 .type netlink_add_macvlan, %function netlink_add_macvlan: .LFB57: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 ldr x2, [sp, 24] adrp x0, .LC9 add x1, x0, :lo12:.LC9 ldr x0, [sp, 40] bl netlink_add_device_impl mov w1, 2 ldr x0, [sp, 40] bl netlink_nest mov w0, 4 str w0, [sp, 60] add x0, sp, 60 mov w3, 4 mov x2, x0 mov w1, 1 ldr x0, [sp, 40] bl netlink_attr ldr x0, [sp, 40] bl netlink_done ldr x0, [sp, 40] bl netlink_done ldr x0, [sp, 16] bl if_nametoindex str w0, [sp, 64] add x0, sp, 64 mov w3, 4 mov x2, x0 mov w1, 5 ldr x0, [sp, 40] bl netlink_attr ldr w1, [sp, 36] ldr x0, [sp, 40] bl netlink_send str w0, [sp, 68] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 72] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L73 bl __stack_chk_fail .L73: ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE57: .size netlink_add_macvlan, .-netlink_add_macvlan .section .rodata .align 3 .LC10: .string "geneve" .text .align 2 .type netlink_add_geneve, %function netlink_add_geneve: .LFB58: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 56] str w1, [sp, 52] str x2, [sp, 40] str w3, [sp, 48] str x4, [sp, 32] str x5, [sp, 24] ldr x2, [sp, 40] adrp x0, .LC10 add x1, x0, :lo12:.LC10 ldr x0, [sp, 56] bl netlink_add_device_impl mov w1, 2 ldr x0, [sp, 56] bl netlink_nest add x0, sp, 48 mov w3, 4 mov x2, x0 mov w1, 1 ldr x0, [sp, 56] bl netlink_attr ldr x0, [sp, 32] cmp x0, 0 beq .L75 mov w3, 4 ldr x2, [sp, 32] mov w1, 2 ldr x0, [sp, 56] bl netlink_attr .L75: ldr x0, [sp, 24] cmp x0, 0 beq .L76 mov w3, 16 ldr x2, [sp, 24] mov w1, 7 ldr x0, [sp, 56] bl netlink_attr .L76: ldr x0, [sp, 56] bl netlink_done ldr x0, [sp, 56] bl netlink_done ldr w1, [sp, 52] ldr x0, [sp, 56] bl netlink_send str w0, [sp, 76] nop ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE58: .size netlink_add_geneve, .-netlink_add_geneve .section .rodata .align 3 .LC11: .string "ipvlan" .text .align 2 .type netlink_add_ipvlan, %function netlink_add_ipvlan: .LFB59: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] strh w4, [sp, 34] strh w5, [sp, 32] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 ldr x2, [sp, 24] adrp x0, .LC11 add x1, x0, :lo12:.LC11 ldr x0, [sp, 40] bl netlink_add_device_impl mov w1, 2 ldr x0, [sp, 40] bl netlink_nest add x0, sp, 34 mov w3, 2 mov x2, x0 mov w1, 1 ldr x0, [sp, 40] bl netlink_attr add x0, sp, 32 mov w3, 2 mov x2, x0 mov w1, 2 ldr x0, [sp, 40] bl netlink_attr ldr x0, [sp, 40] bl netlink_done ldr x0, [sp, 40] bl netlink_done ldr x0, [sp, 16] bl if_nametoindex str w0, [sp, 48] add x0, sp, 48 mov w3, 4 mov x2, x0 mov w1, 5 ldr x0, [sp, 40] bl netlink_attr ldr w1, [sp, 36] ldr x0, [sp, 40] bl netlink_send str w0, [sp, 52] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 56] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L78 bl __stack_chk_fail .L78: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE59: .size netlink_add_ipvlan, .-netlink_add_ipvlan .align 2 .type netlink_device_change, %function netlink_device_change: .LFB60: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 mov x29, sp str x0, [sp, 72] str w1, [sp, 68] str x2, [sp, 56] strb w3, [sp, 67] str x4, [sp, 48] str x5, [sp, 40] str w6, [sp, 36] str x7, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 104] mov x1, 0 add x0, sp, 88 mov x2, 16 mov w1, 0 bl memset ldrb w0, [sp, 67] cmp w0, 0 beq .L80 mov w0, 1 str w0, [sp, 100] ldr w0, [sp, 100] str w0, [sp, 96] .L80: ldr x0, [sp, 56] bl if_nametoindex str w0, [sp, 92] add x0, sp, 88 mov w4, 16 mov x3, x0 mov w2, 0 mov w1, 16 ldr x0, [sp, 72] bl netlink_init ldr x0, [sp, 24] cmp x0, 0 beq .L81 ldr x0, [sp, 24] bl strlen mov w3, w0 ldr x2, [sp, 24] mov w1, 3 ldr x0, [sp, 72] bl netlink_attr .L81: ldr x0, [sp, 48] cmp x0, 0 beq .L82 ldr x0, [sp, 48] bl if_nametoindex str w0, [sp, 80] add x0, sp, 80 mov w3, 4 mov x2, x0 mov w1, 10 ldr x0, [sp, 72] bl netlink_attr .L82: ldr w0, [sp, 36] cmp w0, 0 beq .L83 ldr w3, [sp, 36] ldr x2, [sp, 40] mov w1, 1 ldr x0, [sp, 72] bl netlink_attr .L83: ldr w1, [sp, 68] ldr x0, [sp, 72] bl netlink_send str w0, [sp, 84] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 104] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L84 bl __stack_chk_fail .L84: ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE60: .size netlink_device_change, .-netlink_device_change .align 2 .type netlink_add_addr, %function netlink_add_addr: .LFB61: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] str w4, [sp, 32] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 add x0, sp, 48 mov x2, 8 mov w1, 0 bl memset ldr w0, [sp, 32] cmp w0, 4 bne .L86 mov w0, 2 b .L87 .L86: mov w0, 10 .L87: strb w0, [sp, 48] ldr w0, [sp, 32] cmp w0, 4 bne .L88 mov w0, 24 b .L89 .L88: mov w0, 120 .L89: strb w0, [sp, 49] strb wzr, [sp, 51] ldr x0, [sp, 24] bl if_nametoindex str w0, [sp, 52] add x0, sp, 48 mov w4, 8 mov x3, x0 mov w2, 1280 mov w1, 20 ldr x0, [sp, 40] bl netlink_init ldr w3, [sp, 32] ldr x2, [sp, 16] mov w1, 2 ldr x0, [sp, 40] bl netlink_attr ldr w3, [sp, 32] ldr x2, [sp, 16] mov w1, 1 ldr x0, [sp, 40] bl netlink_attr ldr w1, [sp, 36] ldr x0, [sp, 40] bl netlink_send mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L91 bl __stack_chk_fail .L91: mov w0, w1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE61: .size netlink_add_addr, .-netlink_add_addr .align 2 .type netlink_add_addr4, %function netlink_add_addr4: .LFB62: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 add x0, sp, 48 mov x2, x0 ldr x1, [sp, 16] mov w0, 2 bl inet_pton add x0, sp, 48 mov w4, 4 mov x3, x0 ldr x2, [sp, 24] ldr w1, [sp, 36] ldr x0, [sp, 40] bl netlink_add_addr str w0, [sp, 52] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 56] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L93 bl __stack_chk_fail .L93: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE62: .size netlink_add_addr4, .-netlink_add_addr4 .align 2 .type netlink_add_addr6, %function netlink_add_addr6: .LFB63: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str x3, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 add x0, sp, 56 mov x2, x0 ldr x1, [sp, 16] mov w0, 10 bl inet_pton add x0, sp, 56 mov w4, 16 mov x3, x0 ldr x2, [sp, 24] ldr w1, [sp, 36] ldr x0, [sp, 40] bl netlink_add_addr str w0, [sp, 52] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 72] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L95 bl __stack_chk_fail .L95: ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE63: .size netlink_add_addr6, .-netlink_add_addr6 .align 2 .type netlink_add_neigh, %function netlink_add_neigh: .LFB64: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp str x0, [sp, 56] str w1, [sp, 52] str x2, [sp, 40] str x3, [sp, 32] str w4, [sp, 48] str x5, [sp, 24] str w6, [sp, 20] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 88] mov x1, 0 add x0, sp, 72 mov x2, 12 mov w1, 0 bl memset ldr w0, [sp, 48] cmp w0, 4 bne .L97 mov w0, 2 b .L98 .L97: mov w0, 10 .L98: strb w0, [sp, 72] ldr x0, [sp, 40] bl if_nametoindex str w0, [sp, 76] mov w0, 128 strh w0, [sp, 80] add x0, sp, 72 mov w4, 12 mov x3, x0 mov w2, 1536 mov w1, 28 ldr x0, [sp, 56] bl netlink_init ldr w3, [sp, 48] ldr x2, [sp, 32] mov w1, 1 ldr x0, [sp, 56] bl netlink_attr ldr w3, [sp, 20] ldr x2, [sp, 24] mov w1, 2 ldr x0, [sp, 56] bl netlink_attr ldr w1, [sp, 52] ldr x0, [sp, 56] bl netlink_send str w0, [sp, 68] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 88] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L99 bl __stack_chk_fail .L99: ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE64: .size netlink_add_neigh, .-netlink_add_neigh .data .align 2 .type tunfd, %object .size tunfd, 4 tunfd: .word -1 .section .rodata .align 3 .LC12: .string "/dev/net/tun" .align 3 .LC13: .string "tun: can't open /dev/net/tun: please enable CONFIG_TUN=y" .align 3 .LC14: .string "otherwise fuzzing or reproducing might not work as intended" .align 3 .LC15: .string "syz_tun" .align 3 .LC16: .string "/proc/sys/net/ipv6/conf/%s/accept_dad" .align 3 .LC17: .string "0" .align 3 .LC18: .string "/proc/sys/net/ipv6/conf/%s/router_solicitations" .align 3 .LC19: .string "172.20.20.170" .align 3 .LC20: .string "fe80::aa" .align 3 .LC21: .string "172.20.20.187" .align 3 .LC22: .string "fe80::bb" .text .align 2 .type initialize_tun, %function initialize_tun: .LFB65: .cfi_startproc stp x29, x30, [sp, -176]! .cfi_def_cfa_offset 176 .cfi_offset 29, -176 .cfi_offset 30, -168 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 168] mov x1, 0 mov w1, 2050 adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl open mov w1, w0 adrp x0, tunfd add x0, x0, :lo12:tunfd str w1, [x0] adrp x0, tunfd add x0, x0, :lo12:tunfd ldr w0, [x0] cmn w0, #1 bne .L101 adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts adrp x0, .LC14 add x0, x0, :lo12:.LC14 bl puts b .L100 .L101: mov w0, 240 str w0, [sp, 32] adrp x0, tunfd add x0, x0, :lo12:tunfd ldr w0, [x0] ldr w1, [sp, 32] bl dup2 cmp w0, 0 bge .L103 mov w0, 1 bl exit .L103: adrp x0, tunfd add x0, x0, :lo12:tunfd ldr w0, [x0] bl close adrp x0, tunfd add x0, x0, :lo12:tunfd ldr w1, [sp, 32] str w1, [x0] add x0, sp, 64 mov x2, 40 mov w1, 0 bl memset add x3, sp, 64 mov x2, 16 adrp x0, .LC15 add x1, x0, :lo12:.LC15 mov x0, x3 bl strncpy mov w0, 4098 strh w0, [sp, 80] adrp x0, tunfd add x0, x0, :lo12:tunfd ldr w0, [x0] add x1, sp, 64 mov x2, x1 mov x1, 21706 movk x1, 0x4004, lsl 16 bl ioctl cmp w0, 0 bge .L104 mov w0, 1 bl exit .L104: add x3, sp, 104 adrp x0, .LC15 add x2, x0, :lo12:.LC15 adrp x0, .LC16 add x1, x0, :lo12:.LC16 mov x0, x3 bl sprintf add x2, sp, 104 adrp x0, .LC17 add x1, x0, :lo12:.LC17 mov x0, x2 bl write_file add x3, sp, 104 adrp x0, .LC15 add x2, x0, :lo12:.LC15 adrp x0, .LC18 add x1, x0, :lo12:.LC18 mov x0, x3 bl sprintf add x2, sp, 104 adrp x0, .LC17 add x1, x0, :lo12:.LC17 mov x0, x2 bl write_file mov w2, 0 mov w1, 3 mov w0, 16 bl socket str w0, [sp, 36] ldr w0, [sp, 36] cmn w0, #1 bne .L105 mov w0, 1 bl exit .L105: adrp x0, .LC19 add x3, x0, :lo12:.LC19 adrp x0, .LC15 add x2, x0, :lo12:.LC15 ldr w1, [sp, 36] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_addr4 adrp x0, .LC20 add x3, x0, :lo12:.LC20 adrp x0, .LC15 add x2, x0, :lo12:.LC15 ldr w1, [sp, 36] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_addr6 mov x0, 43707 movk x0, 0xaaaa, lsl 16 movk x0, 0xaaaa, lsl 32 str x0, [sp, 40] add x0, sp, 24 mov x2, x0 adrp x0, .LC21 add x1, x0, :lo12:.LC21 mov w0, 2 bl inet_pton add x1, sp, 40 add x0, sp, 24 mov w6, 6 mov x5, x1 mov w4, 4 mov x3, x0 adrp x0, .LC15 add x2, x0, :lo12:.LC15 ldr w1, [sp, 36] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_neigh add x0, sp, 48 mov x2, x0 adrp x0, .LC22 add x1, x0, :lo12:.LC22 mov w0, 10 bl inet_pton add x1, sp, 40 add x0, sp, 48 mov w6, 6 mov x5, x1 mov w4, 16 mov x3, x0 adrp x0, .LC15 add x2, x0, :lo12:.LC15 ldr w1, [sp, 36] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_neigh mov w0, 2863311530 movk x0, 0xaaaa, lsl 32 str x0, [sp, 40] add x0, sp, 40 mov x7, 0 mov w6, 6 mov x5, x0 mov x4, 0 mov w3, 1 adrp x0, .LC15 add x2, x0, :lo12:.LC15 ldr w1, [sp, 36] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_device_change ldr w0, [sp, 36] bl close .L100: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 168] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L106 bl __stack_chk_fail .L106: ldp x29, x30, [sp], 176 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE65: .size initialize_tun, .-initialize_tun .section .rodata .align 3 .LC23: .string "devlink" .text .align 2 .type netlink_devlink_id_get, %function netlink_devlink_id_get: .LFB66: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 strh wzr, [sp, 46] add x0, sp, 48 mov x2, 4 mov w1, 0 bl memset mov w0, 3 strb w0, [sp, 48] add x0, sp, 48 mov w4, 4 mov x3, x0 mov w2, 0 mov w1, 16 ldr x0, [sp, 24] bl netlink_init mov w3, 8 adrp x0, .LC23 add x2, x0, :lo12:.LC23 mov w1, 2 ldr x0, [sp, 24] bl netlink_attr add x0, sp, 56 mov x3, x0 mov w2, 16 ldr w1, [sp, 20] ldr x0, [sp, 24] bl netlink_send_ext str w0, [sp, 60] ldr w0, [sp, 60] cmp w0, 0 beq .L108 mov w0, -1 b .L115 .L108: ldr x0, [sp, 24] add x0, x0, 80 add x0, x0, 20 str x0, [sp, 64] b .L110 .L113: ldr x0, [sp, 64] ldrh w0, [x0, 2] cmp w0, 1 bne .L111 ldr x0, [sp, 64] ldrh w0, [x0, 4] strh w0, [sp, 46] b .L112 .L111: ldr x0, [sp, 64] ldrh w0, [x0] add w0, w0, 3 uxtw x0, w0 and x0, x0, 4294967292 ldr x1, [sp, 64] add x0, x1, x0 str x0, [sp, 64] .L110: ldr x0, [sp, 24] add x1, x0, 80 ldr w0, [sp, 56] sxtw x0, w0 add x0, x1, x0 ldr x1, [sp, 64] cmp x1, x0 bcc .L113 .L112: ldrh w0, [sp, 46] cmp w0, 0 bne .L114 mov w0, -1 b .L115 .L114: ldr x0, [sp, 24] add x0, x0, 80 mov w3, 0 mov x2, 1024 mov x1, x0 ldr w0, [sp, 20] bl recv ldrh w0, [sp, 46] .L115: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 72] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L116 bl __stack_chk_fail .L116: mov w0, w1 ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE66: .size netlink_devlink_id_get, .-netlink_devlink_id_get .local nlmsg2 .comm nlmsg2,1104,8 .section .rodata .align 3 .LC24: .string "%s%d" .text .align 2 .type initialize_devlink_ports, %function initialize_devlink_ports: .LFB67: .cfi_startproc stp x29, x30, [sp, -128]! .cfi_def_cfa_offset 128 .cfi_offset 29, -128 .cfi_offset 30, -120 mov x29, sp str x0, [sp, 40] str x1, [sp, 32] str x2, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 120] mov x1, 0 mov w2, 16 mov w1, 3 mov w0, 16 bl socket str w0, [sp, 68] ldr w0, [sp, 68] cmn w0, #1 bne .L118 mov w0, 1 bl exit .L118: mov w2, 0 mov w1, 3 mov w0, 16 bl socket str w0, [sp, 72] ldr w0, [sp, 72] cmn w0, #1 bne .L119 mov w0, 1 bl exit .L119: ldr w1, [sp, 68] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_devlink_id_get str w0, [sp, 76] ldr w0, [sp, 76] cmn w0, #1 beq .L130 add x0, sp, 56 mov x2, 4 mov w1, 0 bl memset mov w0, 5 strb w0, [sp, 56] add x0, sp, 56 mov w4, 4 mov x3, x0 mov w2, 768 ldr w1, [sp, 76] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_init ldr x0, [sp, 40] bl strlen add w0, w0, 1 mov w3, w0 ldr x2, [sp, 40] mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr ldr x0, [sp, 32] bl strlen add w0, w0, 1 mov w3, w0 ldr x2, [sp, 32] mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr ldr w0, [sp, 76] and w1, w0, 65535 add x0, sp, 60 mov x3, x0 mov w2, w1 ldr w1, [sp, 68] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_send_ext str w0, [sp, 80] ldr w0, [sp, 80] cmp w0, 0 bne .L131 str wzr, [sp, 64] strh wzr, [sp, 54] b .L123 .L128: ldrsw x0, [sp, 64] add x1, x0, 20 adrp x0, nlmsg+80 add x0, x0, :lo12:nlmsg+80 add x0, x1, x0 str x0, [sp, 88] b .L124 .L127: ldr x0, [sp, 88] ldrh w0, [x0, 2] cmp w0, 7 bne .L125 ldr x0, [sp, 88] add x0, x0, 4 str x0, [sp, 96] ldrh w0, [sp, 54] add x5, sp, 104 mov w4, w0 ldr x3, [sp, 24] adrp x0, .LC24 add x2, x0, :lo12:.LC24 mov x1, 16 mov x0, x5 bl snprintf add x0, sp, 104 mov x7, x0 mov w6, 0 mov x5, 0 mov x4, 0 mov w3, 1 ldr x2, [sp, 96] ldr w1, [sp, 72] adrp x0, nlmsg2 add x0, x0, :lo12:nlmsg2 bl netlink_device_change b .L126 .L125: ldr x0, [sp, 88] ldrh w0, [x0] add w0, w0, 3 uxtw x0, w0 and x0, x0, 4294967292 ldr x1, [sp, 88] add x0, x1, x0 str x0, [sp, 88] .L124: ldrsw x1, [sp, 64] ldrsw x0, [sp, 84] add x1, x1, x0 adrp x0, nlmsg+80 add x0, x0, :lo12:nlmsg+80 add x0, x1, x0 ldr x1, [sp, 88] cmp x1, x0 bcc .L127 .L126: ldr w1, [sp, 64] ldr w0, [sp, 84] add w0, w1, w0 str w0, [sp, 64] ldrh w0, [sp, 54] add w0, w0, 1 strh w0, [sp, 54] .L123: ldr w0, [sp, 64] ldr w1, [sp, 60] mov w2, w1 mov w1, w0 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_next_msg str w0, [sp, 84] ldr w0, [sp, 84] cmn w0, #1 bne .L128 b .L121 .L130: nop b .L121 .L131: nop .L121: ldr w0, [sp, 72] bl close ldr w0, [sp, 68] bl close nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 120] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L129 bl __stack_chk_fail .L129: ldp x29, x30, [sp], 128 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE67: .size initialize_devlink_ports, .-initialize_devlink_ports .section .rodata .align 3 .LC25: .string "%u %u" .align 3 .LC26: .string "/sys/bus/netdevsim/new_device" .align 3 .LC27: .string "netdevsim%d" .align 3 .LC28: .string "netdevsim" .text .align 2 .type netdevsim_add, %function netdevsim_add: .LFB68: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str w0, [sp, 28] str w1, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 add x4, sp, 40 ldr w3, [sp, 24] ldr w2, [sp, 28] adrp x0, .LC25 add x1, x0, :lo12:.LC25 mov x0, x4 bl sprintf add x0, sp, 40 mov x1, x0 adrp x0, .LC26 add x0, x0, :lo12:.LC26 bl write_file and w0, w0, 255 cmp w0, 0 beq .L135 add x4, sp, 40 ldr w3, [sp, 28] adrp x0, .LC27 add x2, x0, :lo12:.LC27 mov x1, 16 mov x0, x4 bl snprintf add x1, sp, 40 adrp x0, .LC28 add x2, x0, :lo12:.LC28 adrp x0, .LC28 add x0, x0, :lo12:.LC28 bl initialize_devlink_ports .L135: nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 56] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L134 bl __stack_chk_fail .L134: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE68: .size netdevsim_add, .-netdevsim_add .section .rodata .align 3 .LC29: .string "wireguard" .text .align 2 .type netlink_wireguard_id_get, %function netlink_wireguard_id_get: .LFB69: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 strh wzr, [sp, 46] add x0, sp, 48 mov x2, 4 mov w1, 0 bl memset mov w0, 3 strb w0, [sp, 48] add x0, sp, 48 mov w4, 4 mov x3, x0 mov w2, 0 mov w1, 16 ldr x0, [sp, 24] bl netlink_init mov w3, 10 adrp x0, .LC29 add x2, x0, :lo12:.LC29 mov w1, 2 ldr x0, [sp, 24] bl netlink_attr add x0, sp, 56 mov x3, x0 mov w2, 16 ldr w1, [sp, 20] ldr x0, [sp, 24] bl netlink_send_ext str w0, [sp, 60] ldr w0, [sp, 60] cmp w0, 0 beq .L137 mov w0, -1 b .L144 .L137: ldr x0, [sp, 24] add x0, x0, 80 add x0, x0, 20 str x0, [sp, 64] b .L139 .L142: ldr x0, [sp, 64] ldrh w0, [x0, 2] cmp w0, 1 bne .L140 ldr x0, [sp, 64] ldrh w0, [x0, 4] strh w0, [sp, 46] b .L141 .L140: ldr x0, [sp, 64] ldrh w0, [x0] add w0, w0, 3 uxtw x0, w0 and x0, x0, 4294967292 ldr x1, [sp, 64] add x0, x1, x0 str x0, [sp, 64] .L139: ldr x0, [sp, 24] add x1, x0, 80 ldr w0, [sp, 56] sxtw x0, w0 add x0, x1, x0 ldr x1, [sp, 64] cmp x1, x0 bcc .L142 .L141: ldrh w0, [sp, 46] cmp w0, 0 bne .L143 mov w0, -1 b .L144 .L143: ldr x0, [sp, 24] add x0, x0, 80 mov w3, 0 mov x2, 1024 mov x1, x0 ldr w0, [sp, 20] bl recv ldrh w0, [sp, 46] .L144: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 72] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L145 bl __stack_chk_fail .L145: mov w0, w1 ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE69: .size netlink_wireguard_id_get, .-netlink_wireguard_id_get .align 2 .type netlink_wireguard_setup, %function netlink_wireguard_setup: .LFB70: .cfi_startproc stp x29, x30, [sp, -480]! .cfi_def_cfa_offset 480 .cfi_offset 29, -480 .cfi_offset 30, -472 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 472] mov x1, 0 mov w0, 26487 movk w0, 0x30, lsl 16 str w0, [sp, 208] mov w0, 26487 movk w0, 0x31, lsl 16 str w0, [sp, 216] mov w0, 26487 movk w0, 0x32, lsl 16 str w0, [sp, 224] adrp x0, .LC30 add x1, x0, :lo12:.LC30 add x0, sp, 232 ldp q0, q1, [x1] stp q0, q1, [x0] ldrb w1, [x1, 32] strb w1, [x0, 32] adrp x0, .LC31 add x1, x0, :lo12:.LC31 add x0, sp, 272 ldp q0, q1, [x1] stp q0, q1, [x0] ldrb w1, [x1, 32] strb w1, [x0, 32] adrp x0, .LC32 add x1, x0, :lo12:.LC32 add x0, sp, 312 ldp q0, q1, [x1] stp q0, q1, [x0] ldrb w1, [x1, 32] strb w1, [x0, 32] adrp x0, .LC33 add x1, x0, :lo12:.LC33 add x0, sp, 352 ldp q0, q1, [x1] stp q0, q1, [x0] ldrb w1, [x1, 32] strb w1, [x0, 32] adrp x0, .LC34 add x1, x0, :lo12:.LC34 add x0, sp, 392 ldp q0, q1, [x1] stp q0, q1, [x0] ldrb w1, [x1, 32] strb w1, [x0, 32] adrp x0, .LC35 add x1, x0, :lo12:.LC35 add x0, sp, 432 ldp q0, q1, [x1] stp q0, q1, [x0] ldrb w1, [x1, 32] strb w1, [x0, 32] mov w0, 20001 strh w0, [sp, 22] mov w0, 20002 strh w0, [sp, 24] mov w0, 20003 strh w0, [sp, 26] mov w0, 2 strh w0, [sp, 28] mov w0, 10 strh w0, [sp, 30] stp xzr, xzr, [sp, 80] mov w0, 2 strh w0, [sp, 80] ldrh w0, [sp, 24] bl htons and w0, w0, 65535 strh w0, [sp, 82] mov w0, 1 movk w0, 0x7f00, lsl 16 bl htonl str w0, [sp, 84] stp xzr, xzr, [sp, 96] mov w0, 2 strh w0, [sp, 96] ldrh w0, [sp, 26] bl htons and w0, w0, 65535 strh w0, [sp, 98] mov w0, 1 movk w0, 0x7f00, lsl 16 bl htonl str w0, [sp, 100] stp xzr, xzr, [sp, 144] str xzr, [sp, 160] str wzr, [sp, 168] mov w0, 10 strh w0, [sp, 144] ldrh w0, [sp, 22] bl htons and w0, w0, 65535 strh w0, [sp, 146] adrp x0, :got:in6addr_loopback ldr x0, [x0, #:got_lo12:in6addr_loopback] ldp x0, x1, [x0] stp x0, x1, [sp, 152] stp xzr, xzr, [sp, 176] str xzr, [sp, 192] str wzr, [sp, 200] mov w0, 10 strh w0, [sp, 176] ldrh w0, [sp, 26] bl htons and w0, w0, 65535 strh w0, [sp, 178] adrp x0, :got:in6addr_loopback ldr x0, [x0, #:got_lo12:in6addr_loopback] ldp x0, x1, [x0] stp x0, x1, [sp, 184] str wzr, [sp, 32] mov w0, -2147483648 bl htonl str w0, [sp, 40] stp xzr, xzr, [sp, 112] stp xzr, xzr, [sp, 128] mov w0, -128 strb w0, [sp, 128] mov w0, 1 strb w0, [sp, 21] adrp x0, .LC0 add x1, x0, :lo12:.LC0 add x0, sp, 64 ldr x2, [x1] str x2, [x0] ldr w1, [x1, 8] str w1, [x0, 8] str wzr, [sp, 48] mov w0, 1 strb w0, [sp, 48] mov w0, 1 strb w0, [sp, 49] mov w2, 16 mov w1, 3 mov w0, 16 bl socket str w0, [sp, 52] ldr w0, [sp, 52] cmn w0, #1 beq .L152 ldr w1, [sp, 52] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_wireguard_id_get str w0, [sp, 56] ldr w0, [sp, 56] cmn w0, #1 beq .L153 add x0, sp, 48 mov w4, 4 mov x3, x0 mov w2, 0 ldr w1, [sp, 56] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_init add x0, sp, 208 mov w3, 4 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 232 mov w3, 32 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 22 mov w3, 2 mov x2, x0 mov w1, 6 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr mov w1, 32776 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 392 mov w3, 32 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 80 mov w3, 16 mov x2, x0 mov w1, 4 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 64 mov w3, 2 mov x2, x0 mov w1, 5 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr mov w1, 32777 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 28 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 32 mov w3, 4 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 30 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 112 mov w3, 16 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 432 mov w3, 32 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 176 mov w3, 28 mov x2, x0 mov w1, 4 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 64 add x0, x0, 2 mov w3, 2 mov x2, x0 mov w1, 5 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr mov w1, 32777 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 28 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 40 mov w3, 4 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 30 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 128 mov w3, 16 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done ldr w1, [sp, 52] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_send str w0, [sp, 60] add x0, sp, 48 mov w4, 4 mov x3, x0 mov w2, 0 ldr w1, [sp, 56] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_init add x0, sp, 216 mov w3, 4 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 272 mov w3, 32 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 24 mov w3, 2 mov x2, x0 mov w1, 6 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr mov w1, 32776 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 352 mov w3, 32 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 144 mov w3, 28 mov x2, x0 mov w1, 4 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 64 add x0, x0, 4 mov w3, 2 mov x2, x0 mov w1, 5 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr mov w1, 32777 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 28 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 32 mov w3, 4 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 30 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 112 mov w3, 16 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 432 mov w3, 32 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 96 mov w3, 16 mov x2, x0 mov w1, 4 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 64 add x0, x0, 6 mov w3, 2 mov x2, x0 mov w1, 5 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr mov w1, 32777 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 28 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 40 mov w3, 4 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 30 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 128 mov w3, 16 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done ldr w1, [sp, 52] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_send str w0, [sp, 60] add x0, sp, 48 mov w4, 4 mov x3, x0 mov w2, 0 ldr w1, [sp, 56] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_init add x0, sp, 224 mov w3, 4 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 312 mov w3, 32 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 26 mov w3, 2 mov x2, x0 mov w1, 6 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr mov w1, 32776 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 352 mov w3, 32 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 144 mov w3, 28 mov x2, x0 mov w1, 4 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 64 add x0, x0, 8 mov w3, 2 mov x2, x0 mov w1, 5 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr mov w1, 32777 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 28 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 32 mov w3, 4 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 30 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 112 mov w3, 16 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 392 mov w3, 32 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 80 mov w3, 16 mov x2, x0 mov w1, 4 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 64 add x0, x0, 10 mov w3, 2 mov x2, x0 mov w1, 5 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr mov w1, 32777 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 28 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 40 mov w3, 4 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done mov w1, 32768 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_nest add x0, sp, 30 mov w3, 2 mov x2, x0 mov w1, 1 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 128 mov w3, 16 mov x2, x0 mov w1, 2 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr add x0, sp, 21 mov w3, 1 mov x2, x0 mov w1, 3 adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_attr adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_done ldr w1, [sp, 52] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_send str w0, [sp, 60] b .L150 .L153: nop .L150: ldr w0, [sp, 52] bl close b .L146 .L152: nop .L146: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 472] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L151 bl __stack_chk_fail .L151: ldp x29, x30, [sp], 480 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE70: .size netlink_wireguard_setup, .-netlink_wireguard_setup .section .rodata .align 3 .LC30: .string "\240\\\250Ol\234\2168S\342\375zp\256\017\262\017\241R`\f\260\bE\027O\b\007o\215xC" .align 3 .LC31: .string "\260\200s\350\324N\221\343\332\222,\"C\202D\273\210\\i\342i\310\351\3305\261\024):M\334n" .align 3 .LC32: .string "\240\313\207\232G\365\274dL\016i?\246\3201\307J\025S\266\351\001\271\377/Q\214x\004/\265B" .align 3 .LC33: .string "\227\\\235\201\311\203\310 \236\347\201%K\211\237\216\331%\256\237\t#\302<b\365<W\315\277i\034" .align 3 .LC34: .string "\321s(\231\366\021\315\211\224\003M\177A=\311Wc\016T\223\302\205\254\244" .string "e\313c\021\276ik" .align 3 .LC35: .string "\364M\243g\250\216\346VO\002\002\021Eg'\b/\\\353\356\213\033\365\353s74\033E\2339\"" .align 3 .LC0: .hword 1 .hword 3 .hword 7 .hword 9 .hword 14 .hword 19 .text .section .rodata .align 3 .LC36: .string "ip6gretap" .align 3 .LC37: .string "ip6gretap0" .align 3 .LC1: .string "bridge" .align 3 .LC38: .string "bridge0" .align 3 .LC39: .string "vcan" .align 3 .LC40: .string "vcan0" .align 3 .LC2: .string "bond" .align 3 .LC41: .string "bond0" .align 3 .LC3: .string "team" .align 3 .LC42: .string "team0" .align 3 .LC43: .string "dummy" .align 3 .LC44: .string "dummy0" .align 3 .LC45: .string "nlmon" .align 3 .LC46: .string "nlmon0" .align 3 .LC47: .string "caif" .align 3 .LC48: .string "caif0" .align 3 .LC4: .string "batadv" .align 3 .LC49: .string "batadv0" .align 3 .LC50: .string "vxcan" .align 3 .LC51: .string "vxcan1" .align 3 .LC52: .string "xfrm" .align 3 .LC53: .string "xfrm0" .align 3 .LC54: .string "wg0" .align 3 .LC55: .string "wg1" .align 3 .LC56: .string "wg2" .align 3 .LC58: .string "lo" .align 3 .LC59: .string "sit0" .align 3 .LC60: .string "tunl0" .align 3 .LC61: .string "gre0" .align 3 .LC62: .string "gretap0" .align 3 .LC63: .string "ip_vti0" .align 3 .LC64: .string "ip6_vti0" .align 3 .LC65: .string "ip6tnl0" .align 3 .LC66: .string "ip6gre0" .align 3 .LC67: .string "erspan0" .align 3 .LC68: .string "veth0" .align 3 .LC69: .string "veth1" .align 3 .LC70: .string "veth0_to_bridge" .align 3 .LC71: .string "veth1_to_bridge" .align 3 .LC72: .string "veth0_to_bond" .align 3 .LC73: .string "veth1_to_bond" .align 3 .LC74: .string "veth0_to_team" .align 3 .LC75: .string "veth1_to_team" .align 3 .LC76: .string "veth0_to_hsr" .align 3 .LC77: .string "veth1_to_hsr" .align 3 .LC78: .string "hsr0" .align 3 .LC79: .string "vxcan0" .align 3 .LC80: .string "veth0_virt_wifi" .align 3 .LC81: .string "veth1_virt_wifi" .align 3 .LC82: .string "virt_wifi0" .align 3 .LC83: .string "veth0_vlan" .align 3 .LC84: .string "veth1_vlan" .align 3 .LC85: .string "vlan0" .align 3 .LC86: .string "vlan1" .align 3 .LC87: .string "macvlan0" .align 3 .LC88: .string "macvlan1" .align 3 .LC89: .string "ipvlan0" .align 3 .LC90: .string "ipvlan1" .align 3 .LC91: .string "veth0_macvtap" .align 3 .LC92: .string "veth1_macvtap" .align 3 .LC93: .string "macvtap0" .align 3 .LC94: .string "macsec0" .align 3 .LC95: .string "veth0_to_batadv" .align 3 .LC96: .string "veth1_to_batadv" .align 3 .LC97: .string "batadv_slave_0" .align 3 .LC98: .string "batadv_slave_1" .align 3 .LC99: .string "geneve0" .align 3 .LC100: .string "geneve1" .align 3 .LC101: .string "%s_slave_0" .align 3 .LC102: .string "veth0_to_%s" .align 3 .LC103: .string "%s_slave_1" .align 3 .LC104: .string "veth1_to_%s" .align 3 .LC105: .string "%s0" .align 3 .LC106: .string "bridge_slave_0" .align 3 .LC107: .string "bridge_slave_1" .align 3 .LC108: .string "hsr_slave_0" .align 3 .LC109: .string "hsr_slave_1" .align 3 .LC110: .string "virt_wifi" .align 3 .LC111: .string "macvtap" .align 3 .LC112: .string "macsec" .align 3 .LC113: .string "172.20.20.%d" .align 3 .LC114: .string "fc00::01" .align 3 .LC115: .string "fe80::%02x" .text .align 2 .type initialize_netdevices, %function initialize_netdevices: .LFB71: .cfi_startproc sub sp, sp, #1456 .cfi_def_cfa_offset 1456 stp x29, x30, [sp] .cfi_offset 29, -1456 .cfi_offset 30, -1448 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1448] mov x1, 0 adrp x0, procid add x0, x0, :lo12:procid ldr x0, [x0] add x3, sp, 1272 mov w2, w0 adrp x0, .LC27 add x1, x0, :lo12:.LC27 mov x0, x3 bl sprintf adrp x0, .LC36 add x0, x0, :lo12:.LC36 str x0, [sp, 88] adrp x0, .LC37 add x0, x0, :lo12:.LC37 str x0, [sp, 96] adrp x0, .LC1 add x0, x0, :lo12:.LC1 str x0, [sp, 104] adrp x0, .LC38 add x0, x0, :lo12:.LC38 str x0, [sp, 112] adrp x0, .LC39 add x0, x0, :lo12:.LC39 str x0, [sp, 120] adrp x0, .LC40 add x0, x0, :lo12:.LC40 str x0, [sp, 128] adrp x0, .LC2 add x0, x0, :lo12:.LC2 str x0, [sp, 136] adrp x0, .LC41 add x0, x0, :lo12:.LC41 str x0, [sp, 144] adrp x0, .LC3 add x0, x0, :lo12:.LC3 str x0, [sp, 152] adrp x0, .LC42 add x0, x0, :lo12:.LC42 str x0, [sp, 160] adrp x0, .LC43 add x0, x0, :lo12:.LC43 str x0, [sp, 168] adrp x0, .LC44 add x0, x0, :lo12:.LC44 str x0, [sp, 176] adrp x0, .LC45 add x0, x0, :lo12:.LC45 str x0, [sp, 184] adrp x0, .LC46 add x0, x0, :lo12:.LC46 str x0, [sp, 192] adrp x0, .LC47 add x0, x0, :lo12:.LC47 str x0, [sp, 200] adrp x0, .LC48 add x0, x0, :lo12:.LC48 str x0, [sp, 208] adrp x0, .LC4 add x0, x0, :lo12:.LC4 str x0, [sp, 216] adrp x0, .LC49 add x0, x0, :lo12:.LC49 str x0, [sp, 224] adrp x0, .LC50 add x0, x0, :lo12:.LC50 str x0, [sp, 232] adrp x0, .LC51 add x0, x0, :lo12:.LC51 str x0, [sp, 240] adrp x0, .LC28 add x0, x0, :lo12:.LC28 str x0, [sp, 248] add x0, sp, 1272 str x0, [sp, 256] adrp x0, .LC6 add x0, x0, :lo12:.LC6 str x0, [sp, 264] str xzr, [sp, 272] adrp x0, .LC52 add x0, x0, :lo12:.LC52 str x0, [sp, 280] adrp x0, .LC53 add x0, x0, :lo12:.LC53 str x0, [sp, 288] adrp x0, .LC29 add x0, x0, :lo12:.LC29 str x0, [sp, 296] adrp x0, .LC54 add x0, x0, :lo12:.LC54 str x0, [sp, 304] adrp x0, .LC29 add x0, x0, :lo12:.LC29 str x0, [sp, 312] adrp x0, .LC55 add x0, x0, :lo12:.LC55 str x0, [sp, 320] adrp x0, .LC29 add x0, x0, :lo12:.LC29 str x0, [sp, 328] adrp x0, .LC56 add x0, x0, :lo12:.LC56 str x0, [sp, 336] sub x0, sp, #584 add x0, x0, 640 adrp x1, .LC57 add x1, x1, :lo12:.LC57 ld1 {v0.16b - v1.16b}, [x1] st1 {v0.16b - v1.16b}, [x0] add x0, sp, 344 mov x1, 928 mov x2, x1 mov w1, 0 bl memset adrp x0, .LC58 add x0, x0, :lo12:.LC58 str x0, [sp, 344] mov w0, 6 str w0, [sp, 352] adrp x0, .LC59 add x0, x0, :lo12:.LC59 str x0, [sp, 360] adrp x0, .LC38 add x0, x0, :lo12:.LC38 str x0, [sp, 376] mov w0, 6 str w0, [sp, 384] adrp x0, .LC40 add x0, x0, :lo12:.LC40 str x0, [sp, 392] mov w0, 1 strb w0, [sp, 404] adrp x0, .LC60 add x0, x0, :lo12:.LC60 str x0, [sp, 408] adrp x0, .LC61 add x0, x0, :lo12:.LC61 str x0, [sp, 424] adrp x0, .LC62 add x0, x0, :lo12:.LC62 str x0, [sp, 440] mov w0, 6 str w0, [sp, 448] adrp x0, .LC63 add x0, x0, :lo12:.LC63 str x0, [sp, 456] adrp x0, .LC64 add x0, x0, :lo12:.LC64 str x0, [sp, 472] adrp x0, .LC65 add x0, x0, :lo12:.LC65 str x0, [sp, 488] adrp x0, .LC66 add x0, x0, :lo12:.LC66 str x0, [sp, 504] adrp x0, .LC37 add x0, x0, :lo12:.LC37 str x0, [sp, 520] mov w0, 6 str w0, [sp, 528] adrp x0, .LC67 add x0, x0, :lo12:.LC67 str x0, [sp, 536] mov w0, 6 str w0, [sp, 544] adrp x0, .LC41 add x0, x0, :lo12:.LC41 str x0, [sp, 552] mov w0, 6 str w0, [sp, 560] adrp x0, .LC68 add x0, x0, :lo12:.LC68 str x0, [sp, 568] mov w0, 6 str w0, [sp, 576] adrp x0, .LC69 add x0, x0, :lo12:.LC69 str x0, [sp, 584] mov w0, 6 str w0, [sp, 592] adrp x0, .LC42 add x0, x0, :lo12:.LC42 str x0, [sp, 600] mov w0, 6 str w0, [sp, 608] adrp x0, .LC70 add x0, x0, :lo12:.LC70 str x0, [sp, 616] mov w0, 6 str w0, [sp, 624] adrp x0, .LC71 add x0, x0, :lo12:.LC71 str x0, [sp, 632] mov w0, 6 str w0, [sp, 640] adrp x0, .LC72 add x0, x0, :lo12:.LC72 str x0, [sp, 648] mov w0, 6 str w0, [sp, 656] adrp x0, .LC73 add x0, x0, :lo12:.LC73 str x0, [sp, 664] mov w0, 6 str w0, [sp, 672] adrp x0, .LC74 add x0, x0, :lo12:.LC74 str x0, [sp, 680] mov w0, 6 str w0, [sp, 688] adrp x0, .LC75 add x0, x0, :lo12:.LC75 str x0, [sp, 696] mov w0, 6 str w0, [sp, 704] adrp x0, .LC76 add x0, x0, :lo12:.LC76 str x0, [sp, 712] mov w0, 6 str w0, [sp, 720] adrp x0, .LC77 add x0, x0, :lo12:.LC77 str x0, [sp, 728] mov w0, 6 str w0, [sp, 736] adrp x0, .LC78 add x0, x0, :lo12:.LC78 str x0, [sp, 744] adrp x0, .LC44 add x0, x0, :lo12:.LC44 str x0, [sp, 760] mov w0, 6 str w0, [sp, 768] adrp x0, .LC46 add x0, x0, :lo12:.LC46 str x0, [sp, 776] adrp x0, .LC79 add x0, x0, :lo12:.LC79 str x0, [sp, 792] mov w0, 1 strb w0, [sp, 804] adrp x0, .LC51 add x0, x0, :lo12:.LC51 str x0, [sp, 808] mov w0, 1 strb w0, [sp, 820] adrp x0, .LC48 add x0, x0, :lo12:.LC48 str x0, [sp, 824] mov w0, 6 str w0, [sp, 832] adrp x0, .LC49 add x0, x0, :lo12:.LC49 str x0, [sp, 840] mov w0, 6 str w0, [sp, 848] add x0, sp, 1272 str x0, [sp, 856] mov w0, 6 str w0, [sp, 864] adrp x0, .LC53 add x0, x0, :lo12:.LC53 str x0, [sp, 872] mov w0, 6 str w0, [sp, 880] adrp x0, .LC80 add x0, x0, :lo12:.LC80 str x0, [sp, 888] mov w0, 6 str w0, [sp, 896] adrp x0, .LC81 add x0, x0, :lo12:.LC81 str x0, [sp, 904] mov w0, 6 str w0, [sp, 912] adrp x0, .LC82 add x0, x0, :lo12:.LC82 str x0, [sp, 920] mov w0, 6 str w0, [sp, 928] adrp x0, .LC83 add x0, x0, :lo12:.LC83 str x0, [sp, 936] mov w0, 6 str w0, [sp, 944] adrp x0, .LC84 add x0, x0, :lo12:.LC84 str x0, [sp, 952] mov w0, 6 str w0, [sp, 960] adrp x0, .LC85 add x0, x0, :lo12:.LC85 str x0, [sp, 968] mov w0, 6 str w0, [sp, 976] adrp x0, .LC86 add x0, x0, :lo12:.LC86 str x0, [sp, 984] mov w0, 6 str w0, [sp, 992] adrp x0, .LC87 add x0, x0, :lo12:.LC87 str x0, [sp, 1000] mov w0, 6 str w0, [sp, 1008] adrp x0, .LC88 add x0, x0, :lo12:.LC88 str x0, [sp, 1016] mov w0, 6 str w0, [sp, 1024] adrp x0, .LC89 add x0, x0, :lo12:.LC89 str x0, [sp, 1032] mov w0, 6 str w0, [sp, 1040] adrp x0, .LC90 add x0, x0, :lo12:.LC90 str x0, [sp, 1048] mov w0, 6 str w0, [sp, 1056] adrp x0, .LC91 add x0, x0, :lo12:.LC91 str x0, [sp, 1064] mov w0, 6 str w0, [sp, 1072] adrp x0, .LC92 add x0, x0, :lo12:.LC92 str x0, [sp, 1080] mov w0, 6 str w0, [sp, 1088] adrp x0, .LC93 add x0, x0, :lo12:.LC93 str x0, [sp, 1096] mov w0, 6 str w0, [sp, 1104] adrp x0, .LC94 add x0, x0, :lo12:.LC94 str x0, [sp, 1112] mov w0, 6 str w0, [sp, 1120] adrp x0, .LC95 add x0, x0, :lo12:.LC95 str x0, [sp, 1128] mov w0, 6 str w0, [sp, 1136] adrp x0, .LC96 add x0, x0, :lo12:.LC96 str x0, [sp, 1144] mov w0, 6 str w0, [sp, 1152] adrp x0, .LC97 add x0, x0, :lo12:.LC97 str x0, [sp, 1160] mov w0, 6 str w0, [sp, 1168] adrp x0, .LC98 add x0, x0, :lo12:.LC98 str x0, [sp, 1176] mov w0, 6 str w0, [sp, 1184] adrp x0, .LC99 add x0, x0, :lo12:.LC99 str x0, [sp, 1192] mov w0, 6 str w0, [sp, 1200] adrp x0, .LC100 add x0, x0, :lo12:.LC100 str x0, [sp, 1208] mov w0, 6 str w0, [sp, 1216] adrp x0, .LC54 add x0, x0, :lo12:.LC54 str x0, [sp, 1224] adrp x0, .LC55 add x0, x0, :lo12:.LC55 str x0, [sp, 1240] adrp x0, .LC56 add x0, x0, :lo12:.LC56 str x0, [sp, 1256] mov w2, 0 mov w1, 3 mov w0, 16 bl socket str w0, [sp, 28] ldr w0, [sp, 28] cmn w0, #1 bne .L155 mov w0, 1 bl exit .L155: str wzr, [sp, 24] b .L156 .L157: ldr w0, [sp, 24] lsl x0, x0, 4 add x1, sp, 88 ldr x2, [x1, x0] ldr w0, [sp, 24] lsl x0, x0, 4 add x1, sp, 96 ldr x0, [x1, x0] mov x3, x0 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_device ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L156: ldr w0, [sp, 24] cmp w0, 15 bls .L157 str wzr, [sp, 24] b .L158 .L159: sub x0, sp, #584 add x0, x0, 640 ldr w1, [sp, 24] ldr x0, [x0, x1, lsl 3] add x3, sp, 1320 mov x2, x0 adrp x0, .LC101 add x1, x0, :lo12:.LC101 mov x0, x3 bl sprintf sub x0, sp, #584 add x0, x0, 640 ldr w1, [sp, 24] ldr x0, [x0, x1, lsl 3] add x3, sp, 1352 mov x2, x0 adrp x0, .LC102 add x1, x0, :lo12:.LC102 mov x0, x3 bl sprintf add x1, sp, 1352 add x0, sp, 1320 mov x3, x1 mov x2, x0 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_veth sub x0, sp, #584 add x0, x0, 640 ldr w1, [sp, 24] ldr x0, [x0, x1, lsl 3] add x3, sp, 1384 mov x2, x0 adrp x0, .LC103 add x1, x0, :lo12:.LC103 mov x0, x3 bl sprintf sub x0, sp, #584 add x0, x0, 640 ldr w1, [sp, 24] ldr x0, [x0, x1, lsl 3] add x3, sp, 1416 mov x2, x0 adrp x0, .LC104 add x1, x0, :lo12:.LC104 mov x0, x3 bl sprintf add x1, sp, 1416 add x0, sp, 1384 mov x3, x1 mov x2, x0 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_veth sub x0, sp, #584 add x0, x0, 640 ldr w1, [sp, 24] ldr x0, [x0, x1, lsl 3] add x3, sp, 1288 mov x2, x0 adrp x0, .LC105 add x1, x0, :lo12:.LC105 mov x0, x3 bl sprintf add x1, sp, 1288 add x0, sp, 1320 mov x7, 0 mov w6, 0 mov x5, 0 mov x4, x1 mov w3, 0 mov x2, x0 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_device_change add x1, sp, 1288 add x0, sp, 1384 mov x7, 0 mov w6, 0 mov x5, 0 mov x4, x1 mov w3, 0 mov x2, x0 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_device_change ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L158: ldr w0, [sp, 24] cmp w0, 3 bls .L159 mov x7, 0 mov w6, 0 mov x5, 0 mov x4, 0 mov w3, 1 adrp x0, .LC106 add x2, x0, :lo12:.LC106 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_device_change mov x7, 0 mov w6, 0 mov x5, 0 mov x4, 0 mov w3, 1 adrp x0, .LC107 add x2, x0, :lo12:.LC107 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_device_change adrp x0, .LC76 add x3, x0, :lo12:.LC76 adrp x0, .LC108 add x2, x0, :lo12:.LC108 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_veth adrp x0, .LC77 add x3, x0, :lo12:.LC77 adrp x0, .LC109 add x2, x0, :lo12:.LC109 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_veth adrp x0, .LC109 add x4, x0, :lo12:.LC109 adrp x0, .LC108 add x3, x0, :lo12:.LC108 adrp x0, .LC78 add x2, x0, :lo12:.LC78 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_hsr mov x7, 0 mov w6, 0 mov x5, 0 mov x4, 0 mov w3, 1 adrp x0, .LC108 add x2, x0, :lo12:.LC108 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_device_change mov x7, 0 mov w6, 0 mov x5, 0 mov x4, 0 mov w3, 1 adrp x0, .LC109 add x2, x0, :lo12:.LC109 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_device_change adrp x0, .LC81 add x3, x0, :lo12:.LC81 adrp x0, .LC80 add x2, x0, :lo12:.LC80 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_veth adrp x0, .LC81 add x4, x0, :lo12:.LC81 adrp x0, .LC82 add x3, x0, :lo12:.LC82 adrp x0, .LC110 add x2, x0, :lo12:.LC110 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_linked adrp x0, .LC84 add x3, x0, :lo12:.LC84 adrp x0, .LC83 add x2, x0, :lo12:.LC83 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_veth mov w0, -32512 bl htons and w0, w0, 65535 mov w5, w0 mov w4, 0 adrp x0, .LC83 add x3, x0, :lo12:.LC83 adrp x0, .LC85 add x2, x0, :lo12:.LC85 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_vlan mov w0, -30552 bl htons and w0, w0, 65535 mov w5, w0 mov w4, 1 adrp x0, .LC83 add x3, x0, :lo12:.LC83 adrp x0, .LC86 add x2, x0, :lo12:.LC86 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_vlan adrp x0, .LC84 add x3, x0, :lo12:.LC84 adrp x0, .LC87 add x2, x0, :lo12:.LC87 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_macvlan adrp x0, .LC84 add x3, x0, :lo12:.LC84 adrp x0, .LC88 add x2, x0, :lo12:.LC88 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_macvlan mov w5, 0 mov w4, 0 adrp x0, .LC83 add x3, x0, :lo12:.LC83 adrp x0, .LC89 add x2, x0, :lo12:.LC89 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_ipvlan mov w5, 2 mov w4, 2 adrp x0, .LC83 add x3, x0, :lo12:.LC83 adrp x0, .LC90 add x2, x0, :lo12:.LC90 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_ipvlan adrp x0, .LC92 add x3, x0, :lo12:.LC92 adrp x0, .LC91 add x2, x0, :lo12:.LC91 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_veth adrp x0, .LC91 add x4, x0, :lo12:.LC91 adrp x0, .LC93 add x3, x0, :lo12:.LC93 adrp x0, .LC111 add x2, x0, :lo12:.LC111 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_linked adrp x0, .LC92 add x4, x0, :lo12:.LC92 adrp x0, .LC94 add x3, x0, :lo12:.LC94 adrp x0, .LC112 add x2, x0, :lo12:.LC112 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_linked add x3, sp, 1384 mov w2, 24 adrp x0, .LC113 add x1, x0, :lo12:.LC113 mov x0, x3 bl sprintf add x1, sp, 16 add x0, sp, 1384 mov x2, x1 mov x1, x0 mov w0, 2 bl inet_pton cmp w0, 0 bgt .L160 mov w0, 1 bl exit .L160: add x0, sp, 40 mov x2, x0 adrp x0, .LC114 add x1, x0, :lo12:.LC114 mov w0, 10 bl inet_pton cmp w0, 0 bgt .L161 mov w0, 1 bl exit .L161: add x0, sp, 16 mov x5, 0 mov x4, x0 mov w3, 0 adrp x0, .LC99 add x2, x0, :lo12:.LC99 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_geneve add x0, sp, 40 mov x5, x0 mov x4, 0 mov w3, 1 adrp x0, .LC100 add x2, x0, :lo12:.LC100 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_geneve adrp x0, procid add x0, x0, :lo12:procid ldr x0, [x0] mov w1, 4 bl netdevsim_add bl netlink_wireguard_setup str wzr, [sp, 24] b .L162 .L164: ldr w0, [sp, 24] add w0, w0, 10 add x3, sp, 1416 mov w2, w0 adrp x0, .LC113 add x1, x0, :lo12:.LC113 mov x0, x3 bl sprintf ldr w0, [sp, 24] lsl x0, x0, 4 add x1, sp, 344 ldr x0, [x1, x0] add x1, sp, 1416 mov x3, x1 mov x2, x0 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_addr4 ldr w0, [sp, 24] lsl x0, x0, 4 add x1, sp, 356 ldrb w0, [x1, x0] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L163 ldr w0, [sp, 24] add w0, w0, 10 add x3, sp, 1416 mov w2, w0 adrp x0, .LC115 add x1, x0, :lo12:.LC115 mov x0, x3 bl sprintf ldr w0, [sp, 24] lsl x0, x0, 4 add x1, sp, 344 ldr x0, [x1, x0] add x1, sp, 1416 mov x3, x1 mov x2, x0 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_addr6 .L163: ldr w0, [sp, 24] add x0, x0, 10 lsl x1, x0, 40 mov w0, 2863311530 movk x0, 0xaa, lsl 32 add x0, x1, x0 str x0, [sp, 32] ldr w0, [sp, 24] lsl x0, x0, 4 add x1, sp, 344 ldr x2, [x1, x0] ldr w0, [sp, 24] lsl x0, x0, 4 add x1, sp, 352 ldr w1, [x1, x0] add x0, sp, 32 mov x7, 0 mov w6, w1 mov x5, x0 mov x4, 0 mov w3, 1 ldr w1, [sp, 28] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_device_change ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L162: ldr w0, [sp, 24] cmp w0, 57 bls .L164 ldr w0, [sp, 28] bl close nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1448] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L165 bl __stack_chk_fail .L165: ldp x29, x30, [sp] add sp, sp, 1456 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE71: .size initialize_netdevices, .-initialize_netdevices .data .align 3 .LC57: .xword .LC1 .xword .LC2 .xword .LC3 .xword .LC4 .text .section .rodata .align 3 .LC116: .string "nr" .align 3 .LC117: .string "rose" .align 3 .LC118: .string "172.30.%d.%d" .align 3 .LC119: .string "fe88::%02x:%02x" .text .align 2 .type initialize_netdevices_init, %function initialize_netdevices_init: .LFB72: .cfi_startproc stp x29, x30, [sp, -144]! .cfi_def_cfa_offset 144 .cfi_offset 29, -144 .cfi_offset 30, -136 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 136] mov x1, 0 mov w2, 0 mov w1, 3 mov w0, 16 bl socket str w0, [sp, 24] ldr w0, [sp, 24] cmn w0, #1 bne .L167 mov w0, 1 bl exit .L167: stp xzr, xzr, [sp, 40] stp xzr, xzr, [sp, 56] adrp x0, .LC116 add x0, x0, :lo12:.LC116 str x0, [sp, 40] mov w0, 7 str w0, [sp, 48] mov w0, 1 strb w0, [sp, 52] adrp x0, .LC117 add x0, x0, :lo12:.LC117 str x0, [sp, 56] mov w0, 5 str w0, [sp, 64] mov w0, 1 strb w0, [sp, 68] mov w0, 1 strb w0, [sp, 69] str wzr, [sp, 20] b .L168 .L170: ldr w0, [sp, 20] lsl x0, x0, 4 add x1, sp, 40 ldr x1, [x1, x0] adrp x0, procid add x0, x0, :lo12:procid ldr x0, [x0] add x4, sp, 72 mov w3, w0 mov x2, x1 adrp x0, .LC24 add x1, x0, :lo12:.LC24 mov x0, x4 bl sprintf adrp x0, procid add x0, x0, :lo12:procid ldr x0, [x0] add w0, w0, 1 add x4, sp, 104 mov w3, w0 ldr w2, [sp, 20] adrp x0, .LC118 add x1, x0, :lo12:.LC118 mov x0, x4 bl sprintf add x1, sp, 104 add x0, sp, 72 mov x3, x1 mov x2, x0 ldr w1, [sp, 24] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_addr4 ldr w0, [sp, 20] lsl x0, x0, 4 add x1, sp, 52 ldrb w0, [x1, x0] eor w0, w0, 1 and w0, w0, 255 cmp w0, 0 beq .L169 adrp x0, procid add x0, x0, :lo12:procid ldr x0, [x0] add w0, w0, 1 add x4, sp, 104 mov w3, w0 ldr w2, [sp, 20] adrp x0, .LC119 add x1, x0, :lo12:.LC119 mov x0, x4 bl sprintf add x1, sp, 104 add x0, sp, 72 mov x3, x1 mov x2, x0 ldr w1, [sp, 24] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_add_addr6 .L169: ldr w0, [sp, 20] lsl x0, x0, 4 add x1, sp, 48 ldr w0, [x1, x0] str w0, [sp, 28] ldr w1, [sp, 20] ldr w0, [sp, 28] sub w0, w0, #2 lsl w0, w0, 3 lsl x1, x1, x0 adrp x0, procid add x0, x0, :lo12:procid ldr x2, [x0] ldr w0, [sp, 28] sub w0, w0, #1 lsl w0, w0, 3 lsl x0, x2, x0 add x1, x1, x0 mov x0, 48059 movk x0, 0xbb, lsl 16 add x0, x1, x0 str x0, [sp, 32] ldr w0, [sp, 20] lsl x0, x0, 4 add x1, sp, 53 ldrb w0, [x1, x0] cmp w0, 0 cset w0, ne and w0, w0, 255 eor w0, w0, 1 and w0, w0, 255 and w0, w0, 1 and w2, w0, 255 add x1, sp, 32 add x0, sp, 72 mov x7, 0 ldr w6, [sp, 28] mov x5, x1 mov x4, 0 mov w3, w2 mov x2, x0 ldr w1, [sp, 24] adrp x0, nlmsg add x0, x0, :lo12:nlmsg bl netlink_device_change ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L168: ldr w0, [sp, 20] cmp w0, 1 bls .L170 ldr w0, [sp, 24] bl close nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 136] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L171 bl __stack_chk_fail .L171: ldp x29, x30, [sp], 144 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE72: .size initialize_netdevices_init, .-initialize_netdevices_init .section .rodata .align 3 .LC120: .string "fusectl" .align 3 .LC121: .string "/sys/fs/fuse/connections" .text .align 2 .type setup_common, %function setup_common: .LFB73: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp mov x4, 0 mov x3, 0 adrp x0, .LC120 add x2, x0, :lo12:.LC120 adrp x0, .LC121 add x1, x0, :lo12:.LC121 mov x0, 0 bl mount nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE73: .size setup_common, .-setup_common .align 2 .type sandbox_common, %function sandbox_common: .LFB74: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 mov w4, 0 mov w3, 0 mov w2, 0 mov w1, 9 mov w0, 1 bl prctl bl setpgrp bl setsid mov x0, 209715200 str x0, [sp, 32] ldr x0, [sp, 32] str x0, [sp, 24] add x0, sp, 24 mov x1, x0 mov w0, 9 bl setrlimit mov x0, 33554432 str x0, [sp, 32] ldr x0, [sp, 32] str x0, [sp, 24] add x0, sp, 24 mov x1, x0 mov w0, 8 bl setrlimit mov x0, 142606336 str x0, [sp, 32] ldr x0, [sp, 32] str x0, [sp, 24] add x0, sp, 24 mov x1, x0 mov w0, 1 bl setrlimit mov x0, 1048576 str x0, [sp, 32] ldr x0, [sp, 32] str x0, [sp, 24] add x0, sp, 24 mov x1, x0 mov w0, 3 bl setrlimit str xzr, [sp, 32] ldr x0, [sp, 32] str x0, [sp, 24] add x0, sp, 24 mov x1, x0 mov w0, 4 bl setrlimit mov x0, 256 str x0, [sp, 32] ldr x0, [sp, 32] str x0, [sp, 24] add x0, sp, 24 mov x1, x0 mov w0, 7 bl setrlimit mov w0, 131072 bl unshare mov w0, 134217728 bl unshare mov w0, 33554432 bl unshare mov w0, 67108864 bl unshare mov w0, 262144 bl unshare str wzr, [sp, 20] b .L174 .L175: adrp x0, sysctls.0 add x1, x0, :lo12:sysctls.0 ldr w0, [sp, 20] lsl x0, x0, 4 add x0, x1, x0 ldr x2, [x0] adrp x0, sysctls.0 add x1, x0, :lo12:sysctls.0 ldr w0, [sp, 20] lsl x0, x0, 4 add x0, x1, x0 ldr x0, [x0, 8] mov x1, x0 mov x0, x2 bl write_file ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L174: ldr w0, [sp, 20] cmp w0, 6 bls .L175 nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 40] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L176 bl __stack_chk_fail .L176: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE74: .size sandbox_common, .-sandbox_common .align 2 .type wait_for_loop, %function wait_for_loop: .LFB75: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str w0, [sp, 28] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 ldr w0, [sp, 28] cmp w0, 0 bge .L178 mov w0, 1 bl exit .L178: str wzr, [sp, 36] nop .L179: add x0, sp, 36 mov w2, 1073741824 mov x1, x0 mov w0, -1 bl waitpid mov w1, w0 ldr w0, [sp, 28] cmp w0, w1 bne .L179 ldr w0, [sp, 36] asr w0, w0, 8 and w0, w0, 255 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 40] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L181 bl __stack_chk_fail .L181: mov w0, w1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE75: .size wait_for_loop, .-wait_for_loop .align 2 .type drop_caps, %function drop_caps: .LFB76: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 str xzr, [sp, 24] stp xzr, xzr, [sp, 32] str xzr, [sp, 48] mov w0, 1314 movk w0, 0x2008, lsl 16 str w0, [sp, 24] bl getpid str w0, [sp, 28] add x1, sp, 32 add x0, sp, 24 mov x2, x1 mov x1, x0 mov x0, 90 bl syscall cmp x0, 0 beq .L183 mov w0, 1 bl exit .L183: mov w0, 8912896 str w0, [sp, 20] ldr w1, [sp, 32] ldr w0, [sp, 20] mvn w0, w0 and w0, w1, w0 str w0, [sp, 32] ldr w1, [sp, 36] ldr w0, [sp, 20] mvn w0, w0 and w0, w1, w0 str w0, [sp, 36] ldr w1, [sp, 40] ldr w0, [sp, 20] mvn w0, w0 and w0, w1, w0 str w0, [sp, 40] add x1, sp, 32 add x0, sp, 24 mov x2, x1 mov x1, x0 mov x0, 91 bl syscall cmp x0, 0 beq .L186 mov w0, 1 bl exit .L186: nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 56] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L185 bl __stack_chk_fail .L185: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE76: .size drop_caps, .-drop_caps .align 2 .type do_sandbox_none, %function do_sandbox_none: .LFB77: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov w0, 536870912 bl unshare bl fork str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 0 beq .L188 ldr w0, [sp, 28] bl wait_for_loop b .L190 .L188: bl setup_common bl sandbox_common bl drop_caps bl initialize_netdevices_init mov w0, 1073741824 bl unshare bl initialize_tun bl initialize_netdevices bl loop mov w0, 1 bl exit .L190: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE77: .size do_sandbox_none, .-do_sandbox_none .local threads .comm threads,256,8 .local running .comm running,4,4 .global __aarch64_ldadd4_relax .align 2 .type thr, %function thr: .LFB78: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] str x0, [sp, 40] .L192: ldr x0, [sp, 40] add x0, x0, 8 bl event_wait ldr x0, [sp, 40] add x0, x0, 8 bl event_reset ldr x0, [sp, 40] ldr w0, [x0, 4] bl execute_call adrp x0, running add x1, x0, :lo12:running mov w0, 1 neg w0, w0 bl __aarch64_ldadd4_relax ldr x0, [sp, 40] add x0, x0, 12 bl event_set b .L192 .cfi_endproc .LFE78: .size thr, .-thr .align 2 .type loop, %function loop: .LFB79: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str wzr, [sp, 36] .L194: str wzr, [sp, 28] b .L195 .L203: str wzr, [sp, 32] b .L196 .L202: ldrsw x0, [sp, 32] lsl x1, x0, 4 adrp x0, threads add x0, x0, :lo12:threads add x0, x1, x0 str x0, [sp, 40] ldr x0, [sp, 40] ldr w0, [x0] cmp w0, 0 bne .L197 ldr x0, [sp, 40] mov w1, 1 str w1, [x0] ldr x0, [sp, 40] add x0, x0, 8 bl event_init ldr x0, [sp, 40] add x0, x0, 12 bl event_init ldr x0, [sp, 40] add x0, x0, 12 bl event_set ldr x1, [sp, 40] adrp x0, thr add x0, x0, :lo12:thr bl thread_start .L197: ldr x0, [sp, 40] add x0, x0, 12 bl event_isset cmp w0, 0 beq .L209 ldr x0, [sp, 40] add x0, x0, 12 bl event_reset ldr x0, [sp, 40] ldr w1, [sp, 28] str w1, [x0, 4] adrp x0, running add x0, x0, :lo12:running mov x1, x0 mov w0, 1 bl __aarch64_ldadd4_relax ldr x0, [sp, 40] add x0, x0, 8 bl event_set ldr w0, [sp, 36] cmp w0, 0 beq .L200 ldr w0, [sp, 28] and w0, w0, 1 cmp w0, 0 beq .L210 .L200: ldr x0, [sp, 40] add x0, x0, 12 mov x1, 45 bl event_timedwait b .L201 .L209: nop ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L196: ldr w0, [sp, 32] cmp w0, 15 ble .L202 b .L201 .L210: nop .L201: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L195: ldr w0, [sp, 28] cmp w0, 12 ble .L203 str wzr, [sp, 24] b .L204 .L206: mov x0, 1 bl sleep_ms ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L204: ldr w0, [sp, 24] cmp w0, 99 bgt .L205 adrp x0, running add x0, x0, :lo12:running ldr w0, [x0] cmp w0, 0 bne .L206 .L205: ldr w0, [sp, 36] cmp w0, 0 bne .L211 mov w0, 1 str w0, [sp, 36] b .L194 .L211: nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE79: .size loop, .-loop .global r .data .align 3 .type r, %object .size r, 88 r: .xword -1 .xword -1 .xword -1 .xword 0 .xword -1 .xword -1 .xword -1 .xword 0 .xword -1 .xword -1 .xword 0 .section .rodata .align 3 .LC122: .string "hsr" .string "" .text .align 2 .type execute_call, %function execute_call: .LFB80: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str w0, [sp, 28] str xzr, [sp, 40] ldr w0, [sp, 28] cmp w0, 12 beq .L213 ldr w0, [sp, 28] cmp w0, 12 bgt .L238 ldr w0, [sp, 28] cmp w0, 11 beq .L215 ldr w0, [sp, 28] cmp w0, 11 bgt .L238 ldr w0, [sp, 28] cmp w0, 10 beq .L216 ldr w0, [sp, 28] cmp w0, 10 bgt .L238 ldr w0, [sp, 28] cmp w0, 9 beq .L217 ldr w0, [sp, 28] cmp w0, 9 bgt .L238 ldr w0, [sp, 28] cmp w0, 8 beq .L218 ldr w0, [sp, 28] cmp w0, 8 bgt .L238 ldr w0, [sp, 28] cmp w0, 7 beq .L219 ldr w0, [sp, 28] cmp w0, 7 bgt .L238 ldr w0, [sp, 28] cmp w0, 6 beq .L220 ldr w0, [sp, 28] cmp w0, 6 bgt .L238 ldr w0, [sp, 28] cmp w0, 5 beq .L221 ldr w0, [sp, 28] cmp w0, 5 bgt .L238 ldr w0, [sp, 28] cmp w0, 4 beq .L222 ldr w0, [sp, 28] cmp w0, 4 bgt .L238 ldr w0, [sp, 28] cmp w0, 3 beq .L223 ldr w0, [sp, 28] cmp w0, 3 bgt .L238 ldr w0, [sp, 28] cmp w0, 2 beq .L224 ldr w0, [sp, 28] cmp w0, 2 bgt .L238 ldr w0, [sp, 28] cmp w0, 0 beq .L225 ldr w0, [sp, 28] cmp w0, 1 beq .L226 b .L238 .L225: mov w3, 0 mov x2, 3 mov x1, 16 mov x0, 198 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L239 ldr x1, [sp, 40] adrp x0, r add x0, x0, :lo12:r str x1, [x0] b .L239 .L226: mov x4, 192 movk x4, 0x2000, lsl 16 mov w3, 0 mov x2, 5 mov x1, 1 mov x0, 199 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L240 mov x0, 196 movk x0, 0x2000, lsl 16 ldr w0, [x0] uxtw x1, w0 adrp x0, r add x0, x0, :lo12:r str x1, [x0, 8] b .L240 .L224: adrp x0, r add x0, x0, :lo12:r ldr x0, [x0, 8] mov x1, x0 mov x0, 23 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L241 ldr x1, [sp, 40] adrp x0, r add x0, x0, :lo12:r str x1, [x0, 16] b .L241 .L223: mov x0, 320 movk x0, 0x2000, lsl 16 mov w1, 20 str w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x0, [x0, 16] mov x3, 320 movk x3, 0x2000, lsl 16 mov x2, 192 movk x2, 0x2000, lsl 16 mov x1, x0 mov x0, 204 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L242 mov x0, 196 movk x0, 0x2000, lsl 16 ldr w0, [x0] uxtw x1, w0 adrp x0, r add x0, x0, :lo12:r str x1, [x0, 24] b .L242 .L222: mov w3, 0 mov x2, 3 mov x1, 16 mov x0, 198 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L243 ldr x1, [sp, 40] adrp x0, r add x0, x0, :lo12:r str x1, [x0, 32] b .L243 .L221: mov x4, 192 movk x4, 0x2000, lsl 16 mov w3, 0 mov x2, 5 mov x1, 1 mov x0, 199 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L244 mov x0, 196 movk x0, 0x2000, lsl 16 ldr w0, [x0] uxtw x1, w0 adrp x0, r add x0, x0, :lo12:r str x1, [x0, 40] b .L244 .L220: adrp x0, r add x0, x0, :lo12:r ldr x0, [x0, 40] mov x1, x0 mov x0, 23 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L245 ldr x1, [sp, 40] adrp x0, r add x0, x0, :lo12:r str x1, [x0, 48] b .L245 .L219: mov x0, 320 movk x0, 0x2000, lsl 16 mov w1, 20 str w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x0, [x0, 48] mov x3, 320 movk x3, 0x2000, lsl 16 mov x2, 192 movk x2, 0x2000, lsl 16 mov x1, x0 mov x0, 204 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L246 mov x0, 196 movk x0, 0x2000, lsl 16 ldr w0, [x0] uxtw x1, w0 adrp x0, r add x0, x0, :lo12:r str x1, [x0, 56] b .L246 .L218: mov x4, 192 movk x4, 0x2000, lsl 16 mov w3, 0 mov x2, 5 mov x1, 1 mov x0, 199 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L247 mov x0, 196 movk x0, 0x2000, lsl 16 ldr w0, [x0] uxtw x1, w0 adrp x0, r add x0, x0, :lo12:r str x1, [x0, 64] b .L247 .L217: adrp x0, r add x0, x0, :lo12:r ldr x0, [x0, 64] mov x1, x0 mov x0, 23 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L248 ldr x1, [sp, 40] adrp x0, r add x0, x0, :lo12:r str x1, [x0, 72] b .L248 .L216: mov x0, 320 movk x0, 0x2000, lsl 16 mov w1, 20 str w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x0, [x0, 72] mov x3, 320 movk x3, 0x2000, lsl 16 mov x2, 192 movk x2, 0x2000, lsl 16 mov x1, x0 mov x0, 204 bl syscall str x0, [sp, 40] ldr x0, [sp, 40] cmn x0, #1 beq .L249 mov x0, 196 movk x0, 0x2000, lsl 16 ldr w0, [x0] uxtw x1, w0 adrp x0, r add x0, x0, :lo12:r str x1, [x0, 80] b .L249 .L215: mov x0, 64 movk x0, 0x2000, lsl 16 str xzr, [x0] mov x0, 72 movk x0, 0x2000, lsl 16 mov w1, 10237 movk w1, 0x2, lsl 16 str w1, [x0] mov x0, 80 movk x0, 0x2000, lsl 16 mov x1, 1024 movk x1, 0x2000, lsl 16 str x1, [x0] mov x0, 1024 movk x0, 0x2000, lsl 16 mov x1, 128 movk x1, 0x2000, lsl 16 str x1, [x0] mov x0, 128 movk x0, 0x2000, lsl 16 mov w1, 64 str w1, [x0] mov x0, 132 movk x0, 0x2000, lsl 16 mov w1, 16 strh w1, [x0] mov x0, 134 movk x0, 0x2000, lsl 16 mov w1, 1797 strh w1, [x0] mov x0, 136 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 140 movk x0, 0x2000, lsl 16 mov w1, 56319 movk w1, 0x25df, lsl 16 str w1, [x0] mov x0, 144 movk x0, 0x2000, lsl 16 strb wzr, [x0] mov x0, 145 movk x0, 0x2000, lsl 16 strb wzr, [x0] mov x0, 146 movk x0, 0x2000, lsl 16 strh wzr, [x0] mov x0, 148 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 152 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 156 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 160 movk x0, 0x2000, lsl 16 mov w1, 32 strh w1, [x0] mov x0, 162 movk x0, 0x2000, lsl 16 ldrh w0, [x0] and w0, w0, -16384 and w2, w0, 65535 mov x0, 162 movk x0, 0x2000, lsl 16 mov w1, 18 orr w1, w2, w1 and w1, w1, 65535 strh w1, [x0] mov x0, 163 movk x0, 0x2000, lsl 16 ldrh w1, [x0] mov x0, 163 movk x0, 0x2000, lsl 16 and w1, w1, -65 and w1, w1, 65535 strh w1, [x0] mov x0, 163 movk x0, 0x2000, lsl 16 ldrh w1, [x0] mov x0, 163 movk x0, 0x2000, lsl 16 orr w1, w1, 128 and w1, w1, 65535 strh w1, [x0] mov x0, 164 movk x0, 0x2000, lsl 16 mov w1, 8 strh w1, [x0] mov x0, 166 movk x0, 0x2000, lsl 16 mov w1, 1 strh w1, [x0] mov x2, 4 adrp x0, .LC122 add x1, x0, :lo12:.LC122 mov x0, 168 movk x0, 0x2000, lsl 16 bl memcpy mov x0, 172 movk x0, 0x2000, lsl 16 mov w1, 20 strh w1, [x0] mov x0, 174 movk x0, 0x2000, lsl 16 ldrh w0, [x0] and w0, w0, -16384 and w1, w0, 65535 mov x0, 174 movk x0, 0x2000, lsl 16 orr w1, w1, 2 and w1, w1, 65535 strh w1, [x0] mov x0, 175 movk x0, 0x2000, lsl 16 ldrh w1, [x0] mov x0, 175 movk x0, 0x2000, lsl 16 and w1, w1, -65 and w1, w1, 65535 strh w1, [x0] mov x0, 175 movk x0, 0x2000, lsl 16 ldrh w1, [x0] mov x0, 175 movk x0, 0x2000, lsl 16 orr w1, w1, 128 and w1, w1, 65535 strh w1, [x0] mov x0, 176 movk x0, 0x2000, lsl 16 mov w1, 8 strh w1, [x0] mov x0, 178 movk x0, 0x2000, lsl 16 mov w1, 2 strh w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x1, [x0, 56] mov x0, 180 movk x0, 0x2000, lsl 16 str w1, [x0] mov x0, 184 movk x0, 0x2000, lsl 16 mov w1, 8 strh w1, [x0] mov x0, 186 movk x0, 0x2000, lsl 16 mov w1, 1 strh w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x1, [x0, 80] mov x0, 188 movk x0, 0x2000, lsl 16 str w1, [x0] mov x0, 1032 movk x0, 0x2000, lsl 16 mov x1, 64 str x1, [x0] mov x0, 88 movk x0, 0x2000, lsl 16 mov x1, 1 str x1, [x0] mov x0, 96 movk x0, 0x2000, lsl 16 str xzr, [x0] mov x0, 104 movk x0, 0x2000, lsl 16 str xzr, [x0] mov x0, 112 movk x0, 0x2000, lsl 16 str wzr, [x0] adrp x0, r add x0, x0, :lo12:r ldr x0, [x0, 32] mov x3, 0 mov x2, 64 movk x2, 0x2000, lsl 16 mov x1, x0 mov x0, 211 bl syscall b .L214 .L213: mov x0, 64 movk x0, 0x2000, lsl 16 str xzr, [x0] mov x0, 72 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 80 movk x0, 0x2000, lsl 16 mov x1, 1024 movk x1, 0x2000, lsl 16 str x1, [x0] mov x0, 1024 movk x0, 0x2000, lsl 16 mov x1, 536870912 str x1, [x0] mov x0, 536870912 mov w1, 64 str w1, [x0] mov x0, 4 movk x0, 0x2000, lsl 16 mov w1, 16 strh w1, [x0] mov x0, 6 movk x0, 0x2000, lsl 16 mov w1, 1797 strh w1, [x0] mov x0, 8 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 12 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 16 movk x0, 0x2000, lsl 16 strb wzr, [x0] mov x0, 17 movk x0, 0x2000, lsl 16 strb wzr, [x0] mov x0, 18 movk x0, 0x2000, lsl 16 strh wzr, [x0] mov x0, 20 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 24 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 28 movk x0, 0x2000, lsl 16 mov w1, 10499 movk w1, 0x4, lsl 16 str w1, [x0] mov x0, 32 movk x0, 0x2000, lsl 16 mov w1, 32 strh w1, [x0] mov x0, 34 movk x0, 0x2000, lsl 16 ldrh w0, [x0] and w0, w0, -16384 and w2, w0, 65535 mov x0, 34 movk x0, 0x2000, lsl 16 mov w1, 18 orr w1, w2, w1 and w1, w1, 65535 strh w1, [x0] mov x0, 35 movk x0, 0x2000, lsl 16 ldrh w1, [x0] mov x0, 35 movk x0, 0x2000, lsl 16 and w1, w1, -65 and w1, w1, 65535 strh w1, [x0] mov x0, 35 movk x0, 0x2000, lsl 16 ldrh w1, [x0] mov x0, 35 movk x0, 0x2000, lsl 16 orr w1, w1, 128 and w1, w1, 65535 strh w1, [x0] mov x0, 36 movk x0, 0x2000, lsl 16 mov w1, 8 strh w1, [x0] mov x0, 38 movk x0, 0x2000, lsl 16 mov w1, 1 strh w1, [x0] mov x2, 4 adrp x0, .LC122 add x1, x0, :lo12:.LC122 mov x0, 40 movk x0, 0x2000, lsl 16 bl memcpy mov x0, 44 movk x0, 0x2000, lsl 16 mov w1, 20 strh w1, [x0] mov x0, 46 movk x0, 0x2000, lsl 16 ldrh w0, [x0] and w0, w0, -16384 and w1, w0, 65535 mov x0, 46 movk x0, 0x2000, lsl 16 orr w1, w1, 2 and w1, w1, 65535 strh w1, [x0] mov x0, 47 movk x0, 0x2000, lsl 16 ldrh w1, [x0] mov x0, 47 movk x0, 0x2000, lsl 16 and w1, w1, -65 and w1, w1, 65535 strh w1, [x0] mov x0, 47 movk x0, 0x2000, lsl 16 ldrh w1, [x0] mov x0, 47 movk x0, 0x2000, lsl 16 orr w1, w1, 128 and w1, w1, 65535 strh w1, [x0] mov x0, 48 movk x0, 0x2000, lsl 16 mov w1, 8 strh w1, [x0] mov x0, 50 movk x0, 0x2000, lsl 16 mov w1, 1 strh w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x1, [x0, 24] mov x0, 52 movk x0, 0x2000, lsl 16 str w1, [x0] mov x0, 56 movk x0, 0x2000, lsl 16 mov w1, 8 strh w1, [x0] mov x0, 58 movk x0, 0x2000, lsl 16 mov w1, 2 strh w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x1, [x0, 80] mov x0, 60 movk x0, 0x2000, lsl 16 str w1, [x0] mov x0, 1032 movk x0, 0x2000, lsl 16 mov x1, 64 str x1, [x0] mov x0, 88 movk x0, 0x2000, lsl 16 mov x1, 1 str x1, [x0] mov x0, 96 movk x0, 0x2000, lsl 16 str xzr, [x0] mov x0, 104 movk x0, 0x2000, lsl 16 str xzr, [x0] mov x0, 112 movk x0, 0x2000, lsl 16 mov w1, 32769 movk w1, 0x400, lsl 16 str w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x0, [x0] mov x3, 0 mov x2, 64 movk x2, 0x2000, lsl 16 mov x1, x0 mov x0, 211 bl syscall b .L214 .L239: nop b .L238 .L240: nop b .L238 .L241: nop b .L238 .L242: nop b .L238 .L243: nop b .L238 .L244: nop b .L238 .L245: nop b .L238 .L246: nop b .L238 .L247: nop b .L238 .L248: nop b .L238 .L249: nop .L214: .L238: nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE80: .size execute_call, .-execute_call .align 2 .global main .type main, %function main: .LFB81: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp mov x6, 0 mov w5, -1 mov x4, 50 mov x3, 0 mov x2, 4096 mov x1, 536866816 mov x0, 222 bl syscall mov x6, 0 mov w5, -1 mov x4, 50 mov x3, 7 mov x2, 16777216 mov x1, 536870912 mov x0, 222 bl syscall mov x6, 0 mov w5, -1 mov x4, 50 mov x3, 0 mov x2, 4096 mov x1, 553648128 mov x0, 222 bl syscall bl do_sandbox_none mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE81: .size main, .-main .section .rodata .align 3 .LC123: .string "/proc/sys/kernel/shmmax" .align 3 .LC124: .string "16777216" .align 3 .LC125: .string "/proc/sys/kernel/shmall" .align 3 .LC126: .string "536870912" .align 3 .LC127: .string "/proc/sys/kernel/shmmni" .align 3 .LC128: .string "1024" .align 3 .LC129: .string "/proc/sys/kernel/msgmax" .align 3 .LC130: .string "8192" .align 3 .LC131: .string "/proc/sys/kernel/msgmni" .align 3 .LC132: .string "/proc/sys/kernel/msgmnb" .align 3 .LC133: .string "/proc/sys/kernel/sem" .align 3 .LC134: .string "1024 1048576 500 1024" .section .data.rel.ro.local,"aw" .align 3 .type sysctls.0, %object .size sysctls.0, 112 sysctls.0: .xword .LC123 .xword .LC124 .xword .LC125 .xword .LC126 .xword .LC127 .xword .LC128 .xword .LC129 .xword .LC130 .xword .LC131 .xword .LC128 .xword .LC132 .xword .LC128 .xword .LC133 .xword .LC134 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .type getushort, %function getushort: .LFB6: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] bl getc str w0, [sp, 40] ldr x0, [sp, 24] bl getc str w0, [sp, 44] ldr w0, [sp, 44] cmn w0, #1 bne .L2 mov w0, -1 b .L3 .L2: ldr w0, [sp, 40] lsl w1, w0, 8 ldr w0, [sp, 44] orr w0, w1, w0 .L3: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size getushort, .-getushort .align 2 .type getlong, %function getlong: .LFB7: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] bl getc str w0, [sp, 32] ldr x0, [sp, 24] bl getc str w0, [sp, 36] ldr x0, [sp, 24] bl getc str w0, [sp, 40] ldr x0, [sp, 24] bl getc str w0, [sp, 44] ldr w0, [sp, 44] cmn w0, #1 bne .L5 mov w0, -1 b .L6 .L5: ldr w0, [sp, 32] lsl w1, w0, 24 ldr w0, [sp, 36] lsl w0, w0, 16 orr w1, w1, w0 ldr w0, [sp, 40] lsl w0, w0, 8 orr w1, w1, w0 ldr w0, [sp, 44] orr w0, w1, w0 .L6: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size getlong, .-getlong .align 2 .type putshort, %function putshort: .LFB8: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] ldr w0, [sp, 20] asr w0, w0, 8 and w0, w0, 255 ldr x1, [sp, 24] bl putc ldr w0, [sp, 20] and w0, w0, 255 ldr x1, [sp, 24] bl putc nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size putshort, .-putshort .align 2 .type putlong, %function putlong: .LFB9: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] ldr w0, [sp, 20] lsr w0, w0, 24 ldr x1, [sp, 24] bl putc ldr w0, [sp, 20] asr w0, w0, 16 and w0, w0, 255 ldr x1, [sp, 24] bl putc ldr w0, [sp, 20] asr w0, w0, 8 and w0, w0, 255 ldr x1, [sp, 24] bl putc ldr w0, [sp, 20] and w0, w0, 255 ldr x1, [sp, 24] bl putc nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size putlong, .-putlong .align 2 .type filecheck, %function filecheck: .LFB10: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str wzr, [sp, 40] ldr x0, [sp, 24] bl rewind .L11: ldr x0, [sp, 24] bl getlong str w0, [sp, 44] ldr x0, [sp, 24] bl feof cmp w0, 0 bne .L10 ldr x0, [sp, 24] bl ferror cmp w0, 0 bne .L10 ldr w1, [sp, 40] ldr w0, [sp, 44] add w0, w1, w0 str w0, [sp, 40] b .L11 .L10: ldr w0, [sp, 40] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size filecheck, .-filecheck .align 2 .type copydata, %function copydata: .LFB11: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str w3, [sp, 32] str w4, [sp, 20] ldrsw x0, [sp, 36] mov w2, 0 mov x1, x0 ldr x0, [sp, 40] bl fseek ldrsw x0, [sp, 32] mov w2, 0 mov x1, x0 ldr x0, [sp, 24] bl fseek str wzr, [sp, 56] b .L14 .L15: ldr x0, [sp, 24] bl getc str w0, [sp, 60] ldr x1, [sp, 40] ldr w0, [sp, 60] bl putc ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 56] .L14: ldr w1, [sp, 56] ldr w0, [sp, 20] cmp w1, w0 blt .L15 nop nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size copydata, .-copydata .section .rodata .align 3 .LC0: .string "1.2.11" .text .align 2 .type decompressdata, %function decompressdata: .LFB12: .cfi_startproc sub sp, sp, #65536 .cfi_def_cfa_offset 65536 str xzr, [sp, 1024] sub sp, sp, #65536 .cfi_def_cfa_offset 131072 str xzr, [sp, 1024] sub sp, sp, #65536 .cfi_def_cfa_offset 196608 str xzr, [sp, 1024] sub sp, sp, #65536 .cfi_def_cfa_offset 262144 str xzr, [sp, 1024] sub sp, sp, #176 .cfi_def_cfa_offset 262320 stp x29, x30, [sp] .cfi_offset 29, -262320 .cfi_offset 30, -262312 mov x29, sp str x0, [sp, 40] str w1, [sp, 36] str x2, [sp, 24] str w3, [sp, 32] str w4, [sp, 20] str w5, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] add x1, sp, 262144 ldr x2, [x0] str x2, [x1, 168] mov x2, 0 ldrsw x0, [sp, 36] mov w2, 0 mov x1, x0 ldr x0, [sp, 40] bl fseek ldrsw x0, [sp, 32] mov w2, 0 mov x1, x0 ldr x0, [sp, 24] bl fseek add x0, sp, 56 mov x2, 112 mov w1, 0 bl memset add x3, sp, 56 mov w2, 112 adrp x0, .LC0 add x1, x0, :lo12:.LC0 mov x0, x3 bl inflateInit_ str w0, [sp, 52] ldr w0, [sp, 52] cmp w0, 0 beq .L17 mov w0, 7 b .L29 .L17: ldr w0, [sp, 20] cmp w0, 0 bgt .L19 add x0, sp, 56 bl inflateEnd mov w0, 7 b .L29 .L19: ldr w0, [sp, 20] str w0, [sp, 48] ldr w0, [sp, 48] cmp w0, 131072 ble .L20 mov w0, 131072 str w0, [sp, 48] .L20: ldrsw x1, [sp, 48] add x0, sp, 168 ldr x3, [sp, 24] mov x2, x1 mov x1, 1 bl fread str w0, [sp, 64] ldr w1, [sp, 20] ldr w0, [sp, 64] sub w0, w1, w0 str w0, [sp, 20] ldr x0, [sp, 24] bl ferror cmp w0, 0 beq .L21 add x0, sp, 56 bl inflateEnd mov w0, 7 b .L29 .L21: ldr w0, [sp, 64] cmp w0, 0 beq .L31 add x0, sp, 168 str x0, [sp, 56] .L27: mov w0, 131072 str w0, [sp, 88] add x0, sp, 131072 add x0, x0, 168 str x0, [sp, 80] add x0, sp, 56 mov w1, 0 bl inflate str w0, [sp, 52] ldr w0, [sp, 52] cmp w0, 0 beq .L24 ldr w0, [sp, 52] cmp w0, 1 beq .L24 add x0, sp, 56 bl inflateEnd mov w0, 7 b .L29 .L24: ldr w0, [sp, 88] mov w1, 131072 sub w0, w1, w0 str w0, [sp, 48] ldrsw x1, [sp, 48] add x0, sp, 131072 add x0, x0, 168 ldr x3, [sp, 40] mov x2, x1 mov x1, 1 bl fwrite mov x1, x0 ldrsw x0, [sp, 48] cmp x1, x0 bne .L25 ldr x0, [sp, 40] bl ferror cmp w0, 0 beq .L26 .L25: add x0, sp, 56 bl inflateEnd mov w0, 7 b .L29 .L26: ldr w0, [sp, 88] cmp w0, 0 beq .L27 ldr w0, [sp, 52] cmp w0, 1 bne .L17 b .L23 .L31: nop .L23: add x0, sp, 56 bl inflateEnd ldrsw x1, [sp, 16] ldr x0, [sp, 96] cmp x1, x0 beq .L28 mov w0, 8 b .L29 .L28: mov w0, 0 .L29: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] add x3, sp, 262144 ldr x4, [x3, 168] ldr x2, [x0] subs x4, x4, x2 mov x2, 0 beq .L30 bl __stack_chk_fail .L30: mov w0, w1 ldp x29, x30, [sp] .cfi_restore 29 .cfi_restore 30 add sp, sp, 176 .cfi_def_cfa_offset 262144 add sp, sp, 262144 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size decompressdata, .-decompressdata .section .rodata .align 3 .LC1: .string "rb" .align 3 .LC2: .string ".otf" .align 3 .LC3: .string ".ttf" .align 3 .LC4: .string "wb+" .align 3 .LC5: .string "_meta.xml" .align 3 .LC6: .string "wb" .align 3 .LC7: .string ".priv" .text .align 2 .type dewoff, %function dewoff: .LFB13: .cfi_startproc stp x29, x30, [sp, -192]! .cfi_def_cfa_offset 192 .cfi_offset 29, -192 .cfi_offset 30, -184 mov x29, sp str x0, [sp, 24] mov w0, -1 str w0, [sp, 56] adrp x0, .LC1 add x1, x0, :lo12:.LC1 ldr x0, [sp, 24] bl fopen str x0, [sp, 152] ldr x0, [sp, 152] cmp x0, 0 bne .L33 mov w0, 1 b .L34 .L33: mov w1, 47 ldr x0, [sp, 24] bl strrchr str x0, [sp, 136] ldr x0, [sp, 136] cmp x0, 0 bne .L35 ldr x0, [sp, 24] str x0, [sp, 136] b .L36 .L35: ldr x0, [sp, 136] add x0, x0, 1 str x0, [sp, 136] .L36: mov w1, 46 ldr x0, [sp, 136] bl strrchr str x0, [sp, 144] ldr x0, [sp, 144] cmp x0, 0 bne .L37 ldr x0, [sp, 136] bl strlen mov x1, x0 ldr x0, [sp, 136] add x0, x0, x1 str x0, [sp, 144] .L37: mov w2, 2 mov x1, 0 ldr x0, [sp, 152] bl fseek ldr x0, [sp, 152] bl ftell str w0, [sp, 60] ldr x0, [sp, 152] bl rewind ldr x0, [sp, 152] bl getlong mov w1, w0 mov w0, 17990 movk w0, 0x774f, lsl 16 cmp w1, w0 beq .L38 mov w0, 3 b .L34 .L38: ldr x0, [sp, 152] bl getlong str w0, [sp, 64] ldr w1, [sp, 64] mov w0, 21583 movk w0, 0x4f54, lsl 16 cmp w1, w0 cset w0, eq and w0, w0, 255 str w0, [sp, 68] ldr x0, [sp, 152] bl getlong str w0, [sp, 72] ldr w1, [sp, 60] ldr w0, [sp, 72] cmp w1, w0 beq .L39 mov w0, 4 b .L34 .L39: ldr x0, [sp, 152] bl getushort str w0, [sp, 76] ldr x0, [sp, 152] bl getushort cmp w0, 0 beq .L40 mov w0, 5 b .L34 .L40: ldr x0, [sp, 152] bl getlong ldr x0, [sp, 152] bl getushort ldr x0, [sp, 152] bl getushort ldr x0, [sp, 152] bl getlong str w0, [sp, 80] ldr x0, [sp, 152] bl getlong str w0, [sp, 84] ldr x0, [sp, 152] bl getlong str w0, [sp, 88] ldr x0, [sp, 152] bl getlong str w0, [sp, 92] ldr x0, [sp, 152] bl getlong str w0, [sp, 96] ldr x0, [sp, 136] bl strlen add x0, x0, 20 bl malloc str x0, [sp, 160] ldr x1, [sp, 136] ldr x0, [sp, 160] bl strcpy ldr x1, [sp, 144] ldr x0, [sp, 136] sub x0, x1, x0 mov x1, x0 ldr x0, [sp, 160] add x2, x0, x1 ldr w0, [sp, 68] cmp w0, 0 beq .L41 adrp x0, .LC2 add x0, x0, :lo12:.LC2 b .L42 .L41: adrp x0, .LC3 add x0, x0, :lo12:.LC3 .L42: mov x1, x0 mov x0, x2 bl strcpy adrp x0, .LC4 add x1, x0, :lo12:.LC4 ldr x0, [sp, 160] bl fopen str x0, [sp, 168] ldr x0, [sp, 168] cmp x0, 0 bne .L43 mov w0, 2 b .L34 .L43: ldr w1, [sp, 64] ldr x0, [sp, 168] bl putlong ldr w1, [sp, 76] ldr x0, [sp, 168] bl putshort mov w0, 1 str w0, [sp, 44] str wzr, [sp, 48] b .L44 .L45: ldr w0, [sp, 44] lsl w0, w0, 1 str w0, [sp, 44] ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L44: ldr w0, [sp, 44] lsl w0, w0, 1 ldr w1, [sp, 76] cmp w1, w0 bge .L45 ldr w0, [sp, 44] lsl w0, w0, 4 mov w1, w0 ldr x0, [sp, 168] bl putshort ldr w1, [sp, 48] ldr x0, [sp, 168] bl putshort ldr w1, [sp, 76] ldr w0, [sp, 44] sub w0, w1, w0 lsl w0, w0, 4 mov w1, w0 ldr x0, [sp, 168] bl putshort ldr x0, [sp, 168] bl ftell str w0, [sp, 52] str wzr, [sp, 44] b .L46 .L47: mov w1, 0 ldr x0, [sp, 168] bl putlong ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L46: ldr w0, [sp, 76] lsl w0, w0, 2 ldr w1, [sp, 44] cmp w1, w0 blt .L47 str wzr, [sp, 44] b .L48 .L56: ldr x0, [sp, 152] bl getlong str w0, [sp, 108] ldr x0, [sp, 152] bl getlong str w0, [sp, 112] ldr x0, [sp, 152] bl getlong str w0, [sp, 116] ldr x0, [sp, 152] bl getlong str w0, [sp, 120] ldr x0, [sp, 152] bl getlong str w0, [sp, 124] ldr w1, [sp, 116] ldr w0, [sp, 120] cmp w1, w0 bgt .L49 ldr w1, [sp, 112] ldr w0, [sp, 116] add w0, w1, w0 ldr w1, [sp, 60] cmp w1, w0 bge .L50 .L49: ldr x0, [sp, 168] bl fclose ldr x0, [sp, 152] bl fclose mov w0, 6 b .L34 .L50: ldr x0, [sp, 152] bl ftell str w0, [sp, 128] ldr x0, [sp, 168] bl ftell str w0, [sp, 132] ldrsw x0, [sp, 52] mov w2, 0 mov x1, x0 ldr x0, [sp, 168] bl fseek ldr w1, [sp, 108] ldr x0, [sp, 168] bl putlong ldr w1, [sp, 124] ldr x0, [sp, 168] bl putlong ldr w1, [sp, 132] ldr x0, [sp, 168] bl putlong ldr w1, [sp, 120] ldr x0, [sp, 168] bl putlong ldr w1, [sp, 108] mov w0, 24932 movk w0, 0x6865, lsl 16 cmp w1, w0 bne .L51 ldr w0, [sp, 132] str w0, [sp, 56] .L51: ldr x0, [sp, 168] bl ftell str w0, [sp, 52] ldrsw x0, [sp, 132] mov w2, 0 mov x1, x0 ldr x0, [sp, 168] bl fseek ldr w1, [sp, 116] ldr w0, [sp, 120] cmp w1, w0 bne .L52 ldr w4, [sp, 116] ldr w3, [sp, 112] ldr x2, [sp, 152] ldr w1, [sp, 132] ldr x0, [sp, 168] bl copydata b .L53 .L52: ldr w5, [sp, 120] ldr w4, [sp, 116] ldr w3, [sp, 112] ldr x2, [sp, 152] ldr w1, [sp, 132] ldr x0, [sp, 168] bl decompressdata str w0, [sp, 104] ldr w0, [sp, 104] cmp w0, 0 beq .L53 ldr x0, [sp, 168] bl fclose ldr x0, [sp, 152] bl fclose ldr w0, [sp, 104] b .L34 .L53: ldr x0, [sp, 168] bl ftell and x0, x0, 3 cmp x0, 0 beq .L54 ldr x0, [sp, 168] bl ftell and x0, x0, 1 cmp x0, 0 beq .L55 ldr x1, [sp, 168] mov w0, 0 bl putc .L55: ldr x0, [sp, 168] bl ftell and x0, x0, 2 cmp x0, 0 beq .L54 mov w1, 0 ldr x0, [sp, 168] bl putshort .L54: ldrsw x0, [sp, 128] mov w2, 0 mov x1, x0 ldr x0, [sp, 152] bl fseek ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L48: ldr w1, [sp, 44] ldr w0, [sp, 76] cmp w1, w0 blt .L56 ldr w0, [sp, 56] cmn w0, #1 beq .L57 ldr w0, [sp, 56] add w0, w0, 8 sxtw x0, w0 mov w2, 0 mov x1, x0 ldr x0, [sp, 168] bl fseek mov w1, 0 ldr x0, [sp, 168] bl putlong ldr x0, [sp, 168] bl filecheck str w0, [sp, 100] ldr w0, [sp, 100] mov w1, 44986 movk w1, 0xb1b0, lsl 16 sub w0, w1, w0 str w0, [sp, 100] ldr w0, [sp, 56] add w0, w0, 8 sxtw x0, w0 mov w2, 0 mov x1, x0 ldr x0, [sp, 168] bl fseek ldr w1, [sp, 100] ldr x0, [sp, 168] bl putlong .L57: ldr x0, [sp, 168] bl fclose ldr w0, [sp, 80] cmp w0, 0 beq .L58 ldr x1, [sp, 144] ldr x0, [sp, 136] sub x0, x1, x0 mov x1, x0 ldr x0, [sp, 160] add x2, x0, x1 adrp x0, .LC5 add x1, x0, :lo12:.LC5 mov x0, x2 ldr x2, [x1] str x2, [x0] ldrh w1, [x1, 8] strh w1, [x0, 8] adrp x0, .LC6 add x1, x0, :lo12:.LC6 ldr x0, [sp, 160] bl fopen str x0, [sp, 176] ldr x0, [sp, 176] cmp x0, 0 bne .L59 ldr x0, [sp, 152] bl fclose mov w0, 2 b .L34 .L59: ldr w5, [sp, 88] ldr w4, [sp, 84] ldr w3, [sp, 80] ldr x2, [sp, 152] mov w1, 0 ldr x0, [sp, 176] bl decompressdata str w0, [sp, 104] ldr x0, [sp, 176] bl fclose ldr w0, [sp, 104] cmp w0, 0 beq .L58 ldr x0, [sp, 152] bl fclose ldr w0, [sp, 104] b .L34 .L58: ldr w0, [sp, 92] cmp w0, 0 beq .L60 ldr x1, [sp, 144] ldr x0, [sp, 136] sub x0, x1, x0 mov x1, x0 ldr x0, [sp, 160] add x2, x0, x1 adrp x0, .LC7 add x1, x0, :lo12:.LC7 mov x0, x2 ldr w2, [x1] str w2, [x0] ldrh w1, [x1, 4] strh w1, [x0, 4] adrp x0, .LC6 add x1, x0, :lo12:.LC6 ldr x0, [sp, 160] bl fopen str x0, [sp, 184] ldr x0, [sp, 184] cmp x0, 0 bne .L61 ldr x0, [sp, 152] bl fclose mov w0, 2 b .L34 .L61: ldr w4, [sp, 96] ldr w3, [sp, 92] ldr x2, [sp, 152] mov w1, 0 ldr x0, [sp, 184] bl copydata ldr x0, [sp, 184] bl fclose .L60: ldr x0, [sp, 152] bl fclose ldr x0, [sp, 160] bl free mov w0, 0 .L34: ldp x29, x30, [sp], 192 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size dewoff, .-dewoff .section .rodata .align 3 .LC8: .string "%s {woff-filename}\n" .align 3 .LC9: .string " Takes one (or several woff files, and converts them into their equivalent" .align 3 .LC10: .string "ttf or otf forms. The output files will be placed in the current directory" .align 3 .LC11: .string "with the same name as the original file and an extension of either \".otf\" or \".ttf\"" .align 3 .LC12: .string "(as is appropriate). If the woff file contains metadata that will be stored" .align 3 .LC13: .string "with the extension \"_meta.xml\", and a private table will have \".priv\"" .text .align 2 .type usage, %function usage: .LFB14: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x1, [sp, 24] adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl printf adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts adrp x0, .LC10 add x0, x0, :lo12:.LC10 bl puts adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl puts adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl puts adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE14: .size usage, .-usage .section .rodata .align 3 .LC14: .string "Cannot open %s\n" .align 3 .LC15: .string "Cannot open output file(s)\n" .align 3 .LC16: .string "This (%s) does not look like a WOFF file.\n" .align 3 .LC17: .string "Actual file length does not match expected length in %s.\n" .align 3 .LC18: .string "Table stretches beyond end of file, or impossible values for\n compressed and uncompressed table lengths in %s.\n" .align 3 .LC19: .string "A field in the WOFF header must be zero, but is not in %s.\n" .align 3 .LC20: .string "Table decompress failed in %s.\n" .align 3 .LC21: .string "Length of decompressed table does not match expected length in %s.\n" .align 3 .LC22: .string "Unexpected error: %d on %s\n" .text .align 2 .global main .type main, %function main: .LFB15: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] mov w0, 1 str w0, [sp, 40] b .L64 .L77: ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] ldrb w0, [x0] cmp w0, 45 bne .L65 ldr x0, [sp, 16] ldr x0, [x0] bl usage b .L66 .L65: ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] bl dewoff str w0, [sp, 44] ldr w0, [sp, 44] cmp w0, 8 beq .L67 ldr w0, [sp, 44] cmp w0, 8 bgt .L68 ldr w0, [sp, 44] cmp w0, 7 beq .L69 ldr w0, [sp, 44] cmp w0, 7 bgt .L68 ldr w0, [sp, 44] cmp w0, 6 beq .L70 ldr w0, [sp, 44] cmp w0, 6 bgt .L68 ldr w0, [sp, 44] cmp w0, 5 beq .L71 ldr w0, [sp, 44] cmp w0, 5 bgt .L68 ldr w0, [sp, 44] cmp w0, 4 beq .L72 ldr w0, [sp, 44] cmp w0, 4 bgt .L68 ldr w0, [sp, 44] cmp w0, 3 beq .L73 ldr w0, [sp, 44] cmp w0, 3 bgt .L68 ldr w0, [sp, 44] cmp w0, 2 beq .L74 ldr w0, [sp, 44] cmp w0, 2 bgt .L68 ldr w0, [sp, 44] cmp w0, 0 beq .L79 ldr w0, [sp, 44] cmp w0, 1 bne .L68 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] mov x2, x0 adrp x0, .LC14 add x1, x0, :lo12:.LC14 mov x0, x3 bl fprintf b .L66 .L74: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] mov x3, x0 mov x2, 27 mov x1, 1 adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl fwrite b .L66 .L73: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] mov x2, x0 adrp x0, .LC16 add x1, x0, :lo12:.LC16 mov x0, x3 bl fprintf b .L66 .L72: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] mov x2, x0 adrp x0, .LC17 add x1, x0, :lo12:.LC17 mov x0, x3 bl fprintf b .L66 .L70: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] mov x2, x0 adrp x0, .LC18 add x1, x0, :lo12:.LC18 mov x0, x3 bl fprintf b .L66 .L71: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] mov x2, x0 adrp x0, .LC19 add x1, x0, :lo12:.LC19 mov x0, x3 bl fprintf b .L66 .L69: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] mov x2, x0 adrp x0, .LC20 add x1, x0, :lo12:.LC20 mov x0, x3 bl fprintf b .L66 .L67: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] mov x2, x0 adrp x0, .LC21 add x1, x0, :lo12:.LC21 mov x0, x3 bl fprintf b .L66 .L68: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x4, [x0] ldrsw x0, [sp, 40] lsl x0, x0, 3 ldr x1, [sp, 16] add x0, x1, x0 ldr x0, [x0] mov x3, x0 ldr w2, [sp, 44] adrp x0, .LC22 add x1, x0, :lo12:.LC22 mov x0, x4 bl fprintf b .L66 .L79: nop .L66: ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L64: ldr w1, [sp, 40] ldr w0, [sp, 28] cmp w1, w0 blt .L77 mov w0, 0 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE15: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%d %d" .align 3 .LC1: .string "%d\n" .align 3 .LC2: .string "INDISPONIVEL" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -336]! .cfi_def_cfa_offset 336 .cfi_offset 29, -336 .cfi_offset 30, -328 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 328] mov x1, 0 str wzr, [sp, 16] str wzr, [sp, 20] b .L2 .L3: add x1, sp, 32 ldrsw x0, [sp, 20] lsl x0, x0, 3 add x3, x1, x0 add x1, sp, 32 ldrsw x0, [sp, 20] lsl x0, x0, 3 add x0, x1, x0 add x0, x0, 4 mov x2, x0 mov x1, x3 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L2: ldr w0, [sp, 20] cmp w0, 36 ble .L3 add x0, sp, 24 add x1, x0, 4 add x0, sp, 24 mov x2, x1 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf b .L4 .L11: str wzr, [sp, 20] b .L5 .L9: ldr w1, [sp, 28] ldrsw x0, [sp, 20] lsl x0, x0, 3 add x2, sp, 32 ldr w0, [x2, x0] cmp w1, w0 bne .L6 ldrsw x0, [sp, 20] lsl x0, x0, 3 add x1, sp, 36 ldr w0, [x1, x0] cmp w0, 0 ble .L7 ldr w0, [sp, 24] mov w1, w0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf ldrsw x0, [sp, 20] lsl x0, x0, 3 add x1, sp, 36 ldr w0, [x1, x0] sub w2, w0, #1 ldrsw x0, [sp, 20] lsl x0, x0, 3 add x1, sp, 36 str w2, [x1, x0] b .L8 .L7: adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts .L8: mov w0, 1 str w0, [sp, 16] .L6: ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L5: ldr w0, [sp, 20] cmp w0, 36 ble .L9 ldr w0, [sp, 16] cmp w0, 1 beq .L10 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts .L10: str wzr, [sp, 16] add x0, sp, 24 add x1, x0, 4 add x0, sp, 24 mov x2, x1 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf .L4: ldr w1, [sp, 24] mov w0, 9999 cmp w1, w0 bne .L11 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 328] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L13 bl __stack_chk_fail .L13: mov w0, w1 ldp x29, x30, [sp], 336 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global atof .type atof, %function atof: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] mov x1, 0 ldr x0, [sp, 24] bl strtod scvtf d0, w0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size atof, .-atof ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global test_vbslu32 .type test_vbslu32, %function test_vbslu32: .LFB4340: .cfi_startproc sub sp, sp, #64 .cfi_def_cfa_offset 64 ldr d0, [sp, 8] str d0, [sp, 40] ldr d0, [sp, 16] str d0, [sp, 48] ldr d0, [sp, 24] str d0, [sp, 56] ldr d1, [sp, 40] ldr d2, [sp, 48] ldr d0, [sp, 56] bit v0.8b, v2.8b, v1.8b str d0, [sp, 32] nop add sp, sp, 64 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4340: .size test_vbslu32, .-test_vbslu32 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global _cl_baud .bss .align 2 .type _cl_baud, %object .size _cl_baud, 4 _cl_baud: .zero 4 .global _cl_port .align 3 .type _cl_port, %object .size _cl_port, 8 _cl_port: .zero 8 .global _cl_divisor .align 2 .type _cl_divisor, %object .size _cl_divisor, 4 _cl_divisor: .zero 4 .global _cl_rx_dump .align 2 .type _cl_rx_dump, %object .size _cl_rx_dump, 4 _cl_rx_dump: .zero 4 .global _cl_rx_dump_ascii .align 2 .type _cl_rx_dump_ascii, %object .size _cl_rx_dump_ascii, 4 _cl_rx_dump_ascii: .zero 4 .global _cl_tx_detailed .align 2 .type _cl_tx_detailed, %object .size _cl_tx_detailed, 4 _cl_tx_detailed: .zero 4 .global _cl_stats .align 2 .type _cl_stats, %object .size _cl_stats, 4 _cl_stats: .zero 4 .global _cl_stop_on_error .align 2 .type _cl_stop_on_error, %object .size _cl_stop_on_error, 4 _cl_stop_on_error: .zero 4 .global _cl_single_byte .data .align 2 .type _cl_single_byte, %object .size _cl_single_byte, 4 _cl_single_byte: .word -1 .global _cl_another_byte .align 2 .type _cl_another_byte, %object .size _cl_another_byte, 4 _cl_another_byte: .word -1 .global _cl_rts_cts .bss .align 2 .type _cl_rts_cts, %object .size _cl_rts_cts, 4 _cl_rts_cts: .zero 4 .global _cl_2_stop_bit .align 2 .type _cl_2_stop_bit, %object .size _cl_2_stop_bit, 4 _cl_2_stop_bit: .zero 4 .global _cl_parity .align 2 .type _cl_parity, %object .size _cl_parity, 4 _cl_parity: .zero 4 .global _cl_odd_parity .align 2 .type _cl_odd_parity, %object .size _cl_odd_parity, 4 _cl_odd_parity: .zero 4 .global _cl_stick_parity .align 2 .type _cl_stick_parity, %object .size _cl_stick_parity, 4 _cl_stick_parity: .zero 4 .global _cl_dump_err .align 2 .type _cl_dump_err, %object .size _cl_dump_err, 4 _cl_dump_err: .zero 4 .global _cl_no_rx .align 2 .type _cl_no_rx, %object .size _cl_no_rx, 4 _cl_no_rx: .zero 4 .global _cl_no_tx .align 2 .type _cl_no_tx, %object .size _cl_no_tx, 4 _cl_no_tx: .zero 4 .global _cl_rx_delay .align 2 .type _cl_rx_delay, %object .size _cl_rx_delay, 4 _cl_rx_delay: .zero 4 .global _cl_tx_delay .align 2 .type _cl_tx_delay, %object .size _cl_tx_delay, 4 _cl_tx_delay: .zero 4 .global _cl_tx_bytes .align 2 .type _cl_tx_bytes, %object .size _cl_tx_bytes, 4 _cl_tx_bytes: .zero 4 .global _cl_rs485_delay .data .align 2 .type _cl_rs485_delay, %object .size _cl_rs485_delay, 4 _cl_rs485_delay: .word -1 .global _cl_tx_time .bss .align 2 .type _cl_tx_time, %object .size _cl_tx_time, 4 _cl_tx_time: .zero 4 .global _cl_rx_time .align 2 .type _cl_rx_time, %object .size _cl_rx_time, 4 _cl_rx_time: .zero 4 .global _cl_ascii_range .align 2 .type _cl_ascii_range, %object .size _cl_ascii_range, 4 _cl_ascii_range: .zero 4 .global _write_count_value .type _write_count_value, %object .size _write_count_value, 1 _write_count_value: .zero 1 .global _read_count_value .type _read_count_value, %object .size _read_count_value, 1 _read_count_value: .zero 1 .global _fd .data .align 2 .type _fd, %object .size _fd, 4 _fd: .word -1 .global _write_data .bss .align 3 .type _write_data, %object .size _write_data, 8 _write_data: .zero 8 .global _write_size .align 3 .type _write_size, %object .size _write_size, 8 _write_size: .zero 8 .global _write_count .align 3 .type _write_count, %object .size _write_count, 8 _write_count: .zero 8 .global _read_count .align 3 .type _read_count, %object .size _read_count, 8 _read_count: .zero 8 .global _error_count .align 3 .type _error_count, %object .size _error_count, 8 _error_count: .zero 8 .section .rodata .align 3 .LC0: .string "%i bytes: " .align 3 .LC1: .string "%02x " .text .align 2 .type dump_data, %function dump_data: .LFB6: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] ldr w1, [sp, 20] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf str wzr, [sp, 44] b .L2 .L3: ldrsw x0, [sp, 44] ldr x1, [sp, 24] add x0, x1, x0 ldrb w0, [x0] mov w1, w0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L2: ldr w1, [sp, 44] ldr w0, [sp, 20] cmp w1, w0 blt .L3 mov w0, 10 bl putchar nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size dump_data, .-dump_data .align 2 .type dump_data_ascii, %function dump_data_ascii: .LFB7: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] str wzr, [sp, 44] b .L5 .L6: ldrsw x0, [sp, 44] ldr x1, [sp, 24] add x0, x1, x0 ldrb w0, [x0] bl putchar ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L5: ldr w1, [sp, 44] ldr w0, [sp, 20] cmp w1, w0 blt .L6 nop nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size dump_data_ascii, .-dump_data_ascii .section .rodata .align 3 .LC2: .string "TIOCGSERIAL failed" .align 3 .LC3: .string "Cannot set speed to %d, closest is %d\n" .align 3 .LC4: .string "closest baud = %i, base = %i, divisor = %i\n" .align 3 .LC5: .string "TIOCSSERIAL failed" .text .align 2 .type set_baud_divisor, %function set_baud_divisor: .LFB8: .cfi_startproc stp x29, x30, [sp, -128]! .cfi_def_cfa_offset 128 .cfi_offset 29, -128 .cfi_offset 30, -120 mov x29, sp str w0, [sp, 28] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 120] mov x1, 0 adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] add x1, sp, 48 mov x2, x1 mov x1, 21534 bl ioctl cmp w0, 0 bge .L8 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl perror mov w0, 1 bl exit .L8: ldr w0, [sp, 64] mov w1, w0 mov w0, -4145 and w0, w1, w0 orr w0, w0, 48 str w0, [sp, 64] ldr w1, [sp, 76] ldr w0, [sp, 28] lsr w2, w0, 31 add w0, w2, w0 asr w0, w0, 1 add w1, w1, w0 ldr w0, [sp, 28] sdiv w0, w1, w0 str w0, [sp, 72] ldr w1, [sp, 76] ldr w0, [sp, 72] sdiv w0, w1, w0 str w0, [sp, 44] ldr w1, [sp, 28] mov w0, 98 mul w0, w1, w0 mov w1, 34079 movk w1, 0x51eb, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w1, w1, 5 asr w0, w0, 31 sub w0, w1, w0 ldr w1, [sp, 44] cmp w1, w0 blt .L9 ldr w1, [sp, 28] mov w0, 102 mul w0, w1, w0 mov w1, 34079 movk w1, 0x51eb, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w1, w1, 5 asr w0, w0, 31 sub w0, w1, w0 ldr w1, [sp, 44] cmp w1, w0 ble .L10 .L9: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x4, [x0] ldr w3, [sp, 44] ldr w2, [sp, 28] adrp x0, .LC3 add x1, x0, :lo12:.LC3 mov x0, x4 bl fprintf mov w0, 1 bl exit .L10: ldr w0, [sp, 76] ldr w1, [sp, 72] mov w3, w1 mov w2, w0 ldr w1, [sp, 44] adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] add x1, sp, 48 mov x2, x1 mov x1, 21535 bl ioctl cmp w0, 0 bge .L13 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl perror mov w0, 1 bl exit .L13: nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 120] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L12 bl __stack_chk_fail .L12: ldp x29, x30, [sp], 128 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size set_baud_divisor, .-set_baud_divisor .align 2 .type get_baud, %function get_baud: .LFB9: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] ldr w1, [sp, 12] mov w0, 2304 movk w0, 0x3d, lsl 16 cmp w1, w0 beq .L15 ldr w1, [sp, 12] mov w0, 2304 movk w0, 0x3d, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 26592 movk w0, 0x35, lsl 16 cmp w1, w0 beq .L17 ldr w1, [sp, 12] mov w0, 26592 movk w0, 0x35, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 50880 movk w0, 0x2d, lsl 16 cmp w1, w0 beq .L18 ldr w1, [sp, 12] mov w0, 50880 movk w0, 0x2d, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 9632 movk w0, 0x26, lsl 16 cmp w1, w0 beq .L19 ldr w1, [sp, 12] mov w0, 9632 movk w0, 0x26, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 33920 movk w0, 0x1e, lsl 16 cmp w1, w0 beq .L20 ldr w1, [sp, 12] mov w0, 33920 movk w0, 0x1e, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 58208 movk w0, 0x16, lsl 16 cmp w1, w0 beq .L21 ldr w1, [sp, 12] mov w0, 58208 movk w0, 0x16, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 37888 movk w0, 0x11, lsl 16 cmp w1, w0 beq .L22 ldr w1, [sp, 12] mov w0, 37888 movk w0, 0x11, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 16960 movk w0, 0xf, lsl 16 cmp w1, w0 beq .L23 ldr w1, [sp, 12] mov w0, 16960 movk w0, 0xf, lsl 16 cmp w1, w0 bgt .L16 ldr w0, [sp, 12] cmp w0, 921600 beq .L24 ldr w0, [sp, 12] cmp w0, 921600 bgt .L16 ldr w1, [sp, 12] mov w0, 51712 movk w0, 0x8, lsl 16 cmp w1, w0 beq .L25 ldr w1, [sp, 12] mov w0, 51712 movk w0, 0x8, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 41248 movk w0, 0x7, lsl 16 cmp w1, w0 beq .L26 ldr w1, [sp, 12] mov w0, 41248 movk w0, 0x7, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 2048 movk w0, 0x7, lsl 16 cmp w1, w0 beq .L27 ldr w1, [sp, 12] mov w0, 2048 movk w0, 0x7, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 33792 movk w0, 0x3, lsl 16 cmp w1, w0 beq .L28 ldr w1, [sp, 12] mov w0, 33792 movk w0, 0x3, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 49664 movk w0, 0x1, lsl 16 cmp w1, w0 beq .L29 ldr w1, [sp, 12] mov w0, 49664 movk w0, 0x1, lsl 16 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 57600 cmp w1, w0 beq .L30 ldr w1, [sp, 12] mov w0, 57600 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 38400 cmp w1, w0 beq .L31 ldr w1, [sp, 12] mov w0, 38400 cmp w1, w0 bgt .L16 ldr w1, [sp, 12] mov w0, 9600 cmp w1, w0 beq .L32 ldr w1, [sp, 12] mov w0, 19200 cmp w1, w0 beq .L33 b .L16 .L32: mov w0, 13 b .L34 .L33: mov w0, 14 b .L34 .L31: mov w0, 15 b .L34 .L30: mov w0, 4097 b .L34 .L29: mov w0, 4098 b .L34 .L28: mov w0, 4099 b .L34 .L27: mov w0, 4100 b .L34 .L26: mov w0, 4101 b .L34 .L25: mov w0, 4102 b .L34 .L24: mov w0, 4103 b .L34 .L23: mov w0, 4104 b .L34 .L22: mov w0, 4105 b .L34 .L21: mov w0, 4106 b .L34 .L20: mov w0, 4107 b .L34 .L19: mov w0, 4108 b .L34 .L18: mov w0, 4109 b .L34 .L17: mov w0, 4110 b .L34 .L15: mov w0, 4111 b .L34 .L16: mov w0, -1 .L34: add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size get_baud, .-get_baud .section .rodata .align 3 .LC6: .ascii "Usage: linux-serial-test [OPTION]\n\n -h, --help\n -b, --b" .ascii "aud Baud rate, 115200, etc (115200 is default)\n -p," .ascii " --port Port (/dev/ttyS0, etc) (must be specified)\n " .ascii " -d, --divisor UART Baud rate divisor (can be used to se" .ascii "t custom baud rates)\n -R, --rx_dump Dump Rx data (asci" .ascii "i, raw)\n -T, --detailed_tx Detailed Tx data\n -s, --stats" .ascii " Dump serial port stats every 5s\n -S, --stop-on-err " .ascii "Stop program if we encounter an error\n -y, --single-byte S" .ascii "end specified byte to the serial port\n -z, --second-byte S" .ascii "end another specified byte to the serial port\n -c, --rts-c" .ascii "ts Enable RTS/CTS flow control\n -B, --2-stop-bit Use " .ascii "two stop bits per character\n -P, --parity Use parity " .ascii "bit (odd, even, mark, space)\n -e, --dump-err Display er" .ascii "rors\n -r, --no-rx Don't receive data (can be used to" .ascii " test flow control)\n when serial driver " .ascii "buffer is full\n -t, --no-tx Don't transmit data\n -" .ascii "l, --rx-delay Delay between reading data (ms) (can be use" .ascii "d to test flow control)\n -a, --tx-delay Delay between w" .ascii "riting data (ms)\n -w, --tx-bytes Number of bytes for ea" .ascii "ch write (default is to repeatedly write 1024 bytes\n " .ascii " until no more are accepted)\n -q, --rs485 " .ascii " Enable RS485 direction control on port, and set delay\n " .ascii " from when TX is finished and RS485 driver e" .ascii "nable is\n de-asserted. Delay is specifie" .ascii "d in bit ti" .string "mes.\n -o, --tx-time Number of seconds to transmit for (defaults to 0, meaning no limit)\n -i, --rx-time Number of seconds to receive for (defaults to 0, meaning no limit)\n -A, --ascii Output bytes range from 32 to 126 (default is 0 to 255)\n" .text .align 2 .type display_help, %function display_help: .LFB10: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size display_help, .-display_help .section .rodata .align 3 .LC7: .string "ascii" .align 3 .LC8: .string "mark" .align 3 .LC9: .string "odd" .align 3 .LC10: .string "space" .text .align 2 .type process_options, %function process_options: .LFB11: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 .L69: str wzr, [sp, 40] adrp x0, short_options.1 add x0, x0, :lo12:short_options.1 ldr x1, [x0] add x0, sp, 40 mov x4, x0 adrp x0, long_options.0 add x3, x0, :lo12:long_options.0 mov x2, x1 ldr x1, [sp, 16] ldr w0, [sp, 28] bl getopt_long str w0, [sp, 44] ldr w0, [sp, 44] cmn w0, #1 beq .L72 ldr w0, [sp, 44] cmp w0, 122 bhi .L69 adrp x1, .L40 add x1, x1, :lo12:.L40 ldr w0, [x1,w0,uxtw #2] adr x1, .Lrtx40 add x0, x1, w0, sxtw #2 br x0 .Lrtx40: .section .rodata .align 0 .align 2 .L40: .word (.L51 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L62 - .Lrtx40) / 4 .word (.L61 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L60 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L59 - .Lrtx40) / 4 .word (.L58 - .Lrtx40) / 4 .word (.L57 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L56 - .Lrtx40) / 4 .word (.L55 - .Lrtx40) / 4 .word (.L54 - .Lrtx40) / 4 .word (.L53 - .Lrtx40) / 4 .word (.L52 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L51 - .Lrtx40) / 4 .word (.L50 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L49 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L48 - .Lrtx40) / 4 .word (.L47 - .Lrtx40) / 4 .word (.L46 - .Lrtx40) / 4 .word (.L45 - .Lrtx40) / 4 .word (.L44 - .Lrtx40) / 4 .word (.L43 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L42 - .Lrtx40) / 4 .word (.L69 - .Lrtx40) / 4 .word (.L41 - .Lrtx40) / 4 .word (.L39 - .Lrtx40) / 4 .text .L51: bl display_help mov w0, 0 bl exit .L55: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] bl atoi mov w1, w0 adrp x0, _cl_baud add x0, x0, :lo12:_cl_baud str w1, [x0] b .L38 .L47: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] bl strdup mov x1, x0 adrp x0, _cl_port add x0, x0, :lo12:_cl_port str x1, [x0] b .L38 .L53: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] bl atoi mov w1, w0 adrp x0, _cl_divisor add x0, x0, :lo12:_cl_divisor str w1, [x0] b .L38 .L59: adrp x0, _cl_rx_dump add x0, x0, :lo12:_cl_rx_dump mov w1, 1 str w1, [x0] adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x2, [x0] adrp x0, .LC7 add x1, x0, :lo12:.LC7 mov x0, x2 bl strcmp cmp w0, 0 cset w0, eq and w0, w0, 255 mov w1, w0 adrp x0, _cl_rx_dump_ascii add x0, x0, :lo12:_cl_rx_dump_ascii str w1, [x0] b .L38 .L57: adrp x0, _cl_tx_detailed add x0, x0, :lo12:_cl_tx_detailed mov w1, 1 str w1, [x0] b .L38 .L44: adrp x0, _cl_stats add x0, x0, :lo12:_cl_stats mov w1, 1 str w1, [x0] b .L38 .L58: adrp x0, _cl_stop_on_error add x0, x0, :lo12:_cl_stop_on_error mov w1, 1 str w1, [x0] b .L38 .L41: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] add x1, sp, 48 mov w2, 0 bl strtol mov w1, w0 adrp x0, _cl_single_byte add x0, x0, :lo12:_cl_single_byte str w1, [x0] b .L38 .L39: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] add x1, sp, 48 mov w2, 0 bl strtol mov w1, w0 adrp x0, _cl_another_byte add x0, x0, :lo12:_cl_another_byte str w1, [x0] b .L38 .L54: adrp x0, _cl_rts_cts add x0, x0, :lo12:_cl_rts_cts mov w1, 1 str w1, [x0] b .L38 .L61: adrp x0, _cl_2_stop_bit add x0, x0, :lo12:_cl_2_stop_bit mov w1, 1 str w1, [x0] b .L38 .L60: adrp x0, _cl_parity add x0, x0, :lo12:_cl_parity mov w1, 1 str w1, [x0] adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x2, [x0] adrp x0, .LC8 add x1, x0, :lo12:.LC8 mov x0, x2 bl strcmp cmp w0, 0 beq .L63 adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x2, [x0] adrp x0, .LC9 add x1, x0, :lo12:.LC9 mov x0, x2 bl strcmp cmp w0, 0 bne .L64 .L63: mov w0, 1 b .L65 .L64: mov w0, 0 .L65: adrp x1, _cl_odd_parity add x1, x1, :lo12:_cl_odd_parity str w0, [x1] adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x2, [x0] adrp x0, .LC8 add x1, x0, :lo12:.LC8 mov x0, x2 bl strcmp cmp w0, 0 beq .L66 adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x2, [x0] adrp x0, .LC10 add x1, x0, :lo12:.LC10 mov x0, x2 bl strcmp cmp w0, 0 bne .L67 .L66: mov w0, 1 b .L68 .L67: mov w0, 0 .L68: adrp x1, _cl_stick_parity add x1, x1, :lo12:_cl_stick_parity str w0, [x1] b .L38 .L52: adrp x0, _cl_dump_err add x0, x0, :lo12:_cl_dump_err mov w1, 1 str w1, [x0] b .L38 .L45: adrp x0, _cl_no_rx add x0, x0, :lo12:_cl_no_rx mov w1, 1 str w1, [x0] b .L38 .L43: adrp x0, _cl_no_tx add x0, x0, :lo12:_cl_no_tx mov w1, 1 str w1, [x0] b .L38 .L49: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] add x1, sp, 48 mov w2, 0 bl strtol mov w1, w0 adrp x0, _cl_rx_delay add x0, x0, :lo12:_cl_rx_delay str w1, [x0] b .L38 .L56: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] add x1, sp, 48 mov w2, 0 bl strtol mov w1, w0 adrp x0, _cl_tx_delay add x0, x0, :lo12:_cl_tx_delay str w1, [x0] b .L38 .L42: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] add x1, sp, 48 mov w2, 0 bl strtol mov w1, w0 adrp x0, _cl_tx_bytes add x0, x0, :lo12:_cl_tx_bytes str w1, [x0] b .L38 .L46: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] add x1, sp, 48 mov w2, 0 bl strtol mov w1, w0 adrp x0, _cl_rs485_delay add x0, x0, :lo12:_cl_rs485_delay str w1, [x0] b .L38 .L48: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] add x1, sp, 48 mov w2, 0 bl strtol mov w1, w0 adrp x0, _cl_tx_time add x0, x0, :lo12:_cl_tx_time str w1, [x0] b .L38 .L50: adrp x0, :got:optarg ldr x0, [x0, #:got_lo12:optarg] ldr x0, [x0] add x1, sp, 48 mov w2, 0 bl strtol mov w1, w0 adrp x0, _cl_rx_time add x0, x0, :lo12:_cl_rx_time str w1, [x0] b .L38 .L62: adrp x0, _cl_ascii_range add x0, x0, :lo12:_cl_ascii_range mov w1, 1 str w1, [x0] nop b .L69 .L38: b .L69 .L72: nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 56] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L70 bl __stack_chk_fail .L70: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size process_options, .-process_options .section .rodata .align 3 .LC11: .string "%s: count for this session: rx=%lld, tx=%lld, rx err=%lld\n" .align 3 .LC12: .string "%s: TIOCGICOUNT: ret=%i, rx=%i, tx=%i, frame = %i, overrun = %i, parity = %i, brk = %i, buf_overrun = %i\n" .text .align 2 .type dump_serial_port_stats, %function dump_serial_port_stats: .LFB12: .cfi_startproc sub sp, sp, #128 .cfi_def_cfa_offset 128 stp x29, x30, [sp, 16] .cfi_offset 29, -112 .cfi_offset 30, -104 add x29, sp, 16 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 120] mov x1, 0 add x0, sp, 40 movi v0.4s, 0 stp q0, q0, [x0] stp q0, q0, [x0, 32] str q0, [x0, 64] adrp x0, _cl_port add x0, x0, :lo12:_cl_port ldr x1, [x0] adrp x0, _read_count add x0, x0, :lo12:_read_count ldr x2, [x0] adrp x0, _write_count add x0, x0, :lo12:_write_count ldr x3, [x0] adrp x0, _error_count add x0, x0, :lo12:_error_count ldr x0, [x0] mov x4, x0 adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl printf adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] add x1, sp, 40 mov x2, x1 mov x1, 21597 bl ioctl str w0, [sp, 36] ldr w0, [sp, 36] cmn w0, #1 beq .L77 adrp x0, _cl_port add x0, x0, :lo12:_cl_port ldr x8, [x0] ldr w2, [sp, 56] ldr w3, [sp, 60] ldr w4, [sp, 64] ldr w5, [sp, 68] ldr w6, [sp, 72] ldr w0, [sp, 76] ldr w1, [sp, 80] str w1, [sp, 8] str w0, [sp] mov w7, w6 mov w6, w5 mov w5, w4 mov w4, w3 mov w3, w2 ldr w2, [sp, 36] mov x1, x8 adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl printf .L77: nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 120] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L76 bl __stack_chk_fail .L76: ldp x29, x30, [sp, 16] add sp, sp, 128 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size dump_serial_port_stats, .-dump_serial_port_stats .align 2 .type next_count_value, %function next_count_value: .LFB13: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strb w0, [sp, 15] ldrb w0, [sp, 15] add w0, w0, 1 strb w0, [sp, 15] adrp x0, _cl_ascii_range add x0, x0, :lo12:_cl_ascii_range ldr w0, [x0] cmp w0, 0 beq .L79 ldrb w0, [sp, 15] cmp w0, 127 bne .L79 mov w0, 32 strb w0, [sp, 15] .L79: ldrb w0, [sp, 15] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size next_count_value, .-next_count_value .section .rodata .align 3 .LC13: .string "Error, count: %lld, expected %02x, got %02x\n" .text .align 2 .type process_read_data, %function process_read_data: .LFB14: .cfi_startproc sub sp, sp, #1056 .cfi_def_cfa_offset 1056 stp x29, x30, [sp] .cfi_offset 29, -1056 .cfi_offset 30, -1048 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1048] mov x1, 0 adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] add x1, sp, 24 mov x2, 1024 bl read str w0, [sp, 20] ldr w0, [sp, 20] cmp w0, 0 ble .L91 adrp x0, _cl_rx_dump add x0, x0, :lo12:_cl_rx_dump ldr w0, [x0] cmp w0, 0 beq .L83 adrp x0, _cl_rx_dump_ascii add x0, x0, :lo12:_cl_rx_dump_ascii ldr w0, [x0] cmp w0, 0 beq .L84 add x0, sp, 24 ldr w1, [sp, 20] bl dump_data_ascii b .L83 .L84: add x0, sp, 24 ldr w1, [sp, 20] bl dump_data .L83: str wzr, [sp, 16] b .L85 .L89: ldrsw x0, [sp, 16] add x1, sp, 24 ldrb w1, [x1, x0] adrp x0, _read_count_value add x0, x0, :lo12:_read_count_value ldrb w0, [x0] cmp w1, w0 beq .L86 adrp x0, _cl_dump_err add x0, x0, :lo12:_cl_dump_err ldr w0, [x0] cmp w0, 0 beq .L87 ldrsw x1, [sp, 16] adrp x0, _read_count add x0, x0, :lo12:_read_count ldr x0, [x0] add x4, x1, x0 adrp x0, _read_count_value add x0, x0, :lo12:_read_count_value ldrb w0, [x0] mov w2, w0 ldrsw x0, [sp, 16] add x1, sp, 24 ldrb w0, [x1, x0] mov w3, w0 mov x1, x4 adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl printf .L87: adrp x0, _error_count add x0, x0, :lo12:_error_count ldr x0, [x0] add x1, x0, 1 adrp x0, _error_count add x0, x0, :lo12:_error_count str x1, [x0] adrp x0, _cl_stop_on_error add x0, x0, :lo12:_cl_stop_on_error ldr w0, [x0] cmp w0, 0 beq .L88 bl dump_serial_port_stats mov w0, 1 bl exit .L88: ldrsw x0, [sp, 16] add x1, sp, 24 ldrb w1, [x1, x0] adrp x0, _read_count_value add x0, x0, :lo12:_read_count_value strb w1, [x0] .L86: adrp x0, _read_count_value add x0, x0, :lo12:_read_count_value ldrb w0, [x0] bl next_count_value and w1, w0, 255 adrp x0, _read_count_value add x0, x0, :lo12:_read_count_value strb w1, [x0] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L85: ldr w1, [sp, 16] ldr w0, [sp, 20] cmp w1, w0 blt .L89 ldrsw x1, [sp, 20] adrp x0, _read_count add x0, x0, :lo12:_read_count ldr x0, [x0] add x1, x1, x0 adrp x0, _read_count add x0, x0, :lo12:_read_count str x1, [x0] .L91: nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1048] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L90 bl __stack_chk_fail .L90: ldp x29, x30, [sp] add sp, sp, 1056 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE14: .size process_read_data, .-process_read_data .section .rodata .align 3 .LC14: .string "write failed - errno=%d (%s)\n" .align 3 .LC15: .string "wrote %zd bytes\n" .text .align 2 .type process_write_data, %function process_write_data: .LFB15: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -48 str xzr, [sp, 40] adrp x0, _cl_tx_bytes add x0, x0, :lo12:_cl_tx_bytes ldr w0, [x0] cmp w0, 0 cset w0, eq and w0, w0, 255 str w0, [sp, 36] .L98: str xzr, [sp, 48] b .L93 .L94: adrp x0, _write_data add x0, x0, :lo12:_write_data ldr x1, [x0] ldr x0, [sp, 48] add x0, x1, x0 adrp x1, _write_count_value add x1, x1, :lo12:_write_count_value ldrb w1, [x1] strb w1, [x0] adrp x0, _write_count_value add x0, x0, :lo12:_write_count_value ldrb w0, [x0] bl next_count_value and w1, w0, 255 adrp x0, _write_count_value add x0, x0, :lo12:_write_count_value strb w1, [x0] ldr x0, [sp, 48] add x0, x0, 1 str x0, [sp, 48] .L93: adrp x0, _write_size add x0, x0, :lo12:_write_size ldr x0, [x0] ldr x1, [sp, 48] cmp x1, x0 blt .L94 adrp x0, _fd add x0, x0, :lo12:_fd ldr w3, [x0] adrp x0, _write_data add x0, x0, :lo12:_write_data ldr x1, [x0] adrp x0, _write_size add x0, x0, :lo12:_write_size ldr x0, [x0] mov x2, x0 mov w0, w3 bl write str x0, [sp, 56] ldr x0, [sp, 56] cmp x0, 0 bge .L95 bl __errno_location ldr w0, [x0] cmp w0, 11 beq .L96 bl __errno_location ldr w19, [x0] bl __errno_location ldr w0, [x0] bl strerror mov x2, x0 mov w1, w19 adrp x0, .LC14 add x0, x0, :lo12:.LC14 bl printf .L96: str xzr, [sp, 56] .L95: ldr x1, [sp, 40] ldr x0, [sp, 56] add x0, x1, x0 str x0, [sp, 40] adrp x0, _write_size add x0, x0, :lo12:_write_size ldr x0, [x0] ldr x1, [sp, 56] cmp x1, x0 bge .L97 adrp x0, _write_data add x0, x0, :lo12:_write_data ldr x1, [x0] ldr x0, [sp, 56] add x0, x1, x0 ldrb w1, [x0] adrp x0, _write_count_value add x0, x0, :lo12:_write_count_value strb w1, [x0] str wzr, [sp, 36] .L97: ldr w0, [sp, 36] cmp w0, 0 bne .L98 adrp x0, _write_count add x0, x0, :lo12:_write_count ldr x1, [x0] ldr x0, [sp, 40] add x1, x1, x0 adrp x0, _write_count add x0, x0, :lo12:_write_count str x1, [x0] adrp x0, _cl_tx_detailed add x0, x0, :lo12:_cl_tx_detailed ldr w0, [x0] cmp w0, 0 beq .L100 ldr x1, [sp, 40] adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl printf .L100: nop ldr x19, [sp, 16] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE15: .size process_write_data, .-process_write_data .section .rodata .align 3 .LC16: .string "Error opening serial port" .align 3 .LC17: .string "Error getting RS-485 mode" .align 3 .LC18: .string "Error setting RS-485 mode" .align 3 .LC19: .string "Error setting RS-232 mode" .text .align 2 .type setup_serial_port, %function setup_serial_port: .LFB16: .cfi_startproc stp x29, x30, [sp, -144]! .cfi_def_cfa_offset 144 .cfi_offset 29, -144 .cfi_offset 30, -136 mov x29, sp str w0, [sp, 28] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 136] mov x1, 0 adrp x0, _cl_port add x0, x0, :lo12:_cl_port ldr x0, [x0] mov w1, 2050 bl open mov w1, w0 adrp x0, _fd add x0, x0, :lo12:_fd str w1, [x0] adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] cmp w0, 0 bge .L102 adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl perror adrp x0, _cl_port add x0, x0, :lo12:_cl_port ldr x0, [x0] bl free mov w0, 1 bl exit .L102: add x0, sp, 72 movi v0.4s, 0 stp q0, q0, [x0] str q0, [x0, 32] str q0, [x0, 44] ldr w1, [sp, 28] mov w0, 2224 orr w0, w1, w0 str w0, [sp, 80] adrp x0, _cl_rts_cts add x0, x0, :lo12:_cl_rts_cts ldr w0, [x0] cmp w0, 0 beq .L103 ldr w0, [sp, 80] orr w0, w0, -2147483648 str w0, [sp, 80] .L103: adrp x0, _cl_2_stop_bit add x0, x0, :lo12:_cl_2_stop_bit ldr w0, [x0] cmp w0, 0 beq .L104 ldr w0, [sp, 80] orr w0, w0, 64 str w0, [sp, 80] .L104: adrp x0, _cl_parity add x0, x0, :lo12:_cl_parity ldr w0, [x0] cmp w0, 0 beq .L105 ldr w0, [sp, 80] orr w0, w0, 256 str w0, [sp, 80] adrp x0, _cl_odd_parity add x0, x0, :lo12:_cl_odd_parity ldr w0, [x0] cmp w0, 0 beq .L106 ldr w0, [sp, 80] orr w0, w0, 512 str w0, [sp, 80] .L106: adrp x0, _cl_stick_parity add x0, x0, :lo12:_cl_stick_parity ldr w0, [x0] cmp w0, 0 beq .L105 ldr w0, [sp, 80] orr w0, w0, 1073741824 str w0, [sp, 80] .L105: str wzr, [sp, 72] str wzr, [sp, 76] str wzr, [sp, 84] mov w0, -128 strb w0, [sp, 95] mov w0, 5 strb w0, [sp, 94] adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] mov w1, 2 bl tcflush adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] add x1, sp, 72 mov x2, x1 mov w1, 0 bl tcsetattr adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] add x1, sp, 40 mov x2, x1 mov x1, 21550 bl ioctl cmp w0, 0 bge .L107 adrp x0, _cl_rs485_delay add x0, x0, :lo12:_cl_rs485_delay ldr w0, [x0] cmp w0, 0 blt .L111 adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl perror b .L111 .L107: adrp x0, _cl_rs485_delay add x0, x0, :lo12:_cl_rs485_delay ldr w0, [x0] cmp w0, 0 blt .L109 ldr w0, [sp, 40] orr w0, w0, 7 str w0, [sp, 40] adrp x0, _cl_rs485_delay add x0, x0, :lo12:_cl_rs485_delay ldr w0, [x0] str w0, [sp, 48] str wzr, [sp, 44] adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] add x1, sp, 40 mov x2, x1 mov x1, 21551 bl ioctl cmp w0, 0 bge .L111 adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl perror b .L111 .L109: ldr w0, [sp, 40] and w0, w0, -8 str w0, [sp, 40] str wzr, [sp, 48] str wzr, [sp, 44] adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] add x1, sp, 40 mov x2, x1 mov x1, 21551 bl ioctl cmp w0, 0 bge .L111 adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl perror .L111: nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 136] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L110 bl __stack_chk_fail .L110: ldp x29, x30, [sp], 144 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE16: .size setup_serial_port, .-setup_serial_port .align 2 .type diff_ms, %function diff_ms: .LFB17: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str x1, [sp] ldr x0, [sp, 8] ldr x1, [x0] ldr x0, [sp] ldr x0, [x0] sub x0, x1, x0 str x0, [sp, 16] ldr x0, [sp, 8] ldr x1, [x0, 8] ldr x0, [sp] ldr x0, [x0, 8] sub x0, x1, x0 str x0, [sp, 24] ldr x0, [sp, 24] cmp x0, 0 bge .L113 ldr x0, [sp, 16] sub x0, x0, #1 str x0, [sp, 16] ldr x1, [sp, 24] mov x0, 51712 movk x0, 0x3b9a, lsl 16 add x0, x1, x0 str x0, [sp, 24] .L113: ldr x0, [sp, 16] mov w1, w0 mov w0, 1000 mul w1, w1, w0 ldr x0, [sp, 24] mov x2, 13531 movk x2, 0xd7b6, lsl 16 movk x2, 0xde82, lsl 32 movk x2, 0x431b, lsl 48 smulh x2, x0, x2 asr x2, x2, 18 asr x0, x0, 63 sub x0, x2, x0 add w0, w1, w0 add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE17: .size diff_ms, .-diff_ms .section .rodata .align 3 .LC20: .string "Linux serial test app" .align 3 .LC21: .string "ERROR: Port argument required\n" .align 3 .LC22: .string "NOTE: non standard baud rate, trying custom divisor" .align 3 .LC23: .string "write()" .align 3 .LC24: .string "ERROR: write() returned %d, not %d\n" .align 3 .LC25: .string "ERROR: Memory allocation failed\n" .align 3 .LC26: .string "poll()" .align 3 .LC27: .string "No data received for %.1fs." .align 3 .LC28: .string " " .align 3 .LC29: .string "" .align 3 .LC30: .string "%sNo data transmitted for %.1fs." .align 3 .LC31: .string "Stopped transmitting." .align 3 .LC32: .string "Stopped receiving." .text .align 2 .global main .type main, %function main: .LFB18: .cfi_startproc stp x29, x30, [sp, -192]! .cfi_def_cfa_offset 192 .cfi_offset 29, -192 .cfi_offset 30, -184 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 184] mov x1, 0 adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl puts ldr x1, [sp, 16] ldr w0, [sp, 28] bl process_options adrp x0, _cl_port add x0, x0, :lo12:_cl_port ldr x0, [x0] cmp x0, 0 bne .L116 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] mov x3, x0 mov x2, 30 mov x1, 1 adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl fwrite bl display_help mov w0, 1 b .L156 .L116: mov w0, 4098 str w0, [sp, 32] adrp x0, _cl_baud add x0, x0, :lo12:_cl_baud ldr w0, [x0] cmp w0, 0 beq .L118 adrp x0, _cl_baud add x0, x0, :lo12:_cl_baud ldr w0, [x0] bl get_baud str w0, [sp, 32] .L118: ldr w0, [sp, 32] cmp w0, 0 bgt .L119 adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl puts mov w0, 15 str w0, [sp, 32] mov w0, 15 bl setup_serial_port adrp x0, _cl_baud add x0, x0, :lo12:_cl_baud ldr w0, [x0] bl set_baud_divisor b .L120 .L119: ldr w0, [sp, 32] bl setup_serial_port .L120: adrp x0, _cl_single_byte add x0, x0, :lo12:_cl_single_byte ldr w0, [x0] cmp w0, 0 blt .L121 mov w0, 1 str w0, [sp, 36] adrp x0, _cl_single_byte add x0, x0, :lo12:_cl_single_byte ldr w0, [x0] and w0, w0, 255 strb w0, [sp, 176] adrp x0, _cl_another_byte add x0, x0, :lo12:_cl_another_byte ldr w0, [x0] cmp w0, 0 blt .L122 adrp x0, _cl_another_byte add x0, x0, :lo12:_cl_another_byte ldr w0, [x0] and w0, w0, 255 strb w0, [sp, 177] ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L122: adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] ldrsw x2, [sp, 36] add x1, sp, 176 bl write str w0, [sp, 52] ldr w0, [sp, 52] cmp w0, 0 bge .L123 adrp x0, .LC23 add x0, x0, :lo12:.LC23 bl perror mov w0, 1 b .L156 .L123: ldr w1, [sp, 52] ldr w0, [sp, 36] cmp w1, w0 beq .L125 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x4, [x0] ldr w3, [sp, 36] ldr w2, [sp, 52] adrp x0, .LC24 add x1, x0, :lo12:.LC24 mov x0, x4 bl fprintf mov w0, 1 b .L156 .L125: mov w0, 0 b .L156 .L121: adrp x0, _cl_tx_bytes add x0, x0, :lo12:_cl_tx_bytes ldr w0, [x0] cmp w0, 0 beq .L126 adrp x0, _cl_tx_bytes add x0, x0, :lo12:_cl_tx_bytes ldr w0, [x0] sxtw x0, w0 b .L127 .L126: mov x0, 1024 .L127: adrp x1, _write_size add x1, x1, :lo12:_write_size str x0, [x1] adrp x0, _write_size add x0, x0, :lo12:_write_size ldr x0, [x0] bl malloc mov x1, x0 adrp x0, _write_data add x0, x0, :lo12:_write_data str x1, [x0] adrp x0, _write_data add x0, x0, :lo12:_write_data ldr x0, [x0] cmp x0, 0 bne .L128 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] mov x3, x0 mov x2, 32 mov x1, 1 adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl fwrite mov w0, 1 b .L156 .L128: adrp x0, _cl_ascii_range add x0, x0, :lo12:_cl_ascii_range ldr w0, [x0] cmp w0, 0 beq .L129 adrp x0, _write_count_value add x0, x0, :lo12:_write_count_value mov w1, 32 strb w1, [x0] adrp x0, _write_count_value add x0, x0, :lo12:_write_count_value ldrb w1, [x0] adrp x0, _read_count_value add x0, x0, :lo12:_read_count_value strb w1, [x0] .L129: adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] str w0, [sp, 56] adrp x0, _cl_no_rx add x0, x0, :lo12:_cl_no_rx ldr w0, [x0] cmp w0, 0 bne .L130 ldrsh w0, [sp, 60] orr w0, w0, 1 sxth w0, w0 strh w0, [sp, 60] b .L131 .L130: ldrsh w0, [sp, 60] and w0, w0, -2 sxth w0, w0 strh w0, [sp, 60] .L131: adrp x0, _cl_no_tx add x0, x0, :lo12:_cl_no_tx ldr w0, [x0] cmp w0, 0 bne .L132 ldrsh w0, [sp, 60] orr w0, w0, 4 sxth w0, w0 strh w0, [sp, 60] b .L133 .L132: ldrsh w0, [sp, 60] and w0, w0, -5 sxth w0, w0 strh w0, [sp, 60] .L133: add x0, sp, 80 mov x1, x0 mov w0, 1 bl clock_gettime ldp x0, x1, [sp, 80] stp x0, x1, [sp, 96] ldp x0, x1, [sp, 80] stp x0, x1, [sp, 112] ldp x0, x1, [sp, 80] stp x0, x1, [sp, 128] ldp x0, x1, [sp, 80] stp x0, x1, [sp, 144] b .L134 .L153: add x0, sp, 56 mov w2, 1000 mov x1, 1 bl poll str w0, [sp, 44] add x0, sp, 160 mov x1, x0 mov w0, 1 bl clock_gettime ldr w0, [sp, 44] cmn w0, #1 bne .L135 adrp x0, .LC26 add x0, x0, :lo12:.LC26 bl perror b .L136 .L135: ldr w0, [sp, 44] cmp w0, 0 beq .L136 ldrsh w0, [sp, 62] and w0, w0, 65535 and w0, w0, 1 cmp w0, 0 beq .L137 adrp x0, _cl_rx_delay add x0, x0, :lo12:_cl_rx_delay ldr w0, [x0] cmp w0, 0 beq .L138 add x1, sp, 128 add x0, sp, 160 bl diff_ms mov w1, w0 adrp x0, _cl_rx_delay add x0, x0, :lo12:_cl_rx_delay ldr w0, [x0] cmp w1, w0 ble .L137 bl process_read_data ldp x0, x1, [sp, 160] stp x0, x1, [sp, 128] b .L137 .L138: bl process_read_data ldp x0, x1, [sp, 160] stp x0, x1, [sp, 128] .L137: ldrsh w0, [sp, 62] and w0, w0, 65535 and w0, w0, 4 cmp w0, 0 beq .L136 adrp x0, _cl_tx_delay add x0, x0, :lo12:_cl_tx_delay ldr w0, [x0] cmp w0, 0 beq .L139 add x1, sp, 144 add x0, sp, 160 bl diff_ms mov w1, w0 adrp x0, _cl_tx_delay add x0, x0, :lo12:_cl_tx_delay ldr w0, [x0] cmp w1, w0 ble .L136 bl process_write_data ldp x0, x1, [sp, 160] stp x0, x1, [sp, 144] b .L136 .L139: bl process_write_data ldp x0, x1, [sp, 160] stp x0, x1, [sp, 144] .L136: add x1, sp, 112 add x0, sp, 160 bl diff_ms cmp w0, 1000 ble .L140 adrp x0, _cl_no_rx add x0, x0, :lo12:_cl_no_rx ldr w0, [x0] cmp w0, 0 bne .L141 add x1, sp, 128 add x0, sp, 160 bl diff_ms cmp w0, 2000 ble .L141 mov w0, 1 b .L142 .L141: mov w0, 0 .L142: str w0, [sp, 40] adrp x0, _cl_no_tx add x0, x0, :lo12:_cl_no_tx ldr w0, [x0] cmp w0, 0 bne .L143 add x1, sp, 144 add x0, sp, 160 bl diff_ms cmp w0, 2000 ble .L143 mov w0, 1 b .L144 .L143: mov w0, 0 .L144: str w0, [sp, 48] adrp x0, _cl_no_tx add x0, x0, :lo12:_cl_no_tx ldr w0, [x0] cmp w0, 0 beq .L145 adrp x0, _write_count add x0, x0, :lo12:_write_count ldr x0, [x0] cmp x0, 0 beq .L145 adrp x0, _write_count add x0, x0, :lo12:_write_count ldr x1, [x0] adrp x0, _read_count add x0, x0, :lo12:_read_count ldr x0, [x0] cmp x1, x0 bne .L145 str wzr, [sp, 40] .L145: ldr w0, [sp, 40] cmp w0, 0 bne .L146 ldr w0, [sp, 48] cmp w0, 0 beq .L140 .L146: ldr w0, [sp, 40] cmp w0, 0 beq .L147 add x1, sp, 128 add x0, sp, 160 bl diff_ms scvtf d0, w0 mov x0, 70368744177664 movk x0, 0x408f, lsl 48 fmov d1, x0 fdiv d0, d0, d1 adrp x0, .LC27 add x0, x0, :lo12:.LC27 bl printf adrp x0, .LC28 add x0, x0, :lo12:.LC28 str x0, [sp, 64] b .L148 .L147: adrp x0, .LC29 add x0, x0, :lo12:.LC29 str x0, [sp, 64] .L148: ldr w0, [sp, 48] cmp w0, 0 beq .L149 add x1, sp, 144 add x0, sp, 160 bl diff_ms scvtf d0, w0 mov x0, 70368744177664 movk x0, 0x408f, lsl 48 fmov d1, x0 fdiv d0, d0, d1 ldr x1, [sp, 64] adrp x0, .LC30 add x0, x0, :lo12:.LC30 bl printf .L149: mov w0, 10 bl putchar ldp x0, x1, [sp, 160] stp x0, x1, [sp, 112] .L140: adrp x0, _cl_stats add x0, x0, :lo12:_cl_stats ldr w0, [x0] cmp w0, 0 beq .L150 ldr x1, [sp, 160] ldr x0, [sp, 96] sub x0, x1, x0 cmp x0, 5 ble .L150 bl dump_serial_port_stats ldp x0, x1, [sp, 160] stp x0, x1, [sp, 96] .L150: adrp x0, _cl_tx_time add x0, x0, :lo12:_cl_tx_time ldr w0, [x0] cmp w0, 0 beq .L151 ldr x1, [sp, 160] ldr x0, [sp, 80] sub x1, x1, x0 adrp x0, _cl_tx_time add x0, x0, :lo12:_cl_tx_time ldr w0, [x0] sxtw x0, w0 cmp x1, x0 blt .L151 adrp x0, _cl_tx_time add x0, x0, :lo12:_cl_tx_time str wzr, [x0] adrp x0, _cl_no_tx add x0, x0, :lo12:_cl_no_tx mov w1, 1 str w1, [x0] ldrsh w0, [sp, 60] and w0, w0, -5 sxth w0, w0 strh w0, [sp, 60] adrp x0, .LC31 add x0, x0, :lo12:.LC31 bl puts .L151: adrp x0, _cl_rx_time add x0, x0, :lo12:_cl_rx_time ldr w0, [x0] cmp w0, 0 beq .L134 ldr x1, [sp, 160] ldr x0, [sp, 80] sub x1, x1, x0 adrp x0, _cl_rx_time add x0, x0, :lo12:_cl_rx_time ldr w0, [x0] sxtw x0, w0 cmp x1, x0 blt .L134 adrp x0, _cl_rx_time add x0, x0, :lo12:_cl_rx_time str wzr, [x0] adrp x0, _cl_no_rx add x0, x0, :lo12:_cl_no_rx mov w1, 1 str w1, [x0] ldrsh w0, [sp, 60] and w0, w0, -2 sxth w0, w0 strh w0, [sp, 60] adrp x0, .LC32 add x0, x0, :lo12:.LC32 bl puts .L134: adrp x0, _cl_no_rx add x0, x0, :lo12:_cl_no_rx ldr w0, [x0] cmp w0, 0 beq .L153 adrp x0, _cl_no_tx add x0, x0, :lo12:_cl_no_tx ldr w0, [x0] cmp w0, 0 beq .L153 adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] bl tcdrain bl dump_serial_port_stats adrp x0, _fd add x0, x0, :lo12:_fd ldr w0, [x0] mov w1, 2 bl tcflush adrp x0, _cl_port add x0, x0, :lo12:_cl_port ldr x0, [x0] bl free adrp x0, _write_count add x0, x0, :lo12:_write_count ldr x1, [x0] adrp x0, _read_count add x0, x0, :lo12:_read_count ldr x0, [x0] sub x0, x1, x0 cmp x0, 0 csneg x1, x0, x0, ge adrp x0, _error_count add x0, x0, :lo12:_error_count ldr x0, [x0] add x0, x1, x0 str x0, [sp, 72] ldr x0, [sp, 72] cmp x0, 125 bgt .L154 ldr x0, [sp, 72] b .L156 .L154: mov w0, 125 .L156: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 184] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L157 bl __stack_chk_fail .L157: mov w0, w1 ldp x29, x30, [sp], 192 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE18: .size main, .-main .section .rodata .align 3 .LC33: .string "hb:p:d:R:TsSy:z:cBertq:l:a:w:o:i:P:A" .section .data.rel.local,"aw" .align 3 .type short_options.1, %object .size short_options.1, 8 short_options.1: .xword .LC33 .section .rodata .align 3 .LC34: .string "help" .align 3 .LC35: .string "baud" .align 3 .LC36: .string "port" .align 3 .LC37: .string "divisor" .align 3 .LC38: .string "rx_dump" .align 3 .LC39: .string "detailed_tx" .align 3 .LC40: .string "stats" .align 3 .LC41: .string "stop-on-err" .align 3 .LC42: .string "single-byte" .align 3 .LC43: .string "second-byte" .align 3 .LC44: .string "rts-cts" .align 3 .LC45: .string "2-stop-bit" .align 3 .LC46: .string "parity" .align 3 .LC47: .string "dump-err" .align 3 .LC48: .string "no-rx" .align 3 .LC49: .string "no-tx" .align 3 .LC50: .string "rx-delay" .align 3 .LC51: .string "tx-delay" .align 3 .LC52: .string "tx-bytes" .align 3 .LC53: .string "rs485" .align 3 .LC54: .string "tx-time" .align 3 .LC55: .string "rx-time" .section .data.rel.ro.local,"aw" .align 3 .type long_options.0, %object .size long_options.0, 768 long_options.0: .xword .LC34 .word 0 .zero 4 .xword 0 .word 0 .zero 4 .xword .LC35 .word 1 .zero 4 .xword 0 .word 98 .zero 4 .xword .LC36 .word 1 .zero 4 .xword 0 .word 112 .zero 4 .xword .LC37 .word 1 .zero 4 .xword 0 .word 100 .zero 4 .xword .LC38 .word 1 .zero 4 .xword 0 .word 82 .zero 4 .xword .LC39 .word 0 .zero 4 .xword 0 .word 84 .zero 4 .xword .LC40 .word 0 .zero 4 .xword 0 .word 115 .zero 4 .xword .LC41 .word 0 .zero 4 .xword 0 .word 83 .zero 4 .xword .LC42 .word 0 .zero 4 .xword 0 .word 121 .zero 4 .xword .LC43 .word 0 .zero 4 .xword 0 .word 122 .zero 4 .xword .LC44 .word 0 .zero 4 .xword 0 .word 99 .zero 4 .xword .LC45 .word 0 .zero 4 .xword 0 .word 66 .zero 4 .xword .LC46 .word 1 .zero 4 .xword 0 .word 80 .zero 4 .xword .LC47 .word 0 .zero 4 .xword 0 .word 101 .zero 4 .xword .LC48 .word 0 .zero 4 .xword 0 .word 114 .zero 4 .xword .LC49 .word 0 .zero 4 .xword 0 .word 116 .zero 4 .xword .LC50 .word 1 .zero 4 .xword 0 .word 108 .zero 4 .xword .LC51 .word 1 .zero 4 .xword 0 .word 97 .zero 4 .xword .LC52 .word 1 .zero 4 .xword 0 .word 119 .zero 4 .xword .LC53 .word 1 .zero 4 .xword 0 .word 113 .zero 4 .xword .LC54 .word 1 .zero 4 .xword 0 .word 111 .zero 4 .xword .LC55 .word 1 .zero 4 .xword 0 .word 105 .zero 4 .xword .LC7 .word 0 .zero 4 .xword 0 .word 65 .zero 4 .xword 0 .word 0 .zero 4 .xword 0 .word 0 .zero 4 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%f\n%f\n%f" .align 3 .LC1: .string "A m\303\251dia entre %f, %f, %f \303\251: %f\n" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 add x2, sp, 32 add x1, sp, 28 add x0, sp, 24 mov x3, x2 mov x2, x1 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr s1, [sp, 24] ldr s0, [sp, 28] fadd s1, s1, s0 ldr s0, [sp, 32] fadd s1, s1, s0 fmov s0, 3.0e+0 fdiv s0, s1, s0 str s0, [sp, 36] ldr s0, [sp, 24] fcvt d4, s0 ldr s0, [sp, 28] fcvt d1, s0 ldr s0, [sp, 32] fcvt d2, s0 ldr s0, [sp, 36] fcvt d0, s0 fmov d3, d0 fmov d0, d4 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 40] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L3 bl __stack_chk_fail .L3: mov w0, w1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "i = %d\n" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov w0, 100 str w0, [sp, 28] ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] ldr w1, [sp, 28] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] ldr w1, [sp, 28] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, 0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global xStep .bss .align 2 .type xStep, %object .size xStep, 4 xStep: .zero 4 .global yStep .align 2 .type yStep, %object .size yStep, 4 yStep: .zero 4 .global d .data .align 2 .type d, %object .size d, 4 d: .word 1 .global HalfStep .align 3 .type HalfStep, %object .size HalfStep, 32 HalfStep: .word 1 .word 3 .word 2 .word 6 .word 4 .word 12 .word 8 .word 9 .text .align 2 .global output_b .type output_b, %function output_b: .LFB6: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size output_b, .-output_b .align 2 .global delay_ms .type delay_ms, %function delay_ms: .LFB7: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str w0, [sp, 28] ldr w0, [sp, 28] mov w1, 19923 movk w1, 0x1062, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w1, w1, 6 asr w0, w0, 31 sub w0, w1, w0 bl sleep nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size delay_ms, .-delay_ms .align 2 .global delay_us .type delay_us, %function delay_us: .LFB8: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str w0, [sp, 28] ldr w0, [sp, 28] mov w1, 56963 movk w1, 0x431b, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w1, w1, 18 asr w0, w0, 31 sub w0, w1, w0 bl sleep nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size delay_us, .-delay_us .align 2 .global main .type main, %function main: .LFB9: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp mov w1, 158 mov w0, 573 bl loop mov w0, 1000 bl delay_ms mov w1, 291 mov w0, 500 bl loop mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size main, .-main .section .rodata .align 3 .LC0: .string "ERORO: You told me to go noWHERE\r" .align 3 .LC1: .string "mod: 0 = %d\n" .align 3 .LC2: .string "A#: 0 = %d\n" .align 3 .LC3: .string "m = %d\n" .align 3 .LC4: .string "A#: %d = %d\n" .align 3 .LC5: .string "Starting the while" .align 3 .LC6: .string "%d,%d\r\n" .text .align 2 .global loop .type loop, %function loop: .LFB10: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 mov x29, sp str w0, [sp, 28] str w1, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 152] mov x1, 0 adrp x0, yStep add x0, x0, :lo12:yStep ldr w0, [x0] ldr w1, [sp, 24] sub w0, w1, w0 str w0, [sp, 44] adrp x0, xStep add x0, x0, :lo12:xStep ldr w0, [x0] ldr w1, [sp, 28] sub w0, w1, w0 str w0, [sp, 48] mov w0, 1 str w0, [sp, 52] ldr w0, [sp, 44] cmp w0, 0 bge .L7 mov w0, -1 str w0, [sp, 52] .L7: mov w0, 1 str w0, [sp, 56] ldr w0, [sp, 48] cmp w0, 0 bge .L8 mov w0, -1 str w0, [sp, 56] .L8: ldr w0, [sp, 44] cmp w0, 0 bne .L9 ldr w0, [sp, 48] cmp w0, 0 bne .L9 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts b .L6 .L9: ldr w0, [sp, 44] cmp w0, 0 csneg w1, w0, w0, ge ldr w0, [sp, 48] cmp w0, 0 csneg w0, w0, w0, ge cmp w1, w0 ble .L11 ldr w0, [sp, 44] cmp w0, 0 csneg w0, w0, w0, ge str w0, [sp, 60] ldr w0, [sp, 48] cmp w0, 0 csneg w0, w0, w0, ge str w0, [sp, 64] adrp x0, yStep add x0, x0, :lo12:yStep str x0, [sp, 96] adrp x0, xStep add x0, x0, :lo12:xStep str x0, [sp, 104] ldr w0, [sp, 52] str w0, [sp, 68] ldr w0, [sp, 56] str w0, [sp, 72] strb wzr, [sp, 42] mov w0, 4 strb w0, [sp, 43] b .L16 .L11: ldr w0, [sp, 48] cmp w0, 0 csneg w1, w0, w0, ge ldr w0, [sp, 44] cmp w0, 0 csneg w0, w0, w0, ge cmp w1, w0 ble .L14 ldr w0, [sp, 48] cmp w0, 0 csneg w0, w0, w0, ge str w0, [sp, 60] ldr w0, [sp, 44] cmp w0, 0 csneg w0, w0, w0, ge str w0, [sp, 64] adrp x0, xStep add x0, x0, :lo12:xStep str x0, [sp, 96] adrp x0, yStep add x0, x0, :lo12:yStep str x0, [sp, 104] ldr w0, [sp, 56] str w0, [sp, 68] ldr w0, [sp, 52] str w0, [sp, 72] mov w0, 4 strb w0, [sp, 42] strb wzr, [sp, 43] b .L16 .L15: ldr w0, [sp, 44] cmp w0, 0 csneg w0, w0, w0, ge str w0, [sp, 44] ldr w0, [sp, 48] cmp w0, 0 csneg w0, w0, w0, ge str w0, [sp, 48] adrp x0, yStep add x0, x0, :lo12:yStep ldr w0, [x0] and w1, w0, 7 adrp x0, HalfStep add x0, x0, :lo12:HalfStep sxtw x1, w1 ldr w0, [x0, x1, lsl 2] lsl w1, w0, 4 adrp x0, xStep add x0, x0, :lo12:xStep ldr w0, [x0] and w2, w0, 7 adrp x0, HalfStep add x0, x0, :lo12:HalfStep sxtw x2, w2 ldr w0, [x0, x2, lsl 2] orr w0, w1, w0 bl output_b adrp x0, d add x0, x0, :lo12:d ldr w0, [x0] bl delay_ms ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 44] ldr w0, [sp, 48] sub w0, w0, #1 str w0, [sp, 48] adrp x0, xStep add x0, x0, :lo12:xStep ldr w1, [x0] ldr w0, [sp, 56] add w1, w1, w0 adrp x0, xStep add x0, x0, :lo12:xStep str w1, [x0] adrp x0, yStep add x0, x0, :lo12:yStep ldr w1, [x0] ldr w0, [sp, 52] add w1, w1, w0 adrp x0, yStep add x0, x0, :lo12:yStep str w1, [x0] mov w0, 0 bl output_b .L14: ldr w0, [sp, 44] cmp w0, 0 csneg w0, w0, w0, ge cmp w0, 0 bgt .L15 b .L16 .L27: ldr w0, [sp, 60] ldr w1, [sp, 64] sdiv w2, w0, w1 ldr w1, [sp, 64] mul w1, w2, w1 sub w0, w0, w1 ldr w1, [sp, 60] sdiv w0, w1, w0 str w0, [sp, 88] ldr w1, [sp, 88] adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf ldr w1, [sp, 60] ldr w0, [sp, 64] sdiv w0, w1, w0 str w0, [sp, 112] ldr w0, [sp, 112] mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf ldr w0, [sp, 64] str w0, [sp, 76] mov w0, 1 str w0, [sp, 80] b .L17 .L18: ldr w0, [sp, 60] ldr w1, [sp, 76] sdiv w2, w0, w1 ldr w1, [sp, 76] mul w1, w2, w1 sub w0, w0, w1 str w0, [sp, 76] ldr w1, [sp, 76] adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl printf ldr w1, [sp, 60] ldr w0, [sp, 76] sdiv w0, w1, w0 add w2, w0, 1 ldrsw x0, [sp, 80] lsl x0, x0, 2 add x1, sp, 112 str w2, [x1, x0] ldrsw x0, [sp, 80] lsl x0, x0, 2 add x1, sp, 112 ldr w0, [x1, x0] mov w2, w0 ldr w1, [sp, 80] adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf ldr w0, [sp, 80] add w0, w0, 1 str w0, [sp, 80] .L17: ldr w0, [sp, 60] ldr w1, [sp, 76] sdiv w2, w0, w1 ldr w1, [sp, 76] mul w1, w2, w1 sub w0, w0, w1 cmp w0, 0 bne .L18 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts b .L19 .L26: ldr w1, [sp, 60] ldr w0, [sp, 64] sdiv w0, w1, w0 scvtf d1, w0 fmov d0, 5.0e-1 fadd d0, d1, d0 fcvtzs w0, d0 str w0, [sp, 84] b .L20 .L25: ldr x0, [sp, 96] ldr w0, [x0] and w1, w0, 7 adrp x0, HalfStep add x0, x0, :lo12:HalfStep sxtw x1, w1 ldr w1, [x0, x1, lsl 2] ldrb w0, [sp, 43] lsl w0, w1, w0 bl output_b ldr x0, [sp, 96] ldr w1, [x0] ldr w0, [sp, 68] add w1, w1, w0 ldr x0, [sp, 96] str w1, [x0] ldr w0, [sp, 60] sub w0, w0, #1 str w0, [sp, 60] adrp x0, d add x0, x0, :lo12:d ldr w0, [x0] bl delay_ms mov w0, 1 str w0, [sp, 92] nop ldr w0, [sp, 92] cmp w0, 9 bgt .L23 ldrsw x0, [sp, 92] lsl x0, x0, 2 add x1, sp, 112 ldr w0, [x1, x0] cmp w0, 0 beq .L29 ldr w0, [sp, 60] ldr w1, [sp, 64] sdiv w2, w0, w1 ldr w1, [sp, 64] mul w1, w2, w1 sub w0, w0, w1 cmp w0, 0 beq .L29 ldrsw x0, [sp, 92] lsl x0, x0, 2 add x1, sp, 112 ldr w1, [x1, x0] ldr w0, [sp, 60] sdiv w2, w0, w1 mul w1, w2, w1 sub w0, w0, w1 cmp w0, 0 bne .L29 ldr w0, [sp, 84] add w0, w0, 1 str w0, [sp, 84] .L29: nop .L23: ldr w0, [sp, 84] sub w0, w0, #1 str w0, [sp, 84] .L20: ldr w0, [sp, 84] cmp w0, 0 bne .L25 ldr x0, [sp, 104] ldr w0, [x0] and w1, w0, 7 adrp x0, HalfStep add x0, x0, :lo12:HalfStep sxtw x1, w1 ldr w1, [x0, x1, lsl 2] ldrb w0, [sp, 42] lsl w0, w1, w0 bl output_b ldr x0, [sp, 104] ldr w1, [x0] ldr w0, [sp, 72] add w1, w1, w0 ldr x0, [sp, 104] str w1, [x0] ldr w0, [sp, 64] sub w0, w0, #1 str w0, [sp, 64] adrp x0, d add x0, x0, :lo12:d ldr w0, [x0] bl delay_ms ldr w2, [sp, 60] ldr w1, [sp, 64] adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl printf .L19: ldr w0, [sp, 64] cmp w0, 0 bgt .L26 mov w0, 0 bl output_b .L16: ldr w1, [sp, 60] ldr w0, [sp, 64] cmp w1, w0 bgt .L27 .L6: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 152] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L28 bl __stack_chk_fail .L28: ldp x29, x30, [sp], 160 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size loop, .-loop ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global test_vtrnQp8 .type test_vtrnQp8, %function test_vtrnQp8: .LFB4340: .cfi_startproc stp x29, x30, [sp, -192]! .cfi_def_cfa_offset 192 .cfi_offset 29, -192 .cfi_offset 30, -184 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 184] mov x1, 0 ldr q2, [sp, 16] str q2, [sp, 48] ldr q2, [sp, 32] str q2, [sp, 64] ldr q2, [sp, 48] str q2, [sp, 80] ldr q2, [sp, 64] str q2, [sp, 96] ldr q2, [sp, 80] ldr q3, [sp, 96] trn1 v4.16b, v2.16b, v3.16b ldr q2, [sp, 48] str q2, [sp, 112] ldr q2, [sp, 64] str q2, [sp, 128] ldr q2, [sp, 112] ldr q3, [sp, 128] trn2 v2.16b, v2.16b, v3.16b mov v0.16b, v4.16b mov v1.16b, v2.16b add x0, sp, 144 st1 {v0.16b - v1.16b}, [x0] nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 184] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L5 bl __stack_chk_fail .L5: ldp x29, x30, [sp], 192 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4340: .size test_vtrnQp8, .-test_vtrnQp8 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global f .type f, %function f: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] ldr w0, [sp, 12] #APP // 9 "program.c" 1 vbfdw x0, x0 // 0 "" 2 #NO_APP str w0, [sp, 12] ldr w0, [sp, 12] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size f, .-f ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "" .align 3 .LC1: .string " " .align 3 .LC2: .string "r" .align 3 .LC3: .string "w" .text .align 2 .global Xpms_popen .type Xpms_popen, %function Xpms_popen: .LFB6: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -96 str x0, [sp, 40] str x1, [sp, 32] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 104] mov x1, 0 str wzr, [sp, 56] str wzr, [sp, 64] ldr x0, [sp, 40] cmp x0, 0 beq .L2 ldr x1, [sp, 40] adrp x0, .LC0 add x0, x0, :lo12:.LC0 cmp x1, x0 bne .L3 .L2: mov x0, 0 b .L26 .L3: ldr x0, [sp, 32] ldrb w0, [x0] cmp w0, 114 beq .L5 ldr x0, [sp, 32] ldrb w0, [x0] cmp w0, 119 beq .L5 mov x0, 0 b .L26 .L5: ldr x0, [sp, 40] bl strdup str x0, [sp, 88] ldr x0, [sp, 88] cmp x0, 0 bne .L6 mov x0, 0 b .L26 .L6: str xzr, [sp, 72] adrp x0, .LC1 add x1, x0, :lo12:.LC1 ldr x0, [sp, 88] bl strtok str x0, [sp, 80] ldr x0, [sp, 80] cmp x0, 0 bne .L7 ldr x0, [sp, 88] bl free mov x0, 0 b .L26 .L7: str wzr, [sp, 60] .L13: ldr w0, [sp, 60] add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 72] bl realloc str x0, [sp, 72] ldr x0, [sp, 72] cmp x0, 0 bne .L8 ldr x0, [sp, 88] bl free mov x0, 0 b .L26 .L8: ldr x0, [sp, 80] bl strlen add x2, x0, 1 ldrsw x0, [sp, 60] lsl x0, x0, 3 ldr x1, [sp, 72] add x19, x1, x0 mov x0, x2 bl malloc str x0, [x19] ldr x0, [x19] cmp x0, 0 bne .L9 ldr x0, [sp, 88] bl free mov x0, 0 b .L26 .L9: ldrsw x0, [sp, 60] lsl x0, x0, 3 ldr x1, [sp, 72] add x0, x1, x0 ldr x0, [x0] ldr x1, [sp, 80] bl strcpy adrp x0, .LC1 add x1, x0, :lo12:.LC1 mov x0, 0 bl strtok str x0, [sp, 80] ldr x0, [sp, 80] cmp x0, 0 bne .L10 ldr w0, [sp, 60] add w0, w0, 2 sxtw x0, w0 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 72] bl realloc str x0, [sp, 72] ldr x0, [sp, 72] cmp x0, 0 bne .L11 ldr x0, [sp, 88] bl free mov x0, 0 b .L26 .L11: ldrsw x0, [sp, 60] add x0, x0, 1 lsl x0, x0, 3 ldr x1, [sp, 72] add x0, x1, x0 str xzr, [x0] nop ldr x0, [sp, 32] ldrb w0, [x0] cmp w0, 114 bne .L14 b .L28 .L10: ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 60] b .L13 .L28: mov w0, 1 str w0, [sp, 56] b .L15 .L14: mov w0, 1 str w0, [sp, 64] .L15: add x0, sp, 96 bl pipe cmp w0, 0 bge .L16 ldr x0, [sp, 88] bl free mov x0, 0 b .L26 .L16: bl fork str w0, [sp, 68] ldr w0, [sp, 68] cmp w0, 0 bge .L17 ldr w0, [sp, 96] bl close ldr w0, [sp, 100] bl close ldr x0, [sp, 88] bl free mov x0, 0 b .L26 .L17: ldr w0, [sp, 68] cmp w0, 0 bne .L18 bl fork str w0, [sp, 68] ldr w0, [sp, 68] cmp w0, 0 bge .L19 ldr w0, [sp, 96] bl close ldr w0, [sp, 100] bl close ldr x0, [sp, 88] bl free mov x0, 0 b .L26 .L19: ldr w0, [sp, 68] cmp w0, 0 ble .L20 mov w0, 0 bl exit .L20: ldr w0, [sp, 56] cmp w0, 0 beq .L21 ldr w0, [sp, 96] bl close mov w1, 2 mov w0, 1 bl dup2 ldr w0, [sp, 100] cmp w0, 1 beq .L22 ldr w0, [sp, 100] mov w1, 1 bl dup2 b .L22 .L21: ldr w0, [sp, 100] bl close ldr w0, [sp, 96] cmp w0, 0 beq .L22 ldr w0, [sp, 96] mov w1, 0 bl dup2 .L22: ldr x0, [sp, 72] ldr x0, [x0] mov w1, 47 bl strchr cmp x0, 0 bne .L23 ldr x0, [sp, 72] ldr x0, [x0] ldr x1, [sp, 72] bl execvp b .L24 .L23: ldr x0, [sp, 72] ldr x0, [x0] ldr x1, [sp, 72] bl execv .L24: ldr w0, [sp, 96] bl close ldr w0, [sp, 100] bl close ldr x0, [sp, 88] bl free mov x0, 0 b .L26 .L18: mov w2, 0 mov x1, 0 ldr w0, [sp, 68] bl waitpid ldr w0, [sp, 56] cmp w0, 0 beq .L25 ldr w0, [sp, 100] bl close ldr x0, [sp, 88] bl free ldr w2, [sp, 96] adrp x0, .LC2 add x1, x0, :lo12:.LC2 mov w0, w2 bl fdopen b .L26 .L25: ldr w0, [sp, 96] bl close ldr x0, [sp, 88] bl free ldr w2, [sp, 100] adrp x0, .LC3 add x1, x0, :lo12:.LC3 mov w0, w2 bl fdopen .L26: mov x1, x0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 104] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L27 bl __stack_chk_fail .L27: mov x0, x1 ldr x19, [sp, 16] ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size Xpms_popen, .-Xpms_popen ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global f .type f, %function f: .LFB0: .cfi_startproc adrp x0, :got:renamed ldr x0, [x0, #:got_lo12:renamed] mov w1, 2 str w1, [x0] nop ret .cfi_endproc .LFE0: .size f, .-f ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global f0 .type f0, %function f0: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] str w1, [sp, 8] ldr w0, [sp, 12] ldr w1, [sp, 8] cmp w1, w0 cset w0, hi and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size f0, .-f0 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC1: .string "Creating socket failed." .align 3 .LC2: .string "Bind error." .align 3 .LC3: .string "recvfrom error\n" .align 3 .LC4: .string "You got a message (%s) from %s\n" .text .align 2 .global main .type main, %function main: .LFB6: .cfi_startproc stp x29, x30, [sp, -288]! .cfi_def_cfa_offset 288 .cfi_offset 29, -288 .cfi_offset 30, -280 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 280] mov x1, 0 adrp x0, .LC0 add x1, x0, :lo12:.LC0 add x0, sp, 64 ldr w2, [x1] str w2, [x0] ldrb w1, [x1, 4] strb w1, [x0, 4] mov w2, 0 mov w1, 2 mov w0, 2 bl socket str w0, [sp, 24] ldr w0, [sp, 24] cmn w0, #1 bne .L2 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl perror mov w0, 1 bl exit .L2: add x0, sp, 32 stp xzr, xzr, [x0] mov w0, 2 strh w0, [sp, 32] mov w0, 1234 bl htons and w0, w0, 65535 strh w0, [sp, 34] mov w0, 0 bl htonl str w0, [sp, 36] add x0, sp, 32 mov w2, 16 mov x1, x0 ldr w0, [sp, 24] bl bind cmn w0, #1 bne .L3 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl perror mov w0, 1 bl exit .L3: mov w0, 16 str w0, [sp, 16] .L9: add x2, sp, 16 add x1, sp, 48 add x0, sp, 72 mov x5, x2 mov x4, x1 mov w3, 0 mov x2, 100 mov x1, x0 ldr w0, [sp, 24] bl recvfrom str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 0 bge .L4 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl perror mov w0, 1 bl exit .L4: ldrsw x0, [sp, 28] add x1, sp, 72 strb wzr, [x1, x0] ldr w0, [sp, 52] bl inet_ntoa mov x1, x0 add x0, sp, 72 mov x2, x1 mov x1, x0 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf add x1, sp, 64 add x0, sp, 72 bl strcmp cmp w0, 0 beq .L13 str wzr, [sp, 20] str wzr, [sp, 20] b .L7 .L8: ldr w0, [sp, 28] sub w1, w0, #1 ldr w0, [sp, 20] sub w0, w1, w0 sxtw x0, w0 add x1, sp, 72 ldrb w2, [x1, x0] ldrsw x0, [sp, 20] add x1, sp, 176 strb w2, [x1, x0] ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L7: ldr w1, [sp, 20] ldr w0, [sp, 28] cmp w1, w0 blt .L8 ldrsw x0, [sp, 28] add x1, sp, 176 strb wzr, [x1, x0] add x0, sp, 176 bl strlen mov x6, x0 ldr w2, [sp, 16] add x1, sp, 48 add x0, sp, 176 mov w5, w2 mov x4, x1 mov w3, 0 mov x2, x6 mov x1, x0 ldr w0, [sp, 24] bl sendto b .L9 .L13: nop ldr w0, [sp, 24] bl close mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 280] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L11 bl __stack_chk_fail .L11: mov w0, w1 ldp x29, x30, [sp], 288 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size main, .-main .section .rodata .align 3 .LC0: .string "quit" .text ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "fork error:" .align 3 .LC1: .string "Children:I am child process.My pid is %d. I am exiting.\n" .align 3 .LC2: .string "Father:I am father process.My pid is %d.I will sleep long long ago\n" .text .align 2 .global main .type main, %function main: .LFB6: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp bl fork str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 0 bge .L2 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl perror mov w0, 1 bl exit .L2: ldr w0, [sp, 28] cmp w0, 0 bne .L3 bl getpid mov w1, w0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf mov w0, 0 bl exit .L3: bl getpid mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf .L4: b .L4 .cfi_endproc .LFE6: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global save_buf .bss .align 3 .type save_buf, %object .size save_buf, 2000 save_buf: .zero 2000 .global savebp .align 3 .type savebp, %object .size savebp, 8 savebp: .zero 8 .global varnames .align 3 .type varnames, %object .size varnames, 160 varnames: .zero 160 .text .align 2 .global start_save .type start_save, %function start_save: .LFB0: .cfi_startproc adrp x0, savebp add x0, x0, :lo12:savebp adrp x1, save_buf add x1, x1, :lo12:save_buf str x1, [x0] nop ret .cfi_endproc .LFE0: .size start_save, .-start_save .align 2 .global save_str .type save_str, %function save_str: .LFB1: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -32 str x0, [sp, 40] adrp x0, savebp add x0, x0, :lo12:savebp ldr x0, [x0] ldr x1, [sp, 40] bl strcpy adrp x0, savebp add x0, x0, :lo12:savebp ldr x19, [x0] ldr x0, [sp, 40] bl strlen add x1, x19, x0 adrp x0, savebp add x0, x0, :lo12:savebp str x1, [x0] nop ldr x19, [sp, 16] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size save_str, .-save_str .section .rodata .align 3 .LC0: .string "Too many parameter references" .align 3 .LC1: .string " #%d" .text .align 2 .global save_param .type save_param, %function save_param: .LFB2: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x0, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 mov w0, 1 str w0, [sp, 36] b .L4 .L8: adrp x0, varnames add x0, x0, :lo12:varnames ldrsw x1, [sp, 36] ldr x0, [x0, x1, lsl 3] cmp x0, 0 bne .L5 ldr x0, [sp, 24] bl strdup mov x2, x0 adrp x0, varnames add x0, x0, :lo12:varnames ldrsw x1, [sp, 36] str x2, [x0, x1, lsl 3] b .L6 .L5: adrp x0, varnames add x0, x0, :lo12:varnames ldrsw x1, [sp, 36] ldr x0, [x0, x1, lsl 3] ldr x1, [sp, 24] bl strcmp cmp w0, 0 beq .L11 ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L4: ldr w0, [sp, 36] cmp w0, 19 ble .L8 b .L6 .L11: nop .L6: ldr w0, [sp, 36] cmp w0, 19 ble .L9 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl yyerror mov w0, 1 bl exit .L9: add x3, sp, 40 ldr w2, [sp, 36] adrp x0, .LC1 add x1, x0, :lo12:.LC1 mov x0, x3 bl sprintf add x0, sp, 40 bl save_str nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L10 bl __stack_chk_fail .L10: mov w0, w1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size save_param, .-save_param .section .rodata .align 3 .LC2: .string "exec_sql(\"" .align 3 .LC3: .string "\\\n" .align 3 .LC4: .string ",\n\t&%s" .align 3 .LC5: .string ");\n" .text .align 2 .global end_sql .type end_sql, %function end_sql: .LFB3: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -32 adrp x0, savebp add x0, x0, :lo12:savebp ldr x0, [x0] sub x1, x0, #1 adrp x0, savebp add x0, x0, :lo12:savebp str x1, [x0] adrp x0, :got:yyout ldr x0, [x0, #:got_lo12:yyout] ldr x0, [x0] mov x3, x0 mov x2, 10 mov x1, 1 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl fwrite adrp x0, save_buf add x19, x0, :lo12:save_buf mov w0, 20 str w0, [sp, 44] b .L13 .L15: ldr w0, [sp, 44] cmp w0, 70 ble .L14 adrp x0, :got:yyout ldr x0, [x0, #:got_lo12:yyout] ldr x0, [x0] mov x3, x0 mov x2, 2 mov x1, 1 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl fwrite str wzr, [sp, 44] .L14: ldrb w0, [x19] mov w2, w0 adrp x0, :got:yyout ldr x0, [x0, #:got_lo12:yyout] ldr x0, [x0] mov x1, x0 mov w0, w2 bl putc add x19, x19, 1 ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L13: adrp x0, savebp add x0, x0, :lo12:savebp ldr x0, [x0] cmp x19, x0 bcc .L15 adrp x0, :got:yyout ldr x0, [x0, #:got_lo12:yyout] ldr x0, [x0] mov x1, x0 mov w0, 34 bl putc mov w0, 1 str w0, [sp, 44] b .L16 .L19: adrp x0, varnames add x0, x0, :lo12:varnames ldrsw x1, [sp, 44] ldr x0, [x0, x1, lsl 3] cmp x0, 0 beq .L20 adrp x0, :got:yyout ldr x0, [x0, #:got_lo12:yyout] ldr x3, [x0] adrp x0, varnames add x0, x0, :lo12:varnames ldrsw x1, [sp, 44] ldr x0, [x0, x1, lsl 3] mov x2, x0 adrp x0, .LC4 add x1, x0, :lo12:.LC4 mov x0, x3 bl fprintf adrp x0, varnames add x0, x0, :lo12:varnames ldrsw x1, [sp, 44] ldr x0, [x0, x1, lsl 3] bl free adrp x0, varnames add x0, x0, :lo12:varnames ldrsw x1, [sp, 44] str xzr, [x0, x1, lsl 3] ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L16: ldr w0, [sp, 44] cmp w0, 19 ble .L19 b .L18 .L20: nop .L18: adrp x0, :got:yyout ldr x0, [x0, #:got_lo12:yyout] ldr x0, [x0] mov x3, x0 mov x2, 3 mov x1, 1 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl fwrite bl un_sql nop ldr x19, [sp, 16] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size end_sql, .-end_sql ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%i" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -208]! .cfi_def_cfa_offset 208 .cfi_offset 29, -208 .cfi_offset 30, -200 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 200] mov x1, 0 mov w0, 5 str w0, [sp, 56] mov w0, 2 str w0, [sp, 60] mov w0, 26614 movk w0, 0x5, lsl 16 str w0, [sp, 64] str wzr, [sp, 40] ldr w0, [sp, 60] str w0, [sp, 44] b .L2 .L6: add x3, sp, 72 ldr w2, [sp, 44] adrp x0, .LC0 add x1, x0, :lo12:.LC0 mov x0, x3 bl sprintf str w0, [sp, 68] str wzr, [sp, 48] str wzr, [sp, 52] b .L3 .L4: ldrsw x0, [sp, 52] add x1, sp, 72 ldrb w0, [x1, x0] sub w0, w0, #48 scvtf d0, w0 ldr w0, [sp, 56] scvtf d1, w0 bl pow fmov d1, d0 ldr w0, [sp, 48] scvtf d0, w0 fadd d0, d1, d0 fcvtzs w0, d0 str w0, [sp, 48] ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L3: ldr w1, [sp, 52] ldr w0, [sp, 68] cmp w1, w0 blt .L4 ldr w1, [sp, 48] ldr w0, [sp, 44] cmp w1, w0 bne .L5 ldr w1, [sp, 40] ldr w0, [sp, 44] add w0, w1, w0 str w0, [sp, 40] .L5: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L2: ldr w1, [sp, 44] ldr w0, [sp, 64] cmp w1, w0 ble .L6 ldr w1, [sp, 40] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 200] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L8 bl __stack_chk_fail .L8: mov w0, w1 ldp x29, x30, [sp], 208 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global image .bss .align 3 .type image, %object .size image, 1638400 image: .zero 1638400 .global width .align 3 .type width, %object .size width, 4 width: .zero 4 .global height .align 3 .type height, %object .size height, 4 height: .zero 4 .global info_image .align 3 .type info_image, %object .size info_image, 16 info_image: .zero 16 .global info_label .align 3 .type info_label, %object .size info_label, 8 info_label: .zero 8 .global train_image_char .align 3 .type train_image_char, %object .size train_image_char, 47040000 train_image_char: .zero 47040000 .global test_image_char .align 3 .type test_image_char, %object .size test_image_char, 7840000 test_image_char: .zero 7840000 .global train_label_char .align 3 .type train_label_char, %object .size train_label_char, 60000 train_label_char: .zero 60000 .global test_label_char .align 3 .type test_label_char, %object .size test_label_char, 10000 test_label_char: .zero 10000 .global train_image .align 3 .type train_image, %object .size train_image, 376320000 train_image: .zero 376320000 .global test_image .align 3 .type test_image, %object .size test_image, 62720000 test_image: .zero 62720000 .global train_label .align 3 .type train_label, %object .size train_label, 240000 train_label: .zero 240000 .global test_label .align 3 .type test_label, %object .size test_label, 40000 test_label: .zero 40000 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global copyright .data .align 3 .type copyright, %object .size copyright, 92 copyright: .string "@(#) Copyright (c) 1990 The Regents of the University of California.\n All rights reserved.\n" .align 3 .type sccsid, %object .size sccsid, 34 sccsid: .string "@(#)cat.c\t7.1 (Berkeley) 04/24/90" .section .rodata .align 3 .LC0: .string "File: " .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 88] mov x1, 0 .L2: adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf add x0, sp, 32 bl gets add x0, sp, 32 mov w1, 0 bl open str w0, [sp, 24] ldr w0, [sp, 24] cmp w0, 0 ble .L2 b .L3 .L4: ldr w0, [sp, 28] bl putchar .L3: ldr w0, [sp, 24] bl getc str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 0 bgt .L4 mov w0, 0 bl exit .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .local opt .comm opt,24,8 .align 2 .type parse_unit, %function parse_unit: .LFB0: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 strb w0, [sp, 15] str x1, [sp] mov x0, 1 str x0, [sp, 24] ldrb w0, [sp, 15] cmp w0, 122 beq .L2 cmp w0, 122 bgt .L3 cmp w0, 121 beq .L4 cmp w0, 121 bgt .L3 cmp w0, 116 beq .L5 cmp w0, 116 bgt .L3 cmp w0, 112 beq .L6 cmp w0, 112 bgt .L3 cmp w0, 109 beq .L7 cmp w0, 109 bgt .L3 cmp w0, 107 beq .L8 cmp w0, 107 bgt .L3 cmp w0, 103 beq .L9 cmp w0, 103 bgt .L3 cmp w0, 101 beq .L10 cmp w0, 101 bgt .L3 cmp w0, 90 beq .L2 cmp w0, 90 bgt .L3 cmp w0, 89 beq .L4 cmp w0, 89 bgt .L3 cmp w0, 84 beq .L5 cmp w0, 84 bgt .L3 cmp w0, 80 beq .L6 cmp w0, 80 bgt .L3 cmp w0, 77 beq .L7 cmp w0, 77 bgt .L3 cmp w0, 75 beq .L8 cmp w0, 75 bgt .L3 cmp w0, 69 beq .L10 cmp w0, 71 beq .L9 b .L3 .L4: ldr x1, [sp, 24] ldr x0, [sp] mul x0, x1, x0 str x0, [sp, 24] .L2: ldr x1, [sp, 24] ldr x0, [sp] mul x0, x1, x0 str x0, [sp, 24] .L10: ldr x1, [sp, 24] ldr x0, [sp] mul x0, x1, x0 str x0, [sp, 24] .L6: ldr x1, [sp, 24] ldr x0, [sp] mul x0, x1, x0 str x0, [sp, 24] .L5: ldr x1, [sp, 24] ldr x0, [sp] mul x0, x1, x0 str x0, [sp, 24] .L9: ldr x1, [sp, 24] ldr x0, [sp] mul x0, x1, x0 str x0, [sp, 24] .L7: ldr x1, [sp, 24] ldr x0, [sp] mul x0, x1, x0 str x0, [sp, 24] .L8: ldr x1, [sp, 24] ldr x0, [sp] mul x0, x1, x0 str x0, [sp, 24] ldr x0, [sp, 24] b .L11 .L3: mov x0, 0 .L11: add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size parse_unit, .-parse_unit .section .rodata .align 3 .LC0: .string "%s: invalid size: %s\n" .align 3 .LC1: .string "%s: invalid number: %s\n" .text .align 2 .type parse_size, %function parse_size: .LFB1: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 adrp x0, opt add x0, x0, :lo12:opt ldr x0, [x0, 8] cmp x0, 0 bne .L13 mov x0, 0 b .L23 .L13: adrp x0, opt add x0, x0, :lo12:opt ldr x0, [x0, 8] bl strlen str x0, [sp, 48] ldr x0, [sp, 48] cmp x0, 0 beq .L15 ldr x0, [sp, 48] cmp x0, 1 beq .L16 b .L25 .L15: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x4, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x1, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x0, [x0, 8] mov x3, x0 mov x2, x1 adrp x0, .LC0 add x1, x0, :lo12:.LC0 mov x0, x4 bl fprintf mov w0, 1 bl exit .L16: bl __ctype_b_loc ldr x1, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x0, [x0, 8] ldrb w0, [x0] and x0, x0, 255 lsl x0, x0, 1 add x0, x1, x0 ldrh w0, [x0] and w0, w0, 2048 cmp w0, 0 bne .L18 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x4, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x1, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x0, [x0, 8] mov x3, x0 mov x2, x1 adrp x0, .LC0 add x1, x0, :lo12:.LC0 mov x0, x4 bl fprintf mov w0, 1 bl exit .L18: adrp x0, opt add x0, x0, :lo12:opt ldr x0, [x0, 8] ldrb w0, [x0] sub w0, w0, #48 sxtw x0, w0 b .L23 .L25: adrp x0, opt add x0, x0, :lo12:opt ldr x1, [x0, 8] ldr x0, [sp, 48] sub x0, x0, #1 add x0, x1, x0 ldrb w0, [x0] strb w0, [sp, 31] mov x1, 1024 ldrb w0, [sp, 31] bl parse_unit str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L19 ldrb w0, [sp, 31] cmp w0, 66 beq .L20 ldrb w0, [sp, 31] cmp w0, 98 bne .L19 .L20: adrp x0, opt add x0, x0, :lo12:opt ldr x1, [x0, 8] ldr x0, [sp, 48] sub x0, x0, #2 add x0, x1, x0 ldrb w0, [x0] strb w0, [sp, 31] mov x1, 1000 ldrb w0, [sp, 31] bl parse_unit str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L21 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x4, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x1, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x0, [x0, 8] mov x3, x0 mov x2, x1 adrp x0, .LC1 add x1, x0, :lo12:.LC1 mov x0, x4 bl fprintf mov w0, 1 bl exit .L21: adrp x0, opt add x0, x0, :lo12:opt ldr x1, [x0, 8] ldr x0, [sp, 48] sub x0, x0, #2 add x0, x1, x0 strb wzr, [x0] .L19: adrp x0, opt add x0, x0, :lo12:opt ldr x1, [x0, 8] ldr x0, [sp, 48] sub x0, x0, #1 add x0, x1, x0 strb wzr, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x0, [x0, 8] add x1, sp, 32 mov w2, 10 bl strtol mov x1, x0 ldr x0, [sp, 40] mul x0, x0, x1 str x0, [sp, 40] ldr x0, [sp, 32] ldrb w0, [x0] cmp w0, 0 beq .L22 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x4, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x1, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr x0, [x0, 8] mov x3, x0 mov x2, x1 adrp x0, .LC1 add x1, x0, :lo12:.LC1 mov x0, x4 bl fprintf mov w0, 1 bl exit .L22: ldr x0, [sp, 40] .L23: mov x1, x0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L24 bl __stack_chk_fail .L24: mov x0, x1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size parse_size, .-parse_size .section .rodata .align 3 .LC2: .string "-c" .align 3 .LC3: .string "-s=" .align 3 .LC4: .string "%s: invalid argument: %s\n" .align 3 .LC5: .string "%s: missing operands\n" .align 3 .LC6: .string "%s: %s: %s\n" .text .align 2 .global main .type main, %function main: .LFB2: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp stp x19, x20, [sp, 16] str x21, [sp, 32] .cfi_offset 19, -64 .cfi_offset 20, -56 .cfi_offset 21, -48 str w0, [sp, 60] str x1, [sp, 48] ldr x0, [sp, 48] ldr x1, [x0] adrp x0, opt add x0, x0, :lo12:opt str x1, [x0] adrp x0, opt add x0, x0, :lo12:opt mov w1, 64 str w1, [x0, 16] mov w0, 1 str w0, [sp, 64] b .L27 .L34: ldrsw x0, [sp, 64] lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 ldr x0, [x0] ldrb w0, [x0] cmp w0, 45 bne .L41 ldrsw x0, [sp, 64] lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 ldr x2, [x0] adrp x0, .LC2 add x1, x0, :lo12:.LC2 mov x0, x2 bl strcmp cmp w0, 0 bne .L30 adrp x0, opt add x0, x0, :lo12:opt str wzr, [x0, 16] b .L31 .L30: ldrsw x0, [sp, 64] lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 ldr x3, [x0] mov x2, 3 adrp x0, .LC3 add x1, x0, :lo12:.LC3 mov x0, x3 bl strncmp cmp w0, 0 bne .L32 ldrsw x0, [sp, 64] lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 ldr x0, [x0] add x1, x0, 3 adrp x0, opt add x0, x0, :lo12:opt str x1, [x0, 8] b .L31 .L32: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x4, [x0] ldr x0, [sp, 48] ldr x2, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 ldr x0, [x0] mov x3, x0 adrp x0, .LC4 add x1, x0, :lo12:.LC4 mov x0, x4 bl fprintf mov w0, 1 b .L33 .L31: ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] .L27: ldr w1, [sp, 64] ldr w0, [sp, 60] cmp w1, w0 blt .L34 b .L29 .L41: nop .L29: ldr w1, [sp, 64] ldr w0, [sp, 60] cmp w1, w0 bne .L35 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] ldr x0, [sp, 48] ldr x0, [x0] mov x2, x0 adrp x0, .LC5 add x1, x0, :lo12:.LC5 mov x0, x3 bl fprintf mov w0, 1 b .L33 .L35: bl parse_size str x0, [sp, 72] b .L36 .L40: ldrsw x0, [sp, 64] lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 ldr x3, [x0] adrp x0, opt add x0, x0, :lo12:opt ldr w0, [x0, 16] orr w0, w0, 1 mov w2, 438 mov w1, w0 mov x0, x3 bl open str w0, [sp, 68] ldr w0, [sp, 68] cmp w0, 0 bge .L37 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x19, [x0] ldr x0, [sp, 48] ldr x20, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 ldr x21, [x0] bl __errno_location ldr w0, [x0] bl strerror mov x4, x0 mov x3, x21 mov x2, x20 adrp x0, .LC6 add x1, x0, :lo12:.LC6 mov x0, x19 bl fprintf mov w0, 1 b .L33 .L37: ldr x1, [sp, 72] ldr w0, [sp, 68] bl ftruncate cmp w0, 0 beq .L38 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x19, [x0] ldr x0, [sp, 48] ldr x20, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 ldr x21, [x0] bl __errno_location ldr w0, [x0] bl strerror mov x4, x0 mov x3, x21 mov x2, x20 adrp x0, .LC6 add x1, x0, :lo12:.LC6 mov x0, x19 bl fprintf mov w0, 1 b .L33 .L38: ldr w0, [sp, 68] bl close cmp w0, 0 beq .L39 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x19, [x0] ldr x0, [sp, 48] ldr x20, [x0] ldrsw x0, [sp, 64] lsl x0, x0, 3 ldr x1, [sp, 48] add x0, x1, x0 ldr x21, [x0] bl __errno_location ldr w0, [x0] bl strerror mov x4, x0 mov x3, x21 mov x2, x20 adrp x0, .LC6 add x1, x0, :lo12:.LC6 mov x0, x19 bl fprintf mov w0, 1 b .L33 .L39: ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] .L36: ldr w1, [sp, 64] ldr w0, [sp, 60] cmp w1, w0 blt .L40 mov w0, 0 .L33: ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global NimbleVersionString .section .rodata .align 3 .type NimbleVersionString, %object .size NimbleVersionString, 36 NimbleVersionString: .string "@(#)PROGRAM:Nimble PROJECT:Pods-1\n" .global NimbleVersionNumber .align 3 .type NimbleVersionNumber, %object .size NimbleVersionNumber, 8 NimbleVersionNumber: .word 0 .word 1072693248 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global f2 .type f2, %function f2: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0] cmp w0, 0 beq .L2 adrp x0, :got:a3 ldr x0, [x0, #:got_lo12:a3] b .L3 .L2: mov x0, 0 .L3: str x0, [sp, 16] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 4] cmp w0, 0 bne .L4 ldr x0, [sp, 16] b .L5 .L4: adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] .L5: str x0, [sp, 24] mov x2, 6 mov w1, 0 ldr x0, [sp, 24] bl memset ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size f2, .-f2 .align 2 .global f3 .type f3, %function f3: .LFB1: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0] cmp w0, 0 beq .L8 adrp x0, :got:a3 ldr x0, [x0, #:got_lo12:a3] b .L9 .L8: mov x0, 0 .L9: str x0, [sp, 24] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 4] cmp w0, 0 beq .L10 adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] b .L11 .L10: mov x0, 0 .L11: str x0, [sp, 32] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 8] cmp w0, 0 beq .L12 ldr x0, [sp, 24] b .L13 .L12: ldr x0, [sp, 32] .L13: str x0, [sp, 40] mov x2, 6 mov w1, 0 ldr x0, [sp, 40] bl memset ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size f3, .-f3 .align 2 .global f3_2 .type f3_2, %function f3_2: .LFB2: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0] cmp w0, 0 beq .L16 adrp x0, :got:a3 ldr x0, [x0, #:got_lo12:a3] b .L17 .L16: mov x0, 0 .L17: str x0, [sp, 24] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 4] cmp w0, 0 beq .L18 adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] b .L19 .L18: mov x0, 0 .L19: str x0, [sp, 32] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 8] cmp w0, 0 beq .L20 ldr x0, [sp, 32] b .L21 .L20: ldr x0, [sp, 24] .L21: str x0, [sp, 40] mov x2, 6 mov w1, 0 ldr x0, [sp, 40] bl memset ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size f3_2, .-f3_2 .align 2 .global f3_3 .type f3_3, %function f3_3: .LFB3: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0] cmp w0, 0 beq .L24 adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] b .L25 .L24: mov x0, 0 .L25: str x0, [sp, 24] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 4] cmp w0, 0 beq .L26 ldr x0, [sp, 24] b .L27 .L26: adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] .L27: str x0, [sp, 32] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 8] cmp w0, 0 beq .L28 ldr x0, [sp, 32] b .L29 .L28: ldr x0, [sp, 24] .L29: str x0, [sp, 40] mov x2, 6 mov w1, 0 ldr x0, [sp, 40] bl memset ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size f3_3, .-f3_3 .align 2 .global f4 .type f4, %function f4: .LFB4: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0] cmp w0, 0 beq .L32 adrp x0, :got:a3 ldr x0, [x0, #:got_lo12:a3] b .L33 .L32: mov x0, 0 .L33: str x0, [sp, 16] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 4] cmp w0, 0 beq .L34 adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] b .L35 .L34: mov x0, 0 .L35: str x0, [sp, 24] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 8] cmp w0, 0 beq .L36 ldr x0, [sp, 16] b .L37 .L36: mov x0, 0 .L37: str x0, [sp, 32] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 12] cmp w0, 0 beq .L38 ldr x0, [sp, 24] b .L39 .L38: ldr x0, [sp, 32] .L39: str x0, [sp, 40] mov x2, 6 mov w1, 0 ldr x0, [sp, 40] bl memset ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size f4, .-f4 .align 2 .global f9 .type f9, %function f9: .LFB5: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0] cmp w0, 0 beq .L42 adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] b .L43 .L42: mov x0, 0 .L43: str x0, [sp, 16] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 4] cmp w0, 0 beq .L44 adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] add x0, x0, 1 b .L45 .L44: mov x0, 0 .L45: str x0, [sp, 24] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 8] cmp w0, 0 beq .L46 adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] add x0, x0, 2 b .L47 .L46: mov x0, 0 .L47: str x0, [sp, 32] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 12] cmp w0, 0 beq .L48 adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] add x0, x0, 3 b .L49 .L48: mov x0, 0 .L49: str x0, [sp, 40] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 16] cmp w0, 0 beq .L50 adrp x0, :got:a5 ldr x0, [x0, #:got_lo12:a5] add x0, x0, 4 b .L51 .L50: mov x0, 0 .L51: str x0, [sp, 48] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 20] cmp w0, 0 beq .L52 ldr x0, [sp, 16] b .L53 .L52: ldr x0, [sp, 24] .L53: str x0, [sp, 56] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 24] cmp w0, 0 beq .L54 ldr x0, [sp, 56] b .L55 .L54: ldr x0, [sp, 32] .L55: str x0, [sp, 64] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 28] cmp w0, 0 beq .L56 ldr x0, [sp, 64] b .L57 .L56: ldr x0, [sp, 40] .L57: str x0, [sp, 72] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 32] cmp w0, 0 beq .L58 ldr x0, [sp, 72] b .L59 .L58: ldr x0, [sp, 48] .L59: str x0, [sp, 80] adrp x0, :got:cnd ldr x0, [x0, #:got_lo12:cnd] ldr w0, [x0, 36] cmp w0, 0 beq .L60 ldr x0, [sp, 80] b .L61 .L60: ldr x0, [sp, 56] .L61: str x0, [sp, 88] mov x2, 6 mov w1, 0 ldr x0, [sp, 88] bl memset ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE5: .size f9, .-f9 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global duplicateZeros .type duplicateZeros, %function duplicateZeros: .LFB0: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] str wzr, [sp, 24] b .L2 .L6: ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 ldr w0, [x0] cmp w0, 0 bne .L3 ldr w0, [sp, 4] sub w0, w0, #1 ldr w1, [sp, 24] cmp w1, w0 beq .L3 ldr w0, [sp, 4] sub w0, w0, #1 str w0, [sp, 28] b .L4 .L5: ldrsw x0, [sp, 28] lsl x0, x0, 2 sub x0, x0, #4 ldr x1, [sp, 8] add x1, x1, x0 ldrsw x0, [sp, 28] lsl x0, x0, 2 ldr x2, [sp, 8] add x0, x2, x0 ldr w1, [x1] str w1, [x0] ldr w0, [sp, 28] sub w0, w0, #1 str w0, [sp, 28] .L4: ldr w1, [sp, 28] ldr w0, [sp, 24] cmp w1, w0 bgt .L5 ldrsw x0, [sp, 24] add x0, x0, 1 lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 str wzr, [x0] ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L3: ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L2: ldr w1, [sp, 24] ldr w0, [sp, 4] cmp w1, w0 blt .L6 nop nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size duplicateZeros, .-duplicateZeros ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global matrix_mult .type matrix_mult, %function matrix_mult: .LFB6: .cfi_startproc sub sp, sp, #80 .cfi_def_cfa_offset 80 str x0, [sp, 40] str x1, [sp, 32] str x2, [sp, 24] str w3, [sp, 20] str w4, [sp, 16] str w5, [sp, 12] str wzr, [sp, 60] b .L2 .L5: str wzr, [sp, 64] b .L3 .L4: ldr w1, [sp, 12] ldr w0, [sp, 60] mul w1, w1, w0 ldr w0, [sp, 64] add w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 ldr x1, [sp, 24] add x0, x1, x0 str xzr, [x0] ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] .L3: ldr w1, [sp, 64] ldr w0, [sp, 12] cmp w1, w0 blt .L4 ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 60] .L2: ldr w1, [sp, 60] ldr w0, [sp, 20] cmp w1, w0 blt .L5 str wzr, [sp, 68] b .L6 .L11: str wzr, [sp, 72] b .L7 .L10: str wzr, [sp, 76] b .L8 .L9: ldr w1, [sp, 12] ldr w0, [sp, 68] mul w1, w1, w0 ldr w0, [sp, 76] add w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 ldr x1, [sp, 24] add x0, x1, x0 ldr d1, [x0] ldr w1, [sp, 16] ldr w0, [sp, 68] mul w1, w1, w0 ldr w0, [sp, 72] add w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 ldr x1, [sp, 40] add x0, x1, x0 ldr d2, [x0] ldr w1, [sp, 12] ldr w0, [sp, 72] mul w1, w1, w0 ldr w0, [sp, 76] add w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 ldr x1, [sp, 32] add x0, x1, x0 ldr d0, [x0] fmul d0, d2, d0 ldr w1, [sp, 12] ldr w0, [sp, 68] mul w1, w1, w0 ldr w0, [sp, 76] add w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 ldr x1, [sp, 24] add x0, x1, x0 fadd d0, d1, d0 str d0, [x0] ldr w0, [sp, 76] add w0, w0, 1 str w0, [sp, 76] .L8: ldr w1, [sp, 76] ldr w0, [sp, 12] cmp w1, w0 blt .L9 ldr w0, [sp, 72] add w0, w0, 1 str w0, [sp, 72] .L7: ldr w1, [sp, 72] ldr w0, [sp, 16] cmp w1, w0 blt .L10 ldr w0, [sp, 68] add w0, w0, 1 str w0, [sp, 68] .L6: ldr w1, [sp, 68] ldr w0, [sp, 20] cmp w1, w0 blt .L11 nop nop add sp, sp, 80 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size matrix_mult, .-matrix_mult .align 2 .global init_matrix .type init_matrix, %function init_matrix: .LFB7: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] str w2, [sp, 16] str wzr, [sp, 40] b .L13 .L16: str wzr, [sp, 44] b .L14 .L15: bl rand scvtf d0, w0 ldr w1, [sp, 16] ldr w0, [sp, 40] mul w1, w1, w0 ldr w0, [sp, 44] add w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 ldr x1, [sp, 24] add x0, x1, x0 mov x1, 281474972516352 movk x1, 0x41df, lsl 48 fmov d1, x1 fdiv d0, d0, d1 str d0, [x0] ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L14: ldr w1, [sp, 44] ldr w0, [sp, 16] cmp w1, w0 blt .L15 ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L13: ldr w1, [sp, 40] ldr w0, [sp, 20] cmp w1, w0 blt .L16 nop nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size init_matrix, .-init_matrix .section .rodata .align 3 .LC0: .string "Result acc: %f\n" .text .align 2 .global print_matrix_result .type print_matrix_result, %function print_matrix_result: .LFB8: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] str w2, [sp, 16] str xzr, [sp, 40] str wzr, [sp, 32] b .L18 .L21: str wzr, [sp, 36] b .L19 .L20: ldr w1, [sp, 16] ldr w0, [sp, 32] mul w1, w1, w0 ldr w0, [sp, 36] add w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 ldr x1, [sp, 24] add x0, x1, x0 ldr d0, [x0] ldr d1, [sp, 40] fadd d0, d1, d0 str d0, [sp, 40] ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L19: ldr w1, [sp, 36] ldr w0, [sp, 16] cmp w1, w0 blt .L20 ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L18: ldr w1, [sp, 32] ldr w0, [sp, 20] cmp w1, w0 blt .L21 ldr d0, [sp, 40] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size print_matrix_result, .-print_matrix_result .align 2 .global test_matrix_mul .type test_matrix_mul, %function test_matrix_mul: .LFB9: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp mov w0, 512 str w0, [sp, 28] mov w0, 256 str w0, [sp, 32] mov w0, 512 str w0, [sp, 36] ldr w1, [sp, 28] ldr w0, [sp, 32] mul w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 bl malloc str x0, [sp, 40] ldr w1, [sp, 32] ldr w0, [sp, 36] mul w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 bl malloc str x0, [sp, 48] ldr w1, [sp, 28] ldr w0, [sp, 36] mul w0, w1, w0 sxtw x0, w0 lsl x0, x0, 3 bl malloc str x0, [sp, 56] ldr w2, [sp, 32] ldr w1, [sp, 28] ldr x0, [sp, 40] bl init_matrix ldr w2, [sp, 36] ldr w1, [sp, 32] ldr x0, [sp, 48] bl init_matrix ldr w5, [sp, 36] ldr w4, [sp, 32] ldr w3, [sp, 28] ldr x2, [sp, 56] ldr x1, [sp, 48] ldr x0, [sp, 40] bl matrix_mult ldr w2, [sp, 36] ldr w1, [sp, 28] ldr x0, [sp, 56] bl print_matrix_result nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size test_matrix_mul, .-test_matrix_mul .align 2 .global main .type main, %function main: .LFB10: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp mov w0, 0 bl srand bl test_matrix_mul mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%d" .align 3 .LC1: .string "VOLUME = %.3lf\n" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 add x0, sp, 20 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf adrp x0, .LC2 ldr d0, [x0, #:lo12:.LC2] str d0, [sp, 24] ldr w0, [sp, 20] scvtf d1, w0 ldr d0, [sp, 24] fmul d1, d1, d0 ldr w0, [sp, 20] scvtf d0, w0 fmul d1, d1, d0 ldr w0, [sp, 20] scvtf d0, w0 fmul d1, d1, d0 fmov d0, 4.0e+0 fmul d1, d1, d0 fmov d0, 3.0e+0 fdiv d0, d1, d0 str d0, [sp, 32] ldr d0, [sp, 32] adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 40] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L3 bl __stack_chk_fail .L3: mov w0, w1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .section .rodata .align 3 .LC2: .word -266631570 .word 1074340345 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "Level Cleared" .text .align 2 .global nothing_interesting .type nothing_interesting, %function nothing_interesting: .LFB6: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size nothing_interesting, .-nothing_interesting .section .rodata .align 3 .LC1: .string "Wait, you aren't supposed to be here" .align 3 .LC2: .string "O look you didn't solve this. How very predictable" .text .align 2 .global main .type main, %function main: .LFB7: .cfi_startproc stp x29, x30, [sp, -336]! .cfi_def_cfa_offset 336 .cfi_offset 29, -336 .cfi_offset 30, -328 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 328] mov x1, 0 str xzr, [sp, 16] adrp x0, :got:stdin ldr x0, [x0, #:got_lo12:stdin] ldr x1, [x0] add x0, sp, 24 mov x2, x1 mov x1, 300 bl __isoc99_scanf ldr x0, [sp, 16] cmp x0, 0 beq .L3 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts ldr x0, [sp, 16] blr x0 b .L4 .L3: adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts .L4: mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 328] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L6 bl __stack_chk_fail .L6: mov w0, w1 ldp x29, x30, [sp], 336 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global IID_IWrappedProtocol .section .rodata .align 3 .type IID_IWrappedProtocol, %object .size IID_IWrappedProtocol, 24 IID_IWrappedProtocol: .xword 1405634437 .hword -31707 .hword 19909 .ascii "\227\033\345\215\234\031\371\266" .zero 4 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .local cnt .comm cnt,4,4 .global counter .bss .align 3 .type counter, %object .size counter, 48 counter: .zero 48 .text .align 2 .global worker .type worker, %function worker: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] bl stick_this_thread_to_core str wzr, [sp, 44] b .L2 .L3: adrp x0, counter add x0, x0, :lo12:counter bl pthread_mutex_lock adrp x0, cnt add x0, x0, :lo12:cnt ldr w0, [x0] add w2, w0, 1 adrp x1, cnt add x1, x1, :lo12:cnt str w2, [x1] str w0, [sp, 40] adrp x0, counter add x0, x0, :lo12:counter bl pthread_mutex_unlock ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L2: ldr w1, [sp, 44] mov w0, 34463 movk w0, 0x1, lsl 16 cmp w1, w0 ble .L3 ldrsw x0, [sp, 40] bl pthread_exit .cfi_endproc .LFE0: .size worker, .-worker .section .rodata .align 3 .LC0: .string "WTF?" .align 3 .LC1: .string "\r%d " .align 3 .LC2: .string "\nexpectd: %d\n" .align 3 .LC3: .string "result: %d\n" .text .align 2 .global main .type main, %function main: .LFB1: .cfi_startproc sub sp, sp, #864 .cfi_def_cfa_offset 864 stp x29, x30, [sp] .cfi_offset 29, -864 .cfi_offset 30, -856 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 856] mov x1, 0 str wzr, [sp, 40] mov x1, 0 adrp x0, counter add x0, x0, :lo12:counter bl pthread_mutex_init str wzr, [sp, 44] b .L5 .L8: ldr w0, [sp, 44] add x1, sp, 56 sxtw x0, w0 lsl x0, x0, 3 add x4, x1, x0 add x0, sp, 44 mov x3, x0 adrp x0, worker add x2, x0, :lo12:worker mov x1, 0 mov x0, x4 bl pthread_create str w0, [sp, 52] ldr w0, [sp, 52] cmp w0, 0 beq .L6 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, -1 b .L11 .L6: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L5: ldr w0, [sp, 44] cmp w0, 99 ble .L8 str wzr, [sp, 48] b .L9 .L10: ldrsw x0, [sp, 48] lsl x0, x0, 3 add x1, sp, 56 ldr x0, [x1, x0] add x1, sp, 40 bl pthread_join ldr w0, [sp, 40] mov w1, w0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush mov w0, 10000 bl usleep ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L9: ldr w0, [sp, 48] cmp w0, 99 ble .L10 mov w1, 38528 movk w1, 0x98, lsl 16 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf adrp x0, cnt add x0, x0, :lo12:cnt ldr w0, [x0] mov w1, w0 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl printf mov w0, 0 .L11: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 856] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L12 bl __stack_chk_fail .L12: mov w0, w1 ldp x29, x30, [sp] add sp, sp, 864 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size main, .-main .align 2 .global stick_this_thread_to_core .type stick_this_thread_to_core, %function stick_this_thread_to_core: .LFB2: .cfi_startproc stp x29, x30, [sp, -192]! .cfi_def_cfa_offset 192 .cfi_offset 29, -192 .cfi_offset 30, -184 mov x29, sp str w0, [sp, 28] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 184] mov x1, 0 mov w0, 84 bl sysconf str w0, [sp, 36] add x0, sp, 56 movi v0.4s, 0 stp q0, q0, [x0] stp q0, q0, [x0, 32] stp q0, q0, [x0, 64] stp q0, q0, [x0, 96] ldr w0, [sp, 28] ldr w1, [sp, 36] sdiv w2, w0, w1 ldr w1, [sp, 36] mul w1, w2, w1 sub w0, w0, w1 sxtw x0, w0 str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 1023 bhi .L15 ldr x0, [sp, 40] lsr x0, x0, 6 lsl x1, x0, 3 add x2, sp, 56 add x1, x2, x1 ldr x2, [x1] ldr x1, [sp, 40] and w1, w1, 63 mov x3, 1 lsl x1, x3, x1 lsl x0, x0, 3 add x3, sp, 56 add x0, x3, x0 orr x1, x2, x1 str x1, [x0] .L15: bl pthread_self str x0, [sp, 48] add x0, sp, 56 mov x2, x0 mov x1, 128 ldr x0, [sp, 48] bl pthread_setaffinity_np mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 184] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L17 bl __stack_chk_fail .L17: mov w0, w1 ldp x29, x30, [sp], 192 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size stick_this_thread_to_core, .-stick_this_thread_to_core ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global base_types .section .rodata .align 3 .LC0: .string "int" .section .data.rel.local,"aw" .align 3 .type base_types, %object .size base_types, 8 base_types: .xword .LC0 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .startup,"ax",@progbits .align 2 .global Init_Machine .type Init_Machine, %function Init_Machine: .LFB0: .cfi_startproc #APP // 53 "program.c" 1 ldr r0, =0x000000d2 msr cpsr_c, r0 // 0 "" 2 // 56 "program.c" 1 ldr sp, =0x8000 // 0 "" 2 // 59 "program.c" 1 ldr r0, =0x000000d1 msr cpsr_c, r0 // 0 "" 2 // 62 "program.c" 1 ldr sp, =0x4000 // 0 "" 2 // 65 "program.c" 1 ldr r0, =0x000000d3 msr cpsr_c, r0 // 0 "" 2 // 68 "program.c" 1 ldr sp, =0x06400000 // 0 "" 2 // 70 "program.c" 1 bl main // 0 "" 2 // 71 "program.c" 1 b . // 0 "" 2 #NO_APP nop ret .cfi_endproc .LFE0: .size Init_Machine, .-Init_Machine .text .align 2 .global systime .type systime, %function systime: .LFB1: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 mov x0, 12296 movk x0, 0x2000, lsl 16 ldr w0, [x0] str w0, [sp] mov x0, 12292 movk x0, 0x2000, lsl 16 ldr w0, [x0] str w0, [sp, 4] mov x0, 12296 movk x0, 0x2000, lsl 16 ldr w0, [x0] ldr w1, [sp] cmp w1, w0 beq .L3 mov x0, 12296 movk x0, 0x2000, lsl 16 ldr w0, [x0] str w0, [sp] mov x0, 12292 movk x0, 0x2000, lsl 16 ldr w0, [x0] str w0, [sp, 4] .L3: ldr w0, [sp] str x0, [sp, 8] ldr x0, [sp, 8] lsl x0, x0, 32 str x0, [sp, 8] ldr w0, [sp, 4] ldr x1, [sp, 8] add x0, x1, x0 str x0, [sp, 8] ldr x0, [sp, 8] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size systime, .-systime .align 2 .global delay_ms .type delay_ms, %function delay_ms: .LFB2: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str w0, [sp, 28] bl systime mov x2, x0 ldr w1, [sp, 28] mov w0, 1000 mul w0, w1, w0 uxtw x0, w0 add x0, x2, x0 str x0, [sp, 40] nop .L6: bl systime mov x1, x0 ldr x0, [sp, 40] cmp x0, x1 bhi .L6 nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size delay_ms, .-delay_ms .align 2 .global uart_putchar .type uart_putchar, %function uart_putchar: .LFB3: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strb w0, [sp, 15] nop .L10: mov x0, 20564 movk x0, 0x2021, lsl 16 ldr w0, [x0] and w0, w0, 64 cmp w0, 0 bne .L9 mov x0, 20564 movk x0, 0x2021, lsl 16 ldr w0, [x0] and w0, w0, 32 cmp w0, 0 beq .L10 .L9: mov x0, 20544 movk x0, 0x2021, lsl 16 ldrb w1, [sp, 15] str w1, [x0] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size uart_putchar, .-uart_putchar .align 2 .global uart_print .type uart_print, %function uart_print: .LFB4: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] b .L12 .L13: ldr x0, [sp, 24] add x1, x0, 1 str x1, [sp, 24] ldrb w0, [x0] bl uart_putchar .L12: ldr x0, [sp, 24] ldrb w0, [x0] cmp w0, 0 bne .L13 nop nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size uart_print, .-uart_print .section .data.rel.local,"aw" .align 5 .type exception_vector, %object .size exception_vector, 96 exception_vector: .word -442503144 .word -442503144 .word -442503144 .word -442503144 .word -442503144 .word -442503144 .word -442503144 .word -442503144 .xword Init_Machine .xword undef_handler .xword svc_handler .xword abort_handler .xword abort_handler .xword hangup .xword irq_handler .xword hangup .text .align 2 .global set_vbar .type set_vbar, %function set_vbar: .LFB5: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] #APP // 151 "program.c" 1 mcr p15, 0, x0, c12, c0, 0 // 0 "" 2 #NO_APP nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE5: .size set_vbar, .-set_vbar .local counter .comm counter,4,4 .local changed .comm changed,4,4 .align 2 .type undef_handler, %function undef_handler: .LFB6: .cfi_startproc nop ret .cfi_endproc .LFE6: .size undef_handler, .-undef_handler .align 2 .type svc_handler, %function svc_handler: .LFB7: .cfi_startproc nop ret .cfi_endproc .LFE7: .size svc_handler, .-svc_handler .align 2 .type abort_handler, %function abort_handler: .LFB8: .cfi_startproc nop ret .cfi_endproc .LFE8: .size abort_handler, .-abort_handler .align 2 .type irq_handler, %function irq_handler: .LFB9: .cfi_startproc mov x0, 46092 movk x0, 0x2000, lsl 16 str wzr, [x0] adrp x0, counter add x0, x0, :lo12:counter ldr w0, [x0] add w1, w0, 1 adrp x0, counter add x0, x0, :lo12:counter str w1, [x0] adrp x0, changed add x0, x0, :lo12:changed mov w1, 1 str w1, [x0] nop ret .cfi_endproc .LFE9: .size irq_handler, .-irq_handler .align 2 .type fiq_handler, %function fiq_handler: .LFB10: .cfi_startproc nop ret .cfi_endproc .LFE10: .size fiq_handler, .-fiq_handler .align 2 .type hangup, %function hangup: .LFB11: .cfi_startproc .L21: b .L21 .cfi_endproc .LFE11: .size hangup, .-hangup .align 2 .type print_4digit, %function print_4digit: .LFB12: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str w0, [sp, 28] ldr w0, [sp, 28] mov w1, 19923 movk w1, 0x1062, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w1, w1, 6 asr w0, w0, 31 sub w0, w1, w0 and w0, w0, 255 add w0, w0, 48 and w0, w0, 255 bl uart_putchar ldr w0, [sp, 28] mov w1, 19923 movk w1, 0x1062, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w2, w1, 6 asr w1, w0, 31 sub w2, w2, w1 mov w1, 1000 mul w1, w2, w1 sub w0, w0, w1 str w0, [sp, 28] ldr w0, [sp, 28] mov w1, 34079 movk w1, 0x51eb, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w1, w1, 5 asr w0, w0, 31 sub w0, w1, w0 and w0, w0, 255 add w0, w0, 48 and w0, w0, 255 bl uart_putchar ldr w0, [sp, 28] mov w1, 34079 movk w1, 0x51eb, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w2, w1, 5 asr w1, w0, 31 sub w2, w2, w1 mov w1, 100 mul w1, w2, w1 sub w0, w0, w1 str w0, [sp, 28] ldr w0, [sp, 28] mov w1, 26215 movk w1, 0x6666, lsl 16 smull x1, w0, w1 lsr x1, x1, 32 asr w1, w1, 2 asr w0, w0, 31 sub w0, w1, w0 and w0, w0, 255 add w0, w0, 48 and w0, w0, 255 bl uart_putchar ldr w1, [sp, 28] mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w1, w0 lsr x0, x0, 32 asr w2, w0, 2 asr w0, w1, 31 sub w2, w2, w0 mov w0, w2 lsl w0, w0, 2 add w0, w0, w2 lsl w0, w0, 1 sub w0, w1, w0 str w0, [sp, 28] ldr w0, [sp, 28] and w0, w0, 255 add w0, w0, 48 and w0, w0, 255 bl uart_putchar mov w0, 10 bl uart_putchar mov w0, 13 bl uart_putchar nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size print_4digit, .-print_4digit .align 2 .global main .type main, %function main: .LFB13: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 104] mov x1, 0 adrp x0, .LC0 add x1, x0, :lo12:.LC0 add x0, sp, 72 ldr q0, [x1] str q0, [x0] ldr q0, [x1, 11] str q0, [x0, 11] adrp x0, :got:__bss_start ldr x0, [x0, #:got_lo12:__bss_start] str x0, [sp, 48] b .L24 .L25: ldr x0, [sp, 48] add x1, x0, 4 str x1, [sp, 48] str wzr, [x0] .L24: ldr x1, [sp, 48] adrp x0, :got:__bss_end ldr x0, [x0, #:got_lo12:__bss_end] cmp x1, x0 bcc .L25 mov x0, 45604 movk x0, 0x2000, lsl 16 mov w1, 1 str w1, [x0] mov x0, 4 movk x0, 0x2020, lsl 16 mov w1, 8192 movk w1, 0x1, lsl 16 str w1, [x0] mov x0, 20484 movk x0, 0x2021, lsl 16 mov w1, 1 str w1, [x0] mov x0, 20576 movk x0, 0x2021, lsl 16 str wzr, [x0] mov x0, 20548 movk x0, 0x2021, lsl 16 str wzr, [x0] mov x0, 20552 movk x0, 0x2021, lsl 16 mov w1, 198 str w1, [x0] mov x0, 20560 movk x0, 0x2021, lsl 16 str wzr, [x0] mov x0, 20556 movk x0, 0x2021, lsl 16 mov w1, 3 str w1, [x0] mov x0, 20584 movk x0, 0x2021, lsl 16 mov w1, 270 str w1, [x0] mov x0, 20576 movk x0, 0x2021, lsl 16 mov w1, 3 str w1, [x0] str wzr, [sp, 44] b .L26 .L27: ldrsw x0, [sp, 44] add x1, sp, 72 ldrb w0, [x1, x0] bl uart_putchar mov w0, 100 bl delay_ms ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L26: ldrsw x0, [sp, 44] add x1, sp, 72 ldrb w0, [x1, x0] cmp w0, 0 bne .L27 mov x0, 20552 movk x0, 0x2021, lsl 16 mov w1, 198 str w1, [x0] mov x0, 46088 movk x0, 0x2000, lsl 16 mov w1, 2 movk w1, 0x3e, lsl 16 str w1, [x0] mov x0, 46080 movk x0, 0x2000, lsl 16 mov w1, 41247 movk w1, 0x7, lsl 16 str w1, [x0] mov x0, 46104 movk x0, 0x2000, lsl 16 mov w1, 41247 movk w1, 0x7, lsl 16 str w1, [x0] mov x0, 46108 movk x0, 0x2000, lsl 16 mov w1, 249 str w1, [x0] mov x0, 46092 movk x0, 0x2000, lsl 16 str wzr, [x0] mov x0, 46088 movk x0, 0x2000, lsl 16 mov w1, 162 movk w1, 0x3e, lsl 16 str w1, [x0] adrp x0, exception_vector add x0, x0, :lo12:exception_vector bl set_vbar mov x0, 45592 movk x0, 0x2000, lsl 16 mov w1, 1 str w1, [x0] #APP // 271 "program.c" 1 mrs r0, cpsr bic r0, r0, #0x80 msr cpsr_c, r0 // 0 "" 2 #NO_APP adrp x0, counter add x0, x0, :lo12:counter str wzr, [x0] adrp x0, changed add x0, x0, :lo12:changed str wzr, [x0] .L29: adrp x0, changed add x0, x0, :lo12:changed ldr w0, [x0] cmp w0, 0 beq .L29 adrp x0, .LC1 add x1, x0, :lo12:.LC1 add x0, sp, 56 ldr x2, [x1] str x2, [x0] ldr x1, [x1, 7] str x1, [x0, 7] add x0, sp, 56 bl uart_print adrp x0, counter add x0, x0, :lo12:counter ldr w0, [x0] bl print_4digit adrp x0, changed add x0, x0, :lo12:changed str wzr, [x0] b .L29 .cfi_endproc .LFE13: .size main, .-main .section .rodata .align 3 .LC0: .string "Interrupt handler test.\n\r" .string "" .align 3 .LC1: .string "irq count -> " .string "" .text ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str wzr, [sp, 24] ldr w0, [sp, 24] cmp w0, 0 beq .L2 bl abort .L2: ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] ldr w0, [sp, 24] cmp w0, 1 beq .L3 bl abort .L3: ldr w0, [sp, 24] str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 1 beq .L4 bl abort .L4: mov w0, 4 str w0, [sp, 16] ldr w0, [sp, 16] cmp w0, 4 beq .L5 bl abort .L5: mov w0, 0 bl exit .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "EXT2FS Library version 1.42.7" .align 3 .LC1: .string "Wrong magic number for ext2_filsys structure" .align 3 .LC2: .string "Wrong magic number for badblocks_list structure" .align 3 .LC3: .string "Wrong magic number for badblocks_iterate structure" .align 3 .LC4: .string "Wrong magic number for inode_scan structure" .align 3 .LC5: .string "Wrong magic number for io_channel structure" .align 3 .LC6: .string "Wrong magic number for unix io_channel structure" .align 3 .LC7: .string "Wrong magic number for io_manager structure" .align 3 .LC8: .string "Wrong magic number for block_bitmap structure" .align 3 .LC9: .string "Wrong magic number for inode_bitmap structure" .align 3 .LC10: .string "Wrong magic number for generic_bitmap structure" .align 3 .LC11: .string "Wrong magic number for test io_channel structure" .align 3 .LC12: .string "Wrong magic number for directory block list structure" .align 3 .LC13: .string "Wrong magic number for icount structure" .align 3 .LC14: .string "Wrong magic number for Powerquest io_channel structure" .align 3 .LC15: .string "Wrong magic number for ext2 file structure" .align 3 .LC16: .string "Wrong magic number for Ext2 Image Header" .align 3 .LC17: .string "Wrong magic number for inode io_channel structure" .align 3 .LC18: .string "Wrong magic number for ext4 extent handle" .align 3 .LC19: .string "Bad magic number in super-block" .align 3 .LC20: .string "Filesystem revision too high" .align 3 .LC21: .string "Attempt to write to filesystem opened read-only" .align 3 .LC22: .string "Can't read group descriptors" .align 3 .LC23: .string "Can't write group descriptors" .align 3 .LC24: .string "Corrupt group descriptor: bad block for block bitmap" .align 3 .LC25: .string "Corrupt group descriptor: bad block for inode bitmap" .align 3 .LC26: .string "Corrupt group descriptor: bad block for inode table" .align 3 .LC27: .string "Can't write an inode bitmap" .align 3 .LC28: .string "Can't read an inode bitmap" .align 3 .LC29: .string "Can't write an block bitmap" .align 3 .LC30: .string "Can't read an block bitmap" .align 3 .LC31: .string "Can't write an inode table" .align 3 .LC32: .string "Can't read an inode table" .align 3 .LC33: .string "Can't read next inode" .align 3 .LC34: .string "Filesystem has unexpected block size" .align 3 .LC35: .string "EXT2 directory corrupted" .align 3 .LC36: .string "Attempt to read block from filesystem resulted in short read" .align 3 .LC37: .string "Attempt to write block to filesystem resulted in short write" .align 3 .LC38: .string "No free space in the directory" .align 3 .LC39: .string "Inode bitmap not loaded" .align 3 .LC40: .string "Block bitmap not loaded" .align 3 .LC41: .string "Illegal inode number" .align 3 .LC42: .string "Illegal block number" .align 3 .LC43: .string "Internal error in ext2fs_expand_dir" .align 3 .LC44: .string "Not enough space to build proposed filesystem" .align 3 .LC45: .string "Illegal block number passed to ext2fs_mark_block_bitmap" .align 3 .LC46: .string "Illegal block number passed to ext2fs_unmark_block_bitmap" .align 3 .LC47: .string "Illegal block number passed to ext2fs_test_block_bitmap" .align 3 .LC48: .string "Illegal inode number passed to ext2fs_mark_inode_bitmap" .align 3 .LC49: .string "Illegal inode number passed to ext2fs_unmark_inode_bitmap" .align 3 .LC50: .string "Illegal inode number passed to ext2fs_test_inode_bitmap" .align 3 .LC51: .string "Attempt to fudge end of block bitmap past the real end" .align 3 .LC52: .string "Attempt to fudge end of inode bitmap past the real end" .align 3 .LC53: .string "Illegal indirect block found" .align 3 .LC54: .string "Illegal doubly indirect block found" .align 3 .LC55: .string "Illegal triply indirect block found" .align 3 .LC56: .string "Block bitmaps are not the same" .align 3 .LC57: .string "Inode bitmaps are not the same" .align 3 .LC58: .string "Illegal or malformed device name" .align 3 .LC59: .string "A block group is missing an inode table" .align 3 .LC60: .string "The ext2 superblock is corrupt" .align 3 .LC61: .string "Illegal generic bit number passed to ext2fs_mark_generic_bitmap" .align 3 .LC62: .string "Illegal generic bit number passed to ext2fs_unmark_generic_bitmap" .align 3 .LC63: .string "Illegal generic bit number passed to ext2fs_test_generic_bitmap" .align 3 .LC64: .string "Too many symbolic links encountered." .align 3 .LC65: .string "The callback function will not handle this case" .align 3 .LC66: .string "The inode is from a bad block in the inode table" .align 3 .LC67: .string "Filesystem has unsupported feature(s)" .align 3 .LC68: .string "Filesystem has unsupported read-only feature(s)" .align 3 .LC69: .string "IO Channel failed to seek on read or write" .align 3 .LC70: .string "Memory allocation failed" .align 3 .LC71: .string "Invalid argument passed to ext2 library" .align 3 .LC72: .string "Could not allocate block in ext2 filesystem" .align 3 .LC73: .string "Could not allocate inode in ext2 filesystem" .align 3 .LC74: .string "Ext2 inode is not a directory" .align 3 .LC75: .string "Too many references in table" .align 3 .LC76: .string "File not found by ext2_lookup" .align 3 .LC77: .string "File open read-only" .align 3 .LC78: .string "Ext2 directory block not found" .align 3 .LC79: .string "Ext2 directory already exists" .align 3 .LC80: .string "Unimplemented ext2 library function" .align 3 .LC81: .string "User cancel requested" .align 3 .LC82: .string "Ext2 file too big" .align 3 .LC83: .string "Supplied journal device not a block device" .align 3 .LC84: .string "Journal superblock not found" .align 3 .LC85: .string "Journal must be at least 1024 blocks" .align 3 .LC86: .string "Unsupported journal version" .align 3 .LC87: .string "Error loading external journal" .align 3 .LC88: .string "Journal not found" .align 3 .LC89: .string "Directory hash unsupported" .align 3 .LC90: .string "Illegal extended attribute block number" .align 3 .LC91: .string "Cannot create filesystem with requested number of inodes" .align 3 .LC92: .string "E2image snapshot not in use" .align 3 .LC93: .string "Too many reserved group descriptor blocks" .align 3 .LC94: .string "Resize inode is corrupt" .align 3 .LC95: .string "Tried to set block bmap with missing indirect block" .align 3 .LC96: .string "TDB: Success" .align 3 .LC97: .string "TDB: Corrupt database" .align 3 .LC98: .string "TDB: IO Error" .align 3 .LC99: .string "TDB: Locking error" .align 3 .LC100: .string "TDB: Out of memory" .align 3 .LC101: .string "TDB: Record exists" .align 3 .LC102: .string "TDB: Lock exists on other keys" .align 3 .LC103: .string "TDB: Invalid parameter" .align 3 .LC104: .string "TDB: Record does not exist" .align 3 .LC105: .string "TDB: Write not permitted" .align 3 .LC106: .string "Ext2fs directory block list is empty" .align 3 .LC107: .string "Attempt to modify a block mapping via a read-only block iterator" .align 3 .LC108: .string "Wrong magic number for ext4 extent saved path" .align 3 .LC109: .string "Wrong magic number for 64-bit generic bitmap" .align 3 .LC110: .string "Wrong magic number for 64-bit block bitmap" .align 3 .LC111: .string "Wrong magic number for 64-bit inode bitmap" .align 3 .LC112: .string "Wrong magic number --- RESERVED_13" .align 3 .LC113: .string "Wrong magic number --- RESERVED_14" .align 3 .LC114: .string "Wrong magic number --- RESERVED_15" .align 3 .LC115: .string "Wrong magic number --- RESERVED_16" .align 3 .LC116: .string "Wrong magic number --- RESERVED_17" .align 3 .LC117: .string "Wrong magic number --- RESERVED_18" .align 3 .LC118: .string "Wrong magic number --- RESERVED_19" .align 3 .LC119: .string "Corrupt extent header" .align 3 .LC120: .string "Corrupt extent index" .align 3 .LC121: .string "Corrupt extent" .align 3 .LC122: .string "No free space in extent map" .align 3 .LC123: .string "Inode does not use extents" .align 3 .LC124: .string "No 'next' extent" .align 3 .LC125: .string "No 'previous' extent" .align 3 .LC126: .string "No 'up' extent" .align 3 .LC127: .string "No 'down' extent" .align 3 .LC128: .string "No current node" .align 3 .LC129: .string "Ext2fs operation not supported" .align 3 .LC130: .string "No room to insert extent in node" .align 3 .LC131: .string "Splitting would result in empty node" .align 3 .LC132: .string "Extent not found" .align 3 .LC133: .string "Operation not supported for inodes containing extents" .align 3 .LC134: .string "Extent length is invalid" .align 3 .LC135: .string "I/O Channel does not support 64-bit block numbers" .align 3 .LC136: .string "Can't check if filesystem is mounted due to missing mtab file" .align 3 .LC137: .string "Filesystem too large to use legacy bitmaps" .align 3 .LC138: .string "MMP: invalid magic number" .align 3 .LC139: .string "MMP: device currently active" .align 3 .LC140: .string "MMP: fsck being run" .align 3 .LC141: .string "MMP: block number beyond filesystem range" .align 3 .LC142: .string "MMP: undergoing an unknown operation" .align 3 .LC143: .string "MMP: filesystem still in use" .align 3 .LC144: .string "MMP: open with O_DIRECT failed" .align 3 .LC145: .string "Block group descriptor size incorrect" .align 3 .LC146: .string "Inode checksum does not match inode" .align 3 .LC147: .string "Inode bitmap checksum does not match bitmap" .align 3 .LC148: .string "Extent block checksum does not match extent block" .align 3 .LC149: .string "Directory block does not have space for checksum" .align 3 .LC150: .string "Directory block checksum does not match directory block" .align 3 .LC151: .string "Extended attribute block checksum does not match block" .align 3 .LC152: .string "Superblock checksum does not match superblock" .align 3 .LC153: .string "Unknown checksum algorithm" .align 3 .LC154: .string "MMP block checksum does not match MMP block" .align 3 .LC155: .string "Ext2 file already exists" .section .data.rel.ro.local,"aw" .align 3 .type text, %object .size text, 1256 text: .xword .LC0 .xword .LC1 .xword .LC2 .xword .LC3 .xword .LC4 .xword .LC5 .xword .LC6 .xword .LC7 .xword .LC8 .xword .LC9 .xword .LC10 .xword .LC11 .xword .LC12 .xword .LC13 .xword .LC14 .xword .LC15 .xword .LC16 .xword .LC17 .xword .LC18 .xword .LC19 .xword .LC20 .xword .LC21 .xword .LC22 .xword .LC23 .xword .LC24 .xword .LC25 .xword .LC26 .xword .LC27 .xword .LC28 .xword .LC29 .xword .LC30 .xword .LC31 .xword .LC32 .xword .LC33 .xword .LC34 .xword .LC35 .xword .LC36 .xword .LC37 .xword .LC38 .xword .LC39 .xword .LC40 .xword .LC41 .xword .LC42 .xword .LC43 .xword .LC44 .xword .LC45 .xword .LC46 .xword .LC47 .xword .LC48 .xword .LC49 .xword .LC50 .xword .LC51 .xword .LC52 .xword .LC53 .xword .LC54 .xword .LC55 .xword .LC56 .xword .LC57 .xword .LC58 .xword .LC59 .xword .LC60 .xword .LC61 .xword .LC62 .xword .LC63 .xword .LC64 .xword .LC65 .xword .LC66 .xword .LC67 .xword .LC68 .xword .LC69 .xword .LC70 .xword .LC71 .xword .LC72 .xword .LC73 .xword .LC74 .xword .LC75 .xword .LC76 .xword .LC77 .xword .LC78 .xword .LC79 .xword .LC80 .xword .LC81 .xword .LC82 .xword .LC83 .xword .LC84 .xword .LC85 .xword .LC86 .xword .LC87 .xword .LC88 .xword .LC89 .xword .LC90 .xword .LC91 .xword .LC92 .xword .LC93 .xword .LC94 .xword .LC95 .xword .LC96 .xword .LC97 .xword .LC98 .xword .LC99 .xword .LC100 .xword .LC101 .xword .LC102 .xword .LC103 .xword .LC104 .xword .LC105 .xword .LC106 .xword .LC107 .xword .LC108 .xword .LC109 .xword .LC110 .xword .LC111 .xword .LC112 .xword .LC113 .xword .LC114 .xword .LC115 .xword .LC116 .xword .LC117 .xword .LC118 .xword .LC119 .xword .LC120 .xword .LC121 .xword .LC122 .xword .LC123 .xword .LC124 .xword .LC125 .xword .LC126 .xword .LC127 .xword .LC128 .xword .LC129 .xword .LC130 .xword .LC131 .xword .LC132 .xword .LC133 .xword .LC134 .xword .LC135 .xword .LC136 .xword .LC137 .xword .LC138 .xword .LC139 .xword .LC140 .xword .LC141 .xword .LC142 .xword .LC143 .xword .LC144 .xword .LC145 .xword .LC146 .xword .LC147 .xword .LC148 .xword .LC149 .xword .LC150 .xword .LC151 .xword .LC152 .xword .LC153 .xword .LC154 .xword .LC155 .xword 0 .global et_ext2_error_table .align 3 .type et_ext2_error_table, %object .size et_ext2_error_table, 24 et_ext2_error_table: .xword text .xword 2133571328 .word 156 .zero 4 .local link .comm link,16,8 .text .align 2 .global initialize_ext2_error_table .type initialize_ext2_error_table, %function initialize_ext2_error_table: .LFB6: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, :got:_et_list ldr x0, [x0, #:got_lo12:_et_list] bl initialize_ext2_error_table_r nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size initialize_ext2_error_table, .-initialize_ext2_error_table .align 2 .global initialize_ext2_error_table_r .type initialize_ext2_error_table_r, %function initialize_ext2_error_table_r: .LFB7: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] str x0, [sp, 40] ldr x0, [sp, 24] ldr x0, [x0] str x0, [sp, 32] b .L3 .L6: ldr x0, [sp, 32] ldr x0, [x0, 8] ldr x1, [x0] adrp x0, text add x0, x0, :lo12:text cmp x1, x0 beq .L9 ldr x0, [sp, 32] str x0, [sp, 40] ldr x0, [sp, 32] ldr x0, [x0] str x0, [sp, 32] .L3: ldr x0, [sp, 32] cmp x0, 0 bne .L6 mov x0, 16 bl malloc str x0, [sp, 32] ldr x0, [sp, 32] cmp x0, 0 bne .L7 adrp x0, link add x0, x0, :lo12:link ldr x0, [x0, 8] cmp x0, 0 bne .L10 adrp x0, link add x0, x0, :lo12:link str x0, [sp, 32] .L7: ldr x0, [sp, 32] adrp x1, et_ext2_error_table add x1, x1, :lo12:et_ext2_error_table str x1, [x0, 8] ldr x0, [sp, 32] str xzr, [x0] ldr x0, [sp, 40] ldr x1, [sp, 32] str x1, [x0] b .L2 .L9: nop b .L2 .L10: nop .L2: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size initialize_ext2_error_table_r, .-initialize_ext2_error_table_r ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global findPosition .type findPosition, %function findPosition: .LFB6: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] mov w0, 1 str w0, [sp, 20] ldr x0, [sp, 8] ldr x0, [x0, 8] str x0, [sp, 24] b .L2 .L3: ldr x0, [sp, 24] ldr x0, [x0, 8] str x0, [sp, 24] ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L2: ldr w1, [sp, 20] ldr w0, [sp, 4] cmp w1, w0 bne .L3 ldr x0, [sp, 24] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size findPosition, .-findPosition .align 2 .global findPrev .type findPrev, %function findPrev: .LFB7: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str x1, [sp] ldr x0, [sp, 8] str x0, [sp, 24] b .L6 .L7: ldr x0, [sp, 24] ldr x0, [x0, 8] str x0, [sp, 24] .L6: ldr x0, [sp, 24] ldr x0, [x0, 8] ldr x1, [sp] cmp x1, x0 bne .L7 ldr x0, [sp, 24] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size findPrev, .-findPrev .align 2 .global findLater .type findLater, %function findLater: .LFB8: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str x1, [sp] ldr x0, [sp, 8] ldr x0, [x0, 8] ldr x0, [x0, 8] str x0, [sp, 24] b .L10 .L11: ldr x0, [sp, 24] ldr x0, [x0, 8] str x0, [sp, 24] .L10: ldr x0, [sp] ldr x0, [x0, 8] ldr x1, [sp, 24] cmp x1, x0 bne .L11 ldr x0, [sp, 24] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size findLater, .-findLater .section .rodata .align 3 .LC0: .string "%d" .align 3 .LC1: .string "Error!The memory is full." .text .align 2 .global cFIFOList .type cFIFOList, %function cFIFOList: .LFB9: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 mov x0, 16 bl malloc str x0, [sp, 40] ldr x0, [sp, 40] str xzr, [x0, 8] ldr x0, [sp, 40] str x0, [sp, 32] add x0, sp, 28 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf b .L14 .L17: mov x0, 16 bl malloc str x0, [sp, 48] ldr x0, [sp, 48] cmp x0, 0 beq .L15 ldr w1, [sp, 28] ldr x0, [sp, 48] str w1, [x0] ldr x0, [sp, 32] ldr x1, [sp, 48] str x1, [x0, 8] ldr x0, [sp, 48] str x0, [sp, 32] ldr x0, [sp, 48] str xzr, [x0, 8] b .L16 .L15: adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf .L16: add x0, sp, 28 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf .L14: ldr w0, [sp, 28] cmn w0, #1 bne .L17 ldr x0, [sp, 40] mov x1, x0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L19 bl __stack_chk_fail .L19: mov x0, x1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size cFIFOList, .-cFIFOList .section .rodata .align 3 .LC2: .string "There is no item in the list." .align 3 .LC3: .string "%d\n" .align 3 .LC4: .string "%d " .text .align 2 .global printList .type printList, %function printList: .LFB10: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] ldr x0, [x0, 8] str x0, [sp, 40] ldr x0, [sp, 24] ldr x0, [x0, 8] cmp x0, 0 bne .L23 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts b .L27 .L26: ldr x0, [sp, 40] ldr x0, [x0, 8] cmp x0, 0 bne .L24 adrp x0, .LC3 add x0, x0, :lo12:.LC3 b .L25 .L24: adrp x0, .LC4 add x0, x0, :lo12:.LC4 .L25: ldr x1, [sp, 40] ldr w1, [x1] bl printf ldr x0, [sp, 40] ldr x0, [x0, 8] str x0, [sp, 40] .L23: ldr x0, [sp, 40] cmp x0, 0 bne .L26 .L27: nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size printList, .-printList .section .rodata .align 3 .LC5: .string "%d%d%d%d" .text .align 2 .global main .type main, %function main: .LFB11: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 104] mov x1, 0 bl cFIFOList str x0, [sp, 32] ldr x0, [sp, 32] bl printList add x3, sp, 28 add x2, sp, 24 add x1, sp, 20 add x0, sp, 16 mov x4, x3 mov x3, x2 mov x2, x1 mov x1, x0 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl __isoc99_scanf ldr w0, [sp, 16] mov w1, w0 ldr x0, [sp, 32] bl findPosition str x0, [sp, 40] ldr w0, [sp, 20] mov w1, w0 ldr x0, [sp, 32] bl findPosition str x0, [sp, 48] ldr w0, [sp, 24] mov w1, w0 ldr x0, [sp, 32] bl findPosition str x0, [sp, 56] ldr w0, [sp, 28] mov w1, w0 ldr x0, [sp, 32] bl findPosition str x0, [sp, 64] ldr x1, [sp, 56] ldr x0, [sp, 32] bl findPrev str x0, [sp, 72] ldr x1, [sp, 64] ldr x0, [sp, 32] bl findLater str x0, [sp, 80] ldr x1, [sp, 40] ldr x0, [sp, 32] bl findPrev str x0, [sp, 88] ldr x1, [sp, 48] ldr x0, [sp, 32] bl findLater str x0, [sp, 96] ldr x0, [sp, 48] ldr x1, [sp, 56] str x1, [x0, 8] ldr x0, [sp, 64] ldr x1, [sp, 96] str x1, [x0, 8] ldr x0, [sp, 72] ldr x1, [sp, 40] str x1, [x0, 8] ldr x0, [sp, 48] ldr x1, [sp, 80] str x1, [x0, 8] ldr x0, [sp, 88] ldr x1, [sp, 56] str x1, [x0, 8] ldr x0, [sp, 32] bl printList mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 104] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L30 bl __stack_chk_fail .L30: mov w0, w1 ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global quantum_real .type quantum_real, %function quantum_real: .LFB0: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 fmov s2, s0 fmov s0, s1 fmov s1, s2 str s1, [sp, 8] str s0, [sp, 12] add x0, sp, 8 str x0, [sp, 24] ldr x0, [sp, 24] ldr s0, [x0] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size quantum_real, .-quantum_real .align 2 .global quantum_imag .type quantum_imag, %function quantum_imag: .LFB1: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 fmov s2, s0 fmov s0, s1 fmov s1, s2 str s1, [sp, 8] str s0, [sp, 12] add x0, sp, 8 str x0, [sp, 24] ldr x0, [sp, 24] ldr s0, [x0, 4] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size quantum_imag, .-quantum_imag .align 2 .global quantum_foo .type quantum_foo, %function quantum_foo: .LFB2: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 fmov s2, s0 fmov s0, s1 fmov s1, s2 str s1, [sp, 8] str s0, [sp, 12] add x0, sp, 8 str x0, [sp, 24] ldr x0, [sp, 24] ldr s0, [x0, 8] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size quantum_foo, .-quantum_foo ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .type __bswap_16, %function __bswap_16: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strh w0, [sp, 14] ldrh w0, [sp, 14] rev16 w0, w0 and w0, w0, 65535 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size __bswap_16, .-__bswap_16 .global procid .bss .align 3 .type procid, %object .size procid, 8 procid: .zero 8 .text .align 2 .type sleep_ms, %function sleep_ms: .LFB6: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] mov w1, w0 mov w0, 1000 mul w0, w1, w0 bl usleep nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size sleep_ms, .-sleep_ms .align 2 .type current_time_ms, %function current_time_ms: .LFB7: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 add x0, sp, 24 mov x1, x0 mov w0, 1 bl clock_gettime cmp w0, 0 beq .L5 mov w0, 1 bl exit .L5: ldr x0, [sp, 24] mov x1, x0 mov x0, x1 lsl x0, x0, 5 sub x0, x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 32] mov x2, x0 mov x0, 13531 movk x0, 0xd7b6, lsl 16 movk x0, 0xde82, lsl 32 movk x0, 0x431b, lsl 48 umulh x0, x2, x0 lsr x0, x0, 18 add x0, x1, x0 mov x1, x0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 40] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L7 bl __stack_chk_fail .L7: mov x0, x1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size current_time_ms, .-current_time_ms .align 2 .type thread_start, %function thread_start: .LFB8: .cfi_startproc stp x29, x30, [sp, -128]! .cfi_def_cfa_offset 128 .cfi_offset 29, -128 .cfi_offset 30, -120 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 120] mov x1, 0 add x0, sp, 56 bl pthread_attr_init add x0, sp, 56 mov x1, 131072 bl pthread_attr_setstacksize str wzr, [sp, 44] b .L9 .L15: add x1, sp, 56 add x0, sp, 48 ldr x3, [sp, 16] ldr x2, [sp, 24] bl pthread_create cmp w0, 0 bne .L10 add x0, sp, 56 bl pthread_attr_destroy nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 120] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L16 b .L17 .L10: bl __errno_location ldr w0, [x0] cmp w0, 11 bne .L18 mov w0, 50 bl usleep nop ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L9: ldr w0, [sp, 44] cmp w0, 99 ble .L15 b .L14 .L18: nop .L14: mov w0, 1 bl exit .L17: bl __stack_chk_fail .L16: ldp x29, x30, [sp], 128 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size thread_start, .-thread_start .align 2 .type event_init, %function event_init: .LFB9: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] str wzr, [x0] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size event_init, .-event_init .align 2 .type event_reset, %function event_reset: .LFB10: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] str wzr, [x0] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size event_reset, .-event_reset .align 2 .type event_set, %function event_set: .LFB11: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] ldr w0, [x0] cmp w0, 0 beq .L22 mov w0, 1 bl exit .L22: ldr x0, [sp, 24] mov w1, 1 stlr w1, [x0] ldr x0, [sp, 24] mov w2, 129 mov x1, x0 mov x0, 98 bl syscall nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size event_set, .-event_set .align 2 .type event_wait, %function event_wait: .LFB12: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] b .L24 .L25: ldr x0, [sp, 24] mov w4, 0 mov w3, 0 mov w2, 128 mov x1, x0 mov x0, 98 bl syscall .L24: ldr x0, [sp, 24] ldar w0, [x0] cmp w0, 0 beq .L25 nop nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size event_wait, .-event_wait .align 2 .type event_isset, %function event_isset: .LFB13: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] ldar w0, [x0] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size event_isset, .-event_isset .align 2 .type event_timedwait, %function event_timedwait: .LFB14: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 bl current_time_ms str x0, [sp, 40] ldr x0, [sp, 40] str x0, [sp, 32] .L32: ldr x1, [sp, 40] ldr x0, [sp, 32] sub x0, x1, x0 ldr x1, [sp, 16] add x0, x1, x0 str x0, [sp, 48] ldr x0, [sp, 48] lsr x1, x0, 3 mov x0, 63439 movk x0, 0xe353, lsl 16 movk x0, 0x9ba5, lsl 32 movk x0, 0x20c4, lsl 48 umulh x0, x1, x0 lsr x0, x0, 4 str x0, [sp, 56] ldr x2, [sp, 48] lsr x1, x2, 3 mov x0, 63439 movk x0, 0xe353, lsl 16 movk x0, 0x9ba5, lsl 32 movk x0, 0x20c4, lsl 48 umulh x0, x1, x0 lsr x1, x0, 4 mov x0, x1 lsl x0, x0, 5 sub x0, x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 sub x1, x2, x0 mov x0, 16960 movk x0, 0xf, lsl 16 mul x0, x1, x0 str x0, [sp, 64] ldr x0, [sp, 24] add x1, sp, 56 mov x4, x1 mov w3, 0 mov w2, 128 mov x1, x0 mov x0, 98 bl syscall ldr x0, [sp, 24] ldr w0, [x0] cmp w0, 0 beq .L29 mov w0, 1 b .L33 .L29: bl current_time_ms str x0, [sp, 32] ldr x1, [sp, 32] ldr x0, [sp, 40] sub x0, x1, x0 ldr x1, [sp, 16] cmp x1, x0 bcs .L32 mov w0, 0 .L33: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 72] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L34 bl __stack_chk_fail .L34: mov w0, w1 ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE14: .size event_timedwait, .-event_timedwait .align 2 .type write_file, %function write_file: .LFB15: .cfi_startproc sub sp, sp, #1328 .cfi_def_cfa_offset 1328 stp x29, x30, [sp] .cfi_offset 29, -1328 .cfi_offset 30, -1320 mov x29, sp str x0, [sp, 56] str x1, [sp, 48] str x2, [sp, 1280] str x3, [sp, 1288] str x4, [sp, 1296] str x5, [sp, 1304] str x6, [sp, 1312] str x7, [sp, 1320] add x0, sp, 1024 str q0, [x0, 128] add x0, sp, 1024 str q1, [x0, 144] add x0, sp, 1024 str q2, [x0, 160] add x0, sp, 1024 str q3, [x0, 176] add x0, sp, 1024 str q4, [x0, 192] add x0, sp, 1024 str q5, [x0, 208] add x0, sp, 1024 str q6, [x0, 224] add x0, sp, 1024 str q7, [x0, 240] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1144] mov x1, 0 add x0, sp, 1328 str x0, [sp, 88] add x0, sp, 1328 str x0, [sp, 96] add x0, sp, 1280 str x0, [sp, 104] mov w0, -48 str w0, [sp, 112] mov w0, -128 str w0, [sp, 116] add x0, sp, 16 add x1, sp, 88 ldp q0, q1, [x1] stp q0, q1, [x0] add x1, sp, 16 add x0, sp, 120 mov x3, x1 ldr x2, [sp, 48] mov x1, 1024 bl vsnprintf strb wzr, [sp, 1143] add x0, sp, 120 bl strlen str w0, [sp, 76] mov w1, 1 movk w1, 0x8, lsl 16 ldr x0, [sp, 56] bl open str w0, [sp, 80] ldr w0, [sp, 80] cmn w0, #1 bne .L36 mov w0, 0 b .L39 .L36: ldrsw x1, [sp, 76] add x0, sp, 120 mov x2, x1 mov x1, x0 ldr w0, [sp, 80] bl write mov x1, x0 ldrsw x0, [sp, 76] cmp x1, x0 beq .L38 bl __errno_location ldr w0, [x0] str w0, [sp, 84] ldr w0, [sp, 80] bl close bl __errno_location mov x1, x0 ldr w0, [sp, 84] str w0, [x1] mov w0, 0 b .L39 .L38: ldr w0, [sp, 80] bl close mov w0, 1 .L39: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 1144] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L40 bl __stack_chk_fail .L40: mov w0, w1 ldp x29, x30, [sp] add sp, sp, 1328 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE15: .size write_file, .-write_file .section .rodata .align 3 .LC0: .string "/sys/fs/fuse/connections" .align 3 .LC1: .string "." .align 3 .LC2: .string ".." .align 3 .LC3: .string "/sys/fs/fuse/connections/%s/abort" .text .align 2 .type kill_and_wait, %function kill_and_wait: .LFB16: .cfi_startproc stp x29, x30, [sp, -368]! .cfi_def_cfa_offset 368 .cfi_offset 29, -368 .cfi_offset 30, -360 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 360] mov x1, 0 ldr w0, [sp, 28] neg w0, w0 mov w1, 9 bl kill mov w1, 9 ldr w0, [sp, 28] bl kill str wzr, [sp, 32] b .L42 .L45: mov w2, 1 movk w2, 0x4000, lsl 16 ldr x1, [sp, 16] mov w0, -1 bl waitpid mov w1, w0 ldr w0, [sp, 28] cmp w0, w1 beq .L56 mov w0, 1000 bl usleep ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L42: ldr w0, [sp, 32] cmp w0, 99 ble .L45 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl opendir str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 beq .L59 .L53: ldr x0, [sp, 40] bl readdir str x0, [sp, 48] ldr x0, [sp, 48] cmp x0, 0 bne .L47 ldr x0, [sp, 40] bl closedir b .L59 .L47: ldr x0, [sp, 48] add x2, x0, 19 adrp x0, .LC1 add x1, x0, :lo12:.LC1 mov x0, x2 bl strcmp cmp w0, 0 beq .L57 ldr x0, [sp, 48] add x2, x0, 19 adrp x0, .LC2 add x1, x0, :lo12:.LC2 mov x0, x2 bl strcmp cmp w0, 0 beq .L57 ldr x0, [sp, 48] add x0, x0, 19 add x4, sp, 56 mov x3, x0 adrp x0, .LC3 add x2, x0, :lo12:.LC3 mov x1, 300 mov x0, x4 bl snprintf add x0, sp, 56 mov w1, 1 bl open str w0, [sp, 36] ldr w0, [sp, 36] cmn w0, #1 beq .L58 add x0, sp, 56 mov x2, 1 mov x1, x0 ldr w0, [sp, 36] bl write ldr w0, [sp, 36] bl close b .L53 .L57: nop b .L53 .L58: nop b .L53 .L59: nop .L54: mov w2, 1073741824 ldr x1, [sp, 16] mov w0, -1 bl waitpid mov w1, w0 ldr w0, [sp, 28] cmp w0, w1 bne .L54 b .L41 .L56: nop .L41: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 360] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L55 bl __stack_chk_fail .L55: ldp x29, x30, [sp], 368 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE16: .size kill_and_wait, .-kill_and_wait .section .rodata .align 3 .LC4: .string "1000" .align 3 .LC5: .string "/proc/self/oom_score_adj" .text .align 2 .type setup_test, %function setup_test: .LFB17: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp mov w4, 0 mov w3, 0 mov w2, 0 mov w1, 9 mov w0, 1 bl prctl bl setpgrp adrp x0, .LC4 add x1, x0, :lo12:.LC4 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl write_file nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE17: .size setup_test, .-setup_test .align 2 .type reset_test, %function reset_test: .LFB18: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov w0, 3 str w0, [sp, 28] b .L62 .L63: ldr w0, [sp, 28] bl close ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L62: ldr w0, [sp, 28] cmp w0, 29 ble .L63 nop nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE18: .size reset_test, .-reset_test .local threads .comm threads,256,8 .local running .comm running,4,4 .global __aarch64_ldadd4_relax .align 2 .type thr, %function thr: .LFB19: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] str x0, [sp, 40] .L65: ldr x0, [sp, 40] add x0, x0, 8 bl event_wait ldr x0, [sp, 40] add x0, x0, 8 bl event_reset ldr x0, [sp, 40] ldr w0, [x0, 4] bl execute_call adrp x0, running add x1, x0, :lo12:running mov w0, 1 neg w0, w0 bl __aarch64_ldadd4_relax ldr x0, [sp, 40] add x0, x0, 12 bl event_set b .L65 .cfi_endproc .LFE19: .size thr, .-thr .align 2 .type execute_one, %function execute_one: .LFB20: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str wzr, [sp, 36] .L67: str wzr, [sp, 28] b .L68 .L76: str wzr, [sp, 32] b .L69 .L75: ldrsw x0, [sp, 32] lsl x1, x0, 4 adrp x0, threads add x0, x0, :lo12:threads add x0, x1, x0 str x0, [sp, 40] ldr x0, [sp, 40] ldr w0, [x0] cmp w0, 0 bne .L70 ldr x0, [sp, 40] mov w1, 1 str w1, [x0] ldr x0, [sp, 40] add x0, x0, 8 bl event_init ldr x0, [sp, 40] add x0, x0, 12 bl event_init ldr x0, [sp, 40] add x0, x0, 12 bl event_set ldr x1, [sp, 40] adrp x0, thr add x0, x0, :lo12:thr bl thread_start .L70: ldr x0, [sp, 40] add x0, x0, 12 bl event_isset cmp w0, 0 beq .L82 ldr x0, [sp, 40] add x0, x0, 12 bl event_reset ldr x0, [sp, 40] ldr w1, [sp, 28] str w1, [x0, 4] adrp x0, running add x0, x0, :lo12:running mov x1, x0 mov w0, 1 bl __aarch64_ldadd4_relax ldr x0, [sp, 40] add x0, x0, 8 bl event_set ldr w0, [sp, 36] cmp w0, 0 beq .L73 ldr w0, [sp, 28] and w0, w0, 1 cmp w0, 0 beq .L83 .L73: ldr x0, [sp, 40] add x0, x0, 12 mov x1, 45 bl event_timedwait b .L74 .L82: nop ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L69: ldr w0, [sp, 32] cmp w0, 15 ble .L75 b .L74 .L83: nop .L74: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L68: ldr w0, [sp, 28] cmp w0, 6 ble .L76 str wzr, [sp, 24] b .L77 .L79: mov x0, 1 bl sleep_ms ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L77: ldr w0, [sp, 24] cmp w0, 99 bgt .L78 adrp x0, running add x0, x0, :lo12:running ldr w0, [x0] cmp w0, 0 bne .L79 .L78: ldr w0, [sp, 36] cmp w0, 0 bne .L84 mov w0, 1 str w0, [sp, 36] b .L67 .L84: nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE20: .size execute_one, .-execute_one .align 2 .type loop, %function loop: .LFB21: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 str wzr, [sp, 24] .L93: bl fork str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 0 bge .L86 mov w0, 1 bl exit .L86: ldr w0, [sp, 28] cmp w0, 0 bne .L87 bl setup_test bl execute_one bl reset_test mov w0, 0 bl exit .L87: str wzr, [sp, 20] bl current_time_ms str x0, [sp, 32] .L92: add x0, sp, 20 mov w2, 1 movk w2, 0x4000, lsl 16 mov x1, x0 mov w0, -1 bl waitpid mov w1, w0 ldr w0, [sp, 28] cmp w0, w1 beq .L96 mov x0, 1 bl sleep_ms bl current_time_ms mov x1, x0 ldr x0, [sp, 32] sub x1, x1, x0 mov x0, 4999 cmp x1, x0 bls .L97 add x0, sp, 20 mov x1, x0 ldr w0, [sp, 28] bl kill_and_wait b .L89 .L97: nop b .L92 .L96: nop .L89: ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] b .L93 .cfi_endproc .LFE21: .size loop, .-loop .global r .data .align 3 .type r, %object .size r, 16 r: .xword -1 .xword -1 .section .rodata .align 3 .LC6: .string "system_u:objec~\356Eva\335\301[les_dep_t:s0sbin/cups-browsB\365\321ed 00000000000000000000" .string "" .string "" .string "" .string "" .text .align 2 .type execute_call, %function execute_call: .LFB22: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -48 str w0, [sp, 44] ldr w0, [sp, 44] cmp w0, 6 beq .L99 ldr w0, [sp, 44] cmp w0, 6 bgt .L109 ldr w0, [sp, 44] cmp w0, 5 beq .L101 ldr w0, [sp, 44] cmp w0, 5 bgt .L109 ldr w0, [sp, 44] cmp w0, 4 beq .L102 ldr w0, [sp, 44] cmp w0, 4 bgt .L109 ldr w0, [sp, 44] cmp w0, 3 beq .L103 ldr w0, [sp, 44] cmp w0, 3 bgt .L109 ldr w0, [sp, 44] cmp w0, 2 beq .L104 ldr w0, [sp, 44] cmp w0, 2 bgt .L109 ldr w0, [sp, 44] cmp w0, 0 beq .L105 ldr w0, [sp, 44] cmp w0, 1 beq .L106 b .L109 .L105: mov w3, 0 mov w2, 1 mov w1, 2 mov x0, 198 bl syscall str x0, [sp, 56] ldr x0, [sp, 56] cmn x0, #1 beq .L110 ldr x1, [sp, 56] adrp x0, r add x0, x0, :lo12:r str x1, [x0] b .L110 .L106: mov x0, 256 movk x0, 0x2000, lsl 16 mov w1, 1 str w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x0, [x0] mov w5, 4 mov w4, 256 movk w4, 0x2000, lsl 16 mov x3, 19 movk x3, 0x100, lsl 32 mov w2, 6 mov x1, x0 mov x0, 208 bl syscall b .L100 .L104: mov x0, 768 movk x0, 0x2000, lsl 16 mov w1, 1 str w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x0, [x0] mov w5, 4 mov w4, 768 movk w4, 0x2000, lsl 16 mov x3, 20 movk x3, 0x400, lsl 32 mov w2, 6 mov x1, x0 mov x0, 208 bl syscall b .L100 .L103: mov x0, 64 movk x0, 0x2000, lsl 16 mov w1, 2 strh w1, [x0] mov x19, 66 movk x19, 0x2000, lsl 16 mov w0, 0 bl __bswap_16 and w0, w0, 65535 strh w0, [x19] mov x0, 68 movk x0, 0x2000, lsl 16 mov w1, -84 strb w1, [x0] mov x0, 69 movk x0, 0x2000, lsl 16 mov w1, 20 strb w1, [x0] mov x0, 70 movk x0, 0x2000, lsl 16 mov w1, 20 strb w1, [x0] mov x0, 71 movk x0, 0x2000, lsl 16 mov w1, -86 strb w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr x0, [x0] mov w3, 16 mov w2, 64 movk w2, 0x2000, lsl 16 mov x1, x0 mov x0, 203 bl syscall b .L100 .L102: adrp x0, r add x0, x0, :lo12:r ldr x0, [x0] mov w6, 0 mov w5, 0 mov w4, 0 mov w3, 0 mov w2, 0 mov x1, x0 mov x0, 206 bl syscall b .L100 .L101: adrp x0, r add x0, x0, :lo12:r ldr x0, [x0] mov x1, x0 mov x0, 23 bl syscall str x0, [sp, 56] ldr x0, [sp, 56] cmn x0, #1 beq .L111 ldr x1, [sp, 56] adrp x0, r add x0, x0, :lo12:r str x1, [x0, 8] b .L111 .L99: mov x2, 79 adrp x0, .LC6 add x1, x0, :lo12:.LC6 mov x0, 320 movk x0, 0x2000, lsl 16 bl memcpy adrp x0, r add x0, x0, :lo12:r ldr x0, [x0, 8] mov w3, 79 mov w2, 320 movk w2, 0x2000, lsl 16 mov x1, x0 mov x0, 64 bl syscall b .L100 .L110: nop b .L109 .L111: nop .L100: .L109: nop ldr x19, [sp, 16] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE22: .size execute_call, .-execute_call .align 2 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp mov w6, 0 mov w5, -1 mov w4, 50 mov w3, 3 mov w2, 16777216 mov w1, 536870912 mov x0, 222 bl syscall adrp x0, procid add x0, x0, :lo12:procid str xzr, [x0] b .L113 .L115: bl fork cmp w0, 0 bne .L114 bl loop .L114: adrp x0, procid add x0, x0, :lo12:procid ldr x0, [x0] add x1, x0, 1 adrp x0, procid add x0, x0, :lo12:procid str x1, [x0] .L113: adrp x0, procid add x0, x0, :lo12:procid ldr x0, [x0] cmp x0, 5 bls .L115 mov w0, 16960 movk w0, 0xf, lsl 16 bl sleep mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global i .bss .align 2 .type i, %object .size i, 4 i: .zero 4 .global j .align 2 .type j, %object .size j, 4 j: .zero 4 .global t .align 2 .type t, %object .size t, 4 t: .zero 4 .global i1 .align 2 .type i1, %object .size i1, 4 i1: .zero 4 .global i2 .align 2 .type i2, %object .size i2, 4 i2: .zero 4 .global i1t .align 2 .type i1t, %object .size i1t, 4 i1t: .zero 4 .global i2t .align 2 .type i2t, %object .size i2t, 4 i2t: .zero 4 .global it .align 2 .type it, %object .size it, 4 it: .zero 4 .global jt .align 2 .type jt, %object .size jt, 4 jt: .zero 4 .global kt .align 2 .type kt, %object .size kt, 4 kt: .zero 4 .global ii .align 2 .type ii, %object .size ii, 4 ii: .zero 4 .global jj .align 2 .type jj, %object .size jj, 4 jj: .zero 4 .global kk .align 2 .type kk, %object .size kk, 4 kk: .zero 4 .global iii .align 2 .type iii, %object .size iii, 4 iii: .zero 4 .global jjj .align 2 .type jjj, %object .size jjj, 4 jjj: .zero 4 .global kkk .align 2 .type kkk, %object .size kkk, 4 kkk: .zero 4 ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global ft_putstr .type ft_putstr, %function ft_putstr: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str wzr, [sp, 44] b .L2 .L3: ldrsw x0, [sp, 44] ldr x1, [sp, 24] add x0, x1, x0 ldrb w0, [x0] bl ft_putchar ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L2: ldrsw x0, [sp, 44] ldr x1, [sp, 24] add x0, x1, x0 ldrb w0, [x0] cmp w0, 0 bne .L3 nop nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size ft_putstr, .-ft_putstr ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "%d%d" .align 3 .LC1: .string "%d\n" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 40] mov x1, 0 str wzr, [sp, 36] add x1, sp, 28 add x0, sp, 24 mov x2, x1 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr w1, [sp, 24] ldr w0, [sp, 28] cmp w1, w0 ble .L2 ldr w0, [sp, 24] str w0, [sp, 32] b .L3 .L5: ldr w0, [sp, 32] and w0, w0, 1 cmp w0, 0 beq .L4 ldr w0, [sp, 24] ldr w1, [sp, 32] cmp w1, w0 beq .L4 ldr w1, [sp, 36] ldr w0, [sp, 32] add w0, w1, w0 str w0, [sp, 36] .L4: ldr w0, [sp, 32] sub w0, w0, #1 str w0, [sp, 32] .L3: ldr w0, [sp, 28] ldr w1, [sp, 32] cmp w1, w0 bgt .L5 ldr w1, [sp, 36] adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf b .L6 .L2: ldr w1, [sp, 24] ldr w0, [sp, 28] cmp w1, w0 bge .L6 ldr w0, [sp, 24] str w0, [sp, 32] b .L7 .L9: ldr w0, [sp, 32] and w0, w0, 1 cmp w0, 0 beq .L8 ldr w0, [sp, 24] ldr w1, [sp, 32] cmp w1, w0 beq .L8 ldr w1, [sp, 36] ldr w0, [sp, 32] add w0, w1, w0 str w0, [sp, 36] .L8: ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L7: ldr w0, [sp, 28] ldr w1, [sp, 32] cmp w1, w0 blt .L9 ldr w1, [sp, 36] adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf .L6: mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 40] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L11 bl __stack_chk_fail .L11: mov w0, w1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global global_id .bss .align 2 .type global_id, %object .size global_id, 4 global_id: .zero 4 .global address_book .align 3 .type address_book, %object .size address_book, 2048 address_book: .zero 2048 .section .rodata .align 3 .LC0: .string "calloc() failed. Quitting." .text .align 2 .global create_contact .type create_contact, %function create_contact: .LFB6: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] mov x1, 92 mov x0, 1 bl calloc str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L2 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl perror mov w0, 1 bl exit .L2: adrp x0, global_id add x0, x0, :lo12:global_id ldr w1, [x0] ldr x0, [sp, 40] str w1, [x0] ldr x0, [sp, 40] add x0, x0, 4 ldr x1, [sp, 24] bl strcpy ldr x0, [sp, 40] add x0, x0, 69 ldr x1, [sp, 16] bl strcpy adrp x0, global_id add x0, x0, :lo12:global_id ldr w0, [x0] add w1, w0, 1 adrp x0, global_id add x0, x0, :lo12:global_id str w1, [x0] ldr x0, [sp, 40] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size create_contact, .-create_contact .section .rodata .align 3 .LC1: .string "person: id=%d, name='%s', phone='%s'\n" .text .align 2 .global print_contact .type print_contact, %function print_contact: .LFB7: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] ldr w1, [x0] ldr x0, [sp, 24] add x2, x0, 4 ldr x0, [sp, 24] add x0, x0, 69 mov x3, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size print_contact, .-print_contact .align 2 .global compare_contacts .type compare_contacts, %function compare_contacts: .LFB8: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] ldr x0, [sp, 24] cmp x0, 0 beq .L6 ldr x0, [sp, 16] cmp x0, 0 bne .L7 .L6: mov w0, -1 b .L8 .L7: ldr x0, [sp, 24] add x2, x0, 4 ldr x0, [sp, 16] add x0, x0, 4 mov x1, x0 mov x0, x2 bl strcmp str w0, [sp, 44] ldr w0, [sp, 44] cmp w0, 0 bne .L9 ldr x0, [sp, 24] add x2, x0, 69 ldr x0, [sp, 16] add x0, x0, 69 mov x1, x0 mov x0, x2 bl strcmp str w0, [sp, 44] .L9: ldr w0, [sp, 44] .L8: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size compare_contacts, .-compare_contacts .align 2 .global add_to_address_book .type add_to_address_book, %function add_to_address_book: .LFB9: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] ldr x0, [sp, 8] cmp x0, 0 bne .L11 mov w0, -1 b .L12 .L11: str wzr, [sp, 28] b .L13 .L14: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 256 bne .L13 mov w0, -1 b .L12 .L13: adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 28] ldr x0, [x0, x1, lsl 3] cmp x0, 0 bne .L14 adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 28] ldr x2, [sp, 8] str x2, [x0, x1, lsl 3] ldr w0, [sp, 28] .L12: add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size add_to_address_book, .-add_to_address_book .align 2 .global remove_from_address_book .type remove_from_address_book, %function remove_from_address_book: .LFB10: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str wzr, [sp, 44] b .L16 .L19: adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 44] ldr x0, [x0, x1, lsl 3] ldr x1, [sp, 24] bl compare_contacts cmp w0, 0 bne .L17 adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 44] str xzr, [x0, x1, lsl 3] ldr w0, [sp, 44] b .L18 .L17: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L16: ldr w0, [sp, 44] cmp w0, 255 ble .L19 mov w0, -1 .L18: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size remove_from_address_book, .-remove_from_address_book .align 2 .global search_in_address_book .type search_in_address_book, %function search_in_address_book: .LFB11: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str wzr, [sp, 44] b .L21 .L24: adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 44] ldr x0, [x0, x1, lsl 3] ldr x1, [sp, 24] bl compare_contacts cmp w0, 0 bne .L22 ldr w0, [sp, 44] b .L23 .L22: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L21: ldr w0, [sp, 44] cmp w0, 255 ble .L24 mov w0, -1 .L23: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size search_in_address_book, .-search_in_address_book .align 2 .global sort_by_name .type sort_by_name, %function sort_by_name: .LFB12: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov w0, 1 str w0, [sp, 16] b .L26 .L30: adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 16] ldr x0, [x0, x1, lsl 3] str x0, [sp, 24] ldr w0, [sp, 16] sub w0, w0, #1 str w0, [sp, 20] b .L27 .L29: ldr w0, [sp, 20] add w3, w0, 1 adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 20] ldr x2, [x0, x1, lsl 3] adrp x0, address_book add x0, x0, :lo12:address_book sxtw x1, w3 str x2, [x0, x1, lsl 3] ldr w0, [sp, 20] sub w0, w0, #1 str w0, [sp, 20] .L27: ldr w0, [sp, 20] cmp w0, 0 blt .L28 adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 20] ldr x0, [x0, x1, lsl 3] ldr x1, [sp, 24] bl compare_contacts cmp w0, 0 bgt .L29 .L28: ldr w0, [sp, 20] add w1, w0, 1 adrp x0, address_book add x0, x0, :lo12:address_book sxtw x1, w1 ldr x2, [sp, 24] str x2, [x0, x1, lsl 3] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L26: ldr w0, [sp, 16] cmp w0, 255 ble .L30 nop nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size sort_by_name, .-sort_by_name .section .rodata .align 3 .LC2: .string "+391237" .align 3 .LC3: .string "dino" .align 3 .LC4: .string "+391239" .align 3 .LC5: .string "filippo" .align 3 .LC6: .string "+391235" .align 3 .LC7: .string "barbara" .align 3 .LC8: .string "+391234" .align 3 .LC9: .string "antonio" .align 3 .LC10: .string "+391238" .align 3 .LC11: .string "enrico" .align 3 .LC12: .string "+391236" .align 3 .LC13: .string "chiara" .align 3 .LC14: .string "+399999" .align 3 .LC15: .string "pino" .align 3 .LC16: .string "Address book:" .align 3 .LC17: .string "Sorted address book:" .text .align 2 .global main .type main, %function main: .LFB13: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, .LC2 add x1, x0, :lo12:.LC2 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl create_contact str x0, [sp, 40] adrp x0, .LC4 add x1, x0, :lo12:.LC4 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl create_contact str x0, [sp, 48] adrp x0, .LC6 add x1, x0, :lo12:.LC6 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl create_contact str x0, [sp, 56] adrp x0, .LC8 add x1, x0, :lo12:.LC8 adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl create_contact str x0, [sp, 64] adrp x0, .LC10 add x1, x0, :lo12:.LC10 adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl create_contact str x0, [sp, 72] adrp x0, .LC12 add x1, x0, :lo12:.LC12 adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl create_contact str x0, [sp, 80] ldr x0, [sp, 40] bl add_to_address_book ldr x0, [sp, 48] bl add_to_address_book ldr x0, [sp, 56] bl add_to_address_book ldr x0, [sp, 64] bl add_to_address_book ldr x0, [sp, 72] bl add_to_address_book ldr x0, [sp, 80] bl add_to_address_book ldr x0, [sp, 64] bl search_in_address_book cmp w0, 0 blt .L32 ldr x0, [sp, 64] bl remove_from_address_book .L32: adrp x0, .LC14 add x1, x0, :lo12:.LC14 adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl create_contact str x0, [sp, 88] ldr x0, [sp, 88] bl add_to_address_book adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl puts str wzr, [sp, 32] b .L33 .L35: adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 32] ldr x0, [x0, x1, lsl 3] cmp x0, 0 beq .L34 adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 32] ldr x0, [x0, x1, lsl 3] bl print_contact .L34: ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L33: ldr w0, [sp, 32] cmp w0, 255 ble .L35 ldr x0, [sp, 64] bl add_to_address_book bl sort_by_name adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl puts str wzr, [sp, 36] b .L36 .L38: adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 36] ldr x0, [x0, x1, lsl 3] cmp x0, 0 beq .L37 adrp x0, address_book add x0, x0, :lo12:address_book ldrsw x1, [sp, 36] ldr x0, [x0, x1, lsl 3] bl print_contact .L37: ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L36: ldr w0, [sp, 36] cmp w0, 255 ble .L38 mov w0, 0 ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global main .type main, %function main: .LFB6: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] mov w0, 77 bl exit .cfi_endproc .LFE6: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global f .type f, %function f: .LFB0: .cfi_startproc stp x29, x30, [sp, -272]! .cfi_def_cfa_offset 272 .cfi_offset 29, -272 .cfi_offset 30, -264 mov x29, sp str w0, [sp, 28] str x1, [sp, 216] str x2, [sp, 224] str x3, [sp, 232] str x4, [sp, 240] str x5, [sp, 248] str x6, [sp, 256] str x7, [sp, 264] str q0, [sp, 80] str q1, [sp, 96] str q2, [sp, 112] str q3, [sp, 128] str q4, [sp, 144] str q5, [sp, 160] str q6, [sp, 176] str q7, [sp, 192] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 72] mov x1, 0 add x0, sp, 272 str x0, [sp, 40] add x0, sp, 272 str x0, [sp, 48] add x0, sp, 208 str x0, [sp, 56] mov w0, -56 str w0, [sp, 64] mov w0, -128 str w0, [sp, 68] ldr w0, [sp, 28] cmp w0, 2 beq .L2 bl abort .L2: ldr w1, [sp, 64] ldr x0, [sp, 40] cmp w1, 0 blt .L3 add x1, x0, 15 and x1, x1, -8 str x1, [sp, 40] b .L4 .L3: add w2, w1, 8 str w2, [sp, 64] ldr w2, [sp, 64] cmp w2, 0 ble .L5 add x1, x0, 15 and x1, x1, -8 str x1, [sp, 40] b .L4 .L5: ldr x2, [sp, 48] sxtw x0, w1 add x0, x2, x0 .L4: ldr x0, [x0] str x0, [sp, 32] ldr w1, [sp, 32] mov w0, 43690 cmp w1, w0 bne .L7 ldr w1, [sp, 36] mov w0, 21845 cmp w1, w0 beq .L8 .L7: bl abort .L8: ldr w1, [sp, 64] ldr x0, [sp, 40] cmp w1, 0 blt .L9 add x1, x0, 11 and x1, x1, -8 str x1, [sp, 40] b .L10 .L9: add w2, w1, 8 str w2, [sp, 64] ldr w2, [sp, 64] cmp w2, 0 ble .L11 add x1, x0, 11 and x1, x1, -8 str x1, [sp, 40] b .L10 .L11: ldr x2, [sp, 48] sxtw x0, w1 add x0, x2, x0 .L10: ldr w0, [x0] str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 3 beq .L13 bl abort .L13: ldr w1, [sp, 64] ldr x0, [sp, 40] cmp w1, 0 blt .L14 add x1, x0, 15 and x1, x1, -8 str x1, [sp, 40] b .L15 .L14: add w2, w1, 8 str w2, [sp, 64] ldr w2, [sp, 64] cmp w2, 0 ble .L16 add x1, x0, 15 and x1, x1, -8 str x1, [sp, 40] b .L15 .L16: ldr x2, [sp, 48] sxtw x0, w1 add x0, x2, x0 .L15: ldr x0, [x0] str x0, [sp, 32] ldr w1, [sp, 32] mov w0, 65535 cmp w1, w0 bne .L18 ldr w1, [sp, 36] mov w0, 4369 cmp w1, w0 beq .L19 .L18: bl abort .L19: nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 72] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L20 bl __stack_chk_fail .L20: mov w0, w1 ldp x29, x30, [sp], 272 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size f, .-f .align 2 .global main .type main, %function main: .LFB1: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp mov w0, 43690 str w0, [sp, 16] mov w0, 21845 str w0, [sp, 20] mov w0, 65535 str w0, [sp, 24] mov w0, 4369 str w0, [sp, 28] ldr x3, [sp, 24] mov w2, 3 ldr x1, [sp, 16] mov w0, 2 bl f mov w0, 0 bl exit .cfi_endproc .LFE1: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .section .rodata .align 3 .LC0: .string "msgget" .align 3 .LC1: .string "\347\254\254\344\270\200\346\235\241:" .align 3 .LC2: .string "\347\254\254\344\272\214\346\235\241:" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 152] mov x1, 0 mov w1, 932 mov w0, 34952 bl msgget str w0, [sp, 20] ldr w0, [sp, 20] cmn w0, #1 bne .L2 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl perror mov w0, 1 b .L3 .L2: add x0, sp, 24 mov w4, 0 mov x3, 0 mov x2, 128 mov x1, x0 ldr w0, [sp, 20] bl msgrcv adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf add x0, sp, 24 bl puts add x0, sp, 24 mov w4, 0 mov x3, 0 mov x2, 128 mov x1, x0 ldr w0, [sp, 20] bl msgrcv adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf add x0, sp, 24 bl puts mov x2, 0 mov w1, 0 ldr w0, [sp, 20] bl msgctl mov w0, 0 .L3: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 152] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L4 bl __stack_chk_fail .L4: mov w0, w1 ldp x29, x30, [sp], 160 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global something .bss .align 2 .type something, %object .size something, 4 something: .zero 4 .text .align 2 .type req_iquery, %function req_iquery: .LFB6: .cfi_startproc stp x29, x30, [sp, -144]! .cfi_def_cfa_offset 144 .cfi_offset 29, -144 .cfi_offset 30, -136 mov x29, sp str x0, [sp, 56] str x1, [sp, 48] str x2, [sp, 40] str x3, [sp, 32] str x4, [sp, 24] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 136] mov x1, 0 ldr x0, [sp, 48] ldr x0, [x0] ldr x1, [sp, 40] bl dn_skipname str w0, [sp, 64] ldr w0, [sp, 64] cmp w0, 0 bge .L2 ldr x1, [sp, 56] ldr w0, [x1] mov w2, 1 bfi w0, w2, 24, 4 str w0, [x1] mov w0, 0 b .L9 .L2: ldr x0, [sp, 48] ldr x1, [x0] ldrsw x0, [sp, 64] add x1, x1, x0 ldr x0, [sp, 48] str x1, [x0] ldr x0, [sp, 48] ldr x0, [x0] str x0, [sp, 88] ldr x0, [sp, 88] ldrb w0, [x0] lsl w0, w0, 8 ldr x1, [sp, 88] add x1, x1, 1 ldrb w1, [x1] orr w0, w0, w1 str w0, [sp, 68] ldr x0, [sp, 48] ldr x0, [x0] add x1, x0, 2 ldr x0, [sp, 48] str x1, [x0] ldr x0, [sp, 48] ldr x0, [x0] str x0, [sp, 96] ldr x0, [sp, 96] ldrb w0, [x0] lsl w0, w0, 8 ldr x1, [sp, 96] add x1, x1, 1 ldrb w1, [x1] orr w0, w0, w1 str w0, [sp, 72] ldr x0, [sp, 48] ldr x0, [x0] add x1, x0, 2 ldr x0, [sp, 48] str x1, [x0] ldr x0, [sp, 48] ldr x0, [x0] add x1, x0, 4 ldr x0, [sp, 48] str x1, [x0] ldr x0, [sp, 48] ldr x0, [x0] str x0, [sp, 104] ldr x0, [sp, 104] ldrb w0, [x0] lsl w0, w0, 8 ldr x1, [sp, 104] add x1, x1, 1 ldrb w1, [x1] orr w0, w0, w1 str w0, [sp, 76] ldr x0, [sp, 48] ldr x0, [x0] add x1, x0, 2 ldr x0, [sp, 48] str x1, [x0] ldr x0, [sp, 48] ldr x1, [x0] ldrsw x0, [sp, 76] add x1, x1, x0 ldr x0, [sp, 48] str x1, [x0] ldr x0, [sp, 48] ldr x0, [x0] ldr x1, [sp, 40] cmp x1, x0 beq .L4 ldr x1, [sp, 56] ldr w0, [x1] mov w2, 1 bfi w0, w2, 24, 4 str w0, [x1] mov w0, 0 b .L9 .L4: ldr w0, [sp, 68] cmp w0, 1 bne .L5 adrp x0, something add x0, x0, :lo12:something ldr w0, [x0] cmp w0, 0 bne .L12 mov w0, 1 b .L9 .L5: mov w0, 1 b .L9 .L12: nop ldr x0, [sp, 24] add x0, x0, 12 str x0, [sp, 112] ldr x0, [sp, 48] ldr x1, [x0] ldr x0, [sp, 112] sub x0, x1, x0 str w0, [sp, 80] ldr w0, [sp, 80] cmp w0, 2 bls .L8 mov w0, 1 b .L9 .L8: ldrsw x1, [sp, 80] add x0, sp, 128 mov x2, x1 ldr x1, [sp, 112] bl memcpy ldrsw x1, [sp, 80] ldrsw x0, [sp, 76] sub x0, x1, x0 add x1, sp, 128 add x0, x1, x0 str x0, [sp, 120] ldr x0, [sp, 48] ldr x1, [sp, 112] str x1, [x0] ldr x0, [sp, 32] ldr w0, [x0] sub w1, w0, #12 ldr x0, [sp, 32] str w1, [x0] str wzr, [sp, 84] mov w0, 0 .L9: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 136] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L10 bl __stack_chk_fail .L10: mov w0, w1 ldp x29, x30, [sp], 144 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size req_iquery, .-req_iquery .section .rodata .align 3 .LC0: .string "r" .align 3 .LC1: .string "iquery-file" .text .align 2 .global create_msg .type create_msg, %function create_msg: .LFB7: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] str wzr, [sp, 32] adrp x0, .LC0 add x1, x0, :lo12:.LC0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl fopen str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L16 mov w0, -1 b .L15 .L18: ldr x0, [sp, 24] add x1, x0, 1 str x1, [sp, 24] ldr w1, [sp, 36] and w1, w1, 255 strb w1, [x0] ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L16: ldr x0, [sp, 40] bl fgetc str w0, [sp, 36] ldr w0, [sp, 36] cmn w0, #1 beq .L17 ldr w1, [sp, 32] ldr w0, [sp, 20] cmp w1, w0 blt .L18 .L17: ldr x0, [sp, 40] bl fclose ldr w0, [sp, 32] .L15: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size create_msg, .-create_msg .section .rodata .align 3 .LC2: .string "program.c" .align 3 .LC3: .string "argc==2" .align 3 .LC4: .string "f!=NULL" .align 3 .LC5: .string "%d" .align 3 .LC6: .string "(fscanf(f, \"%d\", &something)) != 0" .text .align 2 .global main .type main, %function main: .LFB8: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 88] mov x1, 0 ldr w0, [sp, 28] cmp w0, 2 beq .L20 adrp x0, __PRETTY_FUNCTION__.0 add x3, x0, :lo12:__PRETTY_FUNCTION__.0 mov w2, 186 adrp x0, .LC2 add x1, x0, :lo12:.LC2 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl __assert_fail .L20: ldr x0, [sp, 16] add x0, x0, 8 ldr x2, [x0] adrp x0, .LC0 add x1, x0, :lo12:.LC0 mov x0, x2 bl fopen str x0, [sp, 56] ldr x0, [sp, 56] cmp x0, 0 bne .L21 adrp x0, __PRETTY_FUNCTION__.0 add x3, x0, :lo12:__PRETTY_FUNCTION__.0 mov w2, 188 adrp x0, .LC2 add x1, x0, :lo12:.LC2 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl __assert_fail .L21: adrp x0, something add x2, x0, :lo12:something adrp x0, .LC5 add x1, x0, :lo12:.LC5 ldr x0, [sp, 56] bl __isoc99_fscanf cmp w0, 0 bne .L22 adrp x0, __PRETTY_FUNCTION__.0 add x3, x0, :lo12:__PRETTY_FUNCTION__.0 mov w2, 189 adrp x0, .LC2 add x1, x0, :lo12:.LC2 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl __assert_fail .L22: mov x0, 10000 bl malloc str x0, [sp, 64] mov w1, 10000 ldr x0, [sp, 64] bl create_msg str w0, [sp, 44] ldr x0, [sp, 64] str x0, [sp, 72] ldr x0, [sp, 64] add x0, x0, 12 str x0, [sp, 48] ldr w0, [sp, 44] sxtw x0, w0 ldr x1, [sp, 64] add x0, x1, x0 str x0, [sp, 80] ldr x0, [sp, 72] ldr w0, [x0] ubfx x0, x0, 19, 4 and w0, w0, 255 cmp w0, 1 bne .L23 add x1, sp, 44 add x0, sp, 48 ldr x4, [sp, 64] mov x3, x1 ldr x2, [sp, 80] mov x1, x0 ldr x0, [sp, 72] bl req_iquery nop .L23: mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 88] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L25 bl __stack_chk_fail .L25: mov w0, w1 ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size main, .-main .section .rodata .align 3 .type __PRETTY_FUNCTION__.0, %object .size __PRETTY_FUNCTION__.0, 5 __PRETTY_FUNCTION__.0: .string "main" ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .align 2 .global f .type f, %function f: .LFB0: .cfi_startproc nop ret .cfi_endproc .LFE0: .size f, .-f ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .local fp .comm fp,8,8 .local flag .comm flag,4,4 .local name .comm name,81,8 .section .rodata .align 3 .LC0: .string "byte_open() :: file name has negative length!" .align 3 .LC1: .string "byte_open() :: file name too long!" .text .align 2 .global byte_open_ .type byte_open_, %function byte_open_: .LFB6: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] bl strlen str w0, [sp, 44] ldr w0, [sp, 44] cmp w0, 0 bge .L2 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts bl abort .L2: ldr w0, [sp, 44] cmp w0, 80 ble .L3 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts bl abort .L3: ldr x1, [sp, 24] adrp x0, name add x0, x0, :lo12:name bl strcpy nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size byte_open_, .-byte_open_ .section .rodata .align 3 .LC2: .string "byte_close() :: couldn't close file!" .text .align 2 .global byte_close_ .type byte_close_, %function byte_close_: .LFB7: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] cmp x0, 0 beq .L8 adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] bl fclose cmp w0, 0 beq .L7 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts bl abort .L7: adrp x0, fp add x0, x0, :lo12:fp str xzr, [x0] b .L4 .L8: nop .L4: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size byte_close_, .-byte_close_ .align 2 .global byte_rewind_ .type byte_rewind_, %function byte_rewind_: .LFB8: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] cmp x0, 0 beq .L12 adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] bl rewind b .L9 .L12: nop .L9: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size byte_rewind_, .-byte_rewind_ .section .rodata .align 3 .LC3: .string "wb" .align 3 .LC4: .string "byte_write() :: fopen failure!" .align 3 .LC5: .string "byte_write() :: can't write after reading!" .text .align 2 .global byte_write_ .type byte_write_, %function byte_write_: .LFB9: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] cmp x0, 0 bne .L14 adrp x0, .LC3 add x1, x0, :lo12:.LC3 adrp x0, name add x0, x0, :lo12:name bl fopen mov x1, x0 adrp x0, fp add x0, x0, :lo12:fp str x1, [x0] adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] cmp x0, 0 bne .L15 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts bl abort .L15: adrp x0, flag add x0, x0, :lo12:flag mov w1, 2 str w1, [x0] .L14: adrp x0, flag add x0, x0, :lo12:flag ldr w0, [x0] cmp w0, 2 bne .L16 ldr x0, [sp, 16] ldr w0, [x0] sxtw x1, w0 adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] mov x3, x0 mov x2, x1 mov x1, 4 ldr x0, [sp, 24] bl fwrite b .L18 .L16: adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts bl abort .L18: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size byte_write_, .-byte_write_ .section .rodata .align 3 .LC6: .string "rb" .align 3 .LC7: .string "byte_read() :: fopen failure!" .align 3 .LC8: .string "byte_read() :: can't read after writing!" .text .align 2 .global byte_read_ .type byte_read_, %function byte_read_: .LFB10: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] cmp x0, 0 bne .L20 adrp x0, .LC6 add x1, x0, :lo12:.LC6 adrp x0, name add x0, x0, :lo12:name bl fopen mov x1, x0 adrp x0, fp add x0, x0, :lo12:fp str x1, [x0] adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] cmp x0, 0 bne .L21 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts bl abort .L21: adrp x0, flag add x0, x0, :lo12:flag mov w1, 1 str w1, [x0] .L20: adrp x0, flag add x0, x0, :lo12:flag ldr w0, [x0] cmp w0, 1 bne .L22 ldr x0, [sp, 16] ldr w0, [x0] sxtw x1, w0 adrp x0, fp add x0, x0, :lo12:fp ldr x0, [x0] mov x3, x0 mov x2, x1 mov x1, 4 ldr x0, [sp, 24] bl fread b .L24 .L22: adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts bl abort .L24: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size byte_read_, .-byte_read_ .section .rodata .align 3 .LC9: .string "byte_reverse() :: n must be multiple of 2" .text .align 2 .global byte_reverse8_ .type byte_reverse8_, %function byte_reverse8_: .LFB11: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str x1, [sp, 16] ldr x0, [sp, 16] ldr w0, [x0] and w0, w0, 1 cmp w0, 0 beq .L26 adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts bl abort .L26: ldr x0, [sp, 24] str x0, [sp, 40] ldr x0, [sp, 16] ldr w0, [x0] str w0, [sp, 36] ldr w0, [sp, 36] add w0, w0, 2 str w0, [sp, 36] b .L27 .L28: ldr x0, [sp, 40] ldrb w0, [x0] strb w0, [sp, 35] ldr x0, [sp, 40] ldrb w1, [x0, 7] ldr x0, [sp, 40] strb w1, [x0] ldr x0, [sp, 40] add x0, x0, 7 ldrb w1, [sp, 35] strb w1, [x0] ldr x0, [sp, 40] ldrb w0, [x0, 1] strb w0, [sp, 35] ldr x0, [sp, 40] add x0, x0, 1 ldr x1, [sp, 40] ldrb w1, [x1, 6] strb w1, [x0] ldr x0, [sp, 40] add x0, x0, 6 ldrb w1, [sp, 35] strb w1, [x0] ldr x0, [sp, 40] ldrb w0, [x0, 2] strb w0, [sp, 35] ldr x0, [sp, 40] add x0, x0, 2 ldr x1, [sp, 40] ldrb w1, [x1, 5] strb w1, [x0] ldr x0, [sp, 40] add x0, x0, 5 ldrb w1, [sp, 35] strb w1, [x0] ldr x0, [sp, 40] ldrb w0, [x0, 3] strb w0, [sp, 35] ldr x0, [sp, 40] add x0, x0, 3 ldr x1, [sp, 40] ldrb w1, [x1, 4] strb w1, [x0] ldr x0, [sp, 40] add x0, x0, 4 ldrb w1, [sp, 35] strb w1, [x0] ldr x0, [sp, 40] add x0, x0, 8 str x0, [sp, 40] .L27: ldr w0, [sp, 36] sub w0, w0, #2 str w0, [sp, 36] ldr w0, [sp, 36] cmp w0, 0 bne .L28 nop nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size byte_reverse8_, .-byte_reverse8_ .align 2 .global byte_reverse_ .type byte_reverse_, %function byte_reverse_: .LFB12: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str x1, [sp] ldr x0, [sp, 8] str x0, [sp, 24] ldr x0, [sp] ldr w0, [x0] str w0, [sp, 20] b .L30 .L31: ldr x0, [sp, 24] ldrb w0, [x0] strb w0, [sp, 19] ldr x0, [sp, 24] ldrb w1, [x0, 3] ldr x0, [sp, 24] strb w1, [x0] ldr x0, [sp, 24] add x0, x0, 3 ldrb w1, [sp, 19] strb w1, [x0] ldr x0, [sp, 24] ldrb w0, [x0, 1] strb w0, [sp, 19] ldr x0, [sp, 24] add x0, x0, 1 ldr x1, [sp, 24] ldrb w1, [x1, 2] strb w1, [x0] ldr x0, [sp, 24] add x0, x0, 2 ldrb w1, [sp, 19] strb w1, [x0] ldr x0, [sp, 24] add x0, x0, 4 str x0, [sp, 24] .L30: ldr w0, [sp, 20] sub w1, w0, #1 str w1, [sp, 20] cmp w0, 0 bne .L31 nop nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size byte_reverse_, .-byte_reverse_ ```
### Human: Write a random program in ARM assembly### Assistant: ``` .text .global PPM_IDLESTATE_CHANGE_GUID .section .rodata .align 3 .type PPM_IDLESTATE_CHANGE_GUID, %object .size PPM_IDLESTATE_CHANGE_GUID, 24 PPM_IDLESTATE_CHANGE_GUID: .xword 1211694671 .hword -2276 .hword 20049 .ascii "\236\314\2040\247\254Ll" .zero 4 ```