text
stringlengths 197
24.1M
|
---|
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global Ni
.bss
.align 2
.type Ni, %object
.size Ni, 4
Ni:
.zero 4
.global N_jl
.align 3
.type N_jl, %object
.size N_jl, 8
N_jl:
.zero 8
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global cordic_ctab
.data
.align 3
.type cordic_ctab, %object
.size cordic_ctab, 128
cordic_ctab:
.word 843314856
.word 497837829
.word 263043836
.word 133525158
.word 67021686
.word 33543515
.word 16775850
.word 8388437
.word 4194282
.word 2097149
.word 1048575
.word 524287
.word 262143
.word 131071
.word 65535
.word 32767
.word 16383
.word 8191
.word 4095
.word 2047
.word 1023
.word 511
.word 255
.word 127
.word 63
.word 31
.word 15
.word 8
.word 4
.word 2
.word 1
.word 0
.text
.align 2
.global cordic
.type cordic, %function
cordic:
.LFB0:
.cfi_startproc
sub sp, sp, #64
.cfi_def_cfa_offset 64
str w0, [sp, 28]
str x1, [sp, 16]
str x2, [sp, 8]
str w3, [sp, 24]
mov w0, 15210
movk w0, 0x26dd, lsl 16
str w0, [sp, 36]
str wzr, [sp, 40]
ldr w0, [sp, 28]
str w0, [sp, 44]
ldr w2, [sp, 24]
ldr w1, [sp, 24]
mov w0, 32
cmp w2, 32
csel w0, w1, w0, le
str w0, [sp, 24]
str wzr, [sp, 32]
b .L2
.L3:
ldr w0, [sp, 44]
asr w0, w0, 31
str w0, [sp, 48]
ldr w0, [sp, 32]
ldr w1, [sp, 40]
asr w1, w1, w0
ldr w0, [sp, 48]
eor w1, w1, w0
ldr w0, [sp, 48]
sub w0, w1, w0
ldr w1, [sp, 36]
sub w0, w1, w0
str w0, [sp, 52]
ldr w0, [sp, 32]
ldr w1, [sp, 36]
asr w1, w1, w0
ldr w0, [sp, 48]
eor w1, w1, w0
ldr w0, [sp, 48]
sub w0, w1, w0
ldr w1, [sp, 40]
add w0, w1, w0
str w0, [sp, 56]
adrp x0, cordic_ctab
add x0, x0, :lo12:cordic_ctab
ldrsw x1, [sp, 32]
ldr w1, [x0, x1, lsl 2]
ldr w0, [sp, 48]
eor w1, w1, w0
ldr w0, [sp, 48]
sub w0, w1, w0
ldr w1, [sp, 44]
sub w0, w1, w0
str w0, [sp, 60]
ldr w0, [sp, 52]
str w0, [sp, 36]
ldr w0, [sp, 56]
str w0, [sp, 40]
ldr w0, [sp, 60]
str w0, [sp, 44]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
ldr w1, [sp, 32]
ldr w0, [sp, 24]
cmp w1, w0
blt .L3
ldr x0, [sp, 8]
ldr w1, [sp, 36]
str w1, [x0]
ldr x0, [sp, 16]
ldr w1, [sp, 40]
str w1, [x0]
nop
add sp, sp, 64
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size cordic, .-cordic
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.ascii "precision mediump"
.string " float;attribute vec4 a_Position;attribute vec2 a_TextureCoordinates;varying vec2 v_TextureCoordinates;uniform vec2 u_offset;uniform float u_time;void main(void){ v_TextureCoordinates = a_TextureCoordinates; gl_Position = a_Position;} "
.align 3
.LC1:
.ascii "precision mediump float;attribute vec4 a_Position;attribute"
.ascii " v"
.string "ec2 a_TextureCoordinates;varying vec2 v_TextureCoordinates;uniform vec2 u_offset;uniform float u_time;void main(void){ v_TextureCoordinates = a_TextureCoordinates; gl_Position = a_Position; gl_Position.w -= ( abs(sin(u_time)) /50. );} "
.section .data.rel.local,"aw"
.align 3
.type simpleVertexShader, %object
.size simpleVertexShader, 16
simpleVertexShader:
.xword .LC0
.xword .LC1
.section .rodata
.align 3
.LC2:
.string "precision mediump float;uniform sampler2D u_TextureUnit;varying vec2 v_TextureCoordinates;void main(void){ gl_FragColor = texture2D(u_TextureUnit, v_TextureCoordinates);}"
.align 3
.LC3:
.string "precision mediump float;uniform sampler2D u_TextureUnit;varying vec2 v_TextureCoordinates;uniform float u_time;void main(void){ gl_FragColor = texture2D(u_TextureUnit, v_TextureCoordinates); gl_FragColor.a *= abs(sin(u_time));}"
.section .data.rel.local
.align 3
.type simpleFragmentShader, %object
.size simpleFragmentShader, 16
simpleFragmentShader:
.xword .LC2
.xword .LC3
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global KERNEL_SOURCE
.section .rodata
.align 3
.LC0:
.ascii "ker"
.string "nel void vecadd(global float *a, \n global float *b, \n global float *c) \n{ \n int i = get_global_id(0); \n c[i] = a[i] + b[i]; \n} \n"
.section .data.rel.local,"aw"
.align 3
.type KERNEL_SOURCE, %object
.size KERNEL_SOURCE, 8
KERNEL_SOURCE:
.xword .LC0
.section .rodata
.align 3
.LC1:
.string "Usage: ./vecadd N [GLOBAL_SIZE]"
.align 3
.LC2:
.string "getting platforms"
.align 3
.LC3:
.string "getting platform name"
.align 3
.LC4:
.string "Oclgrind"
.align 3
.LC5:
.string "Unable to find Oclgrind platform\n"
.align 3
.LC6:
.string "getting device"
.align 3
.LC7:
.string "creating context"
.align 3
.LC8:
.string "creating command queue"
.align 3
.LC9:
.string "creating program"
.align 3
.LC10:
.string ""
.align 3
.LC11:
.string "%s\n"
.align 3
.LC12:
.string "building program"
.align 3
.LC13:
.string "vecadd"
.align 3
.LC14:
.string "creating kernel"
.align 3
.LC15:
.string "creating d_a buffer"
.align 3
.LC16:
.string "creating d_b buffer"
.align 3
.LC17:
.string "creating d_c buffer"
.align 3
.LC18:
.string "writing d_a data"
.align 3
.LC19:
.string "writing d_b data"
.align 3
.LC20:
.string "writing d_c data"
.align 3
.LC21:
.string "setting kernel args"
.align 3
.LC22:
.string "enqueuing kernel"
.align 3
.LC23:
.string "running kernel"
.align 3
.LC24:
.string "reading d_c data"
.align 3
.LC25:
.string "%4d: %.4f != %.4f\n"
.align 3
.LC26:
.string "%d errors detected\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
sub sp, sp, #544
.cfi_def_cfa_offset 544
stp x29, x30, [sp, 16]
.cfi_offset 29, -528
.cfi_offset 30, -520
add x29, sp, 16
str w0, [sp, 44]
str x1, [sp, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 536]
mov x1, 0
mov x0, 1024
str x0, [sp, 136]
ldr w0, [sp, 44]
cmp w0, 1
ble .L2
ldr x0, [sp, 32]
add x0, x0, 8
ldr x0, [x0]
bl atoi
sxtw x0, w0
str x0, [sp, 136]
.L2:
ldr x0, [sp, 136]
str x0, [sp, 112]
ldr w0, [sp, 44]
cmp w0, 2
ble .L3
ldr x0, [sp, 32]
add x0, x0, 16
ldr x0, [x0]
bl atoi
sxtw x0, w0
str x0, [sp, 112]
.L3:
ldr x0, [sp, 136]
cmp x0, 0
beq .L4
ldr x0, [sp, 112]
cmp x0, 0
bne .L5
.L4:
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
mov w0, 1
bl exit
.L5:
str wzr, [sp, 60]
add x1, sp, 60
add x0, sp, 216
mov x2, x1
mov x1, x0
mov w0, 8
bl clGetPlatformIDs
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov w0, w2
bl checkError
str xzr, [sp, 128]
str wzr, [sp, 64]
b .L6
.L9:
ldrsw x0, [sp, 64]
lsl x0, x0, 3
add x1, sp, 216
ldr x0, [x1, x0]
add x1, sp, 280
mov x4, 0
mov x3, x1
mov x2, 256
mov w1, 2306
bl clGetPlatformInfo
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov w0, w2
bl checkError
add x2, sp, 280
adrp x0, .LC4
add x1, x0, :lo12:.LC4
mov x0, x2
bl strcmp
cmp w0, 0
bne .L7
ldrsw x0, [sp, 64]
lsl x0, x0, 3
add x1, sp, 216
ldr x0, [x1, x0]
str x0, [sp, 128]
b .L8
.L7:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L6:
ldr w1, [sp, 64]
ldr w0, [sp, 60]
cmp w1, w0
bcc .L9
.L8:
ldr x0, [sp, 128]
cmp x0, 0
bne .L10
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 33
mov x1, 1
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl fwrite
mov w0, 1
bl exit
.L10:
add x0, sp, 88
mov x4, 0
mov x3, x0
mov w2, 1
mov x1, 4294967295
ldr x0, [sp, 128]
bl clGetDeviceIDs
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC6
add x1, x0, :lo12:.LC6
mov w0, w2
bl checkError
add x1, sp, 56
add x0, sp, 88
mov x5, x1
mov x4, 0
mov x3, 0
mov x2, x0
mov w1, 1
mov x0, 0
bl clCreateContext
str x0, [sp, 144]
ldr w2, [sp, 56]
adrp x0, .LC7
add x1, x0, :lo12:.LC7
mov w0, w2
bl checkError
ldr x0, [sp, 88]
add x1, sp, 56
mov x3, x1
mov x2, 0
mov x1, x0
ldr x0, [sp, 144]
bl clCreateCommandQueue
str x0, [sp, 152]
ldr w2, [sp, 56]
adrp x0, .LC8
add x1, x0, :lo12:.LC8
mov w0, w2
bl checkError
add x0, sp, 56
mov x4, x0
mov x3, 0
adrp x0, KERNEL_SOURCE
add x2, x0, :lo12:KERNEL_SOURCE
mov w1, 1
ldr x0, [sp, 144]
bl clCreateProgramWithSource
str x0, [sp, 160]
ldr w2, [sp, 56]
adrp x0, .LC9
add x1, x0, :lo12:.LC9
mov w0, w2
bl checkError
add x1, sp, 88
mov x5, 0
mov x4, 0
adrp x0, .LC10
add x3, x0, :lo12:.LC10
mov x2, x1
mov w1, 1
ldr x0, [sp, 160]
bl clBuildProgram
str w0, [sp, 56]
ldr w0, [sp, 56]
cmn w0, #11
bne .L11
ldr x0, [sp, 88]
add x1, sp, 120
mov x5, x1
mov x4, 0
mov x3, 8
mov w2, 4483
mov x1, x0
ldr x0, [sp, 160]
bl clGetProgramBuildInfo
ldr x0, [sp, 120]
add x0, x0, 1
str x0, [sp, 120]
ldr x0, [sp, 120]
bl malloc
str x0, [sp, 168]
ldr x0, [sp, 88]
ldr x1, [sp, 120]
mov x5, 0
ldr x4, [sp, 168]
mov x3, x1
mov w2, 4483
mov x1, x0
ldr x0, [sp, 160]
bl clGetProgramBuildInfo
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x2, [sp, 168]
adrp x0, .LC11
add x1, x0, :lo12:.LC11
mov x0, x3
bl fprintf
.L11:
ldr w2, [sp, 56]
adrp x0, .LC12
add x1, x0, :lo12:.LC12
mov w0, w2
bl checkError
add x0, sp, 56
mov x2, x0
adrp x0, .LC13
add x1, x0, :lo12:.LC13
ldr x0, [sp, 160]
bl clCreateKernel
str x0, [sp, 176]
ldr w2, [sp, 56]
adrp x0, .LC14
add x1, x0, :lo12:.LC14
mov w0, w2
bl checkError
ldr x0, [sp, 136]
lsl x0, x0, 2
str x0, [sp, 184]
mov w0, 0
bl srand
ldr x0, [sp, 184]
bl malloc
str x0, [sp, 192]
ldr x0, [sp, 184]
bl malloc
str x0, [sp, 200]
ldr x0, [sp, 184]
bl malloc
str x0, [sp, 208]
str wzr, [sp, 68]
b .L12
.L13:
bl rand
scvtf s1, w0
ldrsw x0, [sp, 68]
lsl x0, x0, 2
ldr x1, [sp, 192]
add x0, x1, x0
movi v0.2s, 0x4f, lsl 24
fdiv s0, s1, s0
str s0, [x0]
bl rand
scvtf s1, w0
ldrsw x0, [sp, 68]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
movi v0.2s, 0x4f, lsl 24
fdiv s0, s1, s0
str s0, [x0]
ldrsw x0, [sp, 68]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
str wzr, [x0]
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L12:
ldrsw x0, [sp, 68]
ldr x1, [sp, 136]
cmp x1, x0
bhi .L13
add x0, sp, 56
mov x4, x0
mov x3, 0
ldr x2, [sp, 184]
mov x1, 4
ldr x0, [sp, 144]
bl clCreateBuffer
str x0, [sp, 96]
ldr w2, [sp, 56]
adrp x0, .LC15
add x1, x0, :lo12:.LC15
mov w0, w2
bl checkError
add x0, sp, 56
mov x4, x0
mov x3, 0
ldr x2, [sp, 184]
mov x1, 4
ldr x0, [sp, 144]
bl clCreateBuffer
str x0, [sp, 104]
ldr w2, [sp, 56]
adrp x0, .LC16
add x1, x0, :lo12:.LC16
mov w0, w2
bl checkError
add x0, sp, 56
mov x4, x0
mov x3, 0
ldr x2, [sp, 184]
mov x1, 2
ldr x0, [sp, 144]
bl clCreateBuffer
str x0, [sp, 120]
ldr w2, [sp, 56]
adrp x0, .LC17
add x1, x0, :lo12:.LC17
mov w0, w2
bl checkError
ldr x0, [sp, 96]
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 192]
ldr x4, [sp, 184]
mov x3, 0
mov w2, 0
mov x1, x0
ldr x0, [sp, 152]
bl clEnqueueWriteBuffer
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC18
add x1, x0, :lo12:.LC18
mov w0, w2
bl checkError
ldr x0, [sp, 104]
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 200]
ldr x4, [sp, 184]
mov x3, 0
mov w2, 0
mov x1, x0
ldr x0, [sp, 152]
bl clEnqueueWriteBuffer
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC19
add x1, x0, :lo12:.LC19
mov w0, w2
bl checkError
ldr x0, [sp, 120]
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 208]
ldr x4, [sp, 184]
mov x3, 0
mov w2, 0
mov x1, x0
ldr x0, [sp, 152]
bl clEnqueueWriteBuffer
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC20
add x1, x0, :lo12:.LC20
mov w0, w2
bl checkError
add x0, sp, 96
mov x3, x0
mov x2, 8
mov w1, 0
ldr x0, [sp, 176]
bl clSetKernelArg
str w0, [sp, 56]
add x0, sp, 104
mov x3, x0
mov x2, 8
mov w1, 1
ldr x0, [sp, 176]
bl clSetKernelArg
mov w1, w0
ldr w0, [sp, 56]
orr w0, w1, w0
str w0, [sp, 56]
add x0, sp, 120
mov x3, x0
mov x2, 8
mov w1, 2
ldr x0, [sp, 176]
bl clSetKernelArg
mov w1, w0
ldr w0, [sp, 56]
orr w0, w1, w0
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC21
add x1, x0, :lo12:.LC21
mov w0, w2
bl checkError
add x0, sp, 112
str xzr, [sp]
mov x7, 0
mov w6, 0
mov x5, 0
mov x4, x0
mov x3, 0
mov w2, 1
ldr x1, [sp, 176]
ldr x0, [sp, 152]
bl clEnqueueNDRangeKernel
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC22
add x1, x0, :lo12:.LC22
mov w0, w2
bl checkError
ldr x0, [sp, 152]
bl clFinish
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC23
add x1, x0, :lo12:.LC23
mov w0, w2
bl checkError
ldr x0, [sp, 120]
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 208]
ldr x4, [sp, 184]
mov x3, 0
mov w2, 1
mov x1, x0
ldr x0, [sp, 152]
bl clEnqueueReadBuffer
str w0, [sp, 56]
ldr w2, [sp, 56]
adrp x0, .LC24
add x1, x0, :lo12:.LC24
mov w0, w2
bl checkError
str wzr, [sp, 72]
str wzr, [sp, 76]
b .L14
.L18:
ldrsw x0, [sp, 76]
lsl x0, x0, 2
ldr x1, [sp, 192]
add x0, x1, x0
ldr s1, [x0]
ldrsw x0, [sp, 76]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s0, [x0]
fadd s0, s1, s0
str s0, [sp, 80]
ldrsw x0, [sp, 76]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
ldr s0, [x0]
ldr s1, [sp, 80]
fsub s0, s1, s0
str s0, [sp, 84]
ldr s0, [sp, 84]
fabs s0, s0
fcvt d0, s0
adrp x0, .LC27
ldr d1, [x0, #:lo12:.LC27]
fcmpe d0, d1
bgt .L21
b .L15
.L21:
ldr w0, [sp, 72]
cmp w0, 7
bgt .L17
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldrsw x0, [sp, 76]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
ldr s0, [x0]
fcvt d2, s0
ldr s0, [sp, 80]
fcvt d0, s0
fmov d1, d0
fmov d0, d2
ldr w2, [sp, 76]
adrp x0, .LC25
add x1, x0, :lo12:.LC25
mov x0, x3
bl fprintf
.L17:
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L15:
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L14:
ldrsw x0, [sp, 76]
ldr x1, [sp, 136]
cmp x1, x0
bhi .L18
ldr w1, [sp, 72]
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl printf
ldr x0, [sp, 192]
bl free
ldr x0, [sp, 200]
bl free
ldr x0, [sp, 208]
bl free
ldr x0, [sp, 96]
bl clReleaseMemObject
ldr x0, [sp, 104]
bl clReleaseMemObject
ldr x0, [sp, 120]
bl clReleaseMemObject
ldr x0, [sp, 176]
bl clReleaseKernel
ldr x0, [sp, 160]
bl clReleaseProgram
ldr x0, [sp, 152]
bl clReleaseCommandQueue
ldr x0, [sp, 144]
bl clReleaseContext
ldr w0, [sp, 72]
cmp w0, 0
cset w0, ne
and w0, w0, 255
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 536]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L20
bl __stack_chk_fail
.L20:
mov w0, w1
ldp x29, x30, [sp, 16]
add sp, sp, 544
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC28:
.string "Error during operation '%s': %d\n"
.text
.align 2
.global checkError
.type checkError, %function
checkError:
.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]
str x1, [sp, 16]
ldr w0, [sp, 28]
cmp w0, 0
beq .L24
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x4, [x0]
ldr w3, [sp, 28]
ldr x2, [sp, 16]
adrp x0, .LC28
add x1, x0, :lo12:.LC28
mov x0, x4
bl fprintf
mov w0, 1
bl exit
.L24:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size checkError, .-checkError
.section .rodata
.align 3
.LC27:
.word -500134854
.word 1044740494
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.local hi
.comm hi,32768,8
.data
.align 2
.type current, %object
.size current, 4
current:
.word 128
.align 2
.type available, %object
.size available, 4
available:
.word 32640
.local header
.comm header,4,4
.section .rodata
.align 3
.LC0:
.string "rb"
.align 3
.LC1:
.string "%08X %08X: %s %ld\n"
.text
.align 2
.type process_file, %function
process_file:
.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]
adrp x0, .LC0
add x1, x0, :lo12:.LC0
ldr x0, [sp, 24]
bl fopen
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
beq .L4
mov w2, 2
mov x1, 0
ldr x0, [sp, 48]
bl fseek
ldr x0, [sp, 48]
bl ftell
str x0, [sp, 56]
mov w2, 0
mov x1, 0
ldr x0, [sp, 48]
bl fseek
ldr x0, [sp, 48]
bl ferror
cmp w0, 0
bne .L3
adrp x0, available
add x0, x0, :lo12:available
ldr w0, [x0]
sxtw x0, w0
ldr x1, [sp, 56]
cmp x1, x0
bgt .L3
adrp x0, current
add x0, x0, :lo12:current
ldr w1, [x0]
adrp x0, available
add x0, x0, :lo12:available
ldr w0, [x0]
ldr x4, [sp, 56]
ldr x3, [sp, 24]
mov w2, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
adrp x0, current
add x0, x0, :lo12:current
ldr w0, [x0]
sxtw x1, w0
adrp x0, hi
add x0, x0, :lo12:hi
add x0, x1, x0
ldr x1, [sp, 56]
ldr x3, [sp, 48]
mov x2, x1
mov x1, 1
bl fread
str w0, [sp, 44]
ldrsw x0, [sp, 44]
ldr x1, [sp, 56]
cmp x1, x0
bne .L3
adrp x0, current
add x0, x0, :lo12:current
ldr w3, [x0]
adrp x0, header
add x0, x0, :lo12:header
ldr w0, [x0]
add w2, w0, 1
adrp x1, header
add x1, x1, :lo12:header
str w2, [x1]
and w2, w3, 255
adrp x1, hi
add x1, x1, :lo12:hi
sxtw x0, w0
strb w2, [x1, x0]
adrp x0, current
add x0, x0, :lo12:current
ldr w0, [x0]
asr w3, w0, 8
adrp x0, header
add x0, x0, :lo12:header
ldr w0, [x0]
add w2, w0, 1
adrp x1, header
add x1, x1, :lo12:header
str w2, [x1]
and w2, w3, 255
adrp x1, hi
add x1, x1, :lo12:hi
sxtw x0, w0
strb w2, [x1, x0]
adrp x0, header
add x0, x0, :lo12:header
ldr w0, [x0]
add w2, w0, 1
adrp x1, header
add x1, x1, :lo12:header
str w2, [x1]
ldr x1, [sp, 56]
and w2, w1, 255
adrp x1, hi
add x1, x1, :lo12:hi
sxtw x0, w0
strb w2, [x1, x0]
ldr x0, [sp, 56]
asr x3, x0, 8
adrp x0, header
add x0, x0, :lo12:header
ldr w0, [x0]
add w2, w0, 1
adrp x1, header
add x1, x1, :lo12:header
str w2, [x1]
and w2, w3, 255
adrp x1, hi
add x1, x1, :lo12:hi
sxtw x0, w0
strb w2, [x1, x0]
ldr x0, [sp, 56]
mov w1, w0
adrp x0, current
add x0, x0, :lo12:current
ldr w0, [x0]
add w0, w1, w0
mov w1, w0
adrp x0, current
add x0, x0, :lo12:current
str w1, [x0]
adrp x0, available
add x0, x0, :lo12:available
ldr w0, [x0]
mov w1, w0
ldr x0, [sp, 56]
sub w0, w1, w0
mov w1, w0
adrp x0, available
add x0, x0, :lo12:available
str w1, [x0]
.L3:
ldr x0, [sp, 48]
bl fclose
.L4:
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size process_file, .-process_file
.section .rodata
.align 3
.LC2:
.string "usage: %s eeprom_file SID_0 [SID_1 [...]]\n"
.align 3
.LC3:
.string "wb"
.text
.align 2
.global main
.type main, %function
main:
.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 w0, [sp, 28]
str x1, [sp, 16]
ldr w0, [sp, 28]
cmp w0, 2
bgt .L6
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [sp, 16]
ldr x0, [x0]
mov x2, x0
adrp x0, .LC2
add x1, x0, :lo12:.LC2
mov x0, x3
bl fprintf
mov w0, 1
b .L7
.L6:
mov x2, 32768
mov w1, -1
adrp x0, hi
add x0, x0, :lo12:hi
bl memset
mov w0, 2
str w0, [sp, 36]
b .L8
.L9:
ldrsw x0, [sp, 36]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x0, [x0]
bl process_file
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L8:
ldr w2, [sp, 28]
ldr w1, [sp, 28]
mov w0, 34
cmp w2, 34
csel w0, w1, w0, le
ldr w1, [sp, 36]
cmp w1, w0
blt .L9
adrp x0, header
add x0, x0, :lo12:header
ldr w0, [x0]
cmp w0, 127
bgt .L10
adrp x0, header
add x0, x0, :lo12:header
ldr w0, [x0]
add w2, w0, 1
adrp x1, header
add x1, x1, :lo12:header
str w2, [x1]
adrp x1, hi
add x1, x1, :lo12:hi
sxtw x0, w0
strb wzr, [x1, x0]
adrp x0, header
add x0, x0, :lo12:header
ldr w0, [x0]
add w2, w0, 1
adrp x1, header
add x1, x1, :lo12:header
str w2, [x1]
adrp x1, hi
add x1, x1, :lo12:hi
sxtw x0, w0
strb wzr, [x1, x0]
adrp x0, header
add x0, x0, :lo12:header
ldr w0, [x0]
add w2, w0, 1
adrp x1, header
add x1, x1, :lo12:header
str w2, [x1]
adrp x1, hi
add x1, x1, :lo12:hi
sxtw x0, w0
strb wzr, [x1, x0]
adrp x0, header
add x0, x0, :lo12:header
ldr w0, [x0]
add w2, w0, 1
adrp x1, header
add x1, x1, :lo12:header
str w2, [x1]
adrp x1, hi
add x1, x1, :lo12:hi
sxtw x0, w0
strb wzr, [x1, x0]
.L10:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x2, [x0]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x2
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
beq .L11
ldr x3, [sp, 40]
mov x2, 32768
mov x1, 1
adrp x0, hi
add x0, x0, :lo12:hi
bl fwrite
ldr x0, [sp, 40]
bl fclose
.L11:
mov w0, 0
.L7:
ldp x29, x30, [sp], 48
.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
.align 2
.global fibo
.type fibo, %function
fibo:
.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 x19, [sp, 16]
.cfi_offset 19, -32
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 1
bgt .L2
ldr w0, [sp, 44]
b .L3
.L2:
ldr w0, [sp, 44]
sub w0, w0, #1
bl fibo
mov w19, w0
ldr w0, [sp, 44]
sub w0, w0, #2
bl fibo
add w0, w19, w0
.L3:
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
.LFE0:
.size fibo, .-fibo
.section .rodata
.align 3
.LC0:
.string "Enter a number:"
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "fibo=%d\n"
.text
.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
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 printf
add x0, sp, 16
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 16]
bl fibo
str w0, [sp, 20]
ldr w1, [sp, 20]
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 .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
.LFE1:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global ACPIBASE
.bss
.align 2
.type ACPIBASE, %object
.size ACPIBASE, 4
ACPIBASE:
.zero 4
.global tco_lock
.type tco_lock, %object
.size tco_lock, 1
tco_lock:
.zero 1
.global timer_alive
.align 3
.type timer_alive, %object
.size timer_alive, 8
timer_alive:
.zero 8
.global tco_expect_close
.type tco_expect_close, %object
.size tco_expect_close, 1
tco_expect_close:
.zero 1
.global tco_write_buf
.type tco_write_buf, %object
.size tco_write_buf, 1
tco_write_buf:
.zero 1
.global tco1_rld
.type tco1_rld, %object
.size tco1_rld, 1
tco1_rld:
.zero 1
.global tco1_cnt_b0
.type tco1_cnt_b0, %object
.size tco1_cnt_b0, 1
tco1_cnt_b0:
.zero 1
.global tco1_cnt_b1
.type tco1_cnt_b1, %object
.size tco1_cnt_b1, 1
tco1_cnt_b1:
.zero 1
.global tco1_cnt_b2
.type tco1_cnt_b2, %object
.size tco1_cnt_b2, 1
tco1_cnt_b2:
.zero 1
.global tco1_cnt_b3
.type tco1_cnt_b3, %object
.size tco1_cnt_b3, 1
tco1_cnt_b3:
.zero 1
.global tco1_cnt_b4
.type tco1_cnt_b4, %object
.size tco1_cnt_b4, 1
tco1_cnt_b4:
.zero 1
.global tco1_cnt_b5
.type tco1_cnt_b5, %object
.size tco1_cnt_b5, 1
tco1_cnt_b5:
.zero 1
.global tco1_cnt_b6
.type tco1_cnt_b6, %object
.size tco1_cnt_b6, 1
tco1_cnt_b6:
.zero 1
.global tco1_cnt_b7
.type tco1_cnt_b7, %object
.size tco1_cnt_b7, 1
tco1_cnt_b7:
.zero 1
.global heartbeat
.data
.align 2
.type heartbeat, %object
.size heartbeat, 4
heartbeat:
.word 30
.global nowayout
.bss
.align 2
.type nowayout, %object
.size nowayout, 4
nowayout:
.zero 4
.text
.align 2
.global seconds_to_ticks
.type seconds_to_ticks, %function
seconds_to_ticks:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w1, [sp, 12]
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 1
mov w1, 43691
movk w1, 0x2aaa, lsl 16
smull x1, w0, w1
lsr x1, x1, 32
asr w0, w0, 31
sub w0, w1, w0
and w0, w0, 255
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size seconds_to_ticks, .-seconds_to_ticks
.align 2
.global tco_timer_set_heartbeat
.type tco_timer_set_heartbeat, %function
tco_timer_set_heartbeat:
.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 w0, [sp, 28]
ldr w0, [sp, 28]
bl seconds_to_ticks
strb w0, [sp, 46]
ldrb w0, [sp, 46]
cmp w0, 63
bhi .L4
ldrb w0, [sp, 46]
cmp w0, 3
bhi .L7
.L4:
mov w0, -22
b .L6
.L7:
adrp x0, tco_lock
add x0, x0, :lo12:tco_lock
ldrb w0, [x0]
cmp w0, 0
bne .L7
strb wzr, [sp, 47]
ldrb w0, [sp, 47]
and w0, w0, -64
strb w0, [sp, 47]
ldrb w1, [sp, 47]
ldrb w0, [sp, 46]
orr w0, w1, w0
strb w0, [sp, 47]
strb wzr, [sp, 47]
adrp x0, tco_lock
add x0, x0, :lo12:tco_lock
strb wzr, [x0]
ldrb w0, [sp, 47]
and w1, w0, 63
ldrb w0, [sp, 46]
cmp w1, w0
beq .L8
mov w0, -22
b .L6
.L8:
adrp x0, heartbeat
add x0, x0, :lo12:heartbeat
ldr w1, [sp, 28]
str w1, [x0]
mov w0, 0
.L6:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size tco_timer_set_heartbeat, .-tco_timer_set_heartbeat
.align 2
.type tco_timer_get_timeleft, %function
tco_timer_get_timeleft:
.LFB2:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
.L10:
adrp x0, tco_lock
add x0, x0, :lo12:tco_lock
ldrb w0, [x0]
cmp w0, 0
bne .L10
strb wzr, [sp, 31]
ldrb w0, [sp, 31]
and w0, w0, 63
strb w0, [sp, 31]
adrp x0, tco_lock
add x0, x0, :lo12:tco_lock
strb wzr, [x0]
ldrb w1, [sp, 31]
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
lsl w0, w0, 1
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 w1, w1, w0
ldr x0, [sp, 8]
str w1, [x0]
mov w0, 0
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size tco_timer_get_timeleft, .-tco_timer_get_timeleft
.align 2
.global closer
.type closer, %function
closer:
.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 x0, [sp, 24]
adrp x0, tco_write_buf
add x0, x0, :lo12:tco_write_buf
mov w1, 86
strb w1, [x0]
adrp x0, nowayout
add x0, x0, :lo12:nowayout
ldr w0, [x0]
cmp w0, 0
bne .L13
adrp x0, tco_expect_close
add x0, x0, :lo12:tco_expect_close
strb wzr, [x0]
adrp x0, tco_write_buf
add x0, x0, :lo12:tco_write_buf
ldrb w0, [x0]
cmp w0, 86
bne .L13
adrp x0, tco_expect_close
add x0, x0, :lo12:tco_expect_close
mov w1, 42
strb w1, [x0]
.L13:
adrp x0, tco1_rld
add x0, x0, :lo12:tco1_rld
mov w1, 1
strb w1, [x0]
adrp x0, tco_expect_close
add x0, x0, :lo12:tco_expect_close
mov w1, 42
strb w1, [x0]
adrp x0, tco_expect_close
add x0, x0, :lo12:tco_expect_close
ldrb w0, [x0]
cmp w0, 42
bne .L14
.L15:
adrp x0, tco_lock
add x0, x0, :lo12:tco_lock
ldrb w0, [x0]
cmp w0, 0
bne .L15
adrp x0, tco1_cnt_b4
add x0, x0, :lo12:tco1_cnt_b4
mov w1, 1
strb w1, [x0]
mov w0, 1
strb w0, [sp, 47]
adrp x0, tco_lock
add x0, x0, :lo12:tco_lock
strb wzr, [x0]
b .L16
.L14:
mov w0, 0
bl assert
adrp x0, tco1_rld
add x0, x0, :lo12:tco1_rld
mov w1, 1
strb w1, [x0]
.L16:
adrp x0, timer_alive
add x0, x0, :lo12:timer_alive
str xzr, [x0]
adrp x0, tco_expect_close
add x0, x0, :lo12:tco_expect_close
strb wzr, [x0]
mov x0, 0
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size closer, .-closer
.align 2
.global writer
.type writer, %function
writer:
.LFB4:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
adrp x0, tco1_rld
add x0, x0, :lo12:tco1_rld
mov w1, 1
strb w1, [x0]
mov x0, 0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size writer, .-writer
.align 2
.global main
.type main, %function
main:
.LFB5:
.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
adrp x0, tco_expect_close
add x0, x0, :lo12:tco_expect_close
strb wzr, [x0]
add x4, sp, 40
mov x3, 0
adrp x0, writer
add x2, x0, :lo12:writer
mov x1, 0
mov x0, x4
bl pthread_create
add x4, sp, 48
mov x3, 0
adrp x0, closer
add x2, x0, :lo12:closer
mov x1, 0
mov x0, x4
bl pthread_create
mov x0, 0
bl pthread_exit
.cfi_endproc
.LFE5:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "\nMostrando conte\303\272o do vetor com for"
.align 3
.LC1:
.string "Seat [%d]: Age = %d, Score = %d\n"
.align 3
.LC2:
.string "age_sum_:= %d, Age[%d] = %d\n"
.align 3
.LC3:
.string "\nContagem de notas"
.align 3
.LC4:
.string "Count_score[%d]:= %d\n"
.align 3
.LC5:
.string "Max_age[%d]:= %d\n"
.align 3
.LC6:
.string "quantidade de respostas \303\263timo: %d\n"
.align 3
.LC7:
.string "diferen\303\247a percentual entre respostas bom e regular: %.2f\n"
.align 3
.LC8:
.string "m\303\251dia de idade das pessoas que responderam ruim: %.2f\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
.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]
stp x27, x28, [sp, 80]
sub sp, sp, #16
.cfi_offset 19, -272
.cfi_offset 20, -264
.cfi_offset 21, -256
.cfi_offset 22, -248
.cfi_offset 23, -240
.cfi_offset 24, -232
.cfi_offset 25, -224
.cfi_offset 26, -216
.cfi_offset 27, -208
.cfi_offset 28, -200
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 280]
mov x1, 0
mov x0, sp
mov x28, x0
mov w0, 20
str w0, [x29, 188]
mov w0, 5
str w0, [x29, 192]
mov w0, 100
str w0, [x29, 196]
ldr w1, [x29, 188]
sxtw x0, w1
sub x0, x0, #1
str x0, [x29, 200]
sxtw x0, w1
str x0, [x29, 128]
str xzr, [x29, 136]
ldr x0, [x29, 128]
lsr x0, x0, 59
ldr x30, [x29, 136]
lsl x3, x30, 5
orr x3, x0, x3
ldr x0, [x29, 128]
lsl x2, x0, 5
sxtw x0, w1
str x0, [x29, 112]
str xzr, [x29, 120]
ldp x2, x3, [x29, 112]
mov x0, x2
lsr x0, x0, 59
mov x30, x3
lsl x17, x30, 5
orr x17, x0, x17
mov x0, x2
lsl x16, x0, 5
sxtw x0, w1
lsl x0, x0, 2
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L2:
cmp sp, x1
beq .L3
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L2
.L3:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L4
str xzr, [sp, 1024]
.L4:
add x0, sp, 16
add x0, x0, 3
lsr x0, x0, 2
lsl x0, x0, 2
str x0, [x29, 208]
ldr w0, [x29, 188]
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 216]
sxtw x1, w0
str x1, [x29, 96]
str xzr, [x29, 104]
ldp x2, x3, [x29, 96]
mov x1, x2
lsr x1, x1, 59
mov x16, x3
lsl x15, x16, 5
orr x15, x1, x15
mov x1, x2
lsl x14, x1, 5
sxtw x1, w0
mov x26, x1
mov x27, 0
lsr x1, x26, 59
lsl x13, x27, 5
orr x13, x1, x13
lsl x12, x26, 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
.L5:
cmp sp, x1
beq .L6
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L5
.L6:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L7
str xzr, [sp, 1024]
.L7:
add x0, sp, 16
add x0, x0, 3
lsr x0, x0, 2
lsl x0, x0, 2
str x0, [x29, 224]
ldr w0, [x29, 192]
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 232]
sxtw x1, w0
mov x24, x1
mov x25, 0
lsr x1, x24, 59
lsl x11, x25, 5
orr x11, x1, x11
lsl x10, x24, 5
sxtw x1, w0
mov x22, x1
mov x23, 0
lsr x1, x22, 59
lsl x9, x23, 5
orr x9, x1, x9
lsl x8, x22, 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, 240]
ldr w0, [x29, 192]
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 248]
sxtw x1, w0
mov x20, x1
mov x21, 0
lsr x1, x20, 59
lsl x7, x21, 5
orr x7, x1, x7
lsl x6, x20, 5
sxtw x1, w0
mov x18, x1
mov x19, 0
lsr x1, x18, 59
lsl x5, x19, 5
orr x5, x1, x5
lsl x4, x18, 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
.L11:
cmp sp, x1
beq .L12
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L11
.L12:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L13
str xzr, [sp, 1024]
.L13:
add x0, sp, 16
add x0, x0, 3
lsr x0, x0, 2
lsl x0, x0, 2
str x0, [x29, 256]
str wzr, [x29, 168]
mov x0, 0
bl time
bl srand
str wzr, [x29, 156]
b .L14
.L15:
bl rand
ldr w1, [x29, 196]
sdiv w2, w0, w1
ldr w1, [x29, 196]
mul w1, w2, w1
sub w2, w0, w1
ldr x0, [x29, 208]
ldrsw x1, [x29, 156]
str w2, [x0, x1, lsl 2]
bl rand
ldr w1, [x29, 192]
sdiv w2, w0, w1
ldr w1, [x29, 192]
mul w1, w2, w1
sub w2, w0, w1
ldr x0, [x29, 224]
ldrsw x1, [x29, 156]
str w2, [x0, x1, lsl 2]
ldr w0, [x29, 156]
add w0, w0, 1
str w0, [x29, 156]
.L14:
ldr w1, [x29, 156]
ldr w0, [x29, 188]
cmp w1, w0
blt .L15
ldr x0, [x29, 208]
str x0, [x29, 264]
ldr x0, [x29, 224]
str x0, [x29, 272]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
str wzr, [x29, 172]
b .L16
.L18:
ldr w0, [x29, 172]
add w4, w0, 1
ldr x0, [x29, 208]
ldrsw x1, [x29, 172]
ldr w2, [x0, x1, lsl 2]
ldr x0, [x29, 224]
ldrsw x1, [x29, 172]
ldr w0, [x0, x1, lsl 2]
mov w3, w0
mov w1, w4
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr x0, [x29, 224]
ldrsw x1, [x29, 172]
ldr w0, [x0, x1, lsl 2]
cmp w0, 1
bne .L17
ldr x0, [x29, 208]
ldrsw x1, [x29, 172]
ldr w0, [x0, x1, lsl 2]
ldr w1, [x29, 168]
add w0, w1, w0
str w0, [x29, 168]
ldr w0, [x29, 172]
add w2, w0, 1
ldr x0, [x29, 208]
ldrsw x1, [x29, 172]
ldr w0, [x0, x1, lsl 2]
mov w3, w0
ldr w1, [x29, 168]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
.L17:
ldr w0, [x29, 172]
add w0, w0, 1
str w0, [x29, 172]
.L16:
ldr w1, [x29, 172]
ldr w0, [x29, 188]
cmp w1, w0
blt .L18
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
str wzr, [x29, 176]
b .L19
.L23:
str wzr, [x29, 164]
str wzr, [x29, 180]
b .L20
.L22:
ldr x0, [x29, 224]
ldrsw x1, [x29, 180]
ldr w0, [x0, x1, lsl 2]
ldr w1, [x29, 176]
cmp w1, w0
bne .L21
ldr w0, [x29, 160]
add w0, w0, 1
str w0, [x29, 160]
ldr x0, [x29, 208]
ldrsw x1, [x29, 180]
ldr w0, [x0, x1, lsl 2]
ldr w1, [x29, 164]
cmp w1, w0
bge .L21
ldr x0, [x29, 208]
ldrsw x1, [x29, 180]
ldr w0, [x0, x1, lsl 2]
str w0, [x29, 164]
.L21:
ldr w0, [x29, 180]
add w0, w0, 1
str w0, [x29, 180]
.L20:
ldr w1, [x29, 180]
ldr w0, [x29, 188]
cmp w1, w0
blt .L22
ldr x0, [x29, 240]
ldrsw x1, [x29, 176]
ldr w2, [x29, 160]
str w2, [x0, x1, lsl 2]
ldr x0, [x29, 256]
ldrsw x1, [x29, 176]
ldr w2, [x29, 164]
str w2, [x0, x1, lsl 2]
ldr w0, [x29, 176]
add w0, w0, 1
str w0, [x29, 176]
.L19:
ldr w1, [x29, 176]
ldr w0, [x29, 192]
cmp w1, w0
blt .L23
str wzr, [x29, 184]
b .L24
.L25:
ldr x0, [x29, 240]
ldrsw x1, [x29, 184]
ldr w0, [x0, x1, lsl 2]
mov w2, w0
ldr w1, [x29, 184]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr x0, [x29, 256]
ldrsw x1, [x29, 184]
ldr w0, [x0, x1, lsl 2]
mov w2, w0
ldr w1, [x29, 184]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
ldr w0, [x29, 184]
add w0, w0, 1
str w0, [x29, 184]
.L24:
ldr w1, [x29, 184]
ldr w0, [x29, 192]
cmp w1, w0
blt .L25
ldr x0, [x29, 240]
ldr w0, [x0, 16]
mov w1, w0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
ldr x0, [x29, 240]
ldr w1, [x0, 12]
ldr x0, [x29, 240]
ldr w0, [x0, 8]
sub w0, w1, w0
scvtf s1, w0
ldr x0, [x29, 240]
ldr s0, [x0, 12]
scvtf s0, s0
fdiv s0, s1, s0
fcvt d0, s0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
ldr x0, [x29, 240]
ldr w0, [x0, 4]
ldr w1, [x29, 168]
sdiv w0, w1, w0
scvtf s0, w0
fcvt d0, s0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
mov sp, x28
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [x29, 280]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L27
bl __stack_chk_fail
.L27:
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]
ldp x27, x28, [sp, 80]
ldp x29, x30, [sp], 288
.cfi_restore 30
.cfi_restore 29
.cfi_restore 27
.cfi_restore 28
.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 main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d"
.text
.align 2
.global main
.type main, %function
main:
.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 d8, [sp, 16]
.cfi_offset 72, -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
add x0, sp, 40
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
str wzr, [sp, 52]
mov w0, 1
str w0, [sp, 44]
b .L2
.L6:
mov w0, 1
str w0, [sp, 48]
b .L3
.L5:
ldr w0, [sp, 44]
ldr w1, [sp, 48]
sdiv w2, w0, w1
ldr w1, [sp, 48]
mul w1, w2, w1
sub w0, w0, w1
cmp w0, 0
bne .L4
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L4:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L3:
ldr w0, [sp, 48]
scvtf d8, w0
ldr w0, [sp, 44]
scvtf d0, w0
bl sqrt
fcmpe d8, d0
bls .L5
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L2:
ldr w0, [sp, 40]
ldr w1, [sp, 44]
cmp w1, w0
ble .L6
ldr w1, [sp, 52]
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, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L8
bl __stack_chk_fail
.L8:
mov w0, w1
ldr d8, [sp, 16]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_restore 72
.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
.LC1:
.string "Student %d:\n"
.align 3
.LC2:
.string "Answer for question %d: "
.align 3
.LC3:
.string " %c"
.align 3
.LC4:
.string "re-enter the value"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.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
add x0, sp, 40
movi v0.4s, 0
fmov x1, d0
str x1, [x0]
fmov x1, d0
str x1, [x0, 7]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
ldrh w0, [x0]
strh w0, [sp, 40]
strh wzr, [sp, 42]
strb wzr, [sp, 44]
str wzr, [sp, 32]
b .L2
.L8:
ldr w0, [sp, 32]
add w0, w0, 1
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
str wzr, [sp, 36]
b .L3
.L7:
ldr w0, [sp, 36]
add w0, w0, 1
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
add x0, sp, 31
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
ldrb w0, [sp, 31]
cmp w0, 116
beq .L4
ldrb w0, [sp, 31]
cmp w0, 84
beq .L4
ldrb w0, [sp, 31]
cmp w0, 102
beq .L4
ldrb w0, [sp, 31]
cmp w0, 70
bne .L5
.L4:
ldrsw x2, [sp, 36]
ldrsw x1, [sp, 32]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
add x0, x0, 64
add x0, sp, x0
add x0, x0, x2
ldrb w0, [x0, -24]
strb w0, [sp, 31]
b .L6
.L5:
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
ldr w0, [sp, 36]
sub w0, w0, #1
str w0, [sp, 36]
.L6:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L3:
ldr w0, [sp, 36]
cmp w0, 4
ble .L7
mov w0, 10
bl putchar
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
ldr w0, [sp, 32]
cmp w0, 2
ble .L8
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 .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
.LFE0:
.size main, .-main
.section .rodata
.align 3
.LC0:
.string "0"
.zero 3
.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, -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
add x0, sp, 64
str x0, [sp, 56]
ldr x0, [sp, 56]
bl getStruct
add x2, sp, 16
add x3, sp, 64
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr w0, [x3, 16]
str w0, [x2, 16]
add x0, sp, 16
bl DispStruct
ldr x0, [sp, 56]
bl DispStrctWithPtr
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 .L3
bl __stack_chk_fail
.L3:
mov w0, w1
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.section .rodata
.align 3
.LC0:
.string "Enter "
.align 3
.LC1:
.string "intValue1 : "
.align 3
.LC2:
.string "%x"
.align 3
.LC3:
.string "shValue : "
.align 3
.LC4:
.string "intValue2 : "
.align 3
.LC5:
.string "chValue : "
.align 3
.LC6:
.string "intValue3 : "
.text
.align 2
.global getStruct
.type getStruct, %function
getStruct:
.LFB1:
.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, .LC0
add x0, x0, :lo12:.LC0
bl puts
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr x0, [sp, 24]
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
ldr x0, [sp, 24]
add x0, x0, 4
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr x0, [sp, 24]
add x0, x0, 8
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
ldr x0, [sp, 24]
add x0, x0, 12
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
ldr x0, [sp, 24]
add x0, x0, 16
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size getStruct, .-getStruct
.section .rodata
.align 3
.LC7:
.string "****** struct info ******** "
.align 3
.LC8:
.string "intValue1 :%x\n"
.align 3
.LC9:
.string "shValue : %x\n"
.align 3
.LC10:
.string "intValue2 : %x\n"
.align 3
.LC11:
.string "chValue : %x\n"
.align 3
.LC12:
.string "intValue3 : %x\n"
.text
.align 2
.global DispStrctWithPtr
.type DispStrctWithPtr, %function
DispStrctWithPtr:
.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 x0, [sp, 24]
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
ldr x0, [sp, 24]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
ldr x0, [sp, 24]
ldrh w0, [x0, 4]
mov w1, w0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
ldr x0, [sp, 24]
ldr w0, [x0, 8]
mov w1, w0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
ldr x0, [sp, 24]
ldrb w0, [x0, 12]
mov w1, w0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
ldr x0, [sp, 24]
ldr w0, [x0, 16]
mov w1, w0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size DispStrctWithPtr, .-DispStrctWithPtr
.align 2
.global DispStruct
.type DispStruct, %function
DispStruct:
.LFB3:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -16
mov x19, x0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
ldr w0, [x19]
mov w1, w0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
ldrh w0, [x19, 4]
mov w1, w0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
ldr w0, [x19, 8]
mov w1, w0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
ldrb w0, [x19, 12]
mov w1, w0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
ldr w0, [x19, 16]
mov w1, w0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
nop
ldr x19, [sp, 16]
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size DispStruct, .-DispStruct
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global CRAMPED_SCRIPT_STYLE
.section .rodata
.align 2
.type CRAMPED_SCRIPT_STYLE, %object
.size CRAMPED_SCRIPT_STYLE, 4
CRAMPED_SCRIPT_STYLE:
.zero 4
.global SCRIPT_STYLE
.align 2
.type SCRIPT_STYLE, %object
.size SCRIPT_STYLE, 4
SCRIPT_STYLE:
.word 1
.global CRAMPED_DISPLAY_STYLE
.align 2
.type CRAMPED_DISPLAY_STYLE, %object
.size CRAMPED_DISPLAY_STYLE, 4
CRAMPED_DISPLAY_STYLE:
.word 2
.global DISPLAY_STYLE
.align 2
.type DISPLAY_STYLE, %object
.size DISPLAY_STYLE, 4
DISPLAY_STYLE:
.word 3
.global ORDINARY_TYPE
.align 2
.type ORDINARY_TYPE, %object
.size ORDINARY_TYPE, 4
ORDINARY_TYPE:
.zero 4
.global OPERATOR_TYPE
.align 2
.type OPERATOR_TYPE, %object
.size OPERATOR_TYPE, 4
OPERATOR_TYPE:
.word 1
.global BINARY_TYPE
.align 2
.type BINARY_TYPE, %object
.size BINARY_TYPE, 4
BINARY_TYPE:
.word 2
.global RELATION_TYPE
.align 2
.type RELATION_TYPE, %object
.size RELATION_TYPE, 4
RELATION_TYPE:
.word 3
.global OPENING_TYPE
.align 2
.type OPENING_TYPE, %object
.size OPENING_TYPE, 4
OPENING_TYPE:
.word 4
.global CLOSING_TYPE
.align 2
.type CLOSING_TYPE, %object
.size CLOSING_TYPE, 4
CLOSING_TYPE:
.word 5
.global PUNCTUATION_TYPE
.align 2
.type PUNCTUATION_TYPE, %object
.size PUNCTUATION_TYPE, 4
PUNCTUATION_TYPE:
.word 6
.global INNER_TYPE
.align 2
.type INNER_TYPE, %object
.size INNER_TYPE, 4
INNER_TYPE:
.word 7
.global SUPPRESS_TYPE
.align 2
.type SUPPRESS_TYPE, %object
.size SUPPRESS_TYPE, 4
SUPPRESS_TYPE:
.word 8
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "data.txt"
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "r"
.align 3
.LC3:
.string "cannot open file:%s\n"
.align 3
.LC4:
.string "file %s\n"
.align 3
.LC5:
.string "%d %d %d %lf %d %lf %d %d %d"
.align 3
.LC6:
.string "hr %4.1f vvel %5.2f err %5.2f num %4.0f\n"
.align 3
.LC7:
.string "wb"
.align 3
.LC8:
.string "out_half.txt"
.align 3
.LC9:
.string "%5.2f\n"
.align 3
.LC10:
.string "out_err_half.txt"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
mov x12, 33584
sub sp, sp, x12
.cfi_def_cfa_offset 33584
stp x29, x30, [sp, 32]
.cfi_offset 29, -33552
.cfi_offset 30, -33544
add x29, sp, 32
str d8, [sp, 48]
.cfi_offset 72, -33536
str w0, [sp, 76]
str x1, [sp, 64]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 32768
ldr x2, [x0]
str x2, [x1, 808]
mov x2, 0
ldr w0, [sp, 76]
cmp w0, 1
ble .L2
ldr x0, [sp, 64]
add x0, x0, 8
ldr x3, [x0]
adrp x0, .LC0
add x2, x0, :lo12:.LC0
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, x3
bl __isoc99_sscanf
.L2:
adrp x0, .LC2
add x1, x0, :lo12:.LC2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl fopen
str x0, [sp, 184]
ldr x0, [sp, 184]
cmp x0, 0
bne .L3
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
mov w0, 0
b .L24
.L3:
str wzr, [sp, 140]
ldr w0, [sp, 140]
str w0, [sp, 124]
ldr w0, [sp, 124]
str w0, [sp, 120]
add x0, sp, 552
mov x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
b .L5
.L10:
ldrb w0, [sp, 808]
cmp w0, 42
beq .L5
ldrb w0, [sp, 808]
cmp w0, 10
beq .L5
str xzr, [sp, 152]
add x6, sp, 144
add x5, sp, 96
add x4, sp, 152
add x3, sp, 108
add x2, sp, 100
add x1, sp, 104
add x8, sp, 808
add x0, sp, 116
str x0, [sp, 16]
add x0, sp, 112
str x0, [sp, 8]
add x0, sp, 92
str x0, [sp]
mov x7, x6
mov x6, x5
mov x5, x4
mov x4, x3
mov x3, x2
mov x2, x1
adrp x0, .LC5
add x1, x0, :lo12:.LC5
mov x0, x8
bl __isoc99_sscanf
ldr d0, [sp, 152]
fcmp d0, #0.0
beq .L6
ldr d0, [sp, 144]
fabs d0, d0
mov x0, 4641240890982006784
fmov d1, x0
fcmpe d0, d1
bmi .L26
b .L6
.L26:
ldr d0, [sp, 144]
adrp x0, vel.3
add x0, x0, :lo12:vel.3
ldrsw x1, [sp, 124]
str d0, [x0, x1, lsl 3]
ldr d0, [sp, 152]
adrp x0, verr.2
add x0, x0, :lo12:verr.2
ldrsw x1, [sp, 124]
str d0, [x0, x1, lsl 3]
ldr w0, [sp, 100]
scvtf d1, w0
ldr w0, [sp, 104]
scvtf d0, w0
mov x0, 4633641066610819072
fmov d2, x0
fdiv d0, d0, d2
fadd d1, d1, d0
fmov d0, 4.0e+0
fsub d0, d1, d0
adrp x0, tim.1
add x0, x0, :lo12:tim.1
ldrsw x1, [sp, 124]
str d0, [x0, x1, lsl 3]
adrp x0, tim.1
add x0, x0, :lo12:tim.1
ldrsw x1, [sp, 124]
ldr d1, [x0, x1, lsl 3]
fmov d0, 1.2e+1
fcmpe d1, d0
bgt .L27
b .L8
.L27:
adrp x0, tim.1
add x0, x0, :lo12:tim.1
ldrsw x1, [sp, 124]
ldr d1, [x0, x1, lsl 3]
fmov d0, 1.2e+1
fsub d0, d1, d0
adrp x0, tim.1
add x0, x0, :lo12:tim.1
ldrsw x1, [sp, 124]
str d0, [x0, x1, lsl 3]
.L8:
ldr w0, [sp, 124]
add w0, w0, 1
str w0, [sp, 124]
.L6:
ldr w0, [sp, 120]
add w0, w0, 1
str w0, [sp, 120]
.L5:
add x0, sp, 808
ldr x2, [sp, 184]
mov w1, 32768
bl fgets
cmp x0, 0
bne .L10
ldr w0, [sp, 124]
str w0, [sp, 140]
ldr x0, [sp, 184]
bl fclose
fmov d0, 5.0e-1
str d0, [sp, 192]
str wzr, [sp, 128]
fmov d0, -5.0e+0
str d0, [sp, 176]
b .L11
.L19:
str xzr, [sp, 160]
ldr d0, [sp, 160]
str d0, [sp, 144]
str wzr, [sp, 124]
b .L12
.L15:
adrp x0, wt.0
add x0, x0, :lo12:wt.0
ldrsw x1, [sp, 124]
str xzr, [x0, x1, lsl 3]
adrp x0, tim.1
add x0, x0, :lo12:tim.1
ldrsw x1, [sp, 124]
ldr d1, [x0, x1, lsl 3]
ldr d0, [sp, 176]
fsub d0, d1, d0
fabs d1, d0
fmov d0, 2.0e+0
ldr d2, [sp, 192]
fdiv d0, d2, d0
fcmpe d1, d0
bmi .L28
b .L13
.L28:
adrp x0, vel.3
add x0, x0, :lo12:vel.3
ldrsw x1, [sp, 124]
ldr d1, [x0, x1, lsl 3]
ldr d0, [sp, 144]
fadd d0, d1, d0
str d0, [sp, 144]
adrp x0, wt.0
add x0, x0, :lo12:wt.0
ldrsw x1, [sp, 124]
fmov d0, 1.0e+0
str d0, [x0, x1, lsl 3]
ldr d1, [sp, 160]
fmov d0, 1.0e+0
fadd d0, d1, d0
str d0, [sp, 160]
.L13:
ldr w0, [sp, 124]
add w0, w0, 1
str w0, [sp, 124]
.L12:
ldr w1, [sp, 124]
ldr w0, [sp, 140]
cmp w1, w0
blt .L15
ldr d1, [sp, 144]
ldr d0, [sp, 160]
fdiv d0, d1, d0
str d0, [sp, 144]
str xzr, [sp, 168]
ldr d0, [sp, 168]
str d0, [sp, 160]
str wzr, [sp, 124]
b .L16
.L18:
adrp x0, wt.0
add x0, x0, :lo12:wt.0
ldrsw x1, [sp, 124]
ldr d0, [x0, x1, lsl 3]
fcmp d0, #0.0
beq .L17
adrp x0, vel.3
add x0, x0, :lo12:vel.3
ldrsw x1, [sp, 124]
ldr d1, [x0, x1, lsl 3]
ldr d0, [sp, 144]
fsub d1, d1, d0
adrp x0, vel.3
add x0, x0, :lo12:vel.3
ldrsw x1, [sp, 124]
ldr d2, [x0, x1, lsl 3]
ldr d0, [sp, 144]
fsub d0, d2, d0
fmul d0, d1, d0
ldr d1, [sp, 168]
fadd d0, d1, d0
str d0, [sp, 168]
ldr d1, [sp, 160]
fmov d0, 1.0e+0
fadd d0, d1, d0
str d0, [sp, 160]
.L17:
ldr w0, [sp, 124]
add w0, w0, 1
str w0, [sp, 124]
.L16:
ldr w1, [sp, 124]
ldr w0, [sp, 140]
cmp w1, w0
blt .L18
ldr d0, [sp, 160]
ldr d1, [sp, 168]
fdiv d0, d1, d0
bl sqrt
fmov d1, d0
fmov d0, 3.0e+0
fmul d8, d1, d0
ldr d1, [sp, 160]
fmov d0, 1.0e+0
fsub d0, d1, d0
bl sqrt
fdiv d0, d8, d0
str d0, [sp, 152]
ldr d0, [sp, 144]
ldr d1, [sp, 152]
ldr d3, [sp, 160]
fmov d2, d1
fmov d1, d0
ldr d0, [sp, 176]
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
ldr d0, [sp, 144]
ldrsw x0, [sp, 128]
lsl x0, x0, 3
add x1, sp, 216
str d0, [x1, x0]
ldr d0, [sp, 152]
ldrsw x0, [sp, 128]
lsl x0, x0, 3
add x1, sp, 384
str d0, [x1, x0]
ldr w0, [sp, 128]
add w0, w0, 1
str w0, [sp, 128]
ldr d1, [sp, 176]
ldr d0, [sp, 192]
fadd d0, d1, d0
str d0, [sp, 176]
.L11:
ldr d1, [sp, 176]
fmov d0, 5.0e+0
fcmpe d1, d0
bls .L19
adrp x0, .LC7
add x1, x0, :lo12:.LC7
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl fopen
str x0, [sp, 200]
str wzr, [sp, 132]
b .L20
.L21:
ldrsw x0, [sp, 132]
lsl x0, x0, 3
add x1, sp, 216
ldr d0, [x1, x0]
adrp x0, .LC9
add x1, x0, :lo12:.LC9
ldr x0, [sp, 200]
bl fprintf
ldr w0, [sp, 132]
add w0, w0, 1
str w0, [sp, 132]
.L20:
ldr w0, [sp, 132]
cmp w0, 20
bls .L21
ldr x0, [sp, 200]
bl fclose
adrp x0, .LC7
add x1, x0, :lo12:.LC7
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl fopen
str x0, [sp, 208]
str wzr, [sp, 136]
b .L22
.L23:
ldrsw x0, [sp, 136]
lsl x0, x0, 3
add x1, sp, 384
ldr d0, [x1, x0]
adrp x0, .LC9
add x1, x0, :lo12:.LC9
ldr x0, [sp, 208]
bl fprintf
ldr w0, [sp, 136]
add w0, w0, 1
str w0, [sp, 136]
.L22:
ldr w0, [sp, 136]
cmp w0, 20
bls .L23
ldr x0, [sp, 208]
bl fclose
mov w0, 0
.L24:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x3, sp, 32768
ldr x4, [x3, 808]
ldr x2, [x0]
subs x4, x4, x2
mov x2, 0
beq .L25
bl __stack_chk_fail
.L25:
mov w0, w1
ldr d8, [sp, 48]
ldp x29, x30, [sp, 32]
mov x12, 33584
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_restore 72
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.local vel.3
.comm vel.3,800000,8
.local verr.2
.comm verr.2,800000,8
.local tim.1
.comm tim.1,800000,8
.local wt.0
.comm wt.0,800000,8
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global x
.bss
.align 3
.type x, %object
.size x, 8
x:
.zero 8
.global y
.align 3
.type y, %object
.size y, 8
y:
.zero 8
.global width
.align 3
.type width, %object
.size width, 8
width:
.zero 8
.global height
.align 3
.type height, %object
.size height, 8
height:
.zero 8
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global mt_init
.type mt_init, %function
mt_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 x0, [sp, 24]
str wzr, [sp, 44]
b .L2
.L3:
bl rand
mov w2, w0
ldr x1, [sp, 24]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
str w2, [x0, 4]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L2:
ldr w0, [sp, 44]
cmp w0, 623
ble .L3
ldr x0, [sp, 24]
str wzr, [x0]
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size mt_init, .-mt_init
.align 2
.global mt_random
.type mt_random, %function
mt_random:
.LFB7:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, 8]
ldr x0, [sp, 8]
add x0, x0, 4
str x0, [sp, 40]
ldr x0, [sp, 8]
ldr w0, [x0]
str w0, [sp, 28]
ldr w0, [sp, 28]
cmp w0, 2496
bne .L5
str wzr, [sp, 28]
str wzr, [sp, 32]
b .L6
.L7:
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w0, [x0]
and w1, w0, -2147483648
ldrsw x0, [sp, 32]
add x0, x0, 1
lsl x0, x0, 2
ldr x2, [sp, 40]
add x0, x2, x0
ldr w0, [x0]
and w0, w0, 2147483647
orr w0, w1, w0
str w0, [sp, 36]
ldrsw x0, [sp, 32]
add x0, x0, 397
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w1, [x0]
ldr w0, [sp, 36]
lsr w0, w0, 1
eor w2, w1, w0
ldr w0, [sp, 36]
and w1, w0, 1
mov w0, 45279
movk w0, 0x9908, lsl 16
mul w1, w1, w0
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x3, [sp, 40]
add x0, x3, x0
eor w1, w2, w1
str w1, [x0]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L6:
ldr w0, [sp, 32]
cmp w0, 226
ble .L7
b .L8
.L9:
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w0, [x0]
and w1, w0, -2147483648
ldrsw x0, [sp, 32]
add x0, x0, 1
lsl x0, x0, 2
ldr x2, [sp, 40]
add x0, x2, x0
ldr w0, [x0]
and w0, w0, 2147483647
orr w0, w1, w0
str w0, [sp, 36]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
sub x0, x0, #908
ldr x1, [sp, 40]
add x0, x1, x0
ldr w1, [x0]
ldr w0, [sp, 36]
lsr w0, w0, 1
eor w2, w1, w0
ldr w0, [sp, 36]
and w1, w0, 1
mov w0, 45279
movk w0, 0x9908, lsl 16
mul w1, w1, w0
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x3, [sp, 40]
add x0, x3, x0
eor w1, w2, w1
str w1, [x0]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L8:
ldr w0, [sp, 32]
cmp w0, 622
ble .L9
ldr x0, [sp, 40]
add x0, x0, 2492
ldr w0, [x0]
and w1, w0, -2147483648
ldr x0, [sp, 40]
ldr w0, [x0]
and w0, w0, 2147483647
orr w0, w1, w0
str w0, [sp, 36]
ldr x0, [sp, 40]
add x0, x0, 1584
ldr w1, [x0]
ldr w0, [sp, 36]
lsr w0, w0, 1
eor w2, w1, w0
ldr w0, [sp, 36]
and w1, w0, 1
mov w0, 45279
movk w0, 0x9908, lsl 16
mul w1, w1, w0
ldr x0, [sp, 40]
add x0, x0, 2492
eor w1, w2, w1
str w1, [x0]
.L5:
ldr w0, [sp, 28]
add w0, w0, 4
mov w1, w0
ldr x0, [sp, 8]
str w1, [x0]
ldrsw x0, [sp, 28]
ldr x1, [sp, 40]
add x0, x1, x0
ldr w0, [x0]
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size mt_random, .-mt_random
.align 2
.global get_timestamp
.type get_timestamp, %function
get_timestamp:
.LFB8:
.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, 0
bl gettimeofday
ldr d0, [sp, 24]
scvtf d1, d0
ldr d0, [sp, 32]
scvtf d0, d0
mov x0, 145685290680320
movk x0, 0x412e, lsl 48
fmov d2, x0
fdiv d0, d0, d2
fadd d0, d1, d0
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 .L13
bl __stack_chk_fail
.L13:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size get_timestamp, .-get_timestamp
.align 2
.global fail
.type fail, %function
fail:
.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]
ldr x0, [sp, 24]
bl perror
mov w0, 1
bl exit
.cfi_endproc
.LFE9:
.size fail, .-fail
.local state
.comm state,668200,8
.local state_flag
.comm state_flag,4,4
.local random_data
.comm random_data,1048576,8
.local seek_data
.comm seek_data,8,8
.local seek_data_len
.comm seek_data_len,4,4
.local fd
.comm fd,4,4
.data
.align 3
.type run_time, %object
.size run_time, 8
run_time:
.word 0
.word 1077805056
.text
.align 2
.global sync_thread
.type sync_thread, %function
sync_thread:
.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]
adrp x0, fd
add x0, x0, :lo12:fd
ldr w0, [x0]
bl fsync
bl get_timestamp
ldr x0, [sp, 24]
str d0, [x0]
mov x0, 0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size sync_thread, .-sync_thread
.section .rodata
.align 3
.LC0:
.string "malloc"
.align 3
.LC1:
.string "IO error"
.text
.align 2
.global test_thread
.type test_thread, %function
test_thread:
.LFB11:
.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, 24]
ldr x0, [sp, 24]
str x0, [sp, 56]
ldr x0, [sp, 56]
ldr w0, [x0, 2536]
lsl w0, w0, 10
str w0, [sp, 52]
mov w0, 1
bl sleep
ldr x0, [sp, 56]
ldr w0, [x0, 8]
lsl w0, w0, 12
uxtw x1, w0
adrp x0, random_data
add x0, x0, :lo12:random_data
add x0, x1, x0
str x0, [sp, 64]
ldr x0, [sp, 56]
ldr w1, [x0, 8]
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
adrp x1, seek_data_len
add x1, x1, :lo12:seek_data_len
ldr w1, [x1]
udiv w2, w0, w1
mul w1, w2, w1
sub w0, w0, w1
str w0, [sp, 44]
ldr x0, [sp, 56]
ldr w0, [x0, 8]
uxtw x1, w0
ldr x0, [sp, 56]
ldr x0, [x0, 2520]
add x2, x0, 255
cmp x0, 0
csel x0, x2, x0, lt
asr x0, x0, 8
mul x0, x1, x0
str x0, [sp, 72]
ldr w0, [sp, 52]
bl malloc
str x0, [sp, 80]
ldr x0, [sp, 80]
cmp x0, 0
bne .L18
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl fail
.L18:
bl get_timestamp
ldr x0, [sp, 56]
str d0, [x0, 2576]
b .L19
.L28:
ldr x0, [sp, 56]
ldr w0, [x0, 2512]
and w0, w0, 2
cmp w0, 0
beq .L20
ldr x0, [sp, 56]
ldr w0, [x0, 2512]
and w0, w0, 8
cmp w0, 0
beq .L21
adrp x0, fd
add x0, x0, :lo12:fd
ldr w3, [x0]
ldr w0, [sp, 52]
mov x2, x0
adrp x0, random_data
add x1, x0, :lo12:random_data
mov w0, w3
bl write
str w0, [sp, 48]
b .L22
.L21:
adrp x0, fd
add x0, x0, :lo12:fd
ldr w0, [x0]
ldr w1, [sp, 52]
mov x2, x1
ldr x1, [sp, 80]
bl read
str w0, [sp, 48]
b .L22
.L20:
adrp x0, seek_data
add x0, x0, :lo12:seek_data
ldr x1, [x0]
ldr w0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
uxtw x1, w0
ldr w0, [sp, 52]
mul x0, x1, x0
ldr x1, [sp, 72]
add x0, x1, x0
str x0, [sp, 88]
ldr x0, [sp, 56]
ldr w0, [x0, 2512]
and w0, w0, 8
cmp w0, 0
beq .L23
adrp x0, fd
add x0, x0, :lo12:fd
ldr w0, [x0]
ldr w1, [sp, 52]
ldr x3, [sp, 88]
mov x2, x1
ldr x1, [sp, 64]
bl pwrite64
str w0, [sp, 48]
b .L22
.L23:
adrp x0, fd
add x0, x0, :lo12:fd
ldr w0, [x0]
ldr w1, [sp, 52]
ldr x3, [sp, 88]
mov x2, x1
ldr x1, [sp, 80]
bl pread64
str w0, [sp, 48]
.L22:
ldr w1, [sp, 48]
ldr w0, [sp, 52]
cmp w1, w0
beq .L24
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl fail
.L24:
ldr x0, [sp, 56]
ldr x0, [x0, 2528]
cmp x0, 0
bne .L25
adrp x0, state_flag
add x0, x0, :lo12:state_flag
ldr w0, [x0]
cmp w0, 1
beq .L26
.L25:
ldr x0, [sp, 56]
ldr x1, [x0, 2560]
ldr w0, [sp, 48]
add x1, x1, x0
ldr x0, [sp, 56]
str x1, [x0, 2560]
ldr x0, [sp, 56]
ldr x0, [x0, 2568]
add x1, x0, 1
ldr x0, [sp, 56]
str x1, [x0, 2568]
.L26:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
adrp x0, seek_data_len
add x0, x0, :lo12:seek_data_len
ldr w1, [x0]
ldr w0, [sp, 44]
udiv w2, w0, w1
mul w1, w2, w1
sub w0, w0, w1
str w0, [sp, 44]
ldr x0, [sp, 64]
ldr x0, [x0]
add x1, x0, 1
ldr x0, [sp, 64]
str x1, [x0]
.L19:
adrp x0, state_flag
add x0, x0, :lo12:state_flag
ldr w0, [x0]
cmp w0, 0
beq .L27
ldr x0, [sp, 56]
ldr x0, [x0, 2528]
cmp x0, 0
beq .L28
ldr x0, [sp, 56]
ldr x1, [x0, 2560]
ldr x0, [sp, 56]
ldr x0, [x0, 2528]
cmp x1, x0
blt .L28
.L27:
ldr x0, [sp, 56]
ldr x0, [x0, 2528]
cmp x0, 0
beq .L29
adrp x0, fd
add x0, x0, :lo12:fd
ldr w0, [x0]
bl fsync
.L29:
bl get_timestamp
ldr x0, [sp, 56]
str d0, [x0, 2584]
ldr x0, [sp, 56]
mov w1, 1
str w1, [x0, 2592]
ldr x0, [sp, 80]
bl free
mov x0, 0
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size test_thread, .-test_thread
.align 2
.global collect_thread_stats
.type collect_thread_stats, %function
collect_thread_stats:
.LFB12:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, 12]
str wzr, [sp, 28]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
str xzr, [x0, 12808]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
str xzr, [x0, 12800]
str wzr, [sp, 24]
b .L32
.L37:
adrp x0, state
add x2, x0, :lo12:state
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr x1, [x0, 2560]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
ldr x0, [x0, 12800]
add x1, x1, x0
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
str x1, [x0, 12800]
adrp x0, state
add x2, x0, :lo12:state
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr x1, [x0, 2568]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
ldr x0, [x0, 12808]
add x1, x1, x0
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
str x1, [x0, 12808]
adrp x0, state
add x2, x0, :lo12:state
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr w0, [x0, 2592]
cmp w0, 0
bne .L33
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L33:
ldr w0, [sp, 24]
cmp w0, 0
beq .L34
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
ldr d1, [x0, 12816]
adrp x0, state
add x2, x0, :lo12:state
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr d0, [x0, 2576]
fcmpe d1, d0
bmi .L34
b .L35
.L34:
adrp x0, state
add x2, x0, :lo12:state
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr d0, [x0, 2576]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
str d0, [x0, 12816]
.L35:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L32:
ldr w1, [sp, 24]
ldr w0, [sp, 12]
cmp w1, w0
blt .L37
ldr w0, [sp, 28]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size collect_thread_stats, .-collect_thread_stats
.section .rodata
.align 3
.LC2:
.string "w"
.align 3
.LC3:
.string "/proc/sys/vm/drop_caches"
.align 3
.LC4:
.string "1\n"
.text
.align 2
.global drop_linux_vm_cache
.type drop_linux_vm_cache, %function
drop_linux_vm_cache:
.LFB13:
.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, .LC2
add x1, x0, :lo12:.LC2
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl fopen64
str x0, [sp, 24]
ldr x0, [sp, 24]
cmp x0, 0
beq .L41
ldr x3, [sp, 24]
mov x2, 2
mov x1, 1
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl fwrite
ldr x0, [sp, 24]
bl fclose
.L41:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size drop_linux_vm_cache, .-drop_linux_vm_cache
.section .rodata
.align 3
.LC5:
.string ""
.align 3
.LC6:
.string "OK \n"
.text
.align 2
.global perform_test
.type perform_test, %function
perform_test:
.LFB14:
.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 w2, [sp, 32]
str w3, [sp, 28]
str w4, [sp, 24]
str wzr, [sp, 64]
mov w0, 1
str w0, [sp, 68]
str xzr, [sp, 72]
ldr w0, [sp, 36]
and w0, w0, 8
cmp w0, 0
beq .L43
ldr w0, [sp, 36]
and w0, w0, 1
cmp w0, 0
beq .L44
mov w0, 4097
movk w0, 0x10, lsl 16
b .L45
.L44:
mov w0, 1537
.L45:
str w0, [sp, 64]
b .L46
.L43:
bl drop_linux_vm_cache
.L46:
ldr w0, [sp, 64]
orr w0, w0, 64
mov w2, 438
mov w1, w0
ldr x0, [sp, 40]
bl open64
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 .L47
ldr x0, [sp, 40]
bl fail
.L47:
ldrsw x0, [sp, 28]
lsl x1, x0, 30
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
str x1, [x0, 12760]
ldr w1, [sp, 32]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
str w1, [x0, 12776]
ldr w1, [sp, 36]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
str w1, [x0, 12752]
ldr w1, [sp, 24]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
str w1, [x0, 10248]
ldr w0, [sp, 36]
and w0, w0, 2
cmp w0, 0
beq .L48
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
ldr x0, [x0, 12760]
b .L49
.L48:
mov x0, 0
.L49:
adrp x1, state
add x1, x1, :lo12:state
add x1, x1, 655360
str x0, [x1, 12768]
ldr w0, [sp, 24]
cmp w0, 1
ble .L50
mov w0, 1
b .L51
.L50:
mov w0, 2
.L51:
adrp x1, state_flag
add x1, x1, :lo12:state_flag
str w0, [x1]
str wzr, [sp, 60]
b .L52
.L53:
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
adrp x1, state
add x1, x1, :lo12:state
add x0, x0, x1
add x0, x0, 12
bl mt_init
ldr w2, [sp, 60]
adrp x0, state
add x3, x0, :lo12:state
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x3, x0
str w2, [x0, 8]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
ldr x2, [x0, 12760]
adrp x0, state
add x3, x0, :lo12:state
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x3, x0
str x2, [x0, 2520]
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
ldr x1, [x0, 12768]
ldrsw x0, [sp, 24]
sdiv x2, x1, x0
adrp x0, state
add x3, x0, :lo12:state
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x3, x0
str x2, [x0, 2528]
adrp x0, state
add x2, x0, :lo12:state
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str xzr, [x0, 2568]
adrp x0, state
add x2, x0, :lo12:state
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str xzr, [x0, 2560]
ldr w2, [sp, 32]
adrp x0, state
add x3, x0, :lo12:state
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x3, x0
str w2, [x0, 2536]
ldr w2, [sp, 36]
adrp x0, state
add x3, x0, :lo12:state
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x3, x0
str w2, [x0, 2512]
adrp x0, state
add x2, x0, :lo12:state
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str wzr, [x0, 2592]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
adrp x1, state
add x1, x1, :lo12:state
add x4, x0, x1
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
adrp x1, state
add x1, x1, :lo12:state
add x0, x0, x1
mov x3, x0
adrp x0, test_thread
add x2, x0, :lo12:test_thread
mov x1, 0
mov x0, x4
bl pthread_create
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L52:
ldr w1, [sp, 60]
ldr w0, [sp, 24]
cmp w1, w0
blt .L53
adrp x0, state_flag
add x0, x0, :lo12:state_flag
ldr w0, [x0]
cmp w0, 1
bne .L54
mov w0, -3
str w0, [sp, 60]
b .L55
.L56:
ldr w0, [sp, 60]
scvtf d0, w0
adrp x0, .LC5
add x1, x0, :lo12:.LC5
adrp x0, state+665600
add x0, x0, :lo12:state+665600
bl print_status
mov w0, 1
bl sleep
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L55:
ldr w0, [sp, 60]
cmp w0, 0
blt .L56
adrp x0, state_flag
add x0, x0, :lo12:state_flag
mov w1, 2
str w1, [x0]
.L54:
bl get_timestamp
str d0, [sp, 88]
ldr d0, [sp, 88]
str d0, [sp, 80]
b .L57
.L60:
adrp x0, state
add x0, x0, :lo12:state
add x0, x0, 655360
ldr x0, [x0, 12768]
cmp x0, 0
bne .L58
ldr d1, [sp, 88]
ldr d0, [sp, 80]
fsub d1, d1, d0
adrp x0, run_time
add x0, x0, :lo12:run_time
ldr d0, [x0]
fcmpe d1, d0
bge .L64
b .L58
.L64:
ldr d0, [sp, 88]
str d0, [sp, 72]
adrp x0, state_flag
add x0, x0, :lo12:state_flag
str wzr, [x0]
.L58:
mov w0, 1
bl sleep
ldr w0, [sp, 24]
bl collect_thread_stats
str w0, [sp, 68]
ldr d1, [sp, 88]
ldr d0, [sp, 80]
fsub d0, d1, d0
adrp x0, .LC5
add x1, x0, :lo12:.LC5
adrp x0, state+665600
add x0, x0, :lo12:state+665600
bl print_status
bl get_timestamp
str d0, [sp, 88]
.L57:
ldr w0, [sp, 68]
cmp w0, 0
bgt .L60
ldr d0, [sp, 72]
fcmp d0, #0.0
bne .L61
adrp x0, state
add x0, x0, :lo12:state
ldr d0, [x0, 2584]
str d0, [sp, 72]
adrp x0, state
add x0, x0, :lo12:state
ldr d0, [x0, 2576]
str d0, [sp, 80]
.L61:
str wzr, [sp, 60]
b .L62
.L63:
adrp x0, state
add x2, x0, :lo12:state
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x1, x0, 6
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr x0, [x0]
mov x1, 0
bl pthread_join
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L62:
ldr w1, [sp, 60]
ldr w0, [sp, 24]
cmp w1, w0
blt .L63
ldr d1, [sp, 72]
ldr d0, [sp, 80]
fsub d0, d1, d0
adrp x0, .LC6
add x1, x0, :lo12:.LC6
adrp x0, state+665600
add x0, x0, :lo12:state+665600
bl print_status
adrp x0, fd
add x0, x0, :lo12:fd
ldr w0, [x0]
bl close
nop
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size perform_test, .-perform_test
.section .rodata
.align 3
.LC7:
.ascii "mozzio - Disk benchmark - http://mozzio.org\nOptions:\n -h "
.ascii " This help\n -p path Path to benchmark file o"
.ascii "r device (default: mozzio.bin)\n -b blcksize Block size in"
.ascii " kB (default: 4kB random"
.string ", 128kB sequential)\n -s filesize File/device size in GB (default: 10GB) (for seq write test)\n -r runtime Test run time in seconds (default: 30s (for all but seq write)\n -t threads Number of threads to use (default: 2 for seq, 128 for rand)\n %s\n"
.text
.align 2
.global print_help
.type print_help, %function
print_help:
.LFB15:
.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 x3, [x0]
ldr x2, [sp, 24]
adrp x0, .LC7
add x1, x0, :lo12:.LC7
mov x0, x3
bl fprintf
mov w0, 1
bl exit
.cfi_endproc
.LFE15:
.size print_help, .-print_help
.section .rodata
.align 3
.LC8:
.string "Memory allocation failure"
.text
.align 2
.global init_random_data
.type init_random_data, %function
init_random_data:
.LFB16:
.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, state+665612
add x0, x0, :lo12:state+665612
bl mt_init
str wzr, [sp, 36]
b .L67
.L68:
ldr w1, [sp, 36]
adrp x0, random_data
add x0, x0, :lo12:random_data
add x19, x1, x0
adrp x0, state+665612
add x0, x0, :lo12:state+665612
bl mt_random
str w0, [x19]
ldr w0, [sp, 36]
add w0, w0, 4
str w0, [sp, 36]
.L67:
ldr w1, [sp, 36]
mov w0, 262143
cmp w1, w0
bls .L68
adrp x0, seek_data_len
add x0, x0, :lo12:seek_data_len
ldr w0, [x0]
uxtw x0, w0
lsl x0, x0, 2
bl malloc
mov x1, x0
adrp x0, seek_data
add x0, x0, :lo12:seek_data
str x1, [x0]
adrp x0, seek_data
add x0, x0, :lo12:seek_data
ldr x0, [x0]
cmp x0, 0
bne .L69
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl fail
.L69:
str wzr, [sp, 36]
b .L70
.L71:
adrp x0, seek_data
add x0, x0, :lo12:seek_data
ldr x1, [x0]
ldr w0, [sp, 36]
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [sp, 36]
str w1, [x0]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L70:
adrp x0, seek_data_len
add x0, x0, :lo12:seek_data_len
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
bcc .L71
str wzr, [sp, 36]
b .L72
.L73:
adrp x0, state+665612
add x0, x0, :lo12:state+665612
bl mt_random
mov w1, w0
adrp x0, seek_data_len
add x0, x0, :lo12:seek_data_len
ldr w0, [x0]
udiv w2, w1, w0
mul w0, w2, w0
sub w0, w1, w0
str w0, [sp, 40]
adrp x0, seek_data
add x0, x0, :lo12:seek_data
ldr x1, [x0]
ldr w0, [sp, 40]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 44]
adrp x0, seek_data
add x0, x0, :lo12:seek_data
ldr x1, [x0]
ldr w0, [sp, 36]
lsl x0, x0, 2
add x1, x1, x0
adrp x0, seek_data
add x0, x0, :lo12:seek_data
ldr x2, [x0]
ldr w0, [sp, 40]
lsl x0, x0, 2
add x0, x2, x0
ldr w1, [x1]
str w1, [x0]
adrp x0, seek_data
add x0, x0, :lo12:seek_data
ldr x1, [x0]
ldr w0, [sp, 36]
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [sp, 44]
str w1, [x0]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L72:
adrp x0, seek_data_len
add x0, x0, :lo12:seek_data_len
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
bcc .L73
nop
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
.LFE16:
.size init_random_data, .-init_random_data
.section .rodata
.align 3
.LC9:
.string "mozzio.bin"
.align 3
.LC10:
.string "invalid block size in kB"
.align 3
.LC11:
.string "invalid file size in GB"
.align 3
.LC12:
.string "invalid run time in seconds"
.align 3
.LC13:
.string "cannot use -d and -p at the same time"
.align 3
.LC14:
.string "invalid number of threads"
.align 3
.LC15:
.string "p:d:b:s:r:w:t:h?"
.align 3
.LC16:
.string "0.4"
.align 3
.LC17:
.string "Starting mozzio v%s.\n(Numthreads: %d, Runtime: %ds, Filesize: %dG, Blocksize: %dK,%dK)\n"
.text
.align 2
.global main
.type main, %function
main:
.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 w0, [sp, 28]
str x1, [sp, 16]
adrp x0, .LC9
add x0, x0, :lo12:.LC9
str x0, [sp, 56]
str wzr, [sp, 32]
mov w0, 256
str w0, [sp, 36]
mov w0, 10
str w0, [sp, 40]
mov w0, 4
str w0, [sp, 44]
mov w0, 256
str w0, [sp, 48]
b .L75
.L90:
ldr w0, [sp, 52]
cmp w0, 116
beq .L76
ldr w0, [sp, 52]
cmp w0, 116
bgt .L77
ldr w0, [sp, 52]
cmp w0, 115
beq .L78
ldr w0, [sp, 52]
cmp w0, 115
bgt .L77
ldr w0, [sp, 52]
cmp w0, 114
beq .L79
ldr w0, [sp, 52]
cmp w0, 114
bgt .L77
ldr w0, [sp, 52]
cmp w0, 98
beq .L80
ldr w0, [sp, 52]
cmp w0, 112
beq .L81
b .L77
.L80:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
bl atoi
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
beq .L82
ldr w0, [sp, 44]
cmp w0, 1024
bls .L75
.L82:
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl print_help
b .L75
.L78:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
bl atoi
str w0, [sp, 40]
ldr w0, [sp, 40]
cmp w0, 0
bne .L75
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl print_help
b .L75
.L79:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
bl atoi
scvtf d0, w0
adrp x0, run_time
add x0, x0, :lo12:run_time
str d0, [x0]
adrp x0, run_time
add x0, x0, :lo12:run_time
ldr d0, [x0]
fcmpe d0, #0.0
bls .L92
b .L85
.L92:
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl print_help
.L85:
b .L75
.L81:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
bl strdup
str x0, [sp, 56]
ldr w0, [sp, 32]
and w0, w0, 32
cmp w0, 0
beq .L87
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl print_help
.L87:
ldr w0, [sp, 32]
orr w0, w0, 16
str w0, [sp, 32]
b .L75
.L76:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
bl atoi
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
beq .L88
ldr w0, [sp, 36]
cmp w0, 256
bls .L75
.L88:
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl print_help
b .L75
.L77:
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl print_help
.L75:
adrp x0, .LC15
add x2, x0, :lo12:.LC15
ldr x1, [sp, 16]
ldr w0, [sp, 28]
bl getopt
str w0, [sp, 52]
ldr w0, [sp, 52]
cmn w0, #1
bne .L90
ldr w0, [sp, 40]
lsl x1, x0, 20
ldr w0, [sp, 44]
sdiv x1, x1, x0
ldr w0, [sp, 36]
sdiv x0, x1, x0
mov w1, w0
adrp x0, seek_data_len
add x0, x0, :lo12:seek_data_len
str w1, [x0]
bl init_random_data
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x8, [x0]
adrp x0, run_time
add x0, x0, :lo12:run_time
ldr d0, [x0]
fcvtzs w0, d0
ldr w7, [sp, 44]
ldr w6, [sp, 48]
ldr w5, [sp, 40]
mov w4, w0
ldr w3, [sp, 36]
adrp x0, .LC16
add x2, x0, :lo12:.LC16
adrp x0, .LC17
add x1, x0, :lo12:.LC17
mov x0, x8
bl fprintf
bl print_status_header
ldr w1, [sp, 32]
mov w0, 10
orr w0, w1, w0
ldr w1, [sp, 48]
ldr w2, [sp, 40]
mov w4, 1
mov w3, w2
mov w2, w1
mov w1, w0
ldr x0, [sp, 56]
bl perform_test
ldr w0, [sp, 32]
orr w0, w0, 6
ldr w1, [sp, 48]
ldr w2, [sp, 40]
mov w4, 1
mov w3, w2
mov w2, w1
mov w1, w0
ldr x0, [sp, 56]
bl perform_test
ldr w1, [sp, 32]
mov w0, 9
orr w0, w1, w0
ldr w1, [sp, 44]
ldr w2, [sp, 40]
ldr w3, [sp, 36]
mov w4, w3
mov w3, w2
mov w2, w1
mov w1, w0
ldr x0, [sp, 56]
bl perform_test
ldr w1, [sp, 32]
mov w0, 5
orr w0, w1, w0
ldr w1, [sp, 44]
ldr w2, [sp, 40]
ldr w3, [sp, 36]
mov w4, w3
mov w3, w2
mov w2, w1
mov w1, w0
ldr x0, [sp, 56]
bl perform_test
mov w0, 0
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE17:
.size main, .-main
.section .rodata
.align 3
.LC18:
.string " Thrds Block/kB File/GB Time/sec Done/MB IOPS Byte rate Progress\n"
.text
.align 2
.global print_status_header
.type print_status_header, %function
print_status_header:
.LFB18:
.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:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 81
mov x1, 1
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl fwrite
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE18:
.size print_status_header, .-print_status_header
.section .rodata
.align 3
.LC19:
.string "Randm"
.align 3
.LC20:
.string "Seqn."
.align 3
.LC21:
.string "Write"
.align 3
.LC22:
.string "Read"
.align 3
.LC23:
.string "\r%-5s %-7s %-5u %-8u %-7jd %-8d %-7jd %-6jd %-6jdMB/s %5.1f%% %s"
.text
.align 2
.global print_status
.type print_status, %function
print_status:
.LFB19:
.cfi_startproc
sub sp, sp, #96
.cfi_def_cfa_offset 96
stp x29, x30, [sp, 32]
.cfi_offset 29, -64
.cfi_offset 30, -56
add x29, sp, 32
str x0, [sp, 72]
str x1, [sp, 64]
str d0, [sp, 56]
ldr x0, [sp, 72]
ldr x0, [x0, 2528]
cmp x0, 0
beq .L95
ldr x0, [sp, 72]
ldr d0, [x0, 2560]
scvtf d1, d0
ldr x0, [sp, 72]
ldr d0, [x0, 2528]
scvtf d0, d0
fdiv d0, d1, d0
str d0, [sp, 88]
b .L96
.L95:
adrp x0, run_time
add x0, x0, :lo12:run_time
ldr d0, [x0]
ldr d1, [sp, 56]
fdiv d0, d1, d0
str d0, [sp, 88]
.L96:
ldr d1, [sp, 88]
fmov d0, 1.0e+0
fcmpe d1, d0
bgt .L111
b .L115
.L111:
fmov d0, 1.0e+0
str d0, [sp, 88]
b .L99
.L115:
ldr d0, [sp, 88]
fcmpe d0, #0.0
bmi .L112
b .L99
.L112:
str xzr, [sp, 88]
.L99:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x8, [x0]
ldr x0, [sp, 72]
ldr w0, [x0, 2512]
and w0, w0, 1
cmp w0, 0
beq .L101
adrp x0, .LC19
add x0, x0, :lo12:.LC19
b .L102
.L101:
adrp x0, .LC20
add x0, x0, :lo12:.LC20
.L102:
ldr x1, [sp, 72]
ldr w1, [x1, 2512]
and w1, w1, 8
cmp w1, 0
beq .L103
adrp x1, .LC21
add x1, x1, :lo12:.LC21
b .L104
.L103:
adrp x1, .LC22
add x1, x1, :lo12:.LC22
.L104:
ldr x2, [sp, 72]
ldr w9, [x2, 8]
ldr x2, [sp, 72]
ldr w5, [x2, 2536]
ldr x2, [sp, 72]
ldr x2, [x2, 2520]
asr x6, x2, 30
ldr d0, [sp, 56]
fcvtzs w7, d0
ldr x2, [sp, 72]
ldr x2, [x2, 2560]
asr x3, x2, 20
ldr d0, [sp, 56]
fcmpe d0, #0.0
bgt .L113
b .L116
.L113:
ldr x2, [sp, 72]
ldr d0, [x2, 2568]
scvtf d1, d0
ldr d0, [sp, 56]
fdiv d0, d1, d0
fcvtzs d0, d0
b .L107
.L116:
fmov d0, xzr
.L107:
ldr d1, [sp, 56]
fcmpe d1, #0.0
bgt .L114
b .L117
.L114:
ldr x2, [sp, 72]
ldr d1, [x2, 2560]
scvtf d2, d1
ldr d1, [sp, 56]
fdiv d1, d2, d1
fcvtzs d1, d1
fmov x2, d1
asr x2, x2, 20
b .L110
.L117:
mov x2, 0
.L110:
ldr d1, [sp, 88]
mov x4, 4636737291354636288
fmov d2, x4
fmul d1, d1, d2
ldr x4, [sp, 64]
str x4, [sp, 24]
str x2, [sp, 16]
str d0, [sp, 8]
str x3, [sp]
fmov d0, d1
mov w4, w9
mov x3, x1
mov x2, x0
adrp x0, .LC23
add x1, x0, :lo12:.LC23
mov x0, x8
bl fprintf
nop
ldp x29, x30, [sp, 32]
add sp, sp, 96
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE19:
.size print_status, .-print_status
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Enter a number to check : "
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "%d is neither prime or composite."
.align 3
.LC3:
.string "%d is composite.\n"
.align 3
.LC4:
.string "%d is prime.\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
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, 40]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x0, sp, 32
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 32]
cmp w0, 1
bne .L2
ldr w0, [sp, 32]
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
.L2:
mov w0, 2
str w0, [sp, 36]
b .L3
.L6:
ldr w0, [sp, 32]
ldr w1, [sp, 36]
sdiv w2, w0, w1
ldr w1, [sp, 36]
mul w1, w2, w1
sub w0, w0, w1
cmp w0, 0
bne .L4
ldr w0, [sp, 32]
mov w1, w0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
b .L1
.L4:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L3:
ldr w0, [sp, 32]
ldr w1, [sp, 36]
cmp w1, w0
blt .L6
ldr w0, [sp, 32]
mov w1, w0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
mov w0, 0
mov w1, w0
.L1:
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 .L8
bl __stack_chk_fail
.L8:
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 J=%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
str w0, [sp, 24]
mov w0, 60
str w0, [sp, 28]
b .L2
.L3:
ldr w2, [sp, 28]
ldr w1, [sp, 24]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w0, [sp, 24]
add w0, w0, 3
str w0, [sp, 24]
ldr w0, [sp, 28]
sub w0, w0, #5
str w0, [sp, 28]
.L2:
ldr w0, [sp, 28]
cmp w0, 0
bge .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
.align 2
.type fiat_25519_addcarryx_u51, %function
fiat_25519_addcarryx_u51:
.LFB0:
.cfi_startproc
sub sp, sp, #80
.cfi_def_cfa_offset 80
str x0, [sp, 40]
str x1, [sp, 32]
strb w2, [sp, 31]
str x3, [sp, 16]
str x4, [sp, 8]
ldrb w1, [sp, 31]
ldr x0, [sp, 16]
add x0, x1, x0
ldr x1, [sp, 8]
add x0, x1, x0
str x0, [sp, 64]
ldr x0, [sp, 64]
and x0, x0, 2251799813685247
str x0, [sp, 72]
ldr x0, [sp, 64]
lsr x0, x0, 51
strb w0, [sp, 63]
ldr x0, [sp, 40]
ldr x1, [sp, 72]
str x1, [x0]
ldr x0, [sp, 32]
ldrb w1, [sp, 63]
strb w1, [x0]
nop
add sp, sp, 80
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size fiat_25519_addcarryx_u51, .-fiat_25519_addcarryx_u51
.align 2
.type fiat_25519_subborrowx_u51, %function
fiat_25519_subborrowx_u51:
.LFB1:
.cfi_startproc
sub sp, sp, #80
.cfi_def_cfa_offset 80
str x0, [sp, 40]
str x1, [sp, 32]
strb w2, [sp, 31]
str x3, [sp, 16]
str x4, [sp, 8]
ldrb w0, [sp, 31]
ldr x1, [sp, 16]
sub x0, x1, x0
mov x1, x0
ldr x0, [sp, 8]
sub x0, x1, x0
str x0, [sp, 64]
ldr x0, [sp, 64]
lsr x0, x0, 51
strb w0, [sp, 63]
ldr x0, [sp, 64]
and x0, x0, 2251799813685247
str x0, [sp, 72]
ldr x0, [sp, 40]
ldr x1, [sp, 72]
str x1, [x0]
ldrb w0, [sp, 63]
neg w0, w0
and w1, w0, 255
ldr x0, [sp, 32]
strb w1, [x0]
nop
add sp, sp, 80
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size fiat_25519_subborrowx_u51, .-fiat_25519_subborrowx_u51
.align 2
.type fiat_25519_cmovznz_u64, %function
fiat_25519_cmovznz_u64:
.LFB2:
.cfi_startproc
sub sp, sp, #64
.cfi_def_cfa_offset 64
str x0, [sp, 24]
strb w1, [sp, 23]
str x2, [sp, 8]
str x3, [sp]
ldrb w0, [sp, 23]
cmp w0, 0
cset w0, ne
and w0, w0, 255
strb w0, [sp, 47]
ldrb w0, [sp, 47]
neg w0, w0
and w0, w0, 255
sxtb w0, w0
sxtb x0, w0
str x0, [sp, 48]
ldr x1, [sp, 48]
ldr x0, [sp]
and x1, x1, x0
ldr x0, [sp, 48]
mvn x2, x0
ldr x0, [sp, 8]
and x0, x2, x0
orr x0, x1, x0
str x0, [sp, 56]
ldr x0, [sp, 24]
ldr x1, [sp, 56]
str x1, [x0]
nop
add sp, sp, 64
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size fiat_25519_cmovznz_u64, .-fiat_25519_cmovznz_u64
.align 2
.type fiat_25519_carry_mul, %function
fiat_25519_carry_mul:
.LFB3:
.cfi_startproc
sub sp, sp, #2336
.cfi_def_cfa_offset 2336
stp x19, x20, [sp]
stp x21, x22, [sp, 16]
stp x23, x24, [sp, 32]
stp x25, x26, [sp, 48]
str x27, [sp, 64]
.cfi_offset 19, -2336
.cfi_offset 20, -2328
.cfi_offset 21, -2320
.cfi_offset 22, -2312
.cfi_offset 23, -2304
.cfi_offset 24, -2296
.cfi_offset 25, -2288
.cfi_offset 26, -2280
.cfi_offset 27, -2272
str x0, [sp, 1640]
str x1, [sp, 1632]
str x2, [sp, 1624]
ldr x0, [sp, 1632]
add x0, x0, 32
ldr x0, [x0]
mov x6, x0
mov x7, 0
ldr x0, [sp, 1624]
add x0, x0, 32
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
mov x4, x0
mov x5, 0
mul x1, x6, x4
umulh x0, x6, x4
madd x0, x7, x4, x0
madd x0, x6, x5, x0
mov x22, x1
mov x23, x0
add x0, sp, 2048
stp x22, x23, [x0, -256]
ldr x0, [sp, 1632]
add x0, x0, 32
ldr x0, [x0]
mov x10, x0
mov x11, 0
ldr x0, [sp, 1624]
add x0, x0, 24
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
mov x8, x0
mov x9, 0
mul x1, x10, x8
umulh x0, x10, x8
madd x0, x11, x8, x0
madd x0, x10, x9, x0
str x1, [sp, 1088]
str x0, [sp, 1096]
add x0, sp, 1024
ldp x0, x1, [x0, 64]
add x2, sp, 2048
stp x0, x1, [x2, -240]
ldr x0, [sp, 1632]
add x0, x0, 32
ldr x0, [x0]
mov x14, x0
mov x15, 0
ldr x0, [sp, 1624]
add x0, x0, 16
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
mov x12, x0
mov x13, 0
mul x1, x14, x12
umulh x0, x14, x12
madd x0, x15, x12, x0
madd x0, x14, x13, x0
str x1, [sp, 1104]
str x0, [sp, 1112]
add x0, sp, 1024
ldp x0, x1, [x0, 80]
add x2, sp, 2048
stp x0, x1, [x2, -224]
ldr x0, [sp, 1632]
add x0, x0, 32
ldr x0, [x0]
mov x18, x0
mov x19, 0
ldr x0, [sp, 1624]
add x0, x0, 8
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
mov x16, x0
mov x17, 0
mul x1, x18, x16
umulh x0, x18, x16
madd x0, x19, x16, x0
madd x0, x18, x17, x0
str x1, [sp, 1120]
str x0, [sp, 1128]
add x0, sp, 1024
ldp x0, x1, [x0, 96]
add x2, sp, 2048
stp x0, x1, [x2, -208]
ldr x0, [sp, 1632]
add x0, x0, 24
ldr x0, [x0]
mov x24, x0
mov x25, 0
ldr x0, [sp, 1624]
add x0, x0, 32
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
mov x20, x0
mov x21, 0
mul x1, x24, x20
umulh x0, x24, x20
madd x0, x25, x20, x0
madd x0, x24, x21, x0
str x1, [sp, 1136]
str x0, [sp, 1144]
add x0, sp, 1024
ldp x0, x1, [x0, 112]
add x2, sp, 2048
stp x0, x1, [x2, -192]
ldr x0, [sp, 1632]
add x0, x0, 24
ldr x0, [x0]
str x0, [sp, 160]
str xzr, [sp, 168]
ldr x0, [sp, 1624]
add x0, x0, 24
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
mov x26, x0
mov x27, 0
ldp x2, x3, [sp, 160]
mov x0, x2
mul x1, x0, x26
mov x0, x2
umulh x0, x0, x26
mov x4, x3
madd x0, x4, x26, x0
madd x0, x2, x27, x0
str x1, [sp, 1152]
str x0, [sp, 1160]
add x0, sp, 1024
ldp x0, x1, [x0, 128]
add x2, sp, 2048
stp x0, x1, [x2, -176]
ldr x0, [sp, 1632]
add x0, x0, 24
ldr x0, [x0]
str x0, [sp, 176]
str xzr, [sp, 184]
ldr x0, [sp, 1624]
add x0, x0, 16
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
str x0, [sp, 192]
str xzr, [sp, 200]
ldp x4, x5, [sp, 176]
mov x0, x4
ldp x2, x3, [sp, 192]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1168]
str x0, [sp, 1176]
add x0, sp, 1024
ldp x0, x1, [x0, 144]
add x2, sp, 2048
stp x0, x1, [x2, -160]
ldr x0, [sp, 1632]
add x0, x0, 16
ldr x0, [x0]
str x0, [sp, 208]
str xzr, [sp, 216]
ldr x0, [sp, 1624]
add x0, x0, 32
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
str x0, [sp, 224]
str xzr, [sp, 232]
ldp x4, x5, [sp, 208]
mov x0, x4
ldp x2, x3, [sp, 224]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1184]
str x0, [sp, 1192]
add x0, sp, 1024
ldp x0, x1, [x0, 160]
add x2, sp, 2048
stp x0, x1, [x2, -144]
ldr x0, [sp, 1632]
add x0, x0, 16
ldr x0, [x0]
str x0, [sp, 240]
str xzr, [sp, 248]
ldr x0, [sp, 1624]
add x0, x0, 24
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
str x0, [sp, 256]
str xzr, [sp, 264]
ldp x4, x5, [sp, 240]
mov x0, x4
ldp x2, x3, [sp, 256]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1200]
str x0, [sp, 1208]
add x0, sp, 1024
ldp x0, x1, [x0, 176]
add x2, sp, 2048
stp x0, x1, [x2, -128]
ldr x0, [sp, 1632]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 272]
str xzr, [sp, 280]
ldr x0, [sp, 1624]
add x0, x0, 32
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
str x0, [sp, 288]
str xzr, [sp, 296]
ldp x4, x5, [sp, 272]
mov x0, x4
ldp x2, x3, [sp, 288]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1216]
str x0, [sp, 1224]
add x0, sp, 1024
ldp x0, x1, [x0, 192]
add x2, sp, 2048
stp x0, x1, [x2, -112]
ldr x0, [sp, 1632]
add x0, x0, 32
ldr x0, [x0]
str x0, [sp, 304]
str xzr, [sp, 312]
ldr x0, [sp, 1624]
ldr x0, [x0]
str x0, [sp, 320]
str xzr, [sp, 328]
ldp x4, x5, [sp, 304]
mov x0, x4
ldp x2, x3, [sp, 320]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1232]
str x0, [sp, 1240]
add x0, sp, 1024
ldp x0, x1, [x0, 208]
add x2, sp, 2048
stp x0, x1, [x2, -96]
ldr x0, [sp, 1632]
add x0, x0, 24
ldr x0, [x0]
str x0, [sp, 336]
str xzr, [sp, 344]
ldr x0, [sp, 1624]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 352]
str xzr, [sp, 360]
ldp x4, x5, [sp, 336]
mov x0, x4
ldp x2, x3, [sp, 352]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1248]
str x0, [sp, 1256]
add x0, sp, 1024
ldp x0, x1, [x0, 224]
add x2, sp, 2048
stp x0, x1, [x2, -80]
ldr x0, [sp, 1632]
add x0, x0, 24
ldr x0, [x0]
str x0, [sp, 368]
str xzr, [sp, 376]
ldr x0, [sp, 1624]
ldr x0, [x0]
str x0, [sp, 384]
str xzr, [sp, 392]
ldp x4, x5, [sp, 368]
mov x0, x4
ldp x2, x3, [sp, 384]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1264]
str x0, [sp, 1272]
add x0, sp, 1024
ldp x0, x1, [x0, 240]
add x2, sp, 2048
stp x0, x1, [x2, -64]
ldr x0, [sp, 1632]
add x0, x0, 16
ldr x0, [x0]
str x0, [sp, 400]
str xzr, [sp, 408]
ldr x0, [sp, 1624]
add x0, x0, 16
ldr x0, [x0]
str x0, [sp, 416]
str xzr, [sp, 424]
ldp x4, x5, [sp, 400]
mov x0, x4
ldp x2, x3, [sp, 416]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1280]
str x0, [sp, 1288]
add x0, sp, 1536
ldp x0, x1, [x0, -256]
add x2, sp, 2048
stp x0, x1, [x2, -48]
ldr x0, [sp, 1632]
add x0, x0, 16
ldr x0, [x0]
str x0, [sp, 432]
str xzr, [sp, 440]
ldr x0, [sp, 1624]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 448]
str xzr, [sp, 456]
ldp x4, x5, [sp, 432]
mov x0, x4
ldp x2, x3, [sp, 448]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1296]
str x0, [sp, 1304]
add x0, sp, 1536
ldp x0, x1, [x0, -240]
add x2, sp, 2048
stp x0, x1, [x2, -32]
ldr x0, [sp, 1632]
add x0, x0, 16
ldr x0, [x0]
str x0, [sp, 464]
str xzr, [sp, 472]
ldr x0, [sp, 1624]
ldr x0, [x0]
str x0, [sp, 480]
str xzr, [sp, 488]
ldp x4, x5, [sp, 464]
mov x0, x4
ldp x2, x3, [sp, 480]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1312]
str x0, [sp, 1320]
add x0, sp, 1536
ldp x0, x1, [x0, -224]
add x2, sp, 2048
stp x0, x1, [x2, -16]
ldr x0, [sp, 1632]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 496]
str xzr, [sp, 504]
ldr x0, [sp, 1624]
add x0, x0, 24
ldr x0, [x0]
str x0, [sp, 512]
str xzr, [sp, 520]
ldp x4, x5, [sp, 496]
mov x0, x4
add x1, sp, 512
ldp x2, x3, [x1]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1328]
str x0, [sp, 1336]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -208]
stp x0, x1, [x2]
ldr x0, [sp, 1632]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 528]
str xzr, [sp, 536]
ldr x0, [sp, 1624]
add x0, x0, 16
ldr x0, [x0]
str x0, [sp, 544]
str xzr, [sp, 552]
add x0, sp, 512
ldp x4, x5, [x0, 16]
mov x0, x4
add x1, sp, 512
ldp x2, x3, [x1, 32]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1344]
str x0, [sp, 1352]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -192]
stp x0, x1, [x2, 16]
ldr x0, [sp, 1632]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 560]
str xzr, [sp, 568]
ldr x0, [sp, 1624]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 576]
str xzr, [sp, 584]
add x0, sp, 512
ldp x4, x5, [x0, 48]
mov x0, x4
add x1, sp, 512
ldp x2, x3, [x1, 64]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1360]
str x0, [sp, 1368]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -176]
stp x0, x1, [x2, 32]
ldr x0, [sp, 1632]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 592]
str xzr, [sp, 600]
ldr x0, [sp, 1624]
ldr x0, [x0]
str x0, [sp, 608]
str xzr, [sp, 616]
add x0, sp, 512
ldp x4, x5, [x0, 80]
mov x0, x4
add x1, sp, 512
ldp x2, x3, [x1, 96]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1376]
str x0, [sp, 1384]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -160]
stp x0, x1, [x2, 48]
ldr x0, [sp, 1632]
ldr x0, [x0]
str x0, [sp, 624]
str xzr, [sp, 632]
ldr x0, [sp, 1624]
add x0, x0, 32
ldr x0, [x0]
str x0, [sp, 640]
str xzr, [sp, 648]
add x0, sp, 512
ldp x4, x5, [x0, 112]
mov x0, x4
add x1, sp, 512
ldp x2, x3, [x1, 128]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1392]
str x0, [sp, 1400]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -144]
stp x0, x1, [x2, 64]
ldr x0, [sp, 1632]
ldr x0, [x0]
str x0, [sp, 656]
str xzr, [sp, 664]
ldr x0, [sp, 1624]
add x0, x0, 24
ldr x0, [x0]
str x0, [sp, 672]
str xzr, [sp, 680]
add x0, sp, 512
ldp x4, x5, [x0, 144]
mov x0, x4
add x1, sp, 512
ldp x2, x3, [x1, 160]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1408]
str x0, [sp, 1416]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -128]
stp x0, x1, [x2, 80]
ldr x0, [sp, 1632]
ldr x0, [x0]
str x0, [sp, 688]
str xzr, [sp, 696]
ldr x0, [sp, 1624]
add x0, x0, 16
ldr x0, [x0]
str x0, [sp, 704]
str xzr, [sp, 712]
add x0, sp, 512
ldp x4, x5, [x0, 176]
mov x0, x4
add x1, sp, 512
ldp x2, x3, [x1, 192]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1424]
str x0, [sp, 1432]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -112]
stp x0, x1, [x2, 96]
ldr x0, [sp, 1632]
ldr x0, [x0]
str x0, [sp, 720]
str xzr, [sp, 728]
ldr x0, [sp, 1624]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 736]
str xzr, [sp, 744]
add x0, sp, 512
ldp x4, x5, [x0, 208]
mov x0, x4
add x1, sp, 512
ldp x2, x3, [x1, 224]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1440]
str x0, [sp, 1448]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -96]
stp x0, x1, [x2, 112]
ldr x0, [sp, 1632]
ldr x0, [x0]
str x0, [sp, 752]
str xzr, [sp, 760]
ldr x0, [sp, 1624]
ldr x0, [x0]
str x0, [sp, 768]
str xzr, [sp, 776]
add x0, sp, 512
ldp x4, x5, [x0, 240]
mov x0, x4
add x1, sp, 1024
ldp x2, x3, [x1, -256]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 1456]
str x0, [sp, 1464]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -80]
stp x0, x1, [x2, 128]
add x0, sp, 2048
ldp x0, x1, [x0, -160]
add x2, sp, 2048
ldp x2, x3, [x2, -208]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 784]
str x0, [sp, 792]
add x0, sp, 2048
ldp x0, x1, [x0, -128]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -240]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 800]
str x0, [sp, 808]
add x0, sp, 2048
ldp x0, x1, [x0, -112]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -224]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 816]
str x0, [sp, 824]
add x0, sp, 2048
ldp x0, x1, [x0, 128]
add x2, sp, 1024
ldp x4, x5, [x2, -208]
mov x2, x4
adds x3, x0, x2
mov x2, x5
adc x0, x1, x2
str x3, [sp, 1472]
str x0, [sp, 1480]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -64]
stp x0, x1, [x2, 144]
ldr x0, [sp, 2200]
lsl x1, x0, 13
ldr x0, [sp, 2192]
lsr x0, x0, 51
str x0, [sp, 80]
ldr x0, [sp, 80]
orr x0, x1, x0
str x0, [sp, 80]
ldr x0, [sp, 2200]
lsr x0, x0, 51
str x0, [sp, 88]
ldr x0, [sp, 80]
str x0, [sp, 1648]
ldr x0, [sp, 2192]
and x0, x0, 2251799813685247
str x0, [sp, 1656]
add x0, sp, 2048
ldp x0, x1, [x0, -80]
add x2, sp, 2048
ldp x2, x3, [x2, -96]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 832]
str x0, [sp, 840]
add x0, sp, 2048
ldp x0, x1, [x0, -48]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -192]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 848]
str x0, [sp, 856]
add x0, sp, 2048
ldp x0, x1, [x0]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -176]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 864]
str x0, [sp, 872]
add x0, sp, 2048
ldp x0, x1, [x0, 64]
add x2, sp, 1024
ldp x4, x5, [x2, -160]
mov x2, x4
adds x3, x0, x2
mov x2, x5
adc x0, x1, x2
str x3, [sp, 1488]
str x0, [sp, 1496]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -48]
stp x0, x1, [x2, 160]
add x0, sp, 2048
ldp x0, x1, [x0, -64]
add x2, sp, 2048
ldp x2, x3, [x2, -256]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 880]
str x0, [sp, 888]
add x0, sp, 2048
ldp x0, x1, [x0, -32]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -144]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 896]
str x0, [sp, 904]
add x0, sp, 2048
ldp x0, x1, [x0, 16]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -128]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 912]
str x0, [sp, 920]
add x0, sp, 2048
ldp x0, x1, [x0, 80]
add x2, sp, 1024
ldp x4, x5, [x2, -112]
mov x2, x4
adds x3, x0, x2
mov x2, x5
adc x0, x1, x2
str x3, [sp, 1504]
str x0, [sp, 1512]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -32]
stp x0, x1, [x2, 176]
add x0, sp, 2048
ldp x0, x1, [x0, -192]
add x2, sp, 2048
ldp x2, x3, [x2, -240]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 928]
str x0, [sp, 936]
add x0, sp, 2048
ldp x0, x1, [x0, -16]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -96]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 944]
str x0, [sp, 952]
add x0, sp, 2048
ldp x0, x1, [x0, 32]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -80]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 960]
str x0, [sp, 968]
add x0, sp, 2048
ldp x0, x1, [x0, 96]
add x2, sp, 1024
ldp x4, x5, [x2, -64]
mov x2, x4
adds x3, x0, x2
mov x2, x5
adc x0, x1, x2
str x3, [sp, 1520]
str x0, [sp, 1528]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, -16]
stp x0, x1, [x2, 192]
add x0, sp, 2048
ldp x0, x1, [x0, -176]
add x2, sp, 2048
ldp x2, x3, [x2, -224]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 976]
str x0, [sp, 984]
add x0, sp, 2048
ldp x0, x1, [x0, -144]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -48]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 992]
str x0, [sp, 1000]
add x0, sp, 2048
ldp x0, x1, [x0, 48]
mov x2, x0
add x3, sp, 1024
ldp x4, x5, [x3, -32]
mov x3, x4
adds x2, x3, x2
mov x0, x1
mov x1, x5
adc x0, x1, x0
str x2, [sp, 1008]
str x0, [sp, 1016]
add x0, sp, 2048
ldp x0, x1, [x0, 112]
add x2, sp, 1024
ldp x4, x5, [x2, -16]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 1536]
str x0, [sp, 1544]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0]
stp x0, x1, [x2, 208]
ldr x0, [sp, 1648]
str x0, [sp, 1024]
str xzr, [sp, 1032]
add x0, sp, 2048
ldp x0, x1, [x0, 208]
add x2, sp, 1024
ldp x4, x5, [x2]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 1552]
str x0, [sp, 1560]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, 16]
stp x0, x1, [x2, 224]
ldr x0, [sp, 2280]
lsl x0, x0, 13
ldr x1, [sp, 2272]
lsr x1, x1, 51
str x1, [sp, 96]
ldr x1, [sp, 96]
orr x0, x0, x1
str x0, [sp, 96]
ldr x0, [sp, 2280]
lsr x0, x0, 51
str x0, [sp, 104]
ldr x0, [sp, 96]
str x0, [sp, 1664]
ldr x0, [sp, 2272]
and x0, x0, 2251799813685247
str x0, [sp, 1672]
ldr x0, [sp, 1664]
str x0, [sp, 1040]
str xzr, [sp, 1048]
add x0, sp, 2048
ldp x0, x1, [x0, 192]
add x2, sp, 1024
ldp x4, x5, [x2, 16]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 1568]
str x0, [sp, 1576]
add x2, sp, 2048
add x0, sp, 1536
ldp x0, x1, [x0, 32]
stp x0, x1, [x2, 240]
ldr x0, [sp, 2296]
lsl x0, x0, 13
ldr x1, [sp, 2288]
lsr x1, x1, 51
str x1, [sp, 112]
ldr x1, [sp, 112]
orr x0, x0, x1
str x0, [sp, 112]
ldr x0, [sp, 2296]
lsr x0, x0, 51
str x0, [sp, 120]
ldr x0, [sp, 112]
str x0, [sp, 1680]
ldr x0, [sp, 2288]
and x0, x0, 2251799813685247
str x0, [sp, 1688]
ldr x0, [sp, 1680]
str x0, [sp, 1056]
str xzr, [sp, 1064]
add x0, sp, 2048
ldp x0, x1, [x0, 176]
add x2, sp, 1024
ldp x4, x5, [x2, 32]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 1584]
str x0, [sp, 1592]
add x2, sp, 2560
add x0, sp, 1536
ldp x0, x1, [x0, 48]
stp x0, x1, [x2, -256]
ldr x0, [sp, 2312]
lsl x0, x0, 13
ldr x1, [sp, 2304]
lsr x1, x1, 51
str x1, [sp, 128]
ldr x1, [sp, 128]
orr x0, x0, x1
str x0, [sp, 128]
ldr x0, [sp, 2312]
lsr x0, x0, 51
str x0, [sp, 136]
ldr x0, [sp, 128]
str x0, [sp, 1696]
ldr x0, [sp, 2304]
and x0, x0, 2251799813685247
str x0, [sp, 1704]
ldr x0, [sp, 1696]
str x0, [sp, 1072]
str xzr, [sp, 1080]
add x0, sp, 2048
ldp x0, x1, [x0, 160]
add x2, sp, 1024
ldp x4, x5, [x2, 48]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 1600]
str x0, [sp, 1608]
add x2, sp, 2560
add x0, sp, 1536
ldp x0, x1, [x0, 64]
stp x0, x1, [x2, -240]
ldr x0, [sp, 2328]
lsl x0, x0, 13
ldr x1, [sp, 2320]
lsr x1, x1, 51
str x1, [sp, 144]
ldr x1, [sp, 144]
orr x0, x0, x1
str x0, [sp, 144]
ldr x0, [sp, 2328]
lsr x0, x0, 51
str x0, [sp, 152]
ldr x0, [sp, 144]
str x0, [sp, 1712]
ldr x0, [sp, 2320]
and x0, x0, 2251799813685247
str x0, [sp, 1720]
ldr x1, [sp, 1712]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
str x0, [sp, 1728]
ldr x1, [sp, 1656]
ldr x0, [sp, 1728]
add x0, x1, x0
str x0, [sp, 1736]
ldr x0, [sp, 1736]
lsr x0, x0, 51
str x0, [sp, 1744]
ldr x0, [sp, 1736]
and x0, x0, 2251799813685247
str x0, [sp, 1752]
ldr x1, [sp, 1744]
ldr x0, [sp, 1672]
add x0, x1, x0
str x0, [sp, 1760]
ldr x0, [sp, 1760]
lsr x0, x0, 51
str x0, [sp, 1768]
ldr x0, [sp, 1760]
and x0, x0, 2251799813685247
str x0, [sp, 1776]
ldr x1, [sp, 1768]
ldr x0, [sp, 1688]
add x0, x1, x0
str x0, [sp, 1784]
ldr x0, [sp, 1640]
ldr x1, [sp, 1752]
str x1, [x0]
ldr x0, [sp, 1640]
add x0, x0, 8
ldr x1, [sp, 1776]
str x1, [x0]
ldr x0, [sp, 1640]
add x0, x0, 16
ldr x1, [sp, 1784]
str x1, [x0]
ldr x0, [sp, 1640]
add x0, x0, 24
ldr x1, [sp, 1704]
str x1, [x0]
ldr x0, [sp, 1640]
add x0, x0, 32
ldr x1, [sp, 1720]
str x1, [x0]
nop
ldp x19, x20, [sp]
ldp x21, x22, [sp, 16]
ldp x23, x24, [sp, 32]
ldp x25, x26, [sp, 48]
ldr x27, [sp, 64]
add sp, sp, 2336
.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_offset 0
ret
.cfi_endproc
.LFE3:
.size fiat_25519_carry_mul, .-fiat_25519_carry_mul
.align 2
.type fiat_25519_carry_square, %function
fiat_25519_carry_square:
.LFB4:
.cfi_startproc
sub sp, sp, #1568
.cfi_def_cfa_offset 1568
stp x19, x20, [sp]
stp x21, x22, [sp, 16]
stp x23, x24, [sp, 32]
stp x25, x26, [sp, 48]
str x27, [sp, 64]
.cfi_offset 19, -1568
.cfi_offset 20, -1560
.cfi_offset 21, -1552
.cfi_offset 22, -1544
.cfi_offset 23, -1536
.cfi_offset 24, -1528
.cfi_offset 25, -1520
.cfi_offset 26, -1512
.cfi_offset 27, -1504
str x0, [sp, 968]
str x1, [sp, 960]
ldr x0, [sp, 960]
add x0, x0, 32
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
str x0, [sp, 976]
ldr x0, [sp, 976]
lsl x0, x0, 1
str x0, [sp, 984]
ldr x0, [sp, 960]
add x0, x0, 32
ldr x0, [x0]
lsl x0, x0, 1
str x0, [sp, 992]
ldr x0, [sp, 960]
add x0, x0, 24
ldr x1, [x0]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
str x0, [sp, 1000]
ldr x0, [sp, 1000]
lsl x0, x0, 1
str x0, [sp, 1008]
ldr x0, [sp, 960]
add x0, x0, 24
ldr x0, [x0]
lsl x0, x0, 1
str x0, [sp, 1016]
ldr x0, [sp, 960]
add x0, x0, 16
ldr x0, [x0]
lsl x0, x0, 1
str x0, [sp, 1024]
ldr x0, [sp, 960]
add x0, x0, 8
ldr x0, [x0]
lsl x0, x0, 1
str x0, [sp, 1032]
ldr x0, [sp, 960]
add x0, x0, 32
ldr x0, [x0]
mov x4, x0
mov x5, 0
ldr x0, [sp, 976]
mov x2, x0
mov x3, 0
mul x1, x4, x2
umulh x0, x4, x2
madd x0, x5, x2, x0
madd x0, x4, x3, x0
str x1, [sp, 576]
str x0, [sp, 584]
add x0, sp, 512
ldp x0, x1, [x0, 64]
add x2, sp, 1024
stp x0, x1, [x2, 160]
ldr x0, [sp, 960]
add x0, x0, 24
ldr x0, [x0]
mov x8, x0
mov x9, 0
ldr x0, [sp, 984]
mov x6, x0
mov x7, 0
mul x1, x8, x6
umulh x0, x8, x6
madd x0, x9, x6, x0
madd x0, x8, x7, x0
str x1, [sp, 592]
str x0, [sp, 600]
add x0, sp, 512
ldp x0, x1, [x0, 80]
add x2, sp, 1024
stp x0, x1, [x2, 176]
ldr x0, [sp, 960]
add x0, x0, 24
ldr x0, [x0]
mov x12, x0
mov x13, 0
ldr x0, [sp, 1000]
mov x10, x0
mov x11, 0
mul x1, x12, x10
umulh x0, x12, x10
madd x0, x13, x10, x0
madd x0, x12, x11, x0
str x1, [sp, 608]
str x0, [sp, 616]
add x0, sp, 512
ldp x0, x1, [x0, 96]
add x2, sp, 1024
stp x0, x1, [x2, 192]
ldr x0, [sp, 960]
add x0, x0, 16
ldr x0, [x0]
mov x16, x0
mov x17, 0
ldr x0, [sp, 984]
mov x14, x0
mov x15, 0
mul x1, x16, x14
umulh x0, x16, x14
madd x0, x17, x14, x0
madd x0, x16, x15, x0
str x1, [sp, 624]
str x0, [sp, 632]
add x0, sp, 512
ldp x0, x1, [x0, 112]
add x2, sp, 1024
stp x0, x1, [x2, 208]
ldr x0, [sp, 960]
add x0, x0, 16
ldr x0, [x0]
mov x20, x0
mov x21, 0
ldr x0, [sp, 1008]
mov x18, x0
mov x19, 0
mul x1, x20, x18
umulh x0, x20, x18
madd x0, x21, x18, x0
madd x0, x20, x19, x0
str x1, [sp, 640]
str x0, [sp, 648]
add x0, sp, 512
ldp x0, x1, [x0, 128]
add x2, sp, 1024
stp x0, x1, [x2, 224]
ldr x0, [sp, 960]
add x0, x0, 16
ldr x0, [x0]
mov x24, x0
mov x25, 0
ldr x0, [sp, 960]
add x0, x0, 16
ldr x0, [x0]
mov x22, x0
mov x23, 0
mul x1, x24, x22
umulh x0, x24, x22
madd x0, x25, x22, x0
madd x0, x24, x23, x0
str x1, [sp, 656]
str x0, [sp, 664]
add x0, sp, 512
ldp x0, x1, [x0, 144]
add x2, sp, 1024
stp x0, x1, [x2, 240]
ldr x0, [sp, 960]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 160]
str xzr, [sp, 168]
ldr x0, [sp, 984]
mov x26, x0
mov x27, 0
ldp x2, x3, [sp, 160]
mov x0, x2
mul x1, x0, x26
mov x0, x2
umulh x0, x0, x26
mov x4, x3
madd x0, x4, x26, x0
madd x0, x2, x27, x0
str x1, [sp, 672]
str x0, [sp, 680]
add x0, sp, 512
ldp x0, x1, [x0, 160]
add x2, sp, 1536
stp x0, x1, [x2, -256]
ldr x0, [sp, 960]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 176]
str xzr, [sp, 184]
ldr x0, [sp, 1016]
str x0, [sp, 192]
str xzr, [sp, 200]
ldp x4, x5, [sp, 176]
mov x0, x4
ldp x2, x3, [sp, 192]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 688]
str x0, [sp, 696]
add x0, sp, 512
ldp x0, x1, [x0, 176]
add x2, sp, 1536
stp x0, x1, [x2, -240]
ldr x0, [sp, 960]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 208]
str xzr, [sp, 216]
ldr x0, [sp, 1024]
str x0, [sp, 224]
str xzr, [sp, 232]
ldp x4, x5, [sp, 208]
mov x0, x4
ldp x2, x3, [sp, 224]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 704]
str x0, [sp, 712]
add x0, sp, 512
ldp x0, x1, [x0, 192]
add x2, sp, 1536
stp x0, x1, [x2, -224]
ldr x0, [sp, 960]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 240]
str xzr, [sp, 248]
ldr x0, [sp, 960]
add x0, x0, 8
ldr x0, [x0]
str x0, [sp, 256]
str xzr, [sp, 264]
ldp x4, x5, [sp, 240]
mov x0, x4
ldp x2, x3, [sp, 256]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 720]
str x0, [sp, 728]
add x0, sp, 512
ldp x0, x1, [x0, 208]
add x2, sp, 1536
stp x0, x1, [x2, -208]
ldr x0, [sp, 960]
ldr x0, [x0]
str x0, [sp, 272]
str xzr, [sp, 280]
ldr x0, [sp, 992]
str x0, [sp, 288]
str xzr, [sp, 296]
ldp x4, x5, [sp, 272]
mov x0, x4
ldp x2, x3, [sp, 288]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 736]
str x0, [sp, 744]
add x0, sp, 512
ldp x0, x1, [x0, 224]
add x2, sp, 1536
stp x0, x1, [x2, -192]
ldr x0, [sp, 960]
ldr x0, [x0]
str x0, [sp, 304]
str xzr, [sp, 312]
ldr x0, [sp, 1016]
str x0, [sp, 320]
str xzr, [sp, 328]
ldp x4, x5, [sp, 304]
mov x0, x4
ldp x2, x3, [sp, 320]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 752]
str x0, [sp, 760]
add x0, sp, 512
ldp x0, x1, [x0, 240]
add x2, sp, 1536
stp x0, x1, [x2, -176]
ldr x0, [sp, 960]
ldr x0, [x0]
str x0, [sp, 336]
str xzr, [sp, 344]
ldr x0, [sp, 1024]
str x0, [sp, 352]
str xzr, [sp, 360]
ldp x4, x5, [sp, 336]
mov x0, x4
ldp x2, x3, [sp, 352]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 768]
str x0, [sp, 776]
add x0, sp, 1024
ldp x0, x1, [x0, -256]
add x2, sp, 1536
stp x0, x1, [x2, -160]
ldr x0, [sp, 960]
ldr x0, [x0]
str x0, [sp, 368]
str xzr, [sp, 376]
ldr x0, [sp, 1032]
str x0, [sp, 384]
str xzr, [sp, 392]
ldp x4, x5, [sp, 368]
mov x0, x4
ldp x2, x3, [sp, 384]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 784]
str x0, [sp, 792]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -240]
stp x0, x1, [x2]
ldr x0, [sp, 960]
ldr x0, [x0]
str x0, [sp, 400]
str xzr, [sp, 408]
ldr x0, [sp, 960]
ldr x0, [x0]
str x0, [sp, 416]
str xzr, [sp, 424]
ldp x4, x5, [sp, 400]
mov x0, x4
ldp x2, x3, [sp, 416]
mov x1, x2
mul x1, x0, x1
mov x0, x4
mov x6, x2
umulh x0, x0, x6
mov x6, x5
mov x7, x2
madd x0, x6, x7, x0
mov x2, x3
madd x0, x4, x2, x0
str x1, [sp, 800]
str x0, [sp, 808]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -224]
stp x0, x1, [x2, 16]
add x0, sp, 1536
ldp x0, x1, [x0, -256]
add x2, sp, 1024
ldp x2, x3, [x2, 224]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 432]
str x0, [sp, 440]
add x0, sp, 1392
ldp x0, x1, [x0, 16]
ldp x4, x5, [sp, 432]
mov x2, x4
adds x3, x0, x2
mov x2, x5
adc x0, x1, x2
str x3, [sp, 816]
str x0, [sp, 824]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -208]
stp x0, x1, [x2, 32]
ldr x0, [sp, 1432]
lsl x1, x0, 13
ldr x0, [sp, 1424]
lsr x0, x0, 51
str x0, [sp, 80]
ldr x0, [sp, 80]
orr x0, x1, x0
str x0, [sp, 80]
ldr x0, [sp, 1432]
lsr x0, x0, 51
str x0, [sp, 88]
ldr x0, [sp, 80]
str x0, [sp, 1040]
ldr x0, [sp, 1424]
and x0, x0, 2251799813685247
str x0, [sp, 1048]
add x0, sp, 1536
ldp x0, x1, [x0, -240]
add x2, sp, 1024
ldp x2, x3, [x2, 240]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 448]
str x0, [sp, 456]
add x0, sp, 1536
ldp x0, x1, [x0, -192]
ldp x4, x5, [sp, 448]
mov x2, x4
adds x3, x0, x2
mov x2, x5
adc x0, x1, x2
str x3, [sp, 832]
str x0, [sp, 840]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -192]
stp x0, x1, [x2, 48]
add x0, sp, 1536
ldp x0, x1, [x0, -224]
add x2, sp, 1024
ldp x2, x3, [x2, 160]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 464]
str x0, [sp, 472]
add x0, sp, 1536
ldp x0, x1, [x0, -176]
ldp x4, x5, [sp, 464]
mov x2, x4
adds x3, x0, x2
mov x2, x5
adc x0, x1, x2
str x3, [sp, 848]
str x0, [sp, 856]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -176]
stp x0, x1, [x2, 64]
add x0, sp, 1536
ldp x0, x1, [x0, -208]
add x2, sp, 1024
ldp x2, x3, [x2, 176]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 480]
str x0, [sp, 488]
add x0, sp, 1536
ldp x0, x1, [x0, -160]
ldp x4, x5, [sp, 480]
mov x2, x4
adds x3, x0, x2
mov x2, x5
adc x0, x1, x2
str x3, [sp, 864]
str x0, [sp, 872]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -160]
stp x0, x1, [x2, 80]
add x0, sp, 1024
ldp x0, x1, [x0, 208]
add x2, sp, 1024
ldp x2, x3, [x2, 192]
mov x4, x2
adds x4, x0, x4
mov x2, x3
adc x0, x1, x2
str x4, [sp, 496]
str x0, [sp, 504]
add x0, sp, 1392
ldp x0, x1, [x0]
ldp x4, x5, [sp, 496]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 880]
str x0, [sp, 888]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -144]
stp x0, x1, [x2, 96]
ldr x0, [sp, 1040]
str x0, [sp, 512]
str xzr, [sp, 520]
add x0, sp, 1392
ldp x0, x1, [x0, 96]
add x2, sp, 512
ldp x4, x5, [x2]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 896]
str x0, [sp, 904]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -128]
stp x0, x1, [x2, 112]
ldr x0, [sp, 1512]
lsl x0, x0, 13
ldr x1, [sp, 1504]
lsr x1, x1, 51
str x1, [sp, 96]
ldr x1, [sp, 96]
orr x0, x0, x1
str x0, [sp, 96]
ldr x0, [sp, 1512]
lsr x0, x0, 51
str x0, [sp, 104]
ldr x0, [sp, 96]
str x0, [sp, 1056]
ldr x0, [sp, 1504]
and x0, x0, 2251799813685247
str x0, [sp, 1064]
ldr x0, [sp, 1056]
str x0, [sp, 528]
str xzr, [sp, 536]
add x0, sp, 1392
ldp x0, x1, [x0, 80]
add x2, sp, 512
ldp x4, x5, [x2, 16]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 912]
str x0, [sp, 920]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -112]
stp x0, x1, [x2, 128]
ldr x0, [sp, 1528]
lsl x0, x0, 13
ldr x1, [sp, 1520]
lsr x1, x1, 51
str x1, [sp, 112]
ldr x1, [sp, 112]
orr x0, x0, x1
str x0, [sp, 112]
ldr x0, [sp, 1528]
lsr x0, x0, 51
str x0, [sp, 120]
ldr x0, [sp, 112]
str x0, [sp, 1072]
ldr x0, [sp, 1520]
and x0, x0, 2251799813685247
str x0, [sp, 1080]
ldr x0, [sp, 1072]
str x0, [sp, 544]
str xzr, [sp, 552]
add x0, sp, 1392
ldp x0, x1, [x0, 64]
add x2, sp, 512
ldp x4, x5, [x2, 32]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 928]
str x0, [sp, 936]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -96]
stp x0, x1, [x2, 144]
ldr x0, [sp, 1544]
lsl x0, x0, 13
ldr x1, [sp, 1536]
lsr x1, x1, 51
str x1, [sp, 128]
ldr x1, [sp, 128]
orr x0, x0, x1
str x0, [sp, 128]
ldr x0, [sp, 1544]
lsr x0, x0, 51
str x0, [sp, 136]
ldr x0, [sp, 128]
str x0, [sp, 1088]
ldr x0, [sp, 1536]
and x0, x0, 2251799813685247
str x0, [sp, 1096]
ldr x0, [sp, 1088]
str x0, [sp, 560]
str xzr, [sp, 568]
add x0, sp, 1392
ldp x0, x1, [x0, 48]
add x2, sp, 512
ldp x4, x5, [x2, 48]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 944]
str x0, [sp, 952]
add x2, sp, 1392
add x0, sp, 1024
ldp x0, x1, [x0, -80]
stp x0, x1, [x2, 160]
ldr x0, [sp, 1560]
lsl x0, x0, 13
ldr x1, [sp, 1552]
lsr x1, x1, 51
str x1, [sp, 144]
ldr x1, [sp, 144]
orr x0, x0, x1
str x0, [sp, 144]
ldr x0, [sp, 1560]
lsr x0, x0, 51
str x0, [sp, 152]
ldr x0, [sp, 144]
str x0, [sp, 1104]
ldr x0, [sp, 1552]
and x0, x0, 2251799813685247
str x0, [sp, 1112]
ldr x1, [sp, 1104]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
str x0, [sp, 1120]
ldr x1, [sp, 1048]
ldr x0, [sp, 1120]
add x0, x1, x0
str x0, [sp, 1128]
ldr x0, [sp, 1128]
lsr x0, x0, 51
str x0, [sp, 1136]
ldr x0, [sp, 1128]
and x0, x0, 2251799813685247
str x0, [sp, 1144]
ldr x1, [sp, 1136]
ldr x0, [sp, 1064]
add x0, x1, x0
str x0, [sp, 1152]
ldr x0, [sp, 1152]
lsr x0, x0, 51
str x0, [sp, 1160]
ldr x0, [sp, 1152]
and x0, x0, 2251799813685247
str x0, [sp, 1168]
ldr x1, [sp, 1160]
ldr x0, [sp, 1080]
add x0, x1, x0
str x0, [sp, 1176]
ldr x0, [sp, 968]
ldr x1, [sp, 1144]
str x1, [x0]
ldr x0, [sp, 968]
add x0, x0, 8
ldr x1, [sp, 1168]
str x1, [x0]
ldr x0, [sp, 968]
add x0, x0, 16
ldr x1, [sp, 1176]
str x1, [x0]
ldr x0, [sp, 968]
add x0, x0, 24
ldr x1, [sp, 1096]
str x1, [x0]
ldr x0, [sp, 968]
add x0, x0, 32
ldr x1, [sp, 1112]
str x1, [x0]
nop
ldp x19, x20, [sp]
ldp x21, x22, [sp, 16]
ldp x23, x24, [sp, 32]
ldp x25, x26, [sp, 48]
ldr x27, [sp, 64]
add sp, sp, 1568
.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_offset 0
ret
.cfi_endproc
.LFE4:
.size fiat_25519_carry_square, .-fiat_25519_carry_square
.align 2
.type fiat_25519_carry_scmul_121666, %function
fiat_25519_carry_scmul_121666:
.LFB5:
.cfi_startproc
sub sp, sp, #560
.cfi_def_cfa_offset 560
stp x19, x20, [sp]
stp x21, x22, [sp, 16]
stp x23, x24, [sp, 32]
stp x25, x26, [sp, 48]
str x27, [sp, 64]
.cfi_offset 19, -560
.cfi_offset 20, -552
.cfi_offset 21, -544
.cfi_offset 22, -536
.cfi_offset 23, -528
.cfi_offset 24, -520
.cfi_offset 25, -512
.cfi_offset 26, -504
.cfi_offset 27, -496
str x0, [sp, 264]
str x1, [sp, 256]
ldr x0, [sp, 256]
add x0, x0, 32
ldr x0, [x0]
mov x4, x0
mov x5, 0
mov x0, 56130
movk x0, 0x1, lsl 16
mov x1, 0
mul x3, x4, x0
umulh x2, x4, x0
madd x2, x5, x0, x2
madd x2, x4, x1, x2
mov x24, x3
mov x25, x2
stp x24, x25, [sp, 416]
ldr x0, [sp, 256]
add x0, x0, 24
ldr x0, [x0]
mov x6, x0
mov x7, 0
mov x0, 56130
movk x0, 0x1, lsl 16
mov x1, 0
mul x3, x6, x0
umulh x2, x6, x0
madd x2, x7, x0, x2
madd x2, x6, x1, x2
mov x26, x3
mov x27, x2
stp x26, x27, [sp, 432]
ldr x0, [sp, 256]
add x0, x0, 16
ldr x0, [x0]
mov x8, x0
mov x9, 0
mov x0, 56130
movk x0, 0x1, lsl 16
mov x1, 0
mul x3, x8, x0
umulh x2, x8, x0
madd x2, x9, x0, x2
madd x2, x8, x1, x2
str x3, [sp, 144]
str x2, [sp, 152]
ldp x0, x1, [sp, 144]
stp x0, x1, [sp, 448]
ldr x0, [sp, 256]
add x0, x0, 8
ldr x0, [x0]
mov x10, x0
mov x11, 0
mov x0, 56130
movk x0, 0x1, lsl 16
mov x1, 0
mul x3, x10, x0
umulh x2, x10, x0
madd x2, x11, x0, x2
madd x2, x10, x1, x2
str x3, [sp, 160]
str x2, [sp, 168]
ldp x0, x1, [sp, 160]
stp x0, x1, [sp, 464]
ldr x0, [sp, 256]
ldr x0, [x0]
mov x12, x0
mov x13, 0
mov x0, 56130
movk x0, 0x1, lsl 16
mov x1, 0
mul x3, x12, x0
umulh x2, x12, x0
madd x2, x13, x0, x2
madd x2, x12, x1, x2
str x3, [sp, 176]
str x2, [sp, 184]
ldp x0, x1, [sp, 176]
stp x0, x1, [sp, 480]
ldr x0, [sp, 488]
lsl x0, x0, 13
ldr x1, [sp, 480]
lsr x22, x1, 51
orr x22, x0, x22
ldr x0, [sp, 488]
lsr x23, x0, 51
mov x0, x22
str x0, [sp, 272]
ldr x0, [sp, 480]
and x0, x0, 2251799813685247
str x0, [sp, 280]
ldr x0, [sp, 272]
str x0, [sp, 80]
str xzr, [sp, 88]
ldp x0, x1, [sp, 464]
ldp x4, x5, [sp, 80]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 192]
str x0, [sp, 200]
ldp x0, x1, [sp, 192]
stp x0, x1, [sp, 496]
ldr x0, [sp, 504]
lsl x0, x0, 13
ldr x1, [sp, 496]
lsr x20, x1, 51
orr x20, x0, x20
ldr x0, [sp, 504]
lsr x21, x0, 51
mov x0, x20
str x0, [sp, 288]
ldr x0, [sp, 496]
and x0, x0, 2251799813685247
str x0, [sp, 296]
ldr x0, [sp, 288]
str x0, [sp, 96]
str xzr, [sp, 104]
ldp x0, x1, [sp, 448]
ldp x4, x5, [sp, 96]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 208]
str x0, [sp, 216]
ldp x0, x1, [sp, 208]
add x2, sp, 512
stp x0, x1, [x2]
ldr x0, [sp, 520]
lsl x0, x0, 13
ldr x1, [sp, 512]
lsr x18, x1, 51
orr x18, x0, x18
ldr x0, [sp, 520]
lsr x19, x0, 51
mov x0, x18
str x0, [sp, 304]
ldr x0, [sp, 512]
and x0, x0, 2251799813685247
str x0, [sp, 312]
ldr x0, [sp, 304]
str x0, [sp, 112]
str xzr, [sp, 120]
ldp x0, x1, [sp, 432]
ldp x4, x5, [sp, 112]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 224]
str x0, [sp, 232]
ldp x0, x1, [sp, 224]
add x2, sp, 512
stp x0, x1, [x2, 16]
ldr x0, [sp, 536]
lsl x0, x0, 13
ldr x1, [sp, 528]
lsr x16, x1, 51
orr x16, x0, x16
ldr x0, [sp, 536]
lsr x17, x0, 51
mov x0, x16
str x0, [sp, 320]
ldr x0, [sp, 528]
and x0, x0, 2251799813685247
str x0, [sp, 328]
ldr x0, [sp, 320]
str x0, [sp, 128]
str xzr, [sp, 136]
ldp x0, x1, [sp, 416]
ldp x4, x5, [sp, 128]
mov x2, x4
adds x2, x0, x2
mov x3, x5
adc x0, x1, x3
str x2, [sp, 240]
str x0, [sp, 248]
ldp x0, x1, [sp, 240]
add x2, sp, 512
stp x0, x1, [x2, 32]
ldr x0, [sp, 552]
lsl x0, x0, 13
ldr x1, [sp, 544]
lsr x14, x1, 51
orr x14, x0, x14
ldr x0, [sp, 552]
lsr x15, x0, 51
mov x0, x14
str x0, [sp, 336]
ldr x0, [sp, 544]
and x0, x0, 2251799813685247
str x0, [sp, 344]
ldr x1, [sp, 336]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
str x0, [sp, 352]
ldr x1, [sp, 280]
ldr x0, [sp, 352]
add x0, x1, x0
str x0, [sp, 360]
ldr x0, [sp, 360]
lsr x0, x0, 51
str x0, [sp, 368]
ldr x0, [sp, 360]
and x0, x0, 2251799813685247
str x0, [sp, 376]
ldr x1, [sp, 368]
ldr x0, [sp, 296]
add x0, x1, x0
str x0, [sp, 384]
ldr x0, [sp, 384]
lsr x0, x0, 51
str x0, [sp, 392]
ldr x0, [sp, 384]
and x0, x0, 2251799813685247
str x0, [sp, 400]
ldr x1, [sp, 392]
ldr x0, [sp, 312]
add x0, x1, x0
str x0, [sp, 408]
ldr x0, [sp, 264]
ldr x1, [sp, 376]
str x1, [x0]
ldr x0, [sp, 264]
add x0, x0, 8
ldr x1, [sp, 400]
str x1, [x0]
ldr x0, [sp, 264]
add x0, x0, 16
ldr x1, [sp, 408]
str x1, [x0]
ldr x0, [sp, 264]
add x0, x0, 24
ldr x1, [sp, 328]
str x1, [x0]
ldr x0, [sp, 264]
add x0, x0, 32
ldr x1, [sp, 344]
str x1, [x0]
nop
ldp x19, x20, [sp]
ldp x21, x22, [sp, 16]
ldp x23, x24, [sp, 32]
ldp x25, x26, [sp, 48]
ldr x27, [sp, 64]
add sp, sp, 560
.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_offset 0
ret
.cfi_endproc
.LFE5:
.size fiat_25519_carry_scmul_121666, .-fiat_25519_carry_scmul_121666
.align 2
.type fiat_25519_carry, %function
fiat_25519_carry:
.LFB6:
.cfi_startproc
sub sp, sp, #112
.cfi_def_cfa_offset 112
str x0, [sp, 8]
str x1, [sp]
ldr x0, [sp]
ldr x0, [x0]
str x0, [sp, 16]
ldr x0, [sp, 16]
lsr x1, x0, 51
ldr x0, [sp]
add x0, x0, 8
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 24]
ldr x0, [sp, 24]
lsr x1, x0, 51
ldr x0, [sp]
add x0, x0, 16
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 32]
ldr x0, [sp, 32]
lsr x1, x0, 51
ldr x0, [sp]
add x0, x0, 24
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 40]
ldr x0, [sp, 40]
lsr x1, x0, 51
ldr x0, [sp]
add x0, x0, 32
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 48]
ldr x0, [sp, 16]
and x2, x0, 2251799813685247
ldr x0, [sp, 48]
lsr x1, x0, 51
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
add x0, x2, x0
str x0, [sp, 56]
ldr x0, [sp, 56]
lsr x1, x0, 51
ldr x0, [sp, 24]
and x0, x0, 2251799813685247
add x0, x1, x0
str x0, [sp, 64]
ldr x0, [sp, 56]
and x0, x0, 2251799813685247
str x0, [sp, 72]
ldr x0, [sp, 64]
and x0, x0, 2251799813685247
str x0, [sp, 80]
ldr x0, [sp, 64]
lsr x1, x0, 51
ldr x0, [sp, 32]
and x0, x0, 2251799813685247
add x0, x1, x0
str x0, [sp, 88]
ldr x0, [sp, 40]
and x0, x0, 2251799813685247
str x0, [sp, 96]
ldr x0, [sp, 48]
and x0, x0, 2251799813685247
str x0, [sp, 104]
ldr x0, [sp, 8]
ldr x1, [sp, 72]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 8
ldr x1, [sp, 80]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 16
ldr x1, [sp, 88]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 24
ldr x1, [sp, 96]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 32
ldr x1, [sp, 104]
str x1, [x0]
nop
add sp, sp, 112
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size fiat_25519_carry, .-fiat_25519_carry
.align 2
.type fiat_25519_add, %function
fiat_25519_add:
.LFB7:
.cfi_startproc
sub sp, sp, #80
.cfi_def_cfa_offset 80
str x0, [sp, 24]
str x1, [sp, 16]
str x2, [sp, 8]
ldr x0, [sp, 16]
ldr x1, [x0]
ldr x0, [sp, 8]
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 40]
ldr x0, [sp, 16]
add x0, x0, 8
ldr x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 8
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 48]
ldr x0, [sp, 16]
add x0, x0, 16
ldr x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 16
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 56]
ldr x0, [sp, 16]
add x0, x0, 24
ldr x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 24
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 64]
ldr x0, [sp, 16]
add x0, x0, 32
ldr x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 32
ldr x0, [x0]
add x0, x1, x0
str x0, [sp, 72]
ldr x0, [sp, 24]
ldr x1, [sp, 40]
str x1, [x0]
ldr x0, [sp, 24]
add x0, x0, 8
ldr x1, [sp, 48]
str x1, [x0]
ldr x0, [sp, 24]
add x0, x0, 16
ldr x1, [sp, 56]
str x1, [x0]
ldr x0, [sp, 24]
add x0, x0, 24
ldr x1, [sp, 64]
str x1, [x0]
ldr x0, [sp, 24]
add x0, x0, 32
ldr x1, [sp, 72]
str x1, [x0]
nop
add sp, sp, 80
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size fiat_25519_add, .-fiat_25519_add
.align 2
.type fiat_25519_sub, %function
fiat_25519_sub:
.LFB8:
.cfi_startproc
sub sp, sp, #80
.cfi_def_cfa_offset 80
str x0, [sp, 24]
str x1, [sp, 16]
str x2, [sp, 8]
ldr x0, [sp, 16]
ldr x1, [x0]
ldr x0, [sp, 8]
ldr x0, [x0]
sub x1, x1, x0
mov x0, -38
movk x0, 0xf, lsl 48
add x0, x1, x0
str x0, [sp, 40]
ldr x0, [sp, 16]
add x0, x0, 8
ldr x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 8
ldr x0, [x0]
sub x1, x1, x0
mov x0, 4503599627370494
add x0, x1, x0
str x0, [sp, 48]
ldr x0, [sp, 16]
add x0, x0, 16
ldr x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 16
ldr x0, [x0]
sub x1, x1, x0
mov x0, 4503599627370494
add x0, x1, x0
str x0, [sp, 56]
ldr x0, [sp, 16]
add x0, x0, 24
ldr x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 24
ldr x0, [x0]
sub x1, x1, x0
mov x0, 4503599627370494
add x0, x1, x0
str x0, [sp, 64]
ldr x0, [sp, 16]
add x0, x0, 32
ldr x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 32
ldr x0, [x0]
sub x1, x1, x0
mov x0, 4503599627370494
add x0, x1, x0
str x0, [sp, 72]
ldr x0, [sp, 24]
ldr x1, [sp, 40]
str x1, [x0]
ldr x0, [sp, 24]
add x0, x0, 8
ldr x1, [sp, 48]
str x1, [x0]
ldr x0, [sp, 24]
add x0, x0, 16
ldr x1, [sp, 56]
str x1, [x0]
ldr x0, [sp, 24]
add x0, x0, 24
ldr x1, [sp, 64]
str x1, [x0]
ldr x0, [sp, 24]
add x0, x0, 32
ldr x1, [sp, 72]
str x1, [x0]
nop
add sp, sp, 80
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size fiat_25519_sub, .-fiat_25519_sub
.align 2
.type fiat_25519_opp, %function
fiat_25519_opp:
.LFB9:
.cfi_startproc
sub sp, sp, #64
.cfi_def_cfa_offset 64
str x0, [sp, 8]
str x1, [sp]
ldr x0, [sp]
ldr x0, [x0]
mov x1, -38
movk x1, 0xf, lsl 48
sub x0, x1, x0
str x0, [sp, 24]
ldr x0, [sp]
add x0, x0, 8
ldr x0, [x0]
mov x1, 4503599627370494
sub x0, x1, x0
str x0, [sp, 32]
ldr x0, [sp]
add x0, x0, 16
ldr x0, [x0]
mov x1, 4503599627370494
sub x0, x1, x0
str x0, [sp, 40]
ldr x0, [sp]
add x0, x0, 24
ldr x0, [x0]
mov x1, 4503599627370494
sub x0, x1, x0
str x0, [sp, 48]
ldr x0, [sp]
add x0, x0, 32
ldr x0, [x0]
mov x1, 4503599627370494
sub x0, x1, x0
str x0, [sp, 56]
ldr x0, [sp, 8]
ldr x1, [sp, 24]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 8
ldr x1, [sp, 32]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 16
ldr x1, [sp, 40]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 24
ldr x1, [sp, 48]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 32
ldr x1, [sp, 56]
str x1, [x0]
nop
add sp, sp, 64
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size fiat_25519_opp, .-fiat_25519_opp
.align 2
.type fiat_25519_selectznz, %function
fiat_25519_selectznz:
.LFB10:
.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]
strb w1, [sp, 39]
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, 88]
mov x1, 0
ldr x0, [sp, 24]
ldr x1, [x0]
ldr x0, [sp, 16]
ldr x2, [x0]
add x0, sp, 48
mov x3, x2
mov x2, x1
ldrb w1, [sp, 39]
bl fiat_25519_cmovznz_u64
ldr x0, [sp, 24]
add x0, x0, 8
ldr x1, [x0]
ldr x0, [sp, 16]
add x0, x0, 8
ldr x2, [x0]
add x0, sp, 56
mov x3, x2
mov x2, x1
ldrb w1, [sp, 39]
bl fiat_25519_cmovznz_u64
ldr x0, [sp, 24]
add x0, x0, 16
ldr x1, [x0]
ldr x0, [sp, 16]
add x0, x0, 16
ldr x2, [x0]
add x0, sp, 64
mov x3, x2
mov x2, x1
ldrb w1, [sp, 39]
bl fiat_25519_cmovznz_u64
ldr x0, [sp, 24]
add x0, x0, 24
ldr x1, [x0]
ldr x0, [sp, 16]
add x0, x0, 24
ldr x2, [x0]
add x0, sp, 72
mov x3, x2
mov x2, x1
ldrb w1, [sp, 39]
bl fiat_25519_cmovznz_u64
ldr x0, [sp, 24]
add x0, x0, 32
ldr x1, [x0]
ldr x0, [sp, 16]
add x0, x0, 32
ldr x2, [x0]
add x0, sp, 80
mov x3, x2
mov x2, x1
ldrb w1, [sp, 39]
bl fiat_25519_cmovznz_u64
ldr x1, [sp, 48]
ldr x0, [sp, 40]
str x1, [x0]
ldr x0, [sp, 40]
add x0, x0, 8
ldr x1, [sp, 56]
str x1, [x0]
ldr x0, [sp, 40]
add x0, x0, 16
ldr x1, [sp, 64]
str x1, [x0]
ldr x0, [sp, 40]
add x0, x0, 24
ldr x1, [sp, 72]
str x1, [x0]
ldr x0, [sp, 40]
add x0, x0, 32
ldr x1, [sp, 80]
str x1, [x0]
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 .L12
bl __stack_chk_fail
.L12:
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size fiat_25519_selectznz, .-fiat_25519_selectznz
.align 2
.type fiat_25519_to_bytes, %function
fiat_25519_to_bytes:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -448]!
.cfi_def_cfa_offset 448
.cfi_offset 29, -448
.cfi_offset 30, -440
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, 440]
mov x1, 0
ldr x0, [sp, 16]
ldr x2, [x0]
add x1, sp, 34
add x0, sp, 80
mov x4, -19
movk x4, 0x7, lsl 48
mov x3, x2
mov w2, 0
bl fiat_25519_subborrowx_u51
ldrb w5, [sp, 34]
ldr x0, [sp, 16]
add x0, x0, 8
ldr x2, [x0]
add x1, sp, 35
add x0, sp, 88
mov x4, 2251799813685247
mov x3, x2
mov w2, w5
bl fiat_25519_subborrowx_u51
ldrb w5, [sp, 35]
ldr x0, [sp, 16]
add x0, x0, 16
ldr x2, [x0]
add x1, sp, 36
add x0, sp, 96
mov x4, 2251799813685247
mov x3, x2
mov w2, w5
bl fiat_25519_subborrowx_u51
ldrb w5, [sp, 36]
ldr x0, [sp, 16]
add x0, x0, 24
ldr x2, [x0]
add x1, sp, 37
add x0, sp, 104
mov x4, 2251799813685247
mov x3, x2
mov w2, w5
bl fiat_25519_subborrowx_u51
ldrb w5, [sp, 37]
ldr x0, [sp, 16]
add x0, x0, 32
ldr x2, [x0]
add x1, sp, 38
add x0, sp, 112
mov x4, 2251799813685247
mov x3, x2
mov w2, w5
bl fiat_25519_subborrowx_u51
ldrb w1, [sp, 38]
add x0, sp, 120
mov x3, -1
mov x2, 0
bl fiat_25519_cmovznz_u64
ldr x1, [sp, 120]
mov x0, -19
movk x0, 0x7, lsl 48
and x2, x1, x0
ldr x3, [sp, 80]
add x1, sp, 39
add x0, sp, 128
mov x4, x3
mov x3, x2
mov w2, 0
bl fiat_25519_addcarryx_u51
ldrb w5, [sp, 39]
ldr x0, [sp, 120]
and x2, x0, 2251799813685247
ldr x3, [sp, 88]
add x1, sp, 40
add x0, sp, 136
mov x4, x3
mov x3, x2
mov w2, w5
bl fiat_25519_addcarryx_u51
ldrb w5, [sp, 40]
ldr x0, [sp, 120]
and x2, x0, 2251799813685247
ldr x3, [sp, 96]
add x1, sp, 41
add x0, sp, 144
mov x4, x3
mov x3, x2
mov w2, w5
bl fiat_25519_addcarryx_u51
ldrb w5, [sp, 41]
ldr x0, [sp, 120]
and x2, x0, 2251799813685247
ldr x3, [sp, 104]
add x1, sp, 42
add x0, sp, 152
mov x4, x3
mov x3, x2
mov w2, w5
bl fiat_25519_addcarryx_u51
ldrb w5, [sp, 42]
ldr x0, [sp, 120]
and x2, x0, 2251799813685247
ldr x3, [sp, 112]
add x1, sp, 43
add x0, sp, 160
mov x4, x3
mov x3, x2
mov w2, w5
bl fiat_25519_addcarryx_u51
ldr x0, [sp, 160]
lsl x0, x0, 4
str x0, [sp, 168]
ldr x0, [sp, 152]
lsl x0, x0, 1
str x0, [sp, 176]
ldr x0, [sp, 144]
lsl x0, x0, 6
str x0, [sp, 184]
ldr x0, [sp, 136]
lsl x0, x0, 3
str x0, [sp, 192]
ldr x0, [sp, 128]
lsr x0, x0, 8
str x0, [sp, 200]
ldr x0, [sp, 128]
strb w0, [sp, 44]
ldr x0, [sp, 200]
lsr x0, x0, 8
str x0, [sp, 208]
ldr x0, [sp, 200]
strb w0, [sp, 45]
ldr x0, [sp, 208]
lsr x0, x0, 8
str x0, [sp, 216]
ldr x0, [sp, 208]
strb w0, [sp, 46]
ldr x0, [sp, 216]
lsr x0, x0, 8
str x0, [sp, 224]
ldr x0, [sp, 216]
strb w0, [sp, 47]
ldr x0, [sp, 224]
lsr x0, x0, 8
str x0, [sp, 232]
ldr x0, [sp, 224]
strb w0, [sp, 48]
ldr x0, [sp, 232]
lsr x0, x0, 8
strb w0, [sp, 49]
ldr x0, [sp, 232]
strb w0, [sp, 50]
ldrb w0, [sp, 49]
ldr x1, [sp, 192]
add x0, x1, x0
str x0, [sp, 240]
ldr x0, [sp, 240]
lsr x0, x0, 8
str x0, [sp, 248]
ldr x0, [sp, 240]
strb w0, [sp, 51]
ldr x0, [sp, 248]
lsr x0, x0, 8
str x0, [sp, 256]
ldr x0, [sp, 248]
strb w0, [sp, 52]
ldr x0, [sp, 256]
lsr x0, x0, 8
str x0, [sp, 264]
ldr x0, [sp, 256]
strb w0, [sp, 53]
ldr x0, [sp, 264]
lsr x0, x0, 8
str x0, [sp, 272]
ldr x0, [sp, 264]
strb w0, [sp, 54]
ldr x0, [sp, 272]
lsr x0, x0, 8
str x0, [sp, 280]
ldr x0, [sp, 272]
strb w0, [sp, 55]
ldr x0, [sp, 280]
lsr x0, x0, 8
strb w0, [sp, 56]
ldr x0, [sp, 280]
strb w0, [sp, 57]
ldrb w0, [sp, 56]
ldr x1, [sp, 184]
add x0, x1, x0
str x0, [sp, 288]
ldr x0, [sp, 288]
lsr x0, x0, 8
str x0, [sp, 296]
ldr x0, [sp, 288]
strb w0, [sp, 58]
ldr x0, [sp, 296]
lsr x0, x0, 8
str x0, [sp, 304]
ldr x0, [sp, 296]
strb w0, [sp, 59]
ldr x0, [sp, 304]
lsr x0, x0, 8
str x0, [sp, 312]
ldr x0, [sp, 304]
strb w0, [sp, 60]
ldr x0, [sp, 312]
lsr x0, x0, 8
str x0, [sp, 320]
ldr x0, [sp, 312]
strb w0, [sp, 61]
ldr x0, [sp, 320]
lsr x0, x0, 8
str x0, [sp, 328]
ldr x0, [sp, 320]
strb w0, [sp, 62]
ldr x0, [sp, 328]
lsr x0, x0, 8
str x0, [sp, 336]
ldr x0, [sp, 328]
strb w0, [sp, 63]
ldr x0, [sp, 336]
lsr x0, x0, 8
strb w0, [sp, 64]
ldr x0, [sp, 336]
strb w0, [sp, 65]
ldrb w0, [sp, 64]
ldr x1, [sp, 176]
add x0, x1, x0
str x0, [sp, 344]
ldr x0, [sp, 344]
lsr x0, x0, 8
str x0, [sp, 352]
ldr x0, [sp, 344]
strb w0, [sp, 66]
ldr x0, [sp, 352]
lsr x0, x0, 8
str x0, [sp, 360]
ldr x0, [sp, 352]
strb w0, [sp, 67]
ldr x0, [sp, 360]
lsr x0, x0, 8
str x0, [sp, 368]
ldr x0, [sp, 360]
strb w0, [sp, 68]
ldr x0, [sp, 368]
lsr x0, x0, 8
str x0, [sp, 376]
ldr x0, [sp, 368]
strb w0, [sp, 69]
ldr x0, [sp, 376]
lsr x0, x0, 8
str x0, [sp, 384]
ldr x0, [sp, 376]
strb w0, [sp, 70]
ldr x0, [sp, 384]
lsr x0, x0, 8
strb w0, [sp, 71]
ldr x0, [sp, 384]
strb w0, [sp, 72]
ldrb w0, [sp, 71]
ldr x1, [sp, 168]
add x0, x1, x0
str x0, [sp, 392]
ldr x0, [sp, 392]
lsr x0, x0, 8
str x0, [sp, 400]
ldr x0, [sp, 392]
strb w0, [sp, 73]
ldr x0, [sp, 400]
lsr x0, x0, 8
str x0, [sp, 408]
ldr x0, [sp, 400]
strb w0, [sp, 74]
ldr x0, [sp, 408]
lsr x0, x0, 8
str x0, [sp, 416]
ldr x0, [sp, 408]
strb w0, [sp, 75]
ldr x0, [sp, 416]
lsr x0, x0, 8
str x0, [sp, 424]
ldr x0, [sp, 416]
strb w0, [sp, 76]
ldr x0, [sp, 424]
lsr x0, x0, 8
str x0, [sp, 432]
ldr x0, [sp, 424]
strb w0, [sp, 77]
ldr x0, [sp, 432]
lsr x0, x0, 8
strb w0, [sp, 78]
ldr x0, [sp, 432]
strb w0, [sp, 79]
ldr x0, [sp, 24]
ldrb w1, [sp, 44]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 1
ldrb w1, [sp, 45]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 2
ldrb w1, [sp, 46]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 3
ldrb w1, [sp, 47]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 4
ldrb w1, [sp, 48]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 5
ldrb w1, [sp, 50]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 6
ldrb w1, [sp, 51]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 7
ldrb w1, [sp, 52]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 8
ldrb w1, [sp, 53]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 9
ldrb w1, [sp, 54]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 10
ldrb w1, [sp, 55]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 11
ldrb w1, [sp, 57]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 12
ldrb w1, [sp, 58]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 13
ldrb w1, [sp, 59]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 14
ldrb w1, [sp, 60]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 15
ldrb w1, [sp, 61]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 16
ldrb w1, [sp, 62]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 17
ldrb w1, [sp, 63]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 18
ldrb w1, [sp, 65]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 19
ldrb w1, [sp, 66]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 20
ldrb w1, [sp, 67]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 21
ldrb w1, [sp, 68]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 22
ldrb w1, [sp, 69]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 23
ldrb w1, [sp, 70]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 24
ldrb w1, [sp, 72]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 25
ldrb w1, [sp, 73]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 26
ldrb w1, [sp, 74]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 27
ldrb w1, [sp, 75]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 28
ldrb w1, [sp, 76]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 29
ldrb w1, [sp, 77]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 30
ldrb w1, [sp, 79]
strb w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 31
ldrb w1, [sp, 78]
strb w1, [x0]
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 440]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L14
bl __stack_chk_fail
.L14:
ldp x29, x30, [sp], 448
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size fiat_25519_to_bytes, .-fiat_25519_to_bytes
.align 2
.type fiat_25519_from_bytes, %function
fiat_25519_from_bytes:
.LFB12:
.cfi_startproc
sub sp, sp, #384
.cfi_def_cfa_offset 384
str x0, [sp, 8]
str x1, [sp]
ldr x0, [sp]
add x0, x0, 31
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 44
str x0, [sp, 32]
ldr x0, [sp]
add x0, x0, 30
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 36
str x0, [sp, 40]
ldr x0, [sp]
add x0, x0, 29
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 28
str x0, [sp, 48]
ldr x0, [sp]
add x0, x0, 28
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 20
str x0, [sp, 56]
ldr x0, [sp]
add x0, x0, 27
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 12
str x0, [sp, 64]
ldr x0, [sp]
add x0, x0, 26
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 4
str x0, [sp, 72]
ldr x0, [sp]
add x0, x0, 25
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 47
str x0, [sp, 80]
ldr x0, [sp]
add x0, x0, 24
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 39
str x0, [sp, 88]
ldr x0, [sp]
add x0, x0, 23
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 31
str x0, [sp, 96]
ldr x0, [sp]
add x0, x0, 22
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 23
str x0, [sp, 104]
ldr x0, [sp]
add x0, x0, 21
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 15
str x0, [sp, 112]
ldr x0, [sp]
add x0, x0, 20
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 7
str x0, [sp, 120]
ldr x0, [sp]
add x0, x0, 19
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 50
str x0, [sp, 128]
ldr x0, [sp]
add x0, x0, 18
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 42
str x0, [sp, 136]
ldr x0, [sp]
add x0, x0, 17
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 34
str x0, [sp, 144]
ldr x0, [sp]
add x0, x0, 16
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 26
str x0, [sp, 152]
ldr x0, [sp]
add x0, x0, 15
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 18
str x0, [sp, 160]
ldr x0, [sp]
add x0, x0, 14
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 10
str x0, [sp, 168]
ldr x0, [sp]
add x0, x0, 13
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 2
str x0, [sp, 176]
ldr x0, [sp]
add x0, x0, 12
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 45
str x0, [sp, 184]
ldr x0, [sp]
add x0, x0, 11
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 37
str x0, [sp, 192]
ldr x0, [sp]
add x0, x0, 10
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 29
str x0, [sp, 200]
ldr x0, [sp]
add x0, x0, 9
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 21
str x0, [sp, 208]
ldr x0, [sp]
add x0, x0, 8
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 13
str x0, [sp, 216]
ldr x0, [sp]
add x0, x0, 7
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 5
str x0, [sp, 224]
ldr x0, [sp]
add x0, x0, 6
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 48
str x0, [sp, 232]
ldr x0, [sp]
add x0, x0, 5
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 40
str x0, [sp, 240]
ldr x0, [sp]
add x0, x0, 4
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 32
str x0, [sp, 248]
ldr x0, [sp]
add x0, x0, 3
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 24
str x0, [sp, 256]
ldr x0, [sp]
add x0, x0, 2
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 16
str x0, [sp, 264]
ldr x0, [sp]
add x0, x0, 1
ldrb w0, [x0]
and x0, x0, 255
lsl x0, x0, 8
str x0, [sp, 272]
ldr x0, [sp]
ldrb w0, [x0]
strb w0, [sp, 27]
ldrb w1, [sp, 27]
ldr x2, [sp, 240]
ldr x0, [sp, 232]
add x2, x2, x0
ldr x0, [sp, 248]
add x2, x2, x0
ldr x0, [sp, 256]
add x2, x2, x0
ldr x0, [sp, 264]
add x2, x2, x0
ldr x0, [sp, 272]
add x0, x2, x0
add x0, x1, x0
str x0, [sp, 280]
ldr x0, [sp, 280]
lsr x0, x0, 51
strb w0, [sp, 28]
ldr x0, [sp, 280]
and x0, x0, 2251799813685247
str x0, [sp, 288]
ldr x1, [sp, 40]
ldr x0, [sp, 32]
add x1, x1, x0
ldr x0, [sp, 48]
add x1, x1, x0
ldr x0, [sp, 56]
add x1, x1, x0
ldr x0, [sp, 64]
add x0, x1, x0
ldr x1, [sp, 72]
add x0, x1, x0
str x0, [sp, 296]
ldr x1, [sp, 88]
ldr x0, [sp, 80]
add x1, x1, x0
ldr x0, [sp, 96]
add x1, x1, x0
ldr x0, [sp, 104]
add x1, x1, x0
ldr x0, [sp, 112]
add x0, x1, x0
ldr x1, [sp, 120]
add x0, x1, x0
str x0, [sp, 304]
ldr x1, [sp, 136]
ldr x0, [sp, 128]
add x1, x1, x0
ldr x0, [sp, 144]
add x1, x1, x0
ldr x0, [sp, 152]
add x1, x1, x0
ldr x0, [sp, 160]
add x1, x1, x0
ldr x0, [sp, 168]
add x0, x1, x0
ldr x1, [sp, 176]
add x0, x1, x0
str x0, [sp, 312]
ldr x1, [sp, 192]
ldr x0, [sp, 184]
add x1, x1, x0
ldr x0, [sp, 200]
add x1, x1, x0
ldr x0, [sp, 208]
add x1, x1, x0
ldr x0, [sp, 216]
add x0, x1, x0
ldr x1, [sp, 224]
add x0, x1, x0
str x0, [sp, 320]
ldrb w0, [sp, 28]
ldr x1, [sp, 320]
add x0, x1, x0
str x0, [sp, 328]
ldr x0, [sp, 328]
lsr x0, x0, 51
strb w0, [sp, 29]
ldr x0, [sp, 328]
and x0, x0, 2251799813685247
str x0, [sp, 336]
ldrb w0, [sp, 29]
ldr x1, [sp, 312]
add x0, x1, x0
str x0, [sp, 344]
ldr x0, [sp, 344]
lsr x0, x0, 51
strb w0, [sp, 30]
ldr x0, [sp, 344]
and x0, x0, 2251799813685247
str x0, [sp, 352]
ldrb w0, [sp, 30]
ldr x1, [sp, 304]
add x0, x1, x0
str x0, [sp, 360]
ldr x0, [sp, 360]
lsr x0, x0, 51
strb w0, [sp, 31]
ldr x0, [sp, 360]
and x0, x0, 2251799813685247
str x0, [sp, 368]
ldrb w0, [sp, 31]
ldr x1, [sp, 296]
add x0, x1, x0
str x0, [sp, 376]
ldr x0, [sp, 8]
ldr x1, [sp, 288]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 8
ldr x1, [sp, 336]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 16
ldr x1, [sp, 352]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 24
ldr x1, [sp, 368]
str x1, [x0]
ldr x0, [sp, 8]
add x0, x0, 32
ldr x1, [sp, 376]
str x1, [x0]
nop
add sp, sp, 384
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size fiat_25519_from_bytes, .-fiat_25519_from_bytes
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.type crystal_edit_goto_22_png, %object
.size crystal_edit_goto_22_png, 608
crystal_edit_goto_22_png:
.string "\211PNG\r\n\032\n"
.string ""
.string ""
.string "\rIHDR"
.string ""
.string ""
.string "\026"
.string ""
.string ""
.string "\026\b\004"
.string ""
.string ""
.string "n\275\244\260"
.string ""
.string ""
.string "\tpHYs"
.string ""
.string "\013\016"
.string ""
.string "\013\016\001@\276\341A"
.string ""
.string ""
.string "\004gAMA"
.string ""
.string "\261\216|\373Q\223"
.string ""
.string ""
.string " cHRM"
.string ""
.string "z%"
.string ""
.string "\200\203"
.string ""
.string "\371\377"
.string ""
.string "\200\351"
.string ""
.string "u0"
.string ""
.string "\352`"
.string ""
.string ":\230"
.string ""
.string "\027o\222_\305F"
.string ""
.ascii "\001\326IDAT(Su\322\317k\323`\034\307\361\317\363<I\223.\235"
.ascii "\355j\273\226\332\037Ru\2533css?4\026T\020E\301\203n\227\311"
.ascii "n\303\323\304\355\274\213\b\036\305\213\377\301\360\340\301\243"
.ascii "8\020/\242\310P\021A\004\017Sq\026Da\2100\327\201\363c\3462\233"
.ascii "\254)o\002\017y^<\204<_\020a\241\200)\361FP\254\341:\242\377"
.ascii "\337\206\322\021\361D\376\222\334L\274@\276%\206\241\246#\313"
.ascii "QneR=F\246\005\206&\257\264\377L"
.string "r\267WbC\273\203\266P\f)/t,\027\330(\361ET}\373\001\234\215=\333\307\312\277\272\335\247D\3636\264P\f\201\341\366\037=<\354\325\263\221|\252\212\201\303\032K1\204\363b&\2652\312*\035\036a\372\025\006\374\324\207E\334\232O,\251\361\310le\375\034\235\337\231\327j\024\262\005\356\260\367\257\216\260\253\026\233\214_\353~k\335D\016&*\350C\026\242\tw\365;\034\343%\366}\204\243\331h\203\203{\356\035\276\023\367\221k\302F\336^\270\370\271\372<>\207](\211\273b\315\273A\242\277\t\273\377\242\210\343\356Lh\030\224\013\222\312+\024o'\006#\237\254?1neQ\177\211B\013\214\274\3710\315\214[\247[\206\311\272\232\203\036\212a\3507r\3652\267\333\313\330bc\346v\342\224\276Xd\257\327!f\277\352g\002\373\276eZ\236\305e\363C/\217\361(\207Y\376n^m|B"
.string "C\031\323\211o\321\0311\336Y;\301S,\327\324\224\177\210\2028\225\1770\300\203+\361\331\310da)\367(z:xj\020\227\355\367c\234\340P\035\023\330\003c'\fb\253t\353\344\272\263z`\036v\030\334\354/-\366\241@\363\373\027U"
.string ""
.string ""
.string ""
.ascii "IEND\256B`\202"
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type pabort, %function
pabort:
.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]
bl perror
bl abort
.cfi_endproc
.LFE6:
.size pabort, .-pabort
.section .rodata
.align 3
.LC0:
.string "/dev/spidev0.0"
.section .data.rel.local,"aw"
.align 3
.type device, %object
.size device, 8
device:
.xword .LC0
.local mode
.comm mode,1,1
.data
.type bits, %object
.size bits, 1
bits:
.byte 8
.align 2
.type speed, %object
.size speed, 4
speed:
.word 500000
.local delay
.comm delay,2,2
.local spi_xfrs
.comm spi_xfrs,8,8
.local ntransfers
.comm ntransfers,4,4
.local toggle_cs
.comm toggle_cs,4,4
.local block_length
.comm block_length,4,4
.local quiet
.comm quiet,4,4
.text
.align 2
.type add_transfer, %function
add_transfer:
.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 x0, [sp, 24]
str w1, [sp, 20]
ldrsw x0, [sp, 20]
bl malloc
str x0, [sp, 40]
ldrsw x0, [sp, 20]
bl malloc
str x0, [sp, 48]
ldrsw x0, [sp, 20]
mov x2, x0
ldr x1, [sp, 24]
ldr x0, [sp, 40]
bl memcpy
ldrsw x0, [sp, 20]
mov x2, x0
mov w1, 255
ldr x0, [sp, 48]
bl memset
adrp x0, ntransfers
add x0, x0, :lo12:ntransfers
ldr w0, [x0]
add w1, w0, 1
adrp x0, ntransfers
add x0, x0, :lo12:ntransfers
str w1, [x0]
adrp x0, spi_xfrs
add x0, x0, :lo12:spi_xfrs
ldr x2, [x0]
adrp x0, ntransfers
add x0, x0, :lo12:ntransfers
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 5
mov x1, x0
mov x0, x2
bl realloc
mov x1, x0
adrp x0, spi_xfrs
add x0, x0, :lo12:spi_xfrs
str x1, [x0]
adrp x0, spi_xfrs
add x0, x0, :lo12:spi_xfrs
ldr x1, [x0]
adrp x0, ntransfers
add x0, x0, :lo12:ntransfers
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 5
sub x0, x0, #32
add x0, x1, x0
str x0, [sp, 56]
ldr x1, [sp, 40]
ldr x0, [sp, 56]
str x1, [x0]
ldr x1, [sp, 48]
ldr x0, [sp, 56]
str x1, [x0, 8]
ldr w1, [sp, 20]
ldr x0, [sp, 56]
str w1, [x0, 16]
adrp x0, speed
add x0, x0, :lo12:speed
ldr w1, [x0]
ldr x0, [sp, 56]
str w1, [x0, 20]
adrp x0, delay
add x0, x0, :lo12:delay
ldrh w1, [x0]
ldr x0, [sp, 56]
strh w1, [x0, 24]
adrp x0, bits
add x0, x0, :lo12:bits
ldrb w1, [x0]
ldr x0, [sp, 56]
strb w1, [x0, 26]
adrp x0, toggle_cs
add x0, x0, :lo12:toggle_cs
ldr w0, [x0]
and w1, w0, 255
ldr x0, [sp, 56]
strb w1, [x0, 27]
ldr x0, [sp, 56]
strb wzr, [x0, 31]
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size add_transfer, .-add_transfer
.section .rodata
.align 3
.LC1:
.string " %02X"
.align 3
.LC2:
.string "\n"
.text
.align 2
.type show_spi_xfrs, %function
show_spi_xfrs:
.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, 16]
b .L4
.L9:
adrp x0, spi_xfrs
add x0, x0, :lo12:spi_xfrs
ldr x1, [x0]
ldrsw x0, [sp, 16]
lsl x0, x0, 5
add x0, x1, x0
str x0, [sp, 24]
str wzr, [sp, 20]
b .L5
.L6:
ldrsw x1, [sp, 20]
ldr x0, [sp, 24]
ldr x0, [x0]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L5:
ldr x0, [sp, 24]
ldr w1, [x0, 16]
ldr w0, [sp, 20]
cmp w1, w0
bhi .L6
mov w0, 10
bl putchar
str wzr, [sp, 20]
b .L7
.L8:
ldrsw x1, [sp, 20]
ldr x0, [sp, 24]
ldr x0, [x0, 8]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L7:
ldr x0, [sp, 24]
ldr w1, [x0, 16]
ldr w0, [sp, 20]
cmp w1, w0
bhi .L8
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L4:
adrp x0, ntransfers
add x0, x0, :lo12:ntransfers
ldr w0, [x0]
ldr w1, [sp, 16]
cmp w1, w0
blt .L9
nop
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size show_spi_xfrs, .-show_spi_xfrs
.section .rodata
.align 3
.LC3:
.string "can't send spi message"
.text
.align 2
.type transfer, %function
transfer:
.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 w0, [sp, 28]
adrp x0, ntransfers
add x0, x0, :lo12:ntransfers
ldr w0, [x0]
sxtw x0, w0
lsl x1, x0, 5
mov x0, 16383
cmp x1, x0
bhi .L11
adrp x0, ntransfers
add x0, x0, :lo12:ntransfers
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 5
b .L12
.L11:
mov x0, 0
.L12:
lsl x1, x0, 16
mov x0, 27392
movk x0, 0x4000, lsl 16
orr x1, x1, x0
adrp x0, spi_xfrs
add x0, x0, :lo12:spi_xfrs
ldr x0, [x0]
mov x2, x0
ldr w0, [sp, 28]
bl ioctl
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
bgt .L14
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl pabort
.L14:
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size transfer, .-transfer
.section .rodata
.align 3
.LC4:
.string "Usage: %s [-DsbdlnHOLC3] [data,..]\n"
.align 3
.LC5:
.ascii " -D --device device to use (default /dev/spidev0.0)\n -s"
.ascii " --speed max speed (Hz)\n -d --delay delay (usec)\n "
.ascii "-b --bpw bits per word \n -n --len length\n -l -"
.ascii "-loop loopback\n -H --cpha clock phase\n -O --cpol"
.ascii " clock polarity\n -L --lsb "
.string " least significant bit first\n -C --cs-high chip select active high\n -3 --3wire SI/SO signals shared\n -q --quiet Don't output data send/received\n data is a series of octets to send, separated by comma, or b# to switch to another bits per word\n"
.text
.align 2
.type print_usage, %function
print_usage:
.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 x1, [sp, 24]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
mov w0, 1
bl exit
.cfi_endproc
.LFE10:
.size print_usage, .-print_usage
.section .rodata
.align 3
.LC6:
.string "D:s:d:b:n:lHOLC3NRq"
.text
.align 2
.type parse_opts, %function
parse_opts:
.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 w0, [sp, 28]
str x1, [sp, 16]
.L35:
mov x4, 0
adrp x0, lopts.0
add x3, x0, :lo12:lopts.0
adrp x0, .LC6
add x2, x0, :lo12:.LC6
ldr x1, [sp, 16]
ldr w0, [sp, 28]
bl getopt_long
str w0, [sp, 44]
ldr w0, [sp, 44]
cmn w0, #1
beq .L37
ldr w0, [sp, 44]
cmp w0, 115
beq .L19
ldr w0, [sp, 44]
cmp w0, 115
bgt .L20
ldr w0, [sp, 44]
cmp w0, 113
beq .L21
ldr w0, [sp, 44]
cmp w0, 113
bgt .L20
ldr w0, [sp, 44]
cmp w0, 110
beq .L22
ldr w0, [sp, 44]
cmp w0, 110
bgt .L20
ldr w0, [sp, 44]
cmp w0, 108
beq .L23
ldr w0, [sp, 44]
cmp w0, 108
bgt .L20
ldr w0, [sp, 44]
cmp w0, 100
beq .L24
ldr w0, [sp, 44]
cmp w0, 100
bgt .L20
ldr w0, [sp, 44]
cmp w0, 98
beq .L25
ldr w0, [sp, 44]
cmp w0, 98
bgt .L20
ldr w0, [sp, 44]
cmp w0, 82
beq .L26
ldr w0, [sp, 44]
cmp w0, 82
bgt .L20
ldr w0, [sp, 44]
cmp w0, 79
beq .L27
ldr w0, [sp, 44]
cmp w0, 79
bgt .L20
ldr w0, [sp, 44]
cmp w0, 78
beq .L28
ldr w0, [sp, 44]
cmp w0, 78
bgt .L20
ldr w0, [sp, 44]
cmp w0, 76
beq .L29
ldr w0, [sp, 44]
cmp w0, 76
bgt .L20
ldr w0, [sp, 44]
cmp w0, 72
beq .L30
ldr w0, [sp, 44]
cmp w0, 72
bgt .L20
ldr w0, [sp, 44]
cmp w0, 68
beq .L31
ldr w0, [sp, 44]
cmp w0, 68
bgt .L20
ldr w0, [sp, 44]
cmp w0, 51
beq .L32
ldr w0, [sp, 44]
cmp w0, 67
beq .L33
b .L20
.L31:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x1, [x0]
adrp x0, device
add x0, x0, :lo12:device
str x1, [x0]
b .L34
.L19:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
mov w2, 0
mov x1, 0
bl strtol
mov w1, w0
adrp x0, speed
add x0, x0, :lo12:speed
str w1, [x0]
b .L34
.L24:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
mov w2, 0
mov x1, 0
bl strtol
and w1, w0, 65535
adrp x0, delay
add x0, x0, :lo12:delay
strh w1, [x0]
b .L34
.L25:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
mov w2, 0
mov x1, 0
bl strtol
and w1, w0, 255
adrp x0, bits
add x0, x0, :lo12:bits
strb w1, [x0]
b .L34
.L22:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
mov w2, 0
mov x1, 0
bl strtol
mov w1, w0
adrp x0, block_length
add x0, x0, :lo12:block_length
str w1, [x0]
b .L34
.L23:
adrp x0, mode
add x0, x0, :lo12:mode
ldrb w0, [x0]
orr w0, w0, 32
and w1, w0, 255
adrp x0, mode
add x0, x0, :lo12:mode
strb w1, [x0]
b .L34
.L30:
adrp x0, mode
add x0, x0, :lo12:mode
ldrb w0, [x0]
orr w0, w0, 1
and w1, w0, 255
adrp x0, mode
add x0, x0, :lo12:mode
strb w1, [x0]
b .L34
.L27:
adrp x0, mode
add x0, x0, :lo12:mode
ldrb w0, [x0]
orr w0, w0, 2
and w1, w0, 255
adrp x0, mode
add x0, x0, :lo12:mode
strb w1, [x0]
b .L34
.L29:
adrp x0, mode
add x0, x0, :lo12:mode
ldrb w0, [x0]
orr w0, w0, 8
and w1, w0, 255
adrp x0, mode
add x0, x0, :lo12:mode
strb w1, [x0]
b .L34
.L33:
adrp x0, mode
add x0, x0, :lo12:mode
ldrb w0, [x0]
orr w0, w0, 4
and w1, w0, 255
adrp x0, mode
add x0, x0, :lo12:mode
strb w1, [x0]
b .L34
.L32:
adrp x0, mode
add x0, x0, :lo12:mode
ldrb w0, [x0]
orr w0, w0, 16
and w1, w0, 255
adrp x0, mode
add x0, x0, :lo12:mode
strb w1, [x0]
b .L34
.L28:
adrp x0, mode
add x0, x0, :lo12:mode
ldrb w0, [x0]
orr w0, w0, 64
and w1, w0, 255
adrp x0, mode
add x0, x0, :lo12:mode
strb w1, [x0]
b .L34
.L26:
adrp x0, mode
add x0, x0, :lo12:mode
ldrb w0, [x0]
orr w0, w0, -128
and w1, w0, 255
adrp x0, mode
add x0, x0, :lo12:mode
strb w1, [x0]
b .L34
.L21:
adrp x0, quiet
add x0, x0, :lo12:quiet
mov w1, 1
str w1, [x0]
b .L34
.L20:
ldr x0, [sp, 16]
ldr x0, [x0]
bl print_usage
nop
.L34:
b .L35
.L37:
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size parse_opts, .-parse_opts
.section .rodata
.align 3
.LC7:
.string ","
.align 3
.LC8:
.string "rb"
.align 3
.LC9:
.string "Failed to open input file"
.align 3
.LC10:
.string "Failed to read input file"
.text
.align 2
.global parse_transfer
.type parse_transfer, %function
parse_transfer:
.LFB12:
.cfi_startproc
mov x12, 8256
sub sp, sp, x12
.cfi_def_cfa_offset 8256
stp x29, x30, [sp]
.cfi_offset 29, -8256
.cfi_offset 30, -8248
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, 8248]
mov x1, 0
str wzr, [sp, 36]
adrp x0, .LC7
add x1, x0, :lo12:.LC7
ldr x0, [sp, 24]
bl strtok
str x0, [sp, 40]
b .L39
.L47:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 98
bne .L40
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
mov w2, 0
mov x1, 0
ldr x0, [sp, 40]
bl strtol
and w1, w0, 255
adrp x0, bits
add x0, x0, :lo12:bits
strb w1, [x0]
b .L41
.L40:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 64
bne .L42
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
adrp x0, .LC8
add x1, x0, :lo12:.LC8
ldr x0, [sp, 40]
bl fopen
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
bne .L44
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl perror
mov w0, 1
bl exit
.L45:
add x0, sp, 56
ldr w1, [sp, 36]
bl add_transfer
.L44:
add x0, sp, 56
ldr x3, [sp, 48]
mov x2, 2048
mov x1, 1
bl fread
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bgt .L45
ldr x0, [sp, 48]
bl ferror
cmp w0, 0
beq .L46
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl perror
mov w0, 1
bl exit
.L46:
ldr x0, [sp, 48]
bl fclose
b .L41
.L42:
mov w2, 0
mov x1, 0
ldr x0, [sp, 40]
bl strtol
mov x2, x0
ldr w0, [sp, 36]
add w1, w0, 1
str w1, [sp, 36]
and w2, w2, 255
sxtw x0, w0
add x1, sp, 56
strb w2, [x1, x0]
.L41:
adrp x0, .LC7
add x1, x0, :lo12:.LC7
mov x0, 0
bl strtok
str x0, [sp, 40]
.L39:
ldr x0, [sp, 40]
cmp x0, 0
bne .L47
ldr w0, [sp, 36]
cmp w0, 0
ble .L50
add x0, sp, 56
ldr w1, [sp, 36]
bl add_transfer
.L50:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 8248]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L49
bl __stack_chk_fail
.L49:
ldp x29, x30, [sp]
mov x12, 8256
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size parse_transfer, .-parse_transfer
.section .rodata
.align 3
.LC11:
.string "malloc failed"
.text
.align 2
.global make_bulk_transfer
.type make_bulk_transfer, %function
make_bulk_transfer:
.LFB13:
.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]
ldrsw x0, [sp, 28]
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L52
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl pabort
.L52:
ldrsw x0, [sp, 28]
mov x2, x0
mov w1, 203
ldr x0, [sp, 40]
bl memset
ldr w1, [sp, 28]
ldr x0, [sp, 40]
bl add_transfer
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size make_bulk_transfer, .-make_bulk_transfer
.section .rodata
.align 3
.LC12:
.string "can't open device"
.align 3
.LC13:
.string "can't set spi mode"
.align 3
.LC14:
.string "can't get spi mode"
.align 3
.LC15:
.string "can't set bits per word"
.align 3
.LC16:
.string "can't get bits per word"
.align 3
.LC17:
.string "can't set max speed hz"
.align 3
.LC18:
.string "can't get max speed hz"
.align 3
.LC19:
.string "%u\n"
.text
.align 2
.global main
.type main, %function
main:
.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 w0, [sp, 28]
str x1, [sp, 16]
str wzr, [sp, 40]
ldr x1, [sp, 16]
ldr w0, [sp, 28]
bl parse_opts
adrp x0, block_length
add x0, x0, :lo12:block_length
ldr w0, [x0]
cmp w0, 0
ble .L56
adrp x0, block_length
add x0, x0, :lo12:block_length
ldr w0, [x0]
bl make_bulk_transfer
b .L55
.L57:
adrp x0, :got:optind
ldr x0, [x0, #:got_lo12:optind]
ldr w0, [x0]
add w2, w0, 1
adrp x1, :got:optind
ldr x1, [x1, #:got_lo12:optind]
str w2, [x1]
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x0, [x0]
bl parse_transfer
.L56:
adrp x0, :got:optind
ldr x0, [x0, #:got_lo12:optind]
ldr w0, [x0]
ldr w1, [sp, 28]
cmp w1, w0
bgt .L57
.L55:
adrp x0, device
add x0, x0, :lo12:device
ldr x0, [x0]
mov w1, 2
bl open
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
bge .L58
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl pabort
.L58:
adrp x0, mode
add x2, x0, :lo12:mode
mov x1, 27393
movk x1, 0x4001, lsl 16
ldr w0, [sp, 44]
bl ioctl
str w0, [sp, 40]
ldr w0, [sp, 40]
cmn w0, #1
bne .L59
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl pabort
.L59:
adrp x0, mode
add x2, x0, :lo12:mode
mov x1, 27393
movk x1, 0x8001, lsl 16
ldr w0, [sp, 44]
bl ioctl
str w0, [sp, 40]
ldr w0, [sp, 40]
cmn w0, #1
bne .L60
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl pabort
.L60:
adrp x0, bits
add x2, x0, :lo12:bits
mov x1, 27395
movk x1, 0x4001, lsl 16
ldr w0, [sp, 44]
bl ioctl
str w0, [sp, 40]
ldr w0, [sp, 40]
cmn w0, #1
bne .L61
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl pabort
.L61:
adrp x0, bits
add x2, x0, :lo12:bits
mov x1, 27395
movk x1, 0x8001, lsl 16
ldr w0, [sp, 44]
bl ioctl
str w0, [sp, 40]
ldr w0, [sp, 40]
cmn w0, #1
bne .L62
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl pabort
.L62:
adrp x0, speed
add x2, x0, :lo12:speed
mov x1, 27396
movk x1, 0x4004, lsl 16
ldr w0, [sp, 44]
bl ioctl
str w0, [sp, 40]
ldr w0, [sp, 40]
cmn w0, #1
bne .L63
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl pabort
.L63:
adrp x0, speed
add x2, x0, :lo12:speed
mov x1, 27396
movk x1, 0x8004, lsl 16
ldr w0, [sp, 44]
bl ioctl
str w0, [sp, 40]
ldr w0, [sp, 40]
cmn w0, #1
bne .L64
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl pabort
.L64:
adrp x0, block_length
add x0, x0, :lo12:block_length
ldr w0, [x0]
cmp w0, 0
ble .L65
str wzr, [sp, 36]
.L66:
ldr w0, [sp, 44]
bl transfer
ldr w1, [sp, 36]
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl printf
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
b .L66
.L65:
ldr w0, [sp, 44]
bl transfer
adrp x0, quiet
add x0, x0, :lo12:quiet
ldr w0, [x0]
cmp w0, 0
bne .L67
bl show_spi_xfrs
.L67:
ldr w0, [sp, 44]
bl close
ldr w0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size main, .-main
.section .rodata
.align 3
.LC20:
.string "device"
.align 3
.LC21:
.string "speed"
.align 3
.LC22:
.string "delay"
.align 3
.LC23:
.string "bpw"
.align 3
.LC24:
.string "len"
.align 3
.LC25:
.string "loop"
.align 3
.LC26:
.string "cpha"
.align 3
.LC27:
.string "cpol"
.align 3
.LC28:
.string "lsb"
.align 3
.LC29:
.string "cs-high"
.align 3
.LC30:
.string "3wire"
.align 3
.LC31:
.string "no-cs"
.align 3
.LC32:
.string "ready"
.align 3
.LC33:
.string "quiet"
.section .data.rel.ro.local,"aw"
.align 3
.type lopts.0, %object
.size lopts.0, 480
lopts.0:
.xword .LC20
.word 1
.zero 4
.xword 0
.word 68
.zero 4
.xword .LC21
.word 1
.zero 4
.xword 0
.word 115
.zero 4
.xword .LC22
.word 1
.zero 4
.xword 0
.word 100
.zero 4
.xword .LC23
.word 1
.zero 4
.xword 0
.word 98
.zero 4
.xword .LC24
.word 1
.zero 4
.xword 0
.word 110
.zero 4
.xword .LC25
.word 0
.zero 4
.xword 0
.word 108
.zero 4
.xword .LC26
.word 0
.zero 4
.xword 0
.word 72
.zero 4
.xword .LC27
.word 0
.zero 4
.xword 0
.word 79
.zero 4
.xword .LC28
.word 0
.zero 4
.xword 0
.word 76
.zero 4
.xword .LC29
.word 0
.zero 4
.xword 0
.word 67
.zero 4
.xword .LC30
.word 0
.zero 4
.xword 0
.word 51
.zero 4
.xword .LC31
.word 0
.zero 4
.xword 0
.word 78
.zero 4
.xword .LC32
.word 0
.zero 4
.xword 0
.word 82
.zero 4
.xword .LC33
.word 0
.zero 4
.xword 0
.word 113
.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 "%d"
.align 3
.LC1:
.string "%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.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 wzr, [sp, 48]
mov w0, 2
str w0, [sp, 52]
add x0, sp, 32
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
add x0, sp, 36
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
add x0, sp, 28
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w0, [sp, 36]
str w0, [sp, 44]
str wzr, [sp, 40]
b .L2
.L4:
ldr w1, [sp, 28]
ldr w0, [sp, 40]
sdiv w2, w0, w1
mul w1, w2, w1
sub w0, w0, w1
cmp w0, 0
bne .L3
ldr w0, [sp, 40]
cmp w0, 0
ble .L3
ldr w1, [sp, 36]
ldr w0, [sp, 52]
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 w1, w0, w1
ldr w0, [sp, 36]
add w0, w1, w0
str w0, [sp, 44]
ldr w0, [sp, 52]
add w0, w0, 2
str w0, [sp, 52]
.L3:
ldr w1, [sp, 48]
ldr w0, [sp, 44]
add w0, w1, w0
str w0, [sp, 48]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L2:
ldr w0, [sp, 32]
ldr w1, [sp, 40]
cmp w1, w0
blt .L4
ldr w1, [sp, 48]
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, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L6
bl __stack_chk_fail
.L6:
mov w0, w1
ldp x29, x30, [sp], 64
.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 " sival_ptr = %p; "
.align 3
.LC1:
.string " *sival_ptr = %#jx\n"
.align 3
.LC2:
.string "timer_getoverrun"
.align 3
.LC3:
.string " overrun count = %d\n"
.text
.align 2
.type print_siginfo, %function
print_siginfo:
.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]
ldr x0, [x0, 24]
str x0, [sp, 40]
ldr x0, [sp, 24]
ldr x0, [x0, 24]
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr x0, [sp, 40]
ldr x0, [x0]
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr x0, [sp, 40]
ldr x0, [x0]
bl timer_getoverrun
str w0, [sp, 36]
ldr w0, [sp, 36]
cmn w0, #1
bne .L2
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl perror
mov w0, 1
bl exit
.L2:
ldr w1, [sp, 36]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size print_siginfo, .-print_siginfo
.section .rodata
.align 3
.LC4:
.string "Caught signal %d\n"
.text
.align 2
.type handler, %function
handler:
.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 w0, [sp, 44]
str x1, [sp, 32]
str x2, [sp, 24]
ldr w1, [sp, 44]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr x0, [sp, 32]
bl print_siginfo
mov x1, 1
ldr w0, [sp, 44]
bl signal
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size handler, .-handler
.section .rodata
.align 3
.LC5:
.string "Usage: %s <sleep-secs> <freq-nanosecs>\n"
.align 3
.LC6:
.string "Establishing handler for signal %d\n"
.align 3
.LC7:
.string "sigaction"
.align 3
.LC8:
.string "Blocking signal %d\n"
.align 3
.LC9:
.string "sigprocmask"
.align 3
.LC10:
.string "timer_create"
.align 3
.LC11:
.string "timer ID is %#jx\n"
.align 3
.LC12:
.string "timer_settime"
.align 3
.LC13:
.string "Sleeping for %d seconds\n"
.align 3
.LC14:
.string "Unblocking signal %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB8:
.cfi_startproc
stp x29, x30, [sp, -432]!
.cfi_def_cfa_offset 432
.cfi_offset 29, -432
.cfi_offset 30, -424
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, 424]
mov x1, 0
ldr w0, [sp, 28]
cmp w0, 3
beq .L5
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x0, [sp, 16]
ldr x0, [x0]
mov x2, x0
adrp x0, .LC5
add x1, x0, :lo12:.LC5
mov x0, x3
bl fprintf
mov w0, 1
bl exit
.L5:
bl __libc_current_sigrtmin
mov w1, w0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
mov w0, 4
str w0, [sp, 408]
adrp x0, handler
add x0, x0, :lo12:handler
str x0, [sp, 272]
add x0, sp, 272
add x0, x0, 8
bl sigemptyset
bl __libc_current_sigrtmin
mov w3, w0
add x0, sp, 272
mov x2, 0
mov x1, x0
mov w0, w3
bl sigaction
cmn w0, #1
bne .L6
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl perror
mov w0, 1
bl exit
.L6:
bl __libc_current_sigrtmin
mov w1, w0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
add x0, sp, 144
bl sigemptyset
bl __libc_current_sigrtmin
mov w1, w0
add x0, sp, 144
bl sigaddset
add x0, sp, 144
mov x2, 0
mov x1, x0
mov w0, 2
bl sigprocmask
cmn w0, #1
bne .L7
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl perror
mov w0, 1
bl exit
.L7:
str wzr, [sp, 92]
bl __libc_current_sigrtmin
str w0, [sp, 88]
add x0, sp, 32
str x0, [sp, 80]
add x1, sp, 32
add x0, sp, 80
mov x2, x1
mov x1, x0
mov w0, 0
bl timer_create
cmn w0, #1
bne .L8
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl perror
mov w0, 1
bl exit
.L8:
ldr x0, [sp, 32]
mov x1, x0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
ldr x0, [sp, 16]
add x0, x0, 16
ldr x0, [x0]
bl atoll
str x0, [sp, 40]
ldr x0, [sp, 40]
mov x1, 38067
movk x1, 0x26d6, lsl 16
movk x1, 0xbe8, lsl 32
movk x1, 0x112e, lsl 48
smulh x1, x0, x1
asr x1, x1, 26
asr x0, x0, 63
sub x0, x1, x0
str x0, [sp, 64]
ldr x1, [sp, 40]
mov x0, 38067
movk x0, 0x26d6, lsl 16
movk x0, 0xbe8, lsl 32
movk x0, 0x112e, lsl 48
smulh x0, x1, x0
asr x2, x0, 26
asr x0, x1, 63
sub x0, x2, x0
mov x2, 51712
movk x2, 0x3b9a, lsl 16
mul x0, x0, x2
sub x0, x1, x0
str x0, [sp, 72]
ldr x0, [sp, 64]
str x0, [sp, 48]
ldr x0, [sp, 72]
str x0, [sp, 56]
ldr x0, [sp, 32]
add x1, sp, 48
mov x3, 0
mov x2, x1
mov w1, 0
bl timer_settime
cmn w0, #1
bne .L9
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl perror
mov w0, 1
bl exit
.L9:
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl atoi
mov w1, w0
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl printf
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl atoi
bl sleep
bl __libc_current_sigrtmin
mov w1, w0
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl printf
add x0, sp, 144
mov x2, 0
mov x1, x0
mov w0, 1
bl sigprocmask
cmn w0, #1
bne .L10
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl perror
mov w0, 1
bl exit
.L10:
mov w0, 0
bl exit
.cfi_endproc
.LFE8:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global c
.data
.align 2
.type c, %object
.size c, 4
c:
.word 3
.section .rodata
.align 3
.LC0:
.string "the value of c inside func is %d\n"
.text
.align 2
.global func
.type func, %function
func:
.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 w0, [sp, 28]
mov w0, 8
str w0, [sp, 44]
ldr w1, [sp, 44]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w1, [sp, 44]
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size func, .-func
.section .rodata
.align 3
.LC1:
.string "%d\n"
.align 3
.LC2:
.string "the value of c inside main is %d"
.text
.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, 5
str w0, [sp, 24]
ldr w0, [sp, 24]
bl func
str w0, [sp, 28]
ldr w1, [sp, 24]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w1, [sp, 28]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
mov w0, 0
ldp x29, x30, [sp], 32
.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
.section .rodata
.align 3
.LC0:
.string "testinstrlib.so"
.align 3
.LC1:
.string "Library not found"
.align 3
.LC2:
.string "testinstrlib"
.align 3
.LC3:
.string "Function not found"
.text
.align 2
.global testinstr
.type testinstr, %function
testinstr:
.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]
mov w1, 2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl dlopen
str x0, [sp, 32]
ldr x0, [sp, 32]
cmp x0, 0
bne .L2
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
bl abort
.L2:
adrp x0, .LC2
add x1, x0, :lo12:.LC2
ldr x0, [sp, 32]
bl dlsym
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L3
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
bl abort
.L3:
ldr x2, [sp, 40]
ldr w1, [sp, 20]
ldr x0, [sp, 24]
blr x2
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size testinstr, .-testinstr
.section .rodata
.align 3
.LC4:
.string "file: %s\n"
.align 3
.LC5:
.string "Running: %s\n"
.align 3
.LC6:
.string "open"
.align 3
.LC7:
.string "lseek (SEEK_END)"
.align 3
.LC8:
.string "lseek (SEEK_SET)"
.align 3
.LC9:
.string "len: %ld\n"
.align 3
.LC10:
.string "malloc"
.align 3
.LC11:
.string "read"
.align 3
.LC12:
.string "Running: %s: (%zd bytes)\n"
.align 3
.LC13:
.string "Done: %s: (%zd bytes)\n"
.text
.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
str w0, [sp, 28]
str x1, [sp, 16]
mov w0, -1
str w0, [sp, 44]
str xzr, [sp, 48]
mov w0, -1
str w0, [sp, 40]
ldr w0, [sp, 28]
cmp w0, 2
beq .L5
mov w0, 1
b .L6
.L5:
ldr x0, [sp, 16]
ldr x0, [x0, 8]
str x0, [sp, 56]
ldr x1, [sp, 56]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr x2, [sp, 56]
adrp x0, .LC5
add x1, x0, :lo12:.LC5
mov w0, 2
bl dprintf
mov w1, 0
ldr x0, [sp, 56]
bl open
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
bge .L7
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl perror
b .L8
.L7:
mov w2, 2
mov x1, 0
ldr w0, [sp, 44]
bl lseek
str x0, [sp, 64]
ldr x0, [sp, 64]
cmp x0, 0
bge .L9
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl perror
b .L8
.L9:
mov w2, 0
mov x1, 0
ldr w0, [sp, 44]
bl lseek
cmp x0, 0
beq .L10
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl perror
b .L8
.L10:
ldr x1, [sp, 64]
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
ldr x0, [sp, 64]
bl malloc
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
bne .L11
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl perror
b .L8
.L11:
ldr x0, [sp, 64]
mov x2, x0
ldr x1, [sp, 48]
ldr w0, [sp, 44]
bl read
str x0, [sp, 72]
ldr x0, [sp, 64]
ldr x1, [sp, 72]
cmp x1, x0
beq .L12
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl perror
b .L8
.L12:
ldr x3, [sp, 72]
ldr x2, [sp, 56]
adrp x0, .LC12
add x1, x0, :lo12:.LC12
mov w0, 2
bl dprintf
ldr x0, [sp, 64]
mov w1, w0
ldr x0, [sp, 48]
bl testinstr
ldr x3, [sp, 72]
ldr x2, [sp, 56]
adrp x0, .LC13
add x1, x0, :lo12:.LC13
mov w0, 2
bl dprintf
str wzr, [sp, 40]
.L8:
ldr x0, [sp, 48]
cmp x0, 0
beq .L13
ldr x0, [sp, 48]
bl free
.L13:
ldr w0, [sp, 44]
cmn w0, #1
beq .L14
ldr w0, [sp, 44]
bl close
.L14:
ldr w0, [sp, 40]
.L6:
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
.align 2
.global bit
.type bit, %function
bit:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
str w1, [sp, 8]
ldr w0, [sp, 8]
ldr w1, [sp, 12]
asr w0, w1, w0
and w0, w0, 1
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size bit, .-bit
.align 2
.global set_bit
.type set_bit, %function
set_bit:
.LFB1:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
str w1, [sp, 8]
ldr w0, [sp, 8]
mov w1, 1
lsl w1, w1, w0
ldr w0, [sp, 12]
orr w0, w1, w0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size set_bit, .-set_bit
.align 2
.global clear_bit
.type clear_bit, %function
clear_bit:
.LFB2:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
str w1, [sp, 8]
ldr w0, [sp, 8]
mov w1, 1
lsl w0, w1, w0
mvn w1, w0
ldr w0, [sp, 12]
and w0, w1, w0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size clear_bit, .-clear_bit
.align 2
.global myslice
.type myslice, %function
myslice:
.LFB3:
.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]
mov w1, 10
ldr w0, [sp, 28]
bl set_bit
str w0, [sp, 28]
mov w1, 6
ldr w0, [sp, 28]
bl set_bit
str w0, [sp, 28]
mov w1, 4
ldr w0, [sp, 28]
bl set_bit
str w0, [sp, 28]
mov w1, 1
ldr w0, [sp, 28]
bl clear_bit
str w0, [sp, 28]
ldr w0, [sp, 28]
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size myslice, .-myslice
.section .rodata
.align 3
.LC0:
.string "slice(%d) produced %d but %d was expected.\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB4:
.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
mov w0, -999
str w0, [sp, 44]
b .L10
.L13:
ldr w0, [sp, 44]
bl slice
mov w19, w0
ldr w0, [sp, 44]
bl myslice
cmp w19, w0
beq .L11
ldr w0, [sp, 44]
bl slice
mov w19, w0
ldr w0, [sp, 44]
bl myslice
mov w3, w0
mov w2, w19
ldr w1, [sp, 44]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 1
b .L12
.L11:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L10:
ldr w1, [sp, 44]
mov w0, 19999
cmp w1, w0
ble .L13
mov w0, 0
.L12:
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
.LFE4:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Digite um numero: "
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "O dobro de %d eh %d, o triplo %d e a raiz quadrada %.2f!\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
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
add x0, sp, 24
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 24]
lsl w0, w0, 1
str w0, [sp, 28]
ldr w1, [sp, 24]
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
str w0, [sp, 32]
ldr w0, [sp, 24]
scvtf d0, w0
bl sqrt
fcvt s0, d0
str s0, [sp, 36]
ldr w0, [sp, 24]
ldr s0, [sp, 36]
fcvt d0, s0
ldr w3, [sp, 32]
ldr w2, [sp, 28]
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, 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
.global IID_ID3DXMatrixStack
.section .rodata
.align 3
.type IID_ID3DXMatrixStack, %object
.size IID_ID3DXMatrixStack, 24
IID_ID3DXMatrixStack:
.xword 3347602343
.hword -1648
.hword 20455
.ascii "\222-\205\025\344w\335\205"
.zero 4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global search1
.type search1, %function
search1:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
str w2, [sp]
strb wzr, [sp, 27]
str wzr, [sp, 28]
b .L2
.L9:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp]
cmp w1, w0
bne .L3
ldr w0, [sp, 28]
b .L4
.L3:
ldrsw x0, [sp, 28]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp]
cmp w1, w0
bne .L5
ldr w0, [sp, 28]
add w0, w0, 1
b .L4
.L5:
ldr x0, [sp, 8]
ldr w1, [x0]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x2, [sp, 8]
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
ble .L6
mov w0, 1
strb w0, [sp, 27]
.L6:
ldrb w0, [sp, 27]
cmp w0, 0
beq .L7
ldr x0, [sp, 8]
ldr w1, [x0]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x2, [sp, 8]
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
beq .L8
ldr x0, [sp, 8]
ldr w1, [x0]
ldrsw x0, [sp, 28]
add x0, x0, 1
lsl x0, x0, 2
ldr x2, [sp, 8]
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
bne .L7
.L8:
mov w0, -1
b .L4
.L7:
ldr w0, [sp, 28]
add w0, w0, 2
str w0, [sp, 28]
.L2:
ldr w1, [sp, 28]
ldr w0, [sp, 4]
cmp w1, w0
blt .L9
mov w0, -1
.L4:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size search1, .-search1
.align 2
.global search
.type search, %function
search:
.LFB1:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
str w2, [sp]
strb wzr, [sp, 27]
str wzr, [sp, 28]
b .L11
.L16:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp]
cmp w1, w0
bne .L12
ldr w0, [sp, 28]
b .L13
.L12:
ldr x0, [sp, 8]
ldr w1, [x0]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x2, [sp, 8]
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
ble .L14
mov w0, 1
strb w0, [sp, 27]
.L14:
ldrb w0, [sp, 27]
cmp w0, 0
beq .L15
ldr x0, [sp, 8]
ldr w1, [x0]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x2, [sp, 8]
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
bne .L15
mov w0, -1
b .L13
.L15:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L11:
ldr w1, [sp, 28]
ldr w0, [sp, 4]
cmp w1, w0
blt .L16
mov w0, -1
.L13:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size search, .-search
.section .rodata
.align 3
.LC1:
.string "%d, "
.text
.align 2
.global pr_array
.type pr_array, %function
pr_array:
.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 x0, [sp, 24]
str w1, [sp, 20]
str wzr, [sp, 44]
b .L18
.L19:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr 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]
.L18:
ldr w1, [sp, 44]
ldr w0, [sp, 20]
cmp w1, w0
blt .L19
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
.LFE2:
.size pr_array, .-pr_array
.section .rodata
.align 3
.LC2:
.string "d=%d, index=%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB3:
.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
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 32
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr q0, [x1, 32]
str q0, [x0, 32]
ldr w1, [x1, 48]
str w1, [x0, 48]
mov w0, 4
str w0, [sp, 28]
add x0, sp, 32
mov w1, 13
bl pr_array
add x0, sp, 32
ldr w2, [sp, 28]
mov w1, 13
bl search1
mov w2, w0
ldr w1, [sp, 28]
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, 88]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L22
bl __stack_chk_fail
.L22:
mov w0, w1
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size main, .-main
.section .rodata
.align 3
.LC0:
.word 15
.word 16
.word 19
.word 1
.word 3
.word 4
.word 7
.word 15
.word 16
.word 19
.word 1
.word 3
.word 4
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global PI
.section .rodata
.align 2
.type PI, %object
.size PI, 4
PI:
.word 1078530011
.text
.align 2
.global Array3d
.type Array3d, %function
Array3d:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -80
mov x19, x8
str w0, [sp, 44]
ldr w0, [sp, 44]
str w0, [sp, 64]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
bl malloc
str x0, [sp, 72]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
bl malloc
str x0, [sp, 80]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
bl malloc
str x0, [sp, 88]
str wzr, [sp, 60]
b .L2
.L3:
ldr x1, [sp, 88]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x1, x1, x0
str wzr, [x1]
ldr x2, [sp, 80]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x0, x2, x0
ldr s0, [x1]
str s0, [x0]
ldr x2, [sp, 72]
ldrsw x1, [sp, 60]
lsl x1, x1, 2
add x1, x2, x1
ldr s0, [x0]
str s0, [x1]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L2:
ldr w1, [sp, 60]
ldr w0, [sp, 44]
cmp w1, w0
blt .L3
mov x1, x19
add x0, sp, 64
ldp q0, q1, [x0]
stp q0, q1, [x1]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size Array3d, .-Array3d
.align 2
.global eval
.type eval, %function
eval:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -80
mov x19, x8
str x0, [sp, 40]
str w1, [sp, 36]
ldr w0, [sp, 36]
str w0, [sp, 64]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
bl malloc
str x0, [sp, 72]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
bl malloc
str x0, [sp, 80]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
bl malloc
str x0, [sp, 88]
str wzr, [sp, 60]
b .L6
.L7:
ldr w1, [sp, 60]
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [sp, 40]
add x1, x1, x0
ldr x2, [sp, 72]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x0, x2, x0
ldr s0, [x1]
str s0, [x0]
ldr w1, [sp, 60]
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sxtw x0, w0
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 40]
add x1, x1, x0
ldr x2, [sp, 80]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x0, x2, x0
ldr s0, [x1]
str s0, [x0]
ldr w1, [sp, 60]
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sxtw x0, w0
add x0, x0, 2
lsl x0, x0, 2
ldr x1, [sp, 40]
add x1, x1, x0
ldr x2, [sp, 88]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x0, x2, x0
ldr s0, [x1]
str s0, [x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L6:
ldr w1, [sp, 60]
ldr w0, [sp, 36]
cmp w1, w0
blt .L7
mov x1, x19
add x0, sp, 64
ldp q0, q1, [x0]
stp q0, q1, [x1]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size eval, .-eval
.section .rodata
.align 3
.LC0:
.string "%f %f %f\n"
.text
.align 2
.global print
.type print, %function
print:
.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
mov x19, x0
str wzr, [sp, 44]
b .L10
.L11:
ldr x1, [x19, 8]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
fcvt d3, s0
ldr x1, [x19, 16]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
fcvt d1, s0
ldr x1, [x19, 24]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
fcvt d0, s0
fmov d2, d0
fmov d0, d3
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L10:
ldr w0, [x19]
ldr w1, [sp, 44]
cmp w1, w0
blt .L11
nop
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
.LFE8:
.size print, .-print
.section .rodata
.align 3
.LC1:
.string "%f %f "
.align 3
.LC2:
.string " quad\n"
.text
.align 2
.global fileprint
.type fileprint, %function
fileprint:
.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]
mov x19, x1
str wzr, [sp, 60]
b .L13
.L14:
ldr x1, [x19, 8]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
fcvt d3, s0
ldr x1, [x19, 16]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
fcvt d1, s0
ldr x1, [x19, 24]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
fcvt d0, s0
fmov d2, d0
fmov d0, d3
adrp x0, .LC1
add x1, x0, :lo12:.LC1
ldr x0, [sp, 40]
bl fprintf
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L13:
ldr w0, [x19]
ldr w1, [sp, 60]
cmp w1, w0
blt .L14
ldr x3, [sp, 40]
mov x2, 6
mov x1, 1
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl fwrite
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
.LFE9:
.size fileprint, .-fileprint
.align 2
.global Rotate
.type Rotate, %function
Rotate:
.LFB10:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str x19, [sp, 16]
stp d8, d9, [sp, 32]
.cfi_offset 19, -80
.cfi_offset 72, -64
.cfi_offset 73, -56
mov x19, x0
str x1, [sp, 56]
str s0, [sp, 52]
ldr x0, [sp, 56]
ldr s1, [x0]
ldr x0, [sp, 56]
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [sp, 56]
add x0, x0, 4
ldr s2, [x0]
ldr x0, [sp, 56]
add x0, x0, 4
ldr s0, [x0]
fmul s0, s2, s0
fadd s1, s1, s0
ldr x0, [sp, 56]
add x0, x0, 8
ldr s2, [x0]
ldr x0, [sp, 56]
add x0, x0, 8
ldr s0, [x0]
fmul s0, s2, s0
fadd s0, s1, s0
fcvt d0, s0
bl sqrt
fcvt s0, d0
str s0, [sp, 68]
ldr x0, [sp, 56]
ldr s1, [x0]
ldr s0, [sp, 68]
fdiv s0, s1, s0
str s0, [sp, 72]
ldr x0, [sp, 56]
add x0, x0, 4
ldr s1, [x0]
ldr s0, [sp, 68]
fdiv s0, s1, s0
str s0, [sp, 76]
ldr x0, [sp, 56]
add x0, x0, 8
ldr s1, [x0]
ldr s0, [sp, 68]
fdiv s0, s1, s0
str s0, [sp, 80]
str wzr, [sp, 64]
b .L16
.L17:
ldr x1, [x19, 8]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 84]
ldr x1, [x19, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 88]
ldr x1, [x19, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 92]
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d8, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d1, d0
fmov d0, 1.0e+0
fsub d1, d0, d1
ldr s0, [sp, 72]
fcvt d0, s0
fmul d1, d1, d0
ldr s0, [sp, 72]
fcvt d0, s0
fmul d0, d1, d0
fadd d1, d8, d0
ldr s0, [sp, 84]
fcvt d0, s0
fmul d8, d1, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d1, d0
fmov d0, 1.0e+0
fsub d1, d0, d1
ldr s0, [sp, 72]
fcvt d0, s0
fmul d1, d1, d0
ldr s0, [sp, 76]
fcvt d0, s0
fmul d9, d1, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl sin
fmov d1, d0
ldr s0, [sp, 80]
fcvt d0, s0
fmul d0, d1, d0
fsub d1, d9, d0
ldr s0, [sp, 88]
fcvt d0, s0
fmul d0, d1, d0
fadd d8, d8, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d1, d0
fmov d0, 1.0e+0
fsub d1, d0, d1
ldr s0, [sp, 72]
fcvt d0, s0
fmul d1, d1, d0
ldr s0, [sp, 80]
fcvt d0, s0
fmul d9, d1, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl sin
fmov d1, d0
ldr s0, [sp, 76]
fcvt d0, s0
fmul d0, d1, d0
fadd d1, d9, d0
ldr s0, [sp, 92]
fcvt d0, s0
fmul d0, d1, d0
fadd d0, d8, d0
ldr x1, [x19, 8]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d1, d0
fmov d0, 1.0e+0
fsub d1, d0, d1
ldr s0, [sp, 76]
fcvt d0, s0
fmul d1, d1, d0
ldr s0, [sp, 72]
fcvt d0, s0
fmul d8, d1, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl sin
fmov d1, d0
ldr s0, [sp, 80]
fcvt d0, s0
fmul d0, d1, d0
fadd d1, d8, d0
ldr s0, [sp, 84]
fcvt d0, s0
fmul d8, d1, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d9, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d1, d0
fmov d0, 1.0e+0
fsub d1, d0, d1
ldr s0, [sp, 76]
fcvt d0, s0
fmul d1, d1, d0
ldr s0, [sp, 76]
fcvt d0, s0
fmul d0, d1, d0
fadd d1, d9, d0
ldr s0, [sp, 88]
fcvt d0, s0
fmul d0, d1, d0
fadd d8, d8, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d1, d0
fmov d0, 1.0e+0
fsub d1, d0, d1
ldr s0, [sp, 76]
fcvt d0, s0
fmul d1, d1, d0
ldr s0, [sp, 80]
fcvt d0, s0
fmul d9, d1, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl sin
fmov d1, d0
ldr s0, [sp, 72]
fcvt d0, s0
fmul d0, d1, d0
fsub d1, d9, d0
ldr s0, [sp, 92]
fcvt d0, s0
fmul d0, d1, d0
fadd d0, d8, d0
ldr x1, [x19, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d1, d0
fmov d0, 1.0e+0
fsub d1, d0, d1
ldr s0, [sp, 80]
fcvt d0, s0
fmul d1, d1, d0
ldr s0, [sp, 72]
fcvt d0, s0
fmul d8, d1, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl sin
fmov d1, d0
ldr s0, [sp, 76]
fcvt d0, s0
fmul d0, d1, d0
fsub d1, d8, d0
ldr s0, [sp, 84]
fcvt d0, s0
fmul d8, d1, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d1, d0
fmov d0, 1.0e+0
fsub d1, d0, d1
ldr s0, [sp, 80]
fcvt d0, s0
fmul d1, d1, d0
ldr s0, [sp, 76]
fcvt d0, s0
fmul d9, d1, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl sin
fmov d1, d0
ldr s0, [sp, 72]
fcvt d0, s0
fmul d0, d1, d0
fadd d1, d9, d0
ldr s0, [sp, 88]
fcvt d0, s0
fmul d0, d1, d0
fadd d8, d8, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d9, d0
ldr s0, [sp, 52]
fcvt d0, s0
bl cos
fmov d1, d0
fmov d0, 1.0e+0
fsub d1, d0, d1
ldr s0, [sp, 80]
fcvt d0, s0
fmul d1, d1, d0
ldr s0, [sp, 80]
fcvt d0, s0
fmul d0, d1, d0
fadd d1, d9, d0
ldr s0, [sp, 92]
fcvt d0, s0
fmul d0, d1, d0
fadd d0, d8, d0
ldr x1, [x19, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L16:
ldr w0, [x19]
ldr w1, [sp, 64]
cmp w1, w0
blt .L17
nop
nop
ldp d8, d9, [sp, 32]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_restore 72
.cfi_restore 73
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size Rotate, .-Rotate
.align 2
.global RotateX
.type RotateX, %function
RotateX:
.LFB11:
.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]
stp d8, d9, [sp, 32]
.cfi_offset 19, -64
.cfi_offset 72, -48
.cfi_offset 73, -40
mov x19, x0
str s0, [sp, 60]
str wzr, [sp, 64]
b .L19
.L20:
ldr x1, [x19, 8]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 68]
ldr x1, [x19, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 72]
ldr x1, [x19, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 76]
ldr x1, [x19, 8]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 68]
str s0, [x0]
ldr s0, [sp, 72]
fcvt d8, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl cos
fmul d8, d8, d0
ldr s0, [sp, 76]
fcvt d9, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl sin
fmul d0, d9, d0
fsub d0, d8, d0
ldr x1, [x19, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr s0, [sp, 72]
fcvt d8, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl sin
fmul d8, d8, d0
ldr s0, [sp, 76]
fcvt d9, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl cos
fmul d0, d9, d0
fadd d0, d8, d0
ldr x1, [x19, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L19:
ldr w0, [x19]
ldr w1, [sp, 64]
cmp w1, w0
blt .L20
nop
nop
ldp d8, d9, [sp, 32]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_restore 72
.cfi_restore 73
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size RotateX, .-RotateX
.align 2
.global RotateY
.type RotateY, %function
RotateY:
.LFB12:
.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]
stp d8, d9, [sp, 32]
.cfi_offset 19, -64
.cfi_offset 72, -48
.cfi_offset 73, -40
mov x19, x0
str s0, [sp, 60]
str wzr, [sp, 64]
b .L22
.L23:
ldr x1, [x19, 8]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 68]
ldr x1, [x19, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 72]
ldr x1, [x19, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 76]
ldr s0, [sp, 76]
fcvt d8, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl sin
fmul d8, d8, d0
ldr s0, [sp, 68]
fcvt d9, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl cos
fmul d0, d9, d0
fadd d0, d8, d0
ldr x1, [x19, 8]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr x1, [x19, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 72]
str s0, [x0]
ldr s0, [sp, 76]
fcvt d8, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl cos
fmul d8, d8, d0
ldr s0, [sp, 68]
fcvt d9, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl sin
fmul d0, d9, d0
fsub d0, d8, d0
ldr x1, [x19, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L22:
ldr w0, [x19]
ldr w1, [sp, 64]
cmp w1, w0
blt .L23
nop
nop
ldp d8, d9, [sp, 32]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_restore 72
.cfi_restore 73
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size RotateY, .-RotateY
.align 2
.global RotateZ
.type RotateZ, %function
RotateZ:
.LFB13:
.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]
stp d8, d9, [sp, 32]
.cfi_offset 19, -64
.cfi_offset 72, -48
.cfi_offset 73, -40
mov x19, x0
str s0, [sp, 60]
str wzr, [sp, 64]
b .L25
.L26:
ldr x1, [x19, 8]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 68]
ldr x1, [x19, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 72]
ldr x1, [x19, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 76]
ldr s0, [sp, 68]
fcvt d8, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl cos
fmul d8, d8, d0
ldr s0, [sp, 72]
fcvt d9, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl sin
fmul d0, d9, d0
fsub d0, d8, d0
ldr x1, [x19, 8]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr s0, [sp, 68]
fcvt d8, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl sin
fmul d8, d8, d0
ldr s0, [sp, 72]
fcvt d9, s0
ldr s0, [sp, 60]
fcvt d0, s0
bl cos
fmul d0, d9, d0
fadd d0, d8, d0
ldr x1, [x19, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr x1, [x19, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 76]
str s0, [x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L25:
ldr w0, [x19]
ldr w1, [sp, 64]
cmp w1, w0
blt .L26
nop
nop
ldp d8, d9, [sp, 32]
ldr x19, [sp, 16]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_restore 72
.cfi_restore 73
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size RotateZ, .-RotateZ
.align 2
.global Perspective
.type Perspective, %function
Perspective:
.LFB14:
.cfi_startproc
str x19, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 19, -48
mov x19, x0
str s0, [sp, 28]
str s1, [sp, 24]
str s2, [sp, 20]
str wzr, [sp, 32]
b .L28
.L29:
ldr x1, [x19, 8]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 36]
ldr x1, [x19, 16]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 40]
ldr x1, [x19, 24]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 44]
ldr s1, [sp, 28]
ldr s0, [sp, 44]
fsub s1, s1, s0
ldr s2, [sp, 24]
ldr s0, [sp, 20]
fsub s0, s2, s0
fdiv s1, s1, s0
ldr x1, [x19, 8]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 36]
fmul s0, s1, s0
str s0, [x0]
ldr s1, [sp, 28]
ldr s0, [sp, 44]
fsub s1, s1, s0
ldr s2, [sp, 24]
ldr s0, [sp, 20]
fsub s0, s2, s0
fdiv s1, s1, s0
ldr x1, [x19, 16]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 40]
fmul s0, s1, s0
str s0, [x0]
ldr x1, [x19, 24]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 44]
str s0, [x0]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L28:
ldr w0, [x19]
ldr w1, [sp, 32]
cmp w1, w0
blt .L29
nop
nop
ldr x19, [sp], 48
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size Perspective, .-Perspective
.data
.align 2
.type yrot, %object
.size yrot, 4
yrot:
.word 1110704128
.section .rodata
.align 3
.LC3:
.string "wb"
.align 3
.LC4:
.string "main.ps"
.align 3
.LC5:
.ascii "%%!PS-Adobe-3.0 EPSF-3.0\n%%%%BoundingBox: -250 -25"
.string "0 250 250\n/rgb {setrgbcolor} def\n/np {newpath} def\n/cp {closepath} def\n/mt {moveto} def\n/rmt {rmoveto} def\n/ll {lineto} def\n/rl {rlineto} def\n/st {stroke} def\n/lw {setlinewidth} def\n/line {np mt ll st} def\n/quad {np mt ll ll ll cp st} def\n0 0 1 rgb\n0.2 lw\n"
.align 3
.LC6:
.string "\nshowpage\n%%%%EOF\n"
.text
.align 2
.global display
.type display, %function
display:
.LFB16:
.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, 52429
movk w0, 0x3dcc, lsl 16
fmov s0, w0
str s0, [sp, 56]
mov w0, 1112014848
fmov s0, w0
str s0, [sp, 60]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl fopen
str x0, [sp, 80]
adrp x0, .LC5
add x1, x0, :lo12:.LC5
ldr x0, [sp, 80]
bl fprintf
fmov s0, -3.0e+0
str s0, [sp, 48]
b .L31
.L34:
fmov s0, -3.0e+0
str s0, [sp, 52]
b .L32
.L33:
ldr s1, [sp, 52]
ldr s0, [sp, 48]
bl fun
str s0, [sp, 64]
ldr s1, [sp, 48]
ldr s0, [sp, 60]
fmul s0, s1, s0
str s0, [sp, 120]
ldr s0, [sp, 64]
str s0, [sp, 124]
ldr s1, [sp, 52]
ldr s0, [sp, 60]
fmul s0, s1, s0
str s0, [sp, 128]
ldr s1, [sp, 48]
ldr s0, [sp, 56]
fadd s0, s1, s0
ldr s1, [sp, 52]
bl fun
str s0, [sp, 68]
ldr s1, [sp, 48]
ldr s0, [sp, 56]
fadd s1, s1, s0
ldr s0, [sp, 60]
fmul s0, s1, s0
str s0, [sp, 132]
ldr s0, [sp, 68]
str s0, [sp, 136]
ldr s1, [sp, 52]
ldr s0, [sp, 60]
fmul s0, s1, s0
str s0, [sp, 140]
ldr s1, [sp, 48]
ldr s0, [sp, 56]
fadd s2, s1, s0
ldr s1, [sp, 52]
ldr s0, [sp, 56]
fadd s0, s1, s0
fmov s1, s0
fmov s0, s2
bl fun
str s0, [sp, 72]
ldr s1, [sp, 48]
ldr s0, [sp, 56]
fadd s1, s1, s0
ldr s0, [sp, 60]
fmul s0, s1, s0
str s0, [sp, 144]
ldr s0, [sp, 72]
str s0, [sp, 148]
ldr s1, [sp, 52]
ldr s0, [sp, 56]
fadd s1, s1, s0
ldr s0, [sp, 60]
fmul s0, s1, s0
str s0, [sp, 152]
ldr s1, [sp, 52]
ldr s0, [sp, 56]
fadd s0, s1, s0
fmov s1, s0
ldr s0, [sp, 48]
bl fun
str s0, [sp, 76]
ldr s1, [sp, 48]
ldr s0, [sp, 60]
fmul s0, s1, s0
str s0, [sp, 156]
ldr s0, [sp, 76]
str s0, [sp, 160]
ldr s1, [sp, 52]
ldr s0, [sp, 56]
fadd s1, s1, s0
ldr s0, [sp, 60]
fmul s0, s1, s0
str s0, [sp, 164]
add x0, sp, 120
add x1, sp, 88
mov x8, x1
mov w1, 4
bl eval
adrp x0, yrot
add x0, x0, :lo12:yrot
ldr s2, [x0]
add x0, sp, 16
add x1, sp, 88
ldp q0, q1, [x1]
stp q0, q1, [x0]
add x0, sp, 16
fmov s0, s2
bl RotateY
mov w0, 4059
movk w0, 0x4049, lsl 16
fmov s1, w0
fmov s0, 3.0e+1
fmul s0, s1, s0
mov w0, 1135869952
fmov s1, w0
fdiv s2, s0, s1
add x0, sp, 16
add x1, sp, 88
ldp q0, q1, [x1]
stp q0, q1, [x0]
add x0, sp, 16
fmov s0, s2
bl RotateX
add x0, sp, 16
add x1, sp, 88
ldp q0, q1, [x1]
stp q0, q1, [x0]
add x0, sp, 16
mov x1, x0
ldr x0, [sp, 80]
bl fileprint
ldr s1, [sp, 52]
ldr s0, [sp, 56]
fadd s0, s1, s0
str s0, [sp, 52]
.L32:
ldr s1, [sp, 52]
fmov s0, 3.0e+0
fcmpe s1, s0
bmi .L33
ldr s1, [sp, 48]
ldr s0, [sp, 56]
fadd s0, s1, s0
str s0, [sp, 48]
.L31:
ldr s1, [sp, 48]
fmov s0, 3.0e+0
fcmpe s1, s0
bmi .L34
adrp x0, .LC6
add x1, x0, :lo12:.LC6
ldr x0, [sp, 80]
bl fprintf
ldr x0, [sp, 80]
bl fclose
adrp x0, yrot
add x0, x0, :lo12:yrot
ldr s0, [x0]
fcvt d0, s0
adrp x0, .LC7
ldr d1, [x0, #:lo12:.LC7]
fadd d0, d0, d1
fcvt s0, d0
adrp x0, yrot
add x0, x0, :lo12:yrot
str s0, [x0]
nop
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 .L35
bl __stack_chk_fail
.L35:
ldp x29, x30, [sp], 176
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE16:
.size display, .-display
.align 2
.global main
.type main, %function
main:
.LFB17:
.cfi_startproc
stp x29, x30, [sp, -16]!
.cfi_def_cfa_offset 16
.cfi_offset 29, -16
.cfi_offset 30, -8
mov x29, sp
bl display
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE17:
.size main, .-main
.section .rodata
.align 3
.LC7:
.word -1717986918
.word 1069128089
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global filename
.section .rodata
.align 3
.LC0:
.string "test9"
.section .data.rel.local,"aw"
.align 3
.type filename, %object
.size filename, 8
filename:
.xword .LC0
.global tag
.section .rodata
.align 3
.LC1:
.string "globaliz*"
.section .data.rel.local
.align 3
.type tag, %object
.size tag, 8
tag:
.xword .LC1
.global taga
.align 3
.type taga, %object
.size taga, 8
taga:
.xword .LC1
.global tagb
.section .rodata
.align 3
.LC2:
.string "trade"
.section .data.rel.local
.align 3
.type tagb, %object
.size tagb, 8
tagb:
.xword .LC2
.global bigstring
.bss
.align 3
.type bigstring, %object
.size bigstring, 18000000
bigstring:
.zero 18000000
.global letter
.align 2
.type letter, %object
.size letter, 4
letter:
.zero 4
.global numprogs
.align 2
.type numprogs, %object
.size numprogs, 4
numprogs:
.zero 4
.global headers
.align 3
.type headers, %object
.size headers, 200000
headers:
.zero 200000
.global titles
.align 3
.type titles, %object
.size titles, 12500
titles:
.zero 12500
.global wordnum
.align 3
.type wordnum, %object
.size wordnum, 1000
wordnum:
.zero 1000
.global titlens
.align 3
.type titlens, %object
.size titlens, 1000
titlens:
.zero 1000
.global titlenums
.align 3
.type titlenums, %object
.size titlenums, 1000
titlenums:
.zero 1000
.global table
.align 3
.type table, %object
.size table, 40000000
table:
.zero 40000000
.global LEN
.align 2
.type LEN, %object
.size LEN, 4
LEN:
.zero 4
.global hlen
.align 2
.type hlen, %object
.size hlen, 4
hlen:
.zero 4
.global title
.align 3
.type title, %object
.size title, 50
title:
.zero 50
.global titlearray
.align 3
.type titlearray, %object
.size titlearray, 20000
titlearray:
.zero 20000
.global maxid
.align 2
.type maxid, %object
.size maxid, 4
maxid:
.zero 4
.global date
.align 3
.type date, %object
.size date, 25
date:
.zero 25
.global titlen
.align 2
.type titlen, %object
.size titlen, 4
titlen:
.zero 4
.global datlen
.align 2
.type datlen, %object
.size datlen, 4
datlen:
.zero 4
.global n1
.align 2
.type n1, %object
.size n1, 4
n1:
.zero 4
.global pri
.align 3
.type pri, %object
.size pri, 804
pri:
.zero 804
.global sec
.align 3
.type sec, %object
.size sec, 804
sec:
.zero 804
.global ter
.align 3
.type ter, %object
.size ter, 804
ter:
.zero 804
.section .rodata
.align 3
.LC3:
.string "r"
.align 3
.LC4:
.string "\nWarning: file exceeded %d chars\n"
.text
.align 2
.global getstring
.type getstring, %function
getstring:
.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, 36]
strb wzr, [sp, 34]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
ldr x0, [sp, 24]
bl fopen
str x0, [sp, 40]
b .L2
.L8:
ldrb w0, [sp, 35]
bl text
and w0, w0, 255
cmp w0, 0
bne .L3
ldrb w0, [sp, 34]
bl text
and w0, w0, 255
cmp w0, 0
beq .L3
ldr w0, [sp, 36]
add w1, w0, 1
str w1, [sp, 36]
adrp x1, bigstring
add x1, x1, :lo12:bigstring
sxtw x0, w0
strb wzr, [x1, x0]
.L3:
ldr w0, [sp, 36]
add w1, w0, 1
str w1, [sp, 36]
adrp x1, bigstring
add x1, x1, :lo12:bigstring
sxtw x0, w0
ldrb w2, [sp, 35]
strb w2, [x1, x0]
ldrb w0, [sp, 35]
strb w0, [sp, 34]
ldr w1, [sp, 36]
mov w0, 43135
movk w0, 0x112, lsl 16
cmp w1, w0
ble .L2
ldr w1, [sp, 36]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
b .L7
.L2:
ldr x0, [sp, 40]
bl getc
strb w0, [sp, 35]
ldr w0, [sp, 36]
cmp w0, 0
ble .L3
b .L8
.L7:
ldr w0, [sp, 36]
add w1, w0, 1
str w1, [sp, 36]
adrp x1, bigstring
add x1, x1, :lo12:bigstring
sxtw x0, w0
mov w2, -61
strb w2, [x1, x0]
ldr w0, [sp, 36]
add w1, w0, 1
str w1, [sp, 36]
adrp x1, bigstring
add x1, x1, :lo12:bigstring
sxtw x0, w0
mov w2, -1
strb w2, [x1, x0]
ldr x0, [sp, 40]
bl fclose
ldr w0, [sp, 36]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size getstring, .-getstring
.align 2
.global parseprogs
.type parseprogs, %function
parseprogs:
.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 w0, [sp, 28]
str wzr, [sp, 44]
adrp x0, letter
add x0, x0, :lo12:letter
ldr w1, [sp, 28]
str w1, [x0]
str wzr, [sp, 44]
b .L10
.L13:
ldr w0, [sp, 44]
bl readheader
str w0, [sp, 40]
adrp x0, hlen
add x0, x0, :lo12:hlen
ldr w0, [x0]
cmn w0, #1
beq .L11
ldr w0, [sp, 44]
bl readbody
mov w2, w0
adrp x0, wordnum
add x0, x0, :lo12:wordnum
ldrsw x1, [sp, 44]
str w2, [x0, x1, lsl 2]
.L11:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L10:
adrp x0, numprogs
add x0, x0, :lo12:numprogs
ldr w0, [x0]
ldr w1, [sp, 44]
cmp w1, w0
bge .L12
ldr w0, [sp, 40]
cmn w0, #1
bne .L13
.L12:
ldr w0, [sp, 44]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size parseprogs, .-parseprogs
.section .rodata
.align 3
.LC5:
.string "\nWarning: maximum header length exceeded at letter = %d and hstart = %d\n"
.text
.align 2
.global readheader
.type readheader, %function
readheader:
.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]
adrp x0, letter
add x0, x0, :lo12:letter
ldr w0, [x0]
str w0, [sp, 44]
b .L16
.L18:
adrp x0, letter
add x0, x0, :lo12:letter
ldr w0, [x0]
add w2, w0, 1
adrp x1, letter
add x1, x1, :lo12:letter
str w2, [x1]
ldr w1, [sp, 44]
sub w1, w0, w1
adrp x0, headers
add x3, x0, :lo12:headers
sxtw x2, w1
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, 5
add x0, x3, x0
add x0, x0, x2
ldrb w1, [sp, 39]
strb w1, [x0]
.L16:
adrp x0, letter
add x0, x0, :lo12:letter
ldr w2, [x0]
adrp x0, bigstring
add x1, x0, :lo12:bigstring
sxtw x0, w2
ldrb w0, [x1, x0]
strb w0, [sp, 39]
ldrb w0, [sp, 39]
cmp w0, 61
beq .L17
ldr w0, [sp, 44]
add w1, w0, 799
adrp x0, letter
add x0, x0, :lo12:letter
ldr w0, [x0]
cmp w1, w0
bge .L18
.L17:
adrp x0, letter
add x0, x0, :lo12:letter
ldr w0, [x0]
add w2, w0, 1
adrp x1, letter
add x1, x1, :lo12:letter
str w2, [x1]
ldr w1, [sp, 44]
sub w0, w0, w1
cmp w0, 799
ble .L19
adrp x0, letter
add x0, x0, :lo12:letter
ldr w0, [x0]
ldr w2, [sp, 44]
mov w1, w0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
mov w0, 800
str w0, [sp, 40]
b .L20
.L19:
adrp x0, letter
add x0, x0, :lo12:letter
ldr w1, [x0]
ldr w0, [sp, 44]
sub w0, w1, w0
str w0, [sp, 40]
adrp x0, headers
add x3, x0, :lo12:headers
ldrsw x2, [sp, 40]
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, 5
add x0, x3, x0
add x0, x0, x2
strb wzr, [x0]
ldr w0, [sp, 28]
bl striptitle
mov w2, w0
adrp x0, titlens
add x0, x0, :lo12:titlens
ldrsw x1, [sp, 28]
str w2, [x0, x1, lsl 2]
ldr w0, [sp, 28]
bl idmatch
mov w2, w0
adrp x0, titlenums
add x0, x0, :lo12:titlenums
ldrsw x1, [sp, 28]
str w2, [x0, x1, lsl 2]
.L20:
ldr w0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size readheader, .-readheader
.align 2
.global printtitle
.type printtitle, %function
printtitle:
.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 w0, [sp, 28]
str wzr, [sp, 44]
b .L23
.L25:
adrp x0, titles
add x3, x0, :lo12:titles
ldrsw x2, [sp, 44]
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, 1
add x0, x3, x0
add x0, x0, x2
ldrb w0, [x0]
strb w0, [sp, 43]
ldrb w0, [sp, 43]
cmp w0, 0
beq .L24
ldrb w0, [sp, 43]
bl putchar
.L24:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L23:
adrp x0, titlens
add x0, x0, :lo12:titlens
ldrsw x1, [sp, 28]
ldr w0, [x0, x1, lsl 2]
ldr w1, [sp, 44]
cmp w1, w0
blt .L25
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size printtitle, .-printtitle
.align 2
.global striptitle
.type striptitle, %function
striptitle:
.LFB4:
.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 wzr, [sp, 36]
nop
.L27:
ldr w0, [sp, 36]
add w1, w0, 1
str w1, [sp, 36]
adrp x1, headers
add x3, x1, :lo12:headers
sxtw x2, w0
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, 5
add x0, x3, x0
add x0, x0, x2
ldrb w0, [x0]
cmp w0, 58
bne .L27
b .L28
.L29:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L28:
adrp x0, headers
add x3, x0, :lo12:headers
ldrsw x2, [sp, 36]
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, 5
add x0, x3, x0
add x0, x0, x2
ldrb w0, [x0]
bl text
and w0, w0, 255
cmp w0, 0
beq .L29
ldr w0, [sp, 36]
str w0, [sp, 40]
b .L30
.L31:
ldr w1, [sp, 36]
ldr w0, [sp, 40]
sub w1, w1, w0
adrp x0, titles
add x3, x0, :lo12:titles
sxtw x2, w1
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, 1
add x0, x3, x0
add x0, x0, x2
ldrb w1, [sp, 35]
strb w1, [x0]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L30:
adrp x0, headers
add x3, x0, :lo12:headers
ldrsw x2, [sp, 36]
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, 5
add x0, x3, x0
add x0, x0, x2
ldrb w0, [x0]
strb w0, [sp, 35]
ldrb w0, [sp, 35]
cmp w0, 10
bne .L31
ldr w1, [sp, 36]
ldr w0, [sp, 40]
sub w1, w1, w0
adrp x0, titles
add x3, x0, :lo12:titles
sxtw x2, w1
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, 1
add x0, x3, x0
add x0, x0, x2
strb wzr, [x0]
ldr w1, [sp, 36]
ldr w0, [sp, 40]
sub w0, w1, w0
str w0, [sp, 44]
ldr w0, [sp, 44]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size striptitle, .-striptitle
.align 2
.global readbody
.type readbody, %function
readbody:
.LFB5:
.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 wzr, [sp, 44]
adrp x0, letter
add x0, x0, :lo12:letter
ldr w2, [x0]
adrp x0, bigstring
add x1, x0, :lo12:bigstring
sxtw x0, w2
ldrb w0, [x1, x0]
strb w0, [sp, 42]
adrp x0, letter
add x0, x0, :lo12:letter
ldr w0, [x0]
add w1, w0, 1
adrp x0, letter
add x0, x0, :lo12:letter
str w1, [x0]
b .L34
.L37:
ldrb w0, [sp, 42]
bl text
and w0, w0, 255
cmp w0, 0
bne .L35
adrp x0, letter
add x0, x0, :lo12:letter
ldr w0, [x0]
sxtw x1, w0
adrp x0, bigstring
add x0, x0, :lo12:bigstring
add x2, x1, x0
adrp x0, table
add x0, x0, :lo12:table
ldrsw x1, [sp, 44]
ldrsw x4, [sp, 28]
mov x3, 20000
mul x3, x4, x3
add x1, x3, x1
str x2, [x0, x1, lsl 3]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L35:
ldrb w0, [sp, 43]
strb w0, [sp, 42]
adrp x0, letter
add x0, x0, :lo12:letter
ldr w0, [x0]
add w1, w0, 1
adrp x0, letter
add x0, x0, :lo12:letter
str w1, [x0]
.L34:
adrp x0, letter
add x0, x0, :lo12:letter
ldr w2, [x0]
adrp x0, bigstring
add x1, x0, :lo12:bigstring
sxtw x0, w2
ldrb w0, [x1, x0]
strb w0, [sp, 43]
ldrb w0, [sp, 43]
bl text
and w0, w0, 255
cmp w0, 0
beq .L35
b .L37
.cfi_endproc
.LFE5:
.size readbody, .-readbody
.align 2
.global text
.type text, %function
text:
.LFB6:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
strb w0, [sp, 15]
ldrb w0, [sp, 15]
cmp w0, 64
bls .L39
ldrb w0, [sp, 15]
cmp w0, 90
bls .L40
.L39:
ldrb w0, [sp, 15]
cmp w0, 96
bls .L41
ldrb w0, [sp, 15]
cmp w0, 122
bhi .L41
.L40:
ldrb w0, [sp, 15]
cmp w0, 96
bhi .L42
mov w0, 32
b .L43
.L42:
mov w0, 0
.L43:
ldrb w1, [sp, 15]
add w0, w0, w1
strb w0, [sp, 31]
b .L44
.L41:
ldrb w0, [sp, 15]
cmp w0, 39
bne .L45
mov w0, 39
strb w0, [sp, 31]
b .L44
.L45:
ldrb w0, [sp, 15]
cmp w0, 45
bne .L46
mov w0, 45
strb w0, [sp, 31]
b .L44
.L46:
ldrb w0, [sp, 15]
cmp w0, 47
bls .L47
ldrb w0, [sp, 15]
cmp w0, 57
bhi .L47
ldrb w0, [sp, 15]
strb w0, [sp, 31]
b .L44
.L47:
strb wzr, [sp, 31]
.L44:
ldrb w0, [sp, 31]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size text, .-text
.align 2
.global wildcmp
.type wildcmp, %function
wildcmp:
.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 x19, [sp, 16]
.cfi_offset 19, -48
str x0, [sp, 40]
str x1, [sp, 32]
str wzr, [sp, 60]
.L55:
ldrsw x0, [sp, 60]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 42
bne .L50
mov w0, 0
b .L51
.L50:
ldrsw x0, [sp, 60]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L52
ldrsw x0, [sp, 60]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
beq .L53
ldrsw x0, [sp, 60]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 10
bne .L52
.L53:
mov w0, 0
b .L51
.L52:
ldrsw x0, [sp, 60]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w19, [x0]
ldrsw x0, [sp, 60]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
bl text
and w0, w0, 255
cmp w19, w0
beq .L54
ldrsw x0, [sp, 60]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
mov w2, w0
ldrsw x0, [sp, 60]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
sub w0, w2, w0
b .L51
.L54:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
b .L55
.L51:
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
.LFE7:
.size wildcmp, .-wildcmp
.align 2
.global find
.type find, %function
find:
.LFB8:
.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, 44]
str x1, [sp, 32]
str x2, [sp, 24]
str wzr, [sp, 56]
str wzr, [sp, 60]
b .L57
.L60:
adrp x0, table
add x0, x0, :lo12:table
ldrsw x1, [sp, 56]
ldrsw x3, [sp, 44]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 32]
bl wildcmp
cmp w0, 0
bne .L58
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [sp, 56]
str w1, [x0]
.L58:
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L57:
adrp x0, wordnum
add x0, x0, :lo12:wordnum
ldrsw x1, [sp, 44]
ldr w0, [x0, x1, lsl 2]
ldr w1, [sp, 56]
cmp w1, w0
bge .L59
ldr w0, [sp, 60]
cmp w0, 200
ble .L60
.L59:
ldr w0, [sp, 60]
cmp w0, 0
bne .L61
mov w0, -1
str w0, [sp, 60]
.L61:
ldr x0, [sp, 24]
ldr w1, [sp, 60]
str w1, [x0]
ldr w0, [sp, 60]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size find, .-find
.align 2
.global near
.type near, %function
near:
.LFB9:
.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, 44]
str w1, [sp, 40]
str x2, [sp, 32]
str x3, [sp, 24]
str x4, [sp, 16]
str wzr, [sp, 56]
str wzr, [sp, 60]
str wzr, [sp, 64]
str wzr, [sp, 68]
b .L64
.L74:
adrp x0, table
add x0, x0, :lo12:table
ldrsw x1, [sp, 64]
ldrsw x3, [sp, 44]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 32]
bl wildcmp
str w0, [sp, 72]
adrp x0, table
add x0, x0, :lo12:table
ldrsw x1, [sp, 64]
ldrsw x3, [sp, 44]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 24]
bl wildcmp
str w0, [sp, 76]
ldr w0, [sp, 56]
cmp w0, 0
bne .L65
ldr w0, [sp, 72]
cmp w0, 0
bne .L66
mov w0, 1
str w0, [sp, 56]
ldr w0, [sp, 64]
str w0, [sp, 60]
b .L67
.L66:
ldr w0, [sp, 76]
cmp w0, 0
bne .L67
mov w0, 2
str w0, [sp, 56]
ldr w0, [sp, 64]
str w0, [sp, 60]
b .L67
.L65:
ldr w0, [sp, 56]
cmp w0, 1
bne .L68
ldr w0, [sp, 76]
cmp w0, 0
bne .L69
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
ldrsw x0, [sp, 68]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w1, [sp, 60]
str w1, [x0]
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
ldrsw x0, [sp, 68]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w1, [sp, 64]
str w1, [x0]
str wzr, [sp, 56]
b .L67
.L69:
ldr w0, [sp, 72]
cmp w0, 0
bne .L70
ldr w0, [sp, 64]
str w0, [sp, 60]
b .L67
.L70:
ldr w1, [sp, 64]
ldr w0, [sp, 60]
sub w0, w1, w0
ldr w1, [sp, 40]
cmp w1, w0
bne .L67
str wzr, [sp, 56]
b .L67
.L68:
ldr w0, [sp, 56]
cmp w0, 2
bne .L67
ldr w0, [sp, 72]
cmp w0, 0
bne .L71
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
ldrsw x0, [sp, 68]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w1, [sp, 60]
str w1, [x0]
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
ldrsw x0, [sp, 68]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w1, [sp, 64]
str w1, [x0]
str wzr, [sp, 56]
b .L67
.L71:
ldr w0, [sp, 76]
cmp w0, 0
bne .L72
ldr w0, [sp, 64]
str w0, [sp, 60]
b .L67
.L72:
ldr w1, [sp, 64]
ldr w0, [sp, 60]
sub w0, w1, w0
ldr w1, [sp, 40]
cmp w1, w0
bne .L67
str wzr, [sp, 56]
.L67:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L64:
adrp x0, wordnum
add x0, x0, :lo12:wordnum
ldrsw x1, [sp, 44]
ldr w0, [x0, x1, lsl 2]
ldr w1, [sp, 64]
cmp w1, w0
bge .L73
ldr w0, [sp, 68]
cmp w0, 199
ble .L74
.L73:
ldr w0, [sp, 68]
cmp w0, 0
bne .L75
mov w0, -1
str w0, [sp, 68]
.L75:
ldr x0, [sp, 16]
ldr w1, [sp, 68]
str w1, [x0]
ldr w0, [sp, 68]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size near, .-near
.align 2
.global not
.type not, %function
not:
.LFB10:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
ldr x0, [sp, 8]
ldr w0, [x0]
cmp w0, 0
blt .L78
ldr x0, [sp, 8]
mov w1, -1
str w1, [x0]
b .L79
.L78:
ldr x0, [sp, 8]
str wzr, [x0]
.L79:
ldr x0, [sp, 8]
ldr w0, [x0]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size not, .-not
.section .rodata
.align 3
.LC6:
.string "\nWarning: too many matches"
.text
.align 2
.global and
.type and, %function
and:
.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, 24]
ldr w0, [x0]
cmp w0, 0
blt .L82
ldr x0, [sp, 16]
ldr w0, [x0]
cmp w0, 0
blt .L82
ldr x0, [sp, 24]
ldr w1, [x0]
ldr x0, [sp, 16]
ldr w0, [x0]
add w0, w1, w0
cmp w0, 200
ble .L83
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
b .L87
.L83:
str wzr, [sp, 44]
b .L85
.L86:
ldrsw x0, [sp, 44]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x1, x1, x0
ldr x0, [sp, 24]
ldr w2, [x0]
ldr w0, [sp, 44]
add w0, w2, w0
sxtw x0, w0
add x0, x0, 1
lsl x0, x0, 2
ldr x2, [sp, 24]
add x0, x2, x0
ldr w1, [x1]
str w1, [x0]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L85:
ldr x0, [sp, 16]
ldr w0, [x0]
ldr w1, [sp, 44]
cmp w1, w0
blt .L86
ldr x0, [sp, 24]
ldr w1, [x0]
ldr x0, [sp, 16]
ldr w0, [x0]
add w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0]
b .L87
.L82:
ldr x0, [sp, 24]
mov w1, -1
str w1, [x0]
.L87:
ldr x0, [sp, 24]
ldr w0, [x0]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size and, .-and
.align 2
.global or
.type or, %function
or:
.LFB12:
.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]
ldr w0, [x0]
cmp w0, 0
bge .L90
ldr x0, [sp, 16]
ldr w0, [x0]
cmp w0, 0
blt .L91
.L90:
ldr x0, [sp, 24]
ldr w0, [x0]
cmn w0, #1
bne .L92
ldr x0, [sp, 24]
str wzr, [x0]
.L92:
ldr x0, [sp, 16]
ldr w0, [x0]
cmn w0, #1
bne .L93
ldr x0, [sp, 16]
str wzr, [x0]
.L93:
ldr x0, [sp, 24]
ldr w1, [x0]
ldr x0, [sp, 16]
ldr w0, [x0]
add w0, w1, w0
cmp w0, 200
ble .L94
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
b .L98
.L94:
str wzr, [sp, 44]
b .L96
.L97:
ldrsw x0, [sp, 44]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x1, x1, x0
ldr x0, [sp, 24]
ldr w2, [x0]
ldr w0, [sp, 44]
add w0, w2, w0
sxtw x0, w0
add x0, x0, 1
lsl x0, x0, 2
ldr x2, [sp, 24]
add x0, x2, x0
ldr w1, [x1]
str w1, [x0]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L96:
ldr x0, [sp, 16]
ldr w0, [x0]
ldr w1, [sp, 44]
cmp w1, w0
blt .L97
ldr x0, [sp, 24]
ldr w1, [x0]
ldr x0, [sp, 16]
ldr w0, [x0]
add w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0]
b .L98
.L91:
ldr x0, [sp, 24]
mov w1, -1
str w1, [x0]
.L98:
ldr x0, [sp, 24]
ldr w0, [x0]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size or, .-or
.align 2
.global printcaps
.type printcaps, %function
printcaps:
.LFB13:
.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 w1, [sp, 24]
str wzr, [sp, 44]
b .L101
.L102:
ldrb w0, [sp, 43]
bl text
and w0, w0, 255
sub w0, w0, #32
bl putchar
.L101:
adrp x0, table
add x0, x0, :lo12:table
ldrsw x1, [sp, 24]
ldrsw x3, [sp, 28]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x1, [x0, x1, lsl 3]
ldr w0, [sp, 44]
add w2, w0, 1
str w2, [sp, 44]
sxtw x0, w0
add x0, x1, x0
ldrb w0, [x0]
strb w0, [sp, 43]
ldrb w0, [sp, 43]
cmp w0, 0
bne .L102
mov w0, 32
bl putchar
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size printcaps, .-printcaps
.section .rodata
.align 3
.LC7:
.string "\nWarning: tried to display empty matches."
.align 3
.LC8:
.string "\n"
.text
.align 2
.global display
.type display, %function
display:
.LFB14:
.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 x0, [sp, 16]
ldr w0, [x0]
cmp w0, 0
bne .L104
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
.L104:
str wzr, [sp, 32]
b .L105
.L127:
ldrsw x0, [sp, 32]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w0, [x0]
cmp w0, 49
bgt .L106
str wzr, [sp, 36]
b .L107
.L106:
ldrsw x0, [sp, 32]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w0, [x0]
sub w0, w0, #50
str w0, [sp, 36]
.L107:
ldrsw x0, [sp, 32]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w1, [x0]
adrp x0, wordnum
add x0, x0, :lo12:wordnum
ldrsw x2, [sp, 28]
ldr w0, [x0, x2, lsl 2]
sub w0, w0, #50
cmp w1, w0
blt .L108
adrp x0, wordnum
add x0, x0, :lo12:wordnum
ldrsw x1, [sp, 28]
ldr w0, [x0, x1, lsl 2]
str w0, [sp, 40]
b .L109
.L108:
ldrsw x0, [sp, 32]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w0, [x0]
add w0, w0, 50
str w0, [sp, 40]
.L109:
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl puts
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 48]
b .L110
.L112:
ldr w0, [sp, 48]
sub w0, w0, #1
str w0, [sp, 48]
.L110:
ldr w0, [sp, 48]
cmp w0, 1
ble .L111
ldrsw x0, [sp, 48]
lsl x0, x0, 2
sub x0, x0, #4
ldr x1, [sp, 16]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 36]
cmp w1, w0
ble .L112
.L111:
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 52]
b .L113
.L115:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L113:
ldr x0, [sp, 16]
ldr w0, [x0]
ldr w1, [sp, 52]
cmp w1, w0
bge .L114
ldrsw x0, [sp, 52]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 40]
cmp w1, w0
bge .L115
.L114:
adrp x0, table
add x0, x0, :lo12:table
ldrsw x1, [sp, 36]
ldrsw x3, [sp, 28]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x0, [x0, x1, lsl 3]
str x0, [sp, 56]
b .L116
.L118:
ldr x0, [sp, 56]
ldrb w0, [x0]
cmp w0, 0
beq .L117
ldr x0, [sp, 56]
ldrb w0, [x0]
bl putchar
.L117:
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 56]
.L116:
ldrsw x0, [sp, 48]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w1, [x0]
adrp x0, table
add x0, x0, :lo12:table
sxtw x1, w1
ldrsw x3, [sp, 28]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x0, [x0, x1, lsl 3]
ldr x1, [sp, 56]
cmp x1, x0
bcc .L118
ldr w0, [sp, 48]
str w0, [sp, 44]
b .L119
.L123:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
ldr w0, [sp, 28]
bl printcaps
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w0, [x0]
add w1, w0, 1
adrp x0, table
add x0, x0, :lo12:table
sxtw x1, w1
ldrsw x3, [sp, 28]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x0, [x0, x1, lsl 3]
str x0, [sp, 56]
b .L120
.L122:
ldr x0, [sp, 56]
ldrb w0, [x0]
cmp w0, 0
beq .L121
ldr x0, [sp, 56]
ldrb w0, [x0]
bl putchar
.L121:
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 56]
.L120:
ldrsw x0, [sp, 44]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w1, [x0]
adrp x0, table
add x0, x0, :lo12:table
sxtw x1, w1
ldrsw x3, [sp, 28]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x0, [x0, x1, lsl 3]
ldr x1, [sp, 56]
cmp x1, x0
bcc .L122
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L119:
ldr w1, [sp, 44]
ldr w0, [sp, 52]
cmp w1, w0
blt .L123
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
ldr w0, [sp, 28]
bl printcaps
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr w0, [x0]
add w1, w0, 1
adrp x0, table
add x0, x0, :lo12:table
sxtw x1, w1
ldrsw x3, [sp, 28]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x0, [x0, x1, lsl 3]
str x0, [sp, 56]
b .L124
.L126:
ldr x0, [sp, 56]
ldrb w0, [x0]
cmp w0, 0
beq .L125
ldr x0, [sp, 56]
ldrb w0, [x0]
bl putchar
.L125:
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 56]
.L124:
adrp x0, table
add x0, x0, :lo12:table
ldrsw x1, [sp, 40]
ldrsw x3, [sp, 28]
mov x2, 20000
mul x2, x3, x2
add x1, x2, x1
ldr x0, [x0, x1, lsl 3]
ldr x1, [sp, 56]
cmp x1, x0
bcc .L126
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L105:
ldr x0, [sp, 16]
ldr w0, [x0]
ldr w1, [sp, 32]
cmp w1, w0
blt .L127
nop
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size display, .-display
.section .rodata
.align 3
.LC9:
.string "titles.dat"
.align 3
.LC10:
.string "\n\nToo many titles!"
.text
.align 2
.global loadtitles
.type loadtitles, %function
loadtitles:
.LFB15:
.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
mov w0, 3
str w0, [sp, 16]
adrp x0, .LC9
add x1, x0, :lo12:.LC9
add x0, sp, 32
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 7]
str w1, [x0, 7]
adrp x0, .LC3
add x1, x0, :lo12:.LC3
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl fopen
str x0, [sp, 24]
b .L129
.L133:
str wzr, [sp, 20]
b .L130
.L131:
ldrsw x0, [sp, 20]
add x1, sp, 48
ldrb w4, [x1, x0]
adrp x0, titlearray
add x3, x0, :lo12:titlearray
ldrsw x2, [sp, 20]
ldrsw x1, [sp, 16]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 1
add x0, x3, x0
add x0, x0, x2
mov w1, w4
strb w1, [x0]
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L130:
ldrsw x0, [sp, 20]
add x1, sp, 48
ldrb w0, [x1, x0]
cmp w0, 0
bne .L131
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
ldr w0, [sp, 16]
cmp w0, 400
bne .L129
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
b .L132
.L129:
add x0, sp, 48
ldr x2, [sp, 24]
mov w1, 50
bl fgets
cmp x0, 0
bne .L133
.L132:
ldr x0, [sp, 24]
bl fclose
adrp x0, maxid
add x0, x0, :lo12:maxid
ldr w1, [sp, 16]
str w1, [x0]
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 .L134
bl __stack_chk_fail
.L134:
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size loadtitles, .-loadtitles
.align 2
.global idmatch
.type idmatch, %function
idmatch:
.LFB16:
.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 w0, [sp, 44]
str wzr, [sp, 76]
mov w0, 3
str w0, [sp, 68]
b .L136
.L144:
str wzr, [sp, 60]
str wzr, [sp, 72]
str wzr, [sp, 64]
b .L137
.L139:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L138:
adrp x0, titles
add x3, x0, :lo12:titles
ldrsw x2, [sp, 64]
ldrsw x1, [sp, 44]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 1
add x0, x3, x0
add x0, x0, x2
ldrb w0, [x0]
cmp w0, 0
beq .L139
ldrb w0, [sp, 59]
bl text
and w19, w0, 255
adrp x0, titles
add x3, x0, :lo12:titles
ldrsw x2, [sp, 64]
ldrsw x1, [sp, 44]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 1
add x0, x3, x0
add x0, x0, x2
ldrb w0, [x0]
bl text
and w0, w0, 255
cmp w19, w0
beq .L140
mov w0, 1
str w0, [sp, 72]
b .L141
.L140:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L137:
adrp x0, titlearray
add x3, x0, :lo12:titlearray
ldrsw x2, [sp, 60]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 1
add x0, x3, x0
add x0, x0, x2
ldrb w0, [x0]
strb w0, [sp, 59]
ldrb w0, [sp, 59]
cmp w0, 10
beq .L141
ldrb w0, [sp, 59]
cmp w0, 42
bne .L138
.L141:
ldr w0, [sp, 72]
cmp w0, 0
bne .L143
ldr w0, [sp, 68]
str w0, [sp, 76]
.L143:
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L136:
adrp x0, maxid
add x0, x0, :lo12:maxid
ldr w0, [x0]
ldr w1, [sp, 68]
cmp w1, w0
blt .L144
ldr w0, [sp, 76]
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
.LFE16:
.size idmatch, .-idmatch
.section .rodata
.align 3
.LC11:
.string "a file name is expected as the first argument"
.align 3
.LC12:
.string "\nlength of main string = %d"
.align 3
.LC13:
.string "\nNumber of programs = %d\n"
.align 3
.LC14:
.string "\n----------------------------------------------------------"
.align 3
.LC15:
.string "chin*"
.align 3
.LC16:
.string "\n*--------------------------------------------*\n\nTitle: "
.align 3
.LC17:
.string "\nTitle ID #%d"
.align 3
.LC18:
.string "\n*--------------------------------------------*"
.align 3
.LC19:
.string "\n Number of total matches: %d.\n"
.align 3
.LC20:
.string " Number of programs with matches: %d.\n"
.align 3
.LC21:
.string " Number of total programs: %d.\n"
.align 3
.LC22:
.string " Number of selected programs: %d.\n"
.align 3
.LC23:
.string "%d\t%d\t%d\t%d\n"
.text
.align 2
.global main
.type main, %function
main:
.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]
str x1, [sp, 16]
ldr w0, [sp, 28]
cmp w0, 1
bgt .L147
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 45
mov x1, 1
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl fwrite
mov w0, -1
b .L148
.L147:
bl loadtitles
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl getstring
mov w1, w0
adrp x0, LEN
add x0, x0, :lo12:LEN
str w1, [x0]
adrp x0, LEN
add x0, x0, :lo12:LEN
ldr w0, [x0]
mov w1, w0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
adrp x0, numprogs
add x0, x0, :lo12:numprogs
ldr w0, [x0]
mov w1, w0
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl printf
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl puts
mov w0, 0
bl parseprogs
str wzr, [sp, 36]
str wzr, [sp, 40]
str wzr, [sp, 32]
b .L149
.L151:
adrp x0, titlenums
add x0, x0, :lo12:titlenums
ldrsw x1, [sp, 32]
ldr w0, [x0, x1, lsl 2]
cmp w0, 0
beq .L150
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
adrp x0, pri
add x2, x0, :lo12:pri
adrp x0, .LC15
add x1, x0, :lo12:.LC15
ldr w0, [sp, 32]
bl find
str w0, [sp, 44]
ldr w0, [sp, 44]
cmn w0, #1
beq .L150
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl printf
ldr w0, [sp, 32]
bl printtitle
ldr w0, [sp, 32]
bl idmatch
mov w1, w0
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl printf
mov w0, 10
bl putchar
adrp x0, pri
add x1, x0, :lo12:pri
ldr w0, [sp, 32]
bl display
adrp x0, n1
add x0, x0, :lo12:n1
ldr w0, [x0]
add w1, w0, 1
adrp x0, n1
add x0, x0, :lo12:n1
str w1, [x0]
adrp x0, pri
add x0, x0, :lo12:pri
ldr w0, [x0]
ldr w1, [sp, 36]
add w0, w1, w0
str w0, [sp, 36]
.L150:
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L149:
adrp x0, numprogs
add x0, x0, :lo12:numprogs
ldr w0, [x0]
ldr w1, [sp, 32]
cmp w1, w0
blt .L151
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl puts
ldr w1, [sp, 36]
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl printf
adrp x0, n1
add x0, x0, :lo12:n1
ldr w0, [x0]
mov w1, w0
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl printf
adrp x0, numprogs
add x0, x0, :lo12:numprogs
ldr w0, [x0]
mov w1, w0
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl printf
ldr w1, [sp, 40]
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl printf
adrp x0, n1
add x0, x0, :lo12:n1
ldr w1, [x0]
adrp x0, numprogs
add x0, x0, :lo12:numprogs
ldr w0, [x0]
ldr w4, [sp, 40]
mov w3, w0
mov w2, w1
ldr w1, [sp, 36]
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl printf
mov w0, 0
.L148:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE17:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global palette_gfx
.data
.align 3
.type palette_gfx, %object
.size palette_gfx, 510
palette_gfx:
.string "\377\377C\214"
.string "p"
.string "\210\001\340\001\330K\255\002\305!\004\001\204\316\271\001\300\001\250\001\320\001\234\001\264\001\244C\350\347\034\001\310\205\224\001\270"
.string "\214\t\245\030\347\020\302\214\345\336{\326\332R\312\001\224A\200C\374K\345\274{\224\322\245d"
.string "\220\234\363)e\307\344\306\205)}\343\004\020\376\316\375\215\375\316\345\347|\245|Z\353!\b\004\205!\f!\020\020\346Z\373\347\tR\346\326\346k1b\204A"
.ascii "K\375\224\372%\t\351\025C\330g\021F\215\030\373\224\352\367b"
.ascii "R\372\004\005b\004\b\311\2559\357\301B`\326\376\245`\307\211"
.ascii "E\211E\205!\024\265fk9\347\240c\220\306\340\347H\247\215)\265"
.ascii "f\rA\204\245X\350\r"
.string "{s1\312\245\230$\005\347@)\251\t\271\205\320\203\214\215\341\367\336cT\t\345\207\021C\254\250\021\245H+\036e\tbH\206\r\247\rJ\301\207\221\243\204\264Z\307\rf\215B\b\t\026)\305\027_c ke\204\020\306\030\205\215\017B\347T\347<\357YM\246\306\005c\030\311\2258s\352\231\311\0259\347\205\250\316\341BpQJ\020\342\204\244J)\3034\246\205\202@\306\360\306\330\306\2301R\245DAX\214\311\b\022s\342\205\205\311\035\210\225sZ\323FB\300\255q\325V\357\311\004\245c8\245\360\202\204\252%\310\021F\r\306\2641^e\225\250\025\2172AP\365R\243<\214QsR\323JE\231\210\025\t\222\305\020)\321\357Q\261:\245\264\315\261n.\2048kMR\3621r\243\254iEo\262\255\335\262B\255\305\366\326B\264\b\331f\231B@\265\356,\242\310\221*\026J\325\004%)q\001\350"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\030\343_Y\330"
.string "\177\247\364\377+\242\214\265"
.string "|\346\005"
.string ""
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC1:
.string "Analog X: %d\n"
.align 3
.LC2:
.string "Analog Y: %d\n"
.align 3
.LC3:
.string "X-axis: %d\n"
.align 3
.LC4:
.string "Y-axis: %d\n"
.align 3
.LC5:
.string "Z-axis: %d\n"
.align 3
.LC6:
.string "Button Z: not pressed"
.align 3
.LC7:
.string "Button Z: pressed"
.align 3
.LC8:
.string "Button C: not pressed"
.align 3
.LC9:
.string "Button C: pressed"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.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]
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
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 104
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 7]
str w1, [x0, 7]
mov w0, 82
str w0, [sp, 40]
mov w0, -16
strb w0, [sp, 88]
mov w0, 85
strb w0, [sp, 89]
mov w0, 2
str w0, [sp, 44]
add x0, sp, 104
mov w1, 2
bl open
str w0, [sp, 48]
ldr w0, [sp, 48]
cmp w0, 0
bge .L2
mov w0, 1
bl exit
.L2:
ldr w2, [sp, 40]
mov x1, 1795
ldr w0, [sp, 48]
bl ioctl
cmp w0, 0
bge .L3
mov w0, 1
bl exit
.L3:
ldrsw x1, [sp, 44]
add x0, sp, 88
mov x2, x1
mov x1, x0
ldr w0, [sp, 48]
bl write
mov x1, x0
ldrsw x0, [sp, 44]
cmp x1, x0
beq .L4
mov w0, 1
bl exit
.L4:
ldr w0, [sp, 48]
bl close
.L17:
strb wzr, [sp, 88]
mov w0, 1
str w0, [sp, 44]
add x0, sp, 104
mov w1, 2
bl open
str w0, [sp, 48]
ldr w0, [sp, 48]
cmp w0, 0
bge .L5
mov w0, 1
bl exit
.L5:
ldr w2, [sp, 40]
mov x1, 1795
ldr w0, [sp, 48]
bl ioctl
cmp w0, 0
bge .L6
mov w0, 1
bl exit
.L6:
ldrsw x1, [sp, 44]
add x0, sp, 88
mov x2, x1
mov x1, x0
ldr w0, [sp, 48]
bl write
mov x1, x0
ldrsw x0, [sp, 44]
cmp x1, x0
beq .L7
mov w0, 1
bl exit
.L7:
ldr w0, [sp, 48]
bl close
mov w0, 6
str w0, [sp, 52]
add x0, sp, 104
mov w1, 2
bl open
str w0, [sp, 48]
ldr w0, [sp, 48]
cmp w0, 0
bge .L8
mov w0, 1
bl exit
.L8:
ldr w2, [sp, 40]
mov x1, 1795
ldr w0, [sp, 48]
bl ioctl
cmp w0, 0
bge .L9
mov w0, 1
bl exit
.L9:
ldrsw x1, [sp, 52]
add x0, sp, 96
mov x2, x1
mov x1, x0
ldr w0, [sp, 48]
bl read
mov x1, x0
ldrsw x0, [sp, 52]
cmp x1, x0
beq .L10
mov w0, 1
bl exit
.L10:
str wzr, [sp, 36]
b .L11
.L12:
ldrsw x0, [sp, 36]
add x1, sp, 96
ldrb w1, [x1, x0]
mov w0, 23
eor w0, w1, w0
and w2, w0, 255
ldrsw x0, [sp, 36]
add x1, sp, 96
strb w2, [x1, x0]
ldrsw x0, [sp, 36]
add x1, sp, 96
ldrb w0, [x1, x0]
add w0, w0, 23
and w2, w0, 255
ldrsw x0, [sp, 36]
add x1, sp, 96
strb w2, [x1, x0]
ldrsw x0, [sp, 36]
add x1, sp, 96
ldrb w0, [x1, x0]
mov w2, w0
ldrsw x0, [sp, 36]
lsl x0, x0, 2
add x1, sp, 64
str w2, [x1, x0]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L11:
ldr w1, [sp, 36]
ldr w0, [sp, 52]
cmp w1, w0
blt .L12
ldr w0, [sp, 84]
and w0, w0, 1
str w0, [sp, 56]
ldr w0, [sp, 84]
asr w0, w0, 1
and w0, w0, 1
str w0, [sp, 60]
ldr w0, [sp, 72]
lsl w0, w0, 2
str w0, [sp, 72]
ldr w1, [sp, 72]
ldr w0, [sp, 84]
asr w0, w0, 2
and w0, w0, 3
orr w0, w1, w0
str w0, [sp, 72]
ldr w0, [sp, 76]
lsl w0, w0, 2
str w0, [sp, 76]
ldr w1, [sp, 76]
ldr w0, [sp, 84]
asr w0, w0, 4
and w0, w0, 3
orr w0, w1, w0
str w0, [sp, 76]
ldr w0, [sp, 80]
lsl w0, w0, 2
str w0, [sp, 80]
ldr w1, [sp, 80]
ldr w0, [sp, 84]
asr w0, w0, 6
and w0, w0, 3
orr w0, w1, w0
str w0, [sp, 80]
ldr w0, [sp, 64]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w0, [sp, 68]
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w0, [sp, 72]
mov w1, w0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
ldr w0, [sp, 76]
mov w1, w0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr w0, [sp, 80]
mov w1, w0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
ldr w0, [sp, 56]
cmp w0, 0
beq .L13
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
b .L14
.L13:
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
.L14:
ldr w0, [sp, 60]
cmp w0, 0
beq .L15
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl puts
b .L16
.L15:
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl puts
.L16:
mov w0, 12
bl putchar
mov w0, 3392
movk w0, 0x3, lsl 16
bl usleep
b .L17
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC0:
.string "/dev/i2c-0"
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global nondet_signed_int
.type nondet_signed_int, %function
nondet_signed_int:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -32]!
.cfi_def_cfa_offset 32
.cfi_offset 29, -32
.cfi_offset 30, -24
mov x29, sp
bl __VERIFIER_nondet_int
str w0, [sp, 28]
mov w0, 1
bl __VERIFIER_assume
ldr w0, [sp, 28]
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size nondet_signed_int, .-nondet_signed_int
.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
bl nondet_signed_int
str w0, [sp, 28]
b .L4
.L8:
nop
ldr w0, [sp, 28]
sub w0, w0, #1
str w0, [sp, 28]
.L4:
ldr w0, [sp, 28]
cmp w0, 0
bge .L8
mov w0, 0
ldp x29, x30, [sp], 32
.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
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, 12]
str x1, [sp]
str wzr, [sp, 28]
.L2:
ldr w0, [sp, 28]
cmp w0, 0
beq .L7
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
b .L2
.L7:
nop
.L4:
mov w0, 0
add sp, sp, 32
.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 "unix.txt"
.align 3
.LC1:
.string "errno=%d\n"
.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 w1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl access
cmn w0, #1
bne .L2
bl __errno_location
ldr w0, [x0]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
.L2:
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 "rb"
.text
.align 2
.global read_buffer
.type read_buffer, %function
read_buffer:
.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 x0, [sp, 24]
str x1, [sp, 16]
adrp x0, .LC0
add x1, x0, :lo12:.LC0
ldr x0, [sp, 24]
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L2
mov x0, 0
b .L3
.L2:
mov w2, 2
mov x1, 0
ldr x0, [sp, 40]
bl fseek
ldr x0, [sp, 40]
bl ftell
str x0, [sp, 48]
mov w2, 0
mov x1, 0
ldr x0, [sp, 40]
bl fseek
ldr x0, [sp, 48]
add x0, x0, 1
bl malloc
str x0, [sp, 56]
ldr x3, [sp, 40]
ldr x2, [sp, 48]
mov x1, 1
ldr x0, [sp, 56]
bl fread
ldr x1, [sp, 56]
ldr x0, [sp, 48]
add x0, x1, x0
strb wzr, [x0]
ldr x0, [sp, 16]
cmp x0, 0
beq .L4
ldr x0, [sp, 16]
ldr x1, [sp, 48]
str x1, [x0]
.L4:
ldr x0, [sp, 56]
.L3:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size read_buffer, .-read_buffer
.section .rodata
.align 3
.LC1:
.string "w+"
.text
.align 2
.global write_buffer
.type write_buffer, %function
write_buffer:
.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 x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
adrp x0, .LC1
add x1, x0, :lo12:.LC1
ldr x0, [sp, 40]
bl fopen
str x0, [sp, 56]
ldr x0, [sp, 32]
cmp x0, 0
beq .L6
ldr x3, [sp, 56]
ldr x2, [sp, 24]
mov x1, 1
ldr x0, [sp, 32]
bl fwrite
.L6:
ldr x0, [sp, 56]
bl fclose
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size write_buffer, .-write_buffer
.section .rodata
.align 3
.LC2:
.string "error: call to 'clGetPlatformIDs' failed"
.align 3
.LC3:
.string "Number of platforms: %d\n"
.align 3
.LC4:
.string "platform=%p\n"
.align 3
.LC5:
.string "error: call to 'clGetPlatformInfo' failed"
.align 3
.LC6:
.string "platform.name='%s'\n\n"
.align 3
.LC7:
.string "error: call to 'clGetDeviceIDs' failed"
.align 3
.LC8:
.string "Number of devices: %d\n"
.align 3
.LC9:
.string "device=%p\n"
.align 3
.LC10:
.string "error: call to 'clGetDeviceInfo' failed"
.align 3
.LC11:
.string "device.name='%s'\n"
.align 3
.LC12:
.string "error: call to 'clCreateContext' failed"
.align 3
.LC13:
.string "context=%p\n"
.align 3
.LC14:
.string "error: call to 'clCreateCommandQueue' failed"
.align 3
.LC15:
.string "command_queue=%p\n"
.align 3
.LC16:
.string "equal_uint4uint4.cl"
.align 3
.LC17:
.string "error: call to 'clCreateProgramWithSource' failed"
.align 3
.LC18:
.string "program=%p\n"
.align 3
.LC19:
.string "error: call to 'clBuildProgram' failed:\n%s\n"
.align 3
.LC20:
.string "program built"
.align 3
.LC21:
.string "equal_uint4uint4"
.align 3
.LC22:
.string "error: call to 'clCreateKernel' failed"
.align 3
.LC23:
.string "error: could not create source buffer"
.align 3
.LC24:
.string "error: call to 'clEnqueueWriteBuffer' failed"
.align 3
.LC25:
.string "error: could not create dst buffer"
.align 3
.LC26:
.string "error: call to 'clSetKernelArg' failed"
.align 3
.LC27:
.string "error: call to 'clEnqueueNDRangeKernel' failed"
.align 3
.LC28:
.string "error: call to 'clEnqueueReadBuffer' failed"
.align 3
.LC29:
.string "%s.result"
.align 3
.LC30:
.string "Result dumped to %s\n"
.align 3
.LC31:
.string "error: call to 'clReleaseMemObject' failed"
.align 3
.LC32:
.string "error: call to 'clReleaseKernel' failed"
.align 3
.LC33:
.string "error: call to 'clReleaseProgram' failed"
.align 3
.LC34:
.string "error: call to 'clReleaseCommandQueue' failed"
.align 3
.LC35:
.string "error: call to 'clReleaseContext' failed"
.text
.align 2
.global main
.type main, %function
main:
.LFB8:
.cfi_startproc
sub sp, sp, #544
.cfi_def_cfa_offset 544
stp x29, x30, [sp, 16]
.cfi_offset 29, -528
.cfi_offset 30, -520
add x29, sp, 16
str w0, [sp, 44]
str x1, [sp, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 536]
mov x1, 0
add x1, sp, 60
add x0, sp, 80
mov x2, x1
mov x1, x0
mov w0, 1
bl clGetPlatformIDs
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L8
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
mov w0, 1
bl exit
.L8:
ldr w0, [sp, 60]
mov w1, w0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
ldr x0, [sp, 80]
mov x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr x0, [sp, 80]
add x1, sp, 224
mov x4, 0
mov x3, x1
mov x2, 100
mov w1, 2306
bl clGetPlatformInfo
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L9
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
mov w0, 1
bl exit
.L9:
add x0, sp, 224
mov x1, x0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
ldr x0, [sp, 80]
add x2, sp, 68
add x1, sp, 88
mov x4, x2
mov x3, x1
mov w2, 1
mov x1, 4
bl clGetDeviceIDs
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L10
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
mov w0, 1
bl exit
.L10:
ldr w0, [sp, 68]
mov w1, w0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
ldr x0, [sp, 88]
mov x1, x0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
ldr x0, [sp, 88]
add x1, sp, 328
mov x4, 0
mov x3, x1
mov x2, 100
mov w1, 4139
bl clGetDeviceInfo
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L11
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl puts
mov w0, 1
bl exit
.L11:
add x0, sp, 328
mov x1, x0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
mov w0, 10
bl putchar
add x1, sp, 64
add x0, sp, 88
mov x5, x1
mov x4, 0
mov x3, 0
mov x2, x0
mov w1, 1
mov x0, 0
bl clCreateContext
str x0, [sp, 152]
ldr w0, [sp, 64]
cmp w0, 0
beq .L12
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl puts
mov w0, 1
bl exit
.L12:
ldr x1, [sp, 152]
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl printf
ldr x0, [sp, 88]
add x1, sp, 64
mov x3, x1
mov x2, 0
mov x1, x0
ldr x0, [sp, 152]
bl clCreateCommandQueue
str x0, [sp, 160]
ldr w0, [sp, 64]
cmp w0, 0
beq .L13
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl puts
mov w0, 1
bl exit
.L13:
ldr x1, [sp, 160]
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl printf
mov w0, 10
bl putchar
add x0, sp, 104
mov x1, x0
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl read_buffer
str x0, [sp, 96]
add x2, sp, 64
add x1, sp, 104
add x0, sp, 96
mov x4, x2
mov x3, x1
mov x2, x0
mov w1, 1
ldr x0, [sp, 152]
bl clCreateProgramWithSource
str x0, [sp, 168]
ldr w0, [sp, 64]
cmp w0, 0
beq .L14
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl puts
mov w0, 1
bl exit
.L14:
ldr x1, [sp, 168]
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl printf
add x0, sp, 88
mov x5, 0
mov x4, 0
mov x3, 0
mov x2, x0
mov w1, 1
ldr x0, [sp, 168]
bl clBuildProgram
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L15
ldr x0, [sp, 88]
add x1, sp, 144
mov x5, x1
mov x4, 0
mov x3, 0
mov w2, 4483
mov x1, x0
ldr x0, [sp, 168]
bl clGetProgramBuildInfo
ldr x0, [sp, 144]
bl malloc
str x0, [sp, 216]
ldr x0, [sp, 88]
ldr x1, [sp, 144]
mov x5, 0
ldr x4, [sp, 216]
mov x3, x1
mov w2, 4483
mov x1, x0
ldr x0, [sp, 168]
bl clGetProgramBuildInfo
ldr x1, [sp, 216]
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl printf
ldr x0, [sp, 216]
bl free
mov w0, 1
bl exit
.L15:
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl puts
mov w0, 10
bl putchar
add x0, sp, 64
mov x2, x0
adrp x0, .LC21
add x1, x0, :lo12:.LC21
ldr x0, [sp, 168]
bl clCreateKernel
str x0, [sp, 176]
ldr w0, [sp, 64]
cmp w0, 0
beq .L16
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl puts
mov w0, 1
bl exit
.L16:
mov x0, 10
str x0, [sp, 184]
ldr x0, [sp, 184]
lsl x0, x0, 4
bl malloc
str x0, [sp, 192]
str wzr, [sp, 72]
b .L17
.L18:
ldrsw x0, [sp, 72]
lsl x0, x0, 4
ldr x1, [sp, 192]
add x0, x1, x0
mov w1, 2
str w1, [x0]
mov w1, 2
str w1, [x0, 4]
mov w1, 2
str w1, [x0, 8]
mov w1, 2
str w1, [x0, 12]
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L17:
ldrsw x0, [sp, 72]
ldr x1, [sp, 184]
cmp x1, x0
bhi .L18
ldr x0, [sp, 184]
lsl x0, x0, 4
add x1, sp, 64
mov x4, x1
mov x3, 0
mov x2, x0
mov x1, 4
ldr x0, [sp, 152]
bl clCreateBuffer
str x0, [sp, 112]
ldr w0, [sp, 64]
cmp w0, 0
beq .L19
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl puts
mov w0, 1
bl exit
.L19:
ldr x1, [sp, 112]
ldr x0, [sp, 184]
lsl x0, x0, 4
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 192]
mov x4, x0
mov x3, 0
mov w2, 1
ldr x0, [sp, 160]
bl clEnqueueWriteBuffer
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L20
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl puts
mov w0, 1
bl exit
.L20:
ldr x0, [sp, 184]
lsl x0, x0, 4
bl malloc
str x0, [sp, 200]
str wzr, [sp, 76]
b .L21
.L22:
ldrsw x0, [sp, 76]
lsl x0, x0, 4
ldr x1, [sp, 200]
add x0, x1, x0
mov w1, 2
str w1, [x0]
mov w1, 2
str w1, [x0, 4]
mov w1, 2
str w1, [x0, 8]
mov w1, 2
str w1, [x0, 12]
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L21:
ldrsw x0, [sp, 76]
ldr x1, [sp, 184]
cmp x1, x0
bhi .L22
ldr x0, [sp, 184]
lsl x0, x0, 4
add x1, sp, 64
mov x4, x1
mov x3, 0
mov x2, x0
mov x1, 4
ldr x0, [sp, 152]
bl clCreateBuffer
str x0, [sp, 120]
ldr w0, [sp, 64]
cmp w0, 0
beq .L23
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl puts
mov w0, 1
bl exit
.L23:
ldr x1, [sp, 120]
ldr x0, [sp, 184]
lsl x0, x0, 4
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 200]
mov x4, x0
mov x3, 0
mov w2, 1
ldr x0, [sp, 160]
bl clEnqueueWriteBuffer
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L24
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl puts
mov w0, 1
bl exit
.L24:
ldr x0, [sp, 184]
lsl x0, x0, 4
bl malloc
str x0, [sp, 208]
ldr x0, [sp, 184]
lsl x0, x0, 4
mov x2, x0
mov w1, 1
ldr x0, [sp, 208]
bl memset
ldr x0, [sp, 184]
lsl x0, x0, 4
add x1, sp, 64
mov x4, x1
mov x3, 0
mov x2, x0
mov x1, 2
ldr x0, [sp, 152]
bl clCreateBuffer
str x0, [sp, 128]
ldr w0, [sp, 64]
cmp w0, 0
beq .L25
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl puts
mov w0, 1
bl exit
.L25:
str wzr, [sp, 64]
add x0, sp, 112
mov x3, x0
mov x2, 8
mov w1, 0
ldr x0, [sp, 176]
bl clSetKernelArg
mov w1, w0
ldr w0, [sp, 64]
orr w0, w1, w0
str w0, [sp, 64]
add x0, sp, 120
mov x3, x0
mov x2, 8
mov w1, 1
ldr x0, [sp, 176]
bl clSetKernelArg
mov w1, w0
ldr w0, [sp, 64]
orr w0, w1, w0
str w0, [sp, 64]
add x0, sp, 128
mov x3, x0
mov x2, 8
mov w1, 2
ldr x0, [sp, 176]
bl clSetKernelArg
mov w1, w0
ldr w0, [sp, 64]
orr w0, w1, w0
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L26
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl puts
mov w0, 1
bl exit
.L26:
ldr x0, [sp, 184]
str x0, [sp, 136]
ldr x0, [sp, 184]
str x0, [sp, 144]
add x1, sp, 144
add x0, sp, 136
str xzr, [sp]
mov x7, 0
mov w6, 0
mov x5, x1
mov x4, x0
mov x3, 0
mov w2, 1
ldr x1, [sp, 176]
ldr x0, [sp, 160]
bl clEnqueueNDRangeKernel
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L27
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl puts
mov w0, 1
bl exit
.L27:
ldr x0, [sp, 160]
bl clFinish
ldr x1, [sp, 128]
ldr x0, [sp, 184]
lsl x0, x0, 4
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 208]
mov x4, x0
mov x3, 0
mov w2, 1
ldr x0, [sp, 160]
bl clEnqueueReadBuffer
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L28
adrp x0, .LC28
add x0, x0, :lo12:.LC28
bl puts
mov w0, 1
bl exit
.L28:
ldr x0, [sp, 32]
ldr x0, [x0]
add x3, sp, 432
mov x2, x0
adrp x0, .LC29
add x1, x0, :lo12:.LC29
mov x0, x3
bl sprintf
ldr x0, [sp, 184]
lsl x1, x0, 4
add x0, sp, 432
mov x2, x1
ldr x1, [sp, 208]
bl write_buffer
add x0, sp, 432
mov x1, x0
adrp x0, .LC30
add x0, x0, :lo12:.LC30
bl printf
ldr x0, [sp, 208]
bl free
ldr x0, [sp, 128]
bl clReleaseMemObject
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L29
adrp x0, .LC31
add x0, x0, :lo12:.LC31
bl puts
mov w0, 1
bl exit
.L29:
ldr x0, [sp, 192]
bl free
ldr x0, [sp, 112]
bl clReleaseMemObject
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L30
adrp x0, .LC31
add x0, x0, :lo12:.LC31
bl puts
mov w0, 1
bl exit
.L30:
ldr x0, [sp, 200]
bl free
ldr x0, [sp, 120]
bl clReleaseMemObject
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L31
adrp x0, .LC31
add x0, x0, :lo12:.LC31
bl puts
mov w0, 1
bl exit
.L31:
ldr x0, [sp, 176]
bl clReleaseKernel
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L32
adrp x0, .LC32
add x0, x0, :lo12:.LC32
bl puts
mov w0, 1
bl exit
.L32:
ldr x0, [sp, 168]
bl clReleaseProgram
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L33
adrp x0, .LC33
add x0, x0, :lo12:.LC33
bl puts
mov w0, 1
bl exit
.L33:
ldr x0, [sp, 160]
bl clReleaseCommandQueue
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L34
adrp x0, .LC34
add x0, x0, :lo12:.LC34
bl puts
mov w0, 1
bl exit
.L34:
ldr x0, [sp, 152]
bl clReleaseContext
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 0
beq .L35
adrp x0, .LC35
add x0, x0, :lo12:.LC35
bl puts
mov w0, 1
bl exit
.L35:
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 536]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L37
bl __stack_chk_fail
.L37:
mov w0, w1
ldp x29, x30, [sp, 16]
add sp, sp, 544
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global a
.bss
.align 2
.type a, %object
.size a, 4
a:
.zero 4
.global b
.align 3
.type b, %object
.size b, 8
b:
.zero 8
.text
.align 2
.global c
.type c, %function
c:
.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
str w0, [sp, 20]
b .L2
.L5:
adrp x0, b
add x0, x0, :lo12:b
ldr x0, [x0]
ldr x0, [x0]
ldrb w0, [x0]
cmp w0, 57
beq .L3
cmp w0, 81
bne .L2
bl f
sxtw x1, w0
adrp x0, b
add x0, x0, :lo12:b
ldr x0, [x0]
str x1, [x0]
ldr x0, [x0]
str x0, [sp, 24]
.L3:
adrp x0, b
add x0, x0, :lo12:b
ldr x0, [x0]
ldr x1, [x0]
ldr x0, [sp, 24]
sub x0, x1, x0
bl g
str wzr, [sp, 20]
.L2:
ldr w0, [sp, 20]
cmp w0, 0
beq .L4
adrp x0, b
add x0, x0, :lo12:b
ldr x0, [x0]
ldr x0, [x0]
cmp x0, 0
bne .L5
.L4:
ldr w0, [sp, 20]
cmp w0, 0
beq .L6
adrp x0, a
add x0, x0, :lo12:a
ldr w0, [x0]
cmp w0, 0
beq .L6
str wzr, [sp, 20]
.L6:
ldr w0, [sp, 20]
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size c, .-c
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type error, %function
error:
.LFB6:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
str w1, [sp, 4]
ldr x0, [sp, 8]
ldr w1, [sp, 4]
str w1, [x0, 132]
ldr x0, [sp, 8]
ldr w0, [x0, 128]
cmp w0, 0
bne .L2
ldr w0, [sp, 4]
cmp w0, 1
beq .L2
ldr x0, [sp, 8]
ldr w1, [sp, 4]
str w1, [x0, 132]
.L2:
mov w0, 0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size error, .-error
.align 2
.type make_block_array, %function
make_block_array:
.LFB7:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, 8]
str w1, [sp, 4]
str w2, [sp]
ldr x0, [sp, 8]
str x0, [sp, 40]
ldrsw x0, [sp, 4]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
str x0, [sp, 32]
str wzr, [sp, 28]
b .L5
.L6:
ldrsw x0, [sp, 28]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldr x1, [sp, 32]
str x1, [x0]
ldrsw x0, [sp]
ldr x1, [sp, 32]
add x0, x1, x0
str x0, [sp, 32]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L5:
ldr w1, [sp, 28]
ldr w0, [sp, 4]
cmp w1, w0
blt .L6
ldr x0, [sp, 40]
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size make_block_array, .-make_block_array
.align 2
.type setup_malloc, %function
setup_malloc:
.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]
ldr w0, [sp, 20]
add w0, w0, 3
and w0, w0, -4
str w0, [sp, 20]
ldr x0, [sp, 24]
ldr w1, [x0, 8]
ldr w0, [sp, 20]
add w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 8]
ldr x0, [sp, 24]
ldr x0, [x0, 104]
cmp x0, 0
beq .L9
ldr x0, [sp, 24]
ldr x1, [x0, 104]
ldr x0, [sp, 24]
ldr w0, [x0, 120]
sxtw x0, w0
add x0, x1, x0
str x0, [sp, 40]
ldr x0, [sp, 24]
ldr w1, [x0, 120]
ldr w0, [sp, 20]
add w1, w1, w0
ldr x0, [sp, 24]
ldr w0, [x0, 124]
cmp w1, w0
ble .L10
mov x0, 0
b .L11
.L10:
ldr x0, [sp, 24]
ldr w1, [x0, 120]
ldr w0, [sp, 20]
add w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 120]
ldr x0, [sp, 40]
b .L11
.L9:
ldr w0, [sp, 20]
cmp w0, 0
beq .L12
ldrsw x0, [sp, 20]
bl malloc
b .L11
.L12:
mov x0, 0
.L11:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size setup_malloc, .-setup_malloc
.align 2
.type setup_free, %function
setup_free:
.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]
ldr x0, [sp, 24]
ldr x0, [x0, 104]
cmp x0, 0
bne .L17
ldr x0, [sp, 16]
bl free
b .L14
.L17:
nop
.L14:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size setup_free, .-setup_free
.align 2
.type setup_temp_malloc, %function
setup_temp_malloc:
.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 w1, [sp, 20]
ldr w0, [sp, 20]
add w0, w0, 3
and w0, w0, -4
str w0, [sp, 20]
ldr x0, [sp, 24]
ldr x0, [x0, 104]
cmp x0, 0
beq .L19
ldr x0, [sp, 24]
ldr w1, [x0, 124]
ldr w0, [sp, 20]
sub w1, w1, w0
ldr x0, [sp, 24]
ldr w0, [x0, 120]
cmp w1, w0
bge .L20
mov x0, 0
b .L21
.L20:
ldr x0, [sp, 24]
ldr w1, [x0, 124]
ldr w0, [sp, 20]
sub w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 124]
ldr x0, [sp, 24]
ldr x1, [x0, 104]
ldr x0, [sp, 24]
ldr w0, [x0, 124]
sxtw x0, w0
add x0, x1, x0
b .L21
.L19:
ldrsw x0, [sp, 20]
bl malloc
.L21:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size setup_temp_malloc, .-setup_temp_malloc
.align 2
.type setup_temp_free, %function
setup_temp_free:
.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, 40]
str x1, [sp, 32]
str w2, [sp, 28]
ldr x0, [sp, 40]
ldr x0, [x0, 104]
cmp x0, 0
beq .L23
ldr x0, [sp, 40]
ldr w1, [x0, 124]
ldr w0, [sp, 28]
add w0, w0, 3
and w0, w0, -4
add w1, w1, w0
ldr x0, [sp, 40]
str w1, [x0, 124]
b .L22
.L23:
ldr x0, [sp, 32]
bl free
.L22:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size setup_temp_free, .-setup_temp_free
.local crc_table
.comm crc_table,1024,8
.align 2
.type crc32_init, %function
crc32_init:
.LFB12:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str wzr, [sp, 4]
b .L26
.L31:
ldr w0, [sp, 4]
lsl w0, w0, 24
str w0, [sp, 12]
str wzr, [sp, 8]
b .L27
.L30:
ldr w0, [sp, 12]
lsl w1, w0, 1
ldr w0, [sp, 12]
cmp w0, 0
bge .L28
mov w0, 7607
movk w0, 0x4c1, lsl 16
b .L29
.L28:
mov w0, 0
.L29:
eor w0, w0, w1
str w0, [sp, 12]
ldr w0, [sp, 8]
add w0, w0, 1
str w0, [sp, 8]
.L27:
ldr w0, [sp, 8]
cmp w0, 7
ble .L30
adrp x0, crc_table
add x0, x0, :lo12:crc_table
ldrsw x1, [sp, 4]
ldr w2, [sp, 12]
str w2, [x0, x1, lsl 2]
ldr w0, [sp, 4]
add w0, w0, 1
str w0, [sp, 4]
.L26:
ldr w0, [sp, 4]
cmp w0, 255
ble .L31
nop
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size crc32_init, .-crc32_init
.align 2
.type crc32_update, %function
crc32_update:
.LFB13:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
strb w1, [sp, 11]
ldr w0, [sp, 12]
lsl w1, w0, 8
ldrb w2, [sp, 11]
ldr w0, [sp, 12]
lsr w0, w0, 24
eor w2, w2, w0
adrp x0, crc_table
add x0, x0, :lo12:crc_table
uxtw x2, w2
ldr w0, [x0, x2, lsl 2]
eor w0, w1, w0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size crc32_update, .-crc32_update
.align 2
.type bit_reverse, %function
bit_reverse:
.LFB14:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
lsr w0, w0, 1
and w1, w0, 1431655765
ldr w0, [sp, 12]
lsl w0, w0, 1
and w0, w0, -1431655766
orr w0, w1, w0
str w0, [sp, 12]
ldr w0, [sp, 12]
lsr w0, w0, 2
and w1, w0, 858993459
ldr w0, [sp, 12]
lsl w0, w0, 2
and w0, w0, -858993460
orr w0, w1, w0
str w0, [sp, 12]
ldr w0, [sp, 12]
lsr w0, w0, 4
and w1, w0, 252645135
ldr w0, [sp, 12]
lsl w0, w0, 4
and w0, w0, -252645136
orr w0, w1, w0
str w0, [sp, 12]
ldr w0, [sp, 12]
lsr w0, w0, 8
and w1, w0, 16711935
ldr w0, [sp, 12]
lsl w0, w0, 8
and w0, w0, -16711936
orr w0, w1, w0
str w0, [sp, 12]
ldr w0, [sp, 12]
ror w0, w0, 16
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size bit_reverse, .-bit_reverse
.align 2
.type square, %function
square:
.LFB15:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str s0, [sp, 12]
ldr s0, [sp, 12]
fmul s0, s0, s0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size square, .-square
.align 2
.type ilog, %function
ilog:
.LFB16:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w1, [sp, 12]
mov w0, 16383
cmp w1, w0
bgt .L39
ldr w0, [sp, 12]
cmp w0, 15
bgt .L40
adrp x0, log2_4.22
add x1, x0, :lo12:log2_4.22
ldrsw x0, [sp, 12]
ldrsb w0, [x1, x0]
b .L41
.L40:
ldr w0, [sp, 12]
cmp w0, 511
bgt .L42
ldr w0, [sp, 12]
asr w2, w0, 5
adrp x0, log2_4.22
add x1, x0, :lo12:log2_4.22
sxtw x0, w2
ldrsb w0, [x1, x0]
add w0, w0, 5
b .L41
.L42:
ldr w0, [sp, 12]
asr w2, w0, 10
adrp x0, log2_4.22
add x1, x0, :lo12:log2_4.22
sxtw x0, w2
ldrsb w0, [x1, x0]
add w0, w0, 10
b .L41
.L39:
ldr w1, [sp, 12]
mov w0, 16777215
cmp w1, w0
bgt .L43
ldr w1, [sp, 12]
mov w0, 524287
cmp w1, w0
bgt .L44
ldr w0, [sp, 12]
asr w2, w0, 15
adrp x0, log2_4.22
add x1, x0, :lo12:log2_4.22
sxtw x0, w2
ldrsb w0, [x1, x0]
add w0, w0, 15
b .L41
.L44:
ldr w0, [sp, 12]
asr w2, w0, 20
adrp x0, log2_4.22
add x1, x0, :lo12:log2_4.22
sxtw x0, w2
ldrsb w0, [x1, x0]
add w0, w0, 20
b .L41
.L43:
ldr w1, [sp, 12]
mov w0, 536870911
cmp w1, w0
bgt .L45
ldr w0, [sp, 12]
asr w2, w0, 25
adrp x0, log2_4.22
add x1, x0, :lo12:log2_4.22
sxtw x0, w2
ldrsb w0, [x1, x0]
add w0, w0, 25
b .L41
.L45:
mov w0, 0
.L41:
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE16:
.size ilog, .-ilog
.align 2
.type float32_unpack, %function
float32_unpack:
.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 w0, [sp, 28]
ldr w0, [sp, 28]
and w0, w0, 2097151
str w0, [sp, 44]
ldr w0, [sp, 28]
and w0, w0, -2147483648
str w0, [sp, 48]
ldr w0, [sp, 28]
lsr w0, w0, 21
and w0, w0, 1023
str w0, [sp, 52]
ldr w0, [sp, 48]
cmp w0, 0
beq .L47
ldr w0, [sp, 44]
ucvtf d0, w0
fneg d0, d0
b .L48
.L47:
ldr w0, [sp, 44]
ucvtf d0, w0
.L48:
str d0, [sp, 56]
ldr d0, [sp, 56]
fcvt s0, d0
fcvt d0, s0
ldr w0, [sp, 52]
sub w0, w0, #788
bl ldexp
fcvt s0, d0
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE17:
.size float32_unpack, .-float32_unpack
.align 2
.type add_entry, %function
add_entry:
.LFB18:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 24]
str w1, [sp, 20]
str w2, [sp, 16]
str w3, [sp, 12]
str w4, [sp, 8]
str x5, [sp]
ldr x0, [sp, 24]
ldrb w0, [x0, 27]
cmp w0, 0
bne .L51
ldr x0, [sp, 24]
ldr x1, [x0, 40]
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [sp, 20]
str w1, [x0]
b .L53
.L51:
ldr x0, [sp, 24]
ldr x1, [x0, 40]
ldrsw x0, [sp, 12]
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [sp, 20]
str w1, [x0]
ldr x0, [sp, 24]
ldr x1, [x0, 8]
ldrsw x0, [sp, 12]
add x0, x1, x0
ldr w1, [sp, 8]
and w1, w1, 255
strb w1, [x0]
ldrsw x0, [sp, 12]
lsl x0, x0, 2
ldr x1, [sp]
add x0, x1, x0
ldr w1, [sp, 16]
str w1, [x0]
.L53:
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE18:
.size add_entry, .-add_entry
.section .rodata
.align 3
.LC0:
.string "program.c"
.align 3
.LC1:
.string "c->sorted_entries == 0"
.align 3
.LC2:
.string "z >= 0 && z < 32"
.align 3
.LC3:
.string "len[i] >= 0 && len[i] < 32"
.align 3
.LC4:
.string "available[y] == 0"
.text
.align 2
.type compute_codewords, %function
compute_codewords:
.LFB19:
.cfi_startproc
stp x29, x30, [sp, -208]!
.cfi_def_cfa_offset 208
.cfi_offset 29, -208
.cfi_offset 30, -200
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str w2, [sp, 28]
str x3, [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
str wzr, [sp, 56]
add x0, sp, 72
mov x2, 128
mov w1, 0
bl memset
str wzr, [sp, 52]
b .L55
.L58:
ldrsw x0, [sp, 52]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 255
bne .L81
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L55:
ldr w1, [sp, 52]
ldr w0, [sp, 28]
cmp w1, w0
blt .L58
b .L57
.L81:
nop
.L57:
ldr w1, [sp, 52]
ldr w0, [sp, 28]
cmp w1, w0
bne .L59
ldr x0, [sp, 40]
ldr w0, [x0, 2112]
cmp w0, 0
beq .L60
adrp x0, __PRETTY_FUNCTION__.21
add x3, x0, :lo12:__PRETTY_FUNCTION__.21
mov w2, 1049
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __assert_fail
.L60:
mov w0, 1
b .L78
.L59:
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
ldrsw x1, [sp, 52]
ldr x2, [sp, 32]
add x1, x2, x1
ldrb w1, [x1]
ldr x5, [sp, 16]
mov w4, w1
mov w3, w0
ldr w2, [sp, 52]
mov w1, 0
ldr x0, [sp, 40]
bl add_entry
mov w0, 1
str w0, [sp, 48]
b .L62
.L63:
mov w1, 32
ldr w0, [sp, 48]
sub w0, w1, w0
mov w1, 1
lsl w2, w1, w0
ldrsw x0, [sp, 48]
lsl x0, x0, 2
add x1, sp, 72
str w2, [x1, x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L62:
ldrsw x0, [sp, 52]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 48]
cmp w0, w1
ble .L63
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 48]
b .L64
.L77:
ldrsw x0, [sp, 48]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 255
beq .L82
b .L67
.L69:
ldr w0, [sp, 60]
sub w0, w0, #1
str w0, [sp, 60]
.L67:
ldr w0, [sp, 60]
cmp w0, 0
ble .L68
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x1, sp, 72
ldr w0, [x1, x0]
cmp w0, 0
beq .L69
.L68:
ldr w0, [sp, 60]
cmp w0, 0
bne .L70
mov w0, 0
b .L78
.L70:
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x1, sp, 72
ldr w0, [x1, x0]
str w0, [sp, 68]
ldr w0, [sp, 60]
cmp w0, 0
blt .L71
ldr w0, [sp, 60]
cmp w0, 31
ble .L80
.L71:
adrp x0, __PRETTY_FUNCTION__.21
add x3, x0, :lo12:__PRETTY_FUNCTION__.21
mov w2, 1072
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __assert_fail
.L80:
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x1, sp, 72
str wzr, [x1, x0]
ldr w0, [sp, 68]
bl bit_reverse
mov w6, w0
ldr w0, [sp, 56]
add w1, w0, 1
str w1, [sp, 56]
ldrsw x1, [sp, 48]
ldr x2, [sp, 32]
add x1, x2, x1
ldrb w1, [x1]
ldr x5, [sp, 16]
mov w4, w1
mov w3, w0
ldr w2, [sp, 48]
mov w1, w6
ldr x0, [sp, 40]
bl add_entry
ldrsw x0, [sp, 48]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 60]
cmp w0, w1
beq .L66
ldrsw x0, [sp, 48]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 31
bls .L73
adrp x0, __PRETTY_FUNCTION__.21
add x3, x0, :lo12:__PRETTY_FUNCTION__.21
mov w2, 1077
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __assert_fail
.L73:
ldrsw x0, [sp, 48]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
str w0, [sp, 64]
b .L74
.L76:
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x1, sp, 72
ldr w0, [x1, x0]
cmp w0, 0
beq .L75
adrp x0, __PRETTY_FUNCTION__.21
add x3, x0, :lo12:__PRETTY_FUNCTION__.21
mov w2, 1079
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl __assert_fail
.L75:
mov w1, 32
ldr w0, [sp, 64]
sub w0, w1, w0
mov w1, 1
lsl w0, w1, w0
mov w1, w0
ldr w0, [sp, 68]
add w2, w1, w0
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x1, sp, 72
str w2, [x1, x0]
ldr w0, [sp, 64]
sub w0, w0, #1
str w0, [sp, 64]
.L74:
ldr w1, [sp, 64]
ldr w0, [sp, 60]
cmp w1, w0
bgt .L76
b .L66
.L82:
nop
.L66:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L64:
ldr w1, [sp, 48]
ldr w0, [sp, 28]
cmp w1, w0
blt .L77
mov w0, 1
.L78:
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 .L79
bl __stack_chk_fail
.L79:
mov w0, w1
ldp x29, x30, [sp], 208
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE19:
.size compute_codewords, .-compute_codewords
.align 2
.type compute_accelerated_huffman, %function
compute_accelerated_huffman:
.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 x0, [sp, 24]
str wzr, [sp, 36]
b .L84
.L85:
ldr x0, [sp, 24]
ldrsw x1, [sp, 36]
add x1, x1, 24
mov w2, -1
strh w2, [x0, x1, lsl 1]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L84:
ldr w0, [sp, 36]
cmp w0, 1023
ble .L85
ldr x0, [sp, 24]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L86
ldr x0, [sp, 24]
ldr w0, [x0, 2112]
b .L87
.L86:
ldr x0, [sp, 24]
ldr w0, [x0, 4]
.L87:
str w0, [sp, 40]
ldr w1, [sp, 40]
mov w0, 32767
cmp w1, w0
ble .L88
mov w0, 32767
str w0, [sp, 40]
.L88:
str wzr, [sp, 36]
b .L89
.L95:
ldr x0, [sp, 24]
ldr x1, [x0, 8]
ldrsw x0, [sp, 36]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 10
bhi .L90
ldr x0, [sp, 24]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L91
ldr x0, [sp, 24]
ldr x1, [x0, 2096]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
bl bit_reverse
b .L92
.L91:
ldr x0, [sp, 24]
ldr x1, [x0, 40]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
.L92:
str w0, [sp, 44]
b .L93
.L94:
ldr w0, [sp, 36]
sxth w2, w0
ldr x0, [sp, 24]
ldr w1, [sp, 44]
add x1, x1, 24
strh w2, [x0, x1, lsl 1]
ldr x0, [sp, 24]
ldr x1, [x0, 8]
ldrsw x0, [sp, 36]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
mov w0, 1
lsl w0, w0, w1
mov w1, w0
ldr w0, [sp, 44]
add w0, w0, w1
str w0, [sp, 44]
.L93:
ldr w0, [sp, 44]
cmp w0, 1023
bls .L94
.L90:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L89:
ldr w1, [sp, 36]
ldr w0, [sp, 40]
cmp w1, w0
blt .L95
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE20:
.size compute_accelerated_huffman, .-compute_accelerated_huffman
.align 2
.type uint32_compare, %function
uint32_compare:
.LFB21:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str x1, [sp]
ldr x0, [sp, 8]
ldr w0, [x0]
str w0, [sp, 24]
ldr x0, [sp]
ldr w0, [x0]
str w0, [sp, 28]
ldr w1, [sp, 24]
ldr w0, [sp, 28]
cmp w1, w0
bcc .L97
ldr w1, [sp, 24]
ldr w0, [sp, 28]
cmp w1, w0
cset w0, hi
and w0, w0, 255
b .L99
.L97:
mov w0, -1
.L99:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE21:
.size uint32_compare, .-uint32_compare
.section .rodata
.align 3
.LC5:
.string "len != NO_CODE"
.text
.align 2
.type include_in_sort, %function
include_in_sort:
.LFB22:
.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]
strb w1, [sp, 23]
ldr x0, [sp, 24]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L101
ldrb w0, [sp, 23]
cmp w0, 255
bne .L102
adrp x0, __PRETTY_FUNCTION__.20
add x3, x0, :lo12:__PRETTY_FUNCTION__.20
mov w2, 1126
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl __assert_fail
.L102:
mov w0, 1
b .L103
.L101:
ldrb w0, [sp, 23]
cmp w0, 255
bne .L104
mov w0, 0
b .L103
.L104:
ldrb w0, [sp, 23]
cmp w0, 10
bls .L105
mov w0, 1
b .L103
.L105:
mov w0, 0
.L103:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE22:
.size include_in_sort, .-include_in_sort
.section .rodata
.align 3
.LC6:
.string "k == c->sorted_entries"
.align 3
.LC7:
.string "c->sorted_codewords[x] == code"
.text
.align 2
.type compute_sorted_huffman, %function
compute_sorted_huffman:
.LFB23:
.cfi_startproc
stp x29, x30, [sp, -96]!
.cfi_def_cfa_offset 96
.cfi_offset 29, -96
.cfi_offset 30, -88
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -80
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
ldr x0, [sp, 56]
ldrb w0, [x0, 27]
cmp w0, 0
bne .L107
str wzr, [sp, 68]
str wzr, [sp, 64]
b .L108
.L110:
ldrsw x0, [sp, 64]
ldr x1, [sp, 48]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
ldr x0, [sp, 56]
bl include_in_sort
cmp w0, 0
beq .L109
ldr x0, [sp, 56]
ldr x1, [x0, 40]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr w3, [x0]
ldr x0, [sp, 56]
ldr x1, [x0, 2096]
ldr w0, [sp, 68]
add w2, w0, 1
str w2, [sp, 68]
sxtw x0, w0
lsl x0, x0, 2
add x19, x1, x0
mov w0, w3
bl bit_reverse
str w0, [x19]
.L109:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L108:
ldr x0, [sp, 56]
ldr w0, [x0, 4]
ldr w1, [sp, 64]
cmp w1, w0
blt .L110
ldr x0, [sp, 56]
ldr w0, [x0, 2112]
ldr w1, [sp, 68]
cmp w1, w0
beq .L111
adrp x0, __PRETTY_FUNCTION__.19
add x3, x0, :lo12:__PRETTY_FUNCTION__.19
mov w2, 1146
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl __assert_fail
.L107:
str wzr, [sp, 64]
b .L112
.L113:
ldr x0, [sp, 56]
ldr x1, [x0, 40]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr w2, [x0]
ldr x0, [sp, 56]
ldr x1, [x0, 2096]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x19, x1, x0
mov w0, w2
bl bit_reverse
str w0, [x19]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L112:
ldr x0, [sp, 56]
ldr w0, [x0, 2112]
ldr w1, [sp, 64]
cmp w1, w0
blt .L113
.L111:
ldr x0, [sp, 56]
ldr x4, [x0, 2096]
ldr x0, [sp, 56]
ldr w0, [x0, 2112]
sxtw x1, w0
adrp x0, uint32_compare
add x3, x0, :lo12:uint32_compare
mov x2, 4
mov x0, x4
bl qsort
ldr x0, [sp, 56]
ldr x1, [x0, 2096]
ldr x0, [sp, 56]
ldr w0, [x0, 2112]
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
mov w1, -1
str w1, [x0]
ldr x0, [sp, 56]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L114
ldr x0, [sp, 56]
ldr w0, [x0, 2112]
b .L115
.L114:
ldr x0, [sp, 56]
ldr w0, [x0, 4]
.L115:
str w0, [sp, 80]
str wzr, [sp, 64]
b .L116
.L125:
ldr x0, [sp, 56]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L117
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w0, [x0]
uxtw x0, w0
ldr x1, [sp, 48]
add x0, x1, x0
ldrb w0, [x0]
b .L118
.L117:
ldrsw x0, [sp, 64]
ldr x1, [sp, 48]
add x0, x1, x0
ldrb w0, [x0]
.L118:
str w0, [sp, 84]
ldr w0, [sp, 84]
and w0, w0, 255
mov w1, w0
ldr x0, [sp, 56]
bl include_in_sort
cmp w0, 0
beq .L119
ldr x0, [sp, 56]
ldr x1, [x0, 40]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
bl bit_reverse
str w0, [sp, 88]
str wzr, [sp, 72]
ldr x0, [sp, 56]
ldr w0, [x0, 2112]
str w0, [sp, 76]
b .L120
.L122:
ldr w0, [sp, 76]
asr w0, w0, 1
ldr w1, [sp, 72]
add w0, w1, w0
str w0, [sp, 92]
ldr x0, [sp, 56]
ldr x1, [x0, 2096]
ldrsw x0, [sp, 92]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 88]
cmp w1, w0
bcc .L121
ldr w0, [sp, 92]
str w0, [sp, 72]
ldr w0, [sp, 76]
asr w0, w0, 1
ldr w1, [sp, 76]
sub w0, w1, w0
str w0, [sp, 76]
b .L120
.L121:
ldr w0, [sp, 76]
asr w0, w0, 1
str w0, [sp, 76]
.L120:
ldr w0, [sp, 76]
cmp w0, 1
bgt .L122
ldr x0, [sp, 56]
ldr x1, [x0, 2096]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 88]
cmp w1, w0
beq .L123
adrp x0, __PRETTY_FUNCTION__.19
add x3, x0, :lo12:__PRETTY_FUNCTION__.19
mov w2, 1176
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl __assert_fail
.L123:
ldr x0, [sp, 56]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L124
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w2, [x0]
ldr x0, [sp, 56]
ldr x1, [x0, 2104]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
add x0, x1, x0
mov w1, w2
str w1, [x0]
ldr x0, [sp, 56]
ldr x1, [x0, 8]
ldrsw x0, [sp, 72]
add x0, x1, x0
ldr w1, [sp, 84]
and w1, w1, 255
strb w1, [x0]
b .L119
.L124:
ldr x0, [sp, 56]
ldr x1, [x0, 2104]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [sp, 64]
str w1, [x0]
.L119:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L116:
ldr w1, [sp, 64]
ldr w0, [sp, 80]
cmp w1, w0
blt .L125
nop
nop
ldr x19, [sp, 16]
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE23:
.size compute_sorted_huffman, .-compute_sorted_huffman
.align 2
.type vorbis_validate, %function
vorbis_validate:
.LFB24:
.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 x2, 6
adrp x0, vorbis.18
add x1, x0, :lo12:vorbis.18
ldr x0, [sp, 24]
bl memcmp
cmp w0, 0
cset w0, eq
and w0, w0, 255
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE24:
.size vorbis_validate, .-vorbis_validate
.section .rodata
.align 3
.LC8:
.string "pow((float) r+1, dim) > entries"
.align 3
.LC9:
.string "(int) floor(pow((float) r, dim)) <= entries"
.text
.align 2
.type lookup1_values, %function
lookup1_values:
.LFB25:
.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 w1, [sp, 24]
ldr s0, [sp, 28]
scvtf s0, s0
fcvt d0, s0
bl log
fcvt s1, d0
ldr s0, [sp, 24]
scvtf s0, s0
fdiv s0, s1, s0
fcvt d0, s0
bl exp
frintz d0, d0
fcvtzs w0, d0
str w0, [sp, 44]
ldr s0, [sp, 44]
scvtf s1, s0
fmov s0, 1.0e+0
fadd s0, s1, s0
fcvt d0, s0
ldr w0, [sp, 24]
scvtf d1, w0
bl pow
bl floor
fcvtzs w0, d0
ldr w1, [sp, 28]
cmp w1, w0
blt .L129
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L129:
ldr s0, [sp, 44]
scvtf s1, s0
fmov s0, 1.0e+0
fadd s0, s1, s0
fcvt d0, s0
ldr w0, [sp, 24]
scvtf d1, w0
bl pow
fmov d1, d0
ldr w0, [sp, 28]
scvtf d0, w0
fcmpe d1, d0
bgt .L130
adrp x0, __PRETTY_FUNCTION__.17
add x3, x0, :lo12:__PRETTY_FUNCTION__.17
mov w2, 1201
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl __assert_fail
.L130:
ldr s0, [sp, 44]
scvtf s0, s0
fcvt d0, s0
ldr w0, [sp, 24]
scvtf d1, w0
bl pow
bl floor
fcvtzs w0, d0
ldr w1, [sp, 28]
cmp w1, w0
bge .L131
adrp x0, __PRETTY_FUNCTION__.17
add x3, x0, :lo12:__PRETTY_FUNCTION__.17
mov w2, 1202
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __assert_fail
.L131:
ldr w0, [sp, 44]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE25:
.size lookup1_values, .-lookup1_values
.align 2
.type compute_twiddle_factors, %function
compute_twiddle_factors:
.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 w0, [sp, 44]
str x1, [sp, 32]
str x2, [sp, 24]
str x3, [sp, 16]
ldr w0, [sp, 44]
asr w0, w0, 2
str w0, [sp, 56]
ldr w0, [sp, 44]
asr w0, w0, 3
str w0, [sp, 60]
str wzr, [sp, 52]
ldr w0, [sp, 52]
str w0, [sp, 48]
b .L134
.L135:
ldr w0, [sp, 48]
lsl w0, w0, 2
scvtf d0, w0
adrp x0, .LC10
ldr d1, [x0, #:lo12:.LC10]
fmul d1, d0, d1
ldr w0, [sp, 44]
scvtf d0, w0
fdiv d0, d1, d0
bl cos
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr w0, [sp, 48]
lsl w0, w0, 2
scvtf d0, w0
adrp x0, .LC10
ldr d1, [x0, #:lo12:.LC10]
fmul d1, d0, d1
ldr w0, [sp, 44]
scvtf d0, w0
fdiv d0, d1, d0
bl sin
fcvt s0, d0
ldrsw x0, [sp, 52]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
fneg s0, s0
str s0, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
scvtf d0, w0
adrp x0, .LC10
ldr d1, [x0, #:lo12:.LC10]
fmul d1, d0, d1
ldr w0, [sp, 44]
scvtf d0, w0
fdiv d1, d1, d0
fmov d0, 2.0e+0
fdiv d0, d1, d0
bl cos
fcvt s1, d0
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
fmov s0, 5.0e-1
fmul s0, s1, s0
str s0, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
scvtf d0, w0
adrp x0, .LC10
ldr d1, [x0, #:lo12:.LC10]
fmul d1, d0, d1
ldr w0, [sp, 44]
scvtf d0, w0
fdiv d1, d1, d0
fmov d0, 2.0e+0
fdiv d0, d1, d0
bl sin
fcvt s1, d0
ldrsw x0, [sp, 52]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
fmov s0, 5.0e-1
fmul s0, s1, s0
str s0, [x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
ldr w0, [sp, 52]
add w0, w0, 2
str w0, [sp, 52]
.L134:
ldr w1, [sp, 48]
ldr w0, [sp, 56]
cmp w1, w0
blt .L135
str wzr, [sp, 52]
ldr w0, [sp, 52]
str w0, [sp, 48]
b .L136
.L137:
ldr w0, [sp, 52]
add w0, w0, 1
lsl w0, w0, 1
scvtf d0, w0
adrp x0, .LC10
ldr d1, [x0, #:lo12:.LC10]
fmul d1, d0, d1
ldr w0, [sp, 44]
scvtf d0, w0
fdiv d0, d1, d0
bl cos
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
lsl w0, w0, 1
scvtf d0, w0
adrp x0, .LC10
ldr d1, [x0, #:lo12:.LC10]
fmul d1, d0, d1
ldr w0, [sp, 44]
scvtf d0, w0
fdiv d0, d1, d0
bl sin
fcvt s0, d0
ldrsw x0, [sp, 52]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
fneg s0, s0
str s0, [x0]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
ldr w0, [sp, 52]
add w0, w0, 2
str w0, [sp, 52]
.L136:
ldr w1, [sp, 48]
ldr w0, [sp, 60]
cmp w1, w0
blt .L137
nop
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE26:
.size compute_twiddle_factors, .-compute_twiddle_factors
.align 2
.type compute_window, %function
compute_window:
.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]
ldr w0, [sp, 28]
asr w0, w0, 1
str w0, [sp, 44]
str wzr, [sp, 40]
b .L139
.L140:
ldr w0, [sp, 40]
scvtf d1, w0
fmov d0, 5.0e-1
fadd d1, d1, d0
ldr w0, [sp, 44]
scvtf d0, w0
fdiv d1, d1, d0
fmov d0, 5.0e-1
fmul d0, d1, d0
adrp x0, .LC10
ldr d1, [x0, #:lo12:.LC10]
fmul d0, d0, d1
bl sin
fcvt s0, d0
bl square
fcvt d0, s0
adrp x0, .LC11
ldr d1, [x0, #:lo12:.LC11]
fmul d0, d0, d1
bl sin
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
fcvt s0, d0
str s0, [x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L139:
ldr w1, [sp, 40]
ldr w0, [sp, 44]
cmp w1, w0
blt .L140
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE27:
.size compute_window, .-compute_window
.align 2
.type compute_bitreverse, %function
compute_bitreverse:
.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 w0, [sp, 28]
str x1, [sp, 16]
ldr w0, [sp, 28]
bl ilog
sub w0, w0, #1
str w0, [sp, 40]
ldr w0, [sp, 28]
asr w0, w0, 3
str w0, [sp, 44]
str wzr, [sp, 36]
b .L142
.L143:
ldr w0, [sp, 36]
bl bit_reverse
mov w2, w0
mov w1, 35
ldr w0, [sp, 40]
sub w0, w1, w0
lsr w0, w2, w0
and w1, w0, 65535
ldrsw x0, [sp, 36]
lsl x0, x0, 1
ldr x2, [sp, 16]
add x0, x2, x0
ubfiz w1, w1, 2, 14
and w1, w1, 65535
strh w1, [x0]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L142:
ldr w1, [sp, 36]
ldr w0, [sp, 44]
cmp w1, w0
blt .L143
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE28:
.size compute_bitreverse, .-compute_bitreverse
.align 2
.type init_blocksize, %function
init_blocksize:
.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 w1, [sp, 20]
str w2, [sp, 16]
ldr w0, [sp, 16]
asr w0, w0, 1
str w0, [sp, 36]
ldr w0, [sp, 16]
asr w0, w0, 2
str w0, [sp, 40]
ldr w0, [sp, 16]
asr w0, w0, 3
str w0, [sp, 44]
ldrsw x0, [sp, 36]
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 24]
bl setup_malloc
mov x2, x0
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 174
str x2, [x0, x1, lsl 3]
ldrsw x0, [sp, 36]
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 24]
bl setup_malloc
mov x2, x0
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 176
str x2, [x0, x1, lsl 3]
ldrsw x0, [sp, 40]
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 24]
bl setup_malloc
mov x2, x0
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 178
str x2, [x0, x1, lsl 3]
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 174
ldr x0, [x0, x1, lsl 3]
cmp x0, 0
beq .L145
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 176
ldr x0, [x0, x1, lsl 3]
cmp x0, 0
beq .L145
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 178
ldr x0, [x0, x1, lsl 3]
cmp x0, 0
bne .L146
.L145:
mov w1, 3
ldr x0, [sp, 24]
bl error
b .L147
.L146:
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 174
ldr x4, [x0, x1, lsl 3]
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 176
ldr x2, [x0, x1, lsl 3]
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 178
ldr x0, [x0, x1, lsl 3]
mov x3, x0
mov x1, x4
ldr w0, [sp, 16]
bl compute_twiddle_factors
ldrsw x0, [sp, 36]
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 24]
bl setup_malloc
mov x2, x0
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 180
str x2, [x0, x1, lsl 3]
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 180
ldr x0, [x0, x1, lsl 3]
cmp x0, 0
bne .L148
mov w1, 3
ldr x0, [sp, 24]
bl error
b .L147
.L148:
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 180
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr w0, [sp, 16]
bl compute_window
ldrsw x0, [sp, 44]
lsl w0, w0, 1
mov w1, w0
ldr x0, [sp, 24]
bl setup_malloc
mov x2, x0
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 182
str x2, [x0, x1, lsl 3]
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 182
ldr x0, [x0, x1, lsl 3]
cmp x0, 0
bne .L149
mov w1, 3
ldr x0, [sp, 24]
bl error
b .L147
.L149:
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
add x1, x1, 182
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr w0, [sp, 16]
bl compute_bitreverse
mov w0, 1
.L147:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE29:
.size init_blocksize, .-init_blocksize
.align 2
.type neighbors, %function
neighbors:
.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 x3, [sp]
mov w0, -1
str w0, [sp, 36]
mov w0, 65536
str w0, [sp, 40]
str wzr, [sp, 44]
b .L151
.L154:
ldrsw x0, [sp, 44]
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
ldrh w0, [x0]
mov w1, w0
ldr w0, [sp, 36]
cmp w0, w1
bge .L152
ldrsw x0, [sp, 44]
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
ldrh w1, [x0]
ldrsw x0, [sp, 20]
lsl x0, x0, 1
ldr x2, [sp, 24]
add x0, x2, x0
ldrh w0, [x0]
cmp w1, w0
bcs .L152
ldr x0, [sp, 8]
ldr w1, [sp, 44]
str w1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
ldrh w0, [x0]
str w0, [sp, 36]
.L152:
ldrsw x0, [sp, 44]
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
ldrh w0, [x0]
mov w1, w0
ldr w0, [sp, 40]
cmp w0, w1
ble .L153
ldrsw x0, [sp, 44]
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
ldrh w1, [x0]
ldrsw x0, [sp, 20]
lsl x0, x0, 1
ldr x2, [sp, 24]
add x0, x2, x0
ldrh w0, [x0]
cmp w1, w0
bls .L153
ldr x0, [sp]
ldr w1, [sp, 44]
str w1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
ldrh w0, [x0]
str w0, [sp, 40]
.L153:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L151:
ldr w1, [sp, 44]
ldr w0, [sp, 20]
cmp w1, w0
blt .L154
nop
nop
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE30:
.size neighbors, .-neighbors
.align 2
.type point_compare, %function
point_compare:
.LFB31:
.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, 16]
ldr x0, [sp]
str x0, [sp, 24]
ldr x0, [sp, 16]
ldrh w1, [x0]
ldr x0, [sp, 24]
ldrh w0, [x0]
cmp w1, w0
bcc .L156
ldr x0, [sp, 16]
ldrh w1, [x0]
ldr x0, [sp, 24]
ldrh w0, [x0]
cmp w1, w0
cset w0, hi
and w0, w0, 255
b .L158
.L156:
mov w0, -1
.L158:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE31:
.size point_compare, .-point_compare
.align 2
.type get8, %function
get8:
.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 x0, [sp, 24]
ldr x0, [sp, 24]
ldr x0, [x0, 40]
cmp x0, 0
beq .L160
ldr x0, [sp, 24]
ldr x1, [x0, 40]
ldr x0, [sp, 24]
ldr x0, [x0, 56]
cmp x1, x0
bcc .L161
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 128]
mov w0, 0
b .L162
.L161:
ldr x0, [sp, 24]
ldr x0, [x0, 40]
add x2, x0, 1
ldr x1, [sp, 24]
str x2, [x1, 40]
ldrb w0, [x0]
b .L162
.L160:
ldr x0, [sp, 24]
ldr x0, [x0, 24]
bl fgetc
str w0, [sp, 44]
ldr w0, [sp, 44]
cmn w0, #1
bne .L163
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 128]
mov w0, 0
b .L162
.L163:
ldr w0, [sp, 44]
and w0, w0, 255
.L162:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE32:
.size get8, .-get8
.align 2
.type get32, %function
get32:
.LFB33:
.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 get8
and w0, w0, 255
str w0, [sp, 44]
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
lsl w0, w0, 8
mov w1, w0
ldr w0, [sp, 44]
add w0, w0, w1
str w0, [sp, 44]
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
lsl w0, w0, 16
mov w1, w0
ldr w0, [sp, 44]
add w0, w0, w1
str w0, [sp, 44]
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
lsl w0, w0, 24
ldr w1, [sp, 44]
add w0, w1, w0
str w0, [sp, 44]
ldr w0, [sp, 44]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE33:
.size get32, .-get32
.align 2
.type getn, %function
getn:
.LFB34:
.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, 40]
str x1, [sp, 32]
str w2, [sp, 28]
ldr x0, [sp, 40]
ldr x0, [x0, 40]
cmp x0, 0
beq .L167
ldr x0, [sp, 40]
ldr x1, [x0, 40]
ldrsw x0, [sp, 28]
add x1, x1, x0
ldr x0, [sp, 40]
ldr x0, [x0, 56]
cmp x1, x0
bls .L168
ldr x0, [sp, 40]
mov w1, 1
str w1, [x0, 128]
mov w0, 0
b .L169
.L168:
ldr x0, [sp, 40]
ldr x0, [x0, 40]
ldrsw x1, [sp, 28]
mov x2, x1
mov x1, x0
ldr x0, [sp, 32]
bl memcpy
ldr x0, [sp, 40]
ldr x1, [x0, 40]
ldrsw x0, [sp, 28]
add x1, x1, x0
ldr x0, [sp, 40]
str x1, [x0, 40]
mov w0, 1
b .L169
.L167:
ldrsw x1, [sp, 28]
ldr x0, [sp, 40]
ldr x0, [x0, 24]
mov x3, x0
mov x2, 1
ldr x0, [sp, 32]
bl fread
cmp x0, 1
bne .L170
mov w0, 1
b .L169
.L170:
ldr x0, [sp, 40]
mov w1, 1
str w1, [x0, 128]
mov w0, 0
.L169:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE34:
.size getn, .-getn
.align 2
.type skip, %function
skip:
.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]
ldr x0, [sp, 24]
ldr x0, [x0, 40]
cmp x0, 0
beq .L172
ldr x0, [sp, 24]
ldr x1, [x0, 40]
ldrsw x0, [sp, 20]
add x1, x1, x0
ldr x0, [sp, 24]
str x1, [x0, 40]
ldr x0, [sp, 24]
ldr x1, [x0, 40]
ldr x0, [sp, 24]
ldr x0, [x0, 56]
cmp x1, x0
bcc .L175
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 128]
b .L175
.L172:
ldr x0, [sp, 24]
ldr x0, [x0, 24]
bl ftell
str x0, [sp, 40]
ldr x0, [sp, 24]
ldr x3, [x0, 24]
ldrsw x1, [sp, 20]
ldr x0, [sp, 40]
add x0, x1, x0
mov w2, 0
mov x1, x0
mov x0, x3
bl fseek
b .L171
.L175:
nop
.L171:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE35:
.size skip, .-skip
.align 2
.type set_file_offset, %function
set_file_offset:
.LFB36:
.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 x0, [sp, 24]
ldrb w0, [x0, 68]
cmp w0, 0
beq .L177
mov w0, 0
b .L178
.L177:
ldr x0, [sp, 24]
str wzr, [x0, 128]
ldr x0, [sp, 24]
ldr x0, [x0, 40]
cmp x0, 0
beq .L179
ldr x0, [sp, 24]
ldr x1, [x0, 48]
ldr w0, [sp, 20]
add x1, x1, x0
ldr x0, [sp, 24]
ldr x0, [x0, 56]
cmp x1, x0
bcc .L180
ldr x0, [sp, 24]
ldr x1, [x0, 56]
ldr x0, [sp, 24]
str x1, [x0, 40]
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 128]
mov w0, 0
b .L178
.L180:
ldr x0, [sp, 24]
ldr x1, [x0, 48]
ldr w0, [sp, 20]
add x1, x1, x0
ldr x0, [sp, 24]
str x1, [x0, 40]
mov w0, 1
b .L178
.L179:
ldr x0, [sp, 24]
ldr w1, [x0, 32]
ldr w0, [sp, 20]
add w0, w1, w0
ldr w1, [sp, 20]
cmp w1, w0
bhi .L181
ldr w0, [sp, 20]
cmp w0, 0
bge .L182
.L181:
mov w0, 2147483647
str w0, [sp, 20]
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 128]
b .L183
.L182:
ldr x0, [sp, 24]
ldr w0, [x0, 32]
ldr w1, [sp, 20]
add w0, w1, w0
str w0, [sp, 20]
.L183:
ldr x0, [sp, 24]
ldr x0, [x0, 24]
ldr w1, [sp, 20]
mov w2, 0
bl fseek
cmp w0, 0
bne .L184
mov w0, 1
b .L178
.L184:
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 128]
ldr x0, [sp, 24]
ldr x3, [x0, 24]
ldr x0, [sp, 24]
ldr w0, [x0, 32]
uxtw x0, w0
mov w2, 2
mov x1, x0
mov x0, x3
bl fseek
mov w0, 0
.L178:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE36:
.size set_file_offset, .-set_file_offset
.data
.align 3
.type ogg_page_header, %object
.size ogg_page_header, 4
ogg_page_header:
.ascii "OggS"
.text
.align 2
.type capture_pattern, %function
capture_pattern:
.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 get8
and w0, w0, 255
cmp w0, 79
beq .L186
mov w0, 0
b .L187
.L186:
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
cmp w0, 103
beq .L188
mov w0, 0
b .L187
.L188:
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
cmp w0, 103
beq .L189
mov w0, 0
b .L187
.L189:
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
cmp w0, 83
beq .L190
mov w0, 0
b .L187
.L190:
mov w0, 1
.L187:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE37:
.size capture_pattern, .-capture_pattern
.align 2
.type start_page_no_capturepattern, %function
start_page_no_capturepattern:
.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 x0, [sp, 24]
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
cmp w0, 0
beq .L192
mov w1, 31
ldr x0, [sp, 24]
bl error
b .L193
.L192:
ldr x0, [sp, 24]
bl get8
and w1, w0, 255
ldr x0, [sp, 24]
strb w1, [x0, 1739]
ldr x0, [sp, 24]
bl get32
str w0, [sp, 52]
ldr x0, [sp, 24]
bl get32
str w0, [sp, 56]
ldr x0, [sp, 24]
bl get32
ldr x0, [sp, 24]
bl get32
str w0, [sp, 60]
ldr w1, [sp, 60]
ldr x0, [sp, 24]
str w1, [x0, 1476]
ldr x0, [sp, 24]
bl get32
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
mov w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1480]
ldr x0, [sp, 24]
add x1, x0, 1484
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
mov w2, w0
ldr x0, [sp, 24]
bl getn
cmp w0, 0
bne .L194
mov w1, 10
ldr x0, [sp, 24]
bl error
b .L193
.L194:
ldr x0, [sp, 24]
mov w1, -2
str w1, [x0, 1768]
ldr w0, [sp, 52]
cmn w0, #1
bne .L195
ldr w0, [sp, 56]
cmn w0, #1
beq .L196
.L195:
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
sub w0, w0, #1
str w0, [sp, 40]
b .L197
.L200:
ldr x1, [sp, 24]
ldrsw x0, [sp, 40]
add x0, x1, x0
ldrb w0, [x0, 1484]
cmp w0, 255
bne .L204
ldr w0, [sp, 40]
sub w0, w0, #1
str w0, [sp, 40]
.L197:
ldr w0, [sp, 40]
cmp w0, 0
bge .L200
b .L199
.L204:
nop
.L199:
ldr w0, [sp, 40]
cmp w0, 0
blt .L196
ldr x0, [sp, 24]
ldr w1, [sp, 40]
str w1, [x0, 1768]
ldr x0, [sp, 24]
ldr w1, [sp, 52]
str w1, [x0, 1772]
.L196:
ldr x0, [sp, 24]
ldrb w0, [x0, 1741]
cmp w0, 0
beq .L201
str wzr, [sp, 48]
str wzr, [sp, 44]
b .L202
.L203:
ldr x1, [sp, 24]
ldrsw x0, [sp, 44]
add x0, x1, x0
ldrb w0, [x0, 1484]
mov w1, w0
ldr w0, [sp, 48]
add w0, w0, w1
str w0, [sp, 48]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L202:
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
ldr w1, [sp, 44]
cmp w1, w0
blt .L203
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
add w0, w0, 27
ldr w1, [sp, 48]
add w0, w1, w0
str w0, [sp, 48]
ldr x0, [sp, 24]
ldr w0, [x0, 72]
str w0, [sp, 64]
ldr w1, [sp, 64]
ldr w0, [sp, 48]
add w0, w1, w0
str w0, [sp, 68]
ldr w0, [sp, 52]
str w0, [sp, 72]
ldr x0, [sp, 24]
add x0, x0, 76
mov x1, x0
add x0, sp, 64
ldr x2, [x0]
str x2, [x1]
ldr w0, [x0, 8]
str w0, [x1, 8]
.L201:
ldr x0, [sp, 24]
str wzr, [x0, 1744]
mov w0, 1
.L193:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE38:
.size start_page_no_capturepattern, .-start_page_no_capturepattern
.align 2
.type start_page, %function
start_page:
.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]
bl capture_pattern
cmp w0, 0
bne .L206
mov w1, 30
ldr x0, [sp, 24]
bl error
b .L207
.L206:
ldr x0, [sp, 24]
bl start_page_no_capturepattern
.L207:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE39:
.size start_page, .-start_page
.align 2
.type start_packet, %function
start_packet:
.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 .L209
.L212:
ldr x0, [sp, 24]
bl start_page
cmp w0, 0
bne .L210
mov w0, 0
b .L211
.L210:
ldr x0, [sp, 24]
ldrb w0, [x0, 1739]
and w0, w0, 1
cmp w0, 0
beq .L209
mov w1, 32
ldr x0, [sp, 24]
bl error
b .L211
.L209:
ldr x0, [sp, 24]
ldr w0, [x0, 1744]
cmn w0, #1
beq .L212
ldr x0, [sp, 24]
str wzr, [x0, 1748]
ldr x0, [sp, 24]
str wzr, [x0, 1760]
ldr x0, [sp, 24]
str wzr, [x0, 1764]
ldr x0, [sp, 24]
strb wzr, [x0, 1740]
mov w0, 1
.L211:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE40:
.size start_packet, .-start_packet
.align 2
.type maybe_start_packet, %function
maybe_start_packet:
.LFB41:
.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, 1744]
cmn w0, #1
bne .L214
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
str w0, [sp, 44]
ldr x0, [sp, 24]
ldr w0, [x0, 128]
cmp w0, 0
beq .L215
mov w0, 0
b .L216
.L215:
ldr w0, [sp, 44]
cmp w0, 79
beq .L217
mov w1, 30
ldr x0, [sp, 24]
bl error
b .L216
.L217:
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
cmp w0, 103
beq .L218
mov w1, 30
ldr x0, [sp, 24]
bl error
b .L216
.L218:
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
cmp w0, 103
beq .L219
mov w1, 30
ldr x0, [sp, 24]
bl error
b .L216
.L219:
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
cmp w0, 83
beq .L220
mov w1, 30
ldr x0, [sp, 24]
bl error
b .L216
.L220:
ldr x0, [sp, 24]
bl start_page_no_capturepattern
cmp w0, 0
bne .L221
mov w0, 0
b .L216
.L221:
ldr x0, [sp, 24]
ldrb w0, [x0, 1739]
and w0, w0, 1
cmp w0, 0
beq .L214
ldr x0, [sp, 24]
str wzr, [x0, 1748]
ldr x0, [sp, 24]
strb wzr, [x0, 1740]
mov w1, 32
ldr x0, [sp, 24]
bl error
b .L216
.L214:
ldr x0, [sp, 24]
bl start_packet
.L216:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE41:
.size maybe_start_packet, .-maybe_start_packet
.section .rodata
.align 3
.LC12:
.string "f->bytes_in_seg == 0"
.text
.align 2
.type next_segment, %function
next_segment:
.LFB42:
.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, 1748]
cmp w0, 0
beq .L223
mov w0, 0
b .L224
.L223:
ldr x0, [sp, 24]
ldr w0, [x0, 1744]
cmn w0, #1
bne .L225
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
sub w1, w0, #1
ldr x0, [sp, 24]
str w1, [x0, 1752]
ldr x0, [sp, 24]
bl start_page
cmp w0, 0
bne .L226
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 1748]
mov w0, 0
b .L224
.L226:
ldr x0, [sp, 24]
ldrb w0, [x0, 1739]
and w0, w0, 1
cmp w0, 0
bne .L225
mov w1, 32
ldr x0, [sp, 24]
bl error
b .L224
.L225:
ldr x0, [sp, 24]
ldr w0, [x0, 1744]
add w2, w0, 1
ldr x1, [sp, 24]
str w2, [x1, 1744]
ldr x1, [sp, 24]
sxtw x0, w0
add x0, x1, x0
ldrb w0, [x0, 1484]
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 254
bgt .L227
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0, 1748]
ldr x0, [sp, 24]
ldr w0, [x0, 1744]
sub w1, w0, #1
ldr x0, [sp, 24]
str w1, [x0, 1752]
.L227:
ldr x0, [sp, 24]
ldr w1, [x0, 1744]
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
cmp w1, w0
blt .L228
ldr x0, [sp, 24]
mov w1, -1
str w1, [x0, 1744]
.L228:
ldr x0, [sp, 24]
ldrb w0, [x0, 1740]
cmp w0, 0
beq .L229
adrp x0, __PRETTY_FUNCTION__.16
add x3, x0, :lo12:__PRETTY_FUNCTION__.16
mov w2, 1508
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl __assert_fail
.L229:
ldr w0, [sp, 44]
and w1, w0, 255
ldr x0, [sp, 24]
strb w1, [x0, 1740]
ldr w0, [sp, 44]
.L224:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE42:
.size next_segment, .-next_segment
.section .rodata
.align 3
.LC13:
.string "f->bytes_in_seg > 0"
.text
.align 2
.type get8_packet_raw, %function
get8_packet_raw:
.LFB43:
.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]
ldrb w0, [x0, 1740]
cmp w0, 0
bne .L231
ldr x0, [sp, 24]
ldr w0, [x0, 1748]
cmp w0, 0
beq .L232
mov w0, -1
b .L233
.L232:
ldr x0, [sp, 24]
bl next_segment
cmp w0, 0
bne .L231
mov w0, -1
b .L233
.L231:
ldr x0, [sp, 24]
ldrb w0, [x0, 1740]
cmp w0, 0
bne .L234
adrp x0, __PRETTY_FUNCTION__.15
add x3, x0, :lo12:__PRETTY_FUNCTION__.15
mov w2, 1522
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl __assert_fail
.L234:
ldr x0, [sp, 24]
ldrb w0, [x0, 1740]
sub w0, w0, #1
and w1, w0, 255
ldr x0, [sp, 24]
strb w1, [x0, 1740]
ldr x0, [sp, 24]
ldr w0, [x0, 1764]
add w1, w0, 1
ldr x0, [sp, 24]
str w1, [x0, 1764]
ldr x0, [sp, 24]
bl get8
and w0, w0, 255
.L233:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE43:
.size get8_packet_raw, .-get8_packet_raw
.align 2
.type get8_packet, %function
get8_packet:
.LFB44:
.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 get8_packet_raw
str w0, [sp, 44]
ldr x0, [sp, 24]
str wzr, [x0, 1760]
ldr w0, [sp, 44]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE44:
.size get8_packet, .-get8_packet
.align 2
.type flush_packet, %function
flush_packet:
.LFB45:
.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]
nop
.L238:
ldr x0, [sp, 24]
bl get8_packet_raw
cmn w0, #1
bne .L238
nop
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE45:
.size flush_packet, .-flush_packet
.align 2
.type get_bits, %function
get_bits:
.LFB46:
.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 w0, [x0, 1760]
cmp w0, 0
bge .L240
mov w0, 0
b .L241
.L240:
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
ldr w1, [sp, 20]
cmp w1, w0
ble .L242
ldr w0, [sp, 20]
cmp w0, 24
ble .L243
mov w1, 24
ldr x0, [sp, 24]
bl get_bits
str w0, [sp, 44]
ldr w0, [sp, 20]
sub w0, w0, #24
mov w1, w0
ldr x0, [sp, 24]
bl get_bits
lsl w0, w0, 24
ldr w1, [sp, 44]
add w0, w1, w0
str w0, [sp, 44]
ldr w0, [sp, 44]
b .L241
.L243:
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
cmp w0, 0
bne .L245
ldr x0, [sp, 24]
str wzr, [x0, 1756]
b .L245
.L247:
ldr x0, [sp, 24]
bl get8_packet_raw
str w0, [sp, 40]
ldr w0, [sp, 40]
cmn w0, #1
bne .L246
ldr x0, [sp, 24]
mov w1, -1
str w1, [x0, 1760]
mov w0, 0
b .L241
.L246:
ldr x0, [sp, 24]
ldr w0, [x0, 1756]
ldr x1, [sp, 24]
ldr w1, [x1, 1760]
ldr w2, [sp, 40]
lsl w1, w2, w1
add w1, w0, w1
ldr x0, [sp, 24]
str w1, [x0, 1756]
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
add w1, w0, 8
ldr x0, [sp, 24]
str w1, [x0, 1760]
.L245:
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
ldr w1, [sp, 20]
cmp w1, w0
bgt .L247
.L242:
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
cmp w0, 0
bge .L248
mov w0, 0
b .L241
.L248:
ldr x0, [sp, 24]
ldr w0, [x0, 1756]
ldr w1, [sp, 20]
mov w2, 1
lsl w1, w2, w1
sub w1, w1, #1
and w0, w0, w1
str w0, [sp, 44]
ldr x0, [sp, 24]
ldr w1, [x0, 1756]
ldr w0, [sp, 20]
lsr w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1756]
ldr x0, [sp, 24]
ldr w1, [x0, 1760]
ldr w0, [sp, 20]
sub w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1760]
ldr w0, [sp, 44]
.L241:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE46:
.size get_bits, .-get_bits
.align 2
.type prep_huffman, %function
prep_huffman:
.LFB47:
.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, 1760]
cmp w0, 24
bgt .L249
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
cmp w0, 0
bne .L254
ldr x0, [sp, 24]
str wzr, [x0, 1756]
.L254:
ldr x0, [sp, 24]
ldr w0, [x0, 1748]
cmp w0, 0
beq .L252
ldr x0, [sp, 24]
ldrb w0, [x0, 1740]
cmp w0, 0
beq .L255
.L252:
ldr x0, [sp, 24]
bl get8_packet_raw
str w0, [sp, 44]
ldr w0, [sp, 44]
cmn w0, #1
beq .L256
ldr x0, [sp, 24]
ldr w1, [x0, 1756]
ldr w2, [sp, 44]
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
lsl w0, w2, w0
add w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1756]
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
add w1, w0, 8
ldr x0, [sp, 24]
str w1, [x0, 1760]
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
cmp w0, 24
ble .L254
b .L249
.L255:
nop
b .L249
.L256:
nop
.L249:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE47:
.size prep_huffman, .-prep_huffman
.section .rodata
.align 3
.LC14:
.string "!c->sparse"
.text
.align 2
.type codebook_decode_scalar_raw, %function
codebook_decode_scalar_raw:
.LFB48:
.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]
bl prep_huffman
ldr x0, [sp, 16]
ldr x0, [x0, 40]
cmp x0, 0
bne .L258
ldr x0, [sp, 16]
ldr x0, [x0, 2096]
cmp x0, 0
bne .L258
mov w0, -1
b .L259
.L258:
ldr x0, [sp, 16]
ldr w0, [x0, 4]
cmp w0, 8
ble .L260
ldr x0, [sp, 16]
ldr x0, [x0, 2096]
cmp x0, 0
cset w0, ne
and w0, w0, 255
b .L261
.L260:
ldr x0, [sp, 16]
ldr x0, [x0, 40]
cmp x0, 0
cset w0, eq
and w0, w0, 255
.L261:
cmp w0, 0
beq .L262
ldr x0, [sp, 24]
ldr w0, [x0, 1756]
bl bit_reverse
str w0, [sp, 52]
str wzr, [sp, 44]
ldr x0, [sp, 16]
ldr w0, [x0, 2112]
str w0, [sp, 48]
b .L263
.L265:
ldr w0, [sp, 48]
asr w0, w0, 1
ldr w1, [sp, 44]
add w0, w1, w0
str w0, [sp, 60]
ldr x0, [sp, 16]
ldr x1, [x0, 2096]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 52]
cmp w1, w0
bcc .L264
ldr w0, [sp, 60]
str w0, [sp, 44]
ldr w0, [sp, 48]
asr w0, w0, 1
ldr w1, [sp, 48]
sub w0, w1, w0
str w0, [sp, 48]
b .L263
.L264:
ldr w0, [sp, 48]
asr w0, w0, 1
str w0, [sp, 48]
.L263:
ldr w0, [sp, 48]
cmp w0, 1
bgt .L265
ldr x0, [sp, 16]
ldrb w0, [x0, 27]
cmp w0, 0
bne .L266
ldr x0, [sp, 16]
ldr x1, [x0, 2104]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 44]
.L266:
ldr x0, [sp, 16]
ldr x1, [x0, 8]
ldrsw x0, [sp, 44]
add x0, x1, x0
ldrb w0, [x0]
str w0, [sp, 56]
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
ldr w1, [sp, 56]
cmp w1, w0
bgt .L267
ldr x0, [sp, 24]
ldr w1, [x0, 1756]
ldr w0, [sp, 56]
lsr w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1756]
ldr x0, [sp, 24]
ldr w1, [x0, 1760]
ldr w0, [sp, 56]
sub w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1760]
ldr w0, [sp, 44]
b .L259
.L267:
ldr x0, [sp, 24]
str wzr, [x0, 1760]
mov w0, -1
b .L259
.L262:
ldr x0, [sp, 16]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L268
adrp x0, __PRETTY_FUNCTION__.14
add x3, x0, :lo12:__PRETTY_FUNCTION__.14
mov w2, 1638
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl __assert_fail
.L268:
str wzr, [sp, 40]
b .L269
.L273:
ldr x0, [sp, 16]
ldr x1, [x0, 8]
ldrsw x0, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 255
beq .L274
ldr x0, [sp, 16]
ldr x1, [x0, 40]
ldrsw x0, [sp, 40]
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [x0]
ldr x0, [sp, 24]
ldr w0, [x0, 1756]
ldr x2, [sp, 16]
ldr x3, [x2, 8]
ldrsw x2, [sp, 40]
add x2, x3, x2
ldrb w2, [x2]
mov w3, w2
mov w2, 1
lsl w2, w2, w3
sub w2, w2, #1
and w0, w0, w2
cmp w1, w0
bne .L271
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
ldr x1, [sp, 16]
ldr x2, [x1, 8]
ldrsw x1, [sp, 40]
add x1, x2, x1
ldrb w1, [x1]
cmp w0, w1
blt .L272
ldr x0, [sp, 24]
ldr w0, [x0, 1756]
ldr x1, [sp, 16]
ldr x2, [x1, 8]
ldrsw x1, [sp, 40]
add x1, x2, x1
ldrb w1, [x1]
lsr w1, w0, w1
ldr x0, [sp, 24]
str w1, [x0, 1756]
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
ldr x1, [sp, 16]
ldr x2, [x1, 8]
ldrsw x1, [sp, 40]
add x1, x2, x1
ldrb w1, [x1]
sub w1, w0, w1
ldr x0, [sp, 24]
str w1, [x0, 1760]
ldr w0, [sp, 40]
b .L259
.L272:
ldr x0, [sp, 24]
str wzr, [x0, 1760]
mov w0, -1
b .L259
.L274:
nop
.L271:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L269:
ldr x0, [sp, 16]
ldr w0, [x0, 4]
ldr w1, [sp, 40]
cmp w1, w0
blt .L273
mov w1, 21
ldr x0, [sp, 24]
bl error
ldr x0, [sp, 24]
str wzr, [x0, 1760]
mov w0, -1
.L259:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE48:
.size codebook_decode_scalar_raw, .-codebook_decode_scalar_raw
.section .rodata
.align 3
.LC15:
.string "z < c->sorted_entries"
.text
.align 2
.type codebook_decode_start, %function
codebook_decode_start:
.LFB49:
.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 w0, -1
str w0, [sp, 40]
ldr x0, [sp, 16]
ldrb w0, [x0, 25]
cmp w0, 0
bne .L276
mov w1, 21
ldr x0, [sp, 24]
bl error
b .L277
.L276:
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
cmp w0, 9
bgt .L278
ldr x0, [sp, 24]
bl prep_huffman
.L278:
ldr x0, [sp, 24]
ldr w0, [x0, 1756]
and w0, w0, 1023
str w0, [sp, 40]
ldr x0, [sp, 16]
ldrsw x1, [sp, 40]
add x1, x1, 24
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 40]
ldr w0, [sp, 40]
cmp w0, 0
blt .L279
ldr x0, [sp, 16]
ldr x1, [x0, 8]
ldrsw x0, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
str w0, [sp, 44]
ldr x0, [sp, 24]
ldr w1, [x0, 1756]
ldr w0, [sp, 44]
lsr w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1756]
ldr x0, [sp, 24]
ldr w1, [x0, 1760]
ldr w0, [sp, 44]
sub w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1760]
ldr x0, [sp, 24]
ldr w0, [x0, 1760]
cmp w0, 0
bge .L280
ldr x0, [sp, 24]
str wzr, [x0, 1760]
mov w0, -1
str w0, [sp, 40]
b .L280
.L279:
ldr x1, [sp, 16]
ldr x0, [sp, 24]
bl codebook_decode_scalar_raw
str w0, [sp, 40]
.L280:
ldr x0, [sp, 16]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L281
ldr x0, [sp, 16]
ldr w0, [x0, 2112]
ldr w1, [sp, 40]
cmp w1, w0
blt .L281
adrp x0, __PRETTY_FUNCTION__.13
add x3, x0, :lo12:__PRETTY_FUNCTION__.13
mov w2, 1726
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl __assert_fail
.L281:
ldr w0, [sp, 40]
cmp w0, 0
bge .L277
ldr x0, [sp, 24]
ldrb w0, [x0, 1740]
cmp w0, 0
bne .L282
ldr x0, [sp, 24]
ldr w0, [x0, 1748]
cmp w0, 0
beq .L282
ldr w0, [sp, 40]
b .L283
.L282:
mov w1, 21
ldr x0, [sp, 24]
bl error
.L277:
ldr w0, [sp, 40]
.L283:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE49:
.size codebook_decode_start, .-codebook_decode_start
.align 2
.type codebook_decode, %function
codebook_decode:
.LFB50:
.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]
str w3, [sp, 20]
ldr x1, [sp, 32]
ldr x0, [sp, 40]
bl codebook_decode_start
str w0, [sp, 68]
ldr w0, [sp, 68]
cmp w0, 0
bge .L285
mov w0, 0
b .L286
.L285:
ldr x0, [sp, 32]
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
ble .L287
ldr x0, [sp, 32]
ldr w0, [x0]
str w0, [sp, 20]
.L287:
ldr x0, [sp, 32]
ldr w0, [x0]
ldr w1, [sp, 68]
mul w0, w1, w0
str w0, [sp, 68]
ldr x0, [sp, 32]
ldrb w0, [x0, 26]
cmp w0, 0
beq .L288
str wzr, [sp, 64]
str wzr, [sp, 60]
b .L289
.L290:
ldr x0, [sp, 32]
ldr x1, [x0, 32]
ldr w2, [sp, 68]
ldr w0, [sp, 60]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
ldr s1, [sp, 64]
fadd s0, s1, s0
str s0, [sp, 76]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr s1, [x0]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr s0, [sp, 76]
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 32]
ldr s0, [x0, 16]
ldr s1, [sp, 76]
fadd s0, s1, s0
str s0, [sp, 64]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L289:
ldr w1, [sp, 60]
ldr w0, [sp, 20]
cmp w1, w0
blt .L290
b .L291
.L288:
str wzr, [sp, 72]
str wzr, [sp, 60]
b .L292
.L293:
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr s1, [x0]
ldr x0, [sp, 32]
ldr x1, [x0, 32]
ldr w2, [sp, 68]
ldr w0, [sp, 60]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s2, [x0]
ldr s0, [sp, 72]
fadd s0, s2, s0
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
fadd s0, s1, s0
str s0, [x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L292:
ldr w1, [sp, 60]
ldr w0, [sp, 20]
cmp w1, w0
blt .L293
.L291:
mov w0, 1
.L286:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE50:
.size codebook_decode, .-codebook_decode
.align 2
.type codebook_decode_step, %function
codebook_decode_step:
.LFB51:
.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 x2, [sp, 24]
str w3, [sp, 20]
str w4, [sp, 16]
ldr x1, [sp, 32]
ldr x0, [sp, 40]
bl codebook_decode_start
str w0, [sp, 56]
str wzr, [sp, 52]
ldr w0, [sp, 56]
cmp w0, 0
bge .L295
mov w0, 0
b .L296
.L295:
ldr x0, [sp, 32]
ldr w0, [x0]
ldr w1, [sp, 20]
cmp w1, w0
ble .L297
ldr x0, [sp, 32]
ldr w0, [x0]
str w0, [sp, 20]
.L297:
ldr x0, [sp, 32]
ldr w0, [x0]
ldr w1, [sp, 56]
mul w0, w1, w0
str w0, [sp, 56]
str wzr, [sp, 48]
b .L298
.L300:
ldr x0, [sp, 32]
ldr x1, [x0, 32]
ldr w2, [sp, 56]
ldr w0, [sp, 48]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
ldr s1, [sp, 52]
fadd s0, s1, s0
str s0, [sp, 60]
ldr w1, [sp, 48]
ldr w0, [sp, 16]
mul w0, w1, w0
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr s1, [x0]
ldr w1, [sp, 48]
ldr w0, [sp, 16]
mul w0, w1, w0
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr s0, [sp, 60]
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 32]
ldrb w0, [x0, 26]
cmp w0, 0
beq .L299
ldr s0, [sp, 60]
str s0, [sp, 52]
.L299:
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L298:
ldr w1, [sp, 48]
ldr w0, [sp, 20]
cmp w1, w0
blt .L300
mov w0, 1
.L296:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE51:
.size codebook_decode_step, .-codebook_decode_step
.section .rodata
.align 3
.LC16:
.string "!c->sparse || z < c->sorted_entries"
.text
.align 2
.type codebook_decode_deinterleave_repeat, %function
codebook_decode_deinterleave_repeat:
.LFB52:
.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, 72]
str x1, [sp, 64]
str x2, [sp, 56]
str w3, [sp, 52]
str x4, [sp, 40]
str x5, [sp, 32]
str w6, [sp, 48]
str w7, [sp, 28]
ldr x0, [sp, 40]
ldr w0, [x0]
str w0, [sp, 92]
ldr x0, [sp, 32]
ldr w0, [x0]
str w0, [sp, 96]
ldr x0, [sp, 64]
ldr w0, [x0]
str w0, [sp, 108]
ldr x0, [sp, 64]
ldrb w0, [x0, 25]
cmp w0, 0
bne .L304
mov w1, 21
ldr x0, [sp, 72]
bl error
b .L303
.L322:
str wzr, [sp, 112]
ldr x0, [sp, 72]
ldr w0, [x0, 1760]
cmp w0, 9
bgt .L305
ldr x0, [sp, 72]
bl prep_huffman
.L305:
ldr x0, [sp, 72]
ldr w0, [x0, 1756]
and w0, w0, 1023
str w0, [sp, 104]
ldr x0, [sp, 64]
ldrsw x1, [sp, 104]
add x1, x1, 24
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 104]
ldr w0, [sp, 104]
cmp w0, 0
blt .L306
ldr x0, [sp, 64]
ldr x1, [x0, 8]
ldrsw x0, [sp, 104]
add x0, x1, x0
ldrb w0, [x0]
str w0, [sp, 116]
ldr x0, [sp, 72]
ldr w1, [x0, 1756]
ldr w0, [sp, 116]
lsr w1, w1, w0
ldr x0, [sp, 72]
str w1, [x0, 1756]
ldr x0, [sp, 72]
ldr w1, [x0, 1760]
ldr w0, [sp, 116]
sub w1, w1, w0
ldr x0, [sp, 72]
str w1, [x0, 1760]
ldr x0, [sp, 72]
ldr w0, [x0, 1760]
cmp w0, 0
bge .L307
ldr x0, [sp, 72]
str wzr, [x0, 1760]
mov w0, -1
str w0, [sp, 104]
b .L307
.L306:
ldr x1, [sp, 64]
ldr x0, [sp, 72]
bl codebook_decode_scalar_raw
str w0, [sp, 104]
.L307:
ldr x0, [sp, 64]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L308
ldr x0, [sp, 64]
ldr w0, [x0, 2112]
ldr w1, [sp, 104]
cmp w1, w0
blt .L308
adrp x0, __PRETTY_FUNCTION__.12
add x3, x0, :lo12:__PRETTY_FUNCTION__.12
mov w2, 1820
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl __assert_fail
.L308:
ldr w0, [sp, 104]
cmp w0, 0
bge .L309
ldr x0, [sp, 72]
ldrb w0, [x0, 1740]
cmp w0, 0
bne .L310
ldr x0, [sp, 72]
ldr w0, [x0, 1748]
cmp w0, 0
beq .L310
mov w0, 0
b .L303
.L310:
mov w1, 21
ldr x0, [sp, 72]
bl error
b .L303
.L309:
ldr w1, [sp, 96]
ldr w0, [sp, 52]
mul w1, w1, w0
ldr w0, [sp, 92]
add w1, w1, w0
ldr w0, [sp, 108]
add w1, w1, w0
ldr w2, [sp, 48]
ldr w0, [sp, 52]
mul w0, w2, w0
cmp w1, w0
ble .L311
ldr w1, [sp, 48]
ldr w0, [sp, 52]
mul w1, w1, w0
ldr w2, [sp, 96]
ldr w0, [sp, 52]
mul w2, w2, w0
ldr w0, [sp, 92]
sub w0, w2, w0
sub w0, w1, w0
str w0, [sp, 108]
.L311:
ldr x0, [sp, 64]
ldr w0, [x0]
ldr w1, [sp, 104]
mul w0, w1, w0
str w0, [sp, 104]
ldr x0, [sp, 64]
ldrb w0, [x0, 26]
cmp w0, 0
beq .L312
str wzr, [sp, 100]
b .L313
.L316:
ldr x0, [sp, 64]
ldr x1, [x0, 32]
ldr w2, [sp, 104]
ldr w0, [sp, 100]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
ldr s1, [sp, 112]
fadd s0, s1, s0
str s0, [sp, 124]
ldrsw x0, [sp, 92]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
beq .L314
ldrsw x0, [sp, 92]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 96]
lsl x0, x0, 2
add x0, x1, x0
ldr s1, [x0]
ldrsw x0, [sp, 92]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 96]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 124]
fadd s0, s1, s0
str s0, [x0]
.L314:
ldr w0, [sp, 92]
add w0, w0, 1
str w0, [sp, 92]
ldr w1, [sp, 92]
ldr w0, [sp, 52]
cmp w1, w0
bne .L315
str wzr, [sp, 92]
ldr w0, [sp, 96]
add w0, w0, 1
str w0, [sp, 96]
.L315:
ldr s0, [sp, 124]
str s0, [sp, 112]
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
.L313:
ldr w1, [sp, 100]
ldr w0, [sp, 108]
cmp w1, w0
blt .L316
b .L317
.L312:
str wzr, [sp, 100]
b .L318
.L321:
ldr x0, [sp, 64]
ldr x1, [x0, 32]
ldr w2, [sp, 104]
ldr w0, [sp, 100]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
ldr s1, [sp, 112]
fadd s0, s1, s0
str s0, [sp, 120]
ldrsw x0, [sp, 92]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
beq .L319
ldrsw x0, [sp, 92]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 96]
lsl x0, x0, 2
add x0, x1, x0
ldr s1, [x0]
ldrsw x0, [sp, 92]
lsl x0, x0, 3
ldr x1, [sp, 56]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 96]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 120]
fadd s0, s1, s0
str s0, [x0]
.L319:
ldr w0, [sp, 92]
add w0, w0, 1
str w0, [sp, 92]
ldr w1, [sp, 92]
ldr w0, [sp, 52]
cmp w1, w0
bne .L320
str wzr, [sp, 92]
ldr w0, [sp, 96]
add w0, w0, 1
str w0, [sp, 96]
.L320:
ldr w0, [sp, 100]
add w0, w0, 1
str w0, [sp, 100]
.L318:
ldr w1, [sp, 100]
ldr w0, [sp, 108]
cmp w1, w0
blt .L321
.L317:
ldr w1, [sp, 28]
ldr w0, [sp, 108]
sub w0, w1, w0
str w0, [sp, 28]
.L304:
ldr w0, [sp, 28]
cmp w0, 0
bgt .L322
ldr x0, [sp, 40]
ldr w1, [sp, 92]
str w1, [x0]
ldr x0, [sp, 32]
ldr w1, [sp, 96]
str w1, [x0]
mov w0, 1
.L303:
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE52:
.size codebook_decode_deinterleave_repeat, .-codebook_decode_deinterleave_repeat
.align 2
.type predict_point, %function
predict_point:
.LFB53:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str w0, [sp, 28]
str w1, [sp, 24]
str w2, [sp, 20]
str w3, [sp, 16]
str w4, [sp, 12]
ldr w1, [sp, 12]
ldr w0, [sp, 16]
sub w0, w1, w0
str w0, [sp, 32]
ldr w1, [sp, 20]
ldr w0, [sp, 24]
sub w0, w1, w0
str w0, [sp, 36]
ldr w0, [sp, 32]
cmp w0, 0
csneg w1, w0, w0, ge
ldr w2, [sp, 28]
ldr w0, [sp, 24]
sub w0, w2, w0
mul w0, w1, w0
str w0, [sp, 40]
ldr w1, [sp, 40]
ldr w0, [sp, 36]
sdiv w0, w1, w0
str w0, [sp, 44]
ldr w0, [sp, 32]
cmp w0, 0
bge .L324
ldr w1, [sp, 16]
ldr w0, [sp, 44]
sub w0, w1, w0
b .L326
.L324:
ldr w1, [sp, 16]
ldr w0, [sp, 44]
add w0, w1, w0
.L326:
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE53:
.size predict_point, .-predict_point
.data
.align 3
.type inverse_db_table, %object
.size inverse_db_table, 1024
inverse_db_table:
.word 870626366
.word 871600393
.word 872526475
.word 873078844
.word 873667107
.word 874293600
.word 874960807
.word 875671371
.word 876428112
.word 877234032
.word 878092323
.word 879006392
.word 879979861
.word 880910216
.word 881462268
.word 882050195
.word 882676329
.word 883343154
.word 884053311
.word 884809619
.word 885615076
.word 886472877
.word 887386422
.word 888359334
.word 889293960
.word 889845696
.word 890433286
.word 891059062
.word 891725504
.word 892435255
.word 893191130
.word 893996126
.word 894853435
.word 895766457
.word 896738812
.word 897677706
.word 898229126
.word 898816380
.word 899441797
.word 900107858
.word 900817203
.word 901572645
.word 902377180
.word 903233998
.word 904146497
.word 905118295
.word 906061455
.word 906612559
.word 907199477
.word 907824536
.word 908490216
.word 909199154
.word 909954164
.word 910758238
.word 911614565
.word 912526542
.word 913497784
.word 914445207
.word 914995996
.word 915582578
.word 916207279
.word 916872577
.word 917581109
.word 918335687
.word 919139300
.word 919995137
.word 920906592
.word 921877278
.word 922828962
.word 923379435
.word 923965681
.word 924590025
.word 925254942
.word 925963069
.word 926717214
.word 927520367
.word 928375714
.word 929286647
.word 930256777
.word 931212719
.word 931762878
.word 932348788
.word 932972774
.word 933637310
.word 934345031
.word 935098745
.word 935901438
.word 936756295
.word 937666706
.word 938636280
.word 939596480
.word 940146323
.word 940731897
.word 941355526
.word 942019682
.word 942726998
.word 943480280
.word 944282514
.word 945136882
.word 946046771
.word 947015790
.word 947980243
.word 948529771
.word 949115010
.word 949738282
.word 950402057
.word 951108968
.word 951861819
.word 952663593
.word 953517472
.word 954426841
.word 955395304
.word 956364009
.word 956913222
.word 957498126
.word 958121041
.word 958784437
.word 959490943
.word 960243362
.word 961044677
.word 961898067
.word 962806915
.word 963774824
.word 964747777
.word 965296676
.word 965881245
.word 966503803
.word 967166819
.word 967872921
.word 968624909
.word 969425766
.word 970278667
.word 971186994
.word 972154349
.word 973131549
.word 973680133
.word 974264368
.word 974886569
.word 975549205
.word 976254903
.word 977006460
.word 977806858
.word 978659271
.word 979567078
.word 980533880
.word 981515323
.word 982063593
.word 982647494
.word 983269339
.word 983931595
.word 984636888
.word 985388015
.word 986187955
.word 987039880
.word 987947167
.word 988913415
.word 989899100
.word 990447056
.word 991030622
.word 991652111
.word 992313988
.word 993018877
.word 993769575
.word 994569057
.word 995420493
.word 996327261
.word 997292956
.word 998282879
.word 998830522
.word 999413753
.word 1000034887
.word 1000696385
.word 1001400871
.word 1002151138
.word 1002950162
.word 1003801111
.word 1004707360
.word 1005672501
.word 1006666662
.word 1007213991
.word 1007796888
.word 1008417666
.word 1009078785
.word 1009782868
.word 1010532705
.word 1011331272
.word 1012181733
.word 1013087464
.word 1014052052
.word 1015050447
.word 1015597462
.word 1016180026
.word 1016800448
.word 1017461189
.word 1018164869
.word 1018914277
.word 1019712386
.word 1020562361
.word 1021467572
.word 1022431609
.word 1023434235
.word 1023980937
.word 1024563167
.word 1025183234
.word 1025843597
.word 1026546873
.word 1027295853
.word 1028093504
.word 1028942993
.word 1029847685
.word 1030811170
.word 1031818026
.word 1032364415
.word 1032946312
.word 1033566024
.word 1034226008
.word 1034928882
.word 1035677432
.word 1036474627
.word 1037323629
.word 1038227804
.word 1039190737
.word 1040201819
.word 1040747895
.word 1041329459
.word 1041948816
.word 1042608423
.word 1043310894
.word 1044059015
.word 1044855754
.word 1045704269
.word 1046607927
.word 1047570308
.word 1048585615
.word 1049131379
.word 1049712610
.word 1050331612
.word 1050990841
.word 1051692909
.word 1052440603
.word 1053236885
.word 1054084915
.word 1054988055
.word 1055949885
.word 1056969414
.word 1057514866
.word 1058095763
.word 1058714411
.word 1059373262
.word 1060074929
.word 1060822194
.word 1061618021
.word 1062465565
.word 1063368187
.word 1064329467
.word 1065353216
.text
.align 2
.type draw_line, %function
draw_line:
.LFB54:
.cfi_startproc
sub sp, sp, #64
.cfi_def_cfa_offset 64
str x0, [sp, 24]
str w1, [sp, 20]
str w2, [sp, 16]
str w3, [sp, 12]
str w4, [sp, 8]
str w5, [sp, 4]
ldr w1, [sp, 8]
ldr w0, [sp, 16]
sub w0, w1, w0
str w0, [sp, 48]
ldr w1, [sp, 12]
ldr w0, [sp, 20]
sub w0, w1, w0
str w0, [sp, 52]
ldr w0, [sp, 48]
cmp w0, 0
csneg w0, w0, w0, ge
str w0, [sp, 56]
ldr w0, [sp, 20]
str w0, [sp, 32]
ldr w0, [sp, 16]
str w0, [sp, 36]
str wzr, [sp, 40]
ldr w1, [sp, 48]
ldr w0, [sp, 52]
sdiv w0, w1, w0
str w0, [sp, 60]
ldr w0, [sp, 48]
cmp w0, 0
bge .L328
ldr w0, [sp, 60]
sub w0, w0, #1
str w0, [sp, 44]
b .L329
.L328:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 44]
.L329:
ldr w0, [sp, 60]
cmp w0, 0
csneg w1, w0, w0, ge
ldr w0, [sp, 52]
mul w0, w1, w0
ldr w1, [sp, 56]
sub w0, w1, w0
str w0, [sp, 56]
ldr w1, [sp, 12]
ldr w0, [sp, 4]
cmp w1, w0
ble .L330
ldr w0, [sp, 4]
str w0, [sp, 12]
.L330:
ldr w1, [sp, 32]
ldr w0, [sp, 12]
cmp w1, w0
bge .L336
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr s1, [x0]
adrp x0, inverse_db_table
add x0, x0, :lo12:inverse_db_table
ldrsw x1, [sp, 36]
ldr s0, [x0, x1, lsl 2]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
fmul s0, s1, s0
str s0, [x0]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
b .L332
.L335:
ldr w1, [sp, 40]
ldr w0, [sp, 56]
add w0, w1, w0
str w0, [sp, 40]
ldr w1, [sp, 40]
ldr w0, [sp, 52]
cmp w1, w0
blt .L333
ldr w1, [sp, 40]
ldr w0, [sp, 52]
sub w0, w1, w0
str w0, [sp, 40]
ldr w1, [sp, 36]
ldr w0, [sp, 44]
add w0, w1, w0
str w0, [sp, 36]
b .L334
.L333:
ldr w1, [sp, 36]
ldr w0, [sp, 60]
add w0, w1, w0
str w0, [sp, 36]
.L334:
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr s1, [x0]
adrp x0, inverse_db_table
add x0, x0, :lo12:inverse_db_table
ldrsw x1, [sp, 36]
ldr s0, [x0, x1, lsl 2]
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
fmul s0, s1, s0
str s0, [x0]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L332:
ldr w1, [sp, 32]
ldr w0, [sp, 12]
cmp w1, w0
blt .L335
.L336:
nop
add sp, sp, 64
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE54:
.size draw_line, .-draw_line
.align 2
.type residue_decode, %function
residue_decode:
.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 x1, [sp, 48]
str x2, [sp, 40]
str w3, [sp, 36]
str w4, [sp, 32]
str w5, [sp, 28]
ldr w0, [sp, 28]
cmp w0, 0
bne .L338
ldr x0, [sp, 48]
ldr w0, [x0]
ldr w1, [sp, 32]
sdiv w0, w1, w0
str w0, [sp, 76]
str wzr, [sp, 72]
b .L339
.L342:
ldrsw x1, [sp, 36]
ldrsw x0, [sp, 72]
add x0, x1, x0
lsl x0, x0, 2
ldr x1, [sp, 40]
add x2, x1, x0
ldr w1, [sp, 32]
ldr w0, [sp, 36]
sub w1, w1, w0
ldr w0, [sp, 72]
sub w0, w1, w0
ldr w4, [sp, 76]
mov w3, w0
ldr x1, [sp, 48]
ldr x0, [sp, 56]
bl codebook_decode_step
cmp w0, 0
bne .L340
mov w0, 0
b .L341
.L340:
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L339:
ldr w1, [sp, 72]
ldr w0, [sp, 76]
cmp w1, w0
blt .L342
b .L343
.L338:
str wzr, [sp, 72]
b .L344
.L346:
ldrsw x0, [sp, 36]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x2, x1, x0
ldr w1, [sp, 32]
ldr w0, [sp, 72]
sub w0, w1, w0
mov w3, w0
ldr x1, [sp, 48]
ldr x0, [sp, 56]
bl codebook_decode
cmp w0, 0
bne .L345
mov w0, 0
b .L341
.L345:
ldr x0, [sp, 48]
ldr w0, [x0]
ldr w1, [sp, 72]
add w0, w1, w0
str w0, [sp, 72]
ldr x0, [sp, 48]
ldr w0, [x0]
ldr w1, [sp, 36]
add w0, w1, w0
str w0, [sp, 36]
.L344:
ldr w1, [sp, 72]
ldr w0, [sp, 32]
cmp w1, w0
blt .L346
.L343:
mov w0, 1
.L341:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE55:
.size residue_decode, .-residue_decode
.align 2
.type decode_residue, %function
decode_residue:
.LFB56:
.cfi_startproc
stp x29, x30, [sp, -320]!
.cfi_def_cfa_offset 320
.cfi_offset 29, -320
.cfi_offset 30, -312
mov x29, sp
.cfi_def_cfa_register 29
sub sp, sp, #16
str x0, [x29, 56]
str x1, [x29, 48]
str w2, [x29, 44]
str w3, [x29, 40]
str w4, [x29, 36]
str x5, [x29, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 312]
mov x1, 0
ldr x0, [x29, 56]
ldr x1, [x0, 448]
ldrsw x0, [x29, 36]
lsl x0, x0, 5
add x0, x1, x0
str x0, [x29, 224]
ldr x1, [x29, 56]
ldrsw x0, [x29, 36]
add x0, x0, 152
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 12]
str w0, [x29, 120]
ldr x0, [x29, 224]
ldrb w0, [x0, 13]
str w0, [x29, 124]
ldr x0, [x29, 56]
ldr x2, [x0, 160]
ldrsw x1, [x29, 124]
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr w0, [x0]
str w0, [x29, 128]
ldr x0, [x29, 224]
ldr w1, [x0, 4]
ldr x0, [x29, 224]
ldr w0, [x0]
sub w0, w1, w0
str w0, [x29, 132]
ldr w1, [x29, 132]
ldr x0, [x29, 224]
ldr w0, [x0, 8]
udiv w0, w1, w0
str w0, [x29, 136]
ldr x0, [x29, 56]
ldr w0, [x0, 124]
str w0, [x29, 140]
ldr x0, [x29, 56]
ldr x0, [x0, 104]
cmp x0, 0
beq .L348
ldrsw x0, [x29, 136]
add x0, x0, 1
mov w1, w0
ldr x0, [x29, 56]
ldr w0, [x0, 4]
sxtw x0, w0
mul w0, w1, w0
lsl w0, w0, 3
mov w1, w0
ldr x0, [x29, 56]
bl setup_temp_malloc
mov x3, x0
b .L349
.L348:
ldrsw x0, [x29, 136]
add x1, x0, 1
ldr x0, [x29, 56]
ldr w0, [x0, 4]
sxtw x0, w0
mul x0, x1, x0
lsl x0, x0, 3
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L350:
cmp sp, x1
beq .L351
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L350
.L351:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L352
str xzr, [sp, 1024]
.L352:
add x0, sp, 16
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
mov x3, x0
.L349:
ldr x0, [x29, 56]
ldr w0, [x0, 4]
ldrsw x1, [x29, 136]
lsl w1, w1, 3
mov w2, w1
mov w1, w0
mov x0, x3
bl make_block_array
str x0, [x29, 232]
str wzr, [x29, 76]
b .L353
.L355:
ldrsw x0, [x29, 76]
ldr x1, [x29, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L354
ldrsw x0, [x29, 76]
lsl x0, x0, 3
ldr x1, [x29, 48]
add x0, x1, x0
ldr x3, [x0]
ldrsw x0, [x29, 40]
lsl x0, x0, 2
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
.L354:
ldr w0, [x29, 76]
add w0, w0, 1
str w0, [x29, 76]
.L353:
ldr w1, [x29, 76]
ldr w0, [x29, 44]
cmp w1, w0
blt .L355
ldr w0, [x29, 120]
cmp w0, 2
bne .L356
ldr w0, [x29, 44]
cmp w0, 1
beq .L356
str wzr, [x29, 80]
b .L357
.L360:
ldrsw x0, [x29, 80]
ldr x1, [x29, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
beq .L430
ldr w0, [x29, 80]
add w0, w0, 1
str w0, [x29, 80]
.L357:
ldr w1, [x29, 80]
ldr w0, [x29, 44]
cmp w1, w0
blt .L360
b .L359
.L430:
nop
.L359:
ldr w1, [x29, 80]
ldr w0, [x29, 44]
cmp w1, w0
beq .L431
str wzr, [x29, 84]
b .L363
.L409:
str wzr, [x29, 88]
str wzr, [x29, 92]
ldr w0, [x29, 44]
cmp w0, 2
bne .L364
b .L365
.L378:
ldr x0, [x29, 224]
ldr w1, [x0]
ldr x0, [x29, 224]
ldr w2, [x0, 8]
ldr w0, [x29, 88]
mul w0, w2, w0
add w0, w1, w0
str w0, [x29, 184]
ldr w0, [x29, 184]
and w0, w0, 1
str w0, [x29, 68]
ldr w0, [x29, 184]
asr w0, w0, 1
str w0, [x29, 72]
ldr w0, [x29, 84]
cmp w0, 0
bne .L366
ldr x0, [x29, 56]
ldr x2, [x0, 160]
ldr x0, [x29, 224]
ldrb w0, [x0, 13]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [x29, 272]
ldr x0, [x29, 56]
ldr w0, [x0, 1760]
cmp w0, 9
bgt .L367
ldr x0, [x29, 56]
bl prep_huffman
.L367:
ldr x0, [x29, 56]
ldr w0, [x0, 1756]
and w0, w0, 1023
str w0, [x29, 96]
ldr x0, [x29, 272]
ldrsw x1, [x29, 96]
add x1, x1, 24
ldrsh w0, [x0, x1, lsl 1]
str w0, [x29, 96]
ldr w0, [x29, 96]
cmp w0, 0
blt .L368
ldr x0, [x29, 272]
ldr x1, [x0, 8]
ldrsw x0, [x29, 96]
add x0, x1, x0
ldrb w0, [x0]
str w0, [x29, 188]
ldr x0, [x29, 56]
ldr w1, [x0, 1756]
ldr w0, [x29, 188]
lsr w1, w1, w0
ldr x0, [x29, 56]
str w1, [x0, 1756]
ldr x0, [x29, 56]
ldr w1, [x0, 1760]
ldr w0, [x29, 188]
sub w1, w1, w0
ldr x0, [x29, 56]
str w1, [x0, 1760]
ldr x0, [x29, 56]
ldr w0, [x0, 1760]
cmp w0, 0
bge .L369
ldr x0, [x29, 56]
str wzr, [x0, 1760]
mov w0, -1
str w0, [x29, 96]
b .L369
.L368:
ldr x1, [x29, 272]
ldr x0, [x29, 56]
bl codebook_decode_scalar_raw
str w0, [x29, 96]
.L369:
ldr x0, [x29, 272]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L370
ldr x0, [x29, 272]
ldr x1, [x0, 2104]
ldrsw x0, [x29, 96]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
str w0, [x29, 96]
.L370:
ldr w0, [x29, 96]
cmn w0, #1
beq .L432
ldr x0, [x29, 224]
ldr x1, [x0, 16]
ldrsw x0, [x29, 96]
lsl x0, x0, 3
add x1, x1, x0
ldr x0, [x29, 232]
ldr x2, [x0]
ldrsw x0, [x29, 92]
lsl x0, x0, 3
add x0, x2, x0
ldr x1, [x1]
str x1, [x0]
.L366:
str wzr, [x29, 76]
b .L373
.L377:
ldr x0, [x29, 224]
ldr w1, [x0]
ldr x0, [x29, 224]
ldr w2, [x0, 8]
ldr w0, [x29, 88]
mul w0, w2, w0
add w0, w1, w0
str w0, [x29, 192]
ldr x0, [x29, 232]
ldr x1, [x0]
ldrsw x0, [x29, 92]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [x29, 76]
add x0, x1, x0
ldrb w0, [x0]
str w0, [x29, 196]
ldr x0, [x29, 224]
ldr x1, [x0, 24]
ldrsw x0, [x29, 196]
lsl x0, x0, 4
add x0, x1, x0
ldrsw x1, [x29, 84]
ldrsh w0, [x0, x1, lsl 1]
str w0, [x29, 200]
ldr w0, [x29, 200]
cmp w0, 0
blt .L374
ldr x0, [x29, 56]
ldr x2, [x0, 160]
ldrsw x1, [x29, 200]
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [x29, 280]
ldr x0, [x29, 224]
ldr w0, [x0, 8]
mov w2, w0
add x1, x29, 72
add x0, x29, 68
mov w7, w2
ldr w6, [x29, 40]
mov x5, x1
mov x4, x0
ldr w3, [x29, 44]
ldr x2, [x29, 48]
ldr x1, [x29, 280]
ldr x0, [x29, 56]
bl codebook_decode_deinterleave_repeat
cmp w0, 0
bne .L375
b .L362
.L374:
ldr x0, [x29, 224]
ldr w1, [x0, 8]
ldr w0, [x29, 192]
add w0, w1, w0
str w0, [x29, 192]
ldr w0, [x29, 192]
and w0, w0, 1
str w0, [x29, 68]
ldr w0, [x29, 192]
asr w0, w0, 1
str w0, [x29, 72]
.L375:
ldr w0, [x29, 76]
add w0, w0, 1
str w0, [x29, 76]
ldr w0, [x29, 88]
add w0, w0, 1
str w0, [x29, 88]
.L373:
ldr w1, [x29, 76]
ldr w0, [x29, 128]
cmp w1, w0
bge .L376
ldr w1, [x29, 88]
ldr w0, [x29, 136]
cmp w1, w0
blt .L377
.L376:
ldr w0, [x29, 92]
add w0, w0, 1
str w0, [x29, 92]
.L365:
ldr w1, [x29, 88]
ldr w0, [x29, 136]
cmp w1, w0
blt .L378
b .L379
.L364:
ldr w0, [x29, 44]
cmp w0, 1
bne .L395
b .L381
.L394:
ldr x0, [x29, 224]
ldr w1, [x0]
ldr x0, [x29, 224]
ldr w2, [x0, 8]
ldr w0, [x29, 88]
mul w0, w2, w0
add w0, w1, w0
str w0, [x29, 164]
str wzr, [x29, 68]
ldr w0, [x29, 164]
str w0, [x29, 72]
ldr w0, [x29, 84]
cmp w0, 0
bne .L382
ldr x0, [x29, 56]
ldr x2, [x0, 160]
ldr x0, [x29, 224]
ldrb w0, [x0, 13]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [x29, 256]
ldr x0, [x29, 56]
ldr w0, [x0, 1760]
cmp w0, 9
bgt .L383
ldr x0, [x29, 56]
bl prep_huffman
.L383:
ldr x0, [x29, 56]
ldr w0, [x0, 1756]
and w0, w0, 1023
str w0, [x29, 100]
ldr x0, [x29, 256]
ldrsw x1, [x29, 100]
add x1, x1, 24
ldrsh w0, [x0, x1, lsl 1]
str w0, [x29, 100]
ldr w0, [x29, 100]
cmp w0, 0
blt .L384
ldr x0, [x29, 256]
ldr x1, [x0, 8]
ldrsw x0, [x29, 100]
add x0, x1, x0
ldrb w0, [x0]
str w0, [x29, 168]
ldr x0, [x29, 56]
ldr w1, [x0, 1756]
ldr w0, [x29, 168]
lsr w1, w1, w0
ldr x0, [x29, 56]
str w1, [x0, 1756]
ldr x0, [x29, 56]
ldr w1, [x0, 1760]
ldr w0, [x29, 168]
sub w1, w1, w0
ldr x0, [x29, 56]
str w1, [x0, 1760]
ldr x0, [x29, 56]
ldr w0, [x0, 1760]
cmp w0, 0
bge .L385
ldr x0, [x29, 56]
str wzr, [x0, 1760]
mov w0, -1
str w0, [x29, 100]
b .L385
.L384:
ldr x1, [x29, 256]
ldr x0, [x29, 56]
bl codebook_decode_scalar_raw
str w0, [x29, 100]
.L385:
ldr x0, [x29, 256]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L386
ldr x0, [x29, 256]
ldr x1, [x0, 2104]
ldrsw x0, [x29, 100]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
str w0, [x29, 100]
.L386:
ldr w0, [x29, 100]
cmn w0, #1
beq .L433
ldr x0, [x29, 224]
ldr x1, [x0, 16]
ldrsw x0, [x29, 100]
lsl x0, x0, 3
add x1, x1, x0
ldr x0, [x29, 232]
ldr x2, [x0]
ldrsw x0, [x29, 92]
lsl x0, x0, 3
add x0, x2, x0
ldr x1, [x1]
str x1, [x0]
.L382:
str wzr, [x29, 76]
b .L389
.L393:
ldr x0, [x29, 224]
ldr w1, [x0]
ldr x0, [x29, 224]
ldr w2, [x0, 8]
ldr w0, [x29, 88]
mul w0, w2, w0
add w0, w1, w0
str w0, [x29, 172]
ldr x0, [x29, 232]
ldr x1, [x0]
ldrsw x0, [x29, 92]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [x29, 76]
add x0, x1, x0
ldrb w0, [x0]
str w0, [x29, 176]
ldr x0, [x29, 224]
ldr x1, [x0, 24]
ldrsw x0, [x29, 176]
lsl x0, x0, 4
add x0, x1, x0
ldrsw x1, [x29, 84]
ldrsh w0, [x0, x1, lsl 1]
str w0, [x29, 180]
ldr w0, [x29, 180]
cmp w0, 0
blt .L390
ldr x0, [x29, 56]
ldr x2, [x0, 160]
ldrsw x1, [x29, 180]
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [x29, 264]
ldr x0, [x29, 224]
ldr w0, [x0, 8]
mov w2, w0
add x1, x29, 72
add x0, x29, 68
mov w7, w2
ldr w6, [x29, 40]
mov x5, x1
mov x4, x0
ldr w3, [x29, 44]
ldr x2, [x29, 48]
ldr x1, [x29, 264]
ldr x0, [x29, 56]
bl codebook_decode_deinterleave_repeat
cmp w0, 0
bne .L391
b .L362
.L390:
ldr x0, [x29, 224]
ldr w1, [x0, 8]
ldr w0, [x29, 172]
add w0, w1, w0
str w0, [x29, 172]
str wzr, [x29, 68]
ldr w0, [x29, 172]
str w0, [x29, 72]
.L391:
ldr w0, [x29, 76]
add w0, w0, 1
str w0, [x29, 76]
ldr w0, [x29, 88]
add w0, w0, 1
str w0, [x29, 88]
.L389:
ldr w1, [x29, 76]
ldr w0, [x29, 128]
cmp w1, w0
bge .L392
ldr w1, [x29, 88]
ldr w0, [x29, 136]
cmp w1, w0
blt .L393
.L392:
ldr w0, [x29, 92]
add w0, w0, 1
str w0, [x29, 92]
.L381:
ldr w1, [x29, 88]
ldr w0, [x29, 136]
cmp w1, w0
blt .L394
b .L379
.L408:
ldr x0, [x29, 224]
ldr w1, [x0]
ldr x0, [x29, 224]
ldr w2, [x0, 8]
ldr w0, [x29, 88]
mul w0, w2, w0
add w0, w1, w0
str w0, [x29, 144]
ldr w0, [x29, 144]
ldr w1, [x29, 44]
sdiv w2, w0, w1
ldr w1, [x29, 44]
mul w1, w2, w1
sub w0, w0, w1
str w0, [x29, 68]
ldr w1, [x29, 144]
ldr w0, [x29, 44]
sdiv w0, w1, w0
str w0, [x29, 72]
ldr w0, [x29, 84]
cmp w0, 0
bne .L396
ldr x0, [x29, 56]
ldr x2, [x0, 160]
ldr x0, [x29, 224]
ldrb w0, [x0, 13]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [x29, 240]
ldr x0, [x29, 56]
ldr w0, [x0, 1760]
cmp w0, 9
bgt .L397
ldr x0, [x29, 56]
bl prep_huffman
.L397:
ldr x0, [x29, 56]
ldr w0, [x0, 1756]
and w0, w0, 1023
str w0, [x29, 104]
ldr x0, [x29, 240]
ldrsw x1, [x29, 104]
add x1, x1, 24
ldrsh w0, [x0, x1, lsl 1]
str w0, [x29, 104]
ldr w0, [x29, 104]
cmp w0, 0
blt .L398
ldr x0, [x29, 240]
ldr x1, [x0, 8]
ldrsw x0, [x29, 104]
add x0, x1, x0
ldrb w0, [x0]
str w0, [x29, 148]
ldr x0, [x29, 56]
ldr w1, [x0, 1756]
ldr w0, [x29, 148]
lsr w1, w1, w0
ldr x0, [x29, 56]
str w1, [x0, 1756]
ldr x0, [x29, 56]
ldr w1, [x0, 1760]
ldr w0, [x29, 148]
sub w1, w1, w0
ldr x0, [x29, 56]
str w1, [x0, 1760]
ldr x0, [x29, 56]
ldr w0, [x0, 1760]
cmp w0, 0
bge .L399
ldr x0, [x29, 56]
str wzr, [x0, 1760]
mov w0, -1
str w0, [x29, 104]
b .L399
.L398:
ldr x1, [x29, 240]
ldr x0, [x29, 56]
bl codebook_decode_scalar_raw
str w0, [x29, 104]
.L399:
ldr x0, [x29, 240]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L400
ldr x0, [x29, 240]
ldr x1, [x0, 2104]
ldrsw x0, [x29, 104]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
str w0, [x29, 104]
.L400:
ldr w0, [x29, 104]
cmn w0, #1
beq .L434
ldr x0, [x29, 224]
ldr x1, [x0, 16]
ldrsw x0, [x29, 104]
lsl x0, x0, 3
add x1, x1, x0
ldr x0, [x29, 232]
ldr x2, [x0]
ldrsw x0, [x29, 92]
lsl x0, x0, 3
add x0, x2, x0
ldr x1, [x1]
str x1, [x0]
.L396:
str wzr, [x29, 76]
b .L403
.L407:
ldr x0, [x29, 224]
ldr w1, [x0]
ldr x0, [x29, 224]
ldr w2, [x0, 8]
ldr w0, [x29, 88]
mul w0, w2, w0
add w0, w1, w0
str w0, [x29, 152]
ldr x0, [x29, 232]
ldr x1, [x0]
ldrsw x0, [x29, 92]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [x29, 76]
add x0, x1, x0
ldrb w0, [x0]
str w0, [x29, 156]
ldr x0, [x29, 224]
ldr x1, [x0, 24]
ldrsw x0, [x29, 156]
lsl x0, x0, 4
add x0, x1, x0
ldrsw x1, [x29, 84]
ldrsh w0, [x0, x1, lsl 1]
str w0, [x29, 160]
ldr w0, [x29, 160]
cmp w0, 0
blt .L404
ldr x0, [x29, 56]
ldr x2, [x0, 160]
ldrsw x1, [x29, 160]
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [x29, 248]
ldr x0, [x29, 224]
ldr w0, [x0, 8]
mov w2, w0
add x1, x29, 72
add x0, x29, 68
mov w7, w2
ldr w6, [x29, 40]
mov x5, x1
mov x4, x0
ldr w3, [x29, 44]
ldr x2, [x29, 48]
ldr x1, [x29, 248]
ldr x0, [x29, 56]
bl codebook_decode_deinterleave_repeat
cmp w0, 0
bne .L405
b .L362
.L404:
ldr x0, [x29, 224]
ldr w1, [x0, 8]
ldr w0, [x29, 152]
add w0, w1, w0
str w0, [x29, 152]
ldr w0, [x29, 152]
ldr w1, [x29, 44]
sdiv w2, w0, w1
ldr w1, [x29, 44]
mul w1, w2, w1
sub w0, w0, w1
str w0, [x29, 68]
ldr w1, [x29, 152]
ldr w0, [x29, 44]
sdiv w0, w1, w0
str w0, [x29, 72]
.L405:
ldr w0, [x29, 76]
add w0, w0, 1
str w0, [x29, 76]
ldr w0, [x29, 88]
add w0, w0, 1
str w0, [x29, 88]
.L403:
ldr w1, [x29, 76]
ldr w0, [x29, 128]
cmp w1, w0
bge .L406
ldr w1, [x29, 88]
ldr w0, [x29, 136]
cmp w1, w0
blt .L407
.L406:
ldr w0, [x29, 92]
add w0, w0, 1
str w0, [x29, 92]
.L395:
ldr w1, [x29, 88]
ldr w0, [x29, 136]
cmp w1, w0
blt .L408
.L379:
ldr w0, [x29, 84]
add w0, w0, 1
str w0, [x29, 84]
.L363:
ldr w0, [x29, 84]
cmp w0, 7
ble .L409
b .L362
.L356:
str wzr, [x29, 84]
b .L410
.L428:
str wzr, [x29, 108]
str wzr, [x29, 112]
b .L411
.L427:
ldr w0, [x29, 84]
cmp w0, 0
bne .L412
str wzr, [x29, 80]
b .L413
.L420:
ldrsw x0, [x29, 80]
ldr x1, [x29, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L414
ldr x0, [x29, 56]
ldr x2, [x0, 160]
ldr x0, [x29, 224]
ldrb w0, [x0, 13]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [x29, 288]
ldr x0, [x29, 56]
ldr w0, [x0, 1760]
cmp w0, 9
bgt .L415
ldr x0, [x29, 56]
bl prep_huffman
.L415:
ldr x0, [x29, 56]
ldr w0, [x0, 1756]
and w0, w0, 1023
str w0, [x29, 116]
ldr x0, [x29, 288]
ldrsw x1, [x29, 116]
add x1, x1, 24
ldrsh w0, [x0, x1, lsl 1]
str w0, [x29, 116]
ldr w0, [x29, 116]
cmp w0, 0
blt .L416
ldr x0, [x29, 288]
ldr x1, [x0, 8]
ldrsw x0, [x29, 116]
add x0, x1, x0
ldrb w0, [x0]
str w0, [x29, 204]
ldr x0, [x29, 56]
ldr w1, [x0, 1756]
ldr w0, [x29, 204]
lsr w1, w1, w0
ldr x0, [x29, 56]
str w1, [x0, 1756]
ldr x0, [x29, 56]
ldr w1, [x0, 1760]
ldr w0, [x29, 204]
sub w1, w1, w0
ldr x0, [x29, 56]
str w1, [x0, 1760]
ldr x0, [x29, 56]
ldr w0, [x0, 1760]
cmp w0, 0
bge .L417
ldr x0, [x29, 56]
str wzr, [x0, 1760]
mov w0, -1
str w0, [x29, 116]
b .L417
.L416:
ldr x1, [x29, 288]
ldr x0, [x29, 56]
bl codebook_decode_scalar_raw
str w0, [x29, 116]
.L417:
ldr x0, [x29, 288]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L418
ldr x0, [x29, 288]
ldr x1, [x0, 2104]
ldrsw x0, [x29, 116]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
str w0, [x29, 116]
.L418:
ldr w0, [x29, 116]
cmn w0, #1
beq .L435
ldr x0, [x29, 224]
ldr x1, [x0, 16]
ldrsw x0, [x29, 116]
lsl x0, x0, 3
add x1, x1, x0
ldrsw x0, [x29, 80]
lsl x0, x0, 3
ldr x2, [x29, 232]
add x0, x2, x0
ldr x2, [x0]
ldrsw x0, [x29, 112]
lsl x0, x0, 3
add x0, x2, x0
ldr x1, [x1]
str x1, [x0]
.L414:
ldr w0, [x29, 80]
add w0, w0, 1
str w0, [x29, 80]
.L413:
ldr w1, [x29, 80]
ldr w0, [x29, 44]
cmp w1, w0
blt .L420
.L412:
str wzr, [x29, 76]
b .L421
.L426:
str wzr, [x29, 80]
b .L422
.L424:
ldrsw x0, [x29, 80]
ldr x1, [x29, 24]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 0
bne .L423
ldrsw x0, [x29, 80]
lsl x0, x0, 3
ldr x1, [x29, 232]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [x29, 112]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [x29, 76]
add x0, x1, x0
ldrb w0, [x0]
str w0, [x29, 208]
ldr x0, [x29, 224]
ldr x1, [x0, 24]
ldrsw x0, [x29, 208]
lsl x0, x0, 4
add x0, x1, x0
ldrsw x1, [x29, 84]
ldrsh w0, [x0, x1, lsl 1]
str w0, [x29, 212]
ldr w0, [x29, 212]
cmp w0, 0
blt .L423
ldrsw x0, [x29, 80]
lsl x0, x0, 3
ldr x1, [x29, 48]
add x0, x1, x0
ldr x0, [x0]
str x0, [x29, 296]
ldr x0, [x29, 224]
ldr w1, [x0]
ldr x0, [x29, 224]
ldr w2, [x0, 8]
ldr w0, [x29, 108]
mul w0, w2, w0
add w0, w1, w0
str w0, [x29, 216]
ldr x0, [x29, 224]
ldr w0, [x0, 8]
str w0, [x29, 220]
ldr x0, [x29, 56]
ldr x2, [x0, 160]
ldrsw x1, [x29, 212]
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [x29, 304]
ldr w5, [x29, 120]
ldr w4, [x29, 220]
ldr w3, [x29, 216]
ldr x2, [x29, 296]
ldr x1, [x29, 304]
ldr x0, [x29, 56]
bl residue_decode
cmp w0, 0
beq .L436
.L423:
ldr w0, [x29, 80]
add w0, w0, 1
str w0, [x29, 80]
.L422:
ldr w1, [x29, 80]
ldr w0, [x29, 44]
cmp w1, w0
blt .L424
ldr w0, [x29, 76]
add w0, w0, 1
str w0, [x29, 76]
ldr w0, [x29, 108]
add w0, w0, 1
str w0, [x29, 108]
.L421:
ldr w1, [x29, 76]
ldr w0, [x29, 128]
cmp w1, w0
bge .L425
ldr w1, [x29, 108]
ldr w0, [x29, 136]
cmp w1, w0
blt .L426
.L425:
ldr w0, [x29, 112]
add w0, w0, 1
str w0, [x29, 112]
.L411:
ldr w1, [x29, 108]
ldr w0, [x29, 136]
cmp w1, w0
blt .L427
ldr w0, [x29, 84]
add w0, w0, 1
str w0, [x29, 84]
.L410:
ldr w0, [x29, 84]
cmp w0, 7
ble .L428
b .L362
.L431:
nop
b .L362
.L432:
nop
b .L362
.L433:
nop
b .L362
.L434:
nop
b .L362
.L435:
nop
b .L362
.L436:
nop
.L362:
ldr x0, [x29, 56]
ldr w1, [x29, 140]
str w1, [x0, 124]
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [x29, 312]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L429
bl __stack_chk_fail
.L429:
mov sp, x29
ldp x29, x30, [sp], 320
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa 31, 0
ret
.cfi_endproc
.LFE56:
.size decode_residue, .-decode_residue
.section .rodata
.align 3
.LC17:
.string "(n & 3) == 0"
.text
.align 2
.type imdct_step3_iter0_loop, %function
imdct_step3_iter0_loop:
.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 w0, [sp, 44]
str x1, [sp, 32]
str w2, [sp, 40]
str w3, [sp, 28]
str x4, [sp, 16]
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
str x0, [sp, 64]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 64]
add x0, x1, x0
str x0, [sp, 72]
ldr w0, [sp, 44]
and w0, w0, 3
cmp w0, 0
beq .L438
adrp x0, __PRETTY_FUNCTION__.11
add x3, x0, :lo12:__PRETTY_FUNCTION__.11
mov w2, 2391
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl __assert_fail
.L438:
ldr w0, [sp, 44]
asr w0, w0, 2
str w0, [sp, 52]
b .L439
.L440:
ldr x0, [sp, 64]
ldr s1, [x0]
ldr x0, [sp, 72]
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 56]
ldr x0, [sp, 64]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #4
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 60]
ldr x0, [sp, 64]
ldr s1, [x0]
ldr x0, [sp, 72]
ldr s0, [x0]
fadd s0, s1, s0
ldr x0, [sp, 64]
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #4
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #4
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
ldr s1, [x0]
ldr s0, [sp, 56]
fmul s1, s1, s0
ldr x0, [sp, 16]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 60]
fmul s0, s2, s0
fsub s0, s1, s0
ldr x0, [sp, 72]
str s0, [x0]
ldr x0, [sp, 16]
ldr s1, [x0]
ldr s0, [sp, 60]
fmul s1, s1, s0
ldr x0, [sp, 16]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 56]
fmul s0, s2, s0
ldr x0, [sp, 72]
sub x0, x0, #4
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
add x0, x0, 32
str x0, [sp, 16]
ldr x0, [sp, 64]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #8
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 56]
ldr x0, [sp, 64]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #12
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 60]
ldr x0, [sp, 64]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #8
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #8
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #12
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #12
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
ldr s1, [x0]
ldr s0, [sp, 56]
fmul s1, s1, s0
ldr x0, [sp, 16]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 60]
fmul s0, s2, s0
ldr x0, [sp, 72]
sub x0, x0, #8
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
ldr s1, [x0]
ldr s0, [sp, 60]
fmul s1, s1, s0
ldr x0, [sp, 16]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 56]
fmul s0, s2, s0
ldr x0, [sp, 72]
sub x0, x0, #12
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
add x0, x0, 32
str x0, [sp, 16]
ldr x0, [sp, 64]
sub x0, x0, #16
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #16
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 56]
ldr x0, [sp, 64]
sub x0, x0, #20
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #20
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 60]
ldr x0, [sp, 64]
sub x0, x0, #16
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #16
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #16
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #20
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #20
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #20
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
ldr s1, [x0]
ldr s0, [sp, 56]
fmul s1, s1, s0
ldr x0, [sp, 16]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 60]
fmul s0, s2, s0
ldr x0, [sp, 72]
sub x0, x0, #16
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
ldr s1, [x0]
ldr s0, [sp, 60]
fmul s1, s1, s0
ldr x0, [sp, 16]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 56]
fmul s0, s2, s0
ldr x0, [sp, 72]
sub x0, x0, #20
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
add x0, x0, 32
str x0, [sp, 16]
ldr x0, [sp, 64]
sub x0, x0, #24
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #24
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 56]
ldr x0, [sp, 64]
sub x0, x0, #28
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #28
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 60]
ldr x0, [sp, 64]
sub x0, x0, #24
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #24
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #24
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #28
ldr s1, [x0]
ldr x0, [sp, 72]
sub x0, x0, #28
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #28
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
ldr s1, [x0]
ldr s0, [sp, 56]
fmul s1, s1, s0
ldr x0, [sp, 16]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 60]
fmul s0, s2, s0
ldr x0, [sp, 72]
sub x0, x0, #24
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
ldr s1, [x0]
ldr s0, [sp, 60]
fmul s1, s1, s0
ldr x0, [sp, 16]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 56]
fmul s0, s2, s0
ldr x0, [sp, 72]
sub x0, x0, #28
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 16]
add x0, x0, 32
str x0, [sp, 16]
ldr x0, [sp, 64]
sub x0, x0, #32
str x0, [sp, 64]
ldr x0, [sp, 72]
sub x0, x0, #32
str x0, [sp, 72]
ldr w0, [sp, 52]
sub w0, w0, #1
str w0, [sp, 52]
.L439:
ldr w0, [sp, 52]
cmp w0, 0
bgt .L440
nop
nop
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE57:
.size imdct_step3_iter0_loop, .-imdct_step3_iter0_loop
.align 2
.type imdct_step3_inner_r_loop, %function
imdct_step3_inner_r_loop:
.LFB58:
.cfi_startproc
sub sp, sp, #64
.cfi_def_cfa_offset 64
str w0, [sp, 28]
str x1, [sp, 16]
str w2, [sp, 24]
str w3, [sp, 12]
str x4, [sp]
str w5, [sp, 8]
ldrsw x0, [sp, 24]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
str x0, [sp, 48]
ldrsw x0, [sp, 12]
lsl x0, x0, 2
ldr x1, [sp, 48]
add x0, x1, x0
str x0, [sp, 56]
ldr w0, [sp, 28]
asr w0, w0, 2
str w0, [sp, 36]
b .L442
.L443:
ldr x0, [sp, 48]
ldr s1, [x0]
ldr x0, [sp, 56]
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 40]
ldr x0, [sp, 48]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #4
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 44]
ldr x0, [sp, 48]
ldr s1, [x0]
ldr x0, [sp, 56]
ldr s0, [x0]
fadd s0, s1, s0
ldr x0, [sp, 48]
str s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #4
ldr s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #4
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp]
ldr s1, [x0]
ldr s0, [sp, 40]
fmul s1, s1, s0
ldr x0, [sp]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 44]
fmul s0, s2, s0
fsub s0, s1, s0
ldr x0, [sp, 56]
str s0, [x0]
ldr x0, [sp]
ldr s1, [x0]
ldr s0, [sp, 44]
fmul s1, s1, s0
ldr x0, [sp]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 40]
fmul s0, s2, s0
ldr x0, [sp, 56]
sub x0, x0, #4
fadd s0, s1, s0
str s0, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 2
ldr x1, [sp]
add x0, x1, x0
str x0, [sp]
ldr x0, [sp, 48]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #8
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 40]
ldr x0, [sp, 48]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #12
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 44]
ldr x0, [sp, 48]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #8
ldr s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #8
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #12
ldr s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #12
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp]
ldr s1, [x0]
ldr s0, [sp, 40]
fmul s1, s1, s0
ldr x0, [sp]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 44]
fmul s0, s2, s0
ldr x0, [sp, 56]
sub x0, x0, #8
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp]
ldr s1, [x0]
ldr s0, [sp, 44]
fmul s1, s1, s0
ldr x0, [sp]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 40]
fmul s0, s2, s0
ldr x0, [sp, 56]
sub x0, x0, #12
fadd s0, s1, s0
str s0, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 2
ldr x1, [sp]
add x0, x1, x0
str x0, [sp]
ldr x0, [sp, 48]
sub x0, x0, #16
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #16
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 40]
ldr x0, [sp, 48]
sub x0, x0, #20
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #20
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 44]
ldr x0, [sp, 48]
sub x0, x0, #16
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #16
ldr s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #16
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #20
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #20
ldr s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #20
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp]
ldr s1, [x0]
ldr s0, [sp, 40]
fmul s1, s1, s0
ldr x0, [sp]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 44]
fmul s0, s2, s0
ldr x0, [sp, 56]
sub x0, x0, #16
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp]
ldr s1, [x0]
ldr s0, [sp, 44]
fmul s1, s1, s0
ldr x0, [sp]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 40]
fmul s0, s2, s0
ldr x0, [sp, 56]
sub x0, x0, #20
fadd s0, s1, s0
str s0, [x0]
ldrsw x0, [sp, 8]
lsl x0, x0, 2
ldr x1, [sp]
add x0, x1, x0
str x0, [sp]
ldr x0, [sp, 48]
sub x0, x0, #24
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #24
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 40]
ldr x0, [sp, 48]
sub x0, x0, #28
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #28
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 44]
ldr x0, [sp, 48]
sub x0, x0, #24
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #24
ldr s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #24
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #28
ldr s1, [x0]
ldr x0, [sp, 56]
sub x0, x0, #28
ldr s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #28
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp]
ldr s1, [x0]
ldr s0, [sp, 40]
fmul s1, s1, s0
ldr x0, [sp]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 44]
fmul s0, s2, s0
ldr x0, [sp, 56]
sub x0, x0, #24
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp]
ldr s1, [x0]
ldr s0, [sp, 44]
fmul s1, s1, s0
ldr x0, [sp]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [sp, 40]
fmul s0, s2, s0
ldr x0, [sp, 56]
sub x0, x0, #28
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 48]
sub x0, x0, #32
str x0, [sp, 48]
ldr x0, [sp, 56]
sub x0, x0, #32
str x0, [sp, 56]
ldrsw x0, [sp, 8]
lsl x0, x0, 2
ldr x1, [sp]
add x0, x1, x0
str x0, [sp]
ldr w0, [sp, 36]
sub w0, w0, #1
str w0, [sp, 36]
.L442:
ldr w0, [sp, 36]
cmp w0, 0
bgt .L443
nop
nop
add sp, sp, 64
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE58:
.size imdct_step3_inner_r_loop, .-imdct_step3_inner_r_loop
.align 2
.type imdct_step3_inner_s_loop, %function
imdct_step3_inner_s_loop:
.LFB59:
.cfi_startproc
sub sp, sp, #112
.cfi_def_cfa_offset 112
str w0, [sp, 44]
str x1, [sp, 32]
str w2, [sp, 40]
str w3, [sp, 28]
str x4, [sp, 16]
str w5, [sp, 24]
str w6, [sp, 12]
ldr x0, [sp, 16]
ldr s0, [x0]
str s0, [sp, 56]
ldr x0, [sp, 16]
ldr s0, [x0, 4]
str s0, [sp, 60]
ldrsw x0, [sp, 24]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 64]
ldrsw x0, [sp, 24]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 68]
ldr w0, [sp, 24]
lsl w0, w0, 1
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 72]
ldr w0, [sp, 24]
lsl w0, w0, 1
sxtw x0, w0
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 76]
ldr w1, [sp, 24]
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 80]
ldr w1, [sp, 24]
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sxtw x0, w0
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 84]
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
str x0, [sp, 96]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 96]
add x0, x1, x0
str x0, [sp, 104]
ldr w0, [sp, 44]
str w0, [sp, 52]
b .L445
.L446:
ldr x0, [sp, 96]
ldr s1, [x0]
ldr x0, [sp, 104]
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 88]
ldr x0, [sp, 96]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #4
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 92]
ldr x0, [sp, 96]
ldr s1, [x0]
ldr x0, [sp, 104]
ldr s0, [x0]
fadd s0, s1, s0
ldr x0, [sp, 96]
str s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #4
ldr s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #4
fadd s0, s1, s0
str s0, [x0]
ldr s1, [sp, 88]
ldr s0, [sp, 56]
fmul s1, s1, s0
ldr s2, [sp, 92]
ldr s0, [sp, 60]
fmul s0, s2, s0
fsub s0, s1, s0
ldr x0, [sp, 104]
str s0, [x0]
ldr s1, [sp, 92]
ldr s0, [sp, 56]
fmul s1, s1, s0
ldr s2, [sp, 88]
ldr s0, [sp, 60]
fmul s0, s2, s0
ldr x0, [sp, 104]
sub x0, x0, #4
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #8
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 88]
ldr x0, [sp, 96]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #12
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 92]
ldr x0, [sp, 96]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #8
ldr s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #8
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #12
ldr s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #12
fadd s0, s1, s0
str s0, [x0]
ldr s1, [sp, 88]
ldr s0, [sp, 64]
fmul s1, s1, s0
ldr s2, [sp, 92]
ldr s0, [sp, 68]
fmul s0, s2, s0
ldr x0, [sp, 104]
sub x0, x0, #8
fsub s0, s1, s0
str s0, [x0]
ldr s1, [sp, 92]
ldr s0, [sp, 64]
fmul s1, s1, s0
ldr s2, [sp, 88]
ldr s0, [sp, 68]
fmul s0, s2, s0
ldr x0, [sp, 104]
sub x0, x0, #12
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #16
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #16
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 88]
ldr x0, [sp, 96]
sub x0, x0, #20
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #20
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 92]
ldr x0, [sp, 96]
sub x0, x0, #16
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #16
ldr s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #16
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #20
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #20
ldr s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #20
fadd s0, s1, s0
str s0, [x0]
ldr s1, [sp, 88]
ldr s0, [sp, 72]
fmul s1, s1, s0
ldr s2, [sp, 92]
ldr s0, [sp, 76]
fmul s0, s2, s0
ldr x0, [sp, 104]
sub x0, x0, #16
fsub s0, s1, s0
str s0, [x0]
ldr s1, [sp, 92]
ldr s0, [sp, 72]
fmul s1, s1, s0
ldr s2, [sp, 88]
ldr s0, [sp, 76]
fmul s0, s2, s0
ldr x0, [sp, 104]
sub x0, x0, #20
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #24
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #24
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 88]
ldr x0, [sp, 96]
sub x0, x0, #28
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #28
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 92]
ldr x0, [sp, 96]
sub x0, x0, #24
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #24
ldr s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #24
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #28
ldr s1, [x0]
ldr x0, [sp, 104]
sub x0, x0, #28
ldr s0, [x0]
ldr x0, [sp, 96]
sub x0, x0, #28
fadd s0, s1, s0
str s0, [x0]
ldr s1, [sp, 88]
ldr s0, [sp, 80]
fmul s1, s1, s0
ldr s2, [sp, 92]
ldr s0, [sp, 84]
fmul s0, s2, s0
ldr x0, [sp, 104]
sub x0, x0, #24
fsub s0, s1, s0
str s0, [x0]
ldr s1, [sp, 92]
ldr s0, [sp, 80]
fmul s1, s1, s0
ldr s2, [sp, 88]
ldr s0, [sp, 84]
fmul s0, s2, s0
ldr x0, [sp, 104]
sub x0, x0, #28
fadd s0, s1, s0
str s0, [x0]
ldrsw x0, [sp, 12]
lsl x0, x0, 2
neg x0, x0
ldr x1, [sp, 96]
add x0, x1, x0
str x0, [sp, 96]
ldrsw x0, [sp, 12]
lsl x0, x0, 2
neg x0, x0
ldr x1, [sp, 104]
add x0, x1, x0
str x0, [sp, 104]
ldr w0, [sp, 52]
sub w0, w0, #1
str w0, [sp, 52]
.L445:
ldr w0, [sp, 52]
cmp w0, 0
bgt .L446
nop
nop
add sp, sp, 112
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE59:
.size imdct_step3_inner_s_loop, .-imdct_step3_inner_s_loop
.align 2
.type iter_54, %function
iter_54:
.LFB60:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, 8]
ldr x0, [sp, 8]
ldr s1, [x0]
ldr x0, [sp, 8]
sub x0, x0, #16
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 16]
ldr x0, [sp, 8]
ldr s1, [x0]
ldr x0, [sp, 8]
sub x0, x0, #16
ldr s0, [x0]
fadd s0, s1, s0
str s0, [sp, 20]
ldr x0, [sp, 8]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 8]
sub x0, x0, #24
ldr s0, [x0]
fadd s0, s1, s0
str s0, [sp, 24]
ldr x0, [sp, 8]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 8]
sub x0, x0, #24
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 28]
ldr s1, [sp, 20]
ldr s0, [sp, 24]
fadd s0, s1, s0
ldr x0, [sp, 8]
str s0, [x0]
ldr x0, [sp, 8]
sub x0, x0, #8
ldr s1, [sp, 20]
ldr s0, [sp, 24]
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp, 8]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 8]
sub x0, x0, #28
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 32]
ldr x0, [sp, 8]
sub x0, x0, #16
ldr s1, [sp, 16]
ldr s0, [sp, 32]
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 8]
sub x0, x0, #24
ldr s1, [sp, 16]
ldr s0, [sp, 32]
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp, 8]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 8]
sub x0, x0, #20
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 36]
ldr x0, [sp, 8]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 8]
sub x0, x0, #20
ldr s0, [x0]
fadd s0, s1, s0
str s0, [sp, 40]
ldr x0, [sp, 8]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 8]
sub x0, x0, #28
ldr s0, [x0]
fadd s0, s1, s0
str s0, [sp, 44]
ldr x0, [sp, 8]
sub x0, x0, #4
ldr s1, [sp, 40]
ldr s0, [sp, 44]
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 8]
sub x0, x0, #12
ldr s1, [sp, 40]
ldr s0, [sp, 44]
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp, 8]
sub x0, x0, #20
ldr s1, [sp, 36]
ldr s0, [sp, 28]
fsub s0, s1, s0
str s0, [x0]
ldr x0, [sp, 8]
sub x0, x0, #28
ldr s1, [sp, 36]
ldr s0, [sp, 28]
fadd s0, s1, s0
str s0, [x0]
nop
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE60:
.size iter_54, .-iter_54
.align 2
.type imdct_step3_inner_s_loop_ld654, %function
imdct_step3_inner_s_loop_ld654:
.LFB61:
.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, 44]
str x1, [sp, 32]
str w2, [sp, 40]
str x3, [sp, 24]
str w4, [sp, 20]
ldr w0, [sp, 20]
asr w0, w0, 3
str w0, [sp, 48]
ldrsw x0, [sp, 48]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 52]
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
str x0, [sp, 64]
ldr w0, [sp, 44]
lsl w0, w0, 4
sxtw x0, w0
lsl x0, x0, 2
neg x0, x0
ldr x1, [sp, 64]
add x0, x1, x0
str x0, [sp, 72]
b .L449
.L450:
ldr x0, [sp, 64]
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #32
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 56]
ldr x0, [sp, 64]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #36
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 60]
ldr x0, [sp, 64]
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #32
ldr s0, [x0]
fadd s0, s1, s0
ldr x0, [sp, 64]
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #4
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #36
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #4
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #32
ldr s0, [sp, 56]
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #36
ldr s0, [sp, 60]
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #40
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 56]
ldr x0, [sp, 64]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #44
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 60]
ldr x0, [sp, 64]
sub x0, x0, #8
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #40
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #8
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #12
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #44
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #12
fadd s0, s1, s0
str s0, [x0]
ldr s1, [sp, 56]
ldr s0, [sp, 60]
fadd s1, s1, s0
ldr x0, [sp, 64]
sub x0, x0, #40
ldr s0, [sp, 52]
fmul s0, s1, s0
str s0, [x0]
ldr s1, [sp, 60]
ldr s0, [sp, 56]
fsub s1, s1, s0
ldr x0, [sp, 64]
sub x0, x0, #44
ldr s0, [sp, 52]
fmul s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #48
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #16
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 56]
ldr x0, [sp, 64]
sub x0, x0, #20
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #52
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 60]
ldr x0, [sp, 64]
sub x0, x0, #16
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #48
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #16
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #20
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #52
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #20
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #48
ldr s0, [sp, 60]
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #52
ldr s0, [sp, 56]
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #56
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #24
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 56]
ldr x0, [sp, 64]
sub x0, x0, #28
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #60
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 60]
ldr x0, [sp, 64]
sub x0, x0, #24
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #56
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #24
fadd s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #28
ldr s1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #60
ldr s0, [x0]
ldr x0, [sp, 64]
sub x0, x0, #28
fadd s0, s1, s0
str s0, [x0]
ldr s1, [sp, 56]
ldr s0, [sp, 60]
fadd s1, s1, s0
ldr x0, [sp, 64]
sub x0, x0, #56
ldr s0, [sp, 52]
fmul s0, s1, s0
str s0, [x0]
ldr s1, [sp, 56]
ldr s0, [sp, 60]
fsub s1, s1, s0
ldr x0, [sp, 64]
sub x0, x0, #60
ldr s0, [sp, 52]
fmul s0, s1, s0
str s0, [x0]
ldr x0, [sp, 64]
bl iter_54
ldr x0, [sp, 64]
sub x0, x0, #32
bl iter_54
ldr x0, [sp, 64]
sub x0, x0, #64
str x0, [sp, 64]
.L449:
ldr x1, [sp, 64]
ldr x0, [sp, 72]
cmp x1, x0
bhi .L450
nop
nop
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE61:
.size imdct_step3_inner_s_loop_ld654, .-imdct_step3_inner_s_loop_ld654
.section .rodata
.align 3
.LC18:
.string "v == buf2"
.text
.align 2
.type inverse_mdct, %function
inverse_mdct:
.LFB62:
.cfi_startproc
stp x29, x30, [sp, -384]!
.cfi_def_cfa_offset 384
.cfi_offset 29, -384
.cfi_offset 30, -376
mov x29, sp
.cfi_def_cfa_register 29
sub sp, sp, #16
str x0, [x29, 40]
str w1, [x29, 36]
str x2, [x29, 24]
str w3, [x29, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 376]
mov x1, 0
ldr w0, [x29, 36]
asr w0, w0, 1
str w0, [x29, 64]
ldr w0, [x29, 36]
asr w0, w0, 2
str w0, [x29, 68]
ldr w0, [x29, 36]
asr w0, w0, 3
str w0, [x29, 72]
ldr x0, [x29, 24]
ldr w0, [x0, 124]
str w0, [x29, 76]
ldr x0, [x29, 24]
ldr x0, [x0, 104]
cmp x0, 0
beq .L452
ldrsw x0, [x29, 64]
lsl w0, w0, 2
mov w1, w0
ldr x0, [x29, 24]
bl setup_temp_malloc
b .L453
.L452:
ldrsw x0, [x29, 64]
lsl x0, x0, 2
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
and x1, x0, -65536
sub x1, sp, x1
.L454:
cmp sp, x1
beq .L455
sub sp, sp, #65536
str xzr, [sp, 1024]
b .L454
.L455:
and x1, x0, 65535
sub sp, sp, x1
str xzr, [sp]
and x0, x0, 65535
cmp x0, 1024
bcc .L456
str xzr, [sp, 1024]
.L456:
add x0, sp, 16
add x0, x0, 15
lsr x0, x0, 4
lsl x0, x0, 4
.L453:
str x0, [x29, 336]
str xzr, [x29, 344]
str xzr, [x29, 352]
ldr x0, [x29, 24]
ldrsw x1, [x29, 32]
add x1, x1, 174
ldr x0, [x0, x1, lsl 3]
str x0, [x29, 360]
ldrsw x0, [x29, 64]
lsl x0, x0, 2
sub x0, x0, #8
ldr x1, [x29, 336]
add x0, x1, x0
str x0, [x29, 168]
ldr x0, [x29, 360]
str x0, [x29, 184]
ldr x0, [x29, 40]
str x0, [x29, 176]
ldrsw x0, [x29, 64]
lsl x0, x0, 2
ldr x1, [x29, 40]
add x0, x1, x0
str x0, [x29, 368]
b .L457
.L458:
ldr x0, [x29, 176]
ldr s1, [x0]
ldr x0, [x29, 184]
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 176]
add x0, x0, 8
ldr s2, [x0]
ldr x0, [x29, 184]
add x0, x0, 4
ldr s0, [x0]
fmul s0, s2, s0
ldr x0, [x29, 168]
add x0, x0, 4
fsub s0, s1, s0
str s0, [x0]
ldr x0, [x29, 176]
ldr s1, [x0]
ldr x0, [x29, 184]
add x0, x0, 4
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 176]
add x0, x0, 8
ldr s2, [x0]
ldr x0, [x29, 184]
ldr s0, [x0]
fmul s0, s2, s0
fadd s0, s1, s0
ldr x0, [x29, 168]
str s0, [x0]
ldr x0, [x29, 168]
sub x0, x0, #8
str x0, [x29, 168]
ldr x0, [x29, 184]
add x0, x0, 8
str x0, [x29, 184]
ldr x0, [x29, 176]
add x0, x0, 16
str x0, [x29, 176]
.L457:
ldr x1, [x29, 176]
ldr x0, [x29, 368]
cmp x1, x0
bne .L458
ldrsw x0, [x29, 64]
lsl x0, x0, 2
sub x0, x0, #12
ldr x1, [x29, 40]
add x0, x1, x0
str x0, [x29, 176]
b .L459
.L460:
ldr x0, [x29, 176]
add x0, x0, 8
ldr s0, [x0]
fneg s1, s0
ldr x0, [x29, 184]
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 176]
ldr s2, [x0]
ldr x0, [x29, 184]
add x0, x0, 4
ldr s0, [x0]
fmul s0, s2, s0
ldr x0, [x29, 168]
add x0, x0, 4
fadd s0, s1, s0
str s0, [x0]
ldr x0, [x29, 176]
add x0, x0, 8
ldr s0, [x0]
fneg s1, s0
ldr x0, [x29, 184]
add x0, x0, 4
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 176]
ldr s0, [x0]
fneg s2, s0
ldr x0, [x29, 184]
ldr s0, [x0]
fmul s0, s2, s0
fadd s0, s1, s0
ldr x0, [x29, 168]
str s0, [x0]
ldr x0, [x29, 168]
sub x0, x0, #8
str x0, [x29, 168]
ldr x0, [x29, 184]
add x0, x0, 8
str x0, [x29, 184]
ldr x0, [x29, 176]
sub x0, x0, #16
str x0, [x29, 176]
.L459:
ldr x1, [x29, 168]
ldr x0, [x29, 336]
cmp x1, x0
bcs .L460
ldr x0, [x29, 40]
str x0, [x29, 344]
ldr x0, [x29, 336]
str x0, [x29, 352]
ldrsw x0, [x29, 64]
lsl x0, x0, 2
sub x0, x0, #32
ldr x1, [x29, 360]
add x0, x1, x0
str x0, [x29, 192]
ldrsw x0, [x29, 68]
lsl x0, x0, 2
ldr x1, [x29, 352]
add x0, x1, x0
str x0, [x29, 216]
ldr x0, [x29, 352]
str x0, [x29, 224]
ldrsw x0, [x29, 68]
lsl x0, x0, 2
ldr x1, [x29, 344]
add x0, x1, x0
str x0, [x29, 200]
ldr x0, [x29, 344]
str x0, [x29, 208]
b .L461
.L462:
ldr x0, [x29, 216]
add x0, x0, 4
ldr s1, [x0]
ldr x0, [x29, 224]
add x0, x0, 4
ldr s0, [x0]
fsub s0, s1, s0
str s0, [x29, 160]
ldr x0, [x29, 216]
ldr s1, [x0]
ldr x0, [x29, 224]
ldr s0, [x0]
fsub s0, s1, s0
str s0, [x29, 164]
ldr x0, [x29, 216]
add x0, x0, 4
ldr s1, [x0]
ldr x0, [x29, 224]
add x0, x0, 4
ldr s0, [x0]
ldr x0, [x29, 200]
add x0, x0, 4
fadd s0, s1, s0
str s0, [x0]
ldr x0, [x29, 216]
ldr s1, [x0]
ldr x0, [x29, 224]
ldr s0, [x0]
fadd s0, s1, s0
ldr x0, [x29, 200]
str s0, [x0]
ldr x0, [x29, 192]
add x0, x0, 16
ldr s1, [x0]
ldr s0, [x29, 160]
fmul s1, s1, s0
ldr x0, [x29, 192]
add x0, x0, 20
ldr s2, [x0]
ldr s0, [x29, 164]
fmul s0, s2, s0
ldr x0, [x29, 208]
add x0, x0, 4
fsub s0, s1, s0
str s0, [x0]
ldr x0, [x29, 192]
add x0, x0, 16
ldr s1, [x0]
ldr s0, [x29, 164]
fmul s1, s1, s0
ldr x0, [x29, 192]
add x0, x0, 20
ldr s2, [x0]
ldr s0, [x29, 160]
fmul s0, s2, s0
fadd s0, s1, s0
ldr x0, [x29, 208]
str s0, [x0]
ldr x0, [x29, 216]
add x0, x0, 12
ldr s1, [x0]
ldr x0, [x29, 224]
add x0, x0, 12
ldr s0, [x0]
fsub s0, s1, s0
str s0, [x29, 160]
ldr x0, [x29, 216]
add x0, x0, 8
ldr s1, [x0]
ldr x0, [x29, 224]
add x0, x0, 8
ldr s0, [x0]
fsub s0, s1, s0
str s0, [x29, 164]
ldr x0, [x29, 216]
add x0, x0, 12
ldr s1, [x0]
ldr x0, [x29, 224]
add x0, x0, 12
ldr s0, [x0]
ldr x0, [x29, 200]
add x0, x0, 12
fadd s0, s1, s0
str s0, [x0]
ldr x0, [x29, 216]
add x0, x0, 8
ldr s1, [x0]
ldr x0, [x29, 224]
add x0, x0, 8
ldr s0, [x0]
ldr x0, [x29, 200]
add x0, x0, 8
fadd s0, s1, s0
str s0, [x0]
ldr x0, [x29, 192]
ldr s1, [x0]
ldr s0, [x29, 160]
fmul s1, s1, s0
ldr x0, [x29, 192]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [x29, 164]
fmul s0, s2, s0
ldr x0, [x29, 208]
add x0, x0, 12
fsub s0, s1, s0
str s0, [x0]
ldr x0, [x29, 192]
ldr s1, [x0]
ldr s0, [x29, 164]
fmul s1, s1, s0
ldr x0, [x29, 192]
add x0, x0, 4
ldr s2, [x0]
ldr s0, [x29, 160]
fmul s0, s2, s0
ldr x0, [x29, 208]
add x0, x0, 8
fadd s0, s1, s0
str s0, [x0]
ldr x0, [x29, 192]
sub x0, x0, #32
str x0, [x29, 192]
ldr x0, [x29, 200]
add x0, x0, 16
str x0, [x29, 200]
ldr x0, [x29, 208]
add x0, x0, 16
str x0, [x29, 208]
ldr x0, [x29, 216]
add x0, x0, 16
str x0, [x29, 216]
ldr x0, [x29, 224]
add x0, x0, 16
str x0, [x29, 224]
.L461:
ldr x1, [x29, 192]
ldr x0, [x29, 360]
cmp x1, x0
bcs .L462
ldr w0, [x29, 36]
bl ilog
sub w0, w0, #1
str w0, [x29, 80]
ldr w0, [x29, 36]
asr w5, w0, 4
ldr w0, [x29, 64]
sub w1, w0, #1
ldr w0, [x29, 36]
asr w0, w0, 3
neg w0, w0
ldr x4, [x29, 360]
mov w3, w0
mov w2, w1
ldr x1, [x29, 344]
mov w0, w5
bl imdct_step3_iter0_loop
ldr w0, [x29, 36]
asr w5, w0, 4
ldr w0, [x29, 64]
sub w1, w0, #1
ldr w0, [x29, 68]
sub w1, w1, w0
ldr w0, [x29, 36]
asr w0, w0, 3
neg w0, w0
ldr x4, [x29, 360]
mov w3, w0
mov w2, w1
ldr x1, [x29, 344]
mov w0, w5
bl imdct_step3_iter0_loop
ldr w0, [x29, 36]
asr w6, w0, 5
ldr w0, [x29, 64]
sub w1, w0, #1
ldr w0, [x29, 36]
asr w0, w0, 4
neg w0, w0
mov w5, 16
ldr x4, [x29, 360]
mov w3, w0
mov w2, w1
ldr x1, [x29, 344]
mov w0, w6
bl imdct_step3_inner_r_loop
ldr w0, [x29, 36]
asr w6, w0, 5
ldr w0, [x29, 64]
sub w1, w0, #1
ldr w0, [x29, 72]
sub w1, w1, w0
ldr w0, [x29, 36]
asr w0, w0, 4
neg w0, w0
mov w5, 16
ldr x4, [x29, 360]
mov w3, w0
mov w2, w1
ldr x1, [x29, 344]
mov w0, w6
bl imdct_step3_inner_r_loop
ldr w0, [x29, 36]
asr w6, w0, 5
ldr w0, [x29, 64]
sub w1, w0, #1
ldr w0, [x29, 72]
lsl w0, w0, 1
sub w1, w1, w0
ldr w0, [x29, 36]
asr w0, w0, 4
neg w0, w0
mov w5, 16
ldr x4, [x29, 360]
mov w3, w0
mov w2, w1
ldr x1, [x29, 344]
mov w0, w6
bl imdct_step3_inner_r_loop
ldr w0, [x29, 36]
asr w6, w0, 5
ldr w0, [x29, 64]
sub w1, w0, #1
ldr w0, [x29, 72]
mov w2, w0
lsl w0, w0, 2
sub w0, w2, w0
add w1, w1, w0
ldr w0, [x29, 36]
asr w0, w0, 4
neg w0, w0
mov w5, 16
ldr x4, [x29, 360]
mov w3, w0
mov w2, w1
ldr x1, [x29, 344]
mov w0, w6
bl imdct_step3_inner_r_loop
mov w0, 2
str w0, [x29, 48]
b .L463
.L466:
ldr w0, [x29, 48]
add w0, w0, 2
ldr w1, [x29, 36]
asr w0, w1, w0
str w0, [x29, 148]
ldr w0, [x29, 148]
asr w0, w0, 1
str w0, [x29, 152]
ldr w0, [x29, 48]
add w0, w0, 1
mov w1, 1
lsl w0, w1, w0
str w0, [x29, 156]
str wzr, [x29, 52]
b .L464
.L465:
ldr w0, [x29, 48]
add w0, w0, 4
ldr w1, [x29, 36]
asr w6, w1, w0
ldr w0, [x29, 64]
sub w1, w0, #1
ldr w2, [x29, 148]
ldr w0, [x29, 52]
mul w0, w2, w0
sub w2, w1, w0
ldr w0, [x29, 152]
neg w3, w0
ldr w0, [x29, 48]
add w0, w0, 3
mov w1, 1
lsl w0, w1, w0
mov w5, w0
ldr x4, [x29, 360]
ldr x1, [x29, 344]
mov w0, w6
bl imdct_step3_inner_r_loop
ldr w0, [x29, 52]
add w0, w0, 1
str w0, [x29, 52]
.L464:
ldr w1, [x29, 52]
ldr w0, [x29, 156]
cmp w1, w0
blt .L465
ldr w0, [x29, 48]
add w0, w0, 1
str w0, [x29, 48]
.L463:
ldr w0, [x29, 80]
sub w0, w0, #3
asr w0, w0, 1
ldr w1, [x29, 48]
cmp w1, w0
blt .L466
b .L467
.L470:
ldr w0, [x29, 48]
add w0, w0, 2
ldr w1, [x29, 36]
asr w0, w1, w0
str w0, [x29, 128]
ldr w0, [x29, 48]
add w0, w0, 3
mov w1, 1
lsl w0, w1, w0
str w0, [x29, 132]
ldr w0, [x29, 128]
asr w0, w0, 1
str w0, [x29, 136]
ldr w0, [x29, 48]
add w0, w0, 6
ldr w1, [x29, 36]
asr w0, w1, w0
str w0, [x29, 140]
ldr w0, [x29, 48]
add w0, w0, 1
mov w1, 1
lsl w0, w1, w0
str w0, [x29, 144]
ldr x0, [x29, 360]
str x0, [x29, 232]
ldr w0, [x29, 64]
sub w0, w0, #1
str w0, [x29, 60]
ldr w0, [x29, 140]
str w0, [x29, 56]
b .L468
.L469:
ldr w0, [x29, 136]
neg w0, w0
ldr w6, [x29, 128]
ldr w5, [x29, 132]
ldr x4, [x29, 232]
mov w3, w0
ldr w2, [x29, 60]
ldr x1, [x29, 344]
ldr w0, [x29, 144]
bl imdct_step3_inner_s_loop
ldr w0, [x29, 132]
lsl w0, w0, 2
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [x29, 232]
add x0, x1, x0
str x0, [x29, 232]
ldr w0, [x29, 60]
sub w0, w0, #8
str w0, [x29, 60]
ldr w0, [x29, 56]
sub w0, w0, #1
str w0, [x29, 56]
.L468:
ldr w0, [x29, 56]
cmp w0, 0
bgt .L469
ldr w0, [x29, 48]
add w0, w0, 1
str w0, [x29, 48]
.L467:
ldr w0, [x29, 80]
sub w0, w0, #6
ldr w1, [x29, 48]
cmp w1, w0
blt .L470
ldr w0, [x29, 36]
asr w5, w0, 5
ldr w0, [x29, 64]
sub w0, w0, #1
ldr w4, [x29, 36]
ldr x3, [x29, 360]
mov w2, w0
ldr x1, [x29, 344]
mov w0, w5
bl imdct_step3_inner_s_loop_ld654
ldr x0, [x29, 24]
ldrsw x1, [x29, 32]
add x1, x1, 182
ldr x0, [x0, x1, lsl 3]
str x0, [x29, 240]
ldrsw x0, [x29, 68]
lsl x0, x0, 2
sub x0, x0, #16
ldr x1, [x29, 352]
add x0, x1, x0
str x0, [x29, 248]
ldrsw x0, [x29, 64]
lsl x0, x0, 2
sub x0, x0, #16
ldr x1, [x29, 352]
add x0, x1, x0
str x0, [x29, 256]
b .L471
.L472:
ldr x0, [x29, 240]
ldrh w0, [x0]
str w0, [x29, 124]
ldrsw x0, [x29, 124]
lsl x0, x0, 2
ldr x1, [x29, 344]
add x1, x1, x0
ldr x0, [x29, 256]
add x0, x0, 12
ldr s0, [x1]
str s0, [x0]
ldrsw x0, [x29, 124]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [x29, 344]
add x1, x1, x0
ldr x0, [x29, 256]
add x0, x0, 8
ldr s0, [x1]
str s0, [x0]
ldrsw x0, [x29, 124]
add x0, x0, 2
lsl x0, x0, 2
ldr x1, [x29, 344]
add x1, x1, x0
ldr x0, [x29, 248]
add x0, x0, 12
ldr s0, [x1]
str s0, [x0]
ldrsw x0, [x29, 124]
add x0, x0, 3
lsl x0, x0, 2
ldr x1, [x29, 344]
add x1, x1, x0
ldr x0, [x29, 248]
add x0, x0, 8
ldr s0, [x1]
str s0, [x0]
ldr x0, [x29, 240]
add x0, x0, 2
ldrh w0, [x0]
str w0, [x29, 124]
ldrsw x0, [x29, 124]
lsl x0, x0, 2
ldr x1, [x29, 344]
add x1, x1, x0
ldr x0, [x29, 256]
add x0, x0, 4
ldr s0, [x1]
str s0, [x0]
ldrsw x0, [x29, 124]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [x29, 344]
add x0, x1, x0
ldr s0, [x0]
ldr x0, [x29, 256]
str s0, [x0]
ldrsw x0, [x29, 124]
add x0, x0, 2
lsl x0, x0, 2
ldr x1, [x29, 344]
add x1, x1, x0
ldr x0, [x29, 248]
add x0, x0, 4
ldr s0, [x1]
str s0, [x0]
ldrsw x0, [x29, 124]
add x0, x0, 3
lsl x0, x0, 2
ldr x1, [x29, 344]
add x0, x1, x0
ldr s0, [x0]
ldr x0, [x29, 248]
str s0, [x0]
ldr x0, [x29, 248]
sub x0, x0, #16
str x0, [x29, 248]
ldr x0, [x29, 256]
sub x0, x0, #16
str x0, [x29, 256]
ldr x0, [x29, 240]
add x0, x0, 4
str x0, [x29, 240]
.L471:
ldr x1, [x29, 248]
ldr x0, [x29, 352]
cmp x1, x0
bcs .L472
ldr x1, [x29, 352]
ldr x0, [x29, 336]
cmp x1, x0
beq .L473
adrp x0, __PRETTY_FUNCTION__.10
add x3, x0, :lo12:__PRETTY_FUNCTION__.10
mov w2, 2794
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl __assert_fail
.L473:
ldr x0, [x29, 24]
ldrsw x1, [x29, 32]
add x1, x1, 178
ldr x0, [x0, x1, lsl 3]
str x0, [x29, 264]
ldr x0, [x29, 352]
str x0, [x29, 272]
ldrsw x0, [x29, 64]
lsl x0, x0, 2
sub x0, x0, #16
ldr x1, [x29, 352]
add x0, x1, x0
str x0, [x29, 280]
b .L474
.L475:
ldr x0, [x29, 272]
ldr s1, [x0]
ldr x0, [x29, 280]
add x0, x0, 8
ldr s0, [x0]
fsub s0, s1, s0
str s0, [x29, 100]
ldr x0, [x29, 272]
add x0, x0, 4
ldr s1, [x0]
ldr x0, [x29, 280]
add x0, x0, 12
ldr s0, [x0]
fadd s0, s1, s0
str s0, [x29, 104]
ldr x0, [x29, 264]
add x0, x0, 4
ldr s1, [x0]
ldr s0, [x29, 100]
fmul s1, s1, s0
ldr x0, [x29, 264]
ldr s2, [x0]
ldr s0, [x29, 104]
fmul s0, s2, s0
fadd s0, s1, s0
str s0, [x29, 108]
ldr x0, [x29, 264]
add x0, x0, 4
ldr s1, [x0]
ldr s0, [x29, 104]
fmul s1, s1, s0
ldr x0, [x29, 264]
ldr s2, [x0]
ldr s0, [x29, 100]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 112]
ldr x0, [x29, 272]
ldr s1, [x0]
ldr x0, [x29, 280]
add x0, x0, 8
ldr s0, [x0]
fadd s0, s1, s0
str s0, [x29, 116]
ldr x0, [x29, 272]
add x0, x0, 4
ldr s1, [x0]
ldr x0, [x29, 280]
add x0, x0, 12
ldr s0, [x0]
fsub s0, s1, s0
str s0, [x29, 120]
ldr s1, [x29, 116]
ldr s0, [x29, 108]
fadd s0, s1, s0
ldr x0, [x29, 272]
str s0, [x0]
ldr x0, [x29, 272]
add x0, x0, 4
ldr s1, [x29, 120]
ldr s0, [x29, 112]
fadd s0, s1, s0
str s0, [x0]
ldr x0, [x29, 280]
add x0, x0, 8
ldr s1, [x29, 116]
ldr s0, [x29, 108]
fsub s0, s1, s0
str s0, [x0]
ldr x0, [x29, 280]
add x0, x0, 12
ldr s1, [x29, 112]
ldr s0, [x29, 120]
fsub s0, s1, s0
str s0, [x0]
ldr x0, [x29, 272]
add x0, x0, 8
ldr s1, [x0]
ldr x0, [x29, 280]
ldr s0, [x0]
fsub s0, s1, s0
str s0, [x29, 100]
ldr x0, [x29, 272]
add x0, x0, 12
ldr s1, [x0]
ldr x0, [x29, 280]
add x0, x0, 4
ldr s0, [x0]
fadd s0, s1, s0
str s0, [x29, 104]
ldr x0, [x29, 264]
add x0, x0, 12
ldr s1, [x0]
ldr s0, [x29, 100]
fmul s1, s1, s0
ldr x0, [x29, 264]
add x0, x0, 8
ldr s2, [x0]
ldr s0, [x29, 104]
fmul s0, s2, s0
fadd s0, s1, s0
str s0, [x29, 108]
ldr x0, [x29, 264]
add x0, x0, 12
ldr s1, [x0]
ldr s0, [x29, 104]
fmul s1, s1, s0
ldr x0, [x29, 264]
add x0, x0, 8
ldr s2, [x0]
ldr s0, [x29, 100]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 112]
ldr x0, [x29, 272]
add x0, x0, 8
ldr s1, [x0]
ldr x0, [x29, 280]
ldr s0, [x0]
fadd s0, s1, s0
str s0, [x29, 116]
ldr x0, [x29, 272]
add x0, x0, 12
ldr s1, [x0]
ldr x0, [x29, 280]
add x0, x0, 4
ldr s0, [x0]
fsub s0, s1, s0
str s0, [x29, 120]
ldr x0, [x29, 272]
add x0, x0, 8
ldr s1, [x29, 116]
ldr s0, [x29, 108]
fadd s0, s1, s0
str s0, [x0]
ldr x0, [x29, 272]
add x0, x0, 12
ldr s1, [x29, 120]
ldr s0, [x29, 112]
fadd s0, s1, s0
str s0, [x0]
ldr s1, [x29, 116]
ldr s0, [x29, 108]
fsub s0, s1, s0
ldr x0, [x29, 280]
str s0, [x0]
ldr x0, [x29, 280]
add x0, x0, 4
ldr s1, [x29, 112]
ldr s0, [x29, 120]
fsub s0, s1, s0
str s0, [x0]
ldr x0, [x29, 264]
add x0, x0, 16
str x0, [x29, 264]
ldr x0, [x29, 272]
add x0, x0, 16
str x0, [x29, 272]
ldr x0, [x29, 280]
sub x0, x0, #16
str x0, [x29, 280]
.L474:
ldr x1, [x29, 272]
ldr x0, [x29, 280]
cmp x1, x0
bcc .L475
ldr x0, [x29, 24]
ldrsw x1, [x29, 32]
add x1, x1, 176
ldr x1, [x0, x1, lsl 3]
ldrsw x0, [x29, 64]
lsl x0, x0, 2
sub x0, x0, #32
add x0, x1, x0
str x0, [x29, 320]
ldrsw x0, [x29, 64]
lsl x0, x0, 2
sub x0, x0, #32
ldr x1, [x29, 336]
add x0, x1, x0
str x0, [x29, 328]
ldr x0, [x29, 40]
str x0, [x29, 288]
ldrsw x0, [x29, 64]
lsl x0, x0, 2
sub x0, x0, #16
ldr x1, [x29, 40]
add x0, x1, x0
str x0, [x29, 296]
ldrsw x0, [x29, 64]
lsl x0, x0, 2
ldr x1, [x29, 40]
add x0, x1, x0
str x0, [x29, 304]
ldrsw x0, [x29, 36]
lsl x0, x0, 2
sub x0, x0, #16
ldr x1, [x29, 40]
add x0, x1, x0
str x0, [x29, 312]
b .L476
.L477:
ldr x0, [x29, 328]
add x0, x0, 24
ldr s1, [x0]
ldr x0, [x29, 320]
add x0, x0, 28
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 328]
add x0, x0, 28
ldr s2, [x0]
ldr x0, [x29, 320]
add x0, x0, 24
ldr s0, [x0]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 84]
ldr x0, [x29, 328]
add x0, x0, 24
ldr s0, [x0]
fneg s1, s0
ldr x0, [x29, 320]
add x0, x0, 24
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 328]
add x0, x0, 28
ldr s2, [x0]
ldr x0, [x29, 320]
add x0, x0, 28
ldr s0, [x0]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 88]
ldr x0, [x29, 288]
ldr s0, [x29, 84]
str s0, [x0]
ldr x0, [x29, 296]
add x0, x0, 12
ldr s0, [x29, 84]
fneg s0, s0
str s0, [x0]
ldr x0, [x29, 304]
ldr s0, [x29, 88]
str s0, [x0]
ldr x0, [x29, 312]
add x0, x0, 12
ldr s0, [x29, 88]
str s0, [x0]
ldr x0, [x29, 328]
add x0, x0, 16
ldr s1, [x0]
ldr x0, [x29, 320]
add x0, x0, 20
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 328]
add x0, x0, 20
ldr s2, [x0]
ldr x0, [x29, 320]
add x0, x0, 16
ldr s0, [x0]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 92]
ldr x0, [x29, 328]
add x0, x0, 16
ldr s0, [x0]
fneg s1, s0
ldr x0, [x29, 320]
add x0, x0, 16
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 328]
add x0, x0, 20
ldr s2, [x0]
ldr x0, [x29, 320]
add x0, x0, 20
ldr s0, [x0]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 96]
ldr x0, [x29, 288]
add x0, x0, 4
ldr s0, [x29, 92]
str s0, [x0]
ldr x0, [x29, 296]
add x0, x0, 8
ldr s0, [x29, 92]
fneg s0, s0
str s0, [x0]
ldr x0, [x29, 304]
add x0, x0, 4
ldr s0, [x29, 96]
str s0, [x0]
ldr x0, [x29, 312]
add x0, x0, 8
ldr s0, [x29, 96]
str s0, [x0]
ldr x0, [x29, 328]
add x0, x0, 8
ldr s1, [x0]
ldr x0, [x29, 320]
add x0, x0, 12
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 328]
add x0, x0, 12
ldr s2, [x0]
ldr x0, [x29, 320]
add x0, x0, 8
ldr s0, [x0]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 84]
ldr x0, [x29, 328]
add x0, x0, 8
ldr s0, [x0]
fneg s1, s0
ldr x0, [x29, 320]
add x0, x0, 8
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 328]
add x0, x0, 12
ldr s2, [x0]
ldr x0, [x29, 320]
add x0, x0, 12
ldr s0, [x0]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 88]
ldr x0, [x29, 288]
add x0, x0, 8
ldr s0, [x29, 84]
str s0, [x0]
ldr x0, [x29, 296]
add x0, x0, 4
ldr s0, [x29, 84]
fneg s0, s0
str s0, [x0]
ldr x0, [x29, 304]
add x0, x0, 8
ldr s0, [x29, 88]
str s0, [x0]
ldr x0, [x29, 312]
add x0, x0, 4
ldr s0, [x29, 88]
str s0, [x0]
ldr x0, [x29, 328]
ldr s1, [x0]
ldr x0, [x29, 320]
add x0, x0, 4
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 328]
add x0, x0, 4
ldr s2, [x0]
ldr x0, [x29, 320]
ldr s0, [x0]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 92]
ldr x0, [x29, 328]
ldr s0, [x0]
fneg s1, s0
ldr x0, [x29, 320]
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [x29, 328]
add x0, x0, 4
ldr s2, [x0]
ldr x0, [x29, 320]
add x0, x0, 4
ldr s0, [x0]
fmul s0, s2, s0
fsub s0, s1, s0
str s0, [x29, 96]
ldr x0, [x29, 288]
add x0, x0, 12
ldr s0, [x29, 92]
str s0, [x0]
ldr s0, [x29, 92]
fneg s0, s0
ldr x0, [x29, 296]
str s0, [x0]
ldr x0, [x29, 304]
add x0, x0, 12
ldr s0, [x29, 96]
str s0, [x0]
ldr x0, [x29, 312]
ldr s0, [x29, 96]
str s0, [x0]
ldr x0, [x29, 320]
sub x0, x0, #32
str x0, [x29, 320]
ldr x0, [x29, 328]
sub x0, x0, #32
str x0, [x29, 328]
ldr x0, [x29, 288]
add x0, x0, 16
str x0, [x29, 288]
ldr x0, [x29, 304]
add x0, x0, 16
str x0, [x29, 304]
ldr x0, [x29, 296]
sub x0, x0, #16
str x0, [x29, 296]
ldr x0, [x29, 312]
sub x0, x0, #16
str x0, [x29, 312]
.L476:
ldr x1, [x29, 328]
ldr x0, [x29, 352]
cmp x1, x0
bcs .L477
ldr x0, [x29, 24]
ldr w1, [x29, 76]
str w1, [x0, 124]
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [x29, 376]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L478
bl __stack_chk_fail
.L478:
mov sp, x29
ldp x29, x30, [sp], 384
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa 31, 0
ret
.cfi_endproc
.LFE62:
.size inverse_mdct, .-inverse_mdct
.section .rodata
.align 3
.LC19:
.string "0"
.text
.align 2
.type get_window, %function
get_window:
.LFB63:
.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]
lsl w0, w0, 1
str w0, [sp, 20]
ldr x0, [sp, 24]
ldr w0, [x0, 144]
ldr w1, [sp, 20]
cmp w1, w0
bne .L480
ldr x0, [sp, 24]
ldr x0, [x0, 1440]
b .L481
.L480:
ldr x0, [sp, 24]
ldr w0, [x0, 148]
ldr w1, [sp, 20]
cmp w1, w0
bne .L482
ldr x0, [sp, 24]
ldr x0, [x0, 1448]
b .L481
.L482:
adrp x0, __PRETTY_FUNCTION__.9
add x3, x0, :lo12:__PRETTY_FUNCTION__.9
mov w2, 3042
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl __assert_fail
.L481:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE63:
.size get_window, .-get_window
.align 2
.type do_floor, %function
do_floor:
.LFB64:
.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, 56]
str x1, [sp, 48]
str w2, [sp, 44]
str w3, [sp, 40]
str x4, [sp, 32]
str x5, [sp, 24]
str x6, [sp, 16]
ldr w0, [sp, 40]
asr w0, w0, 1
str w0, [sp, 84]
ldr x0, [sp, 48]
ldr x2, [x0, 8]
ldrsw x1, [sp, 44]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0, 2]
str w0, [sp, 88]
ldr x1, [sp, 48]
ldrsw x0, [sp, 88]
add x0, x1, x0
ldrb w0, [x0, 17]
str w0, [sp, 92]
ldr x1, [sp, 56]
ldrsw x0, [sp, 92]
add x0, x0, 80
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 12]
cmp w0, 0
bne .L484
mov w1, 21
ldr x0, [sp, 56]
bl error
b .L485
.L484:
ldr x0, [sp, 56]
ldr x1, [x0, 304]
ldrsw x2, [sp, 92]
mov x0, 1596
mul x0, x2, x0
add x0, x1, x0
str x0, [sp, 104]
str wzr, [sp, 76]
ldr x0, [sp, 24]
ldrsh w0, [x0]
mov w1, w0
ldr x0, [sp, 104]
ldrb w0, [x0, 1588]
mul w0, w1, w0
str w0, [sp, 80]
mov w0, 1
str w0, [sp, 72]
b .L486
.L489:
ldr x1, [sp, 104]
ldrsw x0, [sp, 72]
add x0, x1, x0
ldrb w0, [x0, 838]
str w0, [sp, 68]
ldrsw x0, [sp, 68]
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
ldrsh w0, [x0]
cmp w0, 0
blt .L487
ldrsw x0, [sp, 68]
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
ldrsh w0, [x0]
mov w1, w0
ldr x0, [sp, 104]
ldrb w0, [x0, 1588]
mul w0, w1, w0
str w0, [sp, 96]
ldr x1, [sp, 104]
ldrsw x0, [sp, 68]
add x0, x0, 168
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 2]
str w0, [sp, 100]
ldr w1, [sp, 76]
ldr w0, [sp, 100]
cmp w1, w0
beq .L488
ldr w5, [sp, 84]
ldr w4, [sp, 96]
ldr w3, [sp, 100]
ldr w2, [sp, 80]
ldr w1, [sp, 76]
ldr x0, [sp, 32]
bl draw_line
.L488:
ldr w0, [sp, 100]
str w0, [sp, 76]
ldr w0, [sp, 96]
str w0, [sp, 80]
.L487:
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L486:
ldr x0, [sp, 104]
ldr w0, [x0, 1592]
ldr w1, [sp, 72]
cmp w1, w0
blt .L489
ldr w1, [sp, 76]
ldr w0, [sp, 84]
cmp w1, w0
bge .L490
ldr w0, [sp, 76]
str w0, [sp, 68]
b .L491
.L492:
ldrsw x0, [sp, 68]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
ldr s1, [x0]
adrp x0, inverse_db_table
add x0, x0, :lo12:inverse_db_table
ldrsw x1, [sp, 80]
ldr s0, [x0, x1, lsl 2]
ldrsw x0, [sp, 68]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
fmul s0, s1, s0
str s0, [x0]
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L491:
ldr w1, [sp, 68]
ldr w0, [sp, 84]
cmp w1, w0
blt .L492
.L490:
mov w0, 1
.L485:
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE64:
.size do_floor, .-do_floor
.section .rodata
.align 3
.LC20:
.string "f->alloc.alloc_buffer_length_in_bytes == f->temp_offset"
.text
.align 2
.type vorbis_decode_initial, %function
vorbis_decode_initial:
.LFB65:
.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 x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
str x5, [sp, 16]
ldr x0, [sp, 56]
str wzr, [x0, 1872]
ldr x0, [sp, 56]
ldr w1, [x0, 1872]
ldr x0, [sp, 56]
str w1, [x0, 1868]
.L494:
ldr x0, [sp, 56]
ldr w0, [x0, 128]
cmp w0, 0
beq .L495
mov w0, 0
b .L496
.L495:
ldr x0, [sp, 56]
bl maybe_start_packet
cmp w0, 0
bne .L497
mov w0, 0
b .L496
.L497:
mov w1, 1
ldr x0, [sp, 56]
bl get_bits
cmp w0, 0
beq .L498
ldr x0, [sp, 56]
ldrb w0, [x0, 68]
cmp w0, 0
beq .L510
mov w1, 35
ldr x0, [sp, 56]
bl error
b .L496
.L510:
nop
.L500:
ldr x0, [sp, 56]
bl get8_packet
cmn w0, #1
bne .L500
b .L494
.L498:
ldr x0, [sp, 56]
ldr x0, [x0, 104]
cmp x0, 0
beq .L501
ldr x0, [sp, 56]
ldr w1, [x0, 112]
ldr x0, [sp, 56]
ldr w0, [x0, 124]
cmp w1, w0
beq .L501
adrp x0, __PRETTY_FUNCTION__.8
add x3, x0, :lo12:__PRETTY_FUNCTION__.8
mov w2, 3121
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl __assert_fail
.L501:
ldr x0, [sp, 56]
ldr w0, [x0, 472]
sub w0, w0, #1
bl ilog
mov w1, w0
ldr x0, [sp, 56]
bl get_bits
str w0, [sp, 80]
ldr w0, [sp, 80]
cmn w0, #1
bne .L502
mov w0, 0
b .L496
.L502:
ldr x0, [sp, 56]
ldr w0, [x0, 472]
ldr w1, [sp, 80]
cmp w1, w0
blt .L503
mov w0, 0
b .L496
.L503:
ldr x0, [sp, 16]
ldr w1, [sp, 80]
str w1, [x0]
ldr x0, [sp, 56]
add x2, x0, 476
ldrsw x1, [sp, 80]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 1
add x0, x2, x0
str x0, [sp, 88]
ldr x0, [sp, 88]
ldrb w0, [x0]
cmp w0, 0
beq .L504
ldr x0, [sp, 56]
ldr w0, [x0, 148]
str w0, [sp, 68]
mov w1, 1
ldr x0, [sp, 56]
bl get_bits
str w0, [sp, 72]
mov w1, 1
ldr x0, [sp, 56]
bl get_bits
str w0, [sp, 76]
b .L505
.L504:
str wzr, [sp, 76]
ldr w0, [sp, 76]
str w0, [sp, 72]
ldr x0, [sp, 56]
ldr w0, [x0, 144]
str w0, [sp, 68]
.L505:
ldr w0, [sp, 68]
asr w0, w0, 1
str w0, [sp, 84]
ldr x0, [sp, 88]
ldrb w0, [x0]
cmp w0, 0
beq .L506
ldr w0, [sp, 72]
cmp w0, 0
bne .L506
ldr x0, [sp, 56]
ldr w0, [x0, 144]
ldr w1, [sp, 68]
sub w0, w1, w0
asr w1, w0, 2
ldr x0, [sp, 48]
str w1, [x0]
ldr x0, [sp, 56]
ldr w1, [x0, 144]
ldr w0, [sp, 68]
add w0, w1, w0
asr w1, w0, 2
ldr x0, [sp, 40]
str w1, [x0]
b .L507
.L506:
ldr x0, [sp, 48]
str wzr, [x0]
ldr x0, [sp, 40]
ldr w1, [sp, 84]
str w1, [x0]
.L507:
ldr x0, [sp, 88]
ldrb w0, [x0]
cmp w0, 0
beq .L508
ldr w0, [sp, 76]
cmp w0, 0
bne .L508
ldr w1, [sp, 68]
mov w0, w1
lsl w0, w0, 1
add w1, w0, w1
ldr x0, [sp, 56]
ldr w0, [x0, 144]
sub w0, w1, w0
asr w1, w0, 2
ldr x0, [sp, 32]
str w1, [x0]
ldr w1, [sp, 68]
mov w0, w1
lsl w0, w0, 1
add w1, w0, w1
ldr x0, [sp, 56]
ldr w0, [x0, 144]
add w0, w1, w0
asr w1, w0, 2
ldr x0, [sp, 24]
str w1, [x0]
b .L509
.L508:
ldr x0, [sp, 32]
ldr w1, [sp, 84]
str w1, [x0]
ldr x0, [sp, 24]
ldr w1, [sp, 68]
str w1, [x0]
.L509:
mov w0, 1
.L496:
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE65:
.size vorbis_decode_initial, .-vorbis_decode_initial
.align 2
.type vorbis_decode_packet_rest, %function
vorbis_decode_packet_rest:
.LFB66:
.cfi_startproc
sub sp, sp, #2688
.cfi_def_cfa_offset 2688
stp x29, x30, [sp]
.cfi_offset 29, -2688
.cfi_offset 30, -2680
mov x29, sp
str x0, [sp, 56]
str x1, [sp, 48]
str x2, [sp, 40]
str w3, [sp, 36]
str w4, [sp, 32]
str w5, [sp, 28]
str w6, [sp, 24]
str x7, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 2680]
mov x1, 0
ldr x0, [sp, 40]
ldrb w0, [x0]
ldr x1, [sp, 56]
sxtw x0, w0
add x0, x0, 32
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0, 8]
str w0, [sp, 108]
ldr x0, [sp, 56]
ldr x2, [x0, 464]
ldr x0, [sp, 40]
ldrb w0, [x0, 1]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 4
add x0, x2, x0
str x0, [sp, 192]
ldr w0, [sp, 108]
asr w0, w0, 1
str w0, [sp, 112]
str wzr, [sp, 68]
b .L512
.L544:
ldr x0, [sp, 192]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0, 2]
str w0, [sp, 128]
ldrsw x0, [sp, 68]
lsl x0, x0, 2
add x1, sp, 376
str wzr, [x1, x0]
ldr x1, [sp, 192]
ldrsw x0, [sp, 128]
add x0, x1, x0
ldrb w0, [x0, 17]
str w0, [sp, 132]
ldr x1, [sp, 56]
ldrsw x0, [sp, 132]
add x0, x0, 80
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 12]
cmp w0, 0
bne .L513
mov w1, 21
ldr x0, [sp, 56]
bl error
b .L586
.L513:
ldr x0, [sp, 56]
ldr x1, [x0, 304]
ldrsw x2, [sp, 132]
mov x0, 1596
mul x0, x2, x0
add x0, x1, x0
str x0, [sp, 216]
mov w1, 1
ldr x0, [sp, 56]
bl get_bits
cmp w0, 0
beq .L594
ldr x0, [sp, 216]
ldrb w0, [x0, 1588]
sub w1, w0, #1
adrp x0, range_list.7
add x0, x0, :lo12:range_list.7
sxtw x1, w1
ldr w0, [x0, x1, lsl 2]
str w0, [sp, 136]
mov w0, 2
str w0, [sp, 80]
ldr x1, [sp, 56]
ldrsw x0, [sp, 68]
add x0, x0, 156
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0, 8]
str x0, [sp, 224]
ldr w0, [sp, 136]
bl ilog
sub w0, w0, #1
mov w1, w0
ldr x0, [sp, 56]
bl get_bits
sxth w1, w0
ldr x0, [sp, 224]
strh w1, [x0]
ldr w0, [sp, 136]
bl ilog
sub w0, w0, #1
mov w1, w0
ldr x0, [sp, 56]
bl get_bits
mov w1, w0
ldr x0, [sp, 224]
add x0, x0, 2
sxth w1, w1
strh w1, [x0]
str wzr, [sp, 72]
b .L516
.L529:
ldr x1, [sp, 216]
ldrsw x0, [sp, 72]
add x0, x1, x0
ldrb w0, [x0, 1]
str w0, [sp, 164]
ldr x1, [sp, 216]
ldrsw x0, [sp, 164]
add x0, x1, x0
ldrb w0, [x0, 33]
str w0, [sp, 168]
ldr x1, [sp, 216]
ldrsw x0, [sp, 164]
add x0, x1, x0
ldrb w0, [x0, 49]
str w0, [sp, 172]
ldr w0, [sp, 172]
mov w1, 1
lsl w0, w1, w0
sub w0, w0, #1
str w0, [sp, 176]
str wzr, [sp, 84]
ldr w0, [sp, 172]
cmp w0, 0
beq .L517
ldr x0, [sp, 56]
ldr x2, [x0, 160]
ldr x1, [sp, 216]
ldrsw x0, [sp, 164]
add x0, x1, x0
ldrb w0, [x0, 65]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [sp, 232]
ldr x0, [sp, 56]
ldr w0, [x0, 1760]
cmp w0, 9
bgt .L518
ldr x0, [sp, 56]
bl prep_huffman
.L518:
ldr x0, [sp, 56]
ldr w0, [x0, 1756]
and w0, w0, 1023
str w0, [sp, 84]
ldr x0, [sp, 232]
ldrsw x1, [sp, 84]
add x1, x1, 24
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 84]
ldr w0, [sp, 84]
cmp w0, 0
blt .L519
ldr x0, [sp, 232]
ldr x1, [x0, 8]
ldrsw x0, [sp, 84]
add x0, x1, x0
ldrb w0, [x0]
str w0, [sp, 180]
ldr x0, [sp, 56]
ldr w1, [x0, 1756]
ldr w0, [sp, 180]
lsr w1, w1, w0
ldr x0, [sp, 56]
str w1, [x0, 1756]
ldr x0, [sp, 56]
ldr w1, [x0, 1760]
ldr w0, [sp, 180]
sub w1, w1, w0
ldr x0, [sp, 56]
str w1, [x0, 1760]
ldr x0, [sp, 56]
ldr w0, [x0, 1760]
cmp w0, 0
bge .L520
ldr x0, [sp, 56]
str wzr, [x0, 1760]
mov w0, -1
str w0, [sp, 84]
b .L520
.L519:
ldr x1, [sp, 232]
ldr x0, [sp, 56]
bl codebook_decode_scalar_raw
str w0, [sp, 84]
.L520:
ldr x0, [sp, 232]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L517
ldr x0, [sp, 232]
ldr x1, [x0, 2104]
ldrsw x0, [sp, 84]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 84]
.L517:
str wzr, [sp, 76]
b .L521
.L528:
ldr w1, [sp, 84]
ldr w0, [sp, 176]
and w0, w1, w0
ldr x1, [sp, 216]
sxtw x0, w0
ldrsw x2, [sp, 164]
lsl x2, x2, 3
add x0, x2, x0
add x0, x0, 40
lsl x0, x0, 1
add x0, x1, x0
ldrsh w0, [x0, 2]
str w0, [sp, 184]
ldr w0, [sp, 172]
ldr w1, [sp, 84]
asr w0, w1, w0
str w0, [sp, 84]
ldr w0, [sp, 184]
cmp w0, 0
blt .L522
ldr x0, [sp, 56]
ldr x2, [x0, 160]
ldrsw x1, [sp, 184]
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [sp, 240]
ldr x0, [sp, 56]
ldr w0, [x0, 1760]
cmp w0, 9
bgt .L523
ldr x0, [sp, 56]
bl prep_huffman
.L523:
ldr x0, [sp, 56]
ldr w0, [x0, 1756]
and w0, w0, 1023
str w0, [sp, 88]
ldr x0, [sp, 240]
ldrsw x1, [sp, 88]
add x1, x1, 24
ldrsh w0, [x0, x1, lsl 1]
str w0, [sp, 88]
ldr w0, [sp, 88]
cmp w0, 0
blt .L524
ldr x0, [sp, 240]
ldr x1, [x0, 8]
ldrsw x0, [sp, 88]
add x0, x1, x0
ldrb w0, [x0]
str w0, [sp, 188]
ldr x0, [sp, 56]
ldr w1, [x0, 1756]
ldr w0, [sp, 188]
lsr w1, w1, w0
ldr x0, [sp, 56]
str w1, [x0, 1756]
ldr x0, [sp, 56]
ldr w1, [x0, 1760]
ldr w0, [sp, 188]
sub w1, w1, w0
ldr x0, [sp, 56]
str w1, [x0, 1760]
ldr x0, [sp, 56]
ldr w0, [x0, 1760]
cmp w0, 0
bge .L525
ldr x0, [sp, 56]
str wzr, [x0, 1760]
mov w0, -1
str w0, [sp, 88]
b .L525
.L524:
ldr x1, [sp, 240]
ldr x0, [sp, 56]
bl codebook_decode_scalar_raw
str w0, [sp, 88]
.L525:
ldr x0, [sp, 240]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L526
ldr x0, [sp, 240]
ldr x1, [x0, 2104]
ldrsw x0, [sp, 88]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 88]
.L526:
ldr w0, [sp, 80]
add w1, w0, 1
str w1, [sp, 80]
sxtw x0, w0
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
ldr w1, [sp, 88]
sxth w1, w1
strh w1, [x0]
b .L527
.L522:
ldr w0, [sp, 80]
add w1, w0, 1
str w1, [sp, 80]
sxtw x0, w0
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
strh wzr, [x0]
.L527:
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L521:
ldr w1, [sp, 76]
ldr w0, [sp, 168]
cmp w1, w0
blt .L528
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L516:
ldr x0, [sp, 216]
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 72]
cmp w0, w1
blt .L529
ldr x0, [sp, 56]
ldr w0, [x0, 1760]
cmn w0, #1
beq .L595
mov w0, 1
strb w0, [sp, 2425]
ldrb w0, [sp, 2425]
strb w0, [sp, 2424]
mov w0, 2
str w0, [sp, 72]
b .L531
.L539:
ldr x1, [sp, 216]
ldrsw x0, [sp, 72]
add x0, x0, 544
lsl x0, x0, 1
add x0, x1, x0
ldrb w0, [x0]
str w0, [sp, 140]
ldr x1, [sp, 216]
ldrsw x0, [sp, 72]
lsl x0, x0, 1
add x0, x1, x0
ldrb w0, [x0, 1089]
str w0, [sp, 144]
ldr x1, [sp, 216]
ldrsw x0, [sp, 72]
add x0, x0, 168
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 2]
mov w5, w0
ldr x1, [sp, 216]
ldrsw x0, [sp, 140]
add x0, x0, 168
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 2]
mov w6, w0
ldr x1, [sp, 216]
ldrsw x0, [sp, 144]
add x0, x0, 168
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 2]
mov w2, w0
ldrsw x0, [sp, 140]
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
ldrsh w0, [x0]
mov w3, w0
ldrsw x0, [sp, 144]
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
ldrsh w0, [x0]
mov w4, w0
mov w1, w6
mov w0, w5
bl predict_point
str w0, [sp, 148]
ldrsw x0, [sp, 72]
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
ldrsh w0, [x0]
str w0, [sp, 152]
ldr w1, [sp, 136]
ldr w0, [sp, 148]
sub w0, w1, w0
str w0, [sp, 156]
ldr w0, [sp, 148]
str w0, [sp, 160]
ldr w1, [sp, 156]
ldr w0, [sp, 160]
cmp w1, w0
bge .L532
ldr w0, [sp, 156]
lsl w0, w0, 1
str w0, [sp, 92]
b .L533
.L532:
ldr w0, [sp, 160]
lsl w0, w0, 1
str w0, [sp, 92]
.L533:
ldr w0, [sp, 152]
cmp w0, 0
beq .L534
ldrsw x0, [sp, 144]
add x1, sp, 2424
mov w2, 1
strb w2, [x1, x0]
ldrsw x0, [sp, 144]
add x1, sp, 2424
ldrb w2, [x1, x0]
ldrsw x0, [sp, 140]
add x1, sp, 2424
strb w2, [x1, x0]
ldrsw x0, [sp, 72]
add x1, sp, 2424
mov w2, 1
strb w2, [x1, x0]
ldr w1, [sp, 152]
ldr w0, [sp, 92]
cmp w1, w0
blt .L535
ldr w1, [sp, 156]
ldr w0, [sp, 160]
cmp w1, w0
ble .L536
ldr w0, [sp, 152]
and w1, w0, 65535
ldr w0, [sp, 160]
and w0, w0, 65535
sub w0, w1, w0
and w1, w0, 65535
ldr w0, [sp, 148]
and w0, w0, 65535
add w0, w1, w0
and w2, w0, 65535
ldrsw x0, [sp, 72]
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
sxth w1, w2
strh w1, [x0]
b .L537
.L536:
ldr w0, [sp, 148]
and w1, w0, 65535
ldr w0, [sp, 152]
and w0, w0, 65535
sub w0, w1, w0
and w1, w0, 65535
ldr w0, [sp, 156]
and w0, w0, 65535
add w0, w1, w0
and w0, w0, 65535
sub w0, w0, #1
and w2, w0, 65535
ldrsw x0, [sp, 72]
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
sxth w1, w2
strh w1, [x0]
b .L537
.L535:
ldr w0, [sp, 152]
and w0, w0, 1
cmp w0, 0
beq .L538
ldr w0, [sp, 148]
and w1, w0, 65535
ldr w0, [sp, 152]
add w0, w0, 1
asr w0, w0, 1
and w0, w0, 65535
sub w0, w1, w0
and w2, w0, 65535
ldrsw x0, [sp, 72]
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
sxth w1, w2
strh w1, [x0]
b .L537
.L538:
ldr w0, [sp, 152]
asr w0, w0, 1
and w1, w0, 65535
ldr w0, [sp, 148]
and w0, w0, 65535
add w0, w1, w0
and w2, w0, 65535
ldrsw x0, [sp, 72]
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
sxth w1, w2
strh w1, [x0]
b .L537
.L534:
ldrsw x0, [sp, 72]
add x1, sp, 2424
strb wzr, [x1, x0]
ldrsw x0, [sp, 72]
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
ldr w1, [sp, 148]
sxth w1, w1
strh w1, [x0]
.L537:
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L531:
ldr x0, [sp, 216]
ldr w0, [x0, 1592]
ldr w1, [sp, 72]
cmp w1, w0
blt .L539
str wzr, [sp, 72]
b .L540
.L542:
ldrsw x0, [sp, 72]
add x1, sp, 2424
ldrb w0, [x1, x0]
cmp w0, 0
bne .L541
ldrsw x0, [sp, 72]
lsl x0, x0, 1
ldr x1, [sp, 224]
add x0, x1, x0
mov w1, -1
strh w1, [x0]
.L541:
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L540:
ldr x0, [sp, 216]
ldr w0, [x0, 1592]
ldr w1, [sp, 72]
cmp w1, w0
blt .L542
b .L543
.L594:
nop
b .L515
.L595:
nop
.L515:
ldrsw x0, [sp, 68]
lsl x0, x0, 2
add x1, sp, 376
mov w2, 1
str w2, [x1, x0]
.L543:
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L512:
ldr x0, [sp, 56]
ldr w0, [x0, 4]
ldr w1, [sp, 68]
cmp w1, w0
blt .L544
ldr x0, [sp, 56]
ldr x0, [x0, 104]
cmp x0, 0
beq .L545
ldr x0, [sp, 56]
ldr w1, [x0, 112]
ldr x0, [sp, 56]
ldr w0, [x0, 124]
cmp w1, w0
beq .L545
adrp x0, __PRETTY_FUNCTION__.6
add x3, x0, :lo12:__PRETTY_FUNCTION__.6
mov w2, 3270
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl __assert_fail
.L545:
ldr x0, [sp, 56]
ldr w0, [x0, 4]
sxtw x0, w0
lsl x2, x0, 2
add x1, sp, 376
add x0, sp, 1400
bl memcpy
str wzr, [sp, 68]
b .L546
.L549:
ldr x0, [sp, 192]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0]
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 376
ldr w0, [x1, x0]
cmp w0, 0
beq .L547
ldr x0, [sp, 192]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0, 1]
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 376
ldr w0, [x1, x0]
cmp w0, 0
bne .L548
.L547:
ldr x0, [sp, 192]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0, 1]
mov w3, w0
sxtw x0, w3
lsl x0, x0, 2
add x1, sp, 376
str wzr, [x1, x0]
ldr x0, [sp, 192]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0]
mov w4, w0
sxtw x0, w3
lsl x0, x0, 2
add x1, sp, 376
ldr w2, [x1, x0]
sxtw x0, w4
lsl x0, x0, 2
add x1, sp, 376
str w2, [x1, x0]
.L548:
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L546:
ldr x0, [sp, 192]
ldrh w0, [x0]
mov w1, w0
ldr w0, [sp, 68]
cmp w0, w1
blt .L549
str wzr, [sp, 68]
b .L550
.L556:
str wzr, [sp, 96]
str wzr, [sp, 72]
b .L551
.L555:
ldr x0, [sp, 192]
ldr x2, [x0, 8]
ldrsw x1, [sp, 72]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0, 2]
mov w1, w0
ldr w0, [sp, 68]
cmp w0, w1
bne .L552
ldrsw x0, [sp, 72]
lsl x0, x0, 2
add x1, sp, 376
ldr w0, [x1, x0]
cmp w0, 0
beq .L553
ldrsw x0, [sp, 96]
add x1, sp, 2424
mov w2, 1
strb w2, [x1, x0]
ldrsw x0, [sp, 96]
lsl x0, x0, 3
add x1, sp, 248
str xzr, [x1, x0]
b .L554
.L553:
ldrsw x0, [sp, 96]
add x1, sp, 2424
strb wzr, [x1, x0]
ldr x0, [sp, 56]
ldrsw x1, [sp, 72]
add x1, x1, 108
ldr x2, [x0, x1, lsl 3]
ldrsw x0, [sp, 96]
lsl x0, x0, 3
add x1, sp, 248
str x2, [x1, x0]
.L554:
ldr w0, [sp, 96]
add w0, w0, 1
str w0, [sp, 96]
.L552:
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L551:
ldr x0, [sp, 56]
ldr w0, [x0, 4]
ldr w1, [sp, 72]
cmp w1, w0
blt .L555
ldr x1, [sp, 192]
ldrsw x0, [sp, 68]
add x0, x1, x0
ldrb w0, [x0, 32]
str w0, [sp, 124]
add x1, sp, 2424
add x0, sp, 248
mov x5, x1
ldr w4, [sp, 124]
ldr w3, [sp, 112]
ldr w2, [sp, 96]
mov x1, x0
ldr x0, [sp, 56]
bl decode_residue
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L550:
ldr x0, [sp, 192]
ldrb w0, [x0, 16]
mov w1, w0
ldr w0, [sp, 68]
cmp w0, w1
blt .L556
ldr x0, [sp, 56]
ldr x0, [x0, 104]
cmp x0, 0
beq .L557
ldr x0, [sp, 56]
ldr w1, [x0, 112]
ldr x0, [sp, 56]
ldr w0, [x0, 124]
cmp w1, w0
beq .L557
adrp x0, __PRETTY_FUNCTION__.6
add x3, x0, :lo12:__PRETTY_FUNCTION__.6
mov w2, 3303
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl __assert_fail
.L557:
ldr x0, [sp, 192]
ldrh w0, [x0]
sub w0, w0, #1
str w0, [sp, 68]
b .L558
.L568:
ldr w0, [sp, 108]
asr w0, w0, 1
str w0, [sp, 120]
ldr x0, [sp, 192]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0]
mov w1, w0
ldr x0, [sp, 56]
sxtw x1, w1
add x1, x1, 108
ldr x0, [x0, x1, lsl 3]
str x0, [sp, 200]
ldr x0, [sp, 192]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0, 1]
mov w1, w0
ldr x0, [sp, 56]
sxtw x1, w1
add x1, x1, 108
ldr x0, [x0, x1, lsl 3]
str x0, [sp, 208]
str wzr, [sp, 72]
b .L559
.L567:
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s0, [x0]
fcmpe s0, #0.0
bgt .L588
b .L591
.L588:
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
ldr s0, [x0]
fcmpe s0, #0.0
bgt .L589
b .L592
.L589:
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 104]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s1, [x0]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 100]
b .L564
.L592:
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 100]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s1, [x0]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
ldr s0, [x0]
fadd s0, s1, s0
str s0, [sp, 104]
b .L564
.L591:
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
ldr s0, [x0]
fcmpe s0, #0.0
bgt .L590
b .L593
.L590:
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 104]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s1, [x0]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
ldr s0, [x0]
fadd s0, s1, s0
str s0, [sp, 100]
b .L564
.L593:
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 100]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s1, [x0]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
ldr s0, [x0]
fsub s0, s1, s0
str s0, [sp, 104]
.L564:
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 200]
add x0, x1, x0
ldr s0, [sp, 104]
str s0, [x0]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
ldr x1, [sp, 208]
add x0, x1, x0
ldr s0, [sp, 100]
str s0, [x0]
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L559:
ldr w1, [sp, 72]
ldr w0, [sp, 120]
cmp w1, w0
blt .L567
ldr w0, [sp, 68]
sub w0, w0, #1
str w0, [sp, 68]
.L558:
ldr w0, [sp, 68]
cmp w0, 0
bge .L568
str wzr, [sp, 68]
b .L569
.L572:
ldrsw x0, [sp, 68]
lsl x0, x0, 2
add x1, sp, 1400
ldr w0, [x1, x0]
cmp w0, 0
beq .L570
ldr x0, [sp, 56]
ldrsw x1, [sp, 68]
add x1, x1, 108
ldr x3, [x0, x1, lsl 3]
ldrsw x0, [sp, 112]
lsl x0, x0, 2
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
b .L571
.L570:
ldr x0, [sp, 56]
ldrsw x1, [sp, 68]
add x1, x1, 108
ldr x2, [x0, x1, lsl 3]
ldr x1, [sp, 56]
ldrsw x0, [sp, 68]
add x0, x0, 156
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0, 8]
mov x6, 0
mov x5, x0
mov x4, x2
ldr w3, [sp, 108]
ldr w2, [sp, 68]
ldr x1, [sp, 192]
ldr x0, [sp, 56]
bl do_floor
.L571:
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L569:
ldr x0, [sp, 56]
ldr w0, [x0, 4]
ldr w1, [sp, 68]
cmp w1, w0
blt .L572
str wzr, [sp, 68]
b .L573
.L574:
ldr x0, [sp, 56]
ldrsw x1, [sp, 68]
add x1, x1, 108
ldr x4, [x0, x1, lsl 3]
ldr x0, [sp, 40]
ldrb w0, [x0]
mov w3, w0
ldr x2, [sp, 56]
ldr w1, [sp, 108]
mov x0, x4
bl inverse_mdct
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L573:
ldr x0, [sp, 56]
ldr w0, [x0, 4]
ldr w1, [sp, 68]
cmp w1, w0
blt .L574
ldr x0, [sp, 56]
bl flush_packet
ldr x0, [sp, 56]
ldrb w0, [x0, 1741]
cmp w0, 0
beq .L575
ldr w0, [sp, 112]
neg w0, w0
mov w1, w0
ldr x0, [sp, 56]
str w1, [x0, 1384]
ldr w1, [sp, 108]
ldr w0, [sp, 24]
sub w1, w1, w0
ldr x0, [sp, 56]
str w1, [x0, 1776]
ldr x0, [sp, 56]
mov w1, 1
str w1, [x0, 1388]
ldr x0, [sp, 56]
strb wzr, [x0, 1741]
b .L576
.L575:
ldr x0, [sp, 56]
ldr w0, [x0, 1776]
cmp w0, 0
beq .L577
ldr x0, [sp, 56]
ldr w1, [x0, 1776]
ldr w2, [sp, 28]
ldr w0, [sp, 36]
sub w0, w2, w0
cmp w1, w0
blt .L578
ldr x0, [sp, 56]
ldr w1, [x0, 1776]
ldr w2, [sp, 28]
ldr w0, [sp, 36]
sub w0, w2, w0
sub w1, w1, w0
ldr x0, [sp, 56]
str w1, [x0, 1776]
ldr w0, [sp, 28]
str w0, [sp, 36]
ldr x0, [sp, 16]
ldr w1, [sp, 36]
str w1, [x0]
b .L576
.L578:
ldr x0, [sp, 56]
ldr w0, [x0, 1776]
ldr w1, [sp, 36]
add w0, w1, w0
str w0, [sp, 36]
ldr x0, [sp, 16]
ldr w1, [sp, 36]
str w1, [x0]
ldr x0, [sp, 56]
str wzr, [x0, 1776]
b .L576
.L577:
ldr x0, [sp, 56]
ldr w0, [x0, 1248]
cmp w0, 0
.L576:
ldr x0, [sp, 56]
ldr w1, [x0, 1752]
ldr x0, [sp, 56]
ldr w0, [x0, 1768]
cmp w1, w0
bne .L579
ldr x0, [sp, 56]
ldr w0, [x0, 1388]
cmp w0, 0
beq .L580
ldr x0, [sp, 56]
ldrb w0, [x0, 1739]
and w0, w0, 4
cmp w0, 0
beq .L580
ldr x0, [sp, 56]
ldr w0, [x0, 1772]
ldr w2, [sp, 108]
ldr w1, [sp, 24]
sub w1, w2, w1
sub w0, w0, w1
str w0, [sp, 116]
ldr x0, [sp, 56]
ldr w0, [x0, 1384]
ldr w2, [sp, 24]
ldr w1, [sp, 36]
sub w1, w2, w1
add w0, w0, w1
ldr w1, [sp, 116]
cmp w1, w0
bcs .L580
ldr x0, [sp, 56]
ldr w0, [x0, 1384]
ldr w1, [sp, 116]
cmp w1, w0
bcs .L581
ldr x0, [sp, 48]
str wzr, [x0]
b .L582
.L581:
ldr x0, [sp, 56]
ldr w0, [x0, 1384]
ldr w1, [sp, 116]
sub w0, w1, w0
mov w1, w0
ldr x0, [sp, 48]
str w1, [x0]
.L582:
ldr x0, [sp, 48]
ldr w1, [x0]
ldr w0, [sp, 36]
add w1, w1, w0
ldr x0, [sp, 48]
str w1, [x0]
ldr x0, [sp, 48]
ldr w0, [x0]
ldr w1, [sp, 24]
cmp w1, w0
bge .L583
ldr x0, [sp, 48]
ldr w1, [sp, 24]
str w1, [x0]
.L583:
ldr x0, [sp, 56]
ldr w0, [x0, 1384]
ldr x1, [sp, 48]
ldr w1, [x1]
add w1, w0, w1
ldr x0, [sp, 56]
str w1, [x0, 1384]
mov w0, 1
b .L586
.L580:
ldr x0, [sp, 56]
ldr w0, [x0, 1772]
ldr w2, [sp, 112]
ldr w1, [sp, 36]
sub w1, w2, w1
sub w1, w0, w1
ldr x0, [sp, 56]
str w1, [x0, 1384]
ldr x0, [sp, 56]
mov w1, 1
str w1, [x0, 1388]
.L579:
ldr x0, [sp, 56]
ldr w0, [x0, 1388]
cmp w0, 0
beq .L584
ldr x0, [sp, 56]
ldr w0, [x0, 1384]
ldr w2, [sp, 28]
ldr w1, [sp, 36]
sub w1, w2, w1
add w1, w0, w1
ldr x0, [sp, 56]
str w1, [x0, 1384]
.L584:
ldr x0, [sp, 56]
ldr x0, [x0, 104]
cmp x0, 0
beq .L585
ldr x0, [sp, 56]
ldr w1, [x0, 112]
ldr x0, [sp, 56]
ldr w0, [x0, 124]
cmp w1, w0
beq .L585
adrp x0, __PRETTY_FUNCTION__.6
add x3, x0, :lo12:__PRETTY_FUNCTION__.6
mov w2, 3419
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl __assert_fail
.L585:
ldr x0, [sp, 48]
ldr w1, [sp, 24]
str w1, [x0]
mov w0, 1
.L586:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 2680]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L587
bl __stack_chk_fail
.L587:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 2688
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE66:
.size vorbis_decode_packet_rest, .-vorbis_decode_packet_rest
.align 2
.type vorbis_decode_packet, %function
vorbis_decode_packet:
.LFB67:
.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]
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 x2, sp, 60
add x1, sp, 68
add x0, sp, 64
mov x5, x2
mov x4, x1
ldr x3, [sp, 16]
mov x2, x0
ldr x1, [sp, 24]
ldr x0, [sp, 40]
bl vorbis_decode_initial
cmp w0, 0
bne .L597
mov w0, 0
b .L599
.L597:
ldr x0, [sp, 40]
add x2, x0, 476
ldr w0, [sp, 60]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 1
add x1, x2, x0
ldr x0, [sp, 24]
ldr w2, [x0]
ldr w3, [sp, 64]
ldr x0, [sp, 16]
ldr w0, [x0]
ldr w4, [sp, 68]
ldr x7, [sp, 24]
mov w6, w4
mov w5, w0
mov w4, w3
mov w3, w2
mov x2, x1
ldr x1, [sp, 32]
ldr x0, [sp, 40]
bl vorbis_decode_packet_rest
.L599:
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 .L600
bl __stack_chk_fail
.L600:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE67:
.size vorbis_decode_packet, .-vorbis_decode_packet
.align 2
.type vorbis_finish_frame, %function
vorbis_finish_frame:
.LFB68:
.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 w2, [sp, 32]
str w3, [sp, 28]
ldr x0, [sp, 40]
ldr w0, [x0, 1248]
cmp w0, 0
beq .L602
ldr x0, [sp, 40]
ldr w0, [x0, 1248]
str w0, [sp, 64]
ldr w1, [sp, 64]
ldr x0, [sp, 40]
bl get_window
str x0, [sp, 72]
str wzr, [sp, 56]
b .L603
.L606:
str wzr, [sp, 60]
b .L604
.L605:
ldr x0, [sp, 40]
ldrsw x1, [sp, 56]
add x1, x1, 108
ldr x1, [x0, x1, lsl 3]
ldr w2, [sp, 32]
ldr w0, [sp, 60]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s1, [x0]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 72]
add x0, x1, x0
ldr s0, [x0]
fmul s1, s1, s0
ldr x0, [sp, 40]
ldrsw x1, [sp, 56]
add x1, x1, 140
ldr x1, [x0, x1, lsl 3]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x0, x1, x0
ldr s2, [x0]
ldr w0, [sp, 64]
sub w1, w0, #1
ldr w0, [sp, 60]
sub w0, w1, w0
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [sp, 72]
add x0, x1, x0
ldr s0, [x0]
fmul s0, s2, s0
ldr x0, [sp, 40]
ldrsw x1, [sp, 56]
add x1, x1, 108
ldr x1, [x0, x1, lsl 3]
ldr w2, [sp, 32]
ldr w0, [sp, 60]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
fadd s0, s1, s0
str s0, [x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L604:
ldr w1, [sp, 60]
ldr w0, [sp, 64]
cmp w1, w0
blt .L605
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L603:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
ldr w1, [sp, 56]
cmp w1, w0
blt .L606
.L602:
ldr x0, [sp, 40]
ldr w0, [x0, 1248]
str w0, [sp, 68]
ldr w1, [sp, 36]
ldr w0, [sp, 28]
sub w1, w1, w0
ldr x0, [sp, 40]
str w1, [x0, 1248]
str wzr, [sp, 48]
b .L607
.L610:
str wzr, [sp, 52]
b .L608
.L609:
ldr x0, [sp, 40]
ldrsw x1, [sp, 48]
add x1, x1, 108
ldr x1, [x0, x1, lsl 3]
ldr w2, [sp, 28]
ldr w0, [sp, 52]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x1, x1, x0
ldr x0, [sp, 40]
ldrsw x2, [sp, 48]
add x2, x2, 140
ldr x2, [x0, x2, lsl 3]
ldrsw x0, [sp, 52]
lsl x0, x0, 2
add x0, x2, x0
ldr s0, [x1]
str s0, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L608:
ldr w1, [sp, 28]
ldr w0, [sp, 52]
add w0, w1, w0
ldr w1, [sp, 36]
cmp w1, w0
bgt .L609
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L607:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
ldr w1, [sp, 48]
cmp w1, w0
blt .L610
ldr w0, [sp, 68]
cmp w0, 0
bne .L611
mov w0, 0
b .L612
.L611:
ldr w1, [sp, 36]
ldr w0, [sp, 28]
cmp w1, w0
bge .L613
ldr w0, [sp, 36]
str w0, [sp, 28]
.L613:
ldr x0, [sp, 40]
ldr w0, [x0, 1780]
ldr w2, [sp, 28]
ldr w1, [sp, 32]
sub w1, w2, w1
add w1, w0, w1
ldr x0, [sp, 40]
str w1, [x0, 1780]
ldr w1, [sp, 28]
ldr w0, [sp, 32]
sub w0, w1, w0
.L612:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE68:
.size vorbis_finish_frame, .-vorbis_finish_frame
.align 2
.type vorbis_pump_first_frame, %function
vorbis_pump_first_frame:
.LFB69:
.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
add x2, sp, 48
add x1, sp, 52
add x0, sp, 44
mov x3, x2
mov x2, x1
mov x1, x0
ldr x0, [sp, 24]
bl vorbis_decode_packet
cmp w0, 0
beq .L617
ldr w0, [sp, 44]
ldr w1, [sp, 52]
ldr w2, [sp, 48]
mov w3, w2
mov w2, w1
mov w1, w0
ldr x0, [sp, 24]
bl vorbis_finish_frame
.L617:
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 .L616
bl __stack_chk_fail
.L616:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE69:
.size vorbis_pump_first_frame, .-vorbis_pump_first_frame
.align 2
.type is_whole_packet_present, %function
is_whole_packet_present:
.LFB70:
.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]
ldr x0, [sp, 24]
ldr w0, [x0, 1744]
str w0, [sp, 36]
mov w0, 1
str w0, [sp, 40]
ldr x0, [sp, 24]
ldr x0, [x0, 40]
str x0, [sp, 48]
ldr w0, [sp, 36]
cmn w0, #1
beq .L628
b .L620
.L623:
ldr x1, [sp, 24]
ldrsw x0, [sp, 36]
add x0, x1, x0
ldrb w0, [x0, 1484]
and x0, x0, 255
ldr x1, [sp, 48]
add x0, x1, x0
str x0, [sp, 48]
ldr x1, [sp, 24]
ldrsw x0, [sp, 36]
add x0, x1, x0
ldrb w0, [x0, 1484]
cmp w0, 255
bne .L643
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L620:
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
ldr w1, [sp, 36]
cmp w1, w0
blt .L623
b .L622
.L643:
nop
.L622:
ldr w0, [sp, 20]
cmp w0, 0
beq .L624
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
sub w0, w0, #1
ldr w1, [sp, 36]
cmp w1, w0
bge .L624
mov w1, 21
ldr x0, [sp, 24]
bl error
b .L625
.L624:
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
ldr w1, [sp, 36]
cmp w1, w0
bne .L626
mov w0, -1
str w0, [sp, 36]
.L626:
ldr x0, [sp, 24]
ldr x0, [x0, 56]
ldr x1, [sp, 48]
cmp x1, x0
bls .L627
mov w1, 1
ldr x0, [sp, 24]
bl error
b .L625
.L627:
str wzr, [sp, 40]
b .L628
.L642:
ldr x0, [sp, 48]
add x1, x0, 26
ldr x0, [sp, 24]
ldr x0, [x0, 56]
cmp x1, x0
bcc .L629
mov w1, 1
ldr x0, [sp, 24]
bl error
b .L625
.L629:
mov x2, 4
adrp x0, ogg_page_header
add x1, x0, :lo12:ogg_page_header
ldr x0, [sp, 48]
bl memcmp
cmp w0, 0
beq .L630
mov w1, 21
ldr x0, [sp, 24]
bl error
b .L625
.L630:
ldr x0, [sp, 48]
add x0, x0, 4
ldrb w0, [x0]
cmp w0, 0
beq .L631
mov w1, 21
ldr x0, [sp, 24]
bl error
b .L625
.L631:
ldr w0, [sp, 40]
cmp w0, 0
beq .L632
ldr x0, [sp, 24]
ldr w0, [x0, 1248]
cmp w0, 0
beq .L633
ldr x0, [sp, 48]
add x0, x0, 5
ldrb w0, [x0]
and w0, w0, 1
cmp w0, 0
beq .L633
mov w1, 21
ldr x0, [sp, 24]
bl error
b .L625
.L632:
ldr x0, [sp, 48]
add x0, x0, 5
ldrb w0, [x0]
and w0, w0, 1
cmp w0, 0
bne .L633
mov w1, 21
ldr x0, [sp, 24]
bl error
b .L625
.L633:
ldr x0, [sp, 48]
add x0, x0, 26
ldrb w0, [x0]
str w0, [sp, 44]
ldr x0, [sp, 48]
add x0, x0, 27
str x0, [sp, 56]
ldrsw x0, [sp, 44]
ldr x1, [sp, 56]
add x0, x1, x0
str x0, [sp, 48]
ldr x0, [sp, 24]
ldr x0, [x0, 56]
ldr x1, [sp, 48]
cmp x1, x0
bls .L634
mov w1, 1
ldr x0, [sp, 24]
bl error
b .L625
.L634:
str wzr, [sp, 36]
b .L635
.L638:
ldrsw x0, [sp, 36]
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0]
and x0, x0, 255
ldr x1, [sp, 48]
add x0, x1, x0
str x0, [sp, 48]
ldrsw x0, [sp, 36]
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 255
bne .L644
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L635:
ldr w1, [sp, 36]
ldr w0, [sp, 44]
cmp w1, w0
blt .L638
b .L637
.L644:
nop
.L637:
ldr w0, [sp, 20]
cmp w0, 0
beq .L639
ldr w0, [sp, 44]
sub w0, w0, #1
ldr w1, [sp, 36]
cmp w1, w0
bge .L639
mov w1, 21
ldr x0, [sp, 24]
bl error
b .L625
.L639:
ldr w1, [sp, 36]
ldr w0, [sp, 44]
cmp w1, w0
bne .L640
mov w0, -1
str w0, [sp, 36]
.L640:
ldr x0, [sp, 24]
ldr x0, [x0, 56]
ldr x1, [sp, 48]
cmp x1, x0
bls .L641
mov w1, 1
ldr x0, [sp, 24]
bl error
b .L625
.L641:
str wzr, [sp, 40]
.L628:
ldr w0, [sp, 36]
cmn w0, #1
beq .L642
mov w0, 1
.L625:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE70:
.size is_whole_packet_present, .-is_whole_packet_present
.section .rodata
.align 3
.LC21:
.string "f->temp_offset == f->alloc.alloc_buffer_length_in_bytes"
.text
.align 2
.type start_decoder, %function
start_decoder:
.LFB71:
.cfi_startproc
sub sp, sp, #1376
.cfi_def_cfa_offset 1376
stp x29, x30, [sp]
.cfi_offset 29, -1376
.cfi_offset 30, -1368
mov x29, sp
str x19, [sp, 16]
.cfi_offset 19, -1360
str x0, [sp, 40]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 1368]
mov x1, 0
str wzr, [sp, 72]
str wzr, [sp, 76]
ldr x0, [sp, 40]
bl start_page
cmp w0, 0
bne .L646
mov w0, 0
b .L847
.L646:
ldr x0, [sp, 40]
ldrb w0, [x0, 1739]
and w0, w0, 2
cmp w0, 0
bne .L648
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L648:
ldr x0, [sp, 40]
ldrb w0, [x0, 1739]
and w0, w0, 4
cmp w0, 0
beq .L649
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L649:
ldr x0, [sp, 40]
ldrb w0, [x0, 1739]
and w0, w0, 1
cmp w0, 0
beq .L650
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L650:
ldr x0, [sp, 40]
ldr w0, [x0, 1480]
cmp w0, 1
beq .L651
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L651:
ldr x0, [sp, 40]
ldrb w0, [x0, 1484]
cmp w0, 30
beq .L652
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L652:
ldr x0, [sp, 40]
bl get8
and w0, w0, 255
cmp w0, 1
beq .L653
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L653:
add x0, sp, 1296
mov w2, 6
mov x1, x0
ldr x0, [sp, 40]
bl getn
cmp w0, 0
bne .L654
mov w1, 10
ldr x0, [sp, 40]
bl error
b .L847
.L654:
add x0, sp, 1296
bl vorbis_validate
cmp w0, 0
bne .L655
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L655:
ldr x0, [sp, 40]
bl get32
cmp w0, 0
beq .L656
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L656:
ldr x0, [sp, 40]
bl get8
and w0, w0, 255
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0, 4]
ldr x0, [sp, 40]
ldr w0, [x0, 4]
cmp w0, 0
bne .L657
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L657:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
cmp w0, 16
ble .L658
mov w1, 5
ldr x0, [sp, 40]
bl error
b .L847
.L658:
ldr x0, [sp, 40]
bl get32
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0]
ldr x0, [sp, 40]
ldr w0, [x0]
cmp w0, 0
bne .L659
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L659:
ldr x0, [sp, 40]
bl get32
ldr x0, [sp, 40]
bl get32
ldr x0, [sp, 40]
bl get32
ldr x0, [sp, 40]
bl get8
strb w0, [sp, 49]
ldrb w0, [sp, 49]
and w0, w0, 15
str w0, [sp, 124]
ldrb w0, [sp, 49]
lsr w0, w0, 4
and w0, w0, 255
str w0, [sp, 128]
ldr w0, [sp, 124]
mov w1, 1
lsl w1, w1, w0
ldr x0, [sp, 40]
str w1, [x0, 144]
ldr w0, [sp, 128]
mov w1, 1
lsl w1, w1, w0
ldr x0, [sp, 40]
str w1, [x0, 148]
ldr w0, [sp, 124]
cmp w0, 5
ble .L660
ldr w0, [sp, 124]
cmp w0, 13
ble .L661
.L660:
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L661:
ldr w0, [sp, 128]
cmp w0, 5
ble .L662
ldr w0, [sp, 128]
cmp w0, 13
ble .L663
.L662:
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L663:
ldr w1, [sp, 124]
ldr w0, [sp, 128]
cmp w1, w0
ble .L664
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L664:
ldr x0, [sp, 40]
bl get8
strb w0, [sp, 49]
ldrb w0, [sp, 49]
and w0, w0, 1
cmp w0, 0
bne .L665
mov w1, 34
ldr x0, [sp, 40]
bl error
b .L847
.L665:
ldr x0, [sp, 40]
bl start_page
cmp w0, 0
bne .L666
mov w0, 0
b .L847
.L666:
ldr x0, [sp, 40]
bl start_packet
cmp w0, 0
bne .L667
mov w0, 0
b .L847
.L667:
ldr x0, [sp, 40]
bl next_segment
str w0, [sp, 132]
ldr w1, [sp, 132]
ldr x0, [sp, 40]
bl skip
ldr x0, [sp, 40]
strb wzr, [x0, 1740]
ldr w0, [sp, 132]
cmp w0, 0
bne .L667
ldr x0, [sp, 40]
bl start_packet
cmp w0, 0
bne .L668
mov w0, 0
b .L847
.L668:
ldr x0, [sp, 40]
ldrb w0, [x0, 68]
cmp w0, 0
beq .L669
mov w1, 1
ldr x0, [sp, 40]
bl is_whole_packet_present
cmp w0, 0
bne .L669
ldr x0, [sp, 40]
ldr w0, [x0, 132]
cmp w0, 21
bne .L670
ldr x0, [sp, 40]
mov w1, 20
str w1, [x0, 132]
.L670:
mov w0, 0
b .L847
.L669:
bl crc32_init
ldr x0, [sp, 40]
bl get8_packet
cmp w0, 5
beq .L671
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L671:
str wzr, [sp, 60]
b .L672
.L673:
ldr x0, [sp, 40]
bl get8_packet
and w2, w0, 255
ldrsw x0, [sp, 60]
add x1, sp, 1296
strb w2, [x1, x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L672:
ldr w0, [sp, 60]
cmp w0, 5
ble .L673
add x0, sp, 1296
bl vorbis_validate
cmp w0, 0
bne .L674
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L674:
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
add w0, w0, 1
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0, 152]
ldr x0, [sp, 40]
ldr w0, [x0, 152]
sxtw x0, w0
mov w1, w0
mov w0, 2120
mul w0, w1, w0
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 40]
str x1, [x0, 160]
ldr x0, [sp, 40]
ldr x0, [x0, 160]
cmp x0, 0
bne .L675
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L675:
ldr x0, [sp, 40]
ldr x3, [x0, 160]
ldr x0, [sp, 40]
ldr w0, [x0, 152]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
str wzr, [sp, 60]
b .L676
.L748:
str wzr, [sp, 84]
ldr x0, [sp, 40]
ldr x2, [x0, 160]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [sp, 280]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
strb w0, [sp, 49]
ldrb w0, [sp, 49]
cmp w0, 66
beq .L677
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L677:
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
strb w0, [sp, 49]
ldrb w0, [sp, 49]
cmp w0, 67
beq .L678
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L678:
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
strb w0, [sp, 49]
ldrb w0, [sp, 49]
cmp w0, 86
beq .L679
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L679:
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
strb w0, [sp, 49]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
lsl w1, w0, 8
ldrb w0, [sp, 49]
add w0, w1, w0
mov w1, w0
ldr x0, [sp, 280]
str w1, [x0]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
strb w0, [sp, 49]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
strb w0, [sp, 51]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
lsl w0, w0, 16
ldrb w1, [sp, 51]
lsl w1, w1, 8
add w1, w0, w1
ldrb w0, [sp, 49]
add w0, w1, w0
mov w1, w0
ldr x0, [sp, 280]
str w1, [x0, 4]
mov w1, 1
ldr x0, [sp, 40]
bl get_bits
str w0, [sp, 168]
ldr w0, [sp, 168]
cmp w0, 0
bne .L680
mov w1, 1
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
b .L681
.L680:
mov w1, 0
.L681:
ldr x0, [sp, 280]
strb w1, [x0, 27]
ldr x0, [sp, 280]
ldr w0, [x0]
cmp w0, 0
bne .L682
ldr x0, [sp, 280]
ldr w0, [x0, 4]
cmp w0, 0
beq .L682
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L682:
ldr x0, [sp, 280]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L683
ldr x0, [sp, 280]
ldr w0, [x0, 4]
mov w1, w0
ldr x0, [sp, 40]
bl setup_temp_malloc
str x0, [sp, 224]
b .L684
.L683:
ldr x0, [sp, 280]
ldr w0, [x0, 4]
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 8]
ldr x0, [sp, 280]
ldr x0, [x0, 8]
str x0, [sp, 224]
.L684:
ldr x0, [sp, 224]
cmp x0, 0
bne .L685
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L685:
ldr w0, [sp, 168]
cmp w0, 0
beq .L686
str wzr, [sp, 88]
mov w1, 5
ldr x0, [sp, 40]
bl get_bits
add w0, w0, 1
str w0, [sp, 92]
b .L687
.L689:
ldr x0, [sp, 280]
ldr w1, [x0, 4]
ldr w0, [sp, 88]
sub w0, w1, w0
str w0, [sp, 176]
ldr w0, [sp, 176]
bl ilog
mov w1, w0
ldr x0, [sp, 40]
bl get_bits
str w0, [sp, 180]
ldr w1, [sp, 88]
ldr w0, [sp, 180]
add w1, w1, w0
ldr x0, [sp, 280]
ldr w0, [x0, 4]
cmp w1, w0
ble .L688
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L688:
ldrsw x0, [sp, 88]
ldr x1, [sp, 224]
add x0, x1, x0
ldrsw x1, [sp, 180]
mov x2, x1
ldr w1, [sp, 92]
bl memset
ldr w1, [sp, 88]
ldr w0, [sp, 180]
add w0, w1, w0
str w0, [sp, 88]
ldr w0, [sp, 92]
add w0, w0, 1
str w0, [sp, 92]
.L687:
ldr x0, [sp, 280]
ldr w0, [x0, 4]
ldr w1, [sp, 88]
cmp w1, w0
blt .L689
b .L690
.L686:
str wzr, [sp, 64]
b .L691
.L696:
ldr x0, [sp, 280]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L692
mov w1, 1
ldr x0, [sp, 40]
bl get_bits
b .L693
.L692:
mov w0, 1
.L693:
str w0, [sp, 172]
ldr w0, [sp, 172]
cmp w0, 0
beq .L694
mov w1, 5
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldrsw x0, [sp, 64]
ldr x2, [sp, 224]
add x0, x2, x0
add w1, w1, 1
and w1, w1, 255
strb w1, [x0]
ldr w0, [sp, 84]
add w0, w0, 1
str w0, [sp, 84]
ldrsw x0, [sp, 64]
ldr x1, [sp, 224]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 32
bne .L695
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L694:
ldrsw x0, [sp, 64]
ldr x1, [sp, 224]
add x0, x1, x0
mov w1, -1
strb w1, [x0]
.L695:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L691:
ldr x0, [sp, 280]
ldr w0, [x0, 4]
ldr w1, [sp, 64]
cmp w1, w0
blt .L696
.L690:
ldr x0, [sp, 280]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L697
ldr x0, [sp, 280]
ldr w0, [x0, 4]
asr w0, w0, 2
ldr w1, [sp, 84]
cmp w1, w0
blt .L697
ldr x0, [sp, 280]
ldr w0, [x0, 4]
ldr x1, [sp, 40]
ldr w1, [x1, 16]
cmp w0, w1
ble .L698
ldr x0, [sp, 280]
ldr w0, [x0, 4]
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0, 16]
.L698:
ldr x0, [sp, 280]
ldr w0, [x0, 4]
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 8]
ldr x0, [sp, 280]
ldr x0, [x0, 8]
cmp x0, 0
bne .L699
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L699:
ldr x0, [sp, 280]
ldr x3, [x0, 8]
ldr x0, [sp, 280]
ldr w0, [x0, 4]
sxtw x0, w0
mov x2, x0
ldr x1, [sp, 224]
mov x0, x3
bl memcpy
ldr x0, [sp, 280]
ldr w0, [x0, 4]
mov w2, w0
ldr x1, [sp, 224]
ldr x0, [sp, 40]
bl setup_temp_free
ldr x0, [sp, 280]
ldr x0, [x0, 8]
str x0, [sp, 224]
ldr x0, [sp, 280]
strb wzr, [x0, 27]
.L697:
ldr x0, [sp, 280]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L700
ldr w0, [sp, 84]
str w0, [sp, 80]
b .L701
.L700:
str wzr, [sp, 80]
str wzr, [sp, 64]
b .L702
.L704:
ldrsw x0, [sp, 64]
ldr x1, [sp, 224]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 10
bls .L703
ldrsw x0, [sp, 64]
ldr x1, [sp, 224]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 255
beq .L703
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L703:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L702:
ldr x0, [sp, 280]
ldr w0, [x0, 4]
ldr w1, [sp, 64]
cmp w1, w0
blt .L704
.L701:
ldr x0, [sp, 280]
ldr w1, [sp, 80]
str w1, [x0, 2112]
str xzr, [sp, 216]
ldr x0, [sp, 280]
ldrb w0, [x0, 27]
cmp w0, 0
bne .L705
ldr x0, [sp, 280]
ldr w0, [x0, 4]
sxtw x0, w0
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 40]
ldr x0, [sp, 280]
ldr x0, [x0, 40]
cmp x0, 0
bne .L706
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L705:
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
cmp w0, 0
beq .L707
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 8]
ldr x0, [sp, 280]
ldr x0, [x0, 8]
cmp x0, 0
bne .L708
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L708:
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
sxtw x0, w0
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 40]
bl setup_temp_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 40]
ldr x0, [sp, 280]
ldr x0, [x0, 40]
cmp x0, 0
bne .L709
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L709:
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
sxtw x0, w0
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 40]
bl setup_temp_malloc
str x0, [sp, 216]
ldr x0, [sp, 216]
cmp x0, 0
bne .L707
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L707:
ldr x0, [sp, 280]
ldr w0, [x0, 4]
mov w1, w0
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
sxtw x0, w0
lsl w0, w0, 3
add w0, w1, w0
str w0, [sp, 184]
ldr x0, [sp, 40]
ldr w0, [x0, 16]
ldr w1, [sp, 184]
cmp w1, w0
bls .L706
ldr x0, [sp, 40]
ldr w1, [sp, 184]
str w1, [x0, 16]
.L706:
ldr x0, [sp, 280]
ldr w0, [x0, 4]
ldr x3, [sp, 216]
mov w2, w0
ldr x1, [sp, 224]
ldr x0, [sp, 280]
bl compute_codewords
cmp w0, 0
bne .L710
ldr x0, [sp, 280]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L711
mov w2, 0
ldr x1, [sp, 216]
ldr x0, [sp, 40]
bl setup_temp_free
.L711:
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L710:
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
cmp w0, 0
beq .L712
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
add w0, w0, 1
sxtw x0, w0
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 2096]
ldr x0, [sp, 280]
ldr x0, [x0, 2096]
cmp x0, 0
bne .L713
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L713:
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
add w0, w0, 1
sxtw x0, w0
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 2104]
ldr x0, [sp, 280]
ldr x0, [x0, 2104]
cmp x0, 0
bne .L714
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L714:
ldr x0, [sp, 280]
ldr x0, [x0, 2104]
add x1, x0, 4
ldr x0, [sp, 280]
str x1, [x0, 2104]
ldr x0, [sp, 280]
ldr x0, [x0, 2104]
sub x0, x0, #4
mov w1, -1
str w1, [x0]
ldr x2, [sp, 216]
ldr x1, [sp, 224]
ldr x0, [sp, 280]
bl compute_sorted_huffman
.L712:
ldr x0, [sp, 280]
ldrb w0, [x0, 27]
cmp w0, 0
beq .L715
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
sxtw x0, w0
lsl w0, w0, 2
mov w2, w0
ldr x1, [sp, 216]
ldr x0, [sp, 40]
bl setup_temp_free
ldr x0, [sp, 280]
ldr x1, [x0, 40]
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
sxtw x0, w0
lsl w0, w0, 2
mov w2, w0
ldr x0, [sp, 40]
bl setup_temp_free
ldr x0, [sp, 280]
ldr w0, [x0, 4]
mov w2, w0
ldr x1, [sp, 224]
ldr x0, [sp, 40]
bl setup_temp_free
ldr x0, [sp, 280]
str xzr, [x0, 40]
.L715:
ldr x0, [sp, 280]
bl compute_accelerated_huffman
mov w1, 4
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 280]
strb w1, [x0, 25]
ldr x0, [sp, 280]
ldrb w0, [x0, 25]
cmp w0, 2
bls .L716
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L716:
ldr x0, [sp, 280]
ldrb w0, [x0, 25]
cmp w0, 0
beq .L717
mov w1, 32
ldr x0, [sp, 40]
bl get_bits
bl float32_unpack
ldr x0, [sp, 280]
str s0, [x0, 16]
mov w1, 32
ldr x0, [sp, 40]
bl get_bits
bl float32_unpack
ldr x0, [sp, 280]
str s0, [x0, 20]
mov w1, 4
ldr x0, [sp, 40]
bl get_bits
and w0, w0, 255
add w0, w0, 1
and w1, w0, 255
ldr x0, [sp, 280]
strb w1, [x0, 24]
mov w1, 1
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 280]
strb w1, [x0, 26]
ldr x0, [sp, 280]
ldrb w0, [x0, 25]
cmp w0, 1
bne .L718
ldr x0, [sp, 280]
ldr w2, [x0, 4]
ldr x0, [sp, 280]
ldr w0, [x0]
mov w1, w0
mov w0, w2
bl lookup1_values
mov w1, w0
ldr x0, [sp, 280]
str w1, [x0, 28]
b .L719
.L718:
ldr x0, [sp, 280]
ldr w1, [x0, 4]
ldr x0, [sp, 280]
ldr w0, [x0]
mul w0, w1, w0
mov w1, w0
ldr x0, [sp, 280]
str w1, [x0, 28]
.L719:
ldr x0, [sp, 280]
ldr w0, [x0, 28]
cmp w0, 0
bne .L720
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L720:
ldr x0, [sp, 280]
ldr w0, [x0, 28]
lsl w0, w0, 1
mov w1, w0
ldr x0, [sp, 40]
bl setup_temp_malloc
str x0, [sp, 288]
ldr x0, [sp, 288]
cmp x0, 0
bne .L721
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L721:
str wzr, [sp, 64]
b .L722
.L724:
ldr x0, [sp, 280]
ldrb w0, [x0, 24]
mov w1, w0
ldr x0, [sp, 40]
bl get_bits
str w0, [sp, 212]
ldr w0, [sp, 212]
cmn w0, #1
bne .L723
ldr x0, [sp, 280]
ldr w0, [x0, 28]
lsl w0, w0, 1
mov w2, w0
ldr x1, [sp, 288]
ldr x0, [sp, 40]
bl setup_temp_free
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L723:
ldrsw x0, [sp, 64]
lsl x0, x0, 1
ldr x1, [sp, 288]
add x0, x1, x0
ldr w1, [sp, 212]
and w1, w1, 65535
strh w1, [x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L722:
ldr x0, [sp, 280]
ldr w0, [x0, 28]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
blt .L724
ldr x0, [sp, 280]
ldrb w0, [x0, 25]
cmp w0, 1
bne .L725
ldr x0, [sp, 280]
ldrb w0, [x0, 27]
str w0, [sp, 192]
str wzr, [sp, 96]
ldr w0, [sp, 192]
cmp w0, 0
beq .L726
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
cmp w0, 0
beq .L849
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
sxtw x0, w0
mov w1, w0
ldr x0, [sp, 280]
ldr w0, [x0]
sxtw x0, w0
mul w0, w1, w0
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 32]
b .L729
.L726:
ldr x0, [sp, 280]
ldr w0, [x0, 4]
sxtw x0, w0
mov w1, w0
ldr x0, [sp, 280]
ldr w0, [x0]
sxtw x0, w0
mul w0, w1, w0
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 32]
.L729:
ldr x0, [sp, 280]
ldr x0, [x0, 32]
cmp x0, 0
bne .L730
ldr x0, [sp, 280]
ldr w0, [x0, 28]
lsl w0, w0, 1
mov w2, w0
ldr x1, [sp, 288]
ldr x0, [sp, 40]
bl setup_temp_free
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L730:
ldr w0, [sp, 192]
cmp w0, 0
beq .L731
ldr x0, [sp, 280]
ldr w0, [x0, 2112]
b .L732
.L731:
ldr x0, [sp, 280]
ldr w0, [x0, 4]
.L732:
str w0, [sp, 196]
str wzr, [sp, 64]
b .L733
.L743:
ldr w0, [sp, 192]
cmp w0, 0
beq .L734
ldr x0, [sp, 280]
ldr x1, [x0, 2104]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
b .L735
.L734:
ldr w0, [sp, 64]
.L735:
str w0, [sp, 200]
mov w0, 1
str w0, [sp, 100]
str wzr, [sp, 68]
b .L736
.L742:
ldr w1, [sp, 200]
ldr w0, [sp, 100]
udiv w0, w1, w0
ldr x1, [sp, 280]
ldr w1, [x1, 28]
udiv w2, w0, w1
mul w1, w2, w1
sub w0, w0, w1
str w0, [sp, 204]
ldrsw x0, [sp, 204]
lsl x0, x0, 1
ldr x1, [sp, 288]
add x0, x1, x0
ldr h0, [x0]
ucvtf s0, s0
str s0, [sp, 208]
ldrsw x0, [sp, 204]
lsl x0, x0, 1
ldr x1, [sp, 288]
add x0, x1, x0
ldrh w0, [x0]
fmov s0, w0
scvtf s1, s0
ldr x0, [sp, 280]
ldr s0, [x0, 20]
fmul s1, s1, s0
ldr x0, [sp, 280]
ldr s0, [x0, 16]
fadd s0, s1, s0
ldr s1, [sp, 96]
fadd s0, s1, s0
str s0, [sp, 208]
ldr x0, [sp, 280]
ldr x1, [x0, 32]
ldr x0, [sp, 280]
ldr w2, [x0]
ldr w0, [sp, 64]
mul w2, w2, w0
ldr w0, [sp, 68]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 208]
str s0, [x0]
ldr x0, [sp, 280]
ldrb w0, [x0, 26]
cmp w0, 0
beq .L737
ldr s0, [sp, 208]
str s0, [sp, 96]
.L737:
ldr w0, [sp, 68]
add w1, w0, 1
ldr x0, [sp, 280]
ldr w0, [x0]
cmp w1, w0
bge .L738
ldr x0, [sp, 280]
ldr w1, [x0, 28]
mov w2, 0
ldr w0, [sp, 100]
umull x0, w1, w0
lsr x0, x0, 32
cmp w0, 0
beq .L739
mov w2, 1
.L739:
mov w0, w2
cmp w0, 0
beq .L741
ldr x0, [sp, 280]
ldr w0, [x0, 28]
lsl w0, w0, 1
mov w2, w0
ldr x1, [sp, 288]
ldr x0, [sp, 40]
bl setup_temp_free
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L741:
ldr x0, [sp, 280]
ldr w0, [x0, 28]
ldr w1, [sp, 100]
mul w0, w1, w0
str w0, [sp, 100]
.L738:
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L736:
ldr x0, [sp, 280]
ldr w0, [x0]
ldr w1, [sp, 68]
cmp w1, w0
blt .L742
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L733:
ldr w1, [sp, 64]
ldr w0, [sp, 196]
cmp w1, w0
blt .L743
ldr x0, [sp, 280]
mov w1, 2
strb w1, [x0, 25]
b .L728
.L725:
str wzr, [sp, 104]
ldr x0, [sp, 280]
ldr w0, [x0, 28]
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 280]
str x1, [x0, 32]
ldr x0, [sp, 280]
ldr x0, [x0, 32]
cmp x0, 0
bne .L744
ldr x0, [sp, 280]
ldr w0, [x0, 28]
lsl w0, w0, 1
mov w2, w0
ldr x1, [sp, 288]
ldr x0, [sp, 40]
bl setup_temp_free
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L744:
str wzr, [sp, 64]
b .L745
.L747:
ldrsw x0, [sp, 64]
lsl x0, x0, 1
ldr x1, [sp, 288]
add x0, x1, x0
ldrh w0, [x0]
fmov s0, w0
scvtf s1, s0
ldr x0, [sp, 280]
ldr s0, [x0, 20]
fmul s1, s1, s0
ldr x0, [sp, 280]
ldr s0, [x0, 16]
fadd s0, s1, s0
ldr s1, [sp, 104]
fadd s0, s1, s0
str s0, [sp, 188]
ldr x0, [sp, 280]
ldr x1, [x0, 32]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [sp, 188]
str s0, [x0]
ldr x0, [sp, 280]
ldrb w0, [x0, 26]
cmp w0, 0
beq .L746
ldr s0, [sp, 188]
str s0, [sp, 104]
.L746:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L745:
ldr x0, [sp, 280]
ldr w0, [x0, 28]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
blt .L747
b .L728
.L849:
nop
.L728:
ldr x0, [sp, 280]
ldr w0, [x0, 28]
lsl w0, w0, 1
mov w2, w0
ldr x1, [sp, 288]
ldr x0, [sp, 40]
bl setup_temp_free
.L717:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L676:
ldr x0, [sp, 40]
ldr w0, [x0, 152]
ldr w1, [sp, 60]
cmp w1, w0
blt .L748
mov w1, 6
ldr x0, [sp, 40]
bl get_bits
and w0, w0, 255
add w0, w0, 1
strb w0, [sp, 49]
str wzr, [sp, 60]
b .L749
.L751:
mov w1, 16
ldr x0, [sp, 40]
bl get_bits
str w0, [sp, 164]
ldr w0, [sp, 164]
cmp w0, 0
beq .L750
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L750:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L749:
ldrb w0, [sp, 49]
ldr w1, [sp, 60]
cmp w1, w0
blt .L751
mov w1, 6
ldr x0, [sp, 40]
bl get_bits
add w0, w0, 1
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0, 168]
ldr x0, [sp, 40]
ldr w0, [x0, 168]
sxtw x0, w0
mov w1, w0
mov w0, 1596
mul w0, w1, w0
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 40]
str x1, [x0, 304]
ldr x0, [sp, 40]
ldr x0, [x0, 304]
cmp x0, 0
bne .L752
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L752:
str wzr, [sp, 60]
b .L753
.L779:
mov w1, 16
ldr x0, [sp, 40]
bl get_bits
and w2, w0, 65535
ldr x1, [sp, 40]
ldrsw x0, [sp, 60]
add x0, x0, 80
lsl x0, x0, 1
add x0, x1, x0
mov w1, w2
strh w1, [x0, 12]
ldr x1, [sp, 40]
ldrsw x0, [sp, 60]
add x0, x0, 80
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 12]
cmp w0, 1
bls .L754
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L754:
ldr x1, [sp, 40]
ldrsw x0, [sp, 60]
add x0, x0, 80
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 12]
cmp w0, 0
bne .L755
ldr x0, [sp, 40]
ldr x1, [x0, 304]
ldrsw x2, [sp, 60]
mov x0, 1596
mul x0, x2, x0
add x0, x1, x0
str x0, [sp, 272]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 272]
strb w1, [x0]
mov w1, 16
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 65535
ldr x0, [sp, 272]
strh w1, [x0, 2]
mov w1, 16
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 65535
ldr x0, [sp, 272]
strh w1, [x0, 4]
mov w1, 6
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 272]
strb w1, [x0, 6]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 272]
strb w1, [x0, 7]
mov w1, 4
ldr x0, [sp, 40]
bl get_bits
and w0, w0, 255
add w0, w0, 1
and w1, w0, 255
ldr x0, [sp, 272]
strb w1, [x0, 8]
str wzr, [sp, 64]
b .L756
.L757:
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w2, w0, 255
ldr x1, [sp, 272]
ldrsw x0, [sp, 64]
add x0, x1, x0
mov w1, w2
strb w1, [x0, 9]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L756:
ldr x0, [sp, 272]
ldrb w0, [x0, 8]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
blt .L757
mov w1, 4
ldr x0, [sp, 40]
bl error
b .L847
.L755:
ldr x0, [sp, 40]
ldr x1, [x0, 304]
ldrsw x2, [sp, 60]
mov x0, 1596
mul x0, x2, x0
add x0, x1, x0
str x0, [sp, 264]
mov w0, -1
str w0, [sp, 108]
mov w1, 5
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 264]
strb w1, [x0]
str wzr, [sp, 64]
b .L758
.L760:
mov w1, 4
ldr x0, [sp, 40]
bl get_bits
and w2, w0, 255
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
mov w1, w2
strb w1, [x0, 1]
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
ldrb w0, [x0, 1]
mov w1, w0
ldr w0, [sp, 108]
cmp w0, w1
bge .L759
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
ldrb w0, [x0, 1]
str w0, [sp, 108]
.L759:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L758:
ldr x0, [sp, 264]
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
blt .L760
str wzr, [sp, 64]
b .L761
.L767:
mov w1, 3
ldr x0, [sp, 40]
bl get_bits
and w0, w0, 255
add w0, w0, 1
and w2, w0, 255
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
mov w1, w2
strb w1, [x0, 33]
mov w1, 2
ldr x0, [sp, 40]
bl get_bits
and w2, w0, 255
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
mov w1, w2
strb w1, [x0, 49]
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
ldrb w0, [x0, 49]
cmp w0, 0
beq .L762
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w2, w0, 255
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
mov w1, w2
strb w1, [x0, 65]
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
ldrb w0, [x0, 65]
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 152]
cmp w1, w0
blt .L762
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L762:
str wzr, [sp, 68]
b .L764
.L766:
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w0, w0, 65535
sub w0, w0, #1
and w0, w0, 65535
sxth w3, w0
ldr x1, [sp, 264]
ldrsw x0, [sp, 68]
ldrsw x2, [sp, 64]
lsl x2, x2, 3
add x0, x2, x0
add x0, x0, 40
lsl x0, x0, 1
add x0, x1, x0
mov w1, w3
strh w1, [x0, 2]
ldr x1, [sp, 264]
ldrsw x0, [sp, 68]
ldrsw x2, [sp, 64]
lsl x2, x2, 3
add x0, x2, x0
add x0, x0, 40
lsl x0, x0, 1
add x0, x1, x0
ldrsh w0, [x0, 2]
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 152]
cmp w1, w0
blt .L765
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L765:
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L764:
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
ldrb w0, [x0, 49]
mov w1, w0
mov w0, 1
lsl w0, w0, w1
ldr w1, [sp, 68]
cmp w1, w0
blt .L766
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L761:
ldr w1, [sp, 64]
ldr w0, [sp, 108]
cmp w1, w0
ble .L767
mov w1, 2
ldr x0, [sp, 40]
bl get_bits
and w0, w0, 255
add w0, w0, 1
and w1, w0, 255
ldr x0, [sp, 264]
strb w1, [x0, 1588]
mov w1, 4
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 264]
strb w1, [x0, 1589]
ldr x0, [sp, 264]
strh wzr, [x0, 338]
ldr x0, [sp, 264]
ldrb w0, [x0, 1589]
mov w1, w0
mov w0, 1
lsl w0, w0, w1
and w1, w0, 65535
ldr x0, [sp, 264]
strh w1, [x0, 340]
ldr x0, [sp, 264]
mov w1, 2
str w1, [x0, 1592]
str wzr, [sp, 64]
b .L768
.L771:
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
ldrb w0, [x0, 1]
str w0, [sp, 160]
str wzr, [sp, 68]
b .L769
.L770:
ldr x0, [sp, 264]
ldrb w0, [x0, 1589]
mov w1, w0
ldr x0, [sp, 40]
bl get_bits
mov w1, w0
ldr x0, [sp, 264]
ldr w0, [x0, 1592]
and w2, w1, 65535
ldr x1, [sp, 264]
sxtw x0, w0
add x0, x0, 168
lsl x0, x0, 1
add x0, x1, x0
mov w1, w2
strh w1, [x0, 2]
ldr x0, [sp, 264]
ldr w0, [x0, 1592]
add w1, w0, 1
ldr x0, [sp, 264]
str w1, [x0, 1592]
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L769:
ldr x1, [sp, 264]
ldrsw x0, [sp, 160]
add x0, x1, x0
ldrb w0, [x0, 33]
mov w1, w0
ldr w0, [sp, 68]
cmp w0, w1
blt .L770
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L768:
ldr x0, [sp, 264]
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
blt .L771
str wzr, [sp, 64]
b .L772
.L773:
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x0, 168
lsl x0, x0, 1
add x0, x1, x0
ldrh w2, [x0, 2]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x1, sp, 296
strh w2, [x1, x0]
ldr w0, [sp, 64]
and w2, w0, 65535
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x1, sp, 298
strh w2, [x1, x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L772:
ldr x0, [sp, 264]
ldr w0, [x0, 1592]
ldr w1, [sp, 64]
cmp w1, w0
blt .L773
ldr x0, [sp, 264]
ldr w0, [x0, 1592]
sxtw x1, w0
add x4, sp, 296
adrp x0, point_compare
add x3, x0, :lo12:point_compare
mov x2, 4
mov x0, x4
bl qsort
str wzr, [sp, 64]
b .L774
.L775:
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x1, sp, 298
ldrh w0, [x1, x0]
and w2, w0, 255
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x1, x0
mov w1, w2
strb w1, [x0, 838]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L774:
ldr x0, [sp, 264]
ldr w0, [x0, 1592]
ldr w1, [sp, 64]
cmp w1, w0
blt .L775
mov w0, 2
str w0, [sp, 64]
b .L776
.L777:
ldr x0, [sp, 264]
add x0, x0, 338
add x2, sp, 56
add x1, sp, 52
mov x3, x2
mov x2, x1
ldr w1, [sp, 64]
bl neighbors
ldr w0, [sp, 52]
and w2, w0, 255
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
add x0, x0, 544
lsl x0, x0, 1
add x0, x1, x0
mov w1, w2
strb w1, [x0]
ldr w0, [sp, 56]
and w2, w0, 255
ldr x1, [sp, 264]
ldrsw x0, [sp, 64]
lsl x0, x0, 1
add x0, x1, x0
mov w1, w2
strb w1, [x0, 1089]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L776:
ldr x0, [sp, 264]
ldr w0, [x0, 1592]
ldr w1, [sp, 64]
cmp w1, w0
blt .L777
ldr x0, [sp, 264]
ldr w0, [x0, 1592]
ldr w1, [sp, 76]
cmp w1, w0
bge .L778
ldr x0, [sp, 264]
ldr w0, [x0, 1592]
str w0, [sp, 76]
.L778:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L753:
ldr x0, [sp, 40]
ldr w0, [x0, 168]
ldr w1, [sp, 60]
cmp w1, w0
blt .L779
mov w1, 6
ldr x0, [sp, 40]
bl get_bits
add w0, w0, 1
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0, 312]
ldr x0, [sp, 40]
ldr w0, [x0, 312]
sxtw x0, w0
lsl w0, w0, 5
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 40]
str x1, [x0, 448]
ldr x0, [sp, 40]
ldr x0, [x0, 448]
cmp x0, 0
bne .L780
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L780:
ldr x0, [sp, 40]
ldr x3, [x0, 448]
ldr x0, [sp, 40]
ldr w0, [x0, 312]
sxtw x0, w0
lsl x0, x0, 5
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
str wzr, [sp, 60]
b .L781
.L802:
ldr x0, [sp, 40]
ldr x1, [x0, 448]
ldrsw x0, [sp, 60]
lsl x0, x0, 5
add x0, x1, x0
str x0, [sp, 256]
mov w1, 16
ldr x0, [sp, 40]
bl get_bits
and w2, w0, 65535
ldr x1, [sp, 40]
ldrsw x0, [sp, 60]
add x0, x0, 152
lsl x0, x0, 1
add x0, x1, x0
mov w1, w2
strh w1, [x0, 12]
ldr x1, [sp, 40]
ldrsw x0, [sp, 60]
add x0, x0, 152
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0, 12]
cmp w0, 2
bls .L782
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L782:
mov w1, 24
ldr x0, [sp, 40]
bl get_bits
mov w1, w0
ldr x0, [sp, 256]
str w1, [x0]
mov w1, 24
ldr x0, [sp, 40]
bl get_bits
mov w1, w0
ldr x0, [sp, 256]
str w1, [x0, 4]
ldr x0, [sp, 256]
ldr w1, [x0, 4]
ldr x0, [sp, 256]
ldr w0, [x0]
cmp w1, w0
bcs .L784
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L784:
mov w1, 24
ldr x0, [sp, 40]
bl get_bits
add w1, w0, 1
ldr x0, [sp, 256]
str w1, [x0, 8]
mov w1, 6
ldr x0, [sp, 40]
bl get_bits
and w0, w0, 255
add w0, w0, 1
and w1, w0, 255
ldr x0, [sp, 256]
strb w1, [x0, 12]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 256]
strb w1, [x0, 13]
ldr x0, [sp, 256]
ldrb w0, [x0, 13]
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 152]
cmp w1, w0
blt .L785
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L785:
str wzr, [sp, 64]
b .L786
.L788:
strb wzr, [sp, 48]
mov w1, 3
ldr x0, [sp, 40]
bl get_bits
strb w0, [sp, 50]
mov w1, 1
ldr x0, [sp, 40]
bl get_bits
cmp w0, 0
beq .L787
mov w1, 5
ldr x0, [sp, 40]
bl get_bits
strb w0, [sp, 48]
.L787:
ldrb w0, [sp, 48]
ubfiz w0, w0, 3, 5
and w0, w0, 255
ldrb w1, [sp, 50]
add w0, w0, w1
and w2, w0, 255
ldrsw x0, [sp, 64]
add x1, sp, 1304
strb w2, [x1, x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L786:
ldr x0, [sp, 256]
ldrb w0, [x0, 12]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
blt .L788
ldr x0, [sp, 256]
ldrb w0, [x0, 12]
lsl w0, w0, 4
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 256]
str x1, [x0, 24]
ldr x0, [sp, 256]
ldr x0, [x0, 24]
cmp x0, 0
bne .L789
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L789:
str wzr, [sp, 64]
b .L790
.L795:
str wzr, [sp, 68]
b .L791
.L794:
ldrsw x0, [sp, 64]
add x1, sp, 1304
ldrb w0, [x1, x0]
mov w1, w0
ldr w0, [sp, 68]
asr w0, w1, w0
and w0, w0, 1
cmp w0, 0
beq .L792
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
mov w2, w0
ldr x0, [sp, 256]
ldr x1, [x0, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 4
add x0, x1, x0
sxth w2, w2
ldrsw x1, [sp, 68]
strh w2, [x0, x1, lsl 1]
ldr x0, [sp, 256]
ldr x1, [x0, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 4
add x0, x1, x0
ldrsw x1, [sp, 68]
ldrsh w0, [x0, x1, lsl 1]
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 152]
cmp w1, w0
blt .L793
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L792:
ldr x0, [sp, 256]
ldr x1, [x0, 24]
ldrsw x0, [sp, 64]
lsl x0, x0, 4
add x0, x1, x0
ldrsw x1, [sp, 68]
mov w2, -1
strh w2, [x0, x1, lsl 1]
.L793:
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L791:
ldr w0, [sp, 68]
cmp w0, 7
ble .L794
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L790:
ldr x0, [sp, 256]
ldrb w0, [x0, 12]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
blt .L795
ldr x0, [sp, 40]
ldr x2, [x0, 160]
ldr x0, [sp, 256]
ldrb w0, [x0, 13]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr w0, [x0, 4]
sxtw x0, w0
lsl w0, w0, 3
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 256]
str x1, [x0, 16]
ldr x0, [sp, 256]
ldr x0, [x0, 16]
cmp x0, 0
bne .L796
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L796:
ldr x0, [sp, 256]
ldr x3, [x0, 16]
ldr x0, [sp, 40]
ldr x2, [x0, 160]
ldr x0, [sp, 256]
ldrb w0, [x0, 13]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr w0, [x0, 4]
sxtw x0, w0
lsl x0, x0, 3
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
str wzr, [sp, 64]
b .L797
.L801:
ldr x0, [sp, 40]
ldr x2, [x0, 160]
ldr x0, [sp, 256]
ldrb w0, [x0, 13]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr w0, [x0]
str w0, [sp, 156]
ldr w0, [sp, 64]
str w0, [sp, 112]
ldr x0, [sp, 256]
ldr x1, [x0, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
add x19, x1, x0
ldr w1, [sp, 156]
ldr x0, [sp, 40]
bl setup_malloc
str x0, [x19]
ldr x0, [sp, 256]
ldr x1, [x0, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
cmp x0, 0
bne .L798
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L798:
ldr w0, [sp, 156]
sub w0, w0, #1
str w0, [sp, 68]
b .L799
.L800:
ldr x0, [sp, 256]
ldrb w0, [x0, 12]
mov w1, w0
ldr w0, [sp, 112]
sdiv w2, w0, w1
mul w1, w2, w1
sub w2, w0, w1
ldr x0, [sp, 256]
ldr x1, [x0, 16]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 68]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
ldr x0, [sp, 256]
ldrb w0, [x0, 12]
mov w1, w0
ldr w0, [sp, 112]
sdiv w0, w0, w1
str w0, [sp, 112]
ldr w0, [sp, 68]
sub w0, w0, #1
str w0, [sp, 68]
.L799:
ldr w0, [sp, 68]
cmp w0, 0
bge .L800
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L797:
ldr x0, [sp, 40]
ldr x2, [x0, 160]
ldr x0, [sp, 256]
ldrb w0, [x0, 13]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr w0, [x0, 4]
ldr w1, [sp, 64]
cmp w1, w0
blt .L801
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L781:
ldr x0, [sp, 40]
ldr w0, [x0, 312]
ldr w1, [sp, 60]
cmp w1, w0
blt .L802
mov w1, 6
ldr x0, [sp, 40]
bl get_bits
add w0, w0, 1
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0, 456]
ldr x0, [sp, 40]
ldr w0, [x0, 456]
sxtw x0, w0
mov w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
lsl w0, w0, 4
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 40]
str x1, [x0, 464]
ldr x0, [sp, 40]
ldr x0, [x0, 464]
cmp x0, 0
bne .L803
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L803:
ldr x0, [sp, 40]
ldr x3, [x0, 464]
ldr x0, [sp, 40]
ldr w0, [x0, 456]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 4
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
str wzr, [sp, 60]
b .L804
.L829:
ldr x0, [sp, 40]
ldr x2, [x0, 464]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 4
add x0, x2, x0
str x0, [sp, 248]
mov w1, 16
ldr x0, [sp, 40]
bl get_bits
str w0, [sp, 152]
ldr w0, [sp, 152]
cmp w0, 0
beq .L805
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L805:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
sxtw x0, w0
mov w1, w0
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x1, x0
ldr x0, [sp, 248]
str x1, [x0, 8]
ldr x0, [sp, 248]
ldr x0, [x0, 8]
cmp x0, 0
bne .L806
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L806:
mov w1, 1
ldr x0, [sp, 40]
bl get_bits
cmp w0, 0
beq .L807
mov w1, 4
ldr x0, [sp, 40]
bl get_bits
and w0, w0, 255
add w0, w0, 1
and w1, w0, 255
ldr x0, [sp, 248]
strb w1, [x0, 16]
b .L808
.L807:
ldr x0, [sp, 248]
mov w1, 1
strb w1, [x0, 16]
.L808:
ldr x0, [sp, 248]
ldrb w0, [x0, 16]
mov w1, w0
ldr w0, [sp, 72]
cmp w0, w1
bge .L809
ldr x0, [sp, 248]
ldrb w0, [x0, 16]
str w0, [sp, 72]
.L809:
mov w1, 1
ldr x0, [sp, 40]
bl get_bits
cmp w0, 0
beq .L810
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w0, w0, 65535
add w0, w0, 1
and w1, w0, 65535
ldr x0, [sp, 248]
strh w1, [x0]
str wzr, [sp, 68]
b .L811
.L815:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
sub w0, w0, #1
bl ilog
mov w1, w0
ldr x0, [sp, 40]
bl get_bits
mov w3, w0
ldr x0, [sp, 248]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
and w1, w3, 255
strb w1, [x0]
ldr x0, [sp, 40]
ldr w0, [x0, 4]
sub w0, w0, #1
bl ilog
mov w1, w0
ldr x0, [sp, 40]
bl get_bits
mov w3, w0
ldr x0, [sp, 248]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
and w1, w3, 255
strb w1, [x0, 1]
ldr x0, [sp, 248]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0]
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 4]
cmp w1, w0
blt .L812
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L812:
ldr x0, [sp, 248]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w0, [x0, 1]
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 4]
cmp w1, w0
blt .L813
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L813:
ldr x0, [sp, 248]
ldr x2, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w2, [x0]
ldr x0, [sp, 248]
ldr x3, [x0, 8]
ldrsw x1, [sp, 68]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x3, x0
ldrb w0, [x0, 1]
cmp w2, w0
bne .L814
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L814:
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L811:
ldr x0, [sp, 248]
ldrh w0, [x0]
mov w1, w0
ldr w0, [sp, 68]
cmp w0, w1
blt .L815
b .L816
.L810:
ldr x0, [sp, 248]
strh wzr, [x0]
.L816:
mov w1, 2
ldr x0, [sp, 40]
bl get_bits
cmp w0, 0
beq .L817
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L817:
ldr x0, [sp, 248]
ldrb w0, [x0, 16]
cmp w0, 1
bls .L818
str wzr, [sp, 64]
b .L819
.L821:
mov w1, 4
ldr x0, [sp, 40]
bl get_bits
mov w3, w0
ldr x0, [sp, 248]
ldr x2, [x0, 8]
ldrsw x1, [sp, 64]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
and w1, w3, 255
strb w1, [x0, 2]
ldr x0, [sp, 248]
ldr x2, [x0, 8]
ldrsw x1, [sp, 64]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
ldrb w1, [x0, 2]
ldr x0, [sp, 248]
ldrb w0, [x0, 16]
cmp w1, w0
bcc .L820
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L820:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L819:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
ldr w1, [sp, 64]
cmp w1, w0
blt .L821
b .L822
.L818:
str wzr, [sp, 64]
b .L823
.L824:
ldr x0, [sp, 248]
ldr x2, [x0, 8]
ldrsw x1, [sp, 64]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
add x0, x2, x0
strb wzr, [x0, 2]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L823:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
ldr w1, [sp, 64]
cmp w1, w0
blt .L824
.L822:
str wzr, [sp, 64]
b .L825
.L828:
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w2, w0, 255
ldr x1, [sp, 248]
ldrsw x0, [sp, 64]
add x0, x1, x0
mov w1, w2
strb w1, [x0, 17]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w2, w0, 255
ldr x1, [sp, 248]
ldrsw x0, [sp, 64]
add x0, x1, x0
mov w1, w2
strb w1, [x0, 32]
ldr x1, [sp, 248]
ldrsw x0, [sp, 64]
add x0, x1, x0
ldrb w0, [x0, 17]
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 168]
cmp w1, w0
blt .L826
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L826:
ldr x1, [sp, 248]
ldrsw x0, [sp, 64]
add x0, x1, x0
ldrb w0, [x0, 32]
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 312]
cmp w1, w0
blt .L827
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L827:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L825:
ldr x0, [sp, 248]
ldrb w0, [x0, 16]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
blt .L828
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L804:
ldr x0, [sp, 40]
ldr w0, [x0, 456]
ldr w1, [sp, 60]
cmp w1, w0
blt .L829
mov w1, 6
ldr x0, [sp, 40]
bl get_bits
add w0, w0, 1
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0, 472]
str wzr, [sp, 60]
b .L830
.L834:
ldr x0, [sp, 40]
add x2, x0, 476
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 1
add x0, x2, x0
str x0, [sp, 240]
mov w1, 1
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 240]
strb w1, [x0]
mov w1, 16
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 65535
ldr x0, [sp, 240]
strh w1, [x0, 2]
mov w1, 16
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 65535
ldr x0, [sp, 240]
strh w1, [x0, 4]
mov w1, 8
ldr x0, [sp, 40]
bl get_bits
and w1, w0, 255
ldr x0, [sp, 240]
strb w1, [x0, 1]
ldr x0, [sp, 240]
ldrh w0, [x0, 2]
cmp w0, 0
beq .L831
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L831:
ldr x0, [sp, 240]
ldrh w0, [x0, 4]
cmp w0, 0
beq .L832
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L832:
ldr x0, [sp, 240]
ldrb w0, [x0, 1]
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 456]
cmp w1, w0
blt .L833
mov w1, 20
ldr x0, [sp, 40]
bl error
b .L847
.L833:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L830:
ldr x0, [sp, 40]
ldr w0, [x0, 472]
ldr w1, [sp, 60]
cmp w1, w0
blt .L834
ldr x0, [sp, 40]
bl flush_packet
ldr x0, [sp, 40]
str wzr, [x0, 1248]
str wzr, [sp, 60]
b .L835
.L838:
ldr x0, [sp, 40]
ldr w0, [x0, 148]
sxtw x0, w0
lsl w0, w0, 2
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x2, x0
ldr x0, [sp, 40]
ldrsw x1, [sp, 60]
add x1, x1, 108
str x2, [x0, x1, lsl 3]
ldr x0, [sp, 40]
ldr w0, [x0, 148]
sxtw x0, w0
lsl x0, x0, 2
lsr x0, x0, 1
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x2, x0
ldr x0, [sp, 40]
ldrsw x1, [sp, 60]
add x1, x1, 140
str x2, [x0, x1, lsl 3]
ldrsw x0, [sp, 76]
lsl w0, w0, 1
mov w1, w0
ldr x0, [sp, 40]
bl setup_malloc
mov x2, x0
ldr x1, [sp, 40]
ldrsw x0, [sp, 60]
add x0, x0, 156
lsl x0, x0, 3
add x0, x1, x0
str x2, [x0, 8]
ldr x0, [sp, 40]
ldrsw x1, [sp, 60]
add x1, x1, 108
ldr x0, [x0, x1, lsl 3]
cmp x0, 0
beq .L836
ldr x0, [sp, 40]
ldrsw x1, [sp, 60]
add x1, x1, 140
ldr x0, [x0, x1, lsl 3]
cmp x0, 0
beq .L836
ldr x1, [sp, 40]
ldrsw x0, [sp, 60]
add x0, x0, 156
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0, 8]
cmp x0, 0
bne .L837
.L836:
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L837:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L835:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
ldr w1, [sp, 60]
cmp w1, w0
blt .L838
ldr x0, [sp, 40]
ldr w0, [x0, 144]
mov w2, w0
mov w1, 0
ldr x0, [sp, 40]
bl init_blocksize
cmp w0, 0
bne .L839
mov w0, 0
b .L847
.L839:
ldr x0, [sp, 40]
ldr w0, [x0, 148]
mov w2, w0
mov w1, 1
ldr x0, [sp, 40]
bl init_blocksize
cmp w0, 0
bne .L840
mov w0, 0
b .L847
.L840:
ldr x0, [sp, 40]
ldr w1, [x0, 144]
ldr x0, [sp, 40]
str w1, [x0, 136]
ldr x0, [sp, 40]
ldr w1, [x0, 148]
ldr x0, [sp, 40]
str w1, [x0, 140]
ldr x0, [sp, 40]
ldr w0, [x0, 148]
sxtw x0, w0
lsl x0, x0, 2
lsr x0, x0, 1
str w0, [sp, 136]
str wzr, [sp, 120]
str wzr, [sp, 116]
b .L841
.L843:
ldr x0, [sp, 40]
ldr x1, [x0, 448]
ldrsw x0, [sp, 116]
lsl x0, x0, 5
add x0, x1, x0
str x0, [sp, 232]
ldr x0, [sp, 232]
ldr w1, [x0, 4]
ldr x0, [sp, 232]
ldr w0, [x0]
sub w0, w1, w0
str w0, [sp, 144]
ldr w1, [sp, 144]
ldr x0, [sp, 232]
ldr w0, [x0, 8]
udiv w0, w1, w0
str w0, [sp, 148]
ldr w1, [sp, 148]
ldr w0, [sp, 120]
cmp w1, w0
ble .L842
ldr w0, [sp, 148]
str w0, [sp, 120]
.L842:
ldr w0, [sp, 116]
add w0, w0, 1
str w0, [sp, 116]
.L841:
ldr x0, [sp, 40]
ldr w0, [x0, 312]
ldr w1, [sp, 116]
cmp w1, w0
blt .L843
ldrsw x0, [sp, 120]
add x0, x0, 1
mov w1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 4]
sxtw x0, w0
mul w0, w1, w0
lsl w0, w0, 3
str w0, [sp, 140]
ldr x0, [sp, 40]
ldr w1, [sp, 140]
str w1, [x0, 12]
ldr x0, [sp, 40]
ldr w0, [x0, 12]
ldr w1, [sp, 136]
cmp w1, w0
bls .L844
ldr x0, [sp, 40]
ldr w1, [sp, 136]
str w1, [x0, 12]
.L844:
ldr x0, [sp, 40]
mov w1, 1
strb w1, [x0, 1741]
ldr x0, [sp, 40]
ldr x0, [x0, 104]
cmp x0, 0
beq .L845
ldr x0, [sp, 40]
ldr w1, [x0, 124]
ldr x0, [sp, 40]
ldr w0, [x0, 112]
cmp w1, w0
beq .L846
adrp x0, __PRETTY_FUNCTION__.5
add x3, x0, :lo12:__PRETTY_FUNCTION__.5
mov w2, 4096
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl __assert_fail
.L846:
ldr x0, [sp, 40]
ldr w0, [x0, 120]
sxtw x1, w0
ldr x0, [sp, 40]
ldr w0, [x0, 12]
uxtw x0, w0
add x0, x1, x0
add x1, x0, 1880
ldr x0, [sp, 40]
ldr w0, [x0, 124]
uxtw x0, w0
cmp x1, x0
bls .L845
mov w1, 3
ldr x0, [sp, 40]
bl error
b .L847
.L845:
ldr x0, [sp, 40]
bl stb_vorbis_get_file_offset
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0, 72]
mov w0, 1
.L847:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 1368]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L848
bl __stack_chk_fail
.L848:
mov w0, w1
ldr x19, [sp, 16]
ldp x29, x30, [sp]
add sp, sp, 1376
.cfi_restore 29
.cfi_restore 30
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE71:
.size start_decoder, .-start_decoder
.align 2
.type vorbis_deinit, %function
vorbis_deinit:
.LFB72:
.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]
ldr x0, [sp, 24]
ldr x0, [x0, 448]
cmp x0, 0
beq .L851
str wzr, [sp, 40]
b .L852
.L856:
ldr x0, [sp, 24]
ldr x1, [x0, 448]
ldrsw x0, [sp, 40]
lsl x0, x0, 5
add x0, x1, x0
str x0, [sp, 48]
ldr x0, [sp, 48]
ldr x0, [x0, 16]
cmp x0, 0
beq .L853
str wzr, [sp, 44]
b .L854
.L855:
ldr x0, [sp, 48]
ldr x1, [x0, 16]
ldrsw x0, [sp, 44]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L854:
ldr x0, [sp, 24]
ldr x2, [x0, 160]
ldr x0, [sp, 48]
ldrb w0, [x0, 13]
and x1, x0, 255
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr w0, [x0, 4]
ldr w1, [sp, 44]
cmp w1, w0
blt .L855
ldr x0, [sp, 48]
ldr x0, [x0, 16]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
.L853:
ldr x0, [sp, 48]
ldr x0, [x0, 24]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L852:
ldr x0, [sp, 24]
ldr w0, [x0, 312]
ldr w1, [sp, 40]
cmp w1, w0
blt .L856
.L851:
ldr x0, [sp, 24]
ldr x0, [x0, 160]
cmp x0, 0
beq .L857
str wzr, [sp, 40]
b .L858
.L861:
ldr x0, [sp, 24]
ldr x2, [x0, 160]
ldrsw x1, [sp, 40]
mov x0, x1
lsl x0, x0, 5
add x0, x0, x1
lsl x0, x0, 3
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
str x0, [sp, 56]
ldr x0, [sp, 56]
ldr x0, [x0, 8]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 56]
ldr x0, [x0, 32]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 56]
ldr x0, [x0, 40]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 56]
ldr x0, [x0, 2096]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 56]
ldr x0, [x0, 2104]
cmp x0, 0
beq .L859
ldr x0, [sp, 56]
ldr x0, [x0, 2104]
sub x0, x0, #4
b .L860
.L859:
mov x0, 0
.L860:
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L858:
ldr x0, [sp, 24]
ldr w0, [x0, 152]
ldr w1, [sp, 40]
cmp w1, w0
blt .L861
ldr x0, [sp, 24]
ldr x0, [x0, 160]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
.L857:
ldr x0, [sp, 24]
ldr x0, [x0, 304]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 24]
ldr x0, [x0, 448]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 24]
ldr x0, [x0, 464]
cmp x0, 0
beq .L862
str wzr, [sp, 40]
b .L863
.L864:
ldr x0, [sp, 24]
ldr x2, [x0, 464]
ldrsw x1, [sp, 40]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 4
add x0, x2, x0
ldr x0, [x0, 8]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L863:
ldr x0, [sp, 24]
ldr w0, [x0, 456]
ldr w1, [sp, 40]
cmp w1, w0
blt .L864
ldr x0, [sp, 24]
ldr x0, [x0, 464]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
.L862:
str wzr, [sp, 40]
b .L865
.L867:
ldr x0, [sp, 24]
ldrsw x1, [sp, 40]
add x1, x1, 108
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 24]
ldrsw x1, [sp, 40]
add x1, x1, 140
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x1, [sp, 24]
ldrsw x0, [sp, 40]
add x0, x0, 156
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0, 8]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L865:
ldr x0, [sp, 24]
ldr w0, [x0, 4]
ldr w1, [sp, 40]
cmp w1, w0
bge .L866
ldr w0, [sp, 40]
cmp w0, 15
ble .L867
.L866:
str wzr, [sp, 40]
b .L868
.L869:
ldr x0, [sp, 24]
ldrsw x1, [sp, 40]
add x1, x1, 174
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 24]
ldrsw x1, [sp, 40]
add x1, x1, 176
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 24]
ldrsw x1, [sp, 40]
add x1, x1, 178
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 24]
ldrsw x1, [sp, 40]
add x1, x1, 180
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr x0, [sp, 24]
ldrsw x1, [sp, 40]
add x1, x1, 182
ldr x0, [x0, x1, lsl 3]
mov x1, x0
ldr x0, [sp, 24]
bl setup_free
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L868:
ldr w0, [sp, 40]
cmp w0, 1
ble .L869
ldr x0, [sp, 24]
ldr w0, [x0, 36]
cmp w0, 0
beq .L871
ldr x0, [sp, 24]
ldr x0, [x0, 24]
bl fclose
.L871:
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE72:
.size vorbis_deinit, .-vorbis_deinit
.align 2
.global stb_vorbis_close
.type stb_vorbis_close, %function
stb_vorbis_close:
.LFB73:
.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 .L875
ldr x0, [sp, 24]
bl vorbis_deinit
ldr x1, [sp, 24]
ldr x0, [sp, 24]
bl setup_free
b .L872
.L875:
nop
.L872:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE73:
.size stb_vorbis_close, .-stb_vorbis_close
.align 2
.type vorbis_init, %function
vorbis_init:
.LFB74:
.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]
mov x2, 1880
mov w1, 0
ldr x0, [sp, 24]
bl memset
ldr x0, [sp, 16]
cmp x0, 0
beq .L877
ldr x2, [sp, 24]
ldr x0, [sp, 16]
ldp x0, x1, [x0]
stp x0, x1, [x2, 104]
ldr x0, [sp, 24]
ldr w0, [x0, 112]
add w0, w0, 3
and w1, w0, -4
ldr x0, [sp, 24]
str w1, [x0, 112]
ldr x0, [sp, 24]
ldr w1, [x0, 112]
ldr x0, [sp, 24]
str w1, [x0, 124]
.L877:
ldr x0, [sp, 24]
str wzr, [x0, 128]
ldr x0, [sp, 24]
str wzr, [x0, 132]
ldr x0, [sp, 24]
str xzr, [x0, 40]
ldr x0, [sp, 24]
str xzr, [x0, 160]
ldr x0, [sp, 24]
mov w1, -1
str w1, [x0, 1784]
ldr x0, [sp, 24]
str wzr, [x0, 36]
ldr x0, [sp, 24]
str xzr, [x0, 24]
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE74:
.size vorbis_init, .-vorbis_init
.align 2
.global stb_vorbis_get_sample_offset
.type stb_vorbis_get_sample_offset, %function
stb_vorbis_get_sample_offset:
.LFB75:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
ldr x0, [sp, 8]
ldr w0, [x0, 1388]
cmp w0, 0
beq .L879
ldr x0, [sp, 8]
ldr w0, [x0, 1384]
b .L880
.L879:
mov w0, -1
.L880:
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE75:
.size stb_vorbis_get_sample_offset, .-stb_vorbis_get_sample_offset
.align 2
.global stb_vorbis_get_info
.type stb_vorbis_get_info, %function
stb_vorbis_get_info:
.LFB76:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
mov x1, x8
str x0, [sp, 8]
ldr x0, [sp, 8]
ldr w0, [x0, 4]
str w0, [sp, 28]
ldr x0, [sp, 8]
ldr w0, [x0]
str w0, [sp, 24]
ldr x0, [sp, 8]
ldr w0, [x0, 8]
str w0, [sp, 32]
ldr x0, [sp, 8]
ldr w0, [x0, 16]
str w0, [sp, 36]
ldr x0, [sp, 8]
ldr w0, [x0, 12]
str w0, [sp, 40]
ldr x0, [sp, 8]
ldr w0, [x0, 148]
asr w0, w0, 1
str w0, [sp, 44]
mov x3, x1
add x2, sp, 24
ldp x0, x1, [x2]
stp x0, x1, [x3]
ldr x0, [x2, 16]
str x0, [x3, 16]
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE76:
.size stb_vorbis_get_info, .-stb_vorbis_get_info
.align 2
.global stb_vorbis_get_error
.type stb_vorbis_get_error, %function
stb_vorbis_get_error:
.LFB77:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
ldr x0, [sp, 8]
ldr w0, [x0, 132]
str w0, [sp, 28]
ldr x0, [sp, 8]
str wzr, [x0, 132]
ldr w0, [sp, 28]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE77:
.size stb_vorbis_get_error, .-stb_vorbis_get_error
.align 2
.type vorbis_alloc, %function
vorbis_alloc:
.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]
mov w1, 1880
ldr x0, [sp, 24]
bl setup_malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE78:
.size vorbis_alloc, .-vorbis_alloc
.align 2
.global stb_vorbis_flush_pushdata
.type stb_vorbis_flush_pushdata, %function
stb_vorbis_flush_pushdata:
.LFB79:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
ldr x0, [sp, 8]
str wzr, [x0, 1248]
ldr x0, [sp, 8]
str wzr, [x0, 1784]
ldr x0, [sp, 8]
str wzr, [x0, 1776]
ldr x0, [sp, 8]
str wzr, [x0, 1388]
ldr x0, [sp, 8]
strb wzr, [x0, 1741]
ldr x0, [sp, 8]
str wzr, [x0, 1780]
ldr x0, [sp, 8]
str wzr, [x0, 1868]
ldr x0, [sp, 8]
str wzr, [x0, 1872]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE79:
.size stb_vorbis_flush_pushdata, .-stb_vorbis_flush_pushdata
.align 2
.type vorbis_search_for_page_pushdata, %function
vorbis_search_for_page_pushdata:
.LFB80:
.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 wzr, [sp, 60]
b .L889
.L890:
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
str wzr, [x0, 1800]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L889:
ldr x0, [sp, 40]
ldr w0, [x0, 1784]
ldr w1, [sp, 60]
cmp w1, w0
blt .L890
ldr x0, [sp, 40]
ldr w0, [x0, 1784]
cmp w0, 3
bgt .L891
ldr w0, [sp, 28]
cmp w0, 3
bgt .L892
mov w0, 0
b .L893
.L892:
ldr w0, [sp, 28]
sub w0, w0, #3
str w0, [sp, 28]
str wzr, [sp, 60]
b .L894
.L906:
ldrsw x0, [sp, 60]
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 79
bne .L895
ldrsw x0, [sp, 60]
ldr x1, [sp, 32]
add x3, x1, x0
mov x2, 4
adrp x0, ogg_page_header
add x1, x0, :lo12:ogg_page_header
mov x0, x3
bl memcmp
cmp w0, 0
bne .L895
ldr w0, [sp, 60]
add w0, w0, 26
ldr w1, [sp, 28]
cmp w1, w0
ble .L896
ldr w0, [sp, 60]
add w0, w0, 27
ldrsw x1, [sp, 60]
add x1, x1, 26
ldr x2, [sp, 32]
add x1, x2, x1
ldrb w1, [x1]
add w0, w0, w1
ldr w1, [sp, 28]
cmp w1, w0
bgt .L897
.L896:
ldr w0, [sp, 60]
str w0, [sp, 28]
b .L891
.L897:
ldrsw x0, [sp, 60]
add x0, x0, 26
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
add w0, w0, 27
str w0, [sp, 68]
str wzr, [sp, 64]
b .L898
.L899:
ldr w0, [sp, 60]
add w1, w0, 27
ldr w0, [sp, 64]
add w0, w1, w0
sxtw x0, w0
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 68]
add w0, w0, w1
str w0, [sp, 68]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L898:
ldrsw x0, [sp, 60]
add x0, x0, 26
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 64]
cmp w0, w1
blt .L899
str wzr, [sp, 72]
str wzr, [sp, 64]
b .L900
.L901:
ldr w1, [sp, 60]
ldr w0, [sp, 64]
add w0, w1, w0
sxtw x0, w0
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 72]
bl crc32_update
str w0, [sp, 72]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L900:
ldr w0, [sp, 64]
cmp w0, 21
ble .L901
b .L902
.L903:
mov w1, 0
ldr w0, [sp, 72]
bl crc32_update
str w0, [sp, 72]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L902:
ldr w0, [sp, 64]
cmp w0, 25
ble .L903
ldr x0, [sp, 40]
ldr w0, [x0, 1784]
add w2, w0, 1
ldr x1, [sp, 40]
str w2, [x1, 1784]
str w0, [sp, 88]
ldr w1, [sp, 68]
ldr w0, [sp, 64]
sub w2, w1, w0
ldr x3, [sp, 40]
ldrsw x1, [sp, 88]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x3, x0
str w2, [x0, 1792]
ldr x2, [sp, 40]
ldrsw x1, [sp, 88]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldr w1, [sp, 72]
str w1, [x0, 1796]
ldrsw x0, [sp, 60]
add x0, x0, 22
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
mov w2, w0
ldrsw x0, [sp, 60]
add x0, x0, 23
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
lsl w0, w0, 8
add w1, w2, w0
ldrsw x0, [sp, 60]
add x0, x0, 24
ldr x2, [sp, 32]
add x0, x2, x0
ldrb w0, [x0]
lsl w0, w0, 16
add w1, w1, w0
ldrsw x0, [sp, 60]
add x0, x0, 25
ldr x2, [sp, 32]
add x0, x2, x0
ldrb w0, [x0]
lsl w0, w0, 24
add w0, w1, w0
mov w3, w0
ldr x2, [sp, 40]
ldrsw x1, [sp, 88]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
str w3, [x0, 1788]
ldr w0, [sp, 60]
add w0, w0, 27
ldrsw x1, [sp, 60]
add x1, x1, 26
ldr x2, [sp, 32]
add x1, x2, x1
ldrb w1, [x1]
add w0, w0, w1
sxtw x0, w0
sub x0, x0, #1
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 255
bne .L904
ldr x2, [sp, 40]
ldrsw x1, [sp, 88]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
mov w1, -1
str w1, [x0, 1804]
b .L905
.L904:
ldrsw x0, [sp, 60]
add x0, x0, 6
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
mov w2, w0
ldrsw x0, [sp, 60]
add x0, x0, 7
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
lsl w0, w0, 8
add w1, w2, w0
ldrsw x0, [sp, 60]
add x0, x0, 8
ldr x2, [sp, 32]
add x0, x2, x0
ldrb w0, [x0]
lsl w0, w0, 16
add w1, w1, w0
ldrsw x0, [sp, 60]
add x0, x0, 9
ldr x2, [sp, 32]
add x0, x2, x0
ldrb w0, [x0]
lsl w0, w0, 24
add w0, w1, w0
mov w3, w0
ldr x2, [sp, 40]
ldrsw x1, [sp, 88]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
str w3, [x0, 1804]
.L905:
ldr w1, [sp, 60]
ldr w0, [sp, 64]
add w2, w1, w0
ldr x3, [sp, 40]
ldrsw x1, [sp, 88]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x3, x0
str w2, [x0, 1800]
ldr x0, [sp, 40]
ldr w0, [x0, 1784]
cmp w0, 4
beq .L914
.L895:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L894:
ldr w1, [sp, 60]
ldr w0, [sp, 28]
cmp w1, w0
blt .L906
b .L891
.L914:
nop
.L891:
str wzr, [sp, 60]
b .L907
.L913:
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldr w0, [x0, 1800]
str w0, [sp, 92]
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldr w0, [x0, 1792]
str w0, [sp, 84]
ldr w1, [sp, 28]
ldr w0, [sp, 92]
sub w0, w1, w0
ldr w1, [sp, 84]
cmp w1, w0
ble .L908
ldr w1, [sp, 28]
ldr w0, [sp, 92]
sub w0, w1, w0
str w0, [sp, 84]
.L908:
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldr w0, [x0, 1796]
str w0, [sp, 76]
str wzr, [sp, 80]
b .L909
.L910:
ldr w1, [sp, 92]
ldr w0, [sp, 80]
add w0, w1, w0
sxtw x0, w0
ldr x1, [sp, 32]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
ldr w0, [sp, 76]
bl crc32_update
str w0, [sp, 76]
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L909:
ldr w1, [sp, 80]
ldr w0, [sp, 84]
cmp w1, w0
blt .L910
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldr w1, [x0, 1792]
ldr w0, [sp, 84]
sub w2, w1, w0
ldr x3, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x3, x0
str w2, [x0, 1792]
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldr w1, [sp, 76]
str w1, [x0, 1796]
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldr w0, [x0, 1792]
cmp w0, 0
bne .L911
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldr w2, [x0, 1796]
ldr x3, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x3, x0
ldr w0, [x0, 1788]
cmp w2, w0
bne .L912
ldr w1, [sp, 92]
ldr w0, [sp, 84]
add w0, w1, w0
str w0, [sp, 28]
ldr x0, [sp, 40]
mov w1, -1
str w1, [x0, 1784]
ldr x0, [sp, 40]
str wzr, [x0, 1248]
ldr x0, [sp, 40]
mov w1, -1
str w1, [x0, 1744]
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
ldr w1, [x0, 1804]
ldr x0, [sp, 40]
str w1, [x0, 1384]
ldr x0, [sp, 40]
ldr w0, [x0, 1384]
cmn w0, #1
cset w0, ne
and w0, w0, 255
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0, 1388]
ldr w0, [sp, 28]
b .L893
.L912:
ldr x0, [sp, 40]
ldr w0, [x0, 1784]
sub w1, w0, #1
ldr x0, [sp, 40]
str w1, [x0, 1784]
ldr x0, [sp, 40]
ldr w4, [x0, 1784]
ldr x2, [sp, 40]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
add x0, x0, 2048
sub x0, x0, #272
add x3, x0, 12
ldr x2, [sp, 40]
sxtw x1, w4
mov x0, x1
lsl x0, x0, 2
add x0, x0, x1
lsl x0, x0, 2
add x0, x2, x0
add x0, x0, 2048
sub x0, x0, #272
add x0, x0, 12
mov x2, x3
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr w0, [x3, 16]
str w0, [x2, 16]
b .L907
.L911:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L907:
ldr x0, [sp, 40]
ldr w0, [x0, 1784]
ldr w1, [sp, 60]
cmp w1, w0
blt .L913
ldr w0, [sp, 28]
.L893:
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE80:
.size vorbis_search_for_page_pushdata, .-vorbis_search_for_page_pushdata
.align 2
.global stb_vorbis_decode_frame_pushdata
.type stb_vorbis_decode_frame_pushdata, %function
stb_vorbis_decode_frame_pushdata:
.LFB81:
.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 x1, [sp, 48]
str w2, [sp, 44]
str x3, [sp, 32]
str x4, [sp, 24]
str x5, [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 x0, [sp, 56]
ldrb w0, [x0, 68]
cmp w0, 0
bne .L916
mov w1, 2
ldr x0, [sp, 56]
bl error
b .L932
.L916:
ldr x0, [sp, 56]
ldr w0, [x0, 1784]
cmp w0, 0
blt .L918
ldr x0, [sp, 16]
str wzr, [x0]
ldr w2, [sp, 44]
ldr x1, [sp, 48]
ldr x0, [sp, 56]
bl vorbis_search_for_page_pushdata
b .L932
.L918:
ldr x0, [sp, 56]
ldr x1, [sp, 48]
str x1, [x0, 40]
ldrsw x0, [sp, 44]
ldr x1, [sp, 48]
add x1, x1, x0
ldr x0, [sp, 56]
str x1, [x0, 56]
ldr x0, [sp, 56]
str wzr, [x0, 132]
mov w1, 0
ldr x0, [sp, 56]
bl is_whole_packet_present
cmp w0, 0
bne .L919
ldr x0, [sp, 16]
str wzr, [x0]
mov w0, 0
b .L932
.L919:
add x2, sp, 72
add x1, sp, 76
add x0, sp, 68
mov x3, x2
mov x2, x1
mov x1, x0
ldr x0, [sp, 56]
bl vorbis_decode_packet
cmp w0, 0
bne .L920
ldr x0, [sp, 56]
ldr w0, [x0, 132]
str w0, [sp, 84]
ldr w0, [sp, 84]
cmp w0, 35
bne .L921
ldr x0, [sp, 56]
str wzr, [x0, 132]
b .L922
.L924:
ldr x0, [sp, 56]
ldr w0, [x0, 128]
cmp w0, 0
bne .L934
.L922:
ldr x0, [sp, 56]
bl get8_packet
cmn w0, #1
bne .L924
b .L923
.L934:
nop
.L923:
ldr x0, [sp, 16]
str wzr, [x0]
ldr x0, [sp, 56]
ldr x1, [x0, 40]
ldr x0, [sp, 48]
sub x0, x1, x0
b .L932
.L921:
ldr w0, [sp, 84]
cmp w0, 32
bne .L925
ldr x0, [sp, 56]
ldr w0, [x0, 1248]
cmp w0, 0
bne .L925
ldr x0, [sp, 56]
str wzr, [x0, 132]
b .L926
.L928:
ldr x0, [sp, 56]
ldr w0, [x0, 128]
cmp w0, 0
bne .L935
.L926:
ldr x0, [sp, 56]
bl get8_packet
cmn w0, #1
bne .L928
b .L927
.L935:
nop
.L927:
ldr x0, [sp, 16]
str wzr, [x0]
ldr x0, [sp, 56]
ldr x1, [x0, 40]
ldr x0, [sp, 48]
sub x0, x1, x0
b .L932
.L925:
ldr x0, [sp, 56]
bl stb_vorbis_flush_pushdata
ldr x0, [sp, 56]
ldr w1, [sp, 84]
str w1, [x0, 132]
ldr x0, [sp, 16]
str wzr, [x0]
mov w0, 1
b .L932
.L920:
ldr w0, [sp, 68]
ldr w1, [sp, 76]
ldr w2, [sp, 72]
mov w3, w2
mov w2, w1
mov w1, w0
ldr x0, [sp, 56]
bl vorbis_finish_frame
str w0, [sp, 68]
str wzr, [sp, 80]
b .L929
.L930:
ldr x0, [sp, 56]
ldrsw x1, [sp, 80]
add x1, x1, 108
ldr x1, [x0, x1, lsl 3]
ldr w0, [sp, 76]
sxtw x0, w0
lsl x0, x0, 2
add x2, x1, x0
ldr x0, [sp, 56]
ldrsw x1, [sp, 80]
add x1, x1, 124
str x2, [x0, x1, lsl 3]
ldr w0, [sp, 80]
add w0, w0, 1
str w0, [sp, 80]
.L929:
ldr x0, [sp, 56]
ldr w0, [x0, 4]
ldr w1, [sp, 80]
cmp w1, w0
blt .L930
ldr x0, [sp, 32]
cmp x0, 0
beq .L931
ldr x0, [sp, 56]
ldr w1, [x0, 4]
ldr x0, [sp, 32]
str w1, [x0]
.L931:
ldr w1, [sp, 68]
ldr x0, [sp, 16]
str w1, [x0]
ldr x0, [sp, 56]
add x1, x0, 992
ldr x0, [sp, 24]
str x1, [x0]
ldr x0, [sp, 56]
ldr x1, [x0, 40]
ldr x0, [sp, 48]
sub x0, x1, x0
.L932:
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 .L933
bl __stack_chk_fail
.L933:
mov w0, w1
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE81:
.size stb_vorbis_decode_frame_pushdata, .-stb_vorbis_decode_frame_pushdata
.align 2
.global stb_vorbis_open_pushdata
.type stb_vorbis_open_pushdata, %function
stb_vorbis_open_pushdata:
.LFB82:
.cfi_startproc
sub sp, sp, #1968
.cfi_def_cfa_offset 1968
stp x29, x30, [sp]
.cfi_offset 29, -1968
.cfi_offset 30, -1960
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, 1960]
mov x1, 0
add x0, sp, 80
ldr x1, [sp, 24]
bl vorbis_init
ldr x0, [sp, 56]
str x0, [sp, 120]
ldrsw x0, [sp, 52]
ldr x1, [sp, 56]
add x0, x1, x0
str x0, [sp, 136]
mov w0, 1
strb w0, [sp, 148]
add x0, sp, 80
bl start_decoder
cmp w0, 0
bne .L937
ldr w0, [sp, 208]
cmp w0, 0
beq .L938
ldr x0, [sp, 32]
mov w1, 1
str w1, [x0]
b .L939
.L938:
ldr w0, [sp, 212]
mov w1, w0
ldr x0, [sp, 32]
str w1, [x0]
.L939:
mov x0, 0
b .L942
.L937:
add x0, sp, 80
bl vorbis_alloc
str x0, [sp, 72]
ldr x0, [sp, 72]
cmp x0, 0
beq .L941
ldr x0, [sp, 72]
mov x3, x0
add x0, sp, 80
mov x1, 1880
mov x2, x1
mov x1, x0
mov x0, x3
bl memcpy
ldr x0, [sp, 72]
ldr x1, [x0, 40]
ldr x0, [sp, 56]
sub x0, x1, x0
mov w1, w0
ldr x0, [sp, 40]
str w1, [x0]
ldr x0, [sp, 32]
str wzr, [x0]
ldr x0, [sp, 72]
b .L942
.L941:
add x0, sp, 80
bl vorbis_deinit
mov x0, 0
.L942:
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 1960]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L943
bl __stack_chk_fail
.L943:
mov x0, x1
ldp x29, x30, [sp]
add sp, sp, 1968
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE82:
.size stb_vorbis_open_pushdata, .-stb_vorbis_open_pushdata
.align 2
.global stb_vorbis_get_file_offset
.type stb_vorbis_get_file_offset, %function
stb_vorbis_get_file_offset:
.LFB83:
.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]
ldrb w0, [x0, 68]
cmp w0, 0
beq .L945
mov w0, 0
b .L946
.L945:
ldr x0, [sp, 24]
ldr x0, [x0, 40]
cmp x0, 0
beq .L947
ldr x0, [sp, 24]
ldr x1, [x0, 40]
ldr x0, [sp, 24]
ldr x0, [x0, 48]
sub x0, x1, x0
b .L946
.L947:
ldr x0, [sp, 24]
ldr x0, [x0, 24]
bl ftell
mov w1, w0
ldr x0, [sp, 24]
ldr w0, [x0, 32]
sub w0, w1, w0
.L946:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE83:
.size stb_vorbis_get_file_offset, .-stb_vorbis_get_file_offset
.align 2
.type vorbis_find_page, %function
vorbis_find_page:
.LFB84:
.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
.L979:
ldr x0, [sp, 40]
ldr w0, [x0, 128]
cmp w0, 0
beq .L949
mov w0, 0
b .L950
.L949:
ldr x0, [sp, 40]
bl get8
and w0, w0, 255
str w0, [sp, 72]
ldr w0, [sp, 72]
cmp w0, 79
bne .L979
ldr x0, [sp, 40]
bl stb_vorbis_get_file_offset
str w0, [sp, 76]
ldr w0, [sp, 76]
sub w1, w0, #25
ldr x0, [sp, 40]
ldr w0, [x0, 64]
cmp w1, w0
bls .L952
mov w0, 0
b .L950
.L952:
mov w0, 1
str w0, [sp, 56]
b .L953
.L956:
ldr x0, [sp, 40]
bl get8
and w1, w0, 255
adrp x0, ogg_page_header
add x2, x0, :lo12:ogg_page_header
ldrsw x0, [sp, 56]
ldrb w0, [x2, x0]
cmp w1, w0
bne .L981
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L953:
ldr w0, [sp, 56]
cmp w0, 3
ble .L956
b .L955
.L981:
nop
.L955:
ldr x0, [sp, 40]
ldr w0, [x0, 128]
cmp w0, 0
beq .L957
mov w0, 0
b .L950
.L957:
ldr w0, [sp, 56]
cmp w0, 4
bne .L982
str wzr, [sp, 60]
b .L959
.L960:
adrp x0, ogg_page_header
add x1, x0, :lo12:ogg_page_header
ldr w0, [sp, 60]
ldrb w2, [x1, x0]
ldr w0, [sp, 60]
add x1, sp, 88
strb w2, [x1, x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L959:
ldr w0, [sp, 60]
cmp w0, 3
bls .L960
b .L961
.L962:
ldr x0, [sp, 40]
bl get8
and w2, w0, 255
ldr w0, [sp, 60]
add x1, sp, 88
strb w2, [x1, x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L961:
ldr w0, [sp, 60]
cmp w0, 26
bls .L962
ldr x0, [sp, 40]
ldr w0, [x0, 128]
cmp w0, 0
beq .L963
mov w0, 0
b .L950
.L963:
ldrb w0, [sp, 92]
cmp w0, 0
bne .L983
ldrb w0, [sp, 110]
mov w1, w0
ldrb w0, [sp, 111]
lsl w0, w0, 8
add w1, w1, w0
ldrb w0, [sp, 112]
lsl w0, w0, 16
add w1, w1, w0
ldrb w0, [sp, 113]
lsl w0, w0, 24
add w0, w1, w0
str w0, [sp, 80]
mov w0, 22
str w0, [sp, 60]
b .L966
.L967:
ldr w0, [sp, 60]
add x1, sp, 88
strb wzr, [x1, x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L966:
ldr w0, [sp, 60]
cmp w0, 25
bls .L967
str wzr, [sp, 64]
str wzr, [sp, 60]
b .L968
.L969:
ldr w0, [sp, 60]
add x1, sp, 88
ldrb w0, [x1, x0]
mov w1, w0
ldr w0, [sp, 64]
bl crc32_update
str w0, [sp, 64]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L968:
ldr w0, [sp, 60]
cmp w0, 26
bls .L969
str wzr, [sp, 68]
str wzr, [sp, 60]
b .L970
.L971:
ldr x0, [sp, 40]
bl get8
and w0, w0, 255
str w0, [sp, 84]
ldr w0, [sp, 84]
and w0, w0, 255
mov w1, w0
ldr w0, [sp, 64]
bl crc32_update
str w0, [sp, 64]
ldr w0, [sp, 84]
ldr w1, [sp, 68]
add w0, w1, w0
str w0, [sp, 68]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L970:
ldrb w0, [sp, 114]
mov w1, w0
ldr w0, [sp, 60]
cmp w0, w1
bcc .L971
ldr w0, [sp, 68]
cmp w0, 0
beq .L972
ldr x0, [sp, 40]
ldr w0, [x0, 128]
cmp w0, 0
beq .L972
mov w0, 0
b .L950
.L972:
str wzr, [sp, 60]
b .L973
.L974:
ldr x0, [sp, 40]
bl get8
and w0, w0, 255
mov w1, w0
ldr w0, [sp, 64]
bl crc32_update
str w0, [sp, 64]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L973:
ldr w1, [sp, 60]
ldr w0, [sp, 68]
cmp w1, w0
bcc .L974
ldr w1, [sp, 64]
ldr w0, [sp, 80]
cmp w1, w0
bne .L958
ldr x0, [sp, 32]
cmp x0, 0
beq .L976
ldr x0, [sp, 40]
bl stb_vorbis_get_file_offset
mov w1, w0
ldr x0, [sp, 32]
str w1, [x0]
.L976:
ldr x0, [sp, 24]
cmp x0, 0
beq .L977
ldrb w0, [sp, 93]
and w0, w0, 4
cmp w0, 0
beq .L978
ldr x0, [sp, 24]
mov w1, 1
str w1, [x0]
b .L977
.L978:
ldr x0, [sp, 24]
str wzr, [x0]
.L977:
ldr w0, [sp, 76]
sub w0, w0, #1
mov w1, w0
ldr x0, [sp, 40]
bl set_file_offset
mov w0, 1
b .L950
.L982:
nop
b .L958
.L983:
nop
.L958:
ldr w1, [sp, 76]
ldr x0, [sp, 40]
bl set_file_offset
b .L979
.L950:
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 .L980
bl __stack_chk_fail
.L980:
mov w0, w1
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE84:
.size vorbis_find_page, .-vorbis_find_page
.align 2
.type get_seek_page_info, %function
get_seek_page_info:
.LFB85:
.cfi_startproc
stp x29, x30, [sp, -336]!
.cfi_def_cfa_offset 336
.cfi_offset 29, -336
.cfi_offset 30, -328
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, 328]
mov x1, 0
ldr x0, [sp, 24]
bl stb_vorbis_get_file_offset
mov w1, w0
ldr x0, [sp, 16]
str w1, [x0]
add x0, sp, 40
mov w2, 27
mov x1, x0
ldr x0, [sp, 24]
bl getn
ldrb w0, [sp, 40]
cmp w0, 79
bne .L985
ldrb w0, [sp, 41]
cmp w0, 103
bne .L985
ldrb w0, [sp, 42]
cmp w0, 103
bne .L985
ldrb w0, [sp, 43]
cmp w0, 83
beq .L986
.L985:
mov w0, 0
b .L990
.L986:
ldrb w0, [sp, 66]
mov w1, w0
add x0, sp, 72
mov w2, w1
mov x1, x0
ldr x0, [sp, 24]
bl getn
str wzr, [sp, 36]
str wzr, [sp, 32]
b .L988
.L989:
ldrsw x0, [sp, 32]
add x1, sp, 72
ldrb w0, [x1, x0]
mov w1, w0
ldr w0, [sp, 36]
add w0, w0, w1
str w0, [sp, 36]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L988:
ldrb w0, [sp, 66]
mov w1, w0
ldr w0, [sp, 32]
cmp w0, w1
blt .L989
ldr x0, [sp, 16]
ldr w0, [x0]
ldrb w1, [sp, 66]
add w1, w0, w1
ldr w0, [sp, 36]
add w0, w1, w0
add w1, w0, 27
ldr x0, [sp, 16]
str w1, [x0, 4]
ldrb w0, [sp, 46]
mov w1, w0
ldrb w0, [sp, 47]
lsl w0, w0, 8
add w1, w1, w0
ldrb w0, [sp, 48]
lsl w0, w0, 16
add w1, w1, w0
ldrb w0, [sp, 49]
lsl w0, w0, 24
add w0, w1, w0
mov w1, w0
ldr x0, [sp, 16]
str w1, [x0, 8]
ldr x0, [sp, 16]
ldr w0, [x0]
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
mov w0, 1
.L990:
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 .L991
bl __stack_chk_fail
.L991:
mov w0, w1
ldp x29, x30, [sp], 336
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE85:
.size get_seek_page_info, .-get_seek_page_info
.align 2
.type go_to_page_before, %function
go_to_page_before:
.LFB86:
.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]
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 w1, [sp, 20]
mov w0, 65535
cmp w1, w0
bls .L993
ldr w0, [sp, 20]
sub w1, w0, #65536
ldr x0, [sp, 24]
ldr w0, [x0, 72]
cmp w1, w0
bcc .L993
ldr w0, [sp, 20]
sub w0, w0, #65536
str w0, [sp, 36]
b .L994
.L993:
ldr x0, [sp, 24]
ldr w0, [x0, 72]
str w0, [sp, 36]
.L994:
ldr w1, [sp, 36]
ldr x0, [sp, 24]
bl set_file_offset
b .L995
.L998:
ldr w0, [sp, 32]
ldr w1, [sp, 20]
cmp w1, w0
bhi .L996
ldr x0, [sp, 24]
bl stb_vorbis_get_file_offset
mov w1, w0
ldr w0, [sp, 20]
cmp w0, w1
bls .L996
mov w0, 1
b .L999
.L996:
ldr w0, [sp, 32]
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
.L995:
add x0, sp, 32
mov x2, 0
mov x1, x0
ldr x0, [sp, 24]
bl vorbis_find_page
cmp w0, 0
bne .L998
mov w0, 0
.L999:
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 .L1000
bl __stack_chk_fail
.L1000:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE86:
.size go_to_page_before, .-go_to_page_before
.section .rodata
.align 3
.LC22:
.string "right.last_decoded_sample != ~0U"
.align 3
.LC23:
.string "left.page_end < right.page_start"
.align 3
.LC24:
.string "mid.page_start < right.page_start"
.align 3
.LC25:
.string "end_pos >= 0"
.text
.align 2
.type seek_to_sample_coarse, %function
seek_to_sample_coarse:
.LFB87:
.cfi_startproc
stp x29, x30, [sp, -160]!
.cfi_def_cfa_offset 160
.cfi_offset 29, -160
.cfi_offset 30, -152
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, 152]
mov x1, 0
str wzr, [sp, 52]
ldr x0, [sp, 24]
bl stb_vorbis_stream_length_in_samples
str w0, [sp, 56]
ldr w0, [sp, 56]
cmp w0, 0
bne .L1002
mov w1, 7
ldr x0, [sp, 24]
bl error
b .L1051
.L1002:
ldr w1, [sp, 20]
ldr w0, [sp, 56]
cmp w1, w0
bls .L1004
mov w1, 11
ldr x0, [sp, 24]
bl error
b .L1051
.L1004:
ldr x0, [sp, 24]
ldr w1, [x0, 148]
ldr x0, [sp, 24]
ldr w0, [x0, 144]
sub w0, w1, w0
asr w0, w0, 2
str w0, [sp, 60]
ldr w1, [sp, 20]
ldr w0, [sp, 60]
cmp w1, w0
bcs .L1005
str wzr, [sp, 20]
b .L1006
.L1005:
ldr w1, [sp, 20]
ldr w0, [sp, 60]
sub w0, w1, w0
str w0, [sp, 20]
.L1006:
ldr x0, [sp, 24]
add x1, x0, 76
add x0, sp, 104
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 8]
str w1, [x0, 8]
b .L1007
.L1009:
ldr w0, [sp, 108]
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
add x0, sp, 104
mov x1, x0
ldr x0, [sp, 24]
bl get_seek_page_info
cmp w0, 0
beq .L1060
.L1007:
ldr w0, [sp, 112]
cmn w0, #1
beq .L1009
ldr x0, [sp, 24]
add x1, x0, 88
add x0, sp, 120
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 8]
str w1, [x0, 8]
ldr w0, [sp, 128]
cmn w0, #1
bne .L1010
adrp x0, __PRETTY_FUNCTION__.4
add x3, x0, :lo12:__PRETTY_FUNCTION__.4
mov w2, 4612
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl __assert_fail
.L1010:
ldr w0, [sp, 112]
ldr w1, [sp, 20]
cmp w1, w0
bhi .L1012
ldr x0, [sp, 24]
bl stb_vorbis_seek_start
mov w0, 1
b .L1051
.L1039:
ldr w1, [sp, 108]
ldr w0, [sp, 120]
cmp w1, w0
bcc .L1013
adrp x0, __PRETTY_FUNCTION__.4
add x3, x0, :lo12:__PRETTY_FUNCTION__.4
mov w2, 4621
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl __assert_fail
.L1013:
ldr w1, [sp, 120]
ldr w0, [sp, 108]
sub w0, w1, w0
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 65536
bhi .L1014
ldr w0, [sp, 108]
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
b .L1034
.L1014:
ldr w0, [sp, 52]
cmp w0, 1
bgt .L1016
ldr w0, [sp, 52]
cmp w0, 0
bne .L1017
ldr w1, [sp, 124]
ldr w0, [sp, 104]
sub w0, w1, w0
ucvtf d0, w0
str d0, [sp, 96]
ldr w0, [sp, 128]
ucvtf d0, w0
ldr d1, [sp, 96]
fdiv d0, d1, d0
str d0, [sp, 80]
ldr w0, [sp, 104]
ucvtf d1, w0
ldr w0, [sp, 112]
ldr w1, [sp, 20]
sub w0, w1, w0
ucvtf d2, w0
ldr d0, [sp, 80]
fmul d0, d2, d0
fadd d0, d1, d0
str d0, [sp, 72]
b .L1018
.L1017:
ldr w0, [sp, 20]
ucvtf d1, w0
ldr w0, [sp, 144]
ucvtf d0, w0
fsub d0, d1, d0
ldr d1, [sp, 80]
fmul d0, d1, d0
str d0, [sp, 88]
ldr d0, [sp, 88]
fcmpe d0, #0.0
bge .L1053
b .L1019
.L1053:
ldr d0, [sp, 88]
mov x0, 70368744177664
movk x0, 0x40bf, lsl 48
fmov d1, x0
fcmpe d0, d1
bmi .L1054
b .L1019
.L1054:
mov x0, 70368744177664
movk x0, 0x40bf, lsl 48
fmov d0, x0
str d0, [sp, 88]
.L1019:
ldr d0, [sp, 88]
fcmpe d0, #0.0
bmi .L1055
b .L1022
.L1055:
ldr d0, [sp, 88]
mov x0, 70368744177664
movk x0, 0xc0bf, lsl 48
fmov d1, x0
fcmpe d0, d1
bgt .L1056
b .L1022
.L1056:
mov x0, 70368744177664
movk x0, 0xc0bf, lsl 48
fmov d0, x0
str d0, [sp, 88]
.L1022:
ldr d0, [sp, 88]
fadd d0, d0, d0
ldr d1, [sp, 72]
fadd d0, d1, d0
str d0, [sp, 72]
.L1018:
ldr w0, [sp, 108]
ucvtf d0, w0
ldr d1, [sp, 72]
fcmpe d1, d0
bmi .L1057
b .L1025
.L1057:
ldr w0, [sp, 108]
ucvtf d0, w0
str d0, [sp, 72]
.L1025:
ldr w0, [sp, 120]
sub w0, w0, #65536
ucvtf d0, w0
ldr d1, [sp, 72]
fcmpe d1, d0
bgt .L1058
b .L1027
.L1058:
ldr w0, [sp, 120]
sub w0, w0, #65536
ucvtf d0, w0
str d0, [sp, 72]
.L1027:
ldr d0, [sp, 72]
fcvtzu w0, d0
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
b .L1029
.L1016:
ldr w1, [sp, 108]
ldr w0, [sp, 64]
lsr w0, w0, 1
add w0, w1, w0
sub w0, w0, #32768
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
.L1029:
mov x2, 0
mov x1, 0
ldr x0, [sp, 24]
bl vorbis_find_page
cmp w0, 0
beq .L1061
.L1034:
add x0, sp, 136
mov x1, x0
ldr x0, [sp, 24]
bl get_seek_page_info
cmp w0, 0
beq .L1062
ldr w0, [sp, 144]
cmn w0, #1
bne .L1063
ldr w0, [sp, 140]
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
ldr w1, [sp, 136]
ldr w0, [sp, 120]
cmp w1, w0
bcc .L1034
adrp x0, __PRETTY_FUNCTION__.4
add x3, x0, :lo12:__PRETTY_FUNCTION__.4
mov w2, 4663
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl __assert_fail
.L1063:
nop
ldr w1, [sp, 136]
ldr w0, [sp, 120]
cmp w1, w0
beq .L1064
ldr w0, [sp, 144]
ldr w1, [sp, 20]
cmp w1, w0
bcs .L1037
add x0, sp, 120
add x1, sp, 136
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 8]
str w1, [x0, 8]
b .L1038
.L1037:
add x0, sp, 104
add x1, sp, 136
ldr x2, [x1]
str x2, [x0]
ldr w1, [x1, 8]
str w1, [x0, 8]
.L1038:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L1012:
ldr w1, [sp, 108]
ldr w0, [sp, 120]
cmp w1, w0
bne .L1039
b .L1036
.L1064:
nop
.L1036:
ldr w0, [sp, 104]
str w0, [sp, 48]
ldr w0, [sp, 48]
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
ldr x0, [sp, 24]
bl start_page
cmp w0, 0
bne .L1040
mov w1, 37
ldr x0, [sp, 24]
bl error
b .L1051
.L1040:
ldr x0, [sp, 24]
ldr w0, [x0, 1768]
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
bge .L1041
adrp x0, __PRETTY_FUNCTION__.4
add x3, x0, :lo12:__PRETTY_FUNCTION__.4
mov w2, 4684
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl __assert_fail
.L1041:
ldr w0, [sp, 44]
str w0, [sp, 40]
b .L1042
.L1045:
ldr w0, [sp, 40]
sub w0, w0, #1
ldr x1, [sp, 24]
sxtw x0, w0
add x0, x1, x0
ldrb w0, [x0, 1484]
cmp w0, 255
bne .L1065
ldr w0, [sp, 40]
sub w0, w0, #1
str w0, [sp, 40]
.L1042:
ldr w0, [sp, 40]
cmp w0, 0
bgt .L1045
b .L1044
.L1065:
nop
.L1044:
ldr w0, [sp, 40]
str w0, [sp, 68]
ldr w0, [sp, 68]
cmp w0, 0
bgt .L1046
ldr x0, [sp, 24]
ldrb w0, [x0, 1739]
and w0, w0, 1
cmp w0, 0
beq .L1046
ldr w0, [sp, 48]
mov w1, w0
ldr x0, [sp, 24]
bl go_to_page_before
cmp w0, 0
beq .L1066
ldr x0, [sp, 24]
bl stb_vorbis_get_file_offset
str w0, [sp, 48]
ldr x0, [sp, 24]
bl start_page
cmp w0, 0
beq .L1067
ldr x0, [sp, 24]
ldr w0, [x0, 1480]
sub w0, w0, #1
str w0, [sp, 44]
b .L1041
.L1046:
ldr x0, [sp, 24]
str wzr, [x0, 1388]
ldr x0, [sp, 24]
str wzr, [x0, 1748]
ldr x0, [sp, 24]
str wzr, [x0, 1760]
ldr x0, [sp, 24]
str wzr, [x0, 1764]
ldr x0, [sp, 24]
strb wzr, [x0, 1740]
ldr x0, [sp, 24]
str wzr, [x0, 1248]
ldr x0, [sp, 24]
ldr w1, [sp, 68]
str w1, [x0, 1744]
str wzr, [sp, 40]
b .L1049
.L1050:
ldr x1, [sp, 24]
ldrsw x0, [sp, 40]
add x0, x1, x0
ldrb w0, [x0, 1484]
mov w1, w0
ldr x0, [sp, 24]
bl skip
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L1049:
ldr w1, [sp, 40]
ldr w0, [sp, 68]
cmp w1, w0
blt .L1050
ldr x0, [sp, 24]
bl vorbis_pump_first_frame
mov w0, 1
b .L1051
.L1060:
nop
b .L1008
.L1061:
nop
b .L1008
.L1062:
nop
b .L1008
.L1066:
nop
b .L1008
.L1067:
nop
.L1008:
ldr x0, [sp, 24]
bl stb_vorbis_seek_start
mov w1, 37
ldr x0, [sp, 24]
bl error
.L1051:
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 .L1052
bl __stack_chk_fail
.L1052:
mov w0, w1
ldp x29, x30, [sp], 160
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE87:
.size seek_to_sample_coarse, .-seek_to_sample_coarse
.align 2
.type peek_decode_initial, %function
peek_decode_initial:
.LFB88:
.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 x1, [sp, 48]
str x2, [sp, 40]
str x3, [sp, 32]
str x4, [sp, 24]
str x5, [sp, 16]
ldr x5, [sp, 16]
ldr x4, [sp, 24]
ldr x3, [sp, 32]
ldr x2, [sp, 40]
ldr x1, [sp, 48]
ldr x0, [sp, 56]
bl vorbis_decode_initial
cmp w0, 0
bne .L1069
mov w0, 0
b .L1070
.L1069:
ldr x0, [sp, 56]
ldr w0, [x0, 472]
sub w0, w0, #1
bl ilog
add w0, w0, 1
str w0, [sp, 72]
ldr x0, [sp, 16]
ldr w0, [x0]
ldr x2, [sp, 56]
sxtw x1, w0
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 1
add x0, x2, x0
ldrb w0, [x0, 476]
cmp w0, 0
beq .L1071
ldr w0, [sp, 72]
add w0, w0, 2
str w0, [sp, 72]
.L1071:
ldr w0, [sp, 72]
add w0, w0, 7
add w1, w0, 7
cmp w0, 0
csel w0, w1, w0, lt
asr w0, w0, 3
str w0, [sp, 76]
ldr x0, [sp, 56]
ldrb w1, [x0, 1740]
ldr w0, [sp, 76]
and w0, w0, 255
add w0, w1, w0
and w1, w0, 255
ldr x0, [sp, 56]
strb w1, [x0, 1740]
ldr x0, [sp, 56]
ldr w1, [x0, 1764]
ldr w0, [sp, 76]
sub w1, w1, w0
ldr x0, [sp, 56]
str w1, [x0, 1764]
ldr w0, [sp, 76]
neg w0, w0
mov w1, w0
ldr x0, [sp, 56]
bl skip
ldr x0, [sp, 56]
ldr w0, [x0, 1744]
cmn w0, #1
bne .L1072
ldr x0, [sp, 56]
ldr w0, [x0, 1480]
sub w1, w0, #1
ldr x0, [sp, 56]
str w1, [x0, 1744]
b .L1073
.L1072:
ldr x0, [sp, 56]
ldr w0, [x0, 1744]
sub w1, w0, #1
ldr x0, [sp, 56]
str w1, [x0, 1744]
.L1073:
ldr x0, [sp, 56]
str wzr, [x0, 1760]
mov w0, 1
.L1070:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE88:
.size peek_decode_initial, .-peek_decode_initial
.section .rodata
.align 3
.LC26:
.string "f->current_loc_valid"
.align 3
.LC27:
.string "f->current_loc <= sample_number"
.align 3
.LC28:
.string "f->current_loc == sample_number"
.text
.align 2
.global stb_vorbis_seek_frame
.type stb_vorbis_seek_frame, %function
stb_vorbis_seek_frame:
.LFB89:
.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
ldr x0, [sp, 24]
ldrb w0, [x0, 68]
cmp w0, 0
beq .L1075
mov w1, 2
ldr x0, [sp, 24]
bl error
b .L1076
.L1075:
ldr w1, [sp, 20]
ldr x0, [sp, 24]
bl seek_to_sample_coarse
cmp w0, 0
bne .L1077
mov w0, 0
b .L1076
.L1077:
ldr x0, [sp, 24]
ldr w0, [x0, 1388]
cmp w0, 0
bne .L1078
adrp x0, __PRETTY_FUNCTION__.3
add x3, x0, :lo12:__PRETTY_FUNCTION__.3
mov w2, 4763
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl __assert_fail
.L1078:
ldr x0, [sp, 24]
ldr w0, [x0, 1384]
ldr w1, [sp, 20]
cmp w1, w0
bcs .L1079
adrp x0, __PRETTY_FUNCTION__.3
add x3, x0, :lo12:__PRETTY_FUNCTION__.3
mov w2, 4764
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl __assert_fail
.L1079:
ldr x0, [sp, 24]
ldr w1, [x0, 148]
mov w0, w1
lsl w0, w0, 1
add w1, w0, w1
ldr x0, [sp, 24]
ldr w0, [x0, 144]
sub w0, w1, w0
asr w0, w0, 2
str w0, [sp, 64]
b .L1080
.L1086:
add x4, sp, 60
add x3, sp, 56
add x2, sp, 52
add x1, sp, 48
add x0, sp, 44
mov x5, x4
mov x4, x3
mov x3, x2
mov x2, x1
mov x1, x0
ldr x0, [sp, 24]
bl peek_decode_initial
cmp w0, 0
bne .L1081
mov w1, 37
ldr x0, [sp, 24]
bl error
b .L1076
.L1081:
ldr w1, [sp, 52]
ldr w0, [sp, 44]
sub w0, w1, w0
str w0, [sp, 68]
ldr x0, [sp, 24]
ldr w1, [x0, 1384]
ldr w0, [sp, 68]
add w0, w1, w0
ldr w1, [sp, 20]
cmp w1, w0
bcs .L1083
mov w0, 1
b .L1076
.L1083:
ldr x0, [sp, 24]
ldr w1, [x0, 1384]
ldr w0, [sp, 68]
add w1, w1, w0
ldr w0, [sp, 64]
add w0, w1, w0
ldr w1, [sp, 20]
cmp w1, w0
bcs .L1084
ldr x0, [sp, 24]
bl vorbis_pump_first_frame
b .L1080
.L1084:
ldr x0, [sp, 24]
ldr w1, [x0, 1384]
ldr w0, [sp, 68]
add w1, w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1384]
ldr x0, [sp, 24]
str wzr, [x0, 1248]
ldr x0, [sp, 24]
bl maybe_start_packet
ldr x0, [sp, 24]
bl flush_packet
.L1080:
ldr x0, [sp, 24]
ldr w0, [x0, 1384]
ldr w1, [sp, 20]
cmp w1, w0
bhi .L1086
ldr x0, [sp, 24]
ldr w0, [x0, 1384]
ldr w1, [sp, 20]
cmp w1, w0
beq .L1087
adrp x0, __PRETTY_FUNCTION__.3
add x3, x0, :lo12:__PRETTY_FUNCTION__.3
mov w2, 4788
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC28
add x0, x0, :lo12:.LC28
bl __assert_fail
.L1087:
mov w0, 1
.L1076:
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 .L1088
bl __stack_chk_fail
.L1088:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE89:
.size stb_vorbis_seek_frame, .-stb_vorbis_seek_frame
.section .rodata
.align 3
.LC29:
.string "sample_number > frame_start"
.align 3
.LC30:
.string "f->channel_buffer_start + (int) (sample_number-frame_start) <= f->channel_buffer_end"
.text
.align 2
.global stb_vorbis_seek
.type stb_vorbis_seek, %function
stb_vorbis_seek:
.LFB90:
.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]
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 w1, [sp, 20]
ldr x0, [sp, 24]
bl stb_vorbis_seek_frame
cmp w0, 0
bne .L1090
mov w0, 0
b .L1091
.L1090:
ldr x0, [sp, 24]
ldr w0, [x0, 1384]
ldr w1, [sp, 20]
cmp w1, w0
beq .L1092
ldr x0, [sp, 24]
ldr w0, [x0, 1384]
str w0, [sp, 36]
add x0, sp, 32
mov x2, 0
mov x1, x0
ldr x0, [sp, 24]
bl stb_vorbis_get_frame_float
ldr w1, [sp, 20]
ldr w0, [sp, 36]
cmp w1, w0
bhi .L1093
adrp x0, __PRETTY_FUNCTION__.2
add x3, x0, :lo12:__PRETTY_FUNCTION__.2
mov w2, 4801
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC29
add x0, x0, :lo12:.LC29
bl __assert_fail
.L1093:
ldr x0, [sp, 24]
ldr w0, [x0, 1868]
ldr w2, [sp, 20]
ldr w1, [sp, 36]
sub w1, w2, w1
add w1, w0, w1
ldr x0, [sp, 24]
ldr w0, [x0, 1872]
cmp w1, w0
ble .L1094
adrp x0, __PRETTY_FUNCTION__.2
add x3, x0, :lo12:__PRETTY_FUNCTION__.2
mov w2, 4802
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC30
add x0, x0, :lo12:.LC30
bl __assert_fail
.L1094:
ldr x0, [sp, 24]
ldr w0, [x0, 1868]
mov w2, w0
ldr w1, [sp, 20]
ldr w0, [sp, 36]
sub w0, w1, w0
add w0, w2, w0
mov w1, w0
ldr x0, [sp, 24]
str w1, [x0, 1868]
.L1092:
mov w0, 1
.L1091:
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 .L1095
bl __stack_chk_fail
.L1095:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE90:
.size stb_vorbis_seek, .-stb_vorbis_seek
.align 2
.global stb_vorbis_seek_start
.type stb_vorbis_seek_start, %function
stb_vorbis_seek_start:
.LFB91:
.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]
ldrb w0, [x0, 68]
cmp w0, 0
beq .L1097
mov w1, 2
ldr x0, [sp, 24]
bl error
b .L1096
.L1097:
ldr x0, [sp, 24]
ldr w0, [x0, 72]
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
ldr x0, [sp, 24]
str wzr, [x0, 1248]
ldr x0, [sp, 24]
mov w1, 1
strb w1, [x0, 1741]
ldr x0, [sp, 24]
mov w1, -1
str w1, [x0, 1744]
ldr x0, [sp, 24]
bl vorbis_pump_first_frame
.L1096:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE91:
.size stb_vorbis_seek_start, .-stb_vorbis_seek_start
.align 2
.global stb_vorbis_stream_length_in_samples
.type stb_vorbis_stream_length_in_samples, %function
stb_vorbis_stream_length_in_samples:
.LFB92:
.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]
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 x0, [sp, 24]
ldrb w0, [x0, 68]
cmp w0, 0
beq .L1100
mov w1, 2
ldr x0, [sp, 24]
bl error
b .L1115
.L1100:
ldr x0, [sp, 24]
ldr w0, [x0, 860]
cmp w0, 0
bne .L1102
ldr x0, [sp, 24]
bl stb_vorbis_get_file_offset
str w0, [sp, 56]
ldr x0, [sp, 24]
ldr w1, [x0, 64]
mov w0, 65535
cmp w1, w0
bls .L1103
ldr x0, [sp, 24]
ldr w0, [x0, 64]
sub w1, w0, #65536
ldr x0, [sp, 24]
ldr w0, [x0, 72]
cmp w1, w0
bcc .L1103
ldr x0, [sp, 24]
ldr w0, [x0, 64]
sub w0, w0, #65536
str w0, [sp, 44]
b .L1104
.L1103:
ldr x0, [sp, 24]
ldr w0, [x0, 72]
str w0, [sp, 44]
.L1104:
ldr w1, [sp, 44]
ldr x0, [sp, 24]
bl set_file_offset
add x1, sp, 40
add x0, sp, 36
mov x2, x1
mov x1, x0
ldr x0, [sp, 24]
bl vorbis_find_page
cmp w0, 0
bne .L1105
ldr x0, [sp, 24]
mov w1, 36
str w1, [x0, 132]
ldr x0, [sp, 24]
mov w1, -1
str w1, [x0, 860]
b .L1106
.L1105:
ldr x0, [sp, 24]
bl stb_vorbis_get_file_offset
str w0, [sp, 48]
b .L1107
.L1110:
ldr w0, [sp, 36]
mov w1, w0
ldr x0, [sp, 24]
bl set_file_offset
add x1, sp, 40
add x0, sp, 36
mov x2, x1
mov x1, x0
ldr x0, [sp, 24]
bl vorbis_find_page
cmp w0, 0
beq .L1117
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 44]
ldr x0, [sp, 24]
bl stb_vorbis_get_file_offset
str w0, [sp, 48]
.L1107:
ldr w0, [sp, 40]
cmp w0, 0
beq .L1110
b .L1109
.L1117:
nop
.L1109:
ldr w1, [sp, 48]
ldr x0, [sp, 24]
bl set_file_offset
add x0, sp, 64
mov w2, 6
mov x1, x0
ldr x0, [sp, 24]
bl getn
ldr x0, [sp, 24]
bl get32
str w0, [sp, 52]
ldr x0, [sp, 24]
bl get32
str w0, [sp, 60]
ldr w0, [sp, 52]
cmn w0, #1
bne .L1111
ldr w0, [sp, 60]
cmn w0, #1
bne .L1111
ldr x0, [sp, 24]
mov w1, 36
str w1, [x0, 132]
ldr x0, [sp, 24]
mov w1, -1
str w1, [x0, 860]
b .L1106
.L1111:
ldr w0, [sp, 60]
cmp w0, 0
beq .L1112
mov w0, -2
str w0, [sp, 52]
.L1112:
ldr x0, [sp, 24]
ldr w1, [sp, 52]
str w1, [x0, 860]
ldr x0, [sp, 24]
ldr w1, [sp, 48]
str w1, [x0, 88]
ldr w1, [sp, 36]
ldr x0, [sp, 24]
str w1, [x0, 92]
ldr x0, [sp, 24]
ldr w1, [sp, 52]
str w1, [x0, 96]
.L1106:
ldr w1, [sp, 56]
ldr x0, [sp, 24]
bl set_file_offset
.L1102:
ldr x0, [sp, 24]
ldr w0, [x0, 860]
cmn w0, #1
beq .L1113
ldr x0, [sp, 24]
ldr w0, [x0, 860]
b .L1115
.L1113:
mov w0, 0
.L1115:
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 .L1116
bl __stack_chk_fail
.L1116:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE92:
.size stb_vorbis_stream_length_in_samples, .-stb_vorbis_stream_length_in_samples
.align 2
.global stb_vorbis_stream_length_in_seconds
.type stb_vorbis_stream_length_in_seconds, %function
stb_vorbis_stream_length_in_seconds:
.LFB93:
.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 stb_vorbis_stream_length_in_samples
ucvtf s1, w0
ldr x0, [sp, 24]
ldr s0, [x0]
ucvtf s0, s0
fdiv s0, s1, s0
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE93:
.size stb_vorbis_stream_length_in_seconds, .-stb_vorbis_stream_length_in_seconds
.align 2
.global stb_vorbis_get_frame_float
.type stb_vorbis_get_frame_float, %function
stb_vorbis_get_frame_float:
.LFB94:
.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
ldr x0, [sp, 40]
ldrb w0, [x0, 68]
cmp w0, 0
beq .L1121
mov w1, 2
ldr x0, [sp, 40]
bl error
b .L1128
.L1121:
add x2, sp, 60
add x1, sp, 64
add x0, sp, 56
mov x3, x2
mov x2, x1
mov x1, x0
ldr x0, [sp, 40]
bl vorbis_decode_packet
cmp w0, 0
bne .L1123
ldr x0, [sp, 40]
str wzr, [x0, 1872]
ldr x0, [sp, 40]
ldr w1, [x0, 1872]
ldr x0, [sp, 40]
str w1, [x0, 1868]
mov w0, 0
b .L1128
.L1123:
ldr w0, [sp, 56]
ldr w1, [sp, 64]
ldr w2, [sp, 60]
mov w3, w2
mov w2, w1
mov w1, w0
ldr x0, [sp, 40]
bl vorbis_finish_frame
str w0, [sp, 56]
str wzr, [sp, 68]
b .L1124
.L1125:
ldr x0, [sp, 40]
ldrsw x1, [sp, 68]
add x1, x1, 108
ldr x1, [x0, x1, lsl 3]
ldr w0, [sp, 64]
sxtw x0, w0
lsl x0, x0, 2
add x2, x1, x0
ldr x0, [sp, 40]
ldrsw x1, [sp, 68]
add x1, x1, 124
str x2, [x0, x1, lsl 3]
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L1124:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
ldr w1, [sp, 68]
cmp w1, w0
blt .L1125
ldr w1, [sp, 64]
ldr x0, [sp, 40]
str w1, [x0, 1868]
ldr w1, [sp, 64]
ldr w0, [sp, 56]
add w1, w1, w0
ldr x0, [sp, 40]
str w1, [x0, 1872]
ldr x0, [sp, 32]
cmp x0, 0
beq .L1126
ldr x0, [sp, 40]
ldr w1, [x0, 4]
ldr x0, [sp, 32]
str w1, [x0]
.L1126:
ldr x0, [sp, 24]
cmp x0, 0
beq .L1127
ldr x0, [sp, 40]
add x1, x0, 992
ldr x0, [sp, 24]
str x1, [x0]
.L1127:
ldr w0, [sp, 56]
.L1128:
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 .L1129
bl __stack_chk_fail
.L1129:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE94:
.size stb_vorbis_get_frame_float, .-stb_vorbis_get_frame_float
.align 2
.global stb_vorbis_open_file_section
.type stb_vorbis_open_file_section, %function
stb_vorbis_open_file_section:
.LFB95:
.cfi_startproc
sub sp, sp, #1952
.cfi_def_cfa_offset 1952
stp x29, x30, [sp]
.cfi_offset 29, -1952
.cfi_offset 30, -1944
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, 1944]
mov x1, 0
add x0, sp, 64
ldr x1, [sp, 16]
bl vorbis_init
ldr x0, [sp, 40]
str x0, [sp, 88]
ldr x0, [sp, 40]
bl ftell
str w0, [sp, 96]
ldr w0, [sp, 32]
str w0, [sp, 128]
ldr w0, [sp, 36]
str w0, [sp, 100]
add x0, sp, 64
bl start_decoder
cmp w0, 0
beq .L1131
add x0, sp, 64
bl vorbis_alloc
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
beq .L1131
ldr x0, [sp, 56]
mov x3, x0
add x0, sp, 64
mov x1, 1880
mov x2, x1
mov x1, x0
mov x0, x3
bl memcpy
ldr x0, [sp, 56]
bl vorbis_pump_first_frame
ldr x0, [sp, 56]
b .L1134
.L1131:
ldr x0, [sp, 24]
cmp x0, 0
beq .L1133
ldr w0, [sp, 196]
mov w1, w0
ldr x0, [sp, 24]
str w1, [x0]
.L1133:
add x0, sp, 64
bl vorbis_deinit
mov x0, 0
.L1134:
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 1944]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L1135
bl __stack_chk_fail
.L1135:
mov x0, x1
ldp x29, x30, [sp]
add sp, sp, 1952
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE95:
.size stb_vorbis_open_file_section, .-stb_vorbis_open_file_section
.align 2
.global stb_vorbis_open_file
.type stb_vorbis_open_file, %function
stb_vorbis_open_file:
.LFB96:
.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]
bl ftell
str w0, [sp, 56]
mov w2, 2
mov x1, 0
ldr x0, [sp, 40]
bl fseek
ldr x0, [sp, 40]
bl ftell
mov w1, w0
ldr w0, [sp, 56]
sub w0, w1, w0
str w0, [sp, 60]
ldr w0, [sp, 56]
mov w2, 0
mov x1, x0
ldr x0, [sp, 40]
bl fseek
ldr w4, [sp, 60]
ldr x3, [sp, 16]
ldr x2, [sp, 24]
ldr w1, [sp, 36]
ldr x0, [sp, 40]
bl stb_vorbis_open_file_section
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE96:
.size stb_vorbis_open_file, .-stb_vorbis_open_file
.section .rodata
.align 3
.LC31:
.string "rb"
.text
.align 2
.global stb_vorbis_open_filename
.type stb_vorbis_open_filename, %function
stb_vorbis_open_filename:
.LFB97:
.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 x2, [sp, 24]
adrp x0, .LC31
add x1, x0, :lo12:.LC31
ldr x0, [sp, 40]
bl fopen
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
beq .L1139
ldr x3, [sp, 24]
ldr x2, [sp, 32]
mov w1, 1
ldr x0, [sp, 56]
bl stb_vorbis_open_file
b .L1140
.L1139:
ldr x0, [sp, 32]
cmp x0, 0
beq .L1141
ldr x0, [sp, 32]
mov w1, 6
str w1, [x0]
.L1141:
mov x0, 0
.L1140:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE97:
.size stb_vorbis_open_filename, .-stb_vorbis_open_filename
.align 2
.global stb_vorbis_open_memory
.type stb_vorbis_open_memory, %function
stb_vorbis_open_memory:
.LFB98:
.cfi_startproc
sub sp, sp, #1952
.cfi_def_cfa_offset 1952
stp x29, x30, [sp]
.cfi_offset 29, -1952
.cfi_offset 30, -1944
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, 1944]
mov x1, 0
ldr x0, [sp, 40]
cmp x0, 0
bne .L1143
mov x0, 0
b .L1147
.L1143:
add x0, sp, 64
ldr x1, [sp, 16]
bl vorbis_init
ldr x0, [sp, 40]
str x0, [sp, 104]
ldrsw x0, [sp, 36]
ldr x1, [sp, 40]
add x0, x1, x0
str x0, [sp, 120]
ldr x0, [sp, 104]
str x0, [sp, 112]
ldr w0, [sp, 36]
str w0, [sp, 128]
strb wzr, [sp, 132]
add x0, sp, 64
bl start_decoder
cmp w0, 0
beq .L1145
add x0, sp, 64
bl vorbis_alloc
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
beq .L1145
ldr x0, [sp, 56]
mov x3, x0
add x0, sp, 64
mov x1, 1880
mov x2, x1
mov x1, x0
mov x0, x3
bl memcpy
ldr x0, [sp, 56]
bl vorbis_pump_first_frame
ldr x0, [sp, 56]
b .L1147
.L1145:
ldr x0, [sp, 24]
cmp x0, 0
beq .L1146
ldr w0, [sp, 196]
mov w1, w0
ldr x0, [sp, 24]
str w1, [x0]
.L1146:
add x0, sp, 64
bl vorbis_deinit
mov x0, 0
.L1147:
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 1944]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L1148
bl __stack_chk_fail
.L1148:
mov x0, x1
ldp x29, x30, [sp]
add sp, sp, 1952
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE98:
.size stb_vorbis_open_memory, .-stb_vorbis_open_memory
.data
.align 3
.type channel_position, %object
.size channel_position, 42
channel_position:
.string ""
.string ""
.zero 4
.string "\007"
.zero 4
.string "\003\005"
.zero 3
.string "\003\007\005"
.zero 2
.string "\003\005\003\005"
.zero 1
.string "\003\007\005\003\005"
.ascii "\003\007\005\003\005\007"
.text
.align 2
.type copy_samples, %function
copy_samples:
.LFB99:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, 24]
str x1, [sp, 16]
str w2, [sp, 12]
str wzr, [sp, 40]
b .L1150
.L1154:
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 16]
add x0, x1, x0
ldr s0, [x0]
mov w0, 1136656384
fmov s1, w0
fadd s0, s0, s1
str s0, [sp, 32]
ldr w1, [sp, 32]
mov w0, -1136656384
add w0, w1, w0
str w0, [sp, 44]
ldr w0, [sp, 44]
add w0, w0, 32768
mov w1, w0
mov w0, 65535
cmp w1, w0
bls .L1151
ldr w0, [sp, 44]
cmp w0, 0
bge .L1152
mov w0, -32768
b .L1153
.L1152:
mov w0, 32767
.L1153:
str w0, [sp, 44]
.L1151:
ldrsw x0, [sp, 40]
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [sp, 44]
sxth w1, w1
strh w1, [x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L1150:
ldr w1, [sp, 40]
ldr w0, [sp, 12]
cmp w1, w0
blt .L1154
nop
nop
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE99:
.size copy_samples, .-copy_samples
.align 2
.type compute_samples, %function
compute_samples:
.LFB100:
.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, 44]
str x1, [sp, 32]
str w2, [sp, 40]
str x3, [sp, 24]
str w4, [sp, 20]
str w5, [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, 32
str w0, [sp, 64]
str wzr, [sp, 60]
b .L1156
.L1168:
add x0, sp, 72
mov x2, 128
mov w1, 0
bl memset
ldr w1, [sp, 60]
ldr w0, [sp, 64]
add w0, w1, w0
ldr w1, [sp, 16]
cmp w1, w0
bge .L1157
ldr w1, [sp, 16]
ldr w0, [sp, 60]
sub w0, w1, w0
str w0, [sp, 64]
.L1157:
str wzr, [sp, 56]
b .L1158
.L1162:
adrp x0, channel_position
add x3, x0, :lo12:channel_position
ldrsw x2, [sp, 56]
ldrsw x1, [sp, 40]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 1
add x0, x3, x0
add x0, x0, x2
ldrsb w0, [x0]
mov w1, w0
ldr w0, [sp, 44]
and w0, w1, w0
cmp w0, 0
beq .L1159
str wzr, [sp, 52]
b .L1160
.L1161:
ldrsw x0, [sp, 52]
lsl x0, x0, 2
add x1, sp, 72
ldr s1, [x1, x0]
ldrsw x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [x0]
ldr w2, [sp, 20]
ldr w0, [sp, 60]
add w2, w2, w0
ldr w0, [sp, 52]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
fadd s0, s1, s0
ldrsw x0, [sp, 52]
lsl x0, x0, 2
add x1, sp, 72
str s0, [x1, x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L1160:
ldr w1, [sp, 52]
ldr w0, [sp, 64]
cmp w1, w0
blt .L1161
.L1159:
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L1158:
ldr w1, [sp, 56]
ldr w0, [sp, 40]
cmp w1, w0
blt .L1162
str wzr, [sp, 52]
b .L1163
.L1167:
ldrsw x0, [sp, 52]
lsl x0, x0, 2
add x1, sp, 72
ldr s0, [x1, x0]
mov w0, 1136656384
fmov s1, w0
fadd s0, s0, s1
str s0, [sp, 48]
ldr w1, [sp, 48]
mov w0, -1136656384
add w0, w1, w0
str w0, [sp, 68]
ldr w0, [sp, 68]
add w0, w0, 32768
mov w1, w0
mov w0, 65535
cmp w1, w0
bls .L1164
ldr w0, [sp, 68]
cmp w0, 0
bge .L1165
mov w0, -32768
b .L1166
.L1165:
mov w0, 32767
.L1166:
str w0, [sp, 68]
.L1164:
ldr w1, [sp, 60]
ldr w0, [sp, 52]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 1
ldr x1, [sp, 32]
add x0, x1, x0
ldr w1, [sp, 68]
sxth w1, w1
strh w1, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L1163:
ldr w1, [sp, 52]
ldr w0, [sp, 64]
cmp w1, w0
blt .L1167
ldr w0, [sp, 60]
add w0, w0, 32
str w0, [sp, 60]
.L1156:
ldr w1, [sp, 60]
ldr w0, [sp, 16]
cmp w1, w0
blt .L1168
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 200]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L1169
bl __stack_chk_fail
.L1169:
ldp x29, x30, [sp], 208
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE100:
.size compute_samples, .-compute_samples
.align 2
.type compute_stereo_samples, %function
compute_stereo_samples:
.LFB101:
.cfi_startproc
stp x29, x30, [sp, -224]!
.cfi_def_cfa_offset 224
.cfi_offset 29, -224
.cfi_offset 30, -216
mov x29, sp
str x0, [sp, 40]
str w1, [sp, 36]
str x2, [sp, 24]
str w3, [sp, 32]
str w4, [sp, 20]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 216]
mov x1, 0
mov w0, 16
str w0, [sp, 72]
str wzr, [sp, 68]
b .L1171
.L1189:
ldr w0, [sp, 68]
lsl w0, w0, 1
str w0, [sp, 80]
add x0, sp, 88
mov x2, 128
mov w1, 0
bl memset
ldr w1, [sp, 68]
ldr w0, [sp, 72]
add w0, w1, w0
ldr w1, [sp, 20]
cmp w1, w0
bge .L1172
ldr w1, [sp, 20]
ldr w0, [sp, 68]
sub w0, w1, w0
str w0, [sp, 72]
.L1172:
str wzr, [sp, 64]
b .L1173
.L1183:
adrp x0, channel_position
add x3, x0, :lo12:channel_position
ldrsw x2, [sp, 64]
ldrsw x1, [sp, 36]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 1
add x0, x3, x0
add x0, x0, x2
ldrsb w0, [x0]
and w0, w0, 255
and w0, w0, 6
str w0, [sp, 84]
ldr w0, [sp, 84]
cmp w0, 6
bne .L1174
str wzr, [sp, 60]
b .L1175
.L1176:
ldr w0, [sp, 60]
lsl w0, w0, 1
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 88
ldr s1, [x1, x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [x0]
ldr w2, [sp, 32]
ldr w0, [sp, 68]
add w2, w2, w0
ldr w0, [sp, 60]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
ldr w0, [sp, 60]
lsl w0, w0, 1
fadd s0, s1, s0
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 88
str s0, [x1, x0]
ldr w0, [sp, 60]
lsl w0, w0, 1
add w0, w0, 1
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 88
ldr s1, [x1, x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [x0]
ldr w2, [sp, 32]
ldr w0, [sp, 68]
add w2, w2, w0
ldr w0, [sp, 60]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
ldr w0, [sp, 60]
lsl w0, w0, 1
add w0, w0, 1
fadd s0, s1, s0
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 88
str s0, [x1, x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L1175:
ldr w1, [sp, 60]
ldr w0, [sp, 72]
cmp w1, w0
blt .L1176
b .L1177
.L1174:
ldr w0, [sp, 84]
cmp w0, 2
bne .L1178
str wzr, [sp, 60]
b .L1179
.L1180:
ldr w0, [sp, 60]
lsl w0, w0, 1
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 88
ldr s1, [x1, x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [x0]
ldr w2, [sp, 32]
ldr w0, [sp, 68]
add w2, w2, w0
ldr w0, [sp, 60]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
ldr w0, [sp, 60]
lsl w0, w0, 1
fadd s0, s1, s0
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 88
str s0, [x1, x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L1179:
ldr w1, [sp, 60]
ldr w0, [sp, 72]
cmp w1, w0
blt .L1180
b .L1177
.L1178:
ldr w0, [sp, 84]
cmp w0, 4
bne .L1177
str wzr, [sp, 60]
b .L1181
.L1182:
ldr w0, [sp, 60]
lsl w0, w0, 1
add w0, w0, 1
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 88
ldr s1, [x1, x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [x0]
ldr w2, [sp, 32]
ldr w0, [sp, 68]
add w2, w2, w0
ldr w0, [sp, 60]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
ldr w0, [sp, 60]
lsl w0, w0, 1
add w0, w0, 1
fadd s0, s1, s0
sxtw x0, w0
lsl x0, x0, 2
add x1, sp, 88
str s0, [x1, x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L1181:
ldr w1, [sp, 60]
ldr w0, [sp, 72]
cmp w1, w0
blt .L1182
.L1177:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L1173:
ldr w1, [sp, 64]
ldr w0, [sp, 36]
cmp w1, w0
blt .L1183
str wzr, [sp, 60]
b .L1184
.L1188:
ldrsw x0, [sp, 60]
lsl x0, x0, 2
add x1, sp, 88
ldr s0, [x1, x0]
mov w0, 1136656384
fmov s1, w0
fadd s0, s0, s1
str s0, [sp, 56]
ldr w1, [sp, 56]
mov w0, -1136656384
add w0, w1, w0
str w0, [sp, 76]
ldr w0, [sp, 76]
add w0, w0, 32768
mov w1, w0
mov w0, 65535
cmp w1, w0
bls .L1185
ldr w0, [sp, 76]
cmp w0, 0
bge .L1186
mov w0, -32768
b .L1187
.L1186:
mov w0, 32767
.L1187:
str w0, [sp, 76]
.L1185:
ldr w1, [sp, 80]
ldr w0, [sp, 60]
add w0, w1, w0
sxtw x0, w0
lsl x0, x0, 1
ldr x1, [sp, 40]
add x0, x1, x0
ldr w1, [sp, 76]
sxth w1, w1
strh w1, [x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L1184:
ldr w0, [sp, 72]
lsl w0, w0, 1
ldr w1, [sp, 60]
cmp w1, w0
blt .L1188
ldr w0, [sp, 68]
add w0, w0, 16
str w0, [sp, 68]
.L1171:
ldr w1, [sp, 68]
ldr w0, [sp, 20]
cmp w1, w0
blt .L1189
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 216]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L1190
bl __stack_chk_fail
.L1190:
ldp x29, x30, [sp], 224
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE101:
.size compute_stereo_samples, .-compute_stereo_samples
.align 2
.type convert_samples_short, %function
convert_samples_short:
.LFB102:
.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, 60]
str x1, [sp, 48]
str w2, [sp, 56]
str w3, [sp, 44]
str x4, [sp, 32]
str w5, [sp, 40]
str w6, [sp, 28]
ldr w1, [sp, 60]
ldr w0, [sp, 44]
cmp w1, w0
beq .L1192
ldr w0, [sp, 60]
cmp w0, 2
bgt .L1192
ldr w0, [sp, 44]
cmp w0, 6
bgt .L1192
str wzr, [sp, 72]
b .L1193
.L1194:
adrp x0, channel_selector.1
add x0, x0, :lo12:channel_selector.1
ldrsw x1, [sp, 72]
ldrsw x2, [sp, 60]
lsl x2, x2, 1
add x1, x2, x1
ldr w6, [x0, x1, lsl 2]
ldrsw x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 48]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 56]
lsl x0, x0, 1
add x0, x1, x0
ldr w5, [sp, 28]
ldr w4, [sp, 40]
ldr x3, [sp, 32]
ldr w2, [sp, 44]
mov x1, x0
mov w0, w6
bl compute_samples
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L1193:
ldr w1, [sp, 72]
ldr w0, [sp, 60]
cmp w1, w0
blt .L1194
b .L1195
.L1192:
ldr w0, [sp, 60]
ldr w2, [sp, 44]
ldr w1, [sp, 44]
cmp w2, w0
csel w0, w1, w0, le
str w0, [sp, 76]
str wzr, [sp, 72]
b .L1196
.L1197:
ldrsw x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 48]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 56]
lsl x0, x0, 1
add x3, x1, x0
ldrsw x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 32]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 40]
lsl x0, x0, 2
add x0, x1, x0
ldr w2, [sp, 28]
mov x1, x0
mov x0, x3
bl copy_samples
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L1196:
ldr w1, [sp, 72]
ldr w0, [sp, 76]
cmp w1, w0
blt .L1197
b .L1198
.L1199:
ldrsw x0, [sp, 72]
lsl x0, x0, 3
ldr x1, [sp, 48]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 56]
lsl x0, x0, 1
add x3, x1, x0
ldrsw x0, [sp, 28]
lsl x0, x0, 1
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L1198:
ldr w1, [sp, 72]
ldr w0, [sp, 60]
cmp w1, w0
blt .L1199
nop
.L1195:
nop
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE102:
.size convert_samples_short, .-convert_samples_short
.align 2
.global stb_vorbis_get_frame_short
.type stb_vorbis_get_frame_short, %function
stb_vorbis_get_frame_short:
.LFB103:
.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 w3, [sp, 32]
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, 64
mov x2, x0
mov x1, 0
ldr x0, [sp, 40]
bl stb_vorbis_get_frame_float
str w0, [sp, 60]
ldr w1, [sp, 60]
ldr w0, [sp, 32]
cmp w1, w0
ble .L1201
ldr w0, [sp, 32]
str w0, [sp, 60]
.L1201:
ldr w0, [sp, 60]
cmp w0, 0
beq .L1202
ldr x0, [sp, 40]
ldr w0, [x0, 4]
ldr x1, [sp, 64]
ldr w6, [sp, 60]
mov w5, 0
mov x4, x1
mov w3, w0
mov w2, 0
ldr x1, [sp, 24]
ldr w0, [sp, 36]
bl convert_samples_short
.L1202:
ldr w0, [sp, 60]
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 .L1204
bl __stack_chk_fail
.L1204:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE103:
.size stb_vorbis_get_frame_short, .-stb_vorbis_get_frame_short
.section .rodata
.align 3
.LC32:
.string "buf_c == 2"
.text
.align 2
.type convert_channels_short_interleaved, %function
convert_channels_short_interleaved:
.LFB104:
.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, 44]
str x1, [sp, 32]
str w2, [sp, 40]
str x3, [sp, 24]
str w4, [sp, 20]
str w5, [sp, 16]
ldr w1, [sp, 44]
ldr w0, [sp, 40]
cmp w1, w0
beq .L1206
ldr w0, [sp, 44]
cmp w0, 2
bgt .L1206
ldr w0, [sp, 40]
cmp w0, 6
bgt .L1206
ldr w0, [sp, 44]
cmp w0, 2
beq .L1207
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 5136
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC32
add x0, x0, :lo12:.LC32
bl __assert_fail
.L1207:
str wzr, [sp, 60]
b .L1208
.L1209:
ldr w4, [sp, 16]
ldr w3, [sp, 20]
ldr x2, [sp, 24]
ldr w1, [sp, 40]
ldr x0, [sp, 32]
bl compute_stereo_samples
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L1208:
ldr w1, [sp, 60]
ldr w0, [sp, 44]
cmp w1, w0
blt .L1209
b .L1210
.L1206:
ldr w0, [sp, 44]
ldr w2, [sp, 40]
ldr w1, [sp, 40]
cmp w2, w0
csel w0, w1, w0, le
str w0, [sp, 72]
str wzr, [sp, 64]
b .L1211
.L1219:
str wzr, [sp, 60]
b .L1212
.L1216:
ldrsw x0, [sp, 60]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [x0]
ldr w2, [sp, 20]
ldr w0, [sp, 64]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x0, x1, x0
ldr s0, [x0]
str s0, [sp, 76]
ldr s0, [sp, 76]
mov w0, 1136656384
fmov s1, w0
fadd s0, s0, s1
str s0, [sp, 56]
ldr w1, [sp, 56]
mov w0, -1136656384
add w0, w1, w0
str w0, [sp, 68]
ldr w0, [sp, 68]
add w0, w0, 32768
mov w1, w0
mov w0, 65535
cmp w1, w0
bls .L1213
ldr w0, [sp, 68]
cmp w0, 0
bge .L1214
mov w0, -32768
b .L1215
.L1214:
mov w0, 32767
.L1215:
str w0, [sp, 68]
.L1213:
ldr x0, [sp, 32]
add x1, x0, 2
str x1, [sp, 32]
ldr w1, [sp, 68]
sxth w1, w1
strh w1, [x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L1212:
ldr w1, [sp, 60]
ldr w0, [sp, 72]
cmp w1, w0
blt .L1216
b .L1217
.L1218:
ldr x0, [sp, 32]
add x1, x0, 2
str x1, [sp, 32]
strh wzr, [x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L1217:
ldr w1, [sp, 60]
ldr w0, [sp, 44]
cmp w1, w0
blt .L1218
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L1211:
ldr w1, [sp, 64]
ldr w0, [sp, 16]
cmp w1, w0
blt .L1219
nop
.L1210:
nop
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE104:
.size convert_channels_short_interleaved, .-convert_channels_short_interleaved
.align 2
.global stb_vorbis_get_frame_short_interleaved
.type stb_vorbis_get_frame_short_interleaved, %function
stb_vorbis_get_frame_short_interleaved:
.LFB105:
.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 w3, [sp, 32]
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 w0, [sp, 36]
cmp w0, 1
bne .L1221
add x0, sp, 24
ldr w3, [sp, 32]
mov x2, x0
ldr w1, [sp, 36]
ldr x0, [sp, 40]
bl stb_vorbis_get_frame_short
b .L1225
.L1221:
add x0, sp, 64
mov x2, x0
mov x1, 0
ldr x0, [sp, 40]
bl stb_vorbis_get_frame_float
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L1223
ldr w1, [sp, 60]
ldr w0, [sp, 36]
mul w0, w1, w0
ldr w1, [sp, 32]
cmp w1, w0
bge .L1224
ldr w1, [sp, 32]
ldr w0, [sp, 36]
sdiv w0, w1, w0
str w0, [sp, 60]
.L1224:
ldr x1, [sp, 24]
ldr x0, [sp, 40]
ldr w0, [x0, 4]
ldr x2, [sp, 64]
ldr w5, [sp, 60]
mov w4, 0
mov x3, x2
mov w2, w0
ldr w0, [sp, 36]
bl convert_channels_short_interleaved
.L1223:
ldr w0, [sp, 60]
.L1225:
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 .L1226
bl __stack_chk_fail
.L1226:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE105:
.size stb_vorbis_get_frame_short_interleaved, .-stb_vorbis_get_frame_short_interleaved
.align 2
.global stb_vorbis_get_samples_short_interleaved
.type stb_vorbis_get_samples_short_interleaved, %function
stb_vorbis_get_samples_short_interleaved:
.LFB106:
.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 w3, [sp, 32]
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 w1, [sp, 32]
ldr w0, [sp, 36]
sdiv w0, w1, w0
str w0, [sp, 56]
str wzr, [sp, 48]
ldr x0, [sp, 40]
ldr w0, [x0, 4]
str w0, [sp, 60]
ldr w1, [sp, 60]
ldr w0, [sp, 36]
cmp w1, w0
ble .L1229
ldr w0, [sp, 36]
str w0, [sp, 60]
b .L1229
.L1234:
ldr x0, [sp, 40]
ldr w1, [x0, 1872]
ldr x0, [sp, 40]
ldr w0, [x0, 1868]
sub w0, w1, w0
str w0, [sp, 52]
ldr w1, [sp, 48]
ldr w0, [sp, 52]
add w0, w1, w0
ldr w1, [sp, 56]
cmp w1, w0
bgt .L1230
ldr w1, [sp, 56]
ldr w0, [sp, 48]
sub w0, w1, w0
str w0, [sp, 52]
.L1230:
ldr w0, [sp, 52]
cmp w0, 0
beq .L1231
ldr x0, [sp, 40]
ldr w1, [x0, 4]
ldr x0, [sp, 40]
add x2, x0, 864
ldr x0, [sp, 40]
ldr w0, [x0, 1868]
ldr w5, [sp, 52]
mov w4, w0
mov x3, x2
mov w2, w1
ldr x1, [sp, 24]
ldr w0, [sp, 36]
bl convert_channels_short_interleaved
.L1231:
ldr w1, [sp, 52]
ldr w0, [sp, 36]
mul w0, w1, w0
sxtw x0, w0
lsl x0, x0, 1
ldr x1, [sp, 24]
add x0, x1, x0
str x0, [sp, 24]
ldr w1, [sp, 48]
ldr w0, [sp, 52]
add w0, w1, w0
str w0, [sp, 48]
ldr x0, [sp, 40]
ldr w1, [x0, 1868]
ldr w0, [sp, 52]
add w1, w1, w0
ldr x0, [sp, 40]
str w1, [x0, 1868]
ldr w1, [sp, 48]
ldr w0, [sp, 56]
cmp w1, w0
beq .L1237
add x0, sp, 64
mov x2, x0
mov x1, 0
ldr x0, [sp, 40]
bl stb_vorbis_get_frame_float
cmp w0, 0
beq .L1238
.L1229:
ldr w1, [sp, 48]
ldr w0, [sp, 56]
cmp w1, w0
blt .L1234
b .L1233
.L1237:
nop
b .L1233
.L1238:
nop
.L1233:
ldr w0, [sp, 48]
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 .L1236
bl __stack_chk_fail
.L1236:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE106:
.size stb_vorbis_get_samples_short_interleaved, .-stb_vorbis_get_samples_short_interleaved
.align 2
.global stb_vorbis_get_samples_short
.type stb_vorbis_get_samples_short, %function
stb_vorbis_get_samples_short:
.LFB107:
.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 w3, [sp, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
str wzr, [sp, 52]
ldr x0, [sp, 40]
ldr w0, [x0, 4]
str w0, [sp, 60]
ldr w1, [sp, 60]
ldr w0, [sp, 36]
cmp w1, w0
ble .L1241
ldr w0, [sp, 36]
str w0, [sp, 60]
b .L1241
.L1246:
ldr x0, [sp, 40]
ldr w1, [x0, 1872]
ldr x0, [sp, 40]
ldr w0, [x0, 1868]
sub w0, w1, w0
str w0, [sp, 56]
ldr w1, [sp, 52]
ldr w0, [sp, 56]
add w0, w1, w0
ldr w1, [sp, 32]
cmp w1, w0
bgt .L1242
ldr w1, [sp, 32]
ldr w0, [sp, 52]
sub w0, w1, w0
str w0, [sp, 56]
.L1242:
ldr w0, [sp, 56]
cmp w0, 0
beq .L1243
ldr x0, [sp, 40]
ldr w1, [x0, 4]
ldr x0, [sp, 40]
add x2, x0, 864
ldr x0, [sp, 40]
ldr w0, [x0, 1868]
ldr w6, [sp, 56]
mov w5, w0
mov x4, x2
mov w3, w1
ldr w2, [sp, 52]
ldr x1, [sp, 24]
ldr w0, [sp, 36]
bl convert_samples_short
.L1243:
ldr w1, [sp, 52]
ldr w0, [sp, 56]
add w0, w1, w0
str w0, [sp, 52]
ldr x0, [sp, 40]
ldr w1, [x0, 1868]
ldr w0, [sp, 56]
add w1, w1, w0
ldr x0, [sp, 40]
str w1, [x0, 1868]
ldr w1, [sp, 52]
ldr w0, [sp, 32]
cmp w1, w0
beq .L1249
add x0, sp, 64
mov x2, x0
mov x1, 0
ldr x0, [sp, 40]
bl stb_vorbis_get_frame_float
cmp w0, 0
beq .L1250
.L1241:
ldr w1, [sp, 52]
ldr w0, [sp, 32]
cmp w1, w0
blt .L1246
b .L1245
.L1249:
nop
b .L1245
.L1250:
nop
.L1245:
ldr w0, [sp, 52]
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 .L1248
bl __stack_chk_fail
.L1248:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE107:
.size stb_vorbis_get_samples_short, .-stb_vorbis_get_samples_short
.align 2
.global stb_vorbis_decode_filename
.type stb_vorbis_decode_filename, %function
stb_vorbis_decode_filename:
.LFB108:
.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, 40]
str x1, [sp, 32]
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, 104]
mov x1, 0
add x0, sp, 56
mov x2, 0
mov x1, x0
ldr x0, [sp, 40]
bl stb_vorbis_open_filename
str x0, [sp, 88]
ldr x0, [sp, 88]
cmp x0, 0
bne .L1252
mov w0, -1
b .L1260
.L1252:
ldr x0, [sp, 88]
ldr w0, [x0, 4]
lsl w0, w0, 12
str w0, [sp, 72]
ldr x0, [sp, 88]
ldr w1, [x0, 4]
ldr x0, [sp, 32]
str w1, [x0]
ldr x0, [sp, 24]
cmp x0, 0
beq .L1254
ldr x0, [sp, 88]
ldr w0, [x0]
mov w1, w0
ldr x0, [sp, 24]
str w1, [x0]
.L1254:
str wzr, [sp, 60]
ldr w0, [sp, 60]
str w0, [sp, 64]
ldr w0, [sp, 72]
str w0, [sp, 68]
ldrsw x0, [sp, 68]
lsl x0, x0, 1
bl malloc
str x0, [sp, 80]
ldr x0, [sp, 80]
cmp x0, 0
bne .L1255
ldr x0, [sp, 88]
bl stb_vorbis_close
mov w0, -2
b .L1260
.L1255:
ldr x0, [sp, 88]
ldr w4, [x0, 4]
ldrsw x0, [sp, 64]
lsl x0, x0, 1
ldr x1, [sp, 80]
add x2, x1, x0
ldr w1, [sp, 68]
ldr w0, [sp, 64]
sub w0, w1, w0
mov w3, w0
mov w1, w4
ldr x0, [sp, 88]
bl stb_vorbis_get_frame_short_interleaved
str w0, [sp, 76]
ldr w0, [sp, 76]
cmp w0, 0
beq .L1263
ldr w1, [sp, 60]
ldr w0, [sp, 76]
add w0, w1, w0
str w0, [sp, 60]
ldr x0, [sp, 88]
ldr w1, [x0, 4]
ldr w0, [sp, 76]
mul w0, w1, w0
ldr w1, [sp, 64]
add w0, w1, w0
str w0, [sp, 64]
ldr w1, [sp, 64]
ldr w0, [sp, 72]
add w0, w1, w0
ldr w1, [sp, 68]
cmp w1, w0
bge .L1255
ldr w0, [sp, 68]
lsl w0, w0, 1
str w0, [sp, 68]
ldrsw x0, [sp, 68]
lsl x0, x0, 1
mov x1, x0
ldr x0, [sp, 80]
bl realloc
str x0, [sp, 96]
ldr x0, [sp, 96]
cmp x0, 0
bne .L1259
ldr x0, [sp, 80]
bl free
ldr x0, [sp, 88]
bl stb_vorbis_close
mov w0, -2
b .L1260
.L1259:
ldr x0, [sp, 96]
str x0, [sp, 80]
b .L1255
.L1263:
nop
ldr x0, [sp, 16]
ldr x1, [sp, 80]
str x1, [x0]
ldr x0, [sp, 88]
bl stb_vorbis_close
ldr w0, [sp, 60]
.L1260:
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 .L1261
bl __stack_chk_fail
.L1261:
mov w0, w1
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE108:
.size stb_vorbis_decode_filename, .-stb_vorbis_decode_filename
.align 2
.global stb_vorbis_decode_memory
.type stb_vorbis_decode_memory, %function
stb_vorbis_decode_memory:
.LFB109:
.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, 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, 120]
mov x1, 0
add x0, sp, 72
mov x3, 0
mov x2, x0
ldr w1, [sp, 52]
ldr x0, [sp, 56]
bl stb_vorbis_open_memory
str x0, [sp, 104]
ldr x0, [sp, 104]
cmp x0, 0
bne .L1265
mov w0, -1
b .L1273
.L1265:
ldr x0, [sp, 104]
ldr w0, [x0, 4]
lsl w0, w0, 12
str w0, [sp, 88]
ldr x0, [sp, 104]
ldr w1, [x0, 4]
ldr x0, [sp, 40]
str w1, [x0]
ldr x0, [sp, 32]
cmp x0, 0
beq .L1267
ldr x0, [sp, 104]
ldr w0, [x0]
mov w1, w0
ldr x0, [sp, 32]
str w1, [x0]
.L1267:
str wzr, [sp, 76]
ldr w0, [sp, 76]
str w0, [sp, 80]
ldr w0, [sp, 88]
str w0, [sp, 84]
ldrsw x0, [sp, 84]
lsl x0, x0, 1
bl malloc
str x0, [sp, 96]
ldr x0, [sp, 96]
cmp x0, 0
bne .L1268
ldr x0, [sp, 104]
bl stb_vorbis_close
mov w0, -2
b .L1273
.L1268:
ldr x0, [sp, 104]
ldr w4, [x0, 4]
ldrsw x0, [sp, 80]
lsl x0, x0, 1
ldr x1, [sp, 96]
add x2, x1, x0
ldr w1, [sp, 84]
ldr w0, [sp, 80]
sub w0, w1, w0
mov w3, w0
mov w1, w4
ldr x0, [sp, 104]
bl stb_vorbis_get_frame_short_interleaved
str w0, [sp, 92]
ldr w0, [sp, 92]
cmp w0, 0
beq .L1276
ldr w1, [sp, 76]
ldr w0, [sp, 92]
add w0, w1, w0
str w0, [sp, 76]
ldr x0, [sp, 104]
ldr w1, [x0, 4]
ldr w0, [sp, 92]
mul w0, w1, w0
ldr w1, [sp, 80]
add w0, w1, w0
str w0, [sp, 80]
ldr w1, [sp, 80]
ldr w0, [sp, 88]
add w0, w1, w0
ldr w1, [sp, 84]
cmp w1, w0
bge .L1268
ldr w0, [sp, 84]
lsl w0, w0, 1
str w0, [sp, 84]
ldrsw x0, [sp, 84]
lsl x0, x0, 1
mov x1, x0
ldr x0, [sp, 96]
bl realloc
str x0, [sp, 112]
ldr x0, [sp, 112]
cmp x0, 0
bne .L1272
ldr x0, [sp, 96]
bl free
ldr x0, [sp, 104]
bl stb_vorbis_close
mov w0, -2
b .L1273
.L1272:
ldr x0, [sp, 112]
str x0, [sp, 96]
b .L1268
.L1276:
nop
ldr x0, [sp, 24]
ldr x1, [sp, 96]
str x1, [x0]
ldr x0, [sp, 104]
bl stb_vorbis_close
ldr w0, [sp, 76]
.L1273:
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 .L1274
bl __stack_chk_fail
.L1274:
mov w0, w1
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE109:
.size stb_vorbis_decode_memory, .-stb_vorbis_decode_memory
.align 2
.global stb_vorbis_get_samples_float_interleaved
.type stb_vorbis_get_samples_float_interleaved, %function
stb_vorbis_get_samples_float_interleaved:
.LFB110:
.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 w3, [sp, 32]
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 w1, [sp, 32]
ldr w0, [sp, 36]
sdiv w0, w1, w0
str w0, [sp, 76]
str wzr, [sp, 56]
ldr x0, [sp, 40]
ldr w0, [x0, 4]
str w0, [sp, 60]
ldr w1, [sp, 60]
ldr w0, [sp, 36]
cmp w1, w0
ble .L1279
ldr w0, [sp, 36]
str w0, [sp, 60]
b .L1279
.L1289:
ldr x0, [sp, 40]
ldr w1, [x0, 1872]
ldr x0, [sp, 40]
ldr w0, [x0, 1868]
sub w0, w1, w0
str w0, [sp, 72]
ldr w1, [sp, 56]
ldr w0, [sp, 72]
add w0, w1, w0
ldr w1, [sp, 76]
cmp w1, w0
bgt .L1280
ldr w1, [sp, 76]
ldr w0, [sp, 56]
sub w0, w1, w0
str w0, [sp, 72]
.L1280:
str wzr, [sp, 68]
b .L1281
.L1286:
str wzr, [sp, 64]
b .L1282
.L1283:
ldr x0, [sp, 40]
ldrsw x1, [sp, 64]
add x1, x1, 108
ldr x1, [x0, x1, lsl 3]
ldr x0, [sp, 40]
ldr w2, [x0, 1868]
ldr w0, [sp, 68]
add w0, w2, w0
sxtw x0, w0
lsl x0, x0, 2
add x1, x1, x0
ldr x0, [sp, 24]
add x2, x0, 4
str x2, [sp, 24]
ldr s0, [x1]
str s0, [x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L1282:
ldr w1, [sp, 64]
ldr w0, [sp, 60]
cmp w1, w0
blt .L1283
b .L1284
.L1285:
ldr x0, [sp, 24]
add x1, x0, 4
str x1, [sp, 24]
str wzr, [x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L1284:
ldr w1, [sp, 64]
ldr w0, [sp, 36]
cmp w1, w0
blt .L1285
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L1281:
ldr w1, [sp, 68]
ldr w0, [sp, 72]
cmp w1, w0
blt .L1286
ldr w1, [sp, 56]
ldr w0, [sp, 72]
add w0, w1, w0
str w0, [sp, 56]
ldr x0, [sp, 40]
ldr w1, [x0, 1868]
ldr w0, [sp, 72]
add w1, w1, w0
ldr x0, [sp, 40]
str w1, [x0, 1868]
ldr w1, [sp, 56]
ldr w0, [sp, 76]
cmp w1, w0
beq .L1292
add x0, sp, 80
mov x2, x0
mov x1, 0
ldr x0, [sp, 40]
bl stb_vorbis_get_frame_float
cmp w0, 0
beq .L1293
.L1279:
ldr w1, [sp, 56]
ldr w0, [sp, 76]
cmp w1, w0
blt .L1289
b .L1288
.L1292:
nop
b .L1288
.L1293:
nop
.L1288:
ldr w0, [sp, 56]
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 .L1291
bl __stack_chk_fail
.L1291:
mov w0, w1
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE110:
.size stb_vorbis_get_samples_float_interleaved, .-stb_vorbis_get_samples_float_interleaved
.align 2
.global stb_vorbis_get_samples_float
.type stb_vorbis_get_samples_float, %function
stb_vorbis_get_samples_float:
.LFB111:
.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 w3, [sp, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 72]
mov x1, 0
str wzr, [sp, 48]
ldr x0, [sp, 40]
ldr w0, [x0, 4]
str w0, [sp, 52]
ldr w1, [sp, 52]
ldr w0, [sp, 36]
cmp w1, w0
ble .L1296
ldr w0, [sp, 36]
str w0, [sp, 52]
b .L1296
.L1305:
ldr x0, [sp, 40]
ldr w1, [x0, 1872]
ldr x0, [sp, 40]
ldr w0, [x0, 1868]
sub w0, w1, w0
str w0, [sp, 60]
ldr w1, [sp, 48]
ldr w0, [sp, 60]
add w0, w1, w0
ldr w1, [sp, 32]
cmp w1, w0
bgt .L1297
ldr w1, [sp, 32]
ldr w0, [sp, 48]
sub w0, w1, w0
str w0, [sp, 60]
.L1297:
ldr w0, [sp, 60]
cmp w0, 0
beq .L1298
str wzr, [sp, 56]
b .L1299
.L1300:
ldrsw x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 48]
lsl x0, x0, 2
add x3, x1, x0
ldr x0, [sp, 40]
ldrsw x1, [sp, 56]
add x1, x1, 108
ldr x1, [x0, x1, lsl 3]
ldr x0, [sp, 40]
ldr w0, [x0, 1868]
sxtw x0, w0
lsl x0, x0, 2
add x1, x1, x0
ldrsw x0, [sp, 60]
lsl x0, x0, 2
mov x2, x0
mov x0, x3
bl memcpy
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L1299:
ldr w1, [sp, 56]
ldr w0, [sp, 52]
cmp w1, w0
blt .L1300
b .L1301
.L1302:
ldrsw x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr x1, [x0]
ldrsw x0, [sp, 48]
lsl x0, x0, 2
add x3, x1, x0
ldrsw x0, [sp, 60]
lsl x0, x0, 2
mov x2, x0
mov w1, 0
mov x0, x3
bl memset
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L1301:
ldr w1, [sp, 56]
ldr w0, [sp, 36]
cmp w1, w0
blt .L1302
.L1298:
ldr w1, [sp, 48]
ldr w0, [sp, 60]
add w0, w1, w0
str w0, [sp, 48]
ldr x0, [sp, 40]
ldr w1, [x0, 1868]
ldr w0, [sp, 60]
add w1, w1, w0
ldr x0, [sp, 40]
str w1, [x0, 1868]
ldr w1, [sp, 48]
ldr w0, [sp, 32]
cmp w1, w0
beq .L1308
add x0, sp, 64
mov x2, x0
mov x1, 0
ldr x0, [sp, 40]
bl stb_vorbis_get_frame_float
cmp w0, 0
beq .L1309
.L1296:
ldr w1, [sp, 48]
ldr w0, [sp, 32]
cmp w1, w0
blt .L1305
b .L1304
.L1308:
nop
b .L1304
.L1309:
nop
.L1304:
ldr w0, [sp, 48]
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 .L1307
bl __stack_chk_fail
.L1307:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE111:
.size stb_vorbis_get_samples_float, .-stb_vorbis_get_samples_float
.data
.align 3
.type log2_4.22, %object
.size log2_4.22, 16
log2_4.22:
.string ""
.ascii "\001\002\002\003\003\003\003\004\004\004\004\004\004\004\004"
.section .rodata
.align 3
.type __PRETTY_FUNCTION__.21, %object
.size __PRETTY_FUNCTION__.21, 18
__PRETTY_FUNCTION__.21:
.string "compute_codewords"
.align 3
.type __PRETTY_FUNCTION__.20, %object
.size __PRETTY_FUNCTION__.20, 16
__PRETTY_FUNCTION__.20:
.string "include_in_sort"
.align 3
.type __PRETTY_FUNCTION__.19, %object
.size __PRETTY_FUNCTION__.19, 23
__PRETTY_FUNCTION__.19:
.string "compute_sorted_huffman"
.data
.align 3
.type vorbis.18, %object
.size vorbis.18, 6
vorbis.18:
.ascii "vorbis"
.section .rodata
.align 3
.type __PRETTY_FUNCTION__.17, %object
.size __PRETTY_FUNCTION__.17, 15
__PRETTY_FUNCTION__.17:
.string "lookup1_values"
.align 3
.type __PRETTY_FUNCTION__.16, %object
.size __PRETTY_FUNCTION__.16, 13
__PRETTY_FUNCTION__.16:
.string "next_segment"
.align 3
.type __PRETTY_FUNCTION__.15, %object
.size __PRETTY_FUNCTION__.15, 16
__PRETTY_FUNCTION__.15:
.string "get8_packet_raw"
.align 3
.type __PRETTY_FUNCTION__.14, %object
.size __PRETTY_FUNCTION__.14, 27
__PRETTY_FUNCTION__.14:
.string "codebook_decode_scalar_raw"
.align 3
.type __PRETTY_FUNCTION__.13, %object
.size __PRETTY_FUNCTION__.13, 22
__PRETTY_FUNCTION__.13:
.string "codebook_decode_start"
.align 3
.type __PRETTY_FUNCTION__.12, %object
.size __PRETTY_FUNCTION__.12, 36
__PRETTY_FUNCTION__.12:
.string "codebook_decode_deinterleave_repeat"
.align 3
.type __PRETTY_FUNCTION__.11, %object
.size __PRETTY_FUNCTION__.11, 23
__PRETTY_FUNCTION__.11:
.string "imdct_step3_iter0_loop"
.align 3
.type __PRETTY_FUNCTION__.10, %object
.size __PRETTY_FUNCTION__.10, 13
__PRETTY_FUNCTION__.10:
.string "inverse_mdct"
.align 3
.type __PRETTY_FUNCTION__.9, %object
.size __PRETTY_FUNCTION__.9, 11
__PRETTY_FUNCTION__.9:
.string "get_window"
.align 3
.type __PRETTY_FUNCTION__.8, %object
.size __PRETTY_FUNCTION__.8, 22
__PRETTY_FUNCTION__.8:
.string "vorbis_decode_initial"
.data
.align 3
.type range_list.7, %object
.size range_list.7, 16
range_list.7:
.word 256
.word 128
.word 86
.word 64
.section .rodata
.align 3
.type __PRETTY_FUNCTION__.6, %object
.size __PRETTY_FUNCTION__.6, 26
__PRETTY_FUNCTION__.6:
.string "vorbis_decode_packet_rest"
.align 3
.type __PRETTY_FUNCTION__.5, %object
.size __PRETTY_FUNCTION__.5, 14
__PRETTY_FUNCTION__.5:
.string "start_decoder"
.align 3
.type __PRETTY_FUNCTION__.4, %object
.size __PRETTY_FUNCTION__.4, 22
__PRETTY_FUNCTION__.4:
.string "seek_to_sample_coarse"
.align 3
.type __PRETTY_FUNCTION__.3, %object
.size __PRETTY_FUNCTION__.3, 22
__PRETTY_FUNCTION__.3:
.string "stb_vorbis_seek_frame"
.align 3
.type __PRETTY_FUNCTION__.2, %object
.size __PRETTY_FUNCTION__.2, 16
__PRETTY_FUNCTION__.2:
.string "stb_vorbis_seek"
.data
.align 3
.type channel_selector.1, %object
.size channel_selector.1, 24
channel_selector.1:
.word 0
.zero 4
.word 1
.zero 4
.word 2
.word 4
.section .rodata
.align 3
.type __PRETTY_FUNCTION__.0, %object
.size __PRETTY_FUNCTION__.0, 35
__PRETTY_FUNCTION__.0:
.string "convert_channels_short_interleaved"
.align 3
.LC10:
.word 1413754136
.word 1074340347
.align 3
.LC11:
.word 1413754136
.word 1073291771
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%lf"
.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
str xzr, [sp, 16]
add x0, sp, 16
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr d0, [sp, 16]
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, 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
.align 2
.type generate_random_buffer, %function
generate_random_buffer:
.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]
str wzr, [sp, 44]
b .L2
.L3:
bl random
mov x2, x0
ldrsw x0, [sp, 44]
ldr x1, [sp, 24]
add x0, x1, x0
and w1, w2, 255
strb w1, [x0]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L2:
ldrsw x0, [sp, 44]
ldr x1, [sp, 16]
cmp x1, x0
bhi .L3
nop
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size generate_random_buffer, .-generate_random_buffer
.align 2
.type canonicalize, %function
canonicalize:
.LFB7:
.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]
str x0, [sp, 16]
b .L5
.L7:
ldr x0, [sp, 16]
ldrb w1, [x0]
ldr x0, [sp, 24]
strb w1, [x0]
ldr x0, [sp, 16]
ldrb w0, [x0]
cmp w0, 13
beq .L6
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
.L6:
ldr x0, [sp, 16]
add x0, x0, 1
str x0, [sp, 16]
.L5:
ldr x0, [sp, 16]
ldrb w0, [x0]
cmp w0, 0
bne .L7
ldr x0, [sp, 16]
ldrb w1, [x0]
ldr x0, [sp, 24]
strb w1, [x0]
nop
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size canonicalize, .-canonicalize
.section .rodata
.align 3
.LC0:
.string "!!!XEN Test Begin!!!\n"
.align 3
.LC1:
.string "Client never sent start string.\n"
.align 3
.LC2:
.string "%u\n"
.align 3
.LC3:
.string "Waiting for seed acknowledgement\n"
.align 3
.LC4:
.string "Client never acknowledge seed.\n"
.align 3
.LC5:
.string "Seed Okay.\n"
.align 3
.LC6:
.string "Incorrect seed acknowledgement.\n"
.align 3
.LC7:
.string "[%s]"
.align 3
.LC8:
.string "Processed seed.\n"
.align 3
.LC9:
.string "Writing %d bytes.\n"
.align 3
.LC10:
.string "Premature EOF from client.\n"
.align 3
.LC11:
.string "Okay.\n"
.align 3
.LC12:
.string "PASS: processed %llu byte(s).\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB8:
.cfi_startproc
mov x12, 4240
sub sp, sp, x12
.cfi_def_cfa_offset 4240
stp x29, x30, [sp]
.cfi_offset 29, -4240
.cfi_offset 30, -4232
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, 4232]
mov x1, 0
str xzr, [sp, 48]
add x0, sp, 72
mov x1, x0
mov w0, 0
bl tcgetattr
add x0, sp, 72
bl cfmakeraw
add x0, sp, 72
mov x2, x0
mov w1, 2
mov w0, 0
bl tcsetattr
add x0, sp, 72
mov x1, x0
mov w0, 1
bl tcgetattr
add x0, sp, 72
bl cfmakeraw
add x0, sp, 72
mov x2, x0
mov w1, 2
mov w0, 1
bl tcsetattr
b .L9
.L12:
ldr x0, [sp, 56]
bl canonicalize
adrp x0, .LC0
add x1, x0, :lo12:.LC0
ldr x0, [sp, 56]
bl strcmp
cmp w0, 0
beq .L23
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x1, x0
ldr x0, [sp, 56]
bl fputs
.L9:
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x1, [x0]
add x0, sp, 136
mov x2, x1
mov w1, 4096
bl fgets
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
bne .L12
b .L11
.L23:
nop
.L11:
ldr x0, [sp, 56]
cmp x0, 0
bne .L13
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 32
mov x1, 1
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl fwrite
mov w0, 1
b .L21
.L13:
mov x0, 0
bl time
str w0, [sp, 44]
ldr w1, [sp, 44]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x0, [x0]
bl fflush
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 33
mov x1, 1
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl fwrite
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x1, [x0]
add x0, sp, 136
mov x2, x1
mov w1, 4096
bl fgets
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
bne .L15
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 31
mov x1, 1
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl fwrite
mov w0, 1
b .L21
.L15:
ldr x0, [sp, 56]
bl canonicalize
adrp x0, .LC5
add x1, x0, :lo12:.LC5
ldr x0, [sp, 56]
bl strcmp
cmp w0, 0
beq .L16
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 32
mov x1, 1
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl fwrite
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x2, [sp, 56]
adrp x0, .LC7
add x1, x0, :lo12:.LC7
mov x0, x3
bl fprintf
mov w0, 1
b .L21
.L16:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 16
mov x1, 1
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl fwrite
ldr w0, [sp, 44]
bl srandom
bl random
mov x1, 57609
movk x1, 0xc6d1, lsl 16
movk x1, 0x6b11, lsl 32
movk x1, 0x29f1, lsl 48
smulh x1, x0, x1
asr x2, x1, 14
asr x1, x0, 63
sub x1, x2, x1
mov x2, 34464
movk x2, 0x1, lsl 16
mul x1, x1, x2
sub x1, x0, x1
mov w0, w1
add w0, w0, 4096
str w0, [sp, 40]
b .L17
.L20:
bl random
negs x1, x0
and x0, x0, 4095
and x1, x1, 4095
csneg x0, x0, x1, mi
str x0, [sp, 64]
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x2, [sp, 64]
adrp x0, .LC9
add x1, x0, :lo12:.LC9
mov x0, x3
bl fprintf
add x0, sp, 136
ldr x1, [sp, 64]
bl generate_random_buffer
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x1, [x0]
add x0, sp, 136
mov x3, x1
mov x2, 1
ldr x1, [sp, 64]
bl fwrite
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x0, [x0]
bl fflush
.L19:
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x1, [x0]
add x0, sp, 136
mov x2, x1
mov w1, 4096
bl fgets
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
bne .L18
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 27
mov x1, 1
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl fwrite
mov w0, 1
b .L21
.L18:
ldr x0, [sp, 56]
bl canonicalize
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x1, x0
ldr x0, [sp, 56]
bl fputs
adrp x0, .LC11
add x1, x0, :lo12:.LC11
ldr x0, [sp, 56]
bl strcmp
cmp w0, 0
bne .L19
ldr x1, [sp, 48]
ldr x0, [sp, 64]
add x0, x1, x0
str x0, [sp, 48]
ldr w0, [sp, 40]
sub w0, w0, #1
str w0, [sp, 40]
.L17:
ldr w0, [sp, 40]
cmp w0, 0
bgt .L20
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
ldr x2, [sp, 48]
adrp x0, .LC12
add x1, x0, :lo12:.LC12
mov x0, x3
bl fprintf
mov w0, 0
.L21:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 4232]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L22
bl __stack_chk_fail
.L22:
mov w0, w1
ldp x29, x30, [sp]
mov x12, 4240
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global GUID_WICPixelFormat64bppRGBFixedPoint
.section .rodata
.align 3
.type GUID_WICPixelFormat64bppRGBFixedPoint, %object
.size GUID_WICPixelFormat64bppRGBFixedPoint, 24
GUID_WICPixelFormat64bppRGBFixedPoint:
.xword 1876804388
.hword 19971
.hword 19454
.ascii "\261\205=wv\215\311@"
.zero 4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.local child
.comm child,4,4
.align 2
.type cleanup, %function
cleanup:
.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, child
add x0, x0, :lo12:child
ldr w0, [x0]
cmp w0, 0
ble .L2
adrp x0, child
add x0, x0, :lo12:child
ldr w0, [x0]
mov w1, 9
bl kill
.L2:
adrp x0, child
add x0, x0, :lo12:child
str wzr, [x0]
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size cleanup, .-cleanup
.section .rodata
.align 3
.LC0:
.string "program.c"
.align 3
.LC1:
.string "len_mask >= 0x01"
.align 3
.LC2:
.string "len_mask <= 0xff"
.align 3
.LC3:
.string "l == 0"
.align 3
.LC4:
.string "AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8"
.align 3
.LC5:
.string "AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info) >= 1"
.align 3
.LC6:
.string "!DR_CONTROL_ENABLED (dreg_state.dbg_regs[0].ctrl)"
.align 3
.LC7:
.string "DR_CONTROL_ENABLED (dreg_state.dbg_regs[0].ctrl)"
.align 3
.LC8:
.string "DR_CONTROL_LENGTH (dreg_state.dbg_regs[0].ctrl) == 0"
.align 3
.LC9:
.string "DR_CONTROL_LENGTH (dreg_state.dbg_regs[0].ctrl) == len_mask"
.align 3
.LC10:
.string "PTRACE_SETREGSET: NT_ARM_HW_WATCH"
.text
.align 2
.type set_watchpoint, %function
set_watchpoint:
.LFB9:
.cfi_startproc
stp x29, x30, [sp, -352]!
.cfi_def_cfa_offset 352
.cfi_offset 29, -352
.cfi_offset 30, -344
mov x29, sp
str w0, [sp, 28]
str x1, [sp, 16]
str w2, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 344]
mov x1, 0
ldr w0, [sp, 24]
cmp w0, 0
bne .L4
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 49
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __assert_fail
.L4:
ldr w0, [sp, 24]
cmp w0, 255
bls .L5
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 50
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __assert_fail
.L5:
add x0, sp, 80
str x0, [sp, 64]
mov x0, 264
str x0, [sp, 72]
bl __errno_location
str wzr, [x0]
add x0, sp, 64
mov x3, x0
mov w2, 1027
ldr w1, [sp, 28]
mov w0, 16900
bl ptrace
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
beq .L6
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 56
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __assert_fail
.L6:
ldr w0, [sp, 80]
lsr w0, w0, 8
and w0, w0, 255
cmp w0, 6
beq .L7
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 57
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl __assert_fail
.L7:
ldr w0, [sp, 80]
and w0, w0, 255
cmp w0, 0
bne .L8
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 58
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl __assert_fail
.L8:
ldr w0, [sp, 96]
and w0, w0, 1
cmp w0, 0
beq .L9
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 60
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl __assert_fail
.L9:
ldr w0, [sp, 96]
orr w0, w0, 1
str w0, [sp, 96]
ldr w0, [sp, 96]
and w0, w0, 1
cmp w0, 0
bne .L10
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 62
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl __assert_fail
.L10:
ldr w0, [sp, 96]
lsr w0, w0, 5
and w0, w0, 255
cmp w0, 0
beq .L11
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 64
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl __assert_fail
.L11:
ldr w1, [sp, 96]
ldr w0, [sp, 24]
lsl w0, w0, 5
orr w0, w1, w0
str w0, [sp, 96]
ldr w0, [sp, 96]
lsr w0, w0, 5
and w0, w0, 255
ldr w1, [sp, 24]
cmp w1, w0
beq .L12
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 66
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl __assert_fail
.L12:
ldr w0, [sp, 96]
orr w0, w0, 16
str w0, [sp, 96]
ldr w0, [sp, 96]
orr w0, w0, 4
str w0, [sp, 96]
ldr x0, [sp, 16]
str x0, [sp, 88]
add x0, sp, 80
str x0, [sp, 64]
mov x0, 24
str x0, [sp, 72]
bl __errno_location
str wzr, [x0]
add x0, sp, 64
mov x3, x0
mov w2, 1027
ldr w1, [sp, 28]
mov w0, 16901
bl ptrace
str x0, [sp, 48]
bl __errno_location
ldr w0, [x0]
cmp w0, 0
beq .L13
bl __errno_location
ldr w0, [x0]
mov w1, 1
str w1, [sp, 40]
str w0, [sp, 44]
adrp x0, .LC10
add x0, x0, :lo12:.LC10
str x0, [sp, 56]
ldr x2, [sp, 56]
ldr w1, [sp, 44]
ldr w0, [sp, 40]
bl error
nop
.L13:
ldr x0, [sp, 48]
cmp x0, 0
beq .L16
adrp x0, __PRETTY_FUNCTION__.1
add x3, x0, :lo12:__PRETTY_FUNCTION__.1
mov w2, 79
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __assert_fail
.L16:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 344]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L15
bl __stack_chk_fail
.L15:
ldp x29, x30, [sp], 352
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size set_watchpoint, .-set_watchpoint
.local check
.comm check,8,8
.section .rodata
.align 3
.LC11:
.string "child >= 0"
.align 3
.LC12:
.string "i == 0"
.align 3
.LC13:
.string "0"
.align 3
.LC14:
.string "got_pid == child"
.align 3
.LC15:
.string "WIFSTOPPED (status)"
.align 3
.LC16:
.string "WSTOPSIG (status) == SIGUSR1"
.align 3
.LC17:
.string "WSTOPSIG (status) == SIGTRAP"
.text
.align 2
.global main
.type main, %function
main:
.LFB10:
.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
adrp x0, cleanup
add x0, x0, :lo12:cleanup
bl atexit
bl fork
mov w1, w0
adrp x0, child
add x0, x0, :lo12:child
str w1, [x0]
adrp x0, child
add x0, x0, :lo12:child
ldr w0, [x0]
cmp w0, 0
bge .L18
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 94
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl __assert_fail
.L18:
adrp x0, child
add x0, x0, :lo12:child
ldr w0, [x0]
cmp w0, 0
bne .L19
mov x3, 0
mov x2, 0
mov w1, 0
mov w0, 0
bl ptrace
str x0, [sp, 32]
ldr x0, [sp, 32]
cmp x0, 0
beq .L20
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 98
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __assert_fail
.L20:
mov w0, 10
bl raise
str w0, [sp, 28]
ldr w0, [sp, 28]
cmp w0, 0
beq .L21
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 100
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl __assert_fail
.L21:
adrp x0, check
add x0, x0, :lo12:check
mov x1, -1
str x1, [x0]
mov w0, 12
bl raise
str w0, [sp, 28]
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 104
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl __assert_fail
.L19:
adrp x0, child
add x0, x0, :lo12:child
ldr w0, [x0]
add x1, sp, 20
mov w2, 0
bl waitpid
str w0, [sp, 24]
adrp x0, child
add x0, x0, :lo12:child
ldr w0, [x0]
ldr w1, [sp, 24]
cmp w1, w0
beq .L22
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 108
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl __assert_fail
.L22:
ldr w0, [sp, 20]
and w0, w0, 255
cmp w0, 127
beq .L23
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 109
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl __assert_fail
.L23:
ldr w0, [sp, 20]
asr w0, w0, 8
and w0, w0, 255
cmp w0, 10
beq .L24
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 110
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl __assert_fail
.L24:
adrp x0, child
add x0, x0, :lo12:child
ldr w3, [x0]
mov w2, 2
adrp x0, check
add x1, x0, :lo12:check
mov w0, w3
bl set_watchpoint
bl __errno_location
str wzr, [x0]
adrp x0, child
add x0, x0, :lo12:child
ldr w0, [x0]
mov x3, 0
mov x2, 0
mov w1, w0
mov w0, 7
bl ptrace
str x0, [sp, 32]
bl __errno_location
ldr w0, [x0]
cmp w0, 0
beq .L25
bl __errno_location
ldr w4, [x0]
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 119
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov w0, w4
bl __assert_perror_fail
.L25:
ldr x0, [sp, 32]
cmp x0, 0
beq .L26
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 120
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __assert_fail
.L26:
adrp x0, child
add x0, x0, :lo12:child
ldr w0, [x0]
add x1, sp, 20
mov w2, 0
bl waitpid
str w0, [sp, 24]
adrp x0, child
add x0, x0, :lo12:child
ldr w0, [x0]
ldr w1, [sp, 24]
cmp w1, w0
beq .L27
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 123
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl __assert_fail
.L27:
ldr w0, [sp, 20]
and w0, w0, 255
cmp w0, 127
beq .L28
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 124
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl __assert_fail
.L28:
ldr w0, [sp, 20]
asr w0, w0, 8
and w0, w0, 255
cmp w0, 12
bne .L29
bl cleanup
mov w0, 2
b .L32
.L29:
ldr w0, [sp, 20]
asr w0, w0, 8
and w0, w0, 255
cmp w0, 5
beq .L31
adrp x0, __PRETTY_FUNCTION__.0
add x3, x0, :lo12:__PRETTY_FUNCTION__.0
mov w2, 131
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl __assert_fail
.L31:
mov w0, 0
.L32:
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 .L33
bl __stack_chk_fail
.L33:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size main, .-main
.section .rodata
.align 3
.type __PRETTY_FUNCTION__.1, %object
.size __PRETTY_FUNCTION__.1, 15
__PRETTY_FUNCTION__.1:
.string "set_watchpoint"
.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
.section .rodata
.align 3
.LC0:
.string "Enter a number :-"
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "This number is greater than 10"
.align 3
.LC3:
.string "This number is less than 10 "
.align 3
.LC4:
.string "This number is 10"
.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 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, 10
ble .L2
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
.L2:
ldr w0, [sp, 20]
cmp w0, 9
bgt .L3
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
.L3:
ldr w0, [sp, 20]
cmp w0, 10
bne .L6
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
.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
.LFE0:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global foo
.type foo, %function
foo:
.LFB0:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
.align 2
.global bar
.type bar, %function
bar:
.LFB1:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE1:
.size bar, .-bar
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "\nDigite os valores do vetor: "
.align 3
.LC1:
.string "%d"
.align 3
.LC2:
.string "\nDigite mais dois valores para preenchermos duas posicoes do vetor: "
.align 3
.LC3:
.string "\nA soma dos dois vetores e: %d"
.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
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 wzr, [sp, 16]
b .L2
.L3:
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x1, sp, 24
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L2:
ldr w0, [sp, 16]
cmp w0, 8
ble .L3
mov w0, 1
str w0, [sp, 16]
b .L4
.L5:
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
add x1, sp, 24
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L4:
ldr w0, [sp, 16]
cmp w0, 2
ble .L5
ldr w1, [sp, 28]
ldr w0, [sp, 32]
add w0, w1, w0
str w0, [sp, 20]
ldr w1, [sp, 20]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
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, 56]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L7
bl __stack_chk_fail
.L7:
mov w0, w1
ldp x29, x30, [sp], 64
.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
.LC0:
.string "Input the angle in degrees: "
.align 3
.LC1:
.string "%lf"
.align 3
.LC2:
.string "sin(%.3lf)= %.3lf\n"
.align 3
.LC3:
.string "cos(%.3lf)= %.3lf\n"
.align 3
.LC4:
.string "tan(%.3lf)= %.3lf\n"
.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 d8, [sp, 16]
.cfi_offset 72, -64
str w0, [sp, 44]
str x1, [sp, 32]
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 w0, [sp, 44]
cmp w0, 1
bgt .L2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x0, sp, 56
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
b .L3
.L2:
ldr x0, [sp, 32]
add x0, x0, 8
ldr x0, [x0]
bl atof
str d0, [sp, 56]
.L3:
ldr d0, [sp, 56]
adrp x0, .LC5
ldr d1, [x0, #:lo12:.LC5]
fdiv d0, d0, d1
str d0, [sp, 64]
ldr d8, [sp, 56]
ldr d0, [sp, 64]
bl sin
fmov d1, d0
fmov d0, d8
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr d8, [sp, 56]
ldr d0, [sp, 64]
bl cos
fmov d1, d0
fmov d0, d8
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
ldr d8, [sp, 56]
ldr d0, [sp, 64]
bl tan
fmov d1, d0
fmov d0, d8
adrp x0, .LC4
add x0, x0, :lo12:.LC4
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, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L5
bl __stack_chk_fail
.L5:
mov w0, w1
ldr d8, [sp, 16]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_restore 72
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC5:
.word 511272907
.word 1078765020
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global startNode
.bss
.align 3
.type startNode, %object
.size startNode, 8
startNode:
.zero 8
.section .rodata
.align 3
.LC0:
.string "\n\nLinked List : To create and display Singly Linked List :"
.align 3
.LC1:
.string "-------------------------------------------------------------"
.align 3
.LC2:
.string "Input the number of nodes : "
.align 3
.LC3:
.string "%d"
.align 3
.LC4:
.string "\nData entered in the list : "
.align 3
.LC5:
.string "\nData in the list in reverse : "
.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
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
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
add x0, sp, 20
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
ldr w0, [sp, 20]
bl createNodeList
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
bl displayList
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
bl displayReversedList
bl addNewStartNode
bl displayList
bl addNewEndNode
bl displayList
bl addNewMidNode
bl displayList
bl deleteMidNode
bl displayList
bl listSearch
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
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC6:
.string "Memory can not be allocated."
.align 3
.LC7:
.string "Input data for node 1 : "
.align 3
.LC8:
.string "Input data for node %d : "
.text
.align 2
.global createNodeList
.type createNodeList, %function
createNodeList:
.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]
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
mov x1, x0
adrp x0, startNode
add x0, x0, :lo12:startNode
str x1, [x0]
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
cmp x0, 0
bne .L5
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
b .L11
.L5:
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
add x0, sp, 32
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
ldr w1, [sp, 32]
str w1, [x0]
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
str xzr, [x0, 8]
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
str x0, [sp, 40]
mov w0, 2
str w0, [sp, 36]
b .L7
.L9:
mov x0, 16
bl malloc
str x0, [sp, 48]
ldr x0, [sp, 48]
cmp x0, 0
bne .L8
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
nop
b .L11
.L8:
ldr w1, [sp, 36]
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
add x0, sp, 32
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
ldr w1, [sp, 32]
ldr x0, [sp, 48]
str w1, [x0]
ldr x0, [sp, 48]
str xzr, [x0, 8]
ldr x0, [sp, 40]
ldr x1, [sp, 48]
str x1, [x0, 8]
ldr x0, [sp, 40]
ldr x0, [x0, 8]
str x0, [sp, 40]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L7:
ldr w1, [sp, 36]
ldr w0, [sp, 28]
cmp w1, w0
ble .L9
.L11:
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 .L10
bl __stack_chk_fail
.L10:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size createNodeList, .-createNodeList
.section .rodata
.align 3
.LC9:
.string "List is empty."
.align 3
.LC10:
.string "Data = %d\n"
.text
.align 2
.global displayList
.type displayList, %function
displayList:
.LFB8:
.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, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
cmp x0, 0
bne .L13
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
b .L17
.L13:
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
str x0, [sp, 24]
b .L15
.L16:
ldr x0, [sp, 24]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
ldr x0, [sp, 24]
ldr x0, [x0, 8]
str x0, [sp, 24]
.L15:
ldr x0, [sp, 24]
cmp x0, 0
bne .L16
.L17:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size displayList, .-displayList
.align 2
.global displayReversedList
.type displayReversedList, %function
displayReversedList:
.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]
ldr x0, [sp, 24]
cmp x0, 0
beq .L21
ldr x0, [sp, 24]
ldr x0, [x0, 8]
bl displayReversedList
ldr x0, [sp, 24]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
b .L18
.L21:
nop
.L18:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size displayReversedList, .-displayReversedList
.section .rodata
.align 3
.LC11:
.string "Input data for new start node: "
.align 3
.LC12:
.string "Data inserted as first node"
.text
.align 2
.global addNewStartNode
.type addNewStartNode, %function
addNewStartNode:
.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, 16
bl malloc
str x0, [sp, 24]
ldr x0, [sp, 24]
cmp x0, 0
bne .L23
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
b .L25
.L23:
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl printf
ldr x0, [sp, 24]
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x1, [x0]
ldr x0, [sp, 24]
str x1, [x0, 8]
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x1, [sp, 24]
str x1, [x0]
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl puts
.L25:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size addNewStartNode, .-addNewStartNode
.section .rodata
.align 3
.LC13:
.string "Input data for new end node: "
.align 3
.LC14:
.string "Data inserted as final node"
.text
.align 2
.global addNewEndNode
.type addNewEndNode, %function
addNewEndNode:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40
mov x29, sp
mov x0, 16
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L27
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
b .L28
.L27:
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl printf
ldr x0, [sp, 40]
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
str x0, [sp, 32]
b .L29
.L30:
ldr x0, [sp, 32]
str x0, [sp, 24]
ldr x0, [sp, 32]
ldr x0, [x0, 8]
str x0, [sp, 32]
.L29:
ldr x0, [sp, 32]
cmp x0, 0
bne .L30
ldr x0, [sp, 24]
ldr x1, [sp, 40]
str x1, [x0, 8]
ldr x0, [sp, 40]
str xzr, [x0, 8]
.L28:
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl puts
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size addNewEndNode, .-addNewEndNode
.section .rodata
.align 3
.LC15:
.string "Input data for new midpoint node: "
.align 3
.LC16:
.string "Data inserted as midpoint node"
.text
.align 2
.global addNewMidNode
.type addNewMidNode, %function
addNewMidNode:
.LFB12:
.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, 16]
str wzr, [sp, 20]
mov x0, 16
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L32
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl printf
b .L41
.L32:
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl printf
ldr x0, [sp, 40]
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
cmp x0, 0
bne .L34
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
b .L41
.L34:
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
str x0, [sp, 24]
b .L35
.L36:
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
ldr x0, [sp, 24]
ldr x0, [x0, 8]
str x0, [sp, 24]
.L35:
ldr x0, [sp, 24]
cmp x0, 0
bne .L36
ldr w0, [sp, 16]
and w0, w0, 1
cmp w0, 0
bne .L37
ldr w0, [sp, 16]
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
str w0, [sp, 20]
b .L38
.L37:
ldr w0, [sp, 16]
add w0, w0, 1
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
str w0, [sp, 20]
.L38:
str wzr, [sp, 16]
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
str x0, [sp, 24]
b .L39
.L40:
ldr x0, [sp, 24]
str x0, [sp, 32]
ldr x0, [sp, 24]
ldr x0, [x0, 8]
str x0, [sp, 24]
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L39:
ldr w1, [sp, 16]
ldr w0, [sp, 20]
cmp w1, w0
bne .L40
ldr x0, [sp, 32]
ldr x1, [sp, 40]
str x1, [x0, 8]
ldr x0, [sp, 40]
ldr x1, [sp, 24]
str x1, [x0, 8]
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl puts
.L41:
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size addNewMidNode, .-addNewMidNode
.section .rodata
.align 3
.LC17:
.string "Midpoint node has been removed and memory deallocated"
.text
.align 2
.global deleteMidNode
.type deleteMidNode, %function
deleteMidNode:
.LFB13:
.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, 24]
str wzr, [sp, 28]
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
cmp x0, 0
bne .L43
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
b .L44
.L43:
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
str x0, [sp, 32]
b .L45
.L46:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
ldr x0, [sp, 32]
ldr x0, [x0, 8]
str x0, [sp, 32]
.L45:
ldr x0, [sp, 32]
cmp x0, 0
bne .L46
ldr w0, [sp, 24]
and w0, w0, 1
cmp w0, 0
bne .L47
ldr w0, [sp, 24]
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
str w0, [sp, 28]
b .L48
.L47:
ldr w0, [sp, 24]
add w0, w0, 1
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
str w0, [sp, 28]
.L48:
str wzr, [sp, 24]
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
str x0, [sp, 32]
b .L49
.L50:
ldr x0, [sp, 32]
str x0, [sp, 40]
ldr x0, [sp, 32]
ldr x0, [x0, 8]
str x0, [sp, 32]
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L49:
ldr w1, [sp, 24]
ldr w0, [sp, 28]
cmp w1, w0
bne .L50
ldr x0, [sp, 32]
ldr x1, [x0, 8]
ldr x0, [sp, 40]
str x1, [x0, 8]
ldr x0, [sp, 32]
bl free
.L44:
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl puts
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size deleteMidNode, .-deleteMidNode
.section .rodata
.align 3
.LC18:
.string "Input a value that you wish to search for: "
.align 3
.LC19:
.string "%d found at position %d in the list with the memory address of %d"
.align 3
.LC20:
.string "Item not in list"
.text
.align 2
.global listSearch
.type listSearch, %function
listSearch:
.LFB14:
.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 w0, 1
str w0, [sp, 32]
str wzr, [sp, 36]
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl printf
add x0, sp, 28
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
cmp x0, 0
bne .L52
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
b .L58
.L52:
adrp x0, startNode
add x0, x0, :lo12:startNode
ldr x0, [x0]
str x0, [sp, 40]
b .L54
.L56:
ldr x0, [sp, 40]
ldr w1, [x0]
ldr w0, [sp, 28]
cmp w1, w0
bne .L55
ldr w0, [sp, 28]
ldr x3, [sp, 48]
ldr w2, [sp, 32]
mov w1, w0
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl printf
mov w0, 1
str w0, [sp, 36]
str xzr, [sp, 40]
b .L54
.L55:
ldr x0, [sp, 40]
str x0, [sp, 48]
ldr x0, [sp, 40]
ldr x0, [x0, 8]
str x0, [sp, 40]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L54:
ldr x0, [sp, 40]
cmp x0, 0
bne .L56
ldr w0, [sp, 36]
cmp w0, 0
bne .L58
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl puts
.L58:
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 .L57
bl __stack_chk_fail
.L57:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size listSearch, .-listSearch
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "RT28xx_DIR"
.align 3
.LC1:
.string "CHIPSET"
.align 3
.LC2:
.string "HAS_WOW_SUPPORT"
.align 3
.LC3:
.string "RT28xx_MODE"
.align 3
.LC4:
.string "HAS_SWITCH_CHANNEL_OFFLOAD"
.align 3
.LC5:
.string "Environment value \"RT28xx_DIR\" not export "
.align 3
.LC6:
.string "Environment value \"CHIPSET\" not export "
.align 3
.LC7:
.string "Environment value \"RT28xx_DIR\" is too long!"
.align 3
.LC8:
.string "Do not export HAS_SWITCH_CHANNEL_OFFLOAD environment"
.align 3
.LC9:
.string "2860"
.align 3
.LC10:
.string "/common/rt2860.bin"
.align 3
.LC11:
.string "2870"
.align 3
.LC12:
.string "/common/rt2870.bin"
.align 3
.LC13:
.string "3090"
.align 3
.LC14:
.string "2070"
.align 3
.LC15:
.string "3070"
.align 3
.LC16:
.string "3572"
.align 3
.LC17:
.string "3573"
.align 3
.LC18:
.string "3370"
.align 3
.LC19:
.string "5370"
.align 3
.LC20:
.string "5572"
.align 3
.LC21:
.string "y"
.align 3
.LC22:
.string "xxxxx"
.align 3
.LC23:
.string "/common/rt2870_sw_ch_offload.bin"
.align 3
.LC24:
.string "5592"
.align 3
.LC25:
.string "USB"
.align 3
.LC26:
.string "PCI"
.align 3
.LC27:
.string "STA"
.align 3
.LC28:
.string "rt2870"
.align 3
.LC29:
.string "rt2870_wow.bin"
.align 3
.LC30:
.string "infname %s\n"
.align 3
.LC31:
.string "/include/firmware.h"
.align 3
.LC32:
.string "r"
.align 3
.LC33:
.string "Can't read file %s \n"
.align 3
.LC34:
.string "w"
.align 3
.LC35:
.string "Can't open write file %s \n"
.align 3
.LC36:
.string "/* AUTO GEN PLEASE DO NOT MODIFY IT */ \n"
.align 3
.LC37:
.string "UCHAR FirmwareImage [] = { \n"
.align 3
.LC38:
.string "} ;\n"
.align 3
.LC39:
.string "0x"
.align 3
.LC40:
.string "%02x"
.align 3
.LC41:
.string ", "
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
sub sp, sp, #2160
.cfi_def_cfa_offset 2160
stp x29, x30, [sp]
.cfi_offset 29, -2160
.cfi_offset 30, -2152
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, 2152]
mov x1, 0
str wzr, [sp, 36]
add x0, sp, 104
mov x2, 1024
mov w1, 0
bl memset
add x0, sp, 1128
mov x2, 1024
mov w1, 0
bl memset
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl getenv
str x0, [sp, 40]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl getenv
str x0, [sp, 48]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl getenv
str x0, [sp, 56]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl getenv
str x0, [sp, 64]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl getenv
str x0, [sp, 72]
ldr x0, [sp, 40]
cmp x0, 0
bne .L2
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
mov w0, -1
b .L28
.L2:
ldr x0, [sp, 48]
cmp x0, 0
bne .L4
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
mov w0, -1
b .L28
.L4:
ldr x0, [sp, 40]
bl strlen
cmp x0, 924
bls .L5
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl puts
mov w0, -1
b .L28
.L5:
ldr x0, [sp, 72]
cmp x0, 0
bne .L6
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl puts
mov w0, -1
b .L28
.L6:
add x0, sp, 104
ldr x1, [sp, 40]
bl strcat
mov x2, 4
adrp x0, .LC9
add x1, x0, :lo12:.LC9
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L7
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC10
add x0, x0, :lo12:.LC10
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L7:
mov x2, 4
adrp x0, .LC11
add x1, x0, :lo12:.LC11
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L9
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC12
add x0, x0, :lo12:.LC12
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L9:
mov x2, 4
adrp x0, .LC13
add x1, x0, :lo12:.LC13
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L10
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC10
add x0, x0, :lo12:.LC10
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L10:
mov x2, 4
adrp x0, .LC14
add x1, x0, :lo12:.LC14
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L11
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC12
add x0, x0, :lo12:.LC12
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L11:
mov x2, 4
adrp x0, .LC15
add x1, x0, :lo12:.LC15
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L12
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC12
add x0, x0, :lo12:.LC12
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L12:
mov x2, 4
adrp x0, .LC16
add x1, x0, :lo12:.LC16
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L13
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC12
add x0, x0, :lo12:.LC12
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L13:
mov x2, 4
adrp x0, .LC17
add x1, x0, :lo12:.LC17
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L14
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC12
add x0, x0, :lo12:.LC12
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L14:
mov x2, 4
adrp x0, .LC18
add x1, x0, :lo12:.LC18
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L15
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC12
add x0, x0, :lo12:.LC12
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L15:
mov x2, 4
adrp x0, .LC19
add x1, x0, :lo12:.LC19
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L16
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC12
add x0, x0, :lo12:.LC12
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L16:
mov x2, 4
adrp x0, .LC20
add x1, x0, :lo12:.LC20
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L17
ldr x0, [sp, 72]
ldrb w1, [x0]
adrp x0, .LC21
add x0, x0, :lo12:.LC21
ldrb w0, [x0]
sub w0, w1, w0
cmp w0, 0
bne .L18
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl puts
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x2, x0, x1
adrp x0, .LC23
add x1, x0, :lo12:.LC23
mov x0, x2
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldrb w1, [x1, 32]
strb w1, [x0, 32]
b .L8
.L18:
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC12
add x0, x0, :lo12:.LC12
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L17:
mov x2, 4
adrp x0, .LC24
add x1, x0, :lo12:.LC24
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L19
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC10
add x0, x0, :lo12:.LC10
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L19:
mov x2, 3
adrp x0, .LC25
add x1, x0, :lo12:.LC25
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L20
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC12
add x0, x0, :lo12:.LC12
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L20:
mov x2, 3
adrp x0, .LC26
add x1, x0, :lo12:.LC26
ldr x0, [sp, 48]
bl strncmp
cmp w0, 0
bne .L21
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC10
add x0, x0, :lo12:.LC10
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
b .L8
.L21:
add x0, sp, 104
bl strlen
mov x1, x0
add x0, sp, 104
add x1, x0, x1
adrp x0, .LC10
add x0, x0, :lo12:.LC10
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
add x1, x3, 15
add x0, x2, 15
ldr w1, [x1]
str w1, [x0]
.L8:
ldr x0, [sp, 56]
cmp x0, 0
beq .L22
ldr x0, [sp, 56]
ldrb w1, [x0]
adrp x0, .LC21
add x0, x0, :lo12:.LC21
ldrb w0, [x0]
sub w0, w1, w0
cmp w0, 0
bne .L22
mov x2, 3
adrp x0, .LC27
add x1, x0, :lo12:.LC27
ldr x0, [sp, 64]
bl strncmp
cmp w0, 0
bne .L22
add x2, sp, 104
adrp x0, .LC28
add x1, x0, :lo12:.LC28
mov x0, x2
bl strstr
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
beq .L22
ldr x2, [sp, 56]
adrp x0, .LC29
add x1, x0, :lo12:.LC29
mov x0, x2
ldr x2, [x1]
str x2, [x0]
ldr x1, [x1, 7]
str x1, [x0, 7]
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x3, [x0]
add x0, sp, 104
mov x2, x0
adrp x0, .LC30
add x1, x0, :lo12:.LC30
mov x0, x3
bl fprintf
.L22:
add x0, sp, 1128
ldr x1, [sp, 40]
bl strcat
add x0, sp, 1128
bl strlen
mov x1, x0
add x0, sp, 1128
add x1, x0, x1
adrp x0, .LC31
add x0, x0, :lo12:.LC31
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr w0, [x3, 16]
str w0, [x2, 16]
add x2, sp, 104
adrp x0, .LC32
add x1, x0, :lo12:.LC32
mov x0, x2
bl fopen
str x0, [sp, 80]
ldr x0, [sp, 80]
cmp x0, 0
bne .L23
add x0, sp, 104
mov x1, x0
adrp x0, .LC33
add x0, x0, :lo12:.LC33
bl printf
mov w0, -1
b .L28
.L23:
add x2, sp, 1128
adrp x0, .LC34
add x1, x0, :lo12:.LC34
mov x0, x2
bl fopen
str x0, [sp, 88]
ldr x0, [sp, 88]
cmp x0, 0
bne .L24
add x0, sp, 1128
mov x1, x0
adrp x0, .LC35
add x0, x0, :lo12:.LC35
bl printf
mov w0, -1
b .L28
.L24:
ldr x3, [sp, 88]
mov x2, 40
mov x1, 1
adrp x0, .LC36
add x0, x0, :lo12:.LC36
bl fwrite
ldr x3, [sp, 88]
mov x2, 40
mov x1, 1
adrp x0, .LC36
add x0, x0, :lo12:.LC36
bl fwrite
ldr x1, [sp, 88]
mov w0, 10
bl fputc
ldr x1, [sp, 88]
mov w0, 10
bl fputc
ldr x3, [sp, 88]
mov x2, 28
mov x1, 1
adrp x0, .LC37
add x0, x0, :lo12:.LC37
bl fwrite
.L27:
ldr x0, [sp, 80]
bl getc
strb w0, [sp, 35]
ldr x0, [sp, 80]
bl feof
cmp w0, 0
beq .L25
ldr x3, [sp, 88]
mov x2, 4
mov x1, 1
adrp x0, .LC38
add x0, x0, :lo12:.LC38
bl fwrite
ldr x0, [sp, 80]
bl fclose
ldr x0, [sp, 88]
bl fclose
mov w0, 0
bl exit
.L25:
add x0, sp, 96
mov x2, 2
mov w1, 0
bl memset
ldr w0, [sp, 36]
cmp w0, 15
ble .L26
ldr x1, [sp, 88]
mov w0, 10
bl fputc
str wzr, [sp, 36]
.L26:
ldr x3, [sp, 88]
mov x2, 2
mov x1, 1
adrp x0, .LC39
add x0, x0, :lo12:.LC39
bl fwrite
ldrb w0, [sp, 35]
add x3, sp, 96
mov w2, w0
adrp x0, .LC40
add x1, x0, :lo12:.LC40
mov x0, x3
bl sprintf
add x0, sp, 96
ldr x1, [sp, 88]
bl fputs
ldr x3, [sp, 88]
mov x2, 2
mov x1, 1
adrp x0, .LC41
add x0, x0, :lo12:.LC41
bl fwrite
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
b .L27
.L28:
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 2152]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L29
bl __stack_chk_fail
.L29:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 2160
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global r
.data
.align 3
.type r, %object
.size r, 8
r:
.xword -1
.section .rodata
.align 3
.LC0:
.string "/dev/qrtr-tun"
.string ""
.align 3
.LC1:
.string "\001!!9\230\252\3609\326,\363P\032GVR\031V\206"
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string ""
.string "\376\377\377\377"
.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
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
str xzr, [sp, 24]
mov x2, 14
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov x0, 536870912
bl memcpy
mov w4, 0
mov x3, 5250
movk x3, 0x18, lsl 16
mov x2, 536870912
mov x1, -100
mov x0, 56
bl syscall
str x0, [sp, 24]
ldr x0, [sp, 24]
cmn x0, #1
beq .L2
ldr x1, [sp, 24]
adrp x0, r
add x0, x0, :lo12:r
str x1, [x0]
.L2:
mov x2, 32
adrp x0, .LC1
add x1, x0, :lo12:.LC1
mov x0, 536870912
bl memcpy
adrp x0, r
add x0, x0, :lo12:r
ldr x0, [x0]
mov x3, 32
movk x3, 0x2000, lsl 16
mov x2, 536870912
mov x1, x0
mov x0, 64
bl syscall
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
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global ft_range
.type ft_range, %function
ft_range:
.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]
str w1, [sp, 24]
ldr w1, [sp, 28]
ldr w0, [sp, 24]
cmp w1, w0
bge .L2
ldr w1, [sp, 24]
ldr w0, [sp, 28]
sub w0, w1, w0
sxtw x0, w0
lsl x0, x0, 2
bl malloc
str x0, [sp, 40]
str wzr, [sp, 36]
ldr x0, [sp, 40]
cmp x0, 0
beq .L3
b .L4
.L5:
ldrsw x0, [sp, 36]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w1, [sp, 28]
str w1, [x0]
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L4:
ldr w1, [sp, 28]
ldr w0, [sp, 24]
cmp w1, w0
blt .L5
.L3:
ldr x0, [sp, 40]
b .L6
.L2:
mov x0, 0
.L6:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size ft_range, .-ft_range
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Hi"
.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 w0, [sp, 28]
str x1, [sp, 16]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
bl say_hi_a
bl say_hi_b
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
.align 2
.global ft_tolower
.type ft_tolower, %function
ft_tolower:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
cmp w0, 64
ble .L2
ldr w0, [sp, 12]
cmp w0, 90
bgt .L2
ldr w0, [sp, 12]
add w0, w0, 32
b .L4
.L2:
ldr w0, [sp, 12]
.L4:
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size ft_tolower, .-ft_tolower
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC3:
.string "hello"
.text
.align 2
.global f0
.type f0, %function
f0:
.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, 513
movk w0, 0x403, lsl 16
str w0, [sp, 16]
str xzr, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 16]
ldrb w0, [sp, 16]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 17]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 18]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 19]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
bl free
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 f0, .-f0
.align 2
.global f1
.type f1, %function
f1:
.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:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 16]
ldrb w0, [sp, 16]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 17]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 18]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 19]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
bl free
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 .L6
bl __stack_chk_fail
.L6:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size f1, .-f1
.align 2
.global f2
.type f2, %function
f2:
.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:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
stp xzr, xzr, [sp, 16]
mov w0, 513
str w0, [sp, 16]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 16]
ldrb w0, [sp, 16]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 17]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 18]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 19]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
bl free
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 .L9
bl __stack_chk_fail
.L9:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size f2, .-f2
.align 2
.global f3
.type f3, %function
f3:
.LFB3:
.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 w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 32]
str xzr, [sp, 40]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
add x0, sp, 32
str x0, [sp, 24]
ldr w1, [sp, 48]
ldr x0, [sp, 24]
str w1, [x0]
ldrb w0, [sp, 32]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 33]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 4
ldr w0, [x0]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 34]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 8
ldr w0, [x0]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 35]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 12
ldr w0, [x0]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 40]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 40]
bl free
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 .L12
bl __stack_chk_fail
.L12:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size f3, .-f3
.section .rodata
.align 3
.LC4:
.string "hola"
.text
.align 2
.global f4
.type f4, %function
f4:
.LFB4:
.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
stp xzr, xzr, [sp, 24]
str xzr, [sp, 40]
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl strdup
str x0, [sp, 32]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
add x0, sp, 24
str x0, [sp, 16]
ldr w1, [sp, 48]
ldr x0, [sp, 16]
str w1, [x0]
ldrb w0, [sp, 24]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 16]
ldrb w0, [x0]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 25]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 16]
add x0, x0, 1
ldrb w0, [x0]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 26]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 16]
add x0, x0, 2
ldrb w0, [x0]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 27]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 16]
add x0, x0, 3
ldrb w0, [x0]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 40]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 32]
bl free
ldr x0, [sp, 40]
bl free
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 .L15
bl __stack_chk_fail
.L15:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size f4, .-f4
.align 2
.global f5
.type f5, %function
f5:
.LFB5:
.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, 513
movk w0, 0x403, lsl 16
str w0, [sp, 16]
str xzr, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 16]
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 .L18
bl __stack_chk_fail
.L18:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE5:
.size f5, .-f5
.align 2
.global f6
.type f6, %function
f6:
.LFB6:
.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
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 16]
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 .L21
bl __stack_chk_fail
.L21:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size f6, .-f6
.align 2
.global f7
.type f7, %function
f7:
.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
stp xzr, xzr, [sp, 16]
mov w0, 513
str w0, [sp, 16]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 16]
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 .L24
bl __stack_chk_fail
.L24:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size f7, .-f7
.align 2
.global f8
.type f8, %function
f8:
.LFB8:
.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 w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 32]
str xzr, [sp, 40]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
add x0, sp, 32
str x0, [sp, 24]
ldr w1, [sp, 48]
ldr x0, [sp, 24]
str w1, [x0]
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 .L27
bl __stack_chk_fail
.L27:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size f8, .-f8
.align 2
.global f9
.type f9, %function
f9:
.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
stp xzr, xzr, [sp, 24]
str xzr, [sp, 40]
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl strdup
str x0, [sp, 32]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
add x0, sp, 24
str x0, [sp, 16]
ldr w1, [sp, 48]
ldr x0, [sp, 16]
str w1, [x0]
ldr x0, [sp, 32]
bl free
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 .L30
bl __stack_chk_fail
.L30:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size f9, .-f9
.align 2
.global f10
.type f10, %function
f10:
.LFB10:
.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
stp xzr, xzr, [sp, 24]
str xzr, [sp, 40]
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl strdup
str x0, [sp, 32]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
add x0, sp, 24
str x0, [sp, 16]
ldr w1, [sp, 48]
ldr x0, [sp, 16]
str w1, [x0]
ldr x0, [sp, 40]
bl free
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 .L33
bl __stack_chk_fail
.L33:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size f10, .-f10
.align 2
.global f11
.type f11, %function
f11:
.LFB11:
.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 w0, 513
str w0, [sp, 40]
mov w0, 1
strb w0, [sp, 40]
mov w0, 2
strb w0, [sp, 41]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 32]
add x0, sp, 40
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
ldr x0, [sp, 24]
ldr w1, [sp, 48]
str w1, [x0]
ldrb w0, [sp, 40]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 41]
cmp w0, 2
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 1
ldrb w0, [x0]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 2
ldrb w0, [x0]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 3
ldrb w0, [x0]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 32]
bl free
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 .L36
bl __stack_chk_fail
.L36:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size f11, .-f11
.align 2
.global f12
.type f12, %function
f12:
.LFB12:
.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 xzr, [sp, 16]
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 16]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 24]
ldrb w0, [sp, 24]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 25]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 26]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 27]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 16]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 16]
bl free
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 .L39
bl __stack_chk_fail
.L39:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size f12, .-f12
.align 2
.global f13
.type f13, %function
f13:
.LFB13:
.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, .LC0
add x0, x0, :lo12:.LC0
add x2, sp, 24
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr x0, [x3, 16]
str x0, [x2, 16]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
ldr w0, [sp, 48]
str w0, [sp, 24]
ldr w0, [sp, 24]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 28]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 32]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 36]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 40]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 40]
bl free
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 .L42
bl __stack_chk_fail
.L42:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size f13, .-f13
.section .rodata
.align 3
.LC0:
.word 1
.byte 2
.zero 3
.word 3
.byte 4
.zero 3
.xword 0
.text
.global a15
.data
.align 3
.type a15, %object
.size a15, 16
a15:
.ascii "\001\002\003\004"
.zero 4
.xword 0
.text
.align 2
.global f15
.type f15, %function
f15:
.LFB14:
.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, .LC3
add x0, x0, :lo12:.LC3
bl strdup
mov x1, x0
adrp x0, a15
add x0, x0, :lo12:a15
str x1, [x0, 8]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 16]
ldr w1, [sp, 16]
adrp x0, a15
add x0, x0, :lo12:a15
str w1, [x0]
adrp x0, a15
add x0, x0, :lo12:a15
ldrb w0, [x0]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
adrp x0, a15
add x0, x0, :lo12:a15
ldrb w0, [x0, 1]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
adrp x0, a15
add x0, x0, :lo12:a15
ldrb w0, [x0, 2]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
adrp x0, a15
add x0, x0, :lo12:a15
ldrb w0, [x0, 3]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
adrp x0, a15
add x0, x0, :lo12:a15
ldr x0, [x0, 8]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
adrp x0, a15
add x0, x0, :lo12:a15
ldr x0, [x0, 8]
bl free
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 .L45
bl __stack_chk_fail
.L45:
mov w0, w1
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size f15, .-f15
.align 2
.global f16
.type f16, %function
f16:
.LFB15:
.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 xzr, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 24]
add x0, sp, 24
ldr w0, [x0]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
add x0, sp, 24
ldr w0, [x0]
cmp w0, 98
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
add x0, sp, 24
ldr w0, [x0]
cmp w0, 99
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
add x0, sp, 24
ldr w0, [x0]
cmp w0, 100
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
bl free
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 .L48
bl __stack_chk_fail
.L48:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size f16, .-f16
.align 2
.global f17
.type f17, %function
f17:
.LFB16:
.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
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 24]
ldrb w0, [sp, 24]
cmp w0, 97
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
bl free
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 .L51
bl __stack_chk_fail
.L51:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE16:
.size f17, .-f17
.align 2
.global f18
.type f18, %function
f18:
.LFB17:
.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
stp xzr, xzr, [sp, 24]
str xzr, [sp, 40]
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 24]
mov w0, 5
str w0, [sp, 28]
mov w0, 6
str w0, [sp, 32]
mov w0, 10
str w0, [sp, 28]
mov w0, 11
str w0, [sp, 32]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
mov x0, 3
mov x1, 0
stp x0, x1, [sp, 48]
add x0, sp, 64
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
str q0, [x0, 64]
fmov w1, s0
str w1, [x0, 80]
add x1, sp, 48
add x0, sp, 24
mov x2, 100
bl memcpy
ldrb w0, [sp, 24]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 25]
cmp w0, 2
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 26]
cmp w0, 3
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 27]
cmp w0, 4
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 28]
cmp w0, 10
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 32]
cmp w0, 11
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
mov w0, 0
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 .L54
bl __stack_chk_fail
.L54:
mov w0, w1
ldp x29, x30, [sp], 160
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE17:
.size f18, .-f18
.align 2
.global f181
.type f181, %function
f181:
.LFB18:
.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
stp xzr, xzr, [sp, 24]
str xzr, [sp, 40]
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 24]
mov w0, 5
str w0, [sp, 28]
mov w0, 6
str w0, [sp, 32]
mov w0, 10
str w0, [sp, 28]
mov w0, 11
str w0, [sp, 32]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
mov x0, 3
mov x1, 0
stp x0, x1, [sp, 48]
add x0, sp, 64
movi v0.4s, 0
stp q0, q0, [x0]
stp q0, q0, [x0, 32]
str q0, [x0, 64]
fmov w1, s0
str w1, [x0, 80]
add x1, sp, 48
add x0, sp, 24
mov x2, 5
bl memcpy
ldrb w0, [sp, 24]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 25]
cmp w0, 2
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 26]
cmp w0, 3
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 27]
cmp w0, 4
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 28]
cmp w0, 10
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 32]
cmp w0, 11
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
mov w0, 0
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 .L57
bl __stack_chk_fail
.L57:
mov w0, w1
ldp x29, x30, [sp], 160
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE18:
.size f181, .-f181
.section .rodata
.align 3
.LC5:
.string "hi"
.align 3
.LC6:
.string "world"
.text
.align 2
.global f19
.type f19, %function
f19:
.LFB19:
.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]
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, .LC1
add x1, x0, :lo12:.LC1
add x0, sp, 40
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr q0, [x1, 32]
str q0, [x0, 32]
ldr x1, [x1, 48]
str x1, [x0, 48]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 88]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 48]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl strdup
str x0, [sp, 64]
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl strdup
str x0, [sp, 80]
mov w0, 25185
strh w0, [sp, 96]
add x1, sp, 40
ldrsw x0, [sp, 28]
lsl x0, x0, 4
add x0, x1, x0
ldrh w1, [sp, 96]
strh w1, [x0]
ldrb w0, [sp, 40]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 41]
cmp w0, 2
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 56]
cmp w0, 3
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 57]
cmp w0, 4
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 72]
cmp w0, 5
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 73]
cmp w0, 6
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 28]
lsl x0, x0, 4
add x1, sp, 40
ldrb w0, [x1, x0]
cmp w0, 5
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 28]
lsl x0, x0, 4
add x1, sp, 41
ldrb w0, [x1, x0]
cmp w0, 6
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L60
bl __stack_chk_fail
.L60:
mov w0, w1
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE19:
.size f19, .-f19
.section .rodata
.align 3
.LC1:
.ascii "\001\002"
.zero 6
.xword 0
.ascii "\003\004"
.zero 6
.xword 0
.ascii "\005\006"
.zero 6
.xword 0
.xword 0
.text
.align 2
.global f20
.type f20, %function
f20:
.LFB20:
.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 w0, [sp, 44]
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 x0, 32
bl malloc
str x0, [sp, 56]
ldr x0, [sp, 56]
mov w1, 1
strb w1, [x0]
ldr x0, [sp, 56]
mov w1, 2
strb w1, [x0, 1]
ldr x0, [sp, 56]
mov w1, 3
strb w1, [x0, 2]
ldr x0, [sp, 56]
mov w1, 4
strb w1, [x0, 3]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
mov x1, x0
ldr x0, [sp, 56]
str x1, [x0, 8]
ldr x0, [sp, 56]
add x0, x0, 16
mov w1, 5
strb w1, [x0]
ldr x0, [sp, 56]
add x0, x0, 16
mov w1, 6
strb w1, [x0, 1]
ldr x0, [sp, 56]
add x0, x0, 16
mov w1, 7
strb w1, [x0, 2]
ldr x0, [sp, 56]
add x0, x0, 16
mov w1, 8
strb w1, [x0, 3]
ldr x0, [sp, 56]
add x19, x0, 16
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl strdup
str x0, [x19, 8]
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x19, x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl strdup
str x0, [x19, 8]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 64]
ldr x0, [sp, 56]
ldr w1, [sp, 64]
str w1, [x0]
ldr x0, [sp, 56]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
ldr x0, [x0, 8]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldr x0, [x0, 8]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldr x0, [x0, 8]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L63
bl __stack_chk_fail
.L63:
mov w0, w1
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
.LFE20:
.size f20, .-f20
.align 2
.global f21
.type f21, %function
f21:
.LFB21:
.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 w0, [sp, 44]
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 x0, 32
bl malloc
str x0, [sp, 56]
ldr x0, [sp, 56]
mov w1, 1
strb w1, [x0]
ldr x0, [sp, 56]
mov w1, 2
strb w1, [x0, 1]
ldr x0, [sp, 56]
mov w1, 3
strb w1, [x0, 2]
ldr x0, [sp, 56]
mov w1, 4
strb w1, [x0, 3]
ldr x0, [sp, 56]
str xzr, [x0, 8]
ldr x0, [sp, 56]
add x0, x0, 16
mov w1, 5
strb w1, [x0]
ldr x0, [sp, 56]
add x0, x0, 16
mov w1, 6
strb w1, [x0, 1]
ldr x0, [sp, 56]
add x0, x0, 16
mov w1, 7
strb w1, [x0, 2]
ldr x0, [sp, 56]
add x0, x0, 16
mov w1, 8
strb w1, [x0, 3]
ldr x0, [sp, 56]
add x0, x0, 16
str xzr, [x0, 8]
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x19, x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [x19, 8]
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
mov w1, 1
strb w1, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
mov w1, 2
strb w1, [x0, 1]
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
mov w1, 3
strb w1, [x0, 2]
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
mov w1, 4
strb w1, [x0, 3]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 64]
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
mov x1, x0
ldr w0, [sp, 64]
str w0, [x1]
ldr x0, [sp, 56]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
ldr x0, [x0, 8]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 56]
add x0, x0, 16
ldr x0, [x0, 8]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
ldr x1, [sp, 56]
add x0, x1, x0
ldr x0, [x0, 8]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L66
bl __stack_chk_fail
.L66:
mov w0, w1
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
.LFE21:
.size f21, .-f21
.align 2
.global f24
.type f24, %function
f24:
.LFB22:
.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 w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 32]
str xzr, [sp, 40]
add x0, sp, 32
str x0, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
mov x1, x0
ldr x0, [sp, 24]
str x1, [x0, 8]
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 48]
ldr x0, [sp, 24]
ldr w1, [sp, 48]
str w1, [x0]
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 32]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 33]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 34]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 35]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L69
bl __stack_chk_fail
.L69:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE22:
.size f24, .-f24
.align 2
.global f25
.type f25, %function
f25:
.LFB23:
.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, 44]
str w1, [sp, 40]
str x2, [sp, 32]
str x3, [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
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl strdup
mov x1, x0
ldr x0, [sp, 24]
str x1, [x0, 8]
ldr x0, [sp, 24]
mov w1, 1
strb w1, [x0]
ldr x0, [sp, 24]
mov w1, 2
strb w1, [x0, 1]
ldr x0, [sp, 24]
mov w1, 3
strb w1, [x0, 2]
ldr x0, [sp, 24]
mov w1, 4
strb w1, [x0, 3]
ldr x1, [sp, 24]
ldrsw x0, [sp, 40]
mov w2, 5
strb w2, [x1, x0]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
mov x1, x0
ldr x0, [sp, 32]
str x1, [x0, 8]
ldr x0, [sp, 32]
mov w1, 6
strb w1, [x0]
ldr x0, [sp, 32]
mov w1, 7
strb w1, [x0, 1]
ldr x0, [sp, 32]
mov w1, 8
strb w1, [x0, 2]
ldr x0, [sp, 32]
mov w1, 9
strb w1, [x0, 3]
ldr x1, [sp, 32]
ldrsw x0, [sp, 44]
mov w2, 10
strb w2, [x1, x0]
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 48]
ldr x0, [sp, 24]
ldr w1, [sp, 48]
str w1, [x0]
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x1, [sp, 24]
ldrsw x0, [sp, 44]
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x1, [sp, 24]
ldrsw x0, [sp, 40]
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 32]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 32]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 32]
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 32]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x1, [sp, 32]
ldrsw x0, [sp, 44]
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x1, [sp, 32]
ldrsw x0, [sp, 40]
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L72
bl __stack_chk_fail
.L72:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE23:
.size f25, .-f25
.align 2
.global f26
.type f26, %function
f26:
.LFB24:
.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]
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, 513
movk w0, 0x403, lsl 16
str w0, [sp, 32]
str xzr, [sp, 40]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
ldrsw x2, [sp, 28]
add x1, sp, 48
add x0, sp, 32
bl memcpy
ldrb w0, [sp, 32]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 33]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 34]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 35]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L75
bl __stack_chk_fail
.L75:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE24:
.size f26, .-f26
.align 2
.global f261
.type f261, %function
f261:
.LFB25:
.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, 513
movk w0, 0x403, lsl 16
str w0, [sp, 16]
str xzr, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 16]
ldrb w0, [sp, 16]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 17]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 18]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 19]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L78
bl __stack_chk_fail
.L78:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE25:
.size f261, .-f261
.align 2
.global f262
.type f262, %function
f262:
.LFB26:
.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, 513
movk w0, 0x403, lsl 16
str w0, [sp, 16]
str xzr, [sp, 24]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
add x1, sp, 32
add x0, sp, 16
mov x2, -1
bl memcpy
ldrb w0, [sp, 16]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 17]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 18]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 19]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L81
bl __stack_chk_fail
.L81:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE26:
.size f262, .-f262
.align 2
.global f263
.type f263, %function
f263:
.LFB27:
.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
stp xzr, xzr, [sp, 32]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
ldrsw x0, [sp, 28]
ldr x1, [sp, 16]
add x0, x1, x0
ldrb w0, [x0]
and x2, x0, 255
add x1, sp, 48
add x0, sp, 32
bl memcpy
ldrb w0, [sp, 32]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 33]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 34]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 35]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 40]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L84
bl __stack_chk_fail
.L84:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE27:
.size f263, .-f263
.align 2
.global f27
.type f27, %function
f27:
.LFB28:
.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]
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, 513
movk w0, 0x403, lsl 16
str w0, [sp, 32]
str xzr, [sp, 40]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
ldrsw x0, [sp, 28]
add x1, sp, 32
mov w2, 5
strb w2, [x1, x0]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
add x0, sp, 32
mov x1, x0
ldr w0, [sp, 48]
str w0, [x1]
ldrb w0, [sp, 32]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 33]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 34]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 35]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 28]
add x1, sp, 32
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L87
bl __stack_chk_fail
.L87:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE28:
.size f27, .-f27
.align 2
.global f28
.type f28, %function
f28:
.LFB29:
.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 w1, [sp, 24]
str w2, [sp, 20]
str w3, [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
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
mov x2, x0
ldrsw x0, [sp, 28]
lsl x0, x0, 4
add x1, sp, 56
str x2, [x1, x0]
ldrsw x0, [sp, 20]
ldrsw x1, [sp, 24]
lsl x1, x1, 4
add x1, x1, 96
add x1, sp, x1
add x0, x1, x0
mov w1, 1
strb w1, [x0, -48]
add x0, sp, 48
add x0, x0, 16
str x0, [sp, 40]
ldr x1, [sp, 40]
ldrsw x0, [sp, 16]
mov w2, 2
strb w2, [x1, x0]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 80]
ldr x0, [sp, 40]
ldr w1, [sp, 80]
str w1, [x0]
ldrb w0, [sp, 48]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 49]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 50]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 51]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 64]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 65]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 66]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 67]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 28]
lsl x0, x0, 4
add x1, sp, 48
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 28]
lsl x0, x0, 4
add x1, sp, 49
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 28]
lsl x0, x0, 4
add x1, sp, 50
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 28]
lsl x0, x0, 4
add x1, sp, 51
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 20]
ldrsw x1, [sp, 24]
lsl x1, x1, 4
add x1, x1, 96
add x1, sp, x1
add x0, x1, x0
ldrb w0, [x0, -48]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x1, [sp, 40]
ldrsw x0, [sp, 16]
ldrb w0, [x1, x0]
cmp w0, 2
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L90
bl __stack_chk_fail
.L90:
mov w0, w1
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE29:
.size f28, .-f28
.align 2
.global f29
.type f29, %function
f29:
.LFB30:
.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, 44]
str w1, [sp, 40]
str w2, [sp, 36]
str w3, [sp, 32]
str w4, [sp, 28]
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, .LC3
add x0, x0, :lo12:.LC3
bl strdup
mov x2, x0
ldrsw x0, [sp, 44]
lsl x0, x0, 4
add x1, sp, 72
str x2, [x1, x0]
ldrsw x0, [sp, 36]
ldrsw x1, [sp, 40]
lsl x1, x1, 4
add x1, x1, 112
add x1, sp, x1
add x0, x1, x0
mov w1, 1
strb w1, [x0, -48]
add x1, sp, 64
ldrsw x0, [sp, 32]
lsl x0, x0, 4
add x0, x1, x0
str x0, [sp, 56]
ldr x1, [sp, 56]
ldrsw x0, [sp, 28]
mov w2, 2
strb w2, [x1, x0]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 96]
ldr x0, [sp, 56]
ldr w1, [sp, 96]
str w1, [x0]
ldrb w0, [sp, 64]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 65]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 66]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 67]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 80]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 81]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 82]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 83]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
add x1, sp, 64
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
add x1, sp, 65
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
add x1, sp, 66
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 44]
lsl x0, x0, 4
add x1, sp, 67
ldrb w0, [x1, x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 36]
ldrsw x1, [sp, 40]
lsl x1, x1, 4
add x1, x1, 112
add x1, sp, x1
add x0, x1, x0
ldrb w0, [x0, -48]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x1, [sp, 56]
ldrsw x0, [sp, 28]
ldrb w0, [x1, x0]
cmp w0, 2
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L93
bl __stack_chk_fail
.L93:
mov w0, w1
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE30:
.size f29, .-f29
.align 2
.global f30
.type f30, %function
f30:
.LFB31:
.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
strb w0, [sp, 24]
mov w0, 2
strb w0, [sp, 25]
mov w0, 3
strb w0, [sp, 26]
mov w0, 4
strb w0, [sp, 27]
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 24]
ldrb w0, [sp, 24]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 25]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 26]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 27]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 24]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L96
bl __stack_chk_fail
.L96:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE31:
.size f30, .-f30
.align 2
.global f31
.type f31, %function
f31:
.LFB32:
.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
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 1
strb w0, [sp, 16]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr w0, [sp, 32]
str w0, [sp, 16]
ldrb w0, [sp, 16]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 17]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 18]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 19]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 16]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L99
bl __stack_chk_fail
.L99:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE32:
.size f31, .-f31
.align 2
.global f32
.type f32, %function
f32:
.LFB33:
.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
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 24]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr x0, [sp, 24]
ldr w1, [sp, 32]
str w1, [x0]
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 1
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 2
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 3
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L102
bl __stack_chk_fail
.L102:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE33:
.size f32, .-f32
.align 2
.global f33
.type f33, %function
f33:
.LFB34:
.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, .LC2
add x0, x0, :lo12:.LC2
add x2, sp, 24
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr x0, [x3, 16]
str x0, [x2, 16]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
ldr w0, [sp, 24]
sxtw x0, w0
mov x1, x0
ldr w0, [sp, 48]
str w0, [x1]
ldr w0, [sp, 28]
cmp w0, 2
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 32]
cmp w0, 3
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 36]
cmp w0, 4
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 24]
sxtw x0, w0
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 24]
sxtw x0, w0
add x0, x0, 1
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 24]
sxtw x0, w0
add x0, x0, 2
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr w0, [sp, 24]
sxtw x0, w0
add x0, x0, 3
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 40]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L105
bl __stack_chk_fail
.L105:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE34:
.size f33, .-f33
.section .rodata
.align 3
.LC2:
.word 1
.word 2
.word 3
.word 4
.xword 0
.text
.align 2
.global f34
.type f34, %function
f34:
.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]
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 x0, [sp, 24]
mov w1, 3
strb w1, [x0, 16]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr x1, [sp, 24]
ldrsw x0, [sp, 20]
lsl x0, x0, 2
add x0, x1, x0
ldr w1, [sp, 32]
str w1, [x0]
ldr x0, [sp, 24]
ldr w0, [x0]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0, 4]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0, 8]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0, 12]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrsw x1, [sp, 20]
ldr w0, [x0, x1, lsl 2]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 16]
cmp w0, 3
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L108
bl __stack_chk_fail
.L108:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE35:
.size f34, .-f34
.align 2
.global f35
.type f35, %function
f35:
.LFB36:
.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
mov w0, 513
movk w0, 0x403, lsl 16
str w0, [sp, 32]
str xzr, [sp, 40]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl strdup
str x0, [sp, 40]
mov w0, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 48]
add x1, sp, 32
ldrsw x0, [sp, 28]
add x0, x1, x0
ldrsw x2, [sp, 24]
add x1, sp, 48
bl memcpy
ldrb w0, [sp, 32]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 33]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 34]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrb w0, [sp, 35]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldrsw x0, [sp, 28]
add x1, sp, 32
ldrb w0, [x1, x0]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 40]
cmp x0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L111
bl __stack_chk_fail
.L111:
mov w0, w1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE36:
.size f35, .-f35
.align 2
.global f36
.type f36, %function
f36:
.LFB37:
.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]
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, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr x0, [sp, 24]
strb wzr, [x0]
ldr x0, [sp, 24]
mov w1, 1
strb w1, [x0, 1]
ldr x0, [sp, 24]
mov w1, 2
strb w1, [x0, 2]
ldr x0, [sp, 24]
mov w1, 3
strb w1, [x0, 3]
ldr x0, [sp, 24]
mov w1, 10
str w1, [x0, 4]
ldr x0, [sp, 24]
sub x0, x0, #8
str x0, [sp, 24]
ldr x0, [sp, 24]
mov w1, 4
strb w1, [x0]
ldr x0, [sp, 24]
mov w1, 5
strb w1, [x0, 1]
ldr x0, [sp, 24]
mov w1, 6
strb w1, [x0, 2]
ldr x0, [sp, 24]
mov w1, 7
strb w1, [x0, 3]
ldr x0, [sp, 24]
mov w1, 11
str w1, [x0, 4]
ldr x0, [sp, 24]
ldr w1, [sp, 32]
str w1, [x0]
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0, 4]
cmp w0, 11
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 8
str x0, [sp, 24]
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 0
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 2]
cmp w0, 2
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 3]
cmp w0, 3
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0, 4]
cmp w0, 10
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L114
bl __stack_chk_fail
.L114:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE37:
.size f36, .-f36
.align 2
.global f37
.type f37, %function
f37:
.LFB38:
.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]
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, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr x0, [sp, 24]
strb wzr, [x0]
ldr x0, [sp, 24]
mov w1, 1
strb w1, [x0, 1]
ldr x0, [sp, 24]
mov w1, 2
strb w1, [x0, 2]
ldr x0, [sp, 24]
mov w1, 3
strb w1, [x0, 3]
ldr x0, [sp, 24]
mov w1, 10
str w1, [x0, 4]
ldr x0, [sp, 24]
sub x0, x0, #4
str x0, [sp, 24]
ldr x0, [sp, 24]
mov w1, 4
strb w1, [x0]
ldr x0, [sp, 24]
mov w1, 5
strb w1, [x0, 1]
ldr x0, [sp, 24]
mov w1, 6
strb w1, [x0, 2]
ldr x0, [sp, 24]
mov w1, 7
strb w1, [x0, 3]
ldr x0, [sp, 24]
mov w1, 11
str w1, [x0, 4]
ldr x0, [sp, 24]
ldr w1, [sp, 32]
str w1, [x0]
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0, 4]
cmp w0, 11
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 4
str x0, [sp, 24]
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 11
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0, 4]
cmp w0, 10
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L117
bl __stack_chk_fail
.L117:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE38:
.size f37, .-f37
.align 2
.global f38
.type f38, %function
f38:
.LFB39:
.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]
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, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr x0, [sp, 24]
strb wzr, [x0]
ldr x0, [sp, 24]
mov w1, 1
strb w1, [x0, 1]
ldr x0, [sp, 24]
mov w1, 2
strb w1, [x0, 2]
ldr x0, [sp, 24]
mov w1, 3
strb w1, [x0, 3]
ldr x0, [sp, 24]
mov w1, 10
str w1, [x0, 4]
ldr x0, [sp, 24]
sub x0, x0, #2
str x0, [sp, 24]
ldr x0, [sp, 24]
mov w1, 4
strb w1, [x0]
ldr x0, [sp, 24]
mov w1, 5
strb w1, [x0, 1]
ldr x0, [sp, 24]
mov w1, 6
strb w1, [x0, 2]
ldr x0, [sp, 24]
mov w1, 7
strb w1, [x0, 3]
ldr x0, [sp, 24]
mov w1, 11
str w1, [x0, 4]
ldr x0, [sp, 24]
ldr w1, [sp, 32]
str w1, [x0]
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 2]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0, 4]
cmp w0, 11
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 2
str x0, [sp, 24]
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 1]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 2]
cmp w0, 11
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 3]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0, 4]
cmp w0, 10
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L120
bl __stack_chk_fail
.L120:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE39:
.size f38, .-f38
.align 2
.global f39
.type f39, %function
f39:
.LFB40:
.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]
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, 25185
movk w0, 0x6463, lsl 16
str w0, [sp, 32]
ldr x0, [sp, 24]
strb wzr, [x0, 4]
ldr x0, [sp, 24]
mov w1, 1
strb w1, [x0, 5]
ldr x0, [sp, 24]
mov w1, 2
strb w1, [x0, 6]
ldr x0, [sp, 24]
mov w1, 3
strb w1, [x0, 7]
ldr x0, [sp, 24]
mov w1, 10
str w1, [x0]
ldr x0, [sp, 24]
sub x0, x0, #2
str x0, [sp, 24]
ldr x0, [sp, 24]
mov w1, 4
strb w1, [x0, 4]
ldr x0, [sp, 24]
mov w1, 5
strb w1, [x0, 5]
ldr x0, [sp, 24]
mov w1, 6
strb w1, [x0, 6]
ldr x0, [sp, 24]
mov w1, 7
strb w1, [x0, 7]
ldr x0, [sp, 24]
mov w1, 11
str w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 4
ldr w1, [sp, 32]
str w1, [x0]
ldr x0, [sp, 24]
ldrb w0, [x0, 4]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 5]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 6]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 7]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0]
cmp w0, 11
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
add x0, x0, 2
str x0, [sp, 24]
ldr x0, [sp, 24]
ldrb w0, [x0, 4]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 5]
cmp w0, 1
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 6]
cmp w0, 2
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldrb w0, [x0, 7]
cmp w0, 3
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
ldr x0, [sp, 24]
ldr w0, [x0]
cmp w0, 10
cset w0, eq
and w0, w0, 255
bl clang_analyzer_eval
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 .L123
bl __stack_chk_fail
.L123:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE40:
.size f39, .-f39
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type __check_for_sync8_kernelhelper, %function
__check_for_sync8_kernelhelper:
.LFB0:
.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
mov w0, 4294905852
ldr w0, [x0]
cmp w0, 4
bhi .L4
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]
ldr q0, [x1, 60]
str q0, [x0, 60]
add x0, sp, 24
mov w2, 76
mov x1, x0
mov w0, 2
bl __write
bl abort
.L4:
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 .L3
bl __stack_chk_fail
.L3:
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size __check_for_sync8_kernelhelper, .-__check_for_sync8_kernelhelper
.section .rodata
.align 3
.LC0:
.string "A newer kernel is required to run this binary. (__kernel_cmpxchg64 helper)\n"
.text
.section .init_array,"aw"
.align 3
.type __sync8_kernelhelper_inithook, %object
.size __sync8_kernelhelper_inithook, 8
__sync8_kernelhelper_inithook:
.xword __check_for_sync8_kernelhelper
.text
.align 2
.global __sync_fetch_and_add_8
.hidden __sync_fetch_and_add_8
.type __sync_fetch_and_add_8, %function
__sync_fetch_and_add_8:
.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 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, 56]
mov x1, 0
.L6:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
add x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L6
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 .L8
bl __stack_chk_fail
.L8:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size __sync_fetch_and_add_8, .-__sync_fetch_and_add_8
.align 2
.global __sync_fetch_and_sub_8
.hidden __sync_fetch_and_sub_8
.type __sync_fetch_and_sub_8, %function
__sync_fetch_and_sub_8:
.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]
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
.L10:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
sub x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L10
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 .L12
bl __stack_chk_fail
.L12:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size __sync_fetch_and_sub_8, .-__sync_fetch_and_sub_8
.align 2
.global __sync_fetch_and_or_8
.hidden __sync_fetch_and_or_8
.type __sync_fetch_and_or_8, %function
__sync_fetch_and_or_8:
.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 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, 56]
mov x1, 0
.L14:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
orr x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L14
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 .L16
bl __stack_chk_fail
.L16:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size __sync_fetch_and_or_8, .-__sync_fetch_and_or_8
.align 2
.global __sync_fetch_and_and_8
.hidden __sync_fetch_and_and_8
.type __sync_fetch_and_and_8, %function
__sync_fetch_and_and_8:
.LFB4:
.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]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
.L18:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
and x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L18
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 .L20
bl __stack_chk_fail
.L20:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size __sync_fetch_and_and_8, .-__sync_fetch_and_and_8
.align 2
.global __sync_fetch_and_xor_8
.hidden __sync_fetch_and_xor_8
.type __sync_fetch_and_xor_8, %function
__sync_fetch_and_xor_8:
.LFB5:
.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]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
.L22:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
eor x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L22
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 .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
.LFE5:
.size __sync_fetch_and_xor_8, .-__sync_fetch_and_xor_8
.align 2
.global __sync_fetch_and_nand_8
.hidden __sync_fetch_and_nand_8
.type __sync_fetch_and_nand_8, %function
__sync_fetch_and_nand_8:
.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 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, 56]
mov x1, 0
.L26:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
and x0, x1, x0
mvn x0, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L26
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 .L28
bl __stack_chk_fail
.L28:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size __sync_fetch_and_nand_8, .-__sync_fetch_and_nand_8
.align 2
.global __sync_add_and_fetch_8
.hidden __sync_add_and_fetch_8
.type __sync_add_and_fetch_8, %function
__sync_add_and_fetch_8:
.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 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, 56]
mov x1, 0
.L30:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
add x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L30
ldr x0, [sp, 48]
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 .L32
bl __stack_chk_fail
.L32:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size __sync_add_and_fetch_8, .-__sync_add_and_fetch_8
.align 2
.global __sync_sub_and_fetch_8
.hidden __sync_sub_and_fetch_8
.type __sync_sub_and_fetch_8, %function
__sync_sub_and_fetch_8:
.LFB8:
.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]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
.L34:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
sub x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L34
ldr x0, [sp, 48]
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 .L36
bl __stack_chk_fail
.L36:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size __sync_sub_and_fetch_8, .-__sync_sub_and_fetch_8
.align 2
.global __sync_or_and_fetch_8
.hidden __sync_or_and_fetch_8
.type __sync_or_and_fetch_8, %function
__sync_or_and_fetch_8:
.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 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, 56]
mov x1, 0
.L38:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
orr x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L38
ldr x0, [sp, 48]
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 .L40
bl __stack_chk_fail
.L40:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size __sync_or_and_fetch_8, .-__sync_or_and_fetch_8
.align 2
.global __sync_and_and_fetch_8
.hidden __sync_and_and_fetch_8
.type __sync_and_and_fetch_8, %function
__sync_and_and_fetch_8:
.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]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
.L42:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
and x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L42
ldr x0, [sp, 48]
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 .L44
bl __stack_chk_fail
.L44:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size __sync_and_and_fetch_8, .-__sync_and_and_fetch_8
.align 2
.global __sync_xor_and_fetch_8
.hidden __sync_xor_and_fetch_8
.type __sync_xor_and_fetch_8, %function
__sync_xor_and_fetch_8:
.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, 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, 56]
mov x1, 0
.L46:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
eor x0, x1, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L46
ldr x0, [sp, 48]
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 .L48
bl __stack_chk_fail
.L48:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size __sync_xor_and_fetch_8, .-__sync_xor_and_fetch_8
.align 2
.global __sync_nand_and_fetch_8
.hidden __sync_nand_and_fetch_8
.type __sync_nand_and_fetch_8, %function
__sync_nand_and_fetch_8:
.LFB12:
.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]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 56]
mov x1, 0
.L50:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 40]
ldr x1, [sp, 40]
ldr x0, [sp, 16]
and x0, x1, x0
mvn x0, x0
str x0, [sp, 48]
add x1, sp, 48
add x0, sp, 40
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bne .L50
ldr x0, [sp, 48]
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 .L52
bl __stack_chk_fail
.L52:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size __sync_nand_and_fetch_8, .-__sync_nand_and_fetch_8
.align 2
.global __sync_val_compare_and_swap_8
.hidden __sync_val_compare_and_swap_8
.type __sync_val_compare_and_swap_8, %function
__sync_val_compare_and_swap_8:
.LFB13:
.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
.L57:
ldr x0, [sp, 40]
ldr x0, [x0]
str x0, [sp, 64]
ldr x0, [sp, 64]
ldr x1, [sp, 32]
cmp x1, x0
cset w0, ne
and w0, w0, 255
and x0, x0, 255
cmp x0, 0
beq .L54
ldr x0, [sp, 64]
b .L58
.L54:
add x1, sp, 24
add x0, sp, 64
mov w3, 4294905696
ldr x2, [sp, 40]
blr x3
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
cset w0, eq
and w0, w0, 255
and x0, x0, 255
cmp x0, 0
beq .L57
ldr x0, [sp, 32]
.L58:
mov x1, x0
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 .L59
bl __stack_chk_fail
.L59:
mov x0, x1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size __sync_val_compare_and_swap_8, .-__sync_val_compare_and_swap_8
.align 2
.global __sync_bool_compare_and_swap_8
.hidden __sync_bool_compare_and_swap_8
.type __sync_bool_compare_and_swap_8, %function
__sync_bool_compare_and_swap_8:
.LFB14:
.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 x2, [sp, 24]
add x1, sp, 24
add x0, sp, 32
mov w3, 4294905696
ldr x2, [sp, 40]
blr x3
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
cset w0, eq
and w0, w0, 255
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE14:
.size __sync_bool_compare_and_swap_8, .-__sync_bool_compare_and_swap_8
.align 2
.global __sync_lock_test_and_set_8
.hidden __sync_lock_test_and_set_8
.type __sync_lock_test_and_set_8, %function
__sync_lock_test_and_set_8:
.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 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, 56]
mov x1, 0
.L63:
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 48]
add x1, sp, 16
add x0, sp, 48
mov w3, 4294905696
ldr x2, [sp, 24]
blr x3
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
bne .L63
ldr x0, [sp, 48]
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 .L65
bl __stack_chk_fail
.L65:
mov x0, x1
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE15:
.size __sync_lock_test_and_set_8, .-__sync_lock_test_and_set_8
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.type crc8, %function
crc8:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
strb w1, [sp, 7]
ldrb w0, [sp, 7]
and w0, w0, 65535
ubfiz w0, w0, 8, 8
strh w0, [sp, 30]
strb wzr, [sp, 28]
b .L2
.L6:
ldr x0, [sp, 8]
add x1, x0, 1
str x1, [sp, 8]
ldrb w0, [x0]
and w1, w0, 65535
ldrh w0, [sp, 30]
orr w0, w1, w0
strh w0, [sp, 30]
strb wzr, [sp, 29]
b .L3
.L5:
ldrsh w0, [sp, 30]
cmp w0, 0
bge .L4
ldrh w1, [sp, 30]
mov w0, 31872
add w0, w1, w0
strh w0, [sp, 30]
.L4:
ldrh w0, [sp, 30]
ubfiz w0, w0, 1, 15
strh w0, [sp, 30]
ldrb w0, [sp, 29]
add w0, w0, 1
strb w0, [sp, 29]
.L3:
ldrb w0, [sp, 29]
cmp w0, 7
bls .L5
ldrb w0, [sp, 28]
add w0, w0, 1
strb w0, [sp, 28]
.L2:
ldrb w1, [sp, 28]
ldrb w0, [sp, 7]
cmp w1, w0
bcc .L6
ldrh w0, [sp, 30]
lsr w0, w0, 8
and w0, w0, 65535
and w0, w0, 255
mvn w0, w0
and w0, w0, 255
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size crc8, .-crc8
.section .rodata
.align 3
.LC0:
.string "%02x "
.align 3
.LC1:
.string "(%02x) - %02x\n"
.text
.align 2
.global test
.type test, %function
test:
.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 x19, [sp, 16]
.cfi_offset 19, -48
str x0, [sp, 40]
strb w1, [sp, 39]
strb wzr, [sp, 63]
b .L9
.L10:
ldrb w0, [sp, 63]
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldrb w0, [sp, 63]
add w0, w0, 1
strb w0, [sp, 63]
.L9:
ldrb w1, [sp, 63]
ldrb w0, [sp, 39]
sub w0, w0, #1
cmp w1, w0
blt .L10
ldrb w0, [sp, 39]
sub x0, x0, #1
ldr x1, [sp, 40]
add x0, x1, x0
ldrb w0, [x0]
mov w19, w0
ldrb w1, [sp, 39]
ldr x0, [sp, 40]
bl crc8
and w0, w0, 255
mov w2, w0
mov w1, w19
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
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
.LFE1:
.size test, .-test
.section .rodata
.align 3
.LC2:
.string "\001"
.align 3
.LC3:
.string "\002"
.align 3
.LC4:
.string "\004"
.align 3
.LC5:
.string "\b"
.align 3
.LC6:
.string "\020"
.align 3
.LC7:
.string " "
.align 3
.LC8:
.string "@"
.align 3
.LC9:
.string "\200"
.align 3
.LC10:
.string ""
.string "\001"
.align 3
.LC11:
.string ""
.string "\002"
.align 3
.LC12:
.string ""
.string "\004"
.align 3
.LC13:
.string ""
.string "\b"
.align 3
.LC14:
.string ""
.string "\020"
.align 3
.LC15:
.string ""
.string " "
.align 3
.LC16:
.string ""
.string "@"
.align 3
.LC17:
.string ""
.string "\200"
.align 3
.LC18:
.string "\001"
.string ""
.align 3
.LC19:
.string "\002"
.string ""
.align 3
.LC20:
.string "\004"
.string ""
.align 3
.LC21:
.string "\b"
.string ""
.align 3
.LC22:
.string "\020"
.string ""
.align 3
.LC23:
.string " "
.string ""
.align 3
.LC24:
.string "@"
.string ""
.align 3
.LC25:
.string "\200"
.string ""
.align 3
.LC26:
.string "\020 "
.string ""
.align 3
.LC27:
.string "\020 \017"
.text
.align 2
.global main
.type main, %function
main:
.LFB2:
.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, 2
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl test
mov w1, 2
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl test
mov w1, 2
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl test
mov w1, 2
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl test
mov w1, 2
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl test
mov w1, 2
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl test
mov w1, 2
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl test
mov w1, 2
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl test
mov w1, 3
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl test
mov w1, 3
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl test
mov w1, 3
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl test
mov w1, 3
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl test
mov w1, 3
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl test
mov w1, 3
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl test
mov w1, 3
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl test
mov w1, 3
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl test
mov w1, 3
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl test
mov w1, 3
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl test
mov w1, 3
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl test
mov w1, 3
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl test
mov w1, 3
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl test
mov w1, 3
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl test
mov w1, 3
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl test
mov w1, 3
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl test
mov w1, 3
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl test
mov w1, 3
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl test
mov w0, 0
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global parent_done
.bss
.align 2
.type parent_done, %object
.size parent_done, 4
parent_done:
.zero 4
.global child_done
.align 2
.type child_done, %object
.size child_done, 4
child_done:
.zero 4
.section .rodata
.align 3
.LC0:
.string "pipe error. \n"
.align 3
.LC1:
.string "fork error. \n"
.align 3
.LC2:
.string "End the input by pressing Enter and Control D "
.align 3
.LC3:
.string " %d"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.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, 32
bl pipe
cmn w0, #1
bne .L2
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 13
mov x1, 1
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl fwrite
mov w0, 1
bl exit
.L2:
bl fork
str w0, [sp, 24]
ldr w0, [sp, 24]
cmp w0, 0
bge .L3
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x0, [x0]
mov x3, x0
mov x2, 13
mov x1, 1
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl fwrite
mov w0, 2
bl exit
.L3:
ldr w0, [sp, 24]
cmp w0, 0
ble .L4
ldr w0, [sp, 32]
bl close
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
ldr w0, [sp, 36]
mov w1, 1
bl dup2
b .L5
.L7:
bl __ctype_b_loc
ldr x1, [x0]
ldrb w0, [sp, 19]
and x0, x0, 255
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0]
and w0, w0, 512
cmp w0, 0
beq .L6
ldrb w0, [sp, 19]
bl toupper
and w0, w0, 255
strb w0, [sp, 19]
.L6:
add x0, sp, 19
mov x2, 1
mov x1, x0
mov w0, 1
bl write
.L5:
add x0, sp, 19
mov x2, 1
mov x1, x0
mov w0, 0
bl read
cmp x0, 0
bgt .L7
ldr w0, [sp, 36]
bl close
adrp x0, parent_done
add x0, x0, :lo12:parent_done
ldr w0, [x0]
cmp w0, 0
bne .L8
mov w1, 10
ldr w0, [sp, 24]
bl kill
.L8:
adrp x0, tell_parent
add x1, x0, :lo12:tell_parent
mov w0, 12
bl signal
adrp x0, child_done
add x0, x0, :lo12:child_done
ldr w0, [x0]
cmp w0, 1
bne .L9
mov w1, 15
ldr w0, [sp, 24]
bl kill
.L9:
mov w0, 0
bl exit
.L4:
ldr w0, [sp, 36]
bl close
ldr w0, [sp, 32]
mov w1, 0
bl dup2
adrp x0, tell_child
add x1, x0, :lo12:tell_child
mov w0, 10
bl signal
bl getppid
str w0, [sp, 28]
.L15:
adrp x0, parent_done
add x0, x0, :lo12:parent_done
ldr w0, [x0]
cmp w0, 1
bne .L15
str wzr, [sp, 20]
b .L11
.L13:
ldrb w0, [sp, 19]
cmp w0, 10
beq .L12
add x0, sp, 19
mov x2, 1
mov x1, x0
mov w0, 1
bl write
b .L11
.L12:
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
ldr w1, [sp, 20]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x0, [x0]
bl fflush
add x0, sp, 19
mov x2, 1
mov x1, x0
mov w0, 1
bl write
.L11:
add x0, sp, 19
mov x2, 1
mov x1, x0
mov w0, 0
bl read
cmp x0, 0
bgt .L13
adrp x0, child_done
add x0, x0, :lo12:child_done
ldr w0, [x0]
cmp w0, 0
bne .L16
mov w1, 12
ldr w0, [sp, 28]
bl kill
.L16:
ldr w0, [sp, 32]
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, 40]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L18
bl __stack_chk_fail
.L18:
mov w0, w1
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.align 2
.type tell_child, %function
tell_child:
.LFB7:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
adrp x0, parent_done
add x0, x0, :lo12:parent_done
mov w1, 1
str w1, [x0]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size tell_child, .-tell_child
.align 2
.type tell_parent, %function
tell_parent:
.LFB8:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
adrp x0, child_done
add x0, x0, :lo12:child_done
mov w1, 1
str w1, [x0]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size tell_parent, .-tell_parent
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global version_tests
.data
.align 3
.type version_tests, %object
.size version_tests, 360
version_tests:
.xword 9469999
.xword 9469999
.word 1
.zero 4
.xword 9469999
.xword 9470031
.word 1
.zero 4
.xword 9469999
.xword 9469983
.word 1
.zero 4
.xword 9469999
.xword 9465903
.word 0
.zero 4
.xword 9469999
.xword 9474095
.word 0
.zero 4
.xword 9469999
.xword 8421423
.word 0
.zero 4
.xword 9469999
.xword 268439567
.word 0
.zero 4
.xword 268439583
.xword 268439583
.word 1
.zero 4
.xword 268439583
.xword 268439599
.word 1
.zero 4
.xword 268439583
.xword 268439567
.word 1
.zero 4
.xword 268439583
.xword 268443679
.word 1
.zero 4
.xword 268439583
.xword 268435487
.word 0
.zero 4
.xword 268439583
.xword 269488159
.word 0
.zero 4
.xword 268439583
.xword 4127
.word 0
.zero 4
.xword 268439583
.xword 536875039
.word 0
.zero 4
.section .rodata
.align 3
.LC0:
.string "opensslver: header %lx library %lx != %d \n"
.text
.align 2
.global fail
.type fail, %function
fail:
.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, 40]
str x1, [sp, 32]
str w2, [sp, 28]
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x5, [x0]
ldr w4, [sp, 28]
ldr x3, [sp, 32]
ldr x2, [sp, 40]
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov x0, x5
bl fprintf
mov w0, 1
bl exit
.cfi_endproc
.LFE6:
.size fail, .-fail
.align 2
.global main
.type main, %function
main:
.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 wzr, [sp, 24]
b .L3
.L5:
adrp x0, version_tests
add x2, x0, :lo12:version_tests
ldr w1, [sp, 24]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr x0, [x0]
str x0, [sp, 32]
adrp x0, version_tests
add x2, x0, :lo12:version_tests
ldr w1, [sp, 24]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr x0, [x0, 8]
str x0, [sp, 40]
adrp x0, version_tests
add x2, x0, :lo12:version_tests
ldr w1, [sp, 24]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 3
add x0, x2, x0
ldr w0, [x0, 16]
str w0, [sp, 28]
ldr x1, [sp, 40]
ldr x0, [sp, 32]
bl ssh_compatible_openssl
mov w1, w0
ldr w0, [sp, 28]
cmp w0, w1
beq .L4
ldr w2, [sp, 28]
ldr x1, [sp, 40]
ldr x0, [sp, 32]
bl fail
.L4:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L3:
ldr w0, [sp, 24]
cmp w0, 14
bls .L5
mov w0, 0
bl exit
.cfi_endproc
.LFE7:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "argv[%d]: %s "
.align 3
.LC1:
.string "breaking ties with average rank"
.align 3
.LC2:
.string "random vector: max: %d n: %d\n"
.align 3
.LC3:
.string "%d "
.align 3
.LC4:
.string "reorder ranks into original order of vector:"
.align 3
.LC5:
.string "%.1f "
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.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]
str x1, [sp, 16]
mov x0, 0
bl time
bl srand
str wzr, [sp, 32]
b .L2
.L3:
ldrsw x0, [sp, 32]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
ldr x0, [x0]
mov x2, x0
ldr w1, [sp, 32]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L2:
ldr w1, [sp, 32]
ldr w0, [sp, 28]
cmp w1, w0
blt .L3
mov w0, 10
bl putchar
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl atoi
str w0, [sp, 72]
ldr x0, [sp, 16]
add x0, x0, 16
ldr x0, [x0]
bl atoi
str w0, [sp, 76]
ldr w2, [sp, 76]
ldr w1, [sp, 72]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w2, [sp, 76]
ldr w1, [sp, 72]
mov w0, 10
bl vrandi
str x0, [sp, 80]
str wzr, [sp, 36]
b .L4
.L5:
ldrsw x0, [sp, 36]
lsl x0, x0, 2
ldr x1, [sp, 80]
add x0, x1, x0
ldr w0, [x0]
mov w1, w0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L4:
ldr w1, [sp, 36]
ldr w0, [sp, 76]
cmp w1, w0
blt .L5
mov w0, 10
bl putchar
ldrsw x0, [sp, 76]
lsl x0, x0, 2
bl malloc
str x0, [sp, 88]
str wzr, [sp, 40]
b .L6
.L7:
ldrsw x0, [sp, 40]
lsl x0, x0, 2
ldr x1, [sp, 88]
add x0, x1, x0
ldr w1, [sp, 40]
str w1, [x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L6:
ldr w1, [sp, 40]
ldr w0, [sp, 76]
cmp w1, w0
blt .L7
ldr w2, [sp, 76]
ldr x1, [sp, 88]
ldr x0, [sp, 80]
bl iquicksort_I
ldrsw x0, [sp, 76]
lsl x0, x0, 3
bl malloc
str x0, [sp, 96]
ldrsw x0, [sp, 76]
lsl x0, x0, 3
bl malloc
str x0, [sp, 104]
ldr x0, [sp, 80]
ldr w0, [x0]
str w0, [sp, 44]
str wzr, [sp, 48]
mov w0, 1
str w0, [sp, 52]
b .L8
.L14:
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 80]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 44]
cmp w1, w0
beq .L9
ldr w0, [sp, 52]
sub w0, w0, #1
ldr w1, [sp, 48]
cmp w1, w0
bge .L10
ldr w0, [sp, 52]
sub w1, w0, #1
ldr w0, [sp, 48]
add w0, w1, w0
add w0, w0, 2
scvtf d1, w0
fmov d0, 2.0e+0
fdiv d0, d1, d0
str d0, [sp, 120]
ldr w0, [sp, 48]
str w0, [sp, 56]
b .L11
.L12:
ldrsw x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 104]
add x0, x1, x0
ldr d0, [sp, 120]
str d0, [x0]
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L11:
ldr w1, [sp, 52]
ldr w0, [sp, 56]
cmp w1, w0
bgt .L12
b .L13
.L10:
ldr w0, [sp, 48]
add w1, w0, 1
ldrsw x0, [sp, 48]
lsl x0, x0, 3
ldr x2, [sp, 104]
add x0, x2, x0
scvtf d0, w1
str d0, [x0]
.L13:
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 80]
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 44]
ldr w0, [sp, 52]
str w0, [sp, 48]
.L9:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L8:
ldr w1, [sp, 52]
ldr w0, [sp, 76]
cmp w1, w0
blt .L14
ldr w0, [sp, 52]
sub w0, w0, #1
ldr w1, [sp, 48]
cmp w1, w0
bne .L15
ldrsw x0, [sp, 48]
lsl x0, x0, 3
ldr x1, [sp, 104]
add x0, x1, x0
ldr w1, [sp, 52]
scvtf d0, w1
str d0, [x0]
b .L16
.L15:
ldr w0, [sp, 52]
sub w1, w0, #1
ldr w0, [sp, 48]
add w0, w1, w0
add w0, w0, 2
scvtf d1, w0
fmov d0, 2.0e+0
fdiv d0, d1, d0
str d0, [sp, 112]
ldr w0, [sp, 48]
str w0, [sp, 60]
b .L17
.L18:
ldrsw x0, [sp, 60]
lsl x0, x0, 3
ldr x1, [sp, 104]
add x0, x1, x0
ldr d0, [sp, 112]
str d0, [x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L17:
ldr w1, [sp, 52]
ldr w0, [sp, 60]
cmp w1, w0
bgt .L18
.L16:
str wzr, [sp, 64]
b .L19
.L20:
ldrsw x0, [sp, 64]
lsl x0, x0, 3
ldr x1, [sp, 104]
add x1, x1, x0
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x2, [sp, 88]
add x0, x2, x0
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 3
ldr x2, [sp, 96]
add x0, x2, x0
ldr d0, [x1]
str d0, [x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L19:
ldr w1, [sp, 64]
ldr w0, [sp, 76]
cmp w1, w0
blt .L20
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
str wzr, [sp, 68]
b .L21
.L22:
ldrsw x0, [sp, 68]
lsl x0, x0, 3
ldr x1, [sp, 96]
add x0, x1, x0
ldr d0, [x0]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L21:
ldr w1, [sp, 68]
ldr w0, [sp, 76]
cmp w1, w0
blt .L22
mov w0, 10
bl putchar
mov w0, 0
ldp x29, x30, [sp], 128
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.align 2
.global vrandi
.type vrandi, %function
vrandi:
.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 d8, [sp, 16]
.cfi_offset 72, -48
str w0, [sp, 44]
str w1, [sp, 40]
str w2, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 0
bgt .L25
mov x0, 0
b .L26
.L25:
ldrsw x0, [sp, 36]
lsl x0, x0, 2
bl malloc
str x0, [sp, 56]
bl rand
str wzr, [sp, 52]
b .L27
.L28:
ldr w1, [sp, 40]
ldr w0, [sp, 44]
sub w0, w1, w0
add w0, w0, 1
scvtf d8, w0
bl rand
scvtf d0, w0
mov x0, 4746794007248502784
fmov d1, x0
fdiv d0, d0, d1
fmul d1, d8, d0
ldr w0, [sp, 44]
scvtf d0, w0
fadd d0, d1, d0
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 56]
add x0, x1, x0
fcvtzs w1, d0
str w1, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L27:
ldr w1, [sp, 52]
ldr w0, [sp, 36]
cmp w1, w0
blt .L28
ldr x0, [sp, 56]
.L26:
ldr d8, [sp, 16]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_restore 72
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size vrandi, .-vrandi
.align 2
.global rquicksort_I
.type rquicksort_I, %function
rquicksort_I:
.LFB8:
.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]
ldr w0, [sp, 28]
cmp w0, 1
ble .L40
ldr w0, [sp, 28]
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldr d0, [x0]
str d0, [sp, 64]
str wzr, [sp, 52]
ldr w0, [sp, 28]
sub w0, w0, #1
str w0, [sp, 56]
b .L32
.L33:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L32:
ldrsw x0, [sp, 52]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldr d0, [x0]
ldr d1, [sp, 64]
fcmpe d1, d0
bgt .L33
b .L34
.L35:
ldr w0, [sp, 56]
sub w0, w0, #1
str w0, [sp, 56]
.L34:
ldrsw x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldr d0, [x0]
ldr d1, [sp, 64]
fcmpe d1, d0
bmi .L35
ldr w1, [sp, 52]
ldr w0, [sp, 56]
cmp w1, w0
bge .L41
ldrsw x0, [sp, 52]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldr d0, [x0]
str d0, [sp, 72]
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 60]
ldrsw x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x1, x1, x0
ldrsw x0, [sp, 52]
lsl x0, x0, 3
ldr x2, [sp, 40]
add x0, x2, x0
ldr d0, [x1]
str d0, [x0]
ldrsw x0, [sp, 56]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x1, x1, x0
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x2, [sp, 32]
add x0, x2, x0
ldr w1, [x1]
str w1, [x0]
ldrsw x0, [sp, 56]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldr d0, [sp, 72]
str d0, [x0]
ldrsw x0, [sp, 56]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
ldr w1, [sp, 60]
str w1, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
ldr w0, [sp, 56]
sub w0, w0, #1
str w0, [sp, 56]
b .L32
.L41:
nop
ldr w2, [sp, 52]
ldr x1, [sp, 32]
ldr x0, [sp, 40]
bl rquicksort_I
ldrsw x0, [sp, 52]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x3, x1, x0
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x4, x1, x0
ldr w1, [sp, 28]
ldr w0, [sp, 52]
sub w0, w1, w0
mov w2, w0
mov x1, x4
mov x0, x3
bl rquicksort_I
b .L29
.L40:
nop
.L29:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size rquicksort_I, .-rquicksort_I
.align 2
.global iquicksort_I
.type iquicksort_I, %function
iquicksort_I:
.LFB9:
.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]
ldr w0, [sp, 28]
cmp w0, 1
ble .L53
ldr w0, [sp, 28]
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 68]
str wzr, [sp, 60]
ldr w0, [sp, 28]
sub w0, w0, #1
str w0, [sp, 64]
b .L45
.L46:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L45:
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 68]
cmp w1, w0
bgt .L46
b .L47
.L48:
ldr w0, [sp, 64]
sub w0, w0, #1
str w0, [sp, 64]
.L47:
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 68]
cmp w1, w0
blt .L48
ldr w1, [sp, 60]
ldr w0, [sp, 64]
cmp w1, w0
bge .L54
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 72]
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 76]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x1, x1, x0
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x2, [sp, 40]
add x0, x2, x0
ldr w1, [x1]
str w1, [x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x1, x1, x0
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x2, [sp, 32]
add x0, x2, x0
ldr w1, [x1]
str w1, [x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x0, x1, x0
ldr w1, [sp, 72]
str w1, [x0]
ldrsw x0, [sp, 64]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x0, x1, x0
ldr w1, [sp, 76]
str w1, [x0]
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
ldr w0, [sp, 64]
sub w0, w0, #1
str w0, [sp, 64]
b .L45
.L54:
nop
ldr w2, [sp, 60]
ldr x1, [sp, 32]
ldr x0, [sp, 40]
bl iquicksort_I
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 40]
add x3, x1, x0
ldrsw x0, [sp, 60]
lsl x0, x0, 2
ldr x1, [sp, 32]
add x4, x1, x0
ldr w1, [sp, 28]
ldr w0, [sp, 60]
sub w0, w1, w0
mov w2, w0
mov x1, x4
mov x0, x3
bl iquicksort_I
b .L42
.L53:
nop
.L42:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size iquicksort_I, .-iquicksort_I
.align 2
.global iquicksort
.type iquicksort, %function
iquicksort:
.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 w1, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 1
ble .L66
ldr w0, [sp, 20]
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
sxtw x0, w0
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 40]
str wzr, [sp, 32]
ldr w0, [sp, 20]
sub w0, w0, #1
str w0, [sp, 36]
b .L58
.L59:
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L58:
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 40]
cmp w1, w0
bgt .L59
b .L60
.L61:
ldr w0, [sp, 36]
sub w0, w0, #1
str w0, [sp, 36]
.L60:
ldrsw x0, [sp, 36]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 40]
cmp w1, w0
blt .L61
ldr w1, [sp, 32]
ldr w0, [sp, 36]
cmp w1, w0
bge .L67
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
str w0, [sp, 44]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x1, x1, x0
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x2, [sp, 24]
add x0, x2, x0
ldr w1, [x1]
str w1, [x0]
ldrsw x0, [sp, 36]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [sp, 44]
str w1, [x0]
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
ldr w0, [sp, 36]
sub w0, w0, #1
str w0, [sp, 36]
b .L58
.L67:
nop
ldr w1, [sp, 32]
ldr x0, [sp, 24]
bl iquicksort
ldrsw x0, [sp, 32]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x2, x1, x0
ldr w1, [sp, 20]
ldr w0, [sp, 32]
sub w0, w1, w0
mov w1, w0
mov x0, x2
bl iquicksort
b .L55
.L66:
nop
.L55:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size iquicksort, .-iquicksort
.align 2
.global rquicksort
.type rquicksort, %function
rquicksort:
.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, 24]
str w1, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 1
ble .L79
ldr w0, [sp, 20]
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr d0, [x0]
str d0, [sp, 48]
str wzr, [sp, 40]
ldr w0, [sp, 20]
sub w0, w0, #1
str w0, [sp, 44]
b .L71
.L72:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L71:
ldrsw x0, [sp, 40]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr d0, [x0]
ldr d1, [sp, 48]
fcmpe d1, d0
bgt .L72
b .L73
.L74:
ldr w0, [sp, 44]
sub w0, w0, #1
str w0, [sp, 44]
.L73:
ldrsw x0, [sp, 44]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr d0, [x0]
ldr d1, [sp, 48]
fcmpe d1, d0
bmi .L74
ldr w1, [sp, 40]
ldr w0, [sp, 44]
cmp w1, w0
bge .L80
ldrsw x0, [sp, 40]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr d0, [x0]
str d0, [sp, 56]
ldrsw x0, [sp, 44]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x1, x1, x0
ldrsw x0, [sp, 40]
lsl x0, x0, 3
ldr x2, [sp, 24]
add x0, x2, x0
ldr d0, [x1]
str d0, [x0]
ldrsw x0, [sp, 44]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x0, x1, x0
ldr d0, [sp, 56]
str d0, [x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
ldr w0, [sp, 44]
sub w0, w0, #1
str w0, [sp, 44]
b .L71
.L80:
nop
ldr w1, [sp, 40]
ldr x0, [sp, 24]
bl rquicksort
ldrsw x0, [sp, 40]
lsl x0, x0, 3
ldr x1, [sp, 24]
add x2, x1, x0
ldr w1, [sp, 20]
ldr w0, [sp, 40]
sub w0, w1, w0
mov w1, w0
mov x0, x2
bl rquicksort
b .L68
.L79:
nop
.L68:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size rquicksort, .-rquicksort
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "event %c%c on fd #%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -304]!
.cfi_def_cfa_offset 304
.cfi_offset 29, -304
.cfi_offset 30, -296
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 296]
mov x1, 0
bl __libc_current_sigrtmin
add w0, w0, 1
str w0, [sp, 16]
add x0, sp, 40
bl sigemptyset
add x0, sp, 40
ldr w1, [sp, 16]
bl sigaddset
add x0, sp, 40
mov w1, 29
bl sigaddset
add x0, sp, 40
mov x2, 0
mov x1, x0
mov w0, 0
bl sigprocmask
bl getpid
mov w2, w0
mov w1, 8
mov w0, 0
bl fcntl
ldr w2, [sp, 16]
mov w1, 10
mov w0, 0
bl fcntl
mov w1, 3
mov w0, 0
bl fcntl
mov w1, w0
mov w0, 10240
orr w0, w1, w0
mov w2, w0
mov w1, 4
mov w0, 0
bl fcntl
mov x0, 1
str x0, [sp, 24]
str xzr, [sp, 32]
add x2, sp, 24
add x1, sp, 168
add x0, sp, 40
bl sigtimedwait
str w0, [sp, 20]
ldr w0, [sp, 20]
cmp w0, 29
bne .L2
mov x1, 0
ldr w0, [sp, 16]
bl signal
b .L3
.L2:
ldr w1, [sp, 20]
ldr w0, [sp, 16]
cmp w1, w0
bne .L3
ldr x0, [sp, 184]
and x0, x0, 1
cmp x0, 0
beq .L4
mov w0, 114
b .L5
.L4:
mov w0, 45
.L5:
ldr x1, [sp, 184]
and x1, x1, 4
cmp x1, 0
beq .L6
mov w1, 119
b .L7
.L6:
mov w1, 45
.L7:
ldr w2, [sp, 192]
mov w3, w2
mov w2, w1
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
.L3:
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 296]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L9
bl __stack_chk_fail
.L9:
mov w0, w1
ldp x29, x30, [sp], 304
.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
.align 2
.global short_vms2mips
.type short_vms2mips, %function
short_vms2mips:
.LFB0:
.cfi_startproc
stp x19, x20, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 19, -48
.cfi_offset 20, -40
str x21, [sp, 16]
.cfi_offset 21, -32
str x0, [sp, 40]
str w1, [sp, 36]
mov w20, 0
ldr x19, [sp, 40]
b .L2
.L3:
ldrh w0, [x19]
mov w21, w0
lsl w0, w21, 8
sxth w1, w0
asr w0, w21, 8
sxth w0, w0
orr w0, w1, w0
sxth w0, w0
and w0, w0, 65535
strh w0, [x19]
add w20, w20, 1
add x19, x19, 2
.L2:
ldr w0, [sp, 36]
cmp w20, w0
blt .L3
nop
ldr x21, [sp, 16]
ldp x19, x20, [sp], 48
.cfi_restore 20
.cfi_restore 19
.cfi_restore 21
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size short_vms2mips, .-short_vms2mips
.align 2
.global short_mips2vms
.type short_mips2vms, %function
short_mips2vms:
.LFB1:
.cfi_startproc
stp x19, x20, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 19, -48
.cfi_offset 20, -40
str x21, [sp, 16]
.cfi_offset 21, -32
str x0, [sp, 40]
str w1, [sp, 36]
mov w20, 0
ldr x19, [sp, 40]
b .L5
.L6:
ldrh w0, [x19]
mov w21, w0
lsl w0, w21, 8
sxth w1, w0
asr w0, w21, 8
sxth w0, w0
orr w0, w1, w0
sxth w0, w0
and w0, w0, 65535
strh w0, [x19]
add w20, w20, 1
add x19, x19, 2
.L5:
ldr w0, [sp, 36]
cmp w20, w0
blt .L6
nop
ldr x21, [sp, 16]
ldp x19, x20, [sp], 48
.cfi_restore 20
.cfi_restore 19
.cfi_restore 21
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size short_mips2vms, .-short_mips2vms
.align 2
.global float_vms2mips
.type float_vms2mips, %function
float_vms2mips:
.LFB2:
.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 w1, [sp, 44]
adrp x1, :got:__stack_chk_guard
ldr x1, [x1, #:got_lo12:__stack_chk_guard]
ldr x2, [x1]
str x2, [sp, 72]
mov x2, 0
str wzr, [sp, 60]
b .L8
.L11:
ldr x1, [x0]
str x1, [sp, 64]
ldr x1, [sp, 64]
lsr x2, x1, 16
ldr x1, [sp, 64]
lsl x1, x1, 16
orr x19, x2, x1
lsl x2, x19, 8
mov w1, 4278255360
and x2, x2, x1
lsr x3, x19, 8
mov w1, 16711935
and x1, x3, x1
orr x19, x2, x1
and x1, x19, 32640
cmp x1, 256
bhi .L9
str wzr, [x0]
b .L10
.L9:
sub x19, x19, #256
lsr x2, x19, 16
lsl x1, x19, 16
orr x1, x2, x1
str x1, [sp, 64]
add x1, sp, 64
ldr s0, [x1]
str s0, [x0]
.L10:
ldr w1, [sp, 60]
add w1, w1, 1
str w1, [sp, 60]
add x0, x0, 4
.L8:
ldr w2, [sp, 60]
ldr w1, [sp, 44]
cmp w2, w1
blt .L11
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 .L12
bl __stack_chk_fail
.L12:
mov w0, w1
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
.LFE2:
.size float_vms2mips, .-float_vms2mips
.align 2
.global float_mips2vms
.type float_mips2vms, %function
float_mips2vms:
.LFB3:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str w1, [sp, 12]
str wzr, [sp, 32]
b .L14
.L15:
str x0, [sp, 40]
ldr x1, [sp, 40]
ldrb w1, [x1]
strb w1, [sp, 31]
ldr x1, [sp, 40]
ldrb w2, [x1, 1]
ldr x1, [sp, 40]
strb w2, [x1]
ldr x1, [sp, 40]
add x1, x1, 1
ldrb w2, [sp, 31]
strb w2, [x1]
ldr x1, [sp, 40]
ldrb w1, [x1, 2]
strb w1, [sp, 31]
ldr x1, [sp, 40]
add x1, x1, 2
ldr x2, [sp, 40]
ldrb w2, [x2, 3]
strb w2, [x1]
ldr x1, [sp, 40]
add x1, x1, 3
ldrb w2, [sp, 31]
strb w2, [x1]
ldr x1, [sp, 40]
ldr s0, [x1]
str s0, [sp, 36]
ldr s1, [sp, 36]
fmov s0, 4.0e+0
fmul s0, s1, s0
str s0, [sp, 36]
ldr s0, [sp, 36]
str s0, [x0]
ldr w1, [sp, 32]
add w1, w1, 1
str w1, [sp, 32]
add x0, x0, 4
.L14:
ldr w2, [sp, 32]
ldr w1, [sp, 12]
cmp w2, w1
blt .L15
nop
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size float_mips2vms, .-float_mips2vms
.align 2
.global long_vms2mips
.type long_vms2mips, %function
long_vms2mips:
.LFB4:
.cfi_startproc
str x19, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 19, -48
str w1, [sp, 28]
str wzr, [sp, 44]
b .L17
.L18:
ldr x1, [x0]
mov x19, x1
lsl x2, x19, 16
lsr x1, x19, 16
orr x19, x2, x1
lsl x2, x19, 8
mov w1, 4278255360
and x2, x2, x1
lsr x3, x19, 8
mov w1, 16711935
and x1, x3, x1
orr x19, x2, x1
mov x1, x19
str x1, [x0]
ldr w1, [sp, 44]
add w1, w1, 1
str w1, [sp, 44]
add x0, x0, 8
.L17:
ldr w2, [sp, 44]
ldr w1, [sp, 28]
cmp w2, w1
blt .L18
nop
ldr x19, [sp], 48
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size long_vms2mips, .-long_vms2mips
.align 2
.global long_mips2vms
.type long_mips2vms, %function
long_mips2vms:
.LFB5:
.cfi_startproc
str x19, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 19, -48
str w1, [sp, 28]
str wzr, [sp, 44]
b .L20
.L21:
ldr x1, [x0]
mov x19, x1
lsl x2, x19, 16
lsr x1, x19, 16
orr x19, x2, x1
lsl x2, x19, 8
mov w1, 4278255360
and x2, x2, x1
lsr x3, x19, 8
mov w1, 16711935
and x1, x3, x1
orr x19, x2, x1
mov x1, x19
str x1, [x0]
ldr w1, [sp, 44]
add w1, w1, 1
str w1, [sp, 44]
add x0, x0, 8
.L20:
ldr w2, [sp, 44]
ldr w1, [sp, 28]
cmp w2, w1
blt .L21
nop
ldr x19, [sp], 48
.cfi_restore 19
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE5:
.size long_mips2vms, .-long_mips2vms
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global reach_error
.type reach_error, %function
reach_error:
.LFB0:
.cfi_startproc
nop
ret
.cfi_endproc
.LFE0:
.size reach_error, .-reach_error
.align 2
.global assume_abort_if_not
.type assume_abort_if_not, %function
assume_abort_if_not:
.LFB1:
.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]
cmp w0, 0
bne .L4
bl abort
.L4:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size assume_abort_if_not, .-assume_abort_if_not
.align 2
.global __VERIFIER_assert
.type __VERIFIER_assert, %function
__VERIFIER_assert:
.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]
ldr w0, [sp, 28]
cmp w0, 0
bne .L9
nop
.L7:
bl reach_error
bl abort
.L9:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size __VERIFIER_assert, .-__VERIFIER_assert
.global SIZE
.data
.align 2
.type SIZE, %object
.size SIZE, 4
SIZE:
.word 20000001
.text
.align 2
.global main
.type main, %function
main:
.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 wzr, [sp, 40]
bl __VERIFIER_nondet_uint
str w0, [sp, 44]
adrp x0, SIZE
add x0, x0, :lo12:SIZE
ldr w0, [x0]
mov w1, w0
ldr w0, [sp, 44]
cmp w0, w1
bls .L11
mov w0, 0
b .L12
.L11:
str wzr, [sp, 28]
str wzr, [sp, 36]
str wzr, [sp, 32]
str wzr, [sp, 40]
b .L13
.L17:
ldr w2, [sp, 40]
mov w0, 43691
movk w0, 0xaaaa, lsl 16
umull x0, w2, w0
lsr x0, x0, 32
lsr w1, w0, 1
mov w0, w1
lsl w0, w0, 1
add w0, w0, w1
sub w1, w2, w0
cmp w1, 0
bne .L14
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
b .L15
.L14:
ldr w0, [sp, 40]
and w0, w0, 1
cmp w0, 0
bne .L16
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
b .L15
.L16:
ldr w0, [sp, 32]
add w0, w0, 1
str w0, [sp, 32]
.L15:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L13:
ldr w1, [sp, 40]
ldr w0, [sp, 44]
cmp w1, w0
bcc .L17
ldr w1, [sp, 28]
ldr w0, [sp, 36]
add w1, w1, w0
ldr w0, [sp, 32]
add w0, w1, w0
ldr w1, [sp, 40]
cmp w1, w0
cset w0, eq
and w0, w0, 255
bl __VERIFIER_assert
mov w0, 0
.L12:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global brutal_crack
.type brutal_crack, %function
brutal_crack:
.LFB0:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, 8]
str w1, [sp, 4]
str wzr, [sp, 32]
str wzr, [sp, 36]
b .L2
.L8:
ldr w0, [sp, 36]
str w0, [sp, 40]
b .L3
.L7:
str wzr, [sp, 28]
ldr w0, [sp, 36]
str w0, [sp, 44]
b .L4
.L5:
ldrsw x0, [sp, 44]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 28]
add w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L4:
ldr w1, [sp, 44]
ldr w0, [sp, 40]
cmp w1, w0
ble .L5
ldr w1, [sp, 28]
ldr w0, [sp, 32]
cmp w1, w0
ble .L6
ldr w0, [sp, 28]
str w0, [sp, 32]
.L6:
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L3:
ldr w1, [sp, 40]
ldr w0, [sp, 4]
cmp w1, w0
blt .L7
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L2:
ldr w1, [sp, 36]
ldr w0, [sp, 4]
cmp w1, w0
blt .L8
ldr w0, [sp, 32]
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size brutal_crack, .-brutal_crack
.align 2
.global preprocess
.type preprocess, %function
preprocess:
.LFB1:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
str wzr, [sp, 20]
str wzr, [sp, 24]
b .L11
.L15:
str wzr, [sp, 16]
ldr w0, [sp, 24]
str w0, [sp, 28]
b .L12
.L14:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 16]
add w0, w1, w0
str w0, [sp, 16]
ldr w1, [sp, 16]
ldr w0, [sp, 20]
cmp w1, w0
ble .L13
ldr w0, [sp, 16]
str w0, [sp, 20]
.L13:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L12:
ldr w1, [sp, 28]
ldr w0, [sp, 4]
cmp w1, w0
blt .L14
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L11:
ldr w1, [sp, 24]
ldr w0, [sp, 4]
cmp w1, w0
blt .L15
ldr w0, [sp, 20]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size preprocess, .-preprocess
.align 2
.global maxsubsequence
.type maxsubsequence, %function
maxsubsequence:
.LFB2:
.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]
str w2, [sp, 16]
str wzr, [sp, 64]
str wzr, [sp, 68]
str wzr, [sp, 44]
str wzr, [sp, 48]
ldr w1, [sp, 20]
ldr w0, [sp, 16]
add w0, w1, w0
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
str w0, [sp, 72]
str wzr, [sp, 52]
ldr w1, [sp, 20]
ldr w0, [sp, 16]
cmp w1, w0
bne .L18
ldrsw x0, [sp, 20]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
mov w1, 0
cmp w0, 0
csel w0, w0, w1, ge
b .L19
.L18:
ldr w2, [sp, 72]
ldr w1, [sp, 20]
ldr x0, [sp, 24]
bl maxsubsequence
str w0, [sp, 64]
ldr w0, [sp, 72]
add w0, w0, 1
ldr w2, [sp, 16]
mov w1, w0
ldr x0, [sp, 24]
bl maxsubsequence
str w0, [sp, 68]
str wzr, [sp, 56]
ldr w0, [sp, 72]
str w0, [sp, 52]
b .L20
.L22:
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 56]
add w0, w1, w0
str w0, [sp, 56]
ldr w1, [sp, 56]
ldr w0, [sp, 44]
cmp w1, w0
ble .L21
ldr w0, [sp, 56]
str w0, [sp, 44]
.L21:
ldr w0, [sp, 52]
sub w0, w0, #1
str w0, [sp, 52]
.L20:
ldr w1, [sp, 52]
ldr w0, [sp, 20]
cmp w1, w0
bge .L22
ldr w1, [sp, 44]
ldr w0, [sp, 44]
mov w2, 0
cmp w1, 0
csel w0, w0, w2, ge
str w0, [sp, 44]
str wzr, [sp, 60]
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 52]
b .L23
.L25:
ldrsw x0, [sp, 52]
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 60]
add w0, w1, w0
str w0, [sp, 60]
ldr w1, [sp, 60]
ldr w0, [sp, 48]
cmp w1, w0
ble .L24
ldr w0, [sp, 60]
str w0, [sp, 48]
.L24:
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L23:
ldr w1, [sp, 52]
ldr w0, [sp, 16]
cmp w1, w0
ble .L25
ldr w1, [sp, 48]
ldr w0, [sp, 48]
mov w2, 0
cmp w1, 0
csel w0, w0, w2, ge
str w0, [sp, 48]
ldr w1, [sp, 44]
ldr w0, [sp, 48]
add w0, w1, w0
str w0, [sp, 76]
ldr w1, [sp, 64]
ldr w0, [sp, 68]
cmp w1, w0
ble .L26
ldr w0, [sp, 64]
ldr w2, [sp, 76]
ldr w1, [sp, 76]
cmp w2, w0
csel w0, w1, w0, ge
b .L19
.L26:
ldr w0, [sp, 68]
ldr w2, [sp, 76]
ldr w1, [sp, 76]
cmp w2, w0
csel w0, w1, w0, ge
.L19:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size maxsubsequence, .-maxsubsequence
.align 2
.global simple_traverse
.type simple_traverse, %function
simple_traverse:
.LFB3:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
str wzr, [sp, 24]
ldr w0, [sp, 24]
str w0, [sp, 20]
str wzr, [sp, 28]
b .L29
.L32:
ldrsw x0, [sp, 28]
lsl x0, x0, 2
ldr x1, [sp, 8]
add x0, x1, x0
ldr w0, [x0]
ldr w1, [sp, 20]
add w0, w1, w0
str w0, [sp, 20]
ldr w1, [sp, 20]
ldr w0, [sp, 24]
cmp w1, w0
ble .L30
ldr w0, [sp, 20]
str w0, [sp, 24]
b .L31
.L30:
ldr w0, [sp, 20]
cmp w0, 0
bge .L31
str wzr, [sp, 20]
.L31:
ldr w0, [sp, 28]
add w0, w0, 1
str w0, [sp, 28]
.L29:
ldr w1, [sp, 28]
ldr w0, [sp, 4]
cmp w1, w0
blt .L32
ldr w0, [sp, 24]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size simple_traverse, .-simple_traverse
.section .rodata
.align 3
.LC1:
.string "%d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB4:
.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
adrp x0, .LC0
add x1, x0, :lo12:.LC0
add x0, sp, 40
ldp q0, q1, [x1]
stp q0, q1, [x0]
add x0, sp, 40
mov w1, 8
bl brutal_crack
str w0, [sp, 36]
ldr w1, [sp, 36]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
add x0, sp, 40
mov w1, 8
bl preprocess
str w0, [sp, 36]
ldr w1, [sp, 36]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
add x0, sp, 40
mov w2, 7
mov w1, 0
bl maxsubsequence
str w0, [sp, 36]
ldr w1, [sp, 36]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
add x0, sp, 40
mov w1, 8
bl simple_traverse
str w0, [sp, 36]
ldr w1, [sp, 36]
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, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L36
bl __stack_chk_fail
.L36:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE4:
.size main, .-main
.section .rodata
.align 3
.LC0:
.word 4
.word -3
.word 5
.word -2
.word -1
.word 2
.word 6
.word -2
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "Somatorio: %d\n"
.align 3
.LC2:
.string "Media: %.2f\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, 28]
str wzr, [sp, 32]
.L3:
add x0, sp, 24
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w0, [sp, 24]
ldr w1, [sp, 28]
add w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 24]
cmp w0, 0
ble .L2
ldr s1, [sp, 32]
fmov s0, 1.0e+0
fadd s0, s1, s0
str s0, [sp, 32]
.L2:
ldr w0, [sp, 24]
cmp w0, 0
bgt .L3
ldr s0, [sp, 28]
scvtf s1, s0
ldr s0, [sp, 32]
fdiv s0, s1, s0
str s0, [sp, 36]
ldr w1, [sp, 28]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
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 .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
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "Exploit worked!"
.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
.align 2
.global distance
.type distance, %function
distance:
.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 d8, [sp, 16]
.cfi_offset 72, -64
str d0, [sp, 56]
str d1, [sp, 48]
str d2, [sp, 40]
str d3, [sp, 32]
ldr d1, [sp, 40]
ldr d0, [sp, 56]
fsub d8, d1, d0
ldr d1, [sp, 48]
ldr d0, [sp, 32]
fadd d1, d1, d0
fmov d0, 2.0e+0
fdiv d0, d1, d0
bl cos
fmul d0, d8, d0
str d0, [sp, 64]
ldr d1, [sp, 32]
ldr d0, [sp, 48]
fsub d0, d1, d0
str d0, [sp, 72]
ldr d0, [sp, 64]
fmul d1, d0, d0
ldr d0, [sp, 72]
fmul d0, d0, d0
fadd d0, d1, d0
bl sqrt
mov x0, 249589139505152
movk x0, 0x40b8, lsl 48
fmov d1, x0
fmul d0, d0, d1
ldr d8, [sp, 16]
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_restore 72
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size distance, .-distance
.align 2
.global toDouble
.type toDouble, %function
toDouble:
.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]
b .L4
.L6:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 44
bne .L5
ldr x0, [sp, 40]
mov w1, 46
strb w1, [x0]
.L5:
ldr x0, [sp, 40]
add x0, x0, 1
str x0, [sp, 40]
.L4:
ldr x0, [sp, 40]
ldrb w0, [x0]
cmp w0, 0
bne .L6
ldr x0, [sp, 24]
bl atof
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size toDouble, .-toDouble
.align 2
.global goToNext
.type goToNext, %function
goToNext:
.LFB8:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, 15]
str x1, [sp]
b .L9
.L10:
ldr x0, [sp]
add x0, x0, 1
str x0, [sp]
.L9:
ldr x0, [sp]
ldrb w0, [x0]
ldrb w1, [sp, 15]
cmp w1, w0
bne .L10
ldr x0, [sp]
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size goToNext, .-goToNext
.align 2
.global getDefib
.type getDefib, %function
getDefib:
.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 x0, [sp, 24]
str x1, [sp, 16]
ldr x1, [sp, 24]
mov w0, 59
bl goToNext
str x0, [sp, 24]
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
ldr x0, [sp, 16]
ldr x1, [sp, 24]
str x1, [x0]
str wzr, [sp, 44]
b .L13
.L14:
ldr x1, [sp, 24]
mov w0, 59
bl goToNext
str x0, [sp, 24]
ldr x0, [sp, 24]
strb wzr, [x0]
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L13:
ldr w0, [sp, 44]
cmp w0, 2
ble .L14
ldr x0, [sp, 24]
str x0, [sp, 48]
ldr x1, [sp, 24]
mov w0, 44
bl goToNext
str x0, [sp, 24]
ldr x0, [sp, 24]
mov w1, 46
strb w1, [x0]
ldr x1, [sp, 24]
mov w0, 59
bl goToNext
str x0, [sp, 24]
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
ldr x0, [sp, 24]
str x0, [sp, 56]
ldr x1, [sp, 24]
mov w0, 44
bl goToNext
str x0, [sp, 24]
ldr x0, [sp, 24]
mov w1, 46
strb w1, [x0]
ldr x0, [sp, 48]
bl atof
ldr x0, [sp, 16]
str d0, [x0, 8]
ldr x0, [sp, 56]
bl atof
ldr x0, [sp, 16]
str d0, [x0, 16]
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size getDefib, .-getDefib
.section .rodata
.align 3
.LC0:
.string "%s\n%s\n%d\n"
.align 3
.LC1:
.string "%s"
.text
.align 2
.global main
.type main, %function
main:
.LFB10:
.cfi_startproc
sub sp, sp, #576
.cfi_def_cfa_offset 576
stp x29, x30, [sp]
.cfi_offset 29, -576
.cfi_offset 30, -568
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, 568]
mov x1, 0
add x2, sp, 32
add x1, sp, 152
add x0, sp, 96
mov x3, x2
mov x2, x1
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
add x0, sp, 96
bl toDouble
str d0, [sp, 48]
add x0, sp, 152
bl toDouble
str d0, [sp, 56]
mov x0, 9218868437227405311
fmov d0, x0
str d0, [sp, 40]
str wzr, [sp, 36]
b .L16
.L19:
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x1, [x0]
add x0, sp, 312
mov x2, x1
mov w1, 256
bl fgets
mov x2, x0
add x0, sp, 72
mov x1, x0
mov x0, x2
bl getDefib
ldr d0, [sp, 80]
ldr d1, [sp, 88]
fmov d3, d1
fmov d2, d0
ldr d1, [sp, 56]
ldr d0, [sp, 48]
bl distance
str d0, [sp, 64]
ldr d1, [sp, 64]
ldr d0, [sp, 40]
fcmpe d1, d0
bmi .L22
b .L17
.L22:
ldr d0, [sp, 64]
str d0, [sp, 40]
ldr x1, [sp, 72]
add x0, sp, 208
bl strcpy
.L17:
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L16:
ldr w0, [sp, 32]
ldr w1, [sp, 36]
cmp w1, w0
blt .L19
add x0, sp, 208
mov x1, x0
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, 568]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L21
bl __stack_chk_fail
.L21:
mov w0, w1
ldp x29, x30, [sp]
add sp, sp, 576
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global S_PER_M
.section .rodata
.align 2
.type S_PER_M, %object
.size S_PER_M, 4
S_PER_M:
.word 60
.global S_PER_H
.align 2
.type S_PER_H, %object
.size S_PER_H, 4
S_PER_H:
.word 3600
.global M_PER_K
.align 3
.type M_PER_K, %object
.size M_PER_K, 8
M_PER_K:
.word 1452729738
.word 1071899203
.align 3
.LC0:
.string "This program converts your time for a metric race"
.align 3
.LC1:
.string "to a time for running time a mile and to your average"
.align 3
.LC2:
.string "speed in miles per hour."
.align 3
.LC3:
.string "Plese enter, in kilometers, the distance run."
.align 3
.LC4:
.string "%lf"
.align 3
.LC5:
.string "Next enter the time in minutes and seconds."
.align 3
.LC6:
.string "Begin by entering the minutes."
.align 3
.LC7:
.string "%d"
.align 3
.LC8:
.string "Now enter the seconds."
.align 3
.LC9:
.string "You ran %1.2f km (%1.2f miles) in %d min, %d sec.\n"
.align 3
.LC10:
.string "That pace corresponds to running a mile in %d min, "
.align 3
.LC11:
.string "%d sec.\nYour average speed was %1.2f mph.\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.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
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
add x0, sp, 40
mov x1, x0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl __isoc99_scanf
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl puts
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
add x0, sp, 20
mov x1, x0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl __isoc99_scanf
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl puts
add x0, sp, 24
mov x1, x0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl __isoc99_scanf
mov w1, 60
ldr w0, [sp, 20]
mul w1, w1, w0
ldr w0, [sp, 24]
add w0, w1, w0
str w0, [sp, 28]
adrp x0, .LC12
ldr d1, [x0, #:lo12:.LC12]
ldr d0, [sp, 40]
fmul d0, d1, d0
str d0, [sp, 48]
ldr w0, [sp, 28]
scvtf d0, w0
ldr d1, [sp, 48]
fdiv d1, d1, d0
mov w0, 3600
scvtf d0, w0
fmul d0, d1, d0
str d0, [sp, 56]
ldr w0, [sp, 28]
scvtf d1, w0
ldr d0, [sp, 48]
fdiv d0, d1, d0
str d0, [sp, 64]
ldr d0, [sp, 64]
fcvtzs w1, d0
mov w0, 60
sdiv w0, w1, w0
str w0, [sp, 32]
ldr d0, [sp, 64]
fcvtzs w0, d0
mov w1, 60
sdiv w2, w0, w1
mul w1, w2, w1
sub w0, w0, w1
str w0, [sp, 36]
ldr d0, [sp, 40]
ldr w0, [sp, 20]
ldr w1, [sp, 24]
mov w2, w1
mov w1, w0
ldr d1, [sp, 48]
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
ldr w1, [sp, 32]
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
ldr d0, [sp, 56]
ldr w1, [sp, 36]
adrp x0, .LC11
add x0, x0, :lo12:.LC11
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, 72]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L3
bl __stack_chk_fail
.L3:
mov w0, w1
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.section .rodata
.align 3
.LC12:
.word 1452729738
.word 1071899203
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global push
.type push, %function
push:
.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]
str w2, [sp, 16]
mov x0, 16
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
ldr w1, [sp, 20]
str w1, [x0]
ldr x0, [sp, 40]
ldr w1, [sp, 16]
str w1, [x0, 4]
ldr x0, [sp, 24]
ldr x1, [x0]
ldr x0, [sp, 40]
str x1, [x0, 8]
ldr x0, [sp, 24]
ldr x1, [sp, 40]
str x1, [x0]
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size push, .-push
.align 2
.global delete
.type delete, %function
delete:
.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]
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 32]
str xzr, [sp, 40]
ldr x0, [sp, 24]
ldr x0, [x0]
cmp x0, 0
bne .L5
mov w0, -1
b .L4
.L7:
ldr x0, [sp, 32]
ldr x0, [x0, 8]
cmp x0, 0
bne .L6
mov w0, -1
b .L4
.L6:
ldr x0, [sp, 32]
str x0, [sp, 40]
ldr x0, [sp, 32]
ldr x0, [x0, 8]
str x0, [sp, 32]
.L5:
ldr x0, [sp, 32]
ldr w0, [x0, 4]
ldr w1, [sp, 20]
cmp w1, w0
bne .L7
ldr x0, [sp, 24]
ldr x0, [x0]
ldr x1, [sp, 32]
cmp x1, x0
bne .L8
ldr x0, [sp, 24]
ldr x0, [x0]
ldr x1, [x0, 8]
ldr x0, [sp, 24]
str x1, [x0]
ldr x0, [sp, 32]
bl free
b .L9
.L8:
ldr x0, [sp, 32]
ldr x1, [x0, 8]
ldr x0, [sp, 40]
str x1, [x0, 8]
ldr x0, [sp, 32]
bl free
.L9:
mov w0, 1
.L4:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size delete, .-delete
.align 2
.global search_list
.type search_list, %function
search_list:
.LFB8:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, 8]
str w1, [sp, 4]
ldr x0, [sp, 8]
str x0, [sp, 24]
b .L11
.L14:
ldr x0, [sp, 24]
ldr w0, [x0, 4]
ldr w1, [sp, 4]
cmp w1, w0
bne .L12
mov w0, 1
b .L13
.L12:
ldr x0, [sp, 24]
ldr x0, [x0, 8]
str x0, [sp, 24]
.L11:
ldr x0, [sp, 24]
cmp x0, 0
bne .L14
mov w0, 0
.L13:
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size search_list, .-search_list
.align 2
.global deleteList
.type deleteList, %function
deleteList:
.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]
ldr x0, [sp, 24]
ldr x0, [x0]
str x0, [sp, 32]
b .L16
.L17:
ldr x0, [sp, 32]
ldr x0, [x0, 8]
str x0, [sp, 40]
ldr x0, [sp, 32]
bl free
ldr x0, [sp, 40]
str x0, [sp, 32]
.L16:
ldr x0, [sp, 32]
cmp x0, 0
bne .L17
ldr x0, [sp, 24]
str xzr, [x0]
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size deleteList, .-deleteList
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "\345\216\237\345\200\274\357\274\2320x%x\n"
.align 3
.LC1:
.string "yunsan\357\274\2320x%x\n"
.align 3
.LC2:
.string "%d\n"
.align 3
.LC3:
.string "%d"
.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
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, 40]
mov x1, 0
str wzr, [sp, 32]
str wzr, [sp, 36]
b .L2
.L5:
str wzr, [sp, 36]
ldr w0, [sp, 32]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
b .L3
.L4:
ldr w0, [sp, 32]
sub w1, w0, #1
ldr w0, [sp, 32]
and w0, w1, w0
str w0, [sp, 32]
ldr w0, [sp, 32]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L3:
ldr w0, [sp, 32]
cmp w0, 0
bne .L4
ldr w1, [sp, 36]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
.L2:
add x0, sp, 32
mov x1, x0
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl __isoc99_scanf
cmn w0, #1
bne .L5
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 .L7
bl __stack_chk_fail
.L7:
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
.align 2
.type fib, %function
fib:
.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 x19, [sp, 16]
.cfi_offset 19, -32
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 1
ble .L2
ldr w0, [sp, 44]
sub w0, w0, #1
bl fib
mov w19, w0
ldr w0, [sp, 44]
sub w0, w0, #2
bl fib
add w0, w19, w0
b .L4
.L2:
ldr w0, [sp, 44]
.L4:
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
.LFE6:
.size fib, .-fib
.section .rodata
.align 3
.LC0:
.string "starting fib(%d)...\n"
.align 3
.LC1:
.string "fib(%d) = %d\n"
.align 3
.LC2:
.string "finishing..."
.text
.align 2
.global main
.type main, %function
main:
.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 w0, [sp, 28]
str x1, [sp, 16]
ldr w0, [sp, 28]
cmp w0, 1
ble .L6
ldr x0, [sp, 16]
add x0, x0, 8
ldr x0, [x0]
bl atoi
b .L7
.L6:
mov w0, 38
.L7:
str w0, [sp, 44]
ldr w1, [sp, 44]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
str wzr, [sp, 40]
b .L8
.L9:
ldr w0, [sp, 40]
bl fib
mov w2, w0
ldr w1, [sp, 40]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L8:
ldr w1, [sp, 40]
ldr w0, [sp, 44]
cmp w1, w0
blt .L9
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
mov w0, 0
ldp x29, x30, [sp], 48
.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
.align 2
.global f
.type f, %function
f:
.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, 1
str w0, [sp, 24]
mov w0, 2
str w0, [sp, 28]
mov w0, 4
str w0, [sp, 32]
mov w0, 3
str w0, [sp, 36]
ldr w1, [sp, 24]
ldr w0, [sp, 28]
add w1, w1, w0
ldr w0, [sp, 32]
add w1, w1, w0
ldr w0, [sp, 36]
add w0, w1, w0
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 f, .-f
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "r"
.align 3
.LC1:
.string "/proc/acpi/battery/BAT0/info"
.align 3
.LC2:
.string "couldn't open /proc/acpi/battery/BAT0/info"
.align 3
.LC3:
.string "last full capacity: %d"
.align 3
.LC4:
.string "/proc/acpi/battery/BAT0/state"
.align 3
.LC5:
.string "couldn't open /proc/acpi/battery/BAT0/state"
.align 3
.LC6:
.string "remaining capacity: %d"
.align 3
.LC7:
.string "%a %b %d %H:%M:%S"
.align 3
.LC8:
.string "%s | %.2f %.2f %.2f | %.1f%% \n"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
stp x29, x30, [sp, -128]!
.cfi_def_cfa_offset 128
.cfi_offset 29, -128
.cfi_offset 30, -120
mov x29, sp
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 x1, 1
mov w0, 13
bl signal
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 .L3
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl perror
mov w0, -1
bl exit
.L5:
add x0, sp, 24
add x3, sp, 80
mov x2, x0
adrp x0, .LC3
add x1, x0, :lo12:.LC3
mov x0, x3
bl __isoc99_sscanf
cmp w0, 1
beq .L12
.L3:
add x0, sp, 80
ldr x2, [sp, 40]
mov w1, 34
bl fgets
cmp x0, 0
bne .L5
b .L4
.L12:
nop
.L4:
ldr x0, [sp, 40]
bl fclose
.L10:
add x0, sp, 56
mov w1, 3
bl getloadavg
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L7
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl perror
mov w0, -1
bl exit
.L9:
add x0, sp, 28
add x3, sp, 80
mov x2, x0
adrp x0, .LC6
add x1, x0, :lo12:.LC6
mov x0, x3
bl __isoc99_sscanf
cmp w0, 1
beq .L13
.L7:
add x0, sp, 80
ldr x2, [sp, 40]
mov w1, 34
bl fgets
cmp x0, 0
bne .L9
b .L8
.L13:
nop
.L8:
ldr x0, [sp, 40]
bl fclose
mov x0, 0
bl time
str x0, [sp, 32]
add x0, sp, 32
bl localtime
str x0, [sp, 48]
add x4, sp, 80
ldr x3, [sp, 48]
adrp x0, .LC7
add x2, x0, :lo12:.LC7
mov x1, 34
mov x0, x4
bl strftime
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x3, [x0]
ldr d4, [sp, 56]
ldr d5, [sp, 64]
ldr d2, [sp, 72]
ldr w1, [sp, 28]
mov w0, 100
mul w0, w1, w0
scvtf s1, w0
ldr s0, [sp, 24]
scvtf s0, s0
fdiv s0, s1, s0
fcvt d0, s0
add x0, sp, 80
fmov d3, d0
fmov d1, d5
fmov d0, d4
mov x2, x0
adrp x0, .LC8
add x1, x0, :lo12:.LC8
mov x0, x3
bl fprintf
adrp x0, :got:stdout
ldr x0, [x0, #:got_lo12:stdout]
ldr x0, [x0]
bl fflush
mov w0, 2
bl sleep
b .L10
.cfi_endproc
.LFE6:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%3.0f %6.1f\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
str wzr, [sp, 24]
b .L2
.L3:
ldr s0, [sp, 24]
fcvt d0, s0
mov x0, 4629700416936869888
fmov d1, x0
fsub d0, d0, d1
adrp x0, .LC1
ldr d1, [x0, #:lo12:.LC1]
fmul d0, d0, d1
fcvt s0, d0
str s0, [sp, 28]
ldr s0, [sp, 24]
fcvt d2, s0
ldr s0, [sp, 28]
fcvt d0, s0
fmov d1, d0
fmov d0, d2
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr s1, [sp, 24]
fmov s0, 2.0e+1
fadd s0, s1, s0
str s0, [sp, 24]
.L2:
ldr s0, [sp, 24]
mov w0, 1133903872
fmov s1, w0
fcmpe s0, s1
bls .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
.section .rodata
.align 3
.LC1:
.word 1908874354
.word 1071761180
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%s \n"
.text
.align 2
.global nthword
.type nthword, %function
nthword:
.LFB0:
.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, 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, 136]
mov x1, 0
str wzr, [sp, 40]
str wzr, [sp, 44]
str xzr, [sp, 48]
b .L2
.L7:
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 32
beq .L3
ldr x0, [sp, 48]
cmp x0, 0
beq .L4
ldr x0, [sp, 48]
ldrb w0, [x0]
cmp w0, 32
bne .L5
.L4:
ldr w0, [sp, 44]
add w0, w0, 1
str w0, [sp, 44]
.L5:
ldr w1, [sp, 44]
ldr w0, [sp, 20]
cmp w1, w0
bne .L6
ldr x0, [sp, 24]
ldrb w2, [x0]
ldrsw x0, [sp, 40]
add x1, sp, 56
strb w2, [x1, x0]
ldr w0, [sp, 40]
add w0, w0, 1
str w0, [sp, 40]
.L6:
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
ldr x0, [sp, 24]
sub x0, x0, #1
str x0, [sp, 48]
b .L2
.L3:
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 32
bne .L2
ldr x0, [sp, 24]
add x0, x0, 1
str x0, [sp, 24]
ldr x0, [sp, 24]
sub x0, x0, #1
str x0, [sp, 48]
.L2:
ldr x0, [sp, 24]
ldrb w0, [x0]
cmp w0, 0
bne .L7
ldrsw x0, [sp, 40]
add x1, sp, 56
strb wzr, [x1, x0]
add x0, sp, 56
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
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 .L8
bl __stack_chk_fail
.L8:
ldp x29, x30, [sp], 144
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size nthword, .-nthword
.section .rodata
.align 3
.LC1:
.string "select * from mytable where city = \"Auckland\" ;"
.text
.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
adrp x0, .LC1
add x0, x0, :lo12:.LC1
str x0, [sp, 24]
mov w1, 1
ldr x0, [sp, 24]
bl nthword
mov w1, 2
ldr x0, [sp, 24]
bl nthword
mov w1, 3
ldr x0, [sp, 24]
bl nthword
mov w0, 0
ldp x29, x30, [sp], 32
.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
.align 2
.global struct_cmp
.type struct_cmp, %function
struct_cmp:
.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]
ldr x0, [sp, 24]
str x0, [sp, 32]
ldr x0, [sp, 16]
str x0, [sp, 40]
ldr x0, [sp, 32]
add x2, x0, 72
ldr x0, [sp, 40]
add x0, x0, 72
mov x1, x0
mov x0, x2
bl strcmp
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size struct_cmp, .-struct_cmp
.section .rodata
.align 3
.LC3:
.string "/ING_students.txt"
.align 3
.LC4:
.string "/LIC_students.txt"
.align 3
.LC5:
.string "/TEC_students.txt"
.align 3
.LC6:
.string "r"
.align 3
.LC7:
.string "datos.txt"
.align 3
.LC8:
.string " Sede: %s"
.align 3
.LC9:
.string " Facultad: %s"
.align 3
.LC10:
.string " Escuela: %s"
.align 3
.LC11:
.string " Carrera: %s"
.align 3
.LC12:
.string "C\303\263digo inv\303\241lido"
.align 3
.LC13:
.string "clear"
.align 3
.LC14:
.string "\n\tFIEC - ARCHIVO DE DATOS DE ESTUDIANTES"
.align 3
.LC15:
.string "\n\tINSTRUCCIONES:\n"
.align 3
.LC16:
.string "\tEJEMPLO DE CEDULA: 8 00 0843 00341"
.align 3
.LC17:
.string "\tFORMATO DE CEDULA: A BB CCCC DDDDD"
.align 3
.LC18:
.string "\tA = Provincia, para extranjeros es 0"
.align 3
.LC19:
.string "\tBB = C\303\263digo de pais, para nacionales es 00"
.align 3
.LC20:
.string "\tCCCC = Tomo"
.align 3
.LC21:
.string "\tDDDDD = Asiento"
.align 3
.LC22:
.string "\n\tCODIGO DE CARRERA: Ingenier\303\255a (1), Licenciatura (5), T\303\251cnico (2)\n"
.align 3
.LC23:
.string "\nEl estudiante no ha sido encontrado"
.align 3
.LC24:
.string "\n\302\277Desea buscar otro estudiante?, s/n: "
.align 3
.LC25:
.string "%s"
.align 3
.LC26:
.string "%[sn]"
.align 3
.LC27:
.string "Escriba s(si) o n(no)"
.align 3
.LC28:
.string "\n\302\241Gracias por usar este programa!\n"
.align 3
.LC29:
.string "\nERROR AL LEER EL ARCHIVO DE DATOS\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB7:
.cfi_startproc
sub sp, sp, #65536
.cfi_def_cfa_offset 65536
str xzr, [sp, 1024]
mov x12, 40416
sub sp, sp, x12
.cfi_def_cfa_offset 105952
stp x29, x30, [sp]
.cfi_offset 29, -105952
.cfi_offset 30, -105944
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x1, sp, 98304
ldr x2, [x0]
str x2, [x1, 7640]
mov x2, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
ldp x0, x1, [x0]
add x2, sp, 102400
add x2, x2, 3584
stp x0, x1, [x2, -160]
add x0, sp, 102400
add x0, x0, 3584
stp xzr, xzr, [x0, -144]
add x0, sp, 98304
str xzr, [x0, 7552]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
add x2, sp, 102400
add x2, x2, 3464
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldrh w0, [x3, 16]
strh w0, [x2, 16]
add x0, sp, 102400
add x0, x0, 3586
stp xzr, xzr, [x0, -104]
add x0, sp, 102400
add x0, x0, 3584
str wzr, [x0, -86]
add x0, sp, 102400
strh wzr, [x0, 3502]
adrp x0, .LC2
add x1, x0, :lo12:.LC2
add x0, sp, 102400
add x0, x0, 3504
ldr x2, [x1]
str x2, [x0]
ldr x1, [x1, 5]
str x1, [x0, 5]
add x0, sp, 102400
add x0, x0, 3517
movi v0.4s, 0
str q0, [x0]
str q0, [x0, 11]
add x0, sp, 102400
add x0, x0, 3424
bl directory
add x0, sp, 102400
add x0, x0, 3464
bl directory
add x0, sp, 102400
add x0, x0, 3504
bl directory
add x0, sp, 102400
add x0, x0, 3424
bl strlen
mov x1, x0
add x0, sp, 102400
add x0, x0, 3424
add x1, x0, x1
adrp x0, .LC3
add x0, x0, :lo12:.LC3
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldrh w0, [x3, 16]
strh w0, [x2, 16]
add x0, sp, 102400
add x0, x0, 3464
bl strlen
mov x1, x0
add x0, sp, 102400
add x0, x0, 3464
add x1, x0, x1
adrp x0, .LC4
add x0, x0, :lo12:.LC4
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldrh w0, [x3, 16]
strh w0, [x2, 16]
add x0, sp, 102400
add x0, x0, 3504
bl strlen
mov x1, x0
add x0, sp, 102400
add x0, x0, 3504
add x1, x0, x1
adrp x0, .LC5
add x0, x0, :lo12:.LC5
mov x2, x1
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldrh w0, [x3, 16]
strh w0, [x2, 16]
add x0, sp, 48
mov x2, 16
mov w1, 0
bl memset
adrp x0, .LC6
add x1, x0, :lo12:.LC6
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
beq .L4
str wzr, [sp, 24]
b .L5
.L17:
add x0, sp, 102400
add x0, x0, 3384
ldr x2, [sp, 40]
mov w1, 13
bl fgets
cmp x0, 0
beq .L5
add x0, sp, 102400
add x0, x0, 3376
add x3, sp, 102400
add x3, x3, 3384
mov x2, x0
adrp x0, .LC8
add x1, x0, :lo12:.LC8
mov x0, x3
bl __isoc99_sscanf
cmp w0, 1
bne .L6
add x2, sp, 64
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x2, x0
add x1, sp, 102400
add x1, x1, 3376
bl strcpy
b .L5
.L6:
add x0, sp, 102400
add x0, x0, 3376
add x3, sp, 102400
add x3, x3, 3384
mov x2, x0
adrp x0, .LC9
add x1, x0, :lo12:.LC9
mov x0, x3
bl __isoc99_sscanf
cmp w0, 1
bne .L7
add x2, sp, 64
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x2, x0
add x1, sp, 102400
add x1, x1, 3376
bl strcat
b .L5
.L7:
add x0, sp, 102400
add x0, x0, 3376
add x3, sp, 102400
add x3, x3, 3384
mov x2, x0
adrp x0, .LC10
add x1, x0, :lo12:.LC10
mov x0, x3
bl __isoc99_sscanf
cmp w0, 1
bne .L8
add x2, sp, 64
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x2, x0
add x1, sp, 102400
add x1, x1, 3376
bl strcat
b .L5
.L8:
add x0, sp, 102400
add x0, x0, 3376
add x3, sp, 102400
add x3, x3, 3384
mov x2, x0
adrp x0, .LC11
add x1, x0, :lo12:.LC11
mov x0, x3
bl __isoc99_sscanf
cmp w0, 1
bne .L5
add x2, sp, 64
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x0, x2, x0
add x1, sp, 102400
add x1, x1, 3376
bl strcat
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 69
ldrb w0, [x1, x0]
cmp w0, 50
bne .L9
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 71
ldrb w0, [x1, x0]
cmp w0, 49
bne .L9
mov w0, 1
str w0, [sp, 60]
str wzr, [sp, 48]
add x1, sp, 48
add x0, sp, 16384
add x0, x0, 1384
mov x2, x1
ldr x1, [sp, 40]
bl students
ldr w1, [sp, 48]
add x2, sp, 102400
add x2, x2, 3424
add x0, sp, 16384
add x0, x0, 1384
bl savefile
b .L10
.L9:
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 69
ldrb w0, [x1, x0]
cmp w0, 50
bne .L11
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 71
ldrb w0, [x1, x0]
cmp w0, 53
beq .L12
.L11:
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 69
ldrb w0, [x1, x0]
cmp w0, 51
bne .L13
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 71
ldrb w0, [x1, x0]
cmp w0, 49
bne .L13
.L12:
mov w0, 2
str w0, [sp, 60]
str wzr, [sp, 52]
add x1, sp, 48
add x0, sp, 16384
add x0, x0, 1384
mov x2, x1
ldr x1, [sp, 40]
bl students
ldr w1, [sp, 52]
add x2, sp, 102400
add x2, x2, 3504
add x0, sp, 16384
add x0, x0, 1384
bl savefile
b .L10
.L13:
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 69
ldrb w0, [x1, x0]
cmp w0, 50
bne .L14
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 71
ldrb w0, [x1, x0]
cmp w0, 50
beq .L15
.L14:
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 69
ldrb w0, [x1, x0]
cmp w0, 51
bne .L16
ldrsw x1, [sp, 24]
mov x0, x1
lsl x0, x0, 3
add x0, x0, x1
add x1, sp, 71
ldrb w0, [x1, x0]
cmp w0, 50
bne .L16
.L15:
mov w0, 3
str w0, [sp, 60]
str wzr, [sp, 56]
add x1, sp, 48
add x0, sp, 16384
add x0, x0, 1384
mov x2, x1
ldr x1, [sp, 40]
bl students
ldr w1, [sp, 56]
add x2, sp, 102400
add x2, x2, 3464
add x0, sp, 16384
add x0, x0, 1384
bl savefile
b .L10
.L16:
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl puts
.L10:
ldr w0, [sp, 24]
add w0, w0, 1
str w0, [sp, 24]
.L5:
ldr x0, [sp, 40]
bl feof
cmp w0, 0
beq .L17
ldr x0, [sp, 40]
bl fclose
str wzr, [sp, 28]
.L26:
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl system
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
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl puts
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl puts
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl puts
adrp x0, :got:stdin
ldr x0, [x0, #:got_lo12:stdin]
ldr x0, [x0]
bl fflush
add x0, sp, 102400
add x0, x0, 3400
bl readData
str w0, [sp, 36]
ldr w0, [sp, 36]
cmp w0, 1
bne .L18
add x2, sp, 168
add x1, sp, 102400
add x1, x1, 3424
add x0, sp, 102400
add x0, x0, 3400
mov x3, x2
mov x2, x1
mov x1, x0
mov w0, 35
bl searchData
str w0, [sp, 28]
b .L19
.L18:
ldr w0, [sp, 36]
cmp w0, 2
bne .L20
add x2, sp, 168
add x1, sp, 102400
add x1, x1, 3504
add x0, sp, 102400
add x0, x0, 3400
mov x3, x2
mov x2, x1
mov x1, x0
mov w0, 93
bl searchData
str w0, [sp, 28]
b .L19
.L20:
ldr w0, [sp, 36]
cmp w0, 5
bne .L19
add x2, sp, 168
add x1, sp, 102400
add x1, x1, 3464
add x0, sp, 102400
add x0, x0, 3400
mov x3, x2
mov x2, x1
mov x1, x0
mov w0, 154
bl searchData
str w0, [sp, 28]
.L19:
ldr w0, [sp, 28]
cmn w0, #1
beq .L21
add x0, sp, 168
mov x1, x0
ldr w0, [sp, 28]
bl showData
b .L22
.L21:
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl puts
.L22:
mov w0, 1
str w0, [sp, 32]
b .L23
.L25:
adrp x0, .LC24
add x0, x0, :lo12:.LC24
bl printf
add x0, sp, 102400
add x0, x0, 3368
mov x1, x0
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl __isoc99_scanf
add x0, sp, 102400
add x0, x0, 3368
add x3, sp, 102400
add x3, x3, 3368
mov x2, x0
adrp x0, .LC26
add x1, x0, :lo12:.LC26
mov x0, x3
bl __isoc99_sscanf
cmp w0, 1
bne .L24
str wzr, [sp, 32]
b .L23
.L24:
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl printf
.L23:
ldr w0, [sp, 32]
cmp w0, 0
bne .L25
add x0, sp, 102400
ldrb w0, [x0, 3368]
cmp w0, 115
beq .L26
adrp x0, .LC28
add x0, x0, :lo12:.LC28
bl puts
b .L27
.L4:
adrp x0, .LC29
add x0, x0, :lo12:.LC29
bl puts
.L27:
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
add x3, sp, 98304
ldr x4, [x3, 7640]
ldr x2, [x0]
subs x4, x4, x2
mov x2, 0
beq .L29
bl __stack_chk_fail
.L29:
mov w0, w1
ldp x29, x30, [sp]
.cfi_restore 29
.cfi_restore 30
add sp, sp, 3552
.cfi_def_cfa_offset 102400
add sp, sp, 102400
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size main, .-main
.section .rodata
.align 3
.LC0:
.string "DATA_Ingenieria"
.zero 24
.align 3
.LC1:
.string "DATA_Licenciatura"
.zero 22
.align 3
.LC2:
.string "DATA_Tecnico"
.zero 27
.text
.section .rodata
.align 3
.LC30:
.string "rm -rf DATA_* && clear"
.text
.align 2
.global directory
.type directory, %function
directory:
.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]
mov w1, 448
ldr x0, [sp, 24]
bl mkdir
cmn w0, #1
bne .L32
adrp x0, .LC30
add x0, x0, :lo12:.LC30
bl system
mov w1, 448
ldr x0, [sp, 24]
bl mkdir
.L32:
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size directory, .-directory
.section .rodata
.align 3
.LC31:
.string "a+"
.align 3
.LC32:
.string "0%s %s %s %c %-10s %d\n"
.text
.align 2
.global savefile
.type savefile, %function
savefile:
.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 x0, [sp, 40]
str w1, [sp, 36]
str x2, [sp, 24]
adrp x0, .LC31
add x1, x0, :lo12:.LC31
ldr x0, [sp, 24]
bl fopen
str x0, [sp, 56]
ldr x0, [sp, 56]
cmp x0, 0
beq .L37
str wzr, [sp, 52]
b .L35
.L36:
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x2, x0, 72
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x3, x0, 31
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x4, x0, 5
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
ldrb w0, [x0, 4]
mov w8, w0
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x5, x0, 57
ldrsw x1, [sp, 52]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
ldr w0, [x0]
mov w7, w0
mov x6, x5
mov w5, w8
adrp x0, .LC32
add x1, x0, :lo12:.LC32
ldr x0, [sp, 56]
bl fprintf
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L35:
ldr w1, [sp, 52]
ldr w0, [sp, 36]
cmp w1, w0
blt .L36
ldr x0, [sp, 56]
bl fclose
.L37:
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size savefile, .-savefile
.section .rodata
.align 3
.LC33:
.string "0%15[0-9PE ] %25[^0-9] %25[^0-9] %c %s %d"
.align 3
.LC34:
.string "%i"
.text
.align 2
.global students
.type students, %function
students:
.LFB10:
.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, 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, 184]
mov x1, 0
str wzr, [sp, 48]
str wzr, [sp, 52]
str wzr, [sp, 56]
str wzr, [sp, 60]
b .L39
.L46:
add x0, sp, 64
ldr x2, [sp, 32]
mov w1, 120
bl fgets
cmp x0, 0
beq .L39
ldrsw x1, [sp, 48]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x2, x0, 72
ldrsw x1, [sp, 48]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x3, x0, 31
ldrsw x1, [sp, 48]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x4, x0, 5
ldrsw x1, [sp, 48]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x5, x0, 4
ldrsw x1, [sp, 48]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x6, x0, 57
ldrsw x1, [sp, 48]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x8, sp, 64
mov x7, x0
adrp x0, .LC33
add x1, x0, :lo12:.LC33
mov x0, x8
bl __isoc99_sscanf
str w0, [sp, 52]
ldr w0, [sp, 52]
cmp w0, 5
bne .L40
ldrsw x1, [sp, 48]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x3, x0, 57
ldrsw x1, [sp, 48]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
mov x2, x0
adrp x0, .LC34
add x1, x0, :lo12:.LC34
mov x0, x3
bl __isoc99_sscanf
ldrsw x1, [sp, 48]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 40]
add x0, x0, x1
add x0, x0, 57
strb wzr, [x0]
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L40:
ldr w0, [sp, 52]
cmp w0, 6
bne .L41
mov w0, 1
str w0, [sp, 60]
str wzr, [sp, 56]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
ldr x0, [sp, 24]
add x0, x0, 12
ldr w0, [x0]
cmp w0, 3
beq .L42
cmp w0, 3
bgt .L39
cmp w0, 1
beq .L44
cmp w0, 2
beq .L45
b .L39
.L44:
ldr x0, [sp, 24]
ldr w0, [x0]
add w1, w0, 1
ldr x0, [sp, 24]
str w1, [x0]
b .L39
.L45:
ldr x0, [sp, 24]
add x0, x0, 4
ldr w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 4
add w1, w1, 1
str w1, [x0]
b .L39
.L42:
ldr x0, [sp, 24]
add x0, x0, 8
ldr w1, [x0]
ldr x0, [sp, 24]
add x0, x0, 8
add w1, w1, 1
str w1, [x0]
nop
b .L39
.L41:
ldr w0, [sp, 60]
cmp w0, 0
beq .L39
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L39:
ldr w0, [sp, 56]
cmp w0, 1
ble .L46
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 .L47
bl __stack_chk_fail
.L47:
ldp x29, x30, [sp], 192
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size students, .-students
.section .rodata
.align 3
.LC35:
.string "Escriba un n\303\272mero de c\303\251dula, A BB CCCC DDDDD: "
.align 3
.LC36:
.string " %[^\n]"
.align 3
.LC37:
.string "%1d %1[0PE]%1[0PE] %1d%1d%1d%1d %1d%1d%1d%1d%1d\n"
.align 3
.LC38:
.string "%d %c%c %d%d%d%d% d%d%d%d%d"
.align 3
.LC39:
.string "Escriba un n\303\272mero de carrera, 1-2-5: "
.align 3
.LC40:
.string " %d"
.align 3
.LC41:
.string "\nCodigo de carrera incorrecto"
.align 3
.LC42:
.string "Cedula escrita incorrectamente"
.text
.align 2
.global readData
.type readData, %function
readData:
.LFB11:
.cfi_startproc
sub sp, sp, #160
.cfi_def_cfa_offset 160
stp x29, x30, [sp, 48]
.cfi_offset 29, -112
.cfi_offset 30, -104
add x29, sp, 48
str x0, [sp, 72]
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 w0, 1
str w0, [sp, 88]
b .L49
.L55:
adrp x0, .LC35
add x0, x0, :lo12:.LC35
bl printf
ldr x1, [sp, 72]
adrp x0, .LC36
add x0, x0, :lo12:.LC36
bl __isoc99_scanf
ldr x0, [sp, 72]
cmp x0, 0
beq .L49
add x0, sp, 96
add x6, x0, 16
add x0, sp, 96
add x5, x0, 12
add x0, sp, 96
add x4, x0, 8
add x0, sp, 96
add x3, x0, 45
add x0, sp, 96
add x2, x0, 44
add x1, sp, 96
add x0, sp, 96
add x0, x0, 40
str x0, [sp, 40]
add x0, sp, 96
add x0, x0, 36
str x0, [sp, 32]
add x0, sp, 96
add x0, x0, 32
str x0, [sp, 24]
add x0, sp, 96
add x0, x0, 28
str x0, [sp, 16]
add x0, sp, 96
add x0, x0, 24
str x0, [sp, 8]
add x0, sp, 96
add x0, x0, 20
str x0, [sp]
mov x7, x6
mov x6, x5
mov x5, x4
mov x4, x3
mov x3, x2
mov x2, x1
adrp x0, .LC37
add x1, x0, :lo12:.LC37
ldr x0, [sp, 72]
bl __isoc99_sscanf
str w0, [sp, 92]
ldr w0, [sp, 92]
cmp w0, 12
bne .L50
b .L51
.L54:
ldr w8, [sp, 96]
ldrb w0, [sp, 140]
mov w10, w0
ldrb w0, [sp, 141]
mov w11, w0
ldr w9, [sp, 104]
ldr w6, [sp, 108]
ldr w7, [sp, 112]
ldr w0, [sp, 116]
ldr w1, [sp, 120]
ldr w2, [sp, 124]
ldr w3, [sp, 128]
ldr w4, [sp, 132]
ldr w5, [sp, 136]
str w5, [sp, 40]
str w4, [sp, 32]
str w3, [sp, 24]
str w2, [sp, 16]
str w1, [sp, 8]
str w0, [sp]
mov w5, w9
mov w4, w11
mov w3, w10
mov w2, w8
adrp x0, .LC38
add x1, x0, :lo12:.LC38
ldr x0, [sp, 72]
bl sprintf
adrp x0, .LC39
add x0, x0, :lo12:.LC39
bl printf
add x0, sp, 144
mov x1, x0
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl __isoc99_scanf
add x0, sp, 84
add x3, sp, 144
mov x2, x0
adrp x0, .LC40
add x1, x0, :lo12:.LC40
mov x0, x3
bl __isoc99_sscanf
cmp w0, 1
bne .L52
ldr w0, [sp, 84]
cmp w0, 1
beq .L53
ldr w0, [sp, 84]
cmp w0, 2
beq .L53
ldr w0, [sp, 84]
cmp w0, 5
bne .L51
.L53:
str wzr, [sp, 88]
b .L51
.L52:
adrp x0, .LC41
add x0, x0, :lo12:.LC41
bl puts
.L51:
ldr w0, [sp, 88]
cmp w0, 0
bne .L54
b .L49
.L50:
adrp x0, .LC42
add x0, x0, :lo12:.LC42
bl puts
.L49:
ldr w0, [sp, 88]
cmp w0, 0
bne .L55
ldr w0, [sp, 84]
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 .L57
bl __stack_chk_fail
.L57:
mov w0, w1
ldp x29, x30, [sp, 48]
add sp, sp, 160
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size readData, .-readData
.section .rodata
.align 3
.LC43:
.string "Cantidad de datos incorrecta, Archivo Corrupto"
.text
.align 2
.global searchData
.type searchData, %function
searchData:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -224]!
.cfi_def_cfa_offset 224
.cfi_offset 29, -224
.cfi_offset 30, -216
mov x29, sp
str w0, [sp, 44]
str x1, [sp, 32]
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, 216]
mov x1, 0
str wzr, [sp, 68]
mov w0, -1
str w0, [sp, 72]
str wzr, [sp, 76]
adrp x0, .LC6
add x1, x0, :lo12:.LC6
ldr x0, [sp, 24]
bl fopen
str x0, [sp, 88]
ldr x0, [sp, 88]
cmp x0, 0
beq .L59
str wzr, [sp, 60]
b .L60
.L63:
add x0, sp, 96
ldr x2, [sp, 88]
mov w1, 120
bl fgets
cmp x0, 0
beq .L61
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x2, x0, 72
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x3, x0, 31
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x4, x0, 5
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x5, x0, 4
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x6, x0, 57
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x8, sp, 96
mov x7, x0
adrp x0, .LC33
add x1, x0, :lo12:.LC33
mov x0, x8
bl __isoc99_sscanf
str w0, [sp, 64]
ldr w0, [sp, 64]
cmp w0, 5
bne .L62
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x3, x0, 57
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
mov x2, x0
adrp x0, .LC34
add x1, x0, :lo12:.LC34
mov x0, x3
bl __isoc99_sscanf
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x0, x0, 57
strb wzr, [x0]
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L62:
ldr w0, [sp, 64]
cmp w0, 6
bne .L61
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L61:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L60:
ldr w1, [sp, 60]
ldr w0, [sp, 44]
cmp w1, w0
blt .L63
ldr x0, [sp, 88]
bl fclose
.L59:
ldrsw x1, [sp, 68]
adrp x0, struct_cmp
add x3, x0, :lo12:struct_cmp
mov x2, 88
ldr x0, [sp, 16]
bl qsort
ldr w0, [sp, 68]
cmp w0, 35
beq .L64
ldr w0, [sp, 68]
cmp w0, 154
beq .L64
ldr w0, [sp, 68]
cmp w0, 93
bne .L65
.L64:
ldr w0, [sp, 44]
lsr w1, w0, 31
add w0, w1, w0
asr w0, w0, 1
str w0, [sp, 60]
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x0, x0, 72
mov x1, x0
ldr x0, [sp, 32]
bl strcmp
str w0, [sp, 84]
mov w0, 1
str w0, [sp, 80]
ldr w0, [sp, 84]
cmp w0, 0
bne .L66
str wzr, [sp, 80]
ldr w0, [sp, 60]
str w0, [sp, 72]
b .L69
.L66:
ldr w0, [sp, 84]
cmp w0, 0
ble .L68
ldr w0, [sp, 44]
str w0, [sp, 76]
b .L69
.L68:
ldr w0, [sp, 84]
cmp w0, 0
bge .L69
str wzr, [sp, 76]
b .L69
.L74:
ldrsw x1, [sp, 60]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x0, x0, 72
ldr x1, [sp, 32]
bl strcmp
cmp w0, 0
bne .L70
ldr w0, [sp, 60]
str w0, [sp, 72]
str wzr, [sp, 80]
b .L69
.L70:
ldr w0, [sp, 76]
cmp w0, 0
bne .L71
ldr w1, [sp, 60]
ldr w0, [sp, 76]
cmp w1, w0
ble .L72
ldr w0, [sp, 60]
sub w0, w0, #1
str w0, [sp, 60]
b .L69
.L72:
str wzr, [sp, 80]
b .L69
.L71:
ldr w0, [sp, 76]
sub w0, w0, #1
ldr w1, [sp, 60]
cmp w1, w0
bge .L73
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
b .L69
.L73:
str wzr, [sp, 80]
.L69:
ldr w0, [sp, 80]
cmp w0, 0
bne .L74
b .L75
.L65:
adrp x0, .LC43
add x0, x0, :lo12:.LC43
bl puts
.L75:
ldr w0, [sp, 72]
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 216]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L77
bl __stack_chk_fail
.L77:
mov w0, w1
ldp x29, x30, [sp], 224
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size searchData, .-searchData
.section .rodata
.align 3
.LC44:
.string "\nCedula Apellido Nombre Sexo Turno A\303\261o"
.align 3
.LC45:
.string "%15s %20s %20s %1c %-10s %4d\n"
.text
.align 2
.global showData
.type showData, %function
showData:
.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 w0, [sp, 28]
str x1, [sp, 16]
adrp x0, .LC44
add x0, x0, :lo12:.LC44
bl puts
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x7, x0, 72
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x2, x0, 31
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x3, x0, 5
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
ldrb w0, [x0, 4]
mov w8, w0
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
add x4, x0, 57
ldrsw x1, [sp, 28]
mov x0, x1
lsl x0, x0, 1
add x0, x0, x1
lsl x0, x0, 2
sub x0, x0, x1
lsl x0, x0, 3
mov x1, x0
ldr x0, [sp, 16]
add x0, x0, x1
ldr w0, [x0]
mov w6, w0
mov x5, x4
mov w4, w8
mov x1, x7
adrp x0, .LC45
add x0, x0, :lo12:.LC45
bl printf
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size showData, .-showData
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global Global
.section .data.rel.local,"aw"
.align 3
.type Global, %object
.size Global, 8
Global:
.xword main+2147483647
.section .rodata
.align 3
.LC0:
.string "Global = 0x%lx\n"
.align 3
.LC1:
.string "Local = 0x%lx\n"
.align 3
.LC2:
.string "Local2 = 0x%lx\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
str w0, [sp, 28]
str x1, [sp, 16]
adrp x0, main
add x1, x0, :lo12:main
mov x0, 2147483647
add x0, x1, x0
str x0, [sp, 32]
adrp x0, main+2147483647
add x0, x0, :lo12:main+2147483647
str x0, [sp, 40]
adrp x0, Global
add x0, x0, :lo12:Global
ldr x0, [x0]
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
ldr x1, [sp, 32]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr x1, [sp, 40]
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
mov w0, 0
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
.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
.global dflag
.bss
.align 2
.type dflag, %object
.size dflag, 4
dflag:
.zero 4
.section .rodata
.align 3
.LC0:
.string "hdp:t:"
.text
.align 2
.global main
.type main, %function
main:
.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 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
str xzr, [sp, 56]
mov w0, 1234
str w0, [sp, 44]
mov w0, 100
str w0, [sp, 48]
ldr x0, [sp, 16]
ldr x0, [x0]
mov w1, 47
bl strrchr
str x0, [sp, 64]
ldr x0, [sp, 64]
cmp x0, 0
beq .L2
ldr x0, [sp, 64]
add x0, x0, 1
str x0, [sp, 64]
b .L4
.L2:
ldr x0, [sp, 16]
ldr x0, [x0]
str x0, [sp, 64]
b .L4
.L10:
ldr w0, [sp, 52]
cmp w0, 116
beq .L5
ldr w0, [sp, 52]
cmp w0, 116
bgt .L6
ldr w0, [sp, 52]
cmp w0, 112
beq .L7
ldr w0, [sp, 52]
cmp w0, 112
bgt .L6
ldr w0, [sp, 52]
cmp w0, 100
beq .L8
ldr w0, [sp, 52]
cmp w0, 104
bne .L6
ldr x0, [sp, 64]
bl usage
mov w0, 0
b .L14
.L8:
adrp x0, dflag
add x0, x0, :lo12:dflag
ldr w0, [x0]
add w1, w0, 1
adrp x0, dflag
add x0, x0, :lo12:dflag
str w1, [x0]
b .L4
.L7:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
bl atoi
str w0, [sp, 44]
b .L4
.L5:
adrp x0, :got:optarg
ldr x0, [x0, #:got_lo12:optarg]
ldr x0, [x0]
bl atoi
str w0, [sp, 48]
b .L4
.L6:
ldr x0, [sp, 64]
bl usage
mov w0, 1
b .L14
.L4:
adrp x0, .LC0
add x2, x0, :lo12:.LC0
ldr x1, [sp, 16]
ldr w0, [sp, 28]
bl getopt
str w0, [sp, 52]
ldr w0, [sp, 52]
cmn w0, #1
bne .L10
adrp x0, :got:optind
ldr x0, [x0, #:got_lo12:optind]
ldr w0, [x0]
ldr w1, [sp, 28]
sub w0, w1, w0
str w0, [sp, 28]
adrp x0, :got:optind
ldr x0, [x0, #:got_lo12:optind]
ldr w0, [x0]
sxtw x0, w0
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
str x0, [sp, 16]
ldr w0, [sp, 28]
cmp w0, 0
bgt .L11
ldr x0, [sp, 64]
bl usage
mov w0, 1
b .L14
.L11:
ldr x0, [sp, 16]
ldr x0, [x0]
add x1, sp, 72
bl read_ip
cmp w0, 0
beq .L12
ldr x0, [sp, 64]
bl usage
mov w0, 1
b .L14
.L12:
ldr w0, [sp, 28]
cmp w0, 1
ble .L13
ldr x0, [sp, 16]
ldr x0, [x0, 8]
str x0, [sp, 56]
.L13:
add x0, sp, 72
ldr w3, [sp, 48]
ldr w2, [sp, 44]
ldr x1, [sp, 56]
bl find_host
mov w0, 0
.L14:
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 .L15
bl __stack_chk_fail
.L15:
mov w0, w1
ldp x29, x30, [sp], 112
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC1:
.string "usage: %s [-d] [-p <port>] [-t <timeout>] <ip_range> [hostname]\n"
.align 3
.LC2:
.string " If hostname is supplied, print on which IP it resides."
.align 3
.LC3:
.string " Otherwise print all hosts found in the range."
.text
.align 2
.global usage
.type usage, %function
usage:
.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 x1, [sp, 24]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl puts
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
nop
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size usage, .-usage
.align 2
.global dbgprintf
.type dbgprintf, %function
dbgprintf:
.LFB8:
.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
adrp x0, dflag
add x0, x0, :lo12:dflag
ldr w0, [x0]
cmp w0, 0
bne .L18
mov w0, 0
b .L20
.L18:
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]
add x0, sp, 16
add x1, sp, 72
ldp q0, q1, [x1]
stp q0, q1, [x0]
add x0, sp, 16
mov x1, x0
ldr x0, [sp, 56]
bl vprintf
str w0, [sp, 68]
ldr w0, [sp, 68]
.L20:
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 .L21
bl __stack_chk_fail
.L21:
mov w0, w1
ldp x29, x30, [sp], 304
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size dbgprintf, .-dbgprintf
.section .rodata
.align 3
.LC4:
.string "."
.text
.align 2
.global read_ip
.type read_ip, %function
read_ip:
.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 x1, [sp, 16]
str wzr, [sp, 36]
b .L23
.L24:
ldrsw x0, [sp, 36]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
mov w1, 1
str w1, [x0]
ldrsw x0, [sp, 36]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
mov w1, 254
str w1, [x0, 4]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L23:
ldr w0, [sp, 36]
cmp w0, 3
ble .L24
adrp x0, .LC4
add x1, x0, :lo12:.LC4
ldr x0, [sp, 24]
bl strtok
str x0, [sp, 40]
str wzr, [sp, 36]
b .L25
.L29:
ldrsw x0, [sp, 36]
lsl x0, x0, 3
ldr x1, [sp, 16]
add x0, x1, x0
mov x1, x0
ldr x0, [sp, 40]
bl read_range
cmp w0, 0
beq .L26
mov w0, -1
b .L27
.L26:
adrp x0, .LC4
add x1, x0, :lo12:.LC4
mov x0, 0
bl strtok
str x0, [sp, 40]
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L25:
ldr x0, [sp, 40]
cmp x0, 0
beq .L28
ldr w0, [sp, 36]
cmp w0, 3
ble .L29
.L28:
mov w0, 0
.L27:
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size read_ip, .-read_ip
.section .rodata
.align 3
.LC5:
.string "*"
.align 3
.LC6:
.string "%d-%d"
.align 3
.LC7:
.string "%d"
.text
.align 2
.global read_range
.type read_range, %function
read_range:
.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, .LC5
add x1, x0, :lo12:.LC5
ldr x0, [sp, 24]
bl strcmp
cmp w0, 0
bne .L31
ldr x0, [sp, 16]
mov w1, 1
str w1, [x0]
ldr x0, [sp, 16]
mov w1, 254
str w1, [x0, 4]
mov w0, 0
b .L32
.L31:
ldr x1, [sp, 16]
ldr x0, [sp, 16]
add x0, x0, 4
mov x3, x0
mov x2, x1
adrp x0, .LC6
add x1, x0, :lo12:.LC6
ldr x0, [sp, 24]
bl __isoc99_sscanf
cmp w0, 2
bne .L33
mov w0, 0
b .L32
.L33:
ldr x0, [sp, 16]
mov x2, x0
adrp x0, .LC7
add x1, x0, :lo12:.LC7
ldr x0, [sp, 24]
bl __isoc99_sscanf
cmp w0, 1
bne .L34
ldr x0, [sp, 16]
ldr w1, [x0]
ldr x0, [sp, 16]
str w1, [x0, 4]
mov w0, 0
b .L32
.L34:
mov w0, -1
.L32:
ldp x29, x30, [sp], 32
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE10:
.size read_range, .-read_range
.section .rodata
.align 3
.LC8:
.string "performing search on ip range "
.align 3
.LC9:
.string "\n"
.align 3
.LC10:
.string "scanning %d.%d.%d.%d\n"
.align 3
.LC11:
.string "failed to get hostname\n"
.align 3
.LC12:
.string "%d.%d.%d.%d %s\n"
.text
.align 2
.global find_host
.type find_host, %function
find_host:
.LFB11:
.cfi_startproc
stp x29, x30, [sp, -336]!
.cfi_def_cfa_offset 336
.cfi_offset 29, -336
.cfi_offset 30, -328
mov x29, sp
str x0, [sp, 40]
str x1, [sp, 32]
str w2, [sp, 28]
str w3, [sp, 24]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 328]
mov x1, 0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl dbgprintf
str wzr, [sp, 68]
b .L36
.L38:
ldr w0, [sp, 68]
cmp w0, 0
ble .L37
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl dbgprintf
.L37:
ldrsw x0, [sp, 68]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldr w3, [x0]
ldrsw x0, [sp, 68]
lsl x0, x0, 3
ldr x1, [sp, 40]
add x0, x1, x0
ldr w0, [x0, 4]
mov w2, w0
mov w1, w3
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl dbgprintf
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L36:
ldr w0, [sp, 68]
cmp w0, 3
ble .L38
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl dbgprintf
ldr x0, [sp, 40]
ldr w0, [x0]
str w0, [sp, 52]
b .L39
.L49:
ldr x0, [sp, 40]
add x0, x0, 8
ldr w0, [x0]
str w0, [sp, 56]
b .L40
.L48:
ldr x0, [sp, 40]
add x0, x0, 16
ldr w0, [x0]
str w0, [sp, 60]
b .L41
.L47:
ldr x0, [sp, 40]
add x0, x0, 24
ldr w0, [x0]
str w0, [sp, 64]
b .L42
.L46:
ldr w4, [sp, 64]
ldr w3, [sp, 60]
ldr w2, [sp, 56]
ldr w1, [sp, 52]
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl dbgprintf
ldr w0, [sp, 52]
lsl w0, w0, 8
and w1, w0, 65535
ldr w0, [sp, 56]
and w0, w0, 255
orr w0, w1, w0
lsl w1, w0, 8
ldr w0, [sp, 60]
and w0, w0, 255
orr w0, w1, w0
lsl w1, w0, 8
ldr w0, [sp, 64]
and w0, w0, 255
orr w0, w1, w0
add x1, sp, 72
mov x4, 256
mov x3, x1
ldr w2, [sp, 24]
ldr w1, [sp, 28]
bl get_remote_hostname
cmp x0, 0
bne .L43
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl dbgprintf
b .L44
.L43:
ldr x0, [sp, 32]
cmp x0, 0
bne .L45
add x0, sp, 72
mov x5, x0
ldr w4, [sp, 64]
ldr w3, [sp, 60]
ldr w2, [sp, 56]
ldr w1, [sp, 52]
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
b .L44
.L45:
add x0, sp, 72
ldr x1, [sp, 32]
bl strcmp
cmp w0, 0
bne .L44
add x0, sp, 72
mov x5, x0
ldr w4, [sp, 64]
ldr w3, [sp, 60]
ldr w2, [sp, 56]
ldr w1, [sp, 52]
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
mov w0, 0
bl exit
.L44:
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L42:
ldr x0, [sp, 40]
add x0, x0, 24
ldr w0, [x0, 4]
ldr w1, [sp, 64]
cmp w1, w0
ble .L46
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L41:
ldr x0, [sp, 40]
add x0, x0, 16
ldr w0, [x0, 4]
ldr w1, [sp, 60]
cmp w1, w0
ble .L47
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L40:
ldr x0, [sp, 40]
add x0, x0, 8
ldr w0, [x0, 4]
ldr w1, [sp, 56]
cmp w1, w0
ble .L48
ldr w0, [sp, 52]
add w0, w0, 1
str w0, [sp, 52]
.L39:
ldr x0, [sp, 40]
ldr w0, [x0, 4]
ldr w1, [sp, 52]
cmp w1, w0
ble .L49
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 328]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L50
bl __stack_chk_fail
.L50:
ldp x29, x30, [sp], 336
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE11:
.size find_host, .-find_host
.section .rodata
.align 3
.LC13:
.string "socket"
.align 3
.LC14:
.string "setting non-blocking mode on socket\n"
.align 3
.LC15:
.string "calling connect...\n"
.align 3
.LC16:
.string "select(2)...\n"
.align 3
.LC17:
.string "select"
.align 3
.LC18:
.string "select(2) returned\n"
.align 3
.LC19:
.string "reading the hostname... "
.align 3
.LC20:
.string "read(2) failed, the socket wasn't successfully connected\n"
.text
.align 2
.global get_remote_hostname
.type get_remote_hostname, %function
get_remote_hostname:
.LFB12:
.cfi_startproc
stp x29, x30, [sp, -240]!
.cfi_def_cfa_offset 240
.cfi_offset 29, -240
.cfi_offset 30, -232
mov x29, sp
str w0, [sp, 44]
str w1, [sp, 40]
str w2, [sp, 36]
str x3, [sp, 24]
str x4, [sp, 16]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 232]
mov x1, 0
mov w2, 0
mov w1, 1
mov w0, 2
bl socket
str w0, [sp, 52]
ldr w0, [sp, 52]
cmn w0, #1
bne .L52
adrp x0, .LC13
add x1, x0, :lo12:.LC13
mov w0, 1
bl err
.L52:
add x0, sp, 88
stp xzr, xzr, [x0]
mov w0, 2
strh w0, [sp, 88]
ldr w0, [sp, 40]
and w0, w0, 65535
bl htons
and w0, w0, 65535
strh w0, [sp, 90]
ldr w0, [sp, 44]
bl htonl
str w0, [sp, 92]
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl dbgprintf
mov w1, 1
ldr w0, [sp, 52]
bl set_nonblock_mode
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl dbgprintf
add x0, sp, 88
mov w2, 16
mov x1, x0
ldr w0, [sp, 52]
bl connect
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl dbgprintf
add x0, sp, 104
str x0, [sp, 56]
str wzr, [sp, 48]
b .L53
.L54:
ldr x0, [sp, 56]
ldr w1, [sp, 48]
str xzr, [x0, x1, lsl 3]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L53:
ldr w0, [sp, 48]
cmp w0, 15
bls .L54
ldr w0, [sp, 52]
add w1, w0, 63
cmp w0, 0
csel w0, w1, w0, lt
asr w0, w0, 6
mov w3, w0
sxtw x0, w3
lsl x0, x0, 3
add x1, sp, 104
ldr x0, [x1, x0]
ldr w1, [sp, 52]
and w1, w1, 63
mov x2, 1
lsl x1, x2, x1
orr x2, x0, x1
sxtw x0, w3
lsl x0, x0, 3
add x1, sp, 104
str x2, [x1, x0]
ldr w0, [sp, 36]
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
sxtw x0, w0
str x0, [sp, 72]
ldr w1, [sp, 36]
mov w0, 19923
movk w0, 0x1062, lsl 16
smull x0, w1, w0
lsr x0, x0, 32
asr w2, w0, 6
asr w0, w1, 31
sub w0, w2, w0
mov w2, 1000
mul w0, w0, w2
sub w0, w1, w0
mov w1, 1000
mul w0, w0, w1
sxtw x0, w0
str x0, [sp, 80]
add x3, sp, 72
add x2, sp, 104
add x1, sp, 104
add x0, sp, 104
mov x4, x3
mov x3, x2
mov x2, x1
mov x1, x0
mov w0, 1
bl select
cmp w0, 0
beq .L55
adrp x0, .LC17
add x1, x0, :lo12:.LC17
mov w0, 1
bl err
.L55:
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl dbgprintf
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl dbgprintf
ldr x0, [sp, 16]
sub x0, x0, #1
mov x2, x0
ldr x1, [sp, 24]
ldr w0, [sp, 52]
bl read
str x0, [sp, 64]
ldr w0, [sp, 52]
bl close
ldr x0, [sp, 64]
cmn x0, #1
bne .L56
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl dbgprintf
mov x0, 0
b .L58
.L56:
ldr x0, [sp, 64]
ldr x1, [sp, 24]
add x0, x1, x0
strb wzr, [x0]
ldr x0, [sp, 24]
.L58:
mov x1, x0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 232]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L59
bl __stack_chk_fail
.L59:
mov x0, x1
ldp x29, x30, [sp], 240
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE12:
.size get_remote_hostname, .-get_remote_hostname
.section .rodata
.align 3
.LC21:
.string "fcntl"
.text
.align 2
.global set_nonblock_mode
.type set_nonblock_mode, %function
set_nonblock_mode:
.LFB13:
.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 w1, [sp, 24]
mov w1, 3
ldr w0, [sp, 28]
bl fcntl
sxtw x0, w0
str x0, [sp, 40]
ldr x0, [sp, 40]
cmn x0, #1
bne .L61
adrp x0, .LC21
add x1, x0, :lo12:.LC21
mov w0, 1
bl err
.L61:
ldr w0, [sp, 24]
cmp w0, 0
beq .L62
ldr x0, [sp, 40]
orr x0, x0, 2048
str x0, [sp, 40]
b .L63
.L62:
ldr x0, [sp, 40]
and x0, x0, -2049
str x0, [sp, 40]
.L63:
ldr x2, [sp, 40]
mov w1, 4
ldr w0, [sp, 28]
bl fcntl
cmp w0, 0
beq .L65
adrp x0, .LC21
add x1, x0, :lo12:.LC21
mov w0, 1
bl err
.L65:
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE13:
.size set_nonblock_mode, .-set_nonblock_mode
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global fputs
.type fputs, %function
fputs:
.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 w1, [sp, 20]
str wzr, [sp, 40]
b .L2
.L3:
ldr w0, [sp, 44]
and w0, w0, 255
mov w1, w0
ldr w0, [sp, 20]
bl putc
str w0, [sp, 40]
.L2:
ldr x0, [sp, 24]
add x1, x0, 1
str x1, [sp, 24]
ldrb w0, [x0]
str w0, [sp, 44]
ldr w0, [sp, 44]
cmp w0, 0
bne .L3
ldr w0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size fputs, .-fputs
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "%s!\n"
.text
.align 2
.global bar
.type bar, %function
bar:
.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 x1, [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 bar, .-bar
.section .rodata
.align 3
.LC1:
.string "Hello world"
.text
.align 2
.global foo
.type foo, %function
foo:
.LFB1:
.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, .LC1
add x0, x0, :lo12:.LC1
bl bar
nop
ldp x29, x30, [sp], 16
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size foo, .-foo
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "creating parent"
.align 3
.LC1:
.string "Grandparent"
.align 3
.LC2:
.string "fork"
.align 3
.LC3:
.string "parent created, creating child"
.align 3
.LC4:
.string "Parent"
.align 3
.LC5:
.string "child created, waiting for parent to terminate"
.align 3
.LC6:
.string "Child"
.align 3
.LC7:
.string "parent PID = %ld"
.align 3
.LC8:
.string "terminating - and consequently becoming a zombie"
.align 3
.LC9:
.string "waiting for everything to be done"
.text
.align 2
.global main
.type main, %function
main:
.LFB6:
.cfi_startproc
mov x12, 8224
sub sp, sp, x12
.cfi_def_cfa_offset 8224
stp x29, x30, [sp]
.cfi_offset 29, -8224
.cfi_offset 30, -8216
mov x29, sp
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 8216]
mov x1, 0
adrp x0, .LC0
add x1, x0, :lo12:.LC0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl logInfo
bl fork
cmn w0, #1
beq .L2
cmp w0, 0
beq .L3
b .L11
.L2:
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl pexit
b .L5
.L3:
adrp x0, .LC3
add x1, x0, :lo12:.LC3
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl logInfo
bl fork
cmn w0, #1
beq .L6
cmp w0, 0
beq .L7
b .L12
.L6:
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl pexit
b .L9
.L7:
adrp x0, .LC5
add x1, x0, :lo12:.LC5
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl logInfo
mov w0, 2
bl sleep
bl getppid
sxtw x0, w0
add x4, sp, 24
mov x3, x0
adrp x0, .LC7
add x2, x0, :lo12:.LC7
mov x1, 8192
mov x0, x4
bl snprintf
add x0, sp, 24
mov x1, x0
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl logInfo
b .L9
.L12:
adrp x0, .LC8
add x1, x0, :lo12:.LC8
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl logInfo
mov w0, 0
bl exit
.L9:
b .L5
.L11:
adrp x0, .LC9
add x1, x0, :lo12:.LC9
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl logInfo
mov w0, 5
bl sleep
.L5:
mov w0, 0
bl exit
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 3
.LC10:
.string "[%s %ld] %s\n"
.align 3
.LC11:
.string "write"
.text
.align 2
.type logInfo, %function
logInfo:
.LFB7:
.cfi_startproc
mov x12, 8240
sub sp, sp, x12
.cfi_def_cfa_offset 8240
stp x29, x30, [sp]
.cfi_offset 29, -8240
.cfi_offset 30, -8232
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, 8232]
mov x1, 0
bl getpid
sxtw x0, w0
add x6, sp, 40
ldr x5, [sp, 16]
mov x4, x0
ldr x3, [sp, 24]
adrp x0, .LC10
add x2, x0, :lo12:.LC10
mov x1, 8192
mov x0, x6
bl snprintf
str w0, [sp, 36]
ldrsw x1, [sp, 36]
add x0, sp, 40
mov x2, x1
mov x1, x0
mov w0, 1
bl write
cmn x0, #1
bne .L16
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl pexit
.L16:
nop
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x2, [sp, 8232]
ldr x1, [x0]
subs x2, x2, x1
mov x1, 0
beq .L15
bl __stack_chk_fail
.L15:
ldp x29, x30, [sp]
mov x12, 8240
add sp, sp, x12
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size logInfo, .-logInfo
.align 2
.type pexit, %function
pexit:
.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]
ldr x0, [sp, 24]
bl perror
mov w0, 1
bl exit
.cfi_endproc
.LFE8:
.size pexit, .-pexit
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global __VERIFIER_assert
.type __VERIFIER_assert, %function
__VERIFIER_assert:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, 12]
ldr w0, [sp, 12]
cmp w0, 0
bne .L5
nop
.L3:
b .L3
.L5:
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size __VERIFIER_assert, .-__VERIFIER_assert
.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
fmov s0, 2.5e+0
str s0, [sp, 24]
fmov s0, 2.5e+0
str s0, [sp, 28]
ldr s1, [sp, 24]
ldr s0, [sp, 28]
fcmp s1, s0
cset w0, ne
and w0, w0, 255
bl __VERIFIER_assert
mov w0, 0
ldp x29, x30, [sp], 32
.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
.section .rodata
.align 3
.LC0:
.string "result: %s\n"
.text
.align 2
.global test
.type test, %function
test:
.LFB0:
.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, 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
str wzr, [sp, 44]
b .L2
.L8:
nop
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 .L8
ldr w0, [sp, 44]
cmp w0, 39
bgt .L9
add x0, sp, 48
ldr x1, [sp, 24]
bl strcpy
add x0, sp, 48
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
b .L1
.L9:
nop
.L1:
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 .L6
bl __stack_chk_fail
.L6:
ldp x29, x30, [sp], 96
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size test, .-test
.align 2
.global main
.type main, %function
main:
.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 w0, [sp, 28]
str x1, [sp, 16]
ldr w0, [sp, 28]
cmp w0, 1
ble .L11
ldr x0, [sp, 16]
ldr x0, [x0, 8]
str x0, [sp, 40]
ldr x0, [sp, 40]
bl test
.L11:
mov w0, 0
ldp x29, x30, [sp], 48
.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
.section .rodata
.align 3
.LC0:
.string "Sum is: %d\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
str w0, [sp, 44]
str x1, [sp, 32]
str wzr, [sp, 52]
ldr x0, [sp, 32]
ldr x0, [x0, 8]
str x0, [sp, 56]
str wzr, [sp, 48]
b .L2
.L3:
ldr w1, [sp, 52]
ldr w0, [sp, 48]
add w0, w1, w0
str w0, [sp, 52]
ldr w0, [sp, 48]
add w0, w0, 1
str w0, [sp, 48]
.L2:
ldr x0, [sp, 32]
add x0, x0, 8
ldr x0, [x0]
bl atoi
mov w1, w0
ldr w0, [sp, 48]
cmp w0, w1
blt .L3
ldr x19, [sp, 56]
b .L4
.L5:
ldrb w0, [x19]
mov w1, w0
ldr w0, [sp, 52]
add w0, w0, w1
str w0, [sp, 52]
add x19, x19, 1
.L4:
ldrb w0, [x19]
cmp w0, 0
bne .L5
ldr w1, [sp, 52]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
mov w0, 0
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
.section .rodata
.align 3
.LC0:
.string "127.0.0.1"
.align 3
.LC1:
.string "0x%x\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
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl inet_addr
str w0, [sp, 16]
ldr w0, [sp, 16]
mov w1, w0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w0, [sp, 16]
bl inet_ntoa
str x0, [sp, 24]
ldr x0, [sp, 24]
bl puts
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
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global strlcat
.type strlcat, %function
strlcat:
.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 x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
ldr x0, [sp, 40]
str x0, [sp, 48]
ldr x0, [sp, 32]
str x0, [sp, 56]
ldr x0, [sp, 24]
str x0, [sp, 64]
b .L2
.L4:
ldr x0, [sp, 48]
add x0, x0, 1
str x0, [sp, 48]
.L2:
ldr x0, [sp, 64]
sub x1, x0, #1
str x1, [sp, 64]
cmp x0, 0
beq .L3
ldr x0, [sp, 48]
ldrb w0, [x0]
cmp w0, 0
bne .L4
.L3:
ldr x1, [sp, 48]
ldr x0, [sp, 40]
sub x0, x1, x0
str x0, [sp, 72]
ldr x1, [sp, 24]
ldr x0, [sp, 72]
sub x0, x1, x0
str x0, [sp, 64]
ldr x0, [sp, 64]
cmp x0, 0
bne .L7
ldr x0, [sp, 56]
bl strlen
mov x1, x0
ldr x0, [sp, 72]
add x0, x1, x0
b .L6
.L9:
ldr x0, [sp, 64]
cmp x0, 1
beq .L8
ldr x0, [sp, 48]
add x1, x0, 1
str x1, [sp, 48]
ldr x1, [sp, 56]
ldrb w1, [x1]
strb w1, [x0]
ldr x0, [sp, 64]
sub x0, x0, #1
str x0, [sp, 64]
.L8:
ldr x0, [sp, 56]
add x0, x0, 1
str x0, [sp, 56]
.L7:
ldr x0, [sp, 56]
ldrb w0, [x0]
cmp w0, 0
bne .L9
ldr x0, [sp, 48]
strb wzr, [x0]
ldr x1, [sp, 56]
ldr x0, [sp, 32]
sub x0, x1, x0
mov x1, x0
ldr x0, [sp, 72]
add x0, x1, x0
.L6:
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size strlcat, .-strlcat
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global tester
.type tester, %function
tester:
.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]
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 x0, [sp, 24]
ldrb w0, [x0]
strb w0, [sp, 32]
ldr x0, [sp, 32]
ubfx x0, x0, 0, 4
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 .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 tester, .-tester
.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
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 24]
mov x1, 0
mov w0, 47
strb w0, [sp, 23]
add x0, sp, 23
bl tester
cmp w0, 15
beq .L5
bl abort
.L5:
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 .L7
bl __stack_chk_fail
.L7:
mov w0, w1
ldp x29, x30, [sp], 32
.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
.section .rodata
.align 3
.LC0:
.string "Visited %d \n"
.text
.align 2
.global DFS
.type DFS, %function
DFS:
.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 x0, [sp, 24]
str w1, [sp, 20]
ldr x0, [sp, 24]
ldr x1, [x0, 16]
ldrsw x0, [sp, 20]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 56]
ldr x0, [sp, 56]
str x0, [sp, 48]
ldr x0, [sp, 24]
ldr x1, [x0, 8]
ldrsw x0, [sp, 20]
lsl x0, x0, 2
add x0, x1, x0
mov w1, 1
str w1, [x0]
ldr w1, [sp, 20]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
b .L2
.L4:
ldr x0, [sp, 48]
ldr w0, [x0]
str w0, [sp, 44]
ldr x0, [sp, 24]
ldr x1, [x0, 8]
ldrsw x0, [sp, 44]
lsl x0, x0, 2
add x0, x1, x0
ldr w0, [x0]
cmp w0, 0
bne .L3
ldr w1, [sp, 44]
ldr x0, [sp, 24]
bl DFS
.L3:
ldr x0, [sp, 48]
ldr x0, [x0, 8]
str x0, [sp, 48]
.L2:
ldr x0, [sp, 48]
cmp x0, 0
bne .L4
nop
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size DFS, .-DFS
.align 2
.global createNode
.type createNode, %function
createNode:
.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 w0, [sp, 28]
mov x0, 16
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
ldr w1, [sp, 28]
str w1, [x0]
ldr x0, [sp, 40]
str xzr, [x0, 8]
ldr x0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size createNode, .-createNode
.align 2
.global createGraph
.type createGraph, %function
createGraph:
.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 w0, [sp, 28]
mov x0, 24
bl malloc
str x0, [sp, 40]
ldr x0, [sp, 40]
ldr w1, [sp, 28]
str w1, [x0]
ldrsw x0, [sp, 28]
lsl x0, x0, 3
bl malloc
mov x1, x0
ldr x0, [sp, 40]
str x1, [x0, 16]
ldrsw x0, [sp, 28]
lsl x0, x0, 2
bl malloc
mov x1, x0
ldr x0, [sp, 40]
str x1, [x0, 8]
str wzr, [sp, 36]
b .L8
.L9:
ldr x0, [sp, 40]
ldr x1, [x0, 16]
ldrsw x0, [sp, 36]
lsl x0, x0, 3
add x0, x1, x0
str xzr, [x0]
ldr x0, [sp, 40]
ldr x1, [x0, 8]
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]
.L8:
ldr w1, [sp, 36]
ldr w0, [sp, 28]
cmp w1, w0
blt .L9
ldr x0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size createGraph, .-createGraph
.align 2
.global addEdge
.type addEdge, %function
addEdge:
.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 w0, [sp, 16]
bl createNode
str x0, [sp, 40]
ldr x0, [sp, 24]
ldr x1, [x0, 16]
ldrsw x0, [sp, 20]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 40]
str x1, [x0, 8]
ldr x0, [sp, 24]
ldr x1, [x0, 16]
ldrsw x0, [sp, 20]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [sp, 40]
str x1, [x0]
ldr w0, [sp, 20]
bl createNode
str x0, [sp, 40]
ldr x0, [sp, 24]
ldr x1, [x0, 16]
ldrsw x0, [sp, 16]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [x0]
ldr x0, [sp, 40]
str x1, [x0, 8]
ldr x0, [sp, 24]
ldr x1, [x0, 16]
ldrsw x0, [sp, 16]
lsl x0, x0, 3
add x0, x1, x0
ldr x1, [sp, 40]
str x1, [x0]
nop
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE9:
.size addEdge, .-addEdge
.section .rodata
.align 3
.LC1:
.string "\n Adjacency list of vertex %d\n "
.align 3
.LC2:
.string "%d -> "
.text
.align 2
.global printGraph
.type printGraph, %function
printGraph:
.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, 36]
b .L13
.L16:
ldr x0, [sp, 24]
ldr x1, [x0, 16]
ldrsw x0, [sp, 36]
lsl x0, x0, 3
add x0, x1, x0
ldr x0, [x0]
str x0, [sp, 40]
ldr w1, [sp, 36]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
b .L14
.L15:
ldr x0, [sp, 40]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr x0, [sp, 40]
ldr x0, [x0, 8]
str x0, [sp, 40]
.L14:
ldr x0, [sp, 40]
cmp x0, 0
bne .L15
mov w0, 10
bl putchar
ldr w0, [sp, 36]
add w0, w0, 1
str w0, [sp, 36]
.L13:
ldr x0, [sp, 24]
ldr w0, [x0]
ldr w1, [sp, 36]
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
.LFE10:
.size printGraph, .-printGraph
.align 2
.global main
.type main, %function
main:
.LFB11:
.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, 4
bl createGraph
str x0, [sp, 24]
mov w2, 1
mov w1, 0
ldr x0, [sp, 24]
bl addEdge
mov w2, 2
mov w1, 0
ldr x0, [sp, 24]
bl addEdge
mov w2, 2
mov w1, 1
ldr x0, [sp, 24]
bl addEdge
mov w2, 3
mov w1, 2
ldr x0, [sp, 24]
bl addEdge
ldr x0, [sp, 24]
bl printGraph
mov w1, 2
ldr x0, [sp, 24]
bl DFS
mov w0, 0
ldp x29, x30, [sp], 32
.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
.section .rodata
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "X[%d] = %d\n"
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.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
str wzr, [sp, 16]
b .L2
.L4:
add x1, sp, 24
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x1, sp, 24
ldr w0, [x1, x0]
cmp w0, 0
bgt .L3
ldrsw x0, [sp, 16]
lsl x0, x0, 2
add x1, sp, 24
mov w2, 1
str w2, [x1, x0]
.L3:
ldr w0, [sp, 16]
add w0, w0, 1
str w0, [sp, 16]
.L2:
ldr w0, [sp, 16]
cmp w0, 9
ble .L4
str wzr, [sp, 20]
b .L5
.L6:
ldrsw x0, [sp, 20]
lsl x0, x0, 2
add x1, sp, 24
ldr w0, [x1, x0]
mov w2, w0
ldr w1, [sp, 20]
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl printf
ldr w0, [sp, 20]
add w0, w0, 1
str w0, [sp, 20]
.L5:
ldr w0, [sp, 20]
cmp w0, 9
ble .L6
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 .L8
bl __stack_chk_fail
.L8:
mov w0, w1
ldp x29, x30, [sp], 80
.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 TT_RPC_VERSION
.section .rodata
.align 2
.type TT_RPC_VERSION, %object
.size TT_RPC_VERSION, 4
TT_RPC_VERSION:
.word 4
.global TT_OFFER_RPC_VERSION
.align 2
.type TT_OFFER_RPC_VERSION, %object
.size TT_OFFER_RPC_VERSION, 4
TT_OFFER_RPC_VERSION:
.word 4
.global TT_XDR_VERSION
.align 2
.type TT_XDR_VERSION, %object
.size TT_XDR_VERSION, 4
TT_XDR_VERSION:
.word 3
.global TT_TYPESDB_DEFAULT_XDR_VERSION
.align 2
.type TT_TYPESDB_DEFAULT_XDR_VERSION, %object
.size TT_TYPESDB_DEFAULT_XDR_VERSION, 4
TT_TYPESDB_DEFAULT_XDR_VERSION:
.word 1
.global TT_CONTEXTS_XDR_VERSION
.align 2
.type TT_CONTEXTS_XDR_VERSION, %object
.size TT_CONTEXTS_XDR_VERSION, 4
TT_CONTEXTS_XDR_VERSION:
.word 3
.global TT_PUSH_ROTATE_XDR_VERSION
.align 2
.type TT_PUSH_ROTATE_XDR_VERSION, %object
.size TT_PUSH_ROTATE_XDR_VERSION, 4
TT_PUSH_ROTATE_XDR_VERSION:
.word 4
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global fscanint
.type fscanint, %function
fscanint:
.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 x19, [sp, 16]
.cfi_offset 19, -48
str x0, [sp, 40]
str x1, [sp, 32]
mov w0, 1
str w0, [sp, 60]
nop
.L2:
bl __ctype_b_loc
ldr x19, [x0]
ldr x0, [sp, 40]
bl getc
str w0, [sp, 56]
ldrsw x0, [sp, 56]
lsl x0, x0, 1
add x0, x19, x0
ldrh w0, [x0]
and w0, w0, 8192
cmp w0, 0
bne .L2
ldr w0, [sp, 56]
cmp w0, 45
beq .L3
ldr w0, [sp, 56]
cmp w0, 43
bne .L4
.L3:
ldr w0, [sp, 56]
cmp w0, 45
bne .L5
mov w0, -1
str w0, [sp, 60]
.L5:
ldr x0, [sp, 40]
bl getc
str w0, [sp, 56]
ldr w0, [sp, 56]
cmn w0, #1
bne .L4
ldr x1, [sp, 40]
ldr w0, [sp, 56]
bl ungetc
mov w0, 0
b .L6
.L4:
bl __ctype_b_loc
ldr x1, [x0]
ldrsw x0, [sp, 56]
lsl x0, x0, 1
add x0, x1, x0
ldrh w0, [x0]
and w0, w0, 2048
cmp w0, 0
bne .L7
ldr x1, [sp, 40]
ldr w0, [sp, 56]
bl ungetc
mov w0, 0
b .L6
.L7:
ldr w0, [sp, 56]
sub w0, w0, #48
str w0, [sp, 52]
b .L8
.L9:
ldr w1, [sp, 52]
mov w0, w1
lsl w0, w0, 2
add w0, w0, w1
lsl w0, w0, 1
mov w1, w0
ldr w0, [sp, 56]
sub w0, w0, #48
add w0, w1, w0
str w0, [sp, 52]
.L8:
bl __ctype_b_loc
ldr x19, [x0]
ldr x0, [sp, 40]
bl getc
str w0, [sp, 56]
ldrsw x0, [sp, 56]
lsl x0, x0, 1
add x0, x19, x0
ldrh w0, [x0]
and w0, w0, 2048
cmp w0, 0
bne .L9
ldr w1, [sp, 60]
ldr w0, [sp, 52]
mul w1, w1, w0
ldr x0, [sp, 32]
str w1, [x0]
mov w0, 1
.L6:
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
.LFE0:
.size fscanint, .-fscanint
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global wio_line
.bss
.align 3
.type wio_line, %object
.size wio_line, 81
wio_line:
.zero 81
.global WIO_EMULATE_VT
.type WIO_EMULATE_VT, %object
.size WIO_EMULATE_VT, 1
WIO_EMULATE_VT:
.zero 1
.global WIO_BACKSPACE_SUPPORT
.type WIO_BACKSPACE_SUPPORT, %object
.size WIO_BACKSPACE_SUPPORT, 1
WIO_BACKSPACE_SUPPORT:
.zero 1
.global wio_opr_int1
.align 2
.type wio_opr_int1, %object
.size wio_opr_int1, 4
wio_opr_int1:
.zero 4
.global wio_opr_int2
.align 2
.type wio_opr_int2, %object
.size wio_opr_int2, 4
wio_opr_int2:
.zero 4
.global wio_opr_char
.type wio_opr_char, %object
.size wio_opr_char, 1
wio_opr_char:
.zero 1
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global add
.type add, %function
add:
.LFB6:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, 12]
str w1, [sp, 8]
ldr w1, [sp, 12]
ldr w0, [sp, 8]
add w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 28]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size add, .-add
.align 2
.global multiply
.type multiply, %function
multiply:
.LFB7:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, 12]
str w1, [sp, 8]
ldr w1, [sp, 12]
ldr w0, [sp, 8]
mul w0, w1, w0
str w0, [sp, 28]
ldr w0, [sp, 28]
add sp, sp, 32
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size multiply, .-multiply
.section .rodata
.align 3
.LC0:
.string " Enter 2 numbers: "
.align 3
.LC1:
.string "%d %d"
.align 3
.LC2:
.string "\n Sum of %d and %d is %d"
.align 3
.LC3:
.string "\n Product of %d and %d is %d"
.text
.align 2
.global main
.type main, %function
main:
.LFB8:
.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
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 40]
mov x1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printf
add x1, sp, 36
add x0, sp, 32
mov x2, x1
mov x1, x0
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl __isoc99_scanf
ldr w19, [sp, 32]
ldr w20, [sp, 36]
ldr w0, [sp, 32]
ldr w1, [sp, 36]
bl add
mov w3, w0
mov w2, w20
mov w1, w19
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl printf
ldr w19, [sp, 32]
ldr w20, [sp, 36]
ldr w0, [sp, 32]
ldr w1, [sp, 36]
bl multiply
mov w3, w0
mov w2, w20
mov w1, w19
adrp x0, .LC3
add x0, x0, :lo12:.LC3
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 .L7
bl __stack_chk_fail
.L7:
mov w0, w1
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
.LFE8:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global line_num
.bss
.align 2
.type line_num, %object
.size line_num, 4
line_num:
.zero 4
.global request_data
.align 3
.type request_data, %object
.size request_data, 8
request_data:
.zero 8
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC1:
.string "rb"
.text
.align 2
.global read_buffer
.type read_buffer, %function
read_buffer:
.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 x0, [sp, 24]
str x1, [sp, 16]
adrp x0, .LC1
add x1, x0, :lo12:.LC1
ldr x0, [sp, 24]
bl fopen
str x0, [sp, 40]
ldr x0, [sp, 40]
cmp x0, 0
bne .L2
mov x0, 0
b .L3
.L2:
mov w2, 2
mov x1, 0
ldr x0, [sp, 40]
bl fseek
ldr x0, [sp, 40]
bl ftell
str x0, [sp, 48]
mov w2, 0
mov x1, 0
ldr x0, [sp, 40]
bl fseek
ldr x0, [sp, 48]
add x0, x0, 1
bl malloc
str x0, [sp, 56]
ldr x3, [sp, 40]
ldr x2, [sp, 48]
mov x1, 1
ldr x0, [sp, 56]
bl fread
ldr x1, [sp, 56]
ldr x0, [sp, 48]
add x0, x1, x0
strb wzr, [x0]
ldr x0, [sp, 16]
cmp x0, 0
beq .L4
ldr x0, [sp, 16]
ldr x1, [sp, 48]
str x1, [x0]
.L4:
ldr x0, [sp, 56]
.L3:
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size read_buffer, .-read_buffer
.section .rodata
.align 3
.LC2:
.string "w+"
.text
.align 2
.global write_buffer
.type write_buffer, %function
write_buffer:
.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 x0, [sp, 40]
str x1, [sp, 32]
str x2, [sp, 24]
adrp x0, .LC2
add x1, x0, :lo12:.LC2
ldr x0, [sp, 40]
bl fopen
str x0, [sp, 56]
ldr x0, [sp, 32]
cmp x0, 0
beq .L6
ldr x3, [sp, 56]
ldr x2, [sp, 24]
mov x1, 1
ldr x0, [sp, 32]
bl fwrite
.L6:
ldr x0, [sp, 56]
bl fclose
nop
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE7:
.size write_buffer, .-write_buffer
.section .rodata
.align 3
.LC3:
.string "error: call to 'clGetPlatformIDs' failed"
.align 3
.LC4:
.string "Number of platforms: %d\n"
.align 3
.LC5:
.string "platform=%p\n"
.align 3
.LC6:
.string "error: call to 'clGetPlatformInfo' failed"
.align 3
.LC7:
.string "platform.name='%s'\n\n"
.align 3
.LC8:
.string "error: call to 'clGetDeviceIDs' failed"
.align 3
.LC9:
.string "Number of devices: %d\n"
.align 3
.LC10:
.string "device=%p\n"
.align 3
.LC11:
.string "error: call to 'clGetDeviceInfo' failed"
.align 3
.LC12:
.string "device.name='%s'\n"
.align 3
.LC13:
.string "error: call to 'clCreateContext' failed"
.align 3
.LC14:
.string "context=%p\n"
.align 3
.LC15:
.string "error: call to 'clCreateCommandQueue' failed"
.align 3
.LC16:
.string "command_queue=%p\n"
.align 3
.LC17:
.string "error: No binary specified"
.align 3
.LC18:
.string "error: call to 'clCreateProgramWithBinary' failed"
.align 3
.LC19:
.string "error: Invalid binary for device"
.align 3
.LC20:
.string "program=%p\n"
.align 3
.LC21:
.string "program binary loaded"
.align 3
.LC22:
.string "error: call to 'clBuildProgram' failed:\n%s\n"
.align 3
.LC23:
.string "program built"
.align 3
.LC24:
.string "hypot_float8float8"
.align 3
.LC25:
.string "error: call to 'clCreateKernel' failed"
.align 3
.LC26:
.string "error: could not create source buffer"
.align 3
.LC27:
.string "error: call to 'clEnqueueWriteBuffer' failed"
.align 3
.LC28:
.string "error: could not create dst buffer"
.align 3
.LC29:
.string "error: call to 'clSetKernelArg' failed"
.align 3
.LC30:
.string "error: call to 'clEnqueueNDRangeKernel' failed"
.align 3
.LC31:
.string "error: call to 'clEnqueueReadBuffer' failed"
.align 3
.LC32:
.string "%s.result"
.align 3
.LC33:
.string "Result dumped to %s\n"
.align 3
.LC34:
.string "error: call to 'clReleaseMemObject' failed"
.align 3
.LC35:
.string "error: call to 'clReleaseKernel' failed"
.align 3
.LC36:
.string "error: call to 'clReleaseProgram' failed"
.align 3
.LC37:
.string "error: call to 'clReleaseCommandQueue' failed"
.align 3
.LC38:
.string "error: call to 'clReleaseContext' failed"
.text
.align 2
.global main
.type main, %function
main:
.LFB8:
.cfi_startproc
sub sp, sp, #592
.cfi_def_cfa_offset 592
stp x29, x30, [sp, 16]
.cfi_offset 29, -576
.cfi_offset 30, -568
add x29, sp, 16
str w0, [sp, 44]
str x1, [sp, 32]
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 584]
mov x1, 0
add x1, sp, 56
add x0, sp, 80
mov x2, x1
mov x1, x0
mov w0, 1
bl clGetPlatformIDs
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L8
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl puts
mov w0, 1
bl exit
.L8:
ldr w0, [sp, 56]
mov w1, w0
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl printf
ldr x0, [sp, 80]
mov x1, x0
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
ldr x0, [sp, 80]
add x1, sp, 272
mov x4, 0
mov x3, x1
mov x2, 100
mov w1, 2306
bl clGetPlatformInfo
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L9
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
mov w0, 1
bl exit
.L9:
add x0, sp, 272
mov x1, x0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
ldr x0, [sp, 80]
add x2, sp, 64
add x1, sp, 88
mov x4, x2
mov x3, x1
mov w2, 1
mov x1, 4
bl clGetDeviceIDs
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L10
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl puts
mov w0, 1
bl exit
.L10:
ldr w0, [sp, 64]
mov w1, w0
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl printf
ldr x0, [sp, 88]
mov x1, x0
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
ldr x0, [sp, 88]
add x1, sp, 376
mov x4, 0
mov x3, x1
mov x2, 100
mov w1, 4139
bl clGetDeviceInfo
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L11
adrp x0, .LC11
add x0, x0, :lo12:.LC11
bl puts
mov w0, 1
bl exit
.L11:
add x0, sp, 376
mov x1, x0
adrp x0, .LC12
add x0, x0, :lo12:.LC12
bl printf
mov w0, 10
bl putchar
add x1, sp, 60
add x0, sp, 88
mov x5, x1
mov x4, 0
mov x3, 0
mov x2, x0
mov w1, 1
mov x0, 0
bl clCreateContext
str x0, [sp, 152]
ldr w0, [sp, 60]
cmp w0, 0
beq .L12
adrp x0, .LC13
add x0, x0, :lo12:.LC13
bl puts
mov w0, 1
bl exit
.L12:
ldr x1, [sp, 152]
adrp x0, .LC14
add x0, x0, :lo12:.LC14
bl printf
ldr x0, [sp, 88]
add x1, sp, 60
mov x3, x1
mov x2, 0
mov x1, x0
ldr x0, [sp, 152]
bl clCreateCommandQueue
str x0, [sp, 160]
ldr w0, [sp, 60]
cmp w0, 0
beq .L13
adrp x0, .LC15
add x0, x0, :lo12:.LC15
bl puts
mov w0, 1
bl exit
.L13:
ldr x1, [sp, 160]
adrp x0, .LC16
add x0, x0, :lo12:.LC16
bl printf
mov w0, 10
bl putchar
ldr w0, [sp, 44]
cmp w0, 2
bne .L14
ldr x0, [sp, 32]
add x0, x0, 8
ldr x0, [x0]
add x1, sp, 104
bl read_buffer
str x0, [sp, 96]
add x4, sp, 60
add x3, sp, 68
add x2, sp, 96
add x1, sp, 104
add x0, sp, 88
mov x6, x4
mov x5, x3
mov x4, x2
mov x3, x1
mov x2, x0
mov w1, 1
ldr x0, [sp, 152]
bl clCreateProgramWithBinary
str x0, [sp, 168]
ldr w0, [sp, 60]
cmp w0, 0
beq .L16
b .L41
.L14:
adrp x0, .LC17
add x0, x0, :lo12:.LC17
bl puts
mov w0, 1
bl exit
.L41:
adrp x0, .LC18
add x0, x0, :lo12:.LC18
bl puts
mov w0, 1
bl exit
.L16:
ldr w0, [sp, 68]
cmp w0, 0
beq .L17
adrp x0, .LC19
add x0, x0, :lo12:.LC19
bl puts
mov w0, 1
bl exit
.L17:
ldr x1, [sp, 168]
adrp x0, .LC20
add x0, x0, :lo12:.LC20
bl printf
ldr x0, [sp, 96]
bl free
adrp x0, .LC21
add x0, x0, :lo12:.LC21
bl puts
mov w0, 10
bl putchar
add x0, sp, 88
mov x5, 0
mov x4, 0
mov x3, 0
mov x2, x0
mov w1, 1
ldr x0, [sp, 168]
bl clBuildProgram
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L18
ldr x0, [sp, 88]
add x1, sp, 144
mov x5, x1
mov x4, 0
mov x3, 0
mov w2, 4483
mov x1, x0
ldr x0, [sp, 168]
bl clGetProgramBuildInfo
ldr x0, [sp, 144]
bl malloc
str x0, [sp, 216]
ldr x0, [sp, 88]
ldr x1, [sp, 144]
mov x5, 0
ldr x4, [sp, 216]
mov x3, x1
mov w2, 4483
mov x1, x0
ldr x0, [sp, 168]
bl clGetProgramBuildInfo
ldr x1, [sp, 216]
adrp x0, .LC22
add x0, x0, :lo12:.LC22
bl printf
ldr x0, [sp, 216]
bl free
mov w0, 1
bl exit
.L18:
adrp x0, .LC23
add x0, x0, :lo12:.LC23
bl puts
mov w0, 10
bl putchar
add x0, sp, 60
mov x2, x0
adrp x0, .LC24
add x1, x0, :lo12:.LC24
ldr x0, [sp, 168]
bl clCreateKernel
str x0, [sp, 176]
ldr w0, [sp, 60]
cmp w0, 0
beq .L19
adrp x0, .LC25
add x0, x0, :lo12:.LC25
bl puts
mov w0, 1
bl exit
.L19:
mov x0, 10
str x0, [sp, 184]
ldr x0, [sp, 184]
lsl x0, x0, 5
bl malloc
str x0, [sp, 192]
str wzr, [sp, 72]
b .L20
.L21:
ldrsw x0, [sp, 72]
lsl x0, x0, 5
ldr x1, [sp, 192]
add x2, x1, x0
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov x0, x2
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
.L20:
ldrsw x0, [sp, 72]
ldr x1, [sp, 184]
cmp x1, x0
bhi .L21
ldr x0, [sp, 184]
lsl x0, x0, 5
add x1, sp, 60
mov x4, x1
mov x3, 0
mov x2, x0
mov x1, 4
ldr x0, [sp, 152]
bl clCreateBuffer
str x0, [sp, 112]
ldr w0, [sp, 60]
cmp w0, 0
beq .L22
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl puts
mov w0, 1
bl exit
.L22:
ldr x1, [sp, 112]
ldr x0, [sp, 184]
lsl x0, x0, 5
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 192]
mov x4, x0
mov x3, 0
mov w2, 1
ldr x0, [sp, 160]
bl clEnqueueWriteBuffer
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L23
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl puts
mov w0, 1
bl exit
.L23:
ldr x0, [sp, 184]
lsl x0, x0, 5
bl malloc
str x0, [sp, 200]
str wzr, [sp, 76]
b .L24
.L25:
ldrsw x0, [sp, 76]
lsl x0, x0, 5
ldr x1, [sp, 200]
add x2, x1, x0
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov x0, x2
ldp q0, q1, [x1]
stp q0, q1, [x0]
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L24:
ldrsw x0, [sp, 76]
ldr x1, [sp, 184]
cmp x1, x0
bhi .L25
ldr x0, [sp, 184]
lsl x0, x0, 5
add x1, sp, 60
mov x4, x1
mov x3, 0
mov x2, x0
mov x1, 4
ldr x0, [sp, 152]
bl clCreateBuffer
str x0, [sp, 120]
ldr w0, [sp, 60]
cmp w0, 0
beq .L26
adrp x0, .LC26
add x0, x0, :lo12:.LC26
bl puts
mov w0, 1
bl exit
.L26:
ldr x1, [sp, 120]
ldr x0, [sp, 184]
lsl x0, x0, 5
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 200]
mov x4, x0
mov x3, 0
mov w2, 1
ldr x0, [sp, 160]
bl clEnqueueWriteBuffer
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L27
adrp x0, .LC27
add x0, x0, :lo12:.LC27
bl puts
mov w0, 1
bl exit
.L27:
ldr x0, [sp, 184]
lsl x0, x0, 5
bl malloc
str x0, [sp, 208]
ldr x0, [sp, 184]
lsl x0, x0, 5
mov x2, x0
mov w1, 1
ldr x0, [sp, 208]
bl memset
ldr x0, [sp, 184]
lsl x0, x0, 5
add x1, sp, 60
mov x4, x1
mov x3, 0
mov x2, x0
mov x1, 2
ldr x0, [sp, 152]
bl clCreateBuffer
str x0, [sp, 128]
ldr w0, [sp, 60]
cmp w0, 0
beq .L28
adrp x0, .LC28
add x0, x0, :lo12:.LC28
bl puts
mov w0, 1
bl exit
.L28:
str wzr, [sp, 60]
add x0, sp, 112
mov x3, x0
mov x2, 8
mov w1, 0
ldr x0, [sp, 176]
bl clSetKernelArg
mov w1, w0
ldr w0, [sp, 60]
orr w0, w1, w0
str w0, [sp, 60]
add x0, sp, 120
mov x3, x0
mov x2, 8
mov w1, 1
ldr x0, [sp, 176]
bl clSetKernelArg
mov w1, w0
ldr w0, [sp, 60]
orr w0, w1, w0
str w0, [sp, 60]
add x0, sp, 128
mov x3, x0
mov x2, 8
mov w1, 2
ldr x0, [sp, 176]
bl clSetKernelArg
mov w1, w0
ldr w0, [sp, 60]
orr w0, w1, w0
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L29
adrp x0, .LC29
add x0, x0, :lo12:.LC29
bl puts
mov w0, 1
bl exit
.L29:
ldr x0, [sp, 184]
str x0, [sp, 136]
ldr x0, [sp, 184]
str x0, [sp, 144]
add x1, sp, 144
add x0, sp, 136
str xzr, [sp]
mov x7, 0
mov w6, 0
mov x5, x1
mov x4, x0
mov x3, 0
mov w2, 1
ldr x1, [sp, 176]
ldr x0, [sp, 160]
bl clEnqueueNDRangeKernel
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L30
adrp x0, .LC30
add x0, x0, :lo12:.LC30
bl puts
mov w0, 1
bl exit
.L30:
ldr x0, [sp, 160]
bl clFinish
ldr x1, [sp, 128]
ldr x0, [sp, 184]
lsl x0, x0, 5
str xzr, [sp]
mov x7, 0
mov w6, 0
ldr x5, [sp, 208]
mov x4, x0
mov x3, 0
mov w2, 1
ldr x0, [sp, 160]
bl clEnqueueReadBuffer
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L31
adrp x0, .LC31
add x0, x0, :lo12:.LC31
bl puts
mov w0, 1
bl exit
.L31:
ldr x0, [sp, 32]
ldr x0, [x0]
add x3, sp, 480
mov x2, x0
adrp x0, .LC32
add x1, x0, :lo12:.LC32
mov x0, x3
bl sprintf
ldr x0, [sp, 184]
lsl x1, x0, 5
add x0, sp, 480
mov x2, x1
ldr x1, [sp, 208]
bl write_buffer
add x0, sp, 480
mov x1, x0
adrp x0, .LC33
add x0, x0, :lo12:.LC33
bl printf
ldr x0, [sp, 208]
bl free
ldr x0, [sp, 128]
bl clReleaseMemObject
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L32
adrp x0, .LC34
add x0, x0, :lo12:.LC34
bl puts
mov w0, 1
bl exit
.L32:
ldr x0, [sp, 192]
bl free
ldr x0, [sp, 112]
bl clReleaseMemObject
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L33
adrp x0, .LC34
add x0, x0, :lo12:.LC34
bl puts
mov w0, 1
bl exit
.L33:
ldr x0, [sp, 200]
bl free
ldr x0, [sp, 120]
bl clReleaseMemObject
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L34
adrp x0, .LC34
add x0, x0, :lo12:.LC34
bl puts
mov w0, 1
bl exit
.L34:
ldr x0, [sp, 176]
bl clReleaseKernel
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L35
adrp x0, .LC35
add x0, x0, :lo12:.LC35
bl puts
mov w0, 1
bl exit
.L35:
ldr x0, [sp, 168]
bl clReleaseProgram
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L36
adrp x0, .LC36
add x0, x0, :lo12:.LC36
bl puts
mov w0, 1
bl exit
.L36:
ldr x0, [sp, 160]
bl clReleaseCommandQueue
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L37
adrp x0, .LC37
add x0, x0, :lo12:.LC37
bl puts
mov w0, 1
bl exit
.L37:
ldr x0, [sp, 152]
bl clReleaseContext
str w0, [sp, 60]
ldr w0, [sp, 60]
cmp w0, 0
beq .L38
adrp x0, .LC38
add x0, x0, :lo12:.LC38
bl puts
mov w0, 1
bl exit
.L38:
mov w0, 0
mov w1, w0
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x3, [sp, 584]
ldr x2, [x0]
subs x3, x3, x2
mov x2, 0
beq .L40
bl __stack_chk_fail
.L40:
mov w0, w1
ldp x29, x30, [sp, 16]
add sp, sp, 592
.cfi_restore 29
.cfi_restore 30
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE8:
.size main, .-main
.section .rodata
.align 5
.LC0:
.word 1073741824
.word 1073741824
.word 1073741824
.word 1073741824
.word 1073741824
.word 1073741824
.word 1073741824
.word 1073741824
.text
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global F
.bss
.align 3
.type F, %object
.size F, 16
F:
.zero 16
.global e
.align 3
.type e, %object
.size e, 8
e:
.zero 8
.text
.align 2
.global main
.type main, %function
main:
.LFB0:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
fmov d0, 1.0e+0
str d0, [sp, 16]
adrp x0, e
add x0, x0, :lo12:e
ldr d0, [x0]
fadd d0, d0, d0
str d0, [sp, 24]
fmov d1, 1.0e+0
ldr d0, [sp, 24]
fsub d0, d1, d0
str d0, [sp, 32]
str wzr, [sp, 12]
b .L2
.L8:
ldr d0, [sp, 24]
adrp x0, .LC0
ldr d1, [x0, #:lo12:.LC0]
fcmpe d0, d1
bgt .L10
b .L3
.L10:
ldr d1, [sp, 16]
ldr d0, [sp, 32]
fcmpe d1, d0
bmi .L11
b .L12
.L11:
ldr d1, [sp, 16]
ldr d0, [sp, 32]
fsub d1, d1, d0
ldr d0, [sp, 24]
fdiv d0, d1, d0
b .L7
.L12:
ldr d1, [sp, 32]
ldr d0, [sp, 16]
fsub d1, d1, d0
ldr d0, [sp, 24]
fdiv d0, d1, d0
.L7:
str d0, [sp, 40]
adrp x0, F
add x0, x0, :lo12:F
ldrsw x1, [sp, 12]
ldr d1, [x0, x1, lsl 3]
ldr d0, [sp, 40]
fadd d0, d1, d0
adrp x0, F
add x0, x0, :lo12:F
ldrsw x1, [sp, 12]
str d0, [x0, x1, lsl 3]
.L3:
ldr w0, [sp, 12]
add w0, w0, 1
str w0, [sp, 12]
.L2:
ldr w0, [sp, 12]
cmp w0, 1
ble .L8
mov w0, 0
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE0:
.size main, .-main
.section .rodata
.align 3
.LC0:
.word 1202590843
.word 1065646817
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "/dev/tty0"
.section .crt1.text,"ax",@progbits
.align 2
.global _start
.type _start, %function
_start:
.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 w1, 0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl open
mov w1, 1
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl open
mov w1, 1
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl open
ldr x1, [sp, 16]
ldr w0, [sp, 28]
bl main
bl exit
.cfi_endproc
.LFE6:
.size _start, .-_start
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.section .rodata
.align 3
.LC0:
.string "1. Hello World (problem solved,uva)"
.align 3
.LC1:
.string "2. Array Swapping"
.align 3
.LC2:
.string "%d"
.align 3
.LC3:
.string "Case %d: 0\n"
.align 3
.LC4:
.string "Wrong Input!\n try again!"
.align 3
.LC5:
.string "Case %d: %d\n"
.align 3
.LC6:
.string "How Many Numbers U Wana Swap?"
.align 3
.LC7:
.string "Put Values For x [%d only]...\n"
.align 3
.LC8:
.string "Put Values For y [%d only]...\n"
.align 3
.LC9:
.string "Ow Yeah!;)"
.align 3
.LC10:
.string "x= %d y= %d\n"
.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
str d8, [sp, 16]
.cfi_offset 72, -160
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [sp, 168]
mov x1, 0
b .L2
.L28:
nop
.L3:
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl puts
adrp x0, .LC1
add x0, x0, :lo12:.LC1
bl puts
add x0, sp, 44
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
ldr w0, [sp, 44]
cmp w0, 1
ble .L4
ldr w0, [sp, 44]
cmp w0, 1
ble .L27
.L4:
ldr w0, [sp, 44]
cmp w0, 1
bne .L6
mov w0, 1
str w0, [sp, 56]
b .L7
.L15:
ldr w0, [sp, 52]
cmp w0, 1
bne .L8
ldr w1, [sp, 56]
adrp x0, .LC3
add x0, x0, :lo12:.LC3
bl printf
b .L9
.L8:
ldr w0, [sp, 52]
cmp w0, 0
bge .L9
adrp x0, .LC4
add x0, x0, :lo12:.LC4
bl puts
b .L3
.L9:
str wzr, [sp, 60]
b .L10
.L14:
ldr w0, [sp, 60]
scvtf d0, w0
fmov d1, d0
fmov d0, 2.0e+0
bl pow
fmov d1, d0
ldr w0, [sp, 52]
scvtf d0, w0
fcmpe d1, d0
bmi .L25
b .L11
.L25:
ldr w0, [sp, 52]
scvtf d8, w0
ldr w0, [sp, 60]
add w0, w0, 1
scvtf d0, w0
fmov d1, d0
fmov d0, 2.0e+0
bl pow
fcmpe d8, d0
bls .L26
b .L11
.L26:
ldr w0, [sp, 60]
add w0, w0, 1
mov w2, w0
ldr w1, [sp, 56]
adrp x0, .LC5
add x0, x0, :lo12:.LC5
bl printf
.L11:
ldr w0, [sp, 60]
add w0, w0, 1
str w0, [sp, 60]
.L10:
ldr w0, [sp, 52]
ldr w1, [sp, 60]
cmp w1, w0
blt .L14
ldr w0, [sp, 56]
add w0, w0, 1
str w0, [sp, 56]
.L7:
add x0, sp, 52
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
cmp w0, 0
bge .L15
mov w0, 0
b .L23
.L6:
ldr w0, [sp, 44]
cmp w0, 2
bne .L2
str wzr, [sp, 84]
adrp x0, .LC6
add x0, x0, :lo12:.LC6
bl puts
add x0, sp, 48
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
ldr w0, [sp, 48]
mov w1, w0
adrp x0, .LC7
add x0, x0, :lo12:.LC7
bl printf
str wzr, [sp, 64]
b .L17
.L18:
add x1, sp, 88
ldrsw x0, [sp, 64]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
ldr w0, [sp, 64]
add w0, w0, 1
str w0, [sp, 64]
.L17:
ldr w0, [sp, 48]
ldr w1, [sp, 64]
cmp w1, w0
blt .L18
ldr w0, [sp, 48]
mov w1, w0
adrp x0, .LC8
add x0, x0, :lo12:.LC8
bl printf
str wzr, [sp, 68]
b .L19
.L20:
add x1, sp, 128
ldrsw x0, [sp, 68]
lsl x0, x0, 2
add x0, x1, x0
mov x1, x0
adrp x0, .LC2
add x0, x0, :lo12:.LC2
bl __isoc99_scanf
ldr w0, [sp, 68]
add w0, w0, 1
str w0, [sp, 68]
.L19:
ldr w0, [sp, 48]
ldr w1, [sp, 68]
cmp w1, w0
blt .L20
adrp x0, .LC9
add x0, x0, :lo12:.LC9
bl puts
str wzr, [sp, 72]
str wzr, [sp, 76]
b .L21
.L22:
ldrsw x0, [sp, 72]
lsl x0, x0, 2
add x1, sp, 88
ldr w0, [x1, x0]
str w0, [sp, 84]
ldrsw x0, [sp, 76]
lsl x0, x0, 2
add x1, sp, 128
ldr w2, [x1, x0]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
add x1, sp, 88
str w2, [x1, x0]
ldrsw x0, [sp, 76]
lsl x0, x0, 2
add x1, sp, 128
ldr w2, [sp, 84]
str w2, [x1, x0]
ldrsw x0, [sp, 72]
lsl x0, x0, 2
add x1, sp, 88
ldr w3, [x1, x0]
ldrsw x0, [sp, 76]
lsl x0, x0, 2
add x1, sp, 128
ldr w0, [x1, x0]
mov w2, w0
mov w1, w3
adrp x0, .LC10
add x0, x0, :lo12:.LC10
bl printf
ldr w0, [sp, 72]
add w0, w0, 1
str w0, [sp, 72]
ldr w0, [sp, 76]
add w0, w0, 1
str w0, [sp, 76]
.L21:
ldr w0, [sp, 48]
ldr w1, [sp, 76]
cmp w1, w0
blt .L22
b .L3
.L2:
ldr w0, [sp, 80]
cmp w0, 1
bne .L28
b .L5
.L27:
nop
.L5:
mov w0, 0
.L23:
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 .L24
bl __stack_chk_fail
.L24:
mov w0, w1
ldr d8, [sp, 16]
ldp x29, x30, [sp], 176
.cfi_restore 30
.cfi_restore 29
.cfi_restore 72
.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 "Non-hex digit encountered: %s\n"
.text
.align 2
.global byte2
.type byte2, %function
byte2:
.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 x19, [sp, 16]
.cfi_offset 19, -48
str x0, [sp, 40]
ldr x0, [sp, 40]
bl getc
str w0, [sp, 56]
ldr w0, [sp, 56]
cmp w0, 47
ble .L2
ldr w0, [sp, 56]
cmp w0, 57
bgt .L2
ldr w0, [sp, 56]
sub w0, w0, #48
str w0, [sp, 56]
b .L3
.L2:
ldr w0, [sp, 56]
cmp w0, 64
ble .L4
ldr w0, [sp, 56]
cmp w0, 70
bgt .L4
ldr w0, [sp, 56]
sub w0, w0, #55
str w0, [sp, 56]
b .L3
.L4:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x19, [x0]
ldr w0, [sp, 56]
bl pchar
mov x2, x0
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov x0, x19
bl fprintf
str wzr, [sp, 56]
.L3:
ldr w0, [sp, 56]
lsl w0, w0, 4
str w0, [sp, 60]
ldr x0, [sp, 40]
bl getc
str w0, [sp, 56]
ldr w0, [sp, 56]
cmp w0, 47
ble .L5
ldr w0, [sp, 56]
cmp w0, 57
bgt .L5
ldr w0, [sp, 56]
sub w0, w0, #48
str w0, [sp, 56]
b .L6
.L5:
ldr w0, [sp, 56]
cmp w0, 64
ble .L7
ldr w0, [sp, 56]
cmp w0, 70
bgt .L7
ldr w0, [sp, 56]
sub w0, w0, #55
str w0, [sp, 56]
b .L6
.L7:
adrp x0, :got:stderr
ldr x0, [x0, #:got_lo12:stderr]
ldr x19, [x0]
ldr w0, [sp, 56]
bl pchar
mov x2, x0
adrp x0, .LC0
add x1, x0, :lo12:.LC0
mov x0, x19
bl fprintf
str wzr, [sp, 56]
.L6:
ldr w1, [sp, 60]
ldr w0, [sp, 56]
add w0, w1, w0
str w0, [sp, 60]
ldr w0, [sp, 60]
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
.LFE0:
.size byte2, .-byte2
.align 2
.global byte4
.type byte4, %function
byte4:
.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 x0, [sp, 24]
ldr x0, [sp, 24]
bl byte2
lsl w0, w0, 8
str w0, [sp, 40]
ldr x0, [sp, 24]
bl byte2
str w0, [sp, 44]
ldr w1, [sp, 40]
ldr w0, [sp, 44]
add w0, w1, w0
str w0, [sp, 40]
ldr w0, [sp, 40]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size byte4, .-byte4
.align 2
.global byte6
.type byte6, %function
byte6:
.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 x0, [sp, 24]
ldr x0, [sp, 24]
bl byte4
lsl w0, w0, 8
str w0, [sp, 44]
ldr x0, [sp, 24]
bl byte2
mov w1, w0
ldr w0, [sp, 44]
add w0, w0, w1
str w0, [sp, 44]
ldr w0, [sp, 44]
ldp x29, x30, [sp], 48
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size byte6, .-byte6
.align 2
.global pchar
.type pchar, %function
pchar:
.LFB3:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, 12]
ldrb w0, [sp, 12]
cmp w0, 31
bhi .L14
adrp x0, out.0
add x0, x0, :lo12:out.0
mov w1, 94
strb w1, [x0]
ldrb w0, [sp, 12]
add w0, w0, 64
and w1, w0, 255
adrp x0, out.0
add x0, x0, :lo12:out.0
strb w1, [x0, 1]
adrp x0, out.0
add x0, x0, :lo12:out.0
strb wzr, [x0, 2]
b .L15
.L14:
adrp x0, out.0
add x0, x0, :lo12:out.0
ldrb w1, [sp, 12]
strb w1, [x0]
adrp x0, out.0
add x0, x0, :lo12:out.0
strb wzr, [x0, 1]
.L15:
adrp x0, out.0
add x0, x0, :lo12:out.0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE3:
.size pchar, .-pchar
.local out.0
.comm out.0,3,8
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.global to_input
.bss
.align 3
.type to_input, %object
.size to_input, 20
to_input:
.zero 20
.global from_input
.align 3
.type from_input, %object
.size from_input, 20
from_input:
.zero 20
.text
.align 2
.global assemblez_1
.type assemblez_1, %function
assemblez_1:
.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 x19, [sp, 16]
.cfi_offset 19, -32
str w0, [sp, 44]
mov x19, x1
ldr w1, [x19]
adrp x0, from_input
add x0, x0, :lo12:from_input
ldr w0, [x0]
cmp w1, w0
beq .L3
bl abort
.L3:
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
.LFE0:
.size assemblez_1, .-assemblez_1
.align 2
.global t0
.type t0, %function
t0:
.LFB1:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29, -64
.cfi_offset 30, -56
mov x29, sp
stp x19, x20, [sp, 16]
.cfi_offset 19, -48
.cfi_offset 20, -40
mov x19, x0
mov x20, x1
ldr w0, [x19, 4]
cmp w0, 0
bne .L5
add x2, sp, 32
mov x3, x20
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr w0, [x3, 16]
str w0, [x2, 16]
add x0, sp, 32
mov x1, x0
mov w0, 32
bl assemblez_1
b .L7
.L5:
bl abort
.L7:
ldp x19, x20, [sp, 16]
ldp x29, x30, [sp], 64
.cfi_restore 30
.cfi_restore 29
.cfi_restore 19
.cfi_restore 20
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE1:
.size t0, .-t0
.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
adrp x0, to_input
add x0, x0, :lo12:to_input
str wzr, [x0, 4]
adrp x0, to_input
add x0, x0, :lo12:to_input
mov w1, 1
str w1, [x0]
adrp x0, to_input
add x0, x0, :lo12:to_input
mov w1, 2
str w1, [x0, 8]
adrp x0, to_input
add x0, x0, :lo12:to_input
mov w1, 3
str w1, [x0, 12]
adrp x0, to_input
add x0, x0, :lo12:to_input
mov w1, 4
str w1, [x0, 16]
adrp x0, from_input
add x0, x0, :lo12:from_input
mov w1, 5
str w1, [x0, 4]
adrp x0, from_input
add x0, x0, :lo12:from_input
mov w1, 6
str w1, [x0]
adrp x0, from_input
add x0, x0, :lo12:from_input
mov w1, 7
str w1, [x0, 8]
adrp x0, from_input
add x0, x0, :lo12:from_input
mov w1, 8
str w1, [x0, 12]
adrp x0, from_input
add x0, x0, :lo12:from_input
mov w1, 9
str w1, [x0, 16]
adrp x0, to_input
add x0, x0, :lo12:to_input
add x2, sp, 48
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr w0, [x3, 16]
str w0, [x2, 16]
adrp x0, from_input
add x0, x0, :lo12:from_input
add x2, sp, 16
mov x3, x0
ldp x0, x1, [x3]
stp x0, x1, [x2]
ldr w0, [x3, 16]
str w0, [x2, 16]
add x1, sp, 16
add x0, sp, 48
bl t0
mov w0, 0
ldp x29, x30, [sp], 80
.cfi_restore 30
.cfi_restore 29
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE2:
.size main, .-main
``` |
### Human: Write a random program in ARM assembly### Assistant: ``` .text
.align 2
.global menorElemento
.type menorElemento, %function
menorElemento:
.LFB6:
.cfi_startproc
sub sp, sp, #48
.cfi_def_cfa_offset 48
str x0, [sp, 24]
str w1, [sp, 20]
str x2, [sp, 8]
ldr x0, [sp, 24]
ldr w1, [x0]
ldr x0, [sp, 8]
str w1, [x0]
str wzr, [sp, 44]
b .L2
.L4:
ldr x0, [sp, 8]
ldr w1, [x0]
ldrsw x0, [sp, 44]
add x0, x0, 1
lsl x0, x0, 2
ldr x2, [sp, 24]
add x0, x2, x0
ldr w0, [x0]
cmp w1, w0
blt .L3
ldrsw x0, [sp, 44]
add x0, x0, 1
lsl x0, x0, 2
ldr x1, [sp, 24]
add x0, x1, x0
ldr w1, [x0]
ldr x0, [sp, 8]
str w1, [x0]
.L3:
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 .L4
nop
nop
add sp, sp, 48
.cfi_def_cfa_offset 0
ret
.cfi_endproc
.LFE6:
.size menorElemento, .-menorElemento
.section .rodata
.align 3
.LC0:
.string "%d"
.text
.align 2
.global main
.type main, %function
main:
.LFB7:
.cfi_startproc
stp x29, x30, [sp, -144]!
.cfi_def_cfa_offset 144
.cfi_offset 29, -144
.cfi_offset 30, -136
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, -128
.cfi_offset 20, -120
.cfi_offset 21, -112
.cfi_offset 22, -104
.cfi_offset 23, -96
.cfi_offset 24, -88
.cfi_offset 25, -80
.cfi_offset 26, -72
.cfi_offset 27, -64
adrp x0, :got:__stack_chk_guard
ldr x0, [x0, #:got_lo12:__stack_chk_guard]
ldr x1, [x0]
str x1, [x29, 136]
mov x1, 0
mov x0, sp
mov x19, x0
add x0, x29, 100
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
b .L6
.L7:
add x0, x29, 100
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
.L6:
ldr w0, [x29, 100]
cmp w0, 0
ble .L7
ldr w0, [x29, 100]
cmp w0, 100
bgt .L7
ldr w0, [x29, 100]
sxtw x1, w0
sub x1, x1, #1
str x1, [x29, 112]
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, 120]
str wzr, [x29, 104]
b .L11
.L12:
ldrsw x0, [x29, 104]
lsl x0, x0, 2
ldr x1, [x29, 120]
add x0, x1, x0
mov x1, x0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl __isoc99_scanf
ldr w0, [x29, 104]
add w0, w0, 1
str w0, [x29, 104]
.L11:
ldr w0, [x29, 100]
ldr w1, [x29, 104]
cmp w1, w0
blt .L12
str wzr, [x29, 108]
b .L13
.L14:
ldr w0, [x29, 108]
add w0, w0, 1
str w0, [x29, 108]
.L13:
ldr w0, [x29, 100]
ldr w1, [x29, 108]
cmp w1, w0
blt .L14
ldr w0, [x29, 100]
ldr x2, [x29, 128]
mov w1, w0
ldr x0, [x29, 120]
bl menorElemento
ldr x0, [x29, 128]
ldr w0, [x0]
mov w1, w0
adrp x0, .LC0
add x0, x0, :lo12:.LC0
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, 136]
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], 144
.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
.LFE7:
.size main, .-main
``` |