source
stringlengths
3
46
c
stringlengths
31
48.4k
risc_o0
stringlengths
130
91k
risc_o1
stringlengths
130
86.5k
risc_o2
stringlengths
130
94.6k
risc_o3
stringlengths
130
110k
arm_o0
stringlengths
132
111k
arm_o1
stringlengths
132
113k
arm_o2
stringlengths
132
135k
arm_o3
stringlengths
132
162k
1050.c
/* URI Online Judge | 1050 DDD Adapted by Neilor Tonin, URI Brazil https://www.urionlinejudge.com.br/judge/en/problems/view/1050 Timelimit: 1 Read an integer number that is the code number for phone dialing. Then, print the destination according to the following table: 61 Brasilia 71 Salvador 11 Sao Paulo 21 Rio de Janeiro 32 Juiz de Fora 19 Campinas 27 Vitoria 31 Belo Horizonte If the input number isn’t found in the above table, the output must be: DDD nao cadastrado That means “DDD not found” in Portuguese language. Input The input consists in a unique integer number. Output Print the city name corresponding to the input DDD. Print DDD nao cadastrado if doesn't exist corresponding DDD to the typed number. @author Marcos Lima @profile https://www.urionlinejudge.com.br/judge/pt/profile/242402 @status Accepted @language C (gcc 4.8.5, -O2 -lm) [+0s] @time 0.000s @size 795 Bytes @submission 12/7/19, 1:07:34 PM */ #include <stdio.h> int main() { int n; scanf("%d", &n); switch (n) { case 11: printf("Sao Paulo\n"); break; case 19: printf("Campinas\n"); break; case 21: printf("Rio de Janeiro\n"); break; case 27: printf("Vitoria\n"); break; case 31: printf("Belo Horizonte\n"); break; case 32: printf("Juiz de Fora\n"); break; case 71: printf("Salvador\n"); break; case 61: printf("Brasilia\n"); break; default: printf("DDD nao cadastrado\n"); break; } return 0; }
.file "1050.c" .option pic .text .section .rodata .align 3 .LC0: .string "%d" .align 3 .LC1: .string "Sao Paulo" .align 3 .LC2: .string "Campinas" .align 3 .LC3: .string "Rio de Janeiro" .align 3 .LC4: .string "Vitoria" .align 3 .LC5: .string "Belo Horizonte" .align 3 .LC6: .string "Juiz de Fora" .align 3 .LC7: .string "Salvador" .align 3 .LC8: .string "Brasilia" .align 3 .LC9: .string "DDD nao cadastrado" .text .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 addi a5,s0,-28 mv a1,a5 lla a0,.LC0 call __isoc99_scanf@plt lw a5,-28(s0) addiw a3,a5,-11 sext.w a4,a3 li a5,60 bgtu a4,a5,.L2 slli a5,a3,32 srli a5,a5,32 slli a4,a5,2 lla a5,.L4 add a5,a4,a5 lw a5,0(a5) sext.w a4,a5 lla a5,.L4 add a5,a4,a5 jr a5 .section .rodata .align 2 .align 2 .L4: .word .L11-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L10-.L4 .word .L2-.L4 .word .L9-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L8-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L7-.L4 .word .L6-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L5-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L3-.L4 .text .L11: lla a0,.LC1 call puts@plt j .L12 .L10: lla a0,.LC2 call puts@plt j .L12 .L9: lla a0,.LC3 call puts@plt j .L12 .L8: lla a0,.LC4 call puts@plt j .L12 .L7: lla a0,.LC5 call puts@plt j .L12 .L6: lla a0,.LC6 call puts@plt j .L12 .L3: lla a0,.LC7 call puts@plt j .L12 .L5: lla a0,.LC8 call puts@plt j .L12 .L2: lla a0,.LC9 call puts@plt nop .L12: li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L14 call __stack_chk_fail@plt .L14: mv a0,a4 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "1050.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "Sao Paulo" .align 3 .LC2: .string "Campinas" .align 3 .LC3: .string "Rio de Janeiro" .align 3 .LC4: .string "Vitoria" .align 3 .LC5: .string "Belo Horizonte" .align 3 .LC6: .string "Juiz de Fora" .align 3 .LC7: .string "Salvador" .align 3 .LC8: .string "Brasilia" .align 3 .LC9: .string "DDD nao cadastrado" .text .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd ra,24(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 8(sp) li a4, 0 addi a1,sp,4 lla a0,.LC0 call __isoc99_scanf@plt lw a5,4(sp) addiw a5,a5,-11 sext.w a3,a5 li a4,60 bgtu a3,a4,.L2 slli a4,a5,32 srli a5,a4,30 lla a4,.L4 add a5,a5,a4 lw a5,0(a5) add a5,a5,a4 jr a5 .section .rodata .align 2 .align 2 .L4: .word .L11-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L10-.L4 .word .L2-.L4 .word .L9-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L8-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L7-.L4 .word .L6-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L5-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L3-.L4 .text .L11: lla a0,.LC1 call puts@plt .L12: la a5,__stack_chk_guard ld a4, 8(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L15 li a0,0 ld ra,24(sp) addi sp,sp,32 jr ra .L10: lla a0,.LC2 call puts@plt j .L12 .L9: lla a0,.LC3 call puts@plt j .L12 .L8: lla a0,.LC4 call puts@plt j .L12 .L7: lla a0,.LC5 call puts@plt j .L12 .L6: lla a0,.LC6 call puts@plt j .L12 .L3: lla a0,.LC7 call puts@plt j .L12 .L5: lla a0,.LC8 call puts@plt j .L12 .L2: lla a0,.LC9 call puts@plt j .L12 .L15: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "1050.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "Sao Paulo" .align 3 .LC2: .string "Campinas" .align 3 .LC3: .string "Rio de Janeiro" .align 3 .LC4: .string "Vitoria" .align 3 .LC5: .string "Belo Horizonte" .align 3 .LC6: .string "Juiz de Fora" .align 3 .LC7: .string "Salvador" .align 3 .LC8: .string "Brasilia" .align 3 .LC9: .string "DDD nao cadastrado" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd s0,16(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 8(sp) li a5, 0 addi a1,sp,4 lla a0,.LC0 sd ra,24(sp) call __isoc99_scanf@plt lw a5,4(sp) li a4,60 addiw a5,a5,-11 sext.w a3,a5 bgtu a3,a4,.L2 slli a3,a5,32 lla a4,.L4 srli a5,a3,30 add a5,a5,a4 lw a5,0(a5) add a5,a5,a4 jr a5 .section .rodata .align 2 .align 2 .L4: .word .L11-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L10-.L4 .word .L2-.L4 .word .L9-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L8-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L7-.L4 .word .L6-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L5-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L3-.L4 .section .text.startup .L2: lla a0,.LC9 call puts@plt .L12: ld a4, 8(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L16 ld ra,24(sp) ld s0,16(sp) li a0,0 addi sp,sp,32 jr ra .L11: lla a0,.LC1 call puts@plt j .L12 .L10: lla a0,.LC2 call puts@plt j .L12 .L9: lla a0,.LC3 call puts@plt j .L12 .L8: lla a0,.LC4 call puts@plt j .L12 .L7: lla a0,.LC5 call puts@plt j .L12 .L6: lla a0,.LC6 call puts@plt j .L12 .L5: lla a0,.LC8 call puts@plt j .L12 .L3: lla a0,.LC7 call puts@plt j .L12 .L16: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "1050.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "Sao Paulo" .align 3 .LC2: .string "Campinas" .align 3 .LC3: .string "Rio de Janeiro" .align 3 .LC4: .string "Vitoria" .align 3 .LC5: .string "Belo Horizonte" .align 3 .LC6: .string "Juiz de Fora" .align 3 .LC7: .string "Salvador" .align 3 .LC8: .string "Brasilia" .align 3 .LC9: .string "DDD nao cadastrado" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd s0,16(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 8(sp) li a5, 0 addi a1,sp,4 lla a0,.LC0 sd ra,24(sp) call __isoc99_scanf@plt lw a5,4(sp) li a4,60 addiw a5,a5,-11 sext.w a3,a5 bgtu a3,a4,.L2 slli a3,a5,32 lla a4,.L4 srli a5,a3,30 add a5,a5,a4 lw a5,0(a5) add a5,a5,a4 jr a5 .section .rodata .align 2 .align 2 .L4: .word .L11-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L10-.L4 .word .L2-.L4 .word .L9-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L8-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L7-.L4 .word .L6-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L5-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L2-.L4 .word .L3-.L4 .section .text.startup .L2: lla a0,.LC9 call puts@plt .L12: ld a4, 8(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L16 ld ra,24(sp) ld s0,16(sp) li a0,0 addi sp,sp,32 jr ra .L11: lla a0,.LC1 call puts@plt j .L12 .L10: lla a0,.LC2 call puts@plt j .L12 .L9: lla a0,.LC3 call puts@plt j .L12 .L8: lla a0,.LC4 call puts@plt j .L12 .L7: lla a0,.LC5 call puts@plt j .L12 .L6: lla a0,.LC6 call puts@plt j .L12 .L5: lla a0,.LC8 call puts@plt j .L12 .L3: lla a0,.LC7 call puts@plt j .L12 .L16: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "1050.c" .text .section .rodata .align 3 .LC0: .string "%d" .align 3 .LC1: .string "Sao Paulo" .align 3 .LC2: .string "Campinas" .align 3 .LC3: .string "Rio de Janeiro" .align 3 .LC4: .string "Vitoria" .align 3 .LC5: .string "Belo Horizonte" .align 3 .LC6: .string "Juiz de Fora" .align 3 .LC7: .string "Salvador" .align 3 .LC8: .string "Brasilia" .align 3 .LC9: .string "DDD nao cadastrado" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 24] mov x1, 0 add x0, sp, 20 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr w0, [sp, 20] cmp w0, 71 beq .L2 cmp w0, 71 bgt .L3 cmp w0, 61 beq .L4 cmp w0, 61 bgt .L3 cmp w0, 32 beq .L5 cmp w0, 32 bgt .L3 cmp w0, 31 beq .L6 cmp w0, 31 bgt .L3 cmp w0, 27 beq .L7 cmp w0, 27 bgt .L3 cmp w0, 21 beq .L8 cmp w0, 21 bgt .L3 cmp w0, 11 beq .L9 cmp w0, 19 beq .L10 b .L3 .L9: adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts b .L11 .L10: adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts b .L11 .L8: adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts b .L11 .L7: adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts b .L11 .L6: adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts b .L11 .L5: adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts b .L11 .L2: adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts b .L11 .L4: adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts b .L11 .L3: adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts nop .L11: 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 .L13 bl __stack_chk_fail .L13: 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 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "1050.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "Sao Paulo" .align 3 .LC2: .string "Campinas" .align 3 .LC3: .string "Rio de Janeiro" .align 3 .LC4: .string "Vitoria" .align 3 .LC5: .string "Belo Horizonte" .align 3 .LC6: .string "Juiz de Fora" .align 3 .LC7: .string "Salvador" .align 3 .LC8: .string "Brasilia" .align 3 .LC9: .string "DDD nao cadastrado" .text .align 2 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 24] mov x1, 0 add x1, sp, 20 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr w0, [sp, 20] cmp w0, 31 beq .L2 bgt .L3 cmp w0, 21 beq .L4 ble .L16 cmp w0, 27 bne .L8 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts b .L13 .L16: cmp w0, 11 beq .L6 cmp w0, 19 bne .L8 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts b .L13 .L3: cmp w0, 61 beq .L10 cmp w0, 71 bne .L17 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts b .L13 .L17: cmp w0, 32 bne .L8 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts b .L13 .L6: adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts .L13: 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 bne .L18 mov w0, 0 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L4: .cfi_restore_state adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts b .L13 .L2: adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts b .L13 .L10: adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts b .L13 .L8: adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts b .L13 .L18: bl __stack_chk_fail .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "1050.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "Sao Paulo" .align 3 .LC2: .string "Campinas" .align 3 .LC3: .string "Rio de Janeiro" .align 3 .LC4: .string "Vitoria" .align 3 .LC5: .string "Belo Horizonte" .align 3 .LC6: .string "Juiz de Fora" .align 3 .LC7: .string "Salvador" .align 3 .LC8: .string "Brasilia" .align 3 .LC9: .string "DDD nao cadastrado" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x2, :got:__stack_chk_guard adrp x0, .LC0 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] add x1, sp, 20 add x0, x0, :lo12:.LC0 ldr x3, [x2] str x3, [sp, 24] mov x3, 0 bl __isoc99_scanf ldr w0, [sp, 20] cmp w0, 31 beq .L2 bgt .L3 cmp w0, 21 beq .L4 ble .L17 cmp w0, 27 bne .L8 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts .p2align 3,,7 .L13: 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 bne .L18 mov w0, 0 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L3: .cfi_restore_state cmp w0, 61 beq .L10 cmp w0, 71 bne .L19 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts b .L13 .p2align 2,,3 .L17: cmp w0, 11 beq .L6 cmp w0, 19 bne .L8 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts b .L13 .L19: cmp w0, 32 bne .L8 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts b .L13 .L2: adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts b .L13 .L4: adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts b .L13 .L8: adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts b .L13 .L10: adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts b .L13 .L6: adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts b .L13 .L18: bl __stack_chk_fail .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "1050.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "Sao Paulo" .align 3 .LC2: .string "Campinas" .align 3 .LC3: .string "Rio de Janeiro" .align 3 .LC4: .string "Vitoria" .align 3 .LC5: .string "Belo Horizonte" .align 3 .LC6: .string "Juiz de Fora" .align 3 .LC7: .string "Salvador" .align 3 .LC8: .string "Brasilia" .align 3 .LC9: .string "DDD nao cadastrado" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x2, :got:__stack_chk_guard adrp x0, .LC0 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] add x1, sp, 20 add x0, x0, :lo12:.LC0 ldr x3, [x2] str x3, [sp, 24] mov x3, 0 bl __isoc99_scanf ldr w0, [sp, 20] cmp w0, 31 beq .L2 bgt .L3 cmp w0, 21 beq .L4 ble .L17 cmp w0, 27 bne .L8 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts .p2align 3,,7 .L13: 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 bne .L18 mov w0, 0 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L3: .cfi_restore_state cmp w0, 61 beq .L10 cmp w0, 71 bne .L19 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts b .L13 .p2align 2,,3 .L17: cmp w0, 11 beq .L6 cmp w0, 19 bne .L8 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts b .L13 .L19: cmp w0, 32 bne .L8 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts b .L13 .L2: adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts b .L13 .L4: adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts b .L13 .L8: adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts b .L13 .L10: adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts b .L13 .L6: adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts b .L13 .L18: bl __stack_chk_fail .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
pointers.c
void func() { char* string = "Hello"; }
.file "pointers.c" .option pic .text .section .rodata .align 3 .LC0: .string "Hello" .text .align 1 .globl func .type func, @function func: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 lla a5,.LC0 sd a5,-24(s0) nop ld s0,24(sp) addi sp,sp,32 jr ra .size func, .-func .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "pointers.c" .option pic .text .align 1 .globl func .type func, @function func: ret .size func, .-func .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "pointers.c" .option pic .text .align 1 .globl func .type func, @function func: ret .size func, .-func .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "pointers.c" .option pic .text .align 1 .globl func .type func, @function func: ret .size func, .-func .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "pointers.c" .text .section .rodata .align 3 .LC0: .string "Hello" .text .align 2 .global func .type func, %function func: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 adrp x0, .LC0 add x0, x0, :lo12:.LC0 str x0, [sp, 8] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size func, .-func .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "pointers.c" .text .align 2 .global func .type func, %function func: .LFB0: .cfi_startproc ret .cfi_endproc .LFE0: .size func, .-func .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "pointers.c" .text .align 2 .p2align 4,,11 .global func .type func, %function func: .LFB0: .cfi_startproc ret .cfi_endproc .LFE0: .size func, .-func .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "pointers.c" .text .align 2 .p2align 4,,11 .global func .type func, %function func: .LFB0: .cfi_startproc ret .cfi_endproc .LFE0: .size func, .-func .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
Wstring-literal-comparison-3.c
/* PR c/7776 */ /* { dg-do compile } */ /* { dg-options "" } */ int test1(char *ptr) { return ptr == "foo"; } int test2() { return "foo" != (const char*)0; } int test3() { return "foo" == (const char*)0; } int test4() { return (const char*)0 != "foo"; } int test5() { return (const char*)0 == "foo"; }
.file "Wstring-literal-comparison-3.c" .option pic .text .section .rodata .align 3 .LC0: .string "foo" .text .align 1 .globl test1 .type test1, @function test1: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-24(s0) ld a4,-24(s0) lla a5,.LC0 sub a5,a4,a5 seqz a5,a5 andi a5,a5,0xff sext.w a5,a5 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size test1, .-test1 .align 1 .globl test2 .type test2, @function test2: addi sp,sp,-16 sd s0,8(sp) addi s0,sp,16 li a5,1 mv a0,a5 ld s0,8(sp) addi sp,sp,16 jr ra .size test2, .-test2 .align 1 .globl test3 .type test3, @function test3: addi sp,sp,-16 sd s0,8(sp) addi s0,sp,16 li a5,0 mv a0,a5 ld s0,8(sp) addi sp,sp,16 jr ra .size test3, .-test3 .align 1 .globl test4 .type test4, @function test4: addi sp,sp,-16 sd s0,8(sp) addi s0,sp,16 li a5,1 mv a0,a5 ld s0,8(sp) addi sp,sp,16 jr ra .size test4, .-test4 .align 1 .globl test5 .type test5, @function test5: addi sp,sp,-16 sd s0,8(sp) addi s0,sp,16 li a5,0 mv a0,a5 ld s0,8(sp) addi sp,sp,16 jr ra .size test5, .-test5 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "Wstring-literal-comparison-3.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "foo" .text .align 1 .globl test1 .type test1, @function test1: lla a5,.LC0 sub a0,a0,a5 seqz a0,a0 ret .size test1, .-test1 .align 1 .globl test2 .type test2, @function test2: li a0,1 ret .size test2, .-test2 .align 1 .globl test3 .type test3, @function test3: li a0,0 ret .size test3, .-test3 .align 1 .globl test4 .type test4, @function test4: li a0,1 ret .size test4, .-test4 .align 1 .globl test5 .type test5, @function test5: li a0,0 ret .size test5, .-test5 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "Wstring-literal-comparison-3.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "foo" .text .align 1 .globl test1 .type test1, @function test1: lla a5,.LC0 sub a0,a0,a5 seqz a0,a0 ret .size test1, .-test1 .align 1 .globl test2 .type test2, @function test2: li a0,1 ret .size test2, .-test2 .align 1 .globl test3 .type test3, @function test3: li a0,0 ret .size test3, .-test3 .align 1 .globl test4 .type test4, @function test4: li a0,1 ret .size test4, .-test4 .align 1 .globl test5 .type test5, @function test5: li a0,0 ret .size test5, .-test5 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "Wstring-literal-comparison-3.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "foo" .text .align 1 .globl test1 .type test1, @function test1: lla a5,.LC0 sub a0,a0,a5 seqz a0,a0 ret .size test1, .-test1 .align 1 .globl test2 .type test2, @function test2: li a0,1 ret .size test2, .-test2 .align 1 .globl test3 .type test3, @function test3: li a0,0 ret .size test3, .-test3 .align 1 .globl test4 .type test4, @function test4: li a0,1 ret .size test4, .-test4 .align 1 .globl test5 .type test5, @function test5: li a0,0 ret .size test5, .-test5 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "Wstring-literal-comparison-3.c" .text .section .rodata .align 3 .LC0: .string "foo" .text .align 2 .global test1 .type test1, %function test1: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x1, [sp, 8] adrp x0, .LC0 add x0, x0, :lo12:.LC0 cmp x1, x0 cset w0, eq and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size test1, .-test1 .align 2 .global test2 .type test2, %function test2: .LFB1: .cfi_startproc mov w0, 1 ret .cfi_endproc .LFE1: .size test2, .-test2 .align 2 .global test3 .type test3, %function test3: .LFB2: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE2: .size test3, .-test3 .align 2 .global test4 .type test4, %function test4: .LFB3: .cfi_startproc mov w0, 1 ret .cfi_endproc .LFE3: .size test4, .-test4 .align 2 .global test5 .type test5, %function test5: .LFB4: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE4: .size test5, .-test5 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "Wstring-literal-comparison-3.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "foo" .text .align 2 .global test1 .type test1, %function test1: .LFB0: .cfi_startproc adrp x1, .LC0 add x1, x1, :lo12:.LC0 cmp x1, x0 cset w0, eq ret .cfi_endproc .LFE0: .size test1, .-test1 .align 2 .global test2 .type test2, %function test2: .LFB1: .cfi_startproc mov w0, 1 ret .cfi_endproc .LFE1: .size test2, .-test2 .align 2 .global test3 .type test3, %function test3: .LFB2: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE2: .size test3, .-test3 .align 2 .global test4 .type test4, %function test4: .LFB3: .cfi_startproc mov w0, 1 ret .cfi_endproc .LFE3: .size test4, .-test4 .align 2 .global test5 .type test5, %function test5: .LFB4: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE4: .size test5, .-test5 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "Wstring-literal-comparison-3.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "foo" .text .align 2 .p2align 4,,11 .global test1 .type test1, %function test1: .LFB0: .cfi_startproc adrp x1, .LC0 add x1, x1, :lo12:.LC0 cmp x1, x0 cset w0, eq ret .cfi_endproc .LFE0: .size test1, .-test1 .align 2 .p2align 4,,11 .global test2 .type test2, %function test2: .LFB1: .cfi_startproc mov w0, 1 ret .cfi_endproc .LFE1: .size test2, .-test2 .align 2 .p2align 4,,11 .global test3 .type test3, %function test3: .LFB2: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE2: .size test3, .-test3 .align 2 .p2align 4,,11 .global test4 .type test4, %function test4: .LFB6: .cfi_startproc mov w0, 1 ret .cfi_endproc .LFE6: .size test4, .-test4 .align 2 .p2align 4,,11 .global test5 .type test5, %function test5: .LFB8: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE8: .size test5, .-test5 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "Wstring-literal-comparison-3.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "foo" .text .align 2 .p2align 4,,11 .global test1 .type test1, %function test1: .LFB0: .cfi_startproc adrp x1, .LC0 add x1, x1, :lo12:.LC0 cmp x1, x0 cset w0, eq ret .cfi_endproc .LFE0: .size test1, .-test1 .align 2 .p2align 4,,11 .global test2 .type test2, %function test2: .LFB1: .cfi_startproc mov w0, 1 ret .cfi_endproc .LFE1: .size test2, .-test2 .align 2 .p2align 4,,11 .global test3 .type test3, %function test3: .LFB2: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE2: .size test3, .-test3 .align 2 .p2align 4,,11 .global test4 .type test4, %function test4: .LFB6: .cfi_startproc mov w0, 1 ret .cfi_endproc .LFE6: .size test4, .-test4 .align 2 .p2align 4,,11 .global test5 .type test5, %function test5: .LFB8: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE8: .size test5, .-test5 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
hex2bin.c
/* * hex2bin - converts data in hexadecimal form to binary form * * Copyright (C) 2013 Jonathan Buhacoff <jonathan@buhacoff.net> * * BSD license. * * Input must contain only hex characters. Any other characters will result in an error * printed to stderr and exit code 1. On success exit code is 0. * * Would be nice to add an option in the future to support hex files with * comment lines starting with #, and to ignore blank lines and newline characters. * * because of how runCommand function works we now pass the hash on the command line * Example: * * hex2bin hexString binaryFile * * change log: * 1/24: now pass hex string as argv[1] and the binary file to write to as argv[2] * 9/8/16: replacing sscanf banned function by hex2int() */ #include <stdio.h> #include <stdlib.h> /* * Input: hexadecimal character in the range 0..9 or A..F case-insensitive * Output: decimal value of input in the range 0..15 * or -1 if the input was not a valid hexadecimal character */ int hex2int(const char c) { if(c >= '0' && c<= '9') { return c - '0'; } else if( c >= 'A' && c <= 'F' ) { return c - 'A' + 10; } else if( c >= 'a' && c <= 'f' ) { return c - 'a' + 10; } else { return -1; } } int main(int argc, char **argv) { if(argc != 3) { printf("usuage is: hex2bin hexString binaryFile"); exit(-1); } int b, j=0, hex1, hex2; FILE* outFile = fopen(argv[2],"w"); //printf("argv %s\n", argv[1]); unsigned int iHexLen=0; while(*(argv[1]+iHexLen) ) iHexLen++; //printf("iHexlen %d\n", iHexLen); if( iHexLen % 2 != 0 ) { fprintf(stderr, "invalid hex length\n"); exit(1); // invalid length for hex } for(j=0; j<iHexLen-1; j=j+2) { hex1 = hex2int(argv[1][j]); hex2 = hex2int(argv[1][j+1]); if(hex1 == -1 || hex2 == -1) { fprintf(stderr, "non-hex input\n"); exit(1); } b = (hex1*16) + hex2; if(outFile != NULL) fputc(b, outFile); //printf("b: %d\n", b); } if(outFile != NULL) fclose(outFile); exit(0); }
.file "hex2bin.c" .option pic .text .align 1 .globl hex2int .type hex2int, @function hex2int: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 mv a5,a0 sb a5,-17(s0) lbu a5,-17(s0) andi a4,a5,0xff li a5,47 bleu a4,a5,.L2 lbu a5,-17(s0) andi a4,a5,0xff li a5,57 bgtu a4,a5,.L2 lbu a5,-17(s0) sext.w a5,a5 addiw a5,a5,-48 sext.w a5,a5 j .L3 .L2: lbu a5,-17(s0) andi a4,a5,0xff li a5,64 bleu a4,a5,.L4 lbu a5,-17(s0) andi a4,a5,0xff li a5,70 bgtu a4,a5,.L4 lbu a5,-17(s0) sext.w a5,a5 addiw a5,a5,-55 sext.w a5,a5 j .L3 .L4: lbu a5,-17(s0) andi a4,a5,0xff li a5,96 bleu a4,a5,.L5 lbu a5,-17(s0) andi a4,a5,0xff li a5,102 bgtu a4,a5,.L5 lbu a5,-17(s0) sext.w a5,a5 addiw a5,a5,-87 sext.w a5,a5 j .L3 .L5: li a5,-1 .L3: mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size hex2int, .-hex2int .section .rodata .align 3 .LC0: .string "usuage is: hex2bin hexString binaryFile" .align 3 .LC1: .string "w" .align 3 .LC2: .string "invalid hex length\n" .align 3 .LC3: .string "non-hex input\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 mv a5,a0 sd a1,-64(s0) sw a5,-52(s0) lw a5,-52(s0) sext.w a4,a5 li a5,3 beq a4,a5,.L7 lla a0,.LC0 call printf@plt li a0,-1 call exit@plt .L7: sw zero,-44(s0) ld a5,-64(s0) addi a5,a5,16 ld a5,0(a5) lla a1,.LC1 mv a0,a5 call fopen@plt mv a5,a0 sd a5,-24(s0) sw zero,-40(s0) j .L8 .L9: lw a5,-40(s0) addiw a5,a5,1 sw a5,-40(s0) .L8: ld a5,-64(s0) addi a5,a5,8 ld a4,0(a5) lwu a5,-40(s0) add a5,a4,a5 lbu a5,0(a5) bne a5,zero,.L9 lw a5,-40(s0) andi a5,a5,1 sext.w a5,a5 beq a5,zero,.L10 la a5,stderr ld a5,0(a5) mv a3,a5 li a2,19 li a1,1 lla a0,.LC2 call fwrite@plt li a0,1 call exit@plt .L10: sw zero,-44(s0) j .L11 .L15: ld a5,-64(s0) addi a5,a5,8 ld a4,0(a5) lw a5,-44(s0) add a5,a4,a5 lbu a5,0(a5) mv a0,a5 call hex2int mv a5,a0 sw a5,-36(s0) ld a5,-64(s0) addi a5,a5,8 ld a4,0(a5) lw a5,-44(s0) addi a5,a5,1 add a5,a4,a5 lbu a5,0(a5) mv a0,a5 call hex2int mv a5,a0 sw a5,-32(s0) lw a5,-36(s0) sext.w a4,a5 li a5,-1 beq a4,a5,.L12 lw a5,-32(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L13 .L12: la a5,stderr ld a5,0(a5) mv a3,a5 li a2,14 li a1,1 lla a0,.LC3 call fwrite@plt li a0,1 call exit@plt .L13: lw a5,-36(s0) slliw a5,a5,4 sext.w a5,a5 lw a4,-32(s0) addw a5,a4,a5 sw a5,-28(s0) ld a5,-24(s0) beq a5,zero,.L14 lw a5,-28(s0) ld a1,-24(s0) mv a0,a5 call fputc@plt .L14: lw a5,-44(s0) addiw a5,a5,2 sw a5,-44(s0) .L11: lw a5,-40(s0) addiw a5,a5,-1 sext.w a4,a5 lw a5,-44(s0) bgtu a4,a5,.L15 ld a5,-24(s0) beq a5,zero,.L16 ld a0,-24(s0) call fclose@plt .L16: li a0,0 call exit@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "hex2bin.c" .option pic .text .align 1 .globl hex2int .type hex2int, @function hex2int: addiw a5,a0,-48 andi a5,a5,0xff li a4,9 bleu a5,a4,.L6 addiw a5,a0,-65 andi a5,a5,0xff li a4,5 bleu a5,a4,.L7 addiw a5,a0,-97 andi a5,a5,0xff li a4,5 bgtu a5,a4,.L5 addiw a0,a0,-87 ret .L6: addiw a0,a0,-48 ret .L7: addiw a0,a0,-55 ret .L5: li a0,-1 ret .size hex2int, .-hex2int .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "usuage is: hex2bin hexString binaryFile" .align 3 .LC1: .string "w" .align 3 .LC2: .string "invalid hex length\n" .align 3 .LC3: .string "non-hex input\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) sd s1,40(sp) sd s2,32(sp) sd s3,24(sp) sd s4,16(sp) sd s5,8(sp) sd s6,0(sp) li a5,3 beq a0,a5,.L9 lla a1,.LC0 li a0,1 call __printf_chk@plt li a0,-1 call exit@plt .L9: mv s2,a1 lla a1,.LC1 ld a0,16(s2) call fopen@plt mv s3,a0 ld a3,8(s2) lbu a5,0(a3) beq a5,zero,.L19 li a4,0 .L11: sext.w s4,a4 addiw a5,a4,1 sext.w a4,a5 slli a5,a5,32 srli a5,a5,32 add a5,a3,a5 lbu a5,0(a5) bne a5,zero,.L11 andi a4,a4,1 bne a4,zero,.L12 beq s4,zero,.L13 .L10: li s5,0 li s6,-1 .L17: ld s1,8(s2) add s1,s1,s5 lbu a0,0(s1) call hex2int mv s0,a0 lbu a0,1(s1) call hex2int beq s0,s6,.L14 beq a0,s6,.L14 slliw s0,s0,4 addw a0,s0,a0 beq s3,zero,.L16 mv a1,s3 call fputc@plt .L16: addi s5,s5,2 sext.w a5,s5 bgtu s4,a5,.L17 .L13: beq s3,zero,.L18 mv a0,s3 call fclose@plt .L18: li a0,0 call exit@plt .L12: la a5,stderr ld a3,0(a5) li a2,19 li a1,1 lla a0,.LC2 call fwrite@plt li a0,1 call exit@plt .L19: li s4,-1 j .L10 .L14: la a5,stderr ld a3,0(a5) li a2,14 li a1,1 lla a0,.LC3 call fwrite@plt li a0,1 call exit@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "hex2bin.c" .option pic .text .align 1 .globl hex2int .type hex2int, @function hex2int: addiw a5,a0,-48 andi a3,a5,0xff li a4,9 bleu a3,a4,.L7 addiw a5,a0,-65 andi a5,a5,0xff li a4,5 bleu a5,a4,.L8 addiw a5,a0,-97 andi a5,a5,0xff bgtu a5,a4,.L5 addiw a0,a0,-87 ret .L8: addiw a0,a0,-55 ret .L7: sext.w a0,a5 ret .L5: li a0,-1 ret .size hex2int, .-hex2int .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "usuage is: hex2bin hexString binaryFile" .align 3 .LC1: .string "w" .align 3 .LC2: .string "invalid hex length\n" .align 3 .LC3: .string "non-hex input\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) sd s1,40(sp) sd s2,32(sp) sd s3,24(sp) sd s4,16(sp) sd s5,8(sp) sd s6,0(sp) li a5,3 beq a0,a5,.L10 lla a1,.LC0 li a0,1 call __printf_chk@plt li a0,-1 call exit@plt .L10: ld a0,16(a1) mv s0,a1 lla a1,.LC1 call fopen@plt ld a5,8(s0) mv s3,a0 lbu a4,0(a5) beq a4,zero,.L26 li a3,0 .L12: addiw a2,a3,1 slli a4,a2,32 srli a4,a4,32 add a4,a5,a4 lbu a4,0(a4) sext.w s4,a3 sext.w a3,a2 bne a4,zero,.L12 andi a3,a3,1 bne a3,zero,.L13 beq s4,zero,.L14 .L11: li s1,0 add a4,a5,s1 lbu a5,0(a4) li s6,9 li s5,5 addiw a3,a5,-48 andi a2,a3,0xff li s2,-1 bleu a2,s6,.L38 .L15: addiw a3,a5,-65 andi a3,a3,0xff bleu a3,s5,.L39 addiw a3,a5,-97 andi a3,a3,0xff bgtu a3,s5,.L27 addiw a5,a5,-87 .L16: lbu a4,1(a4) addiw a3,a4,-48 andi a2,a3,0xff bleu a2,s6,.L40 .L18: addiw a3,a4,-65 andi a3,a3,0xff bleu a3,s5,.L41 addiw a3,a4,-97 andi a3,a3,0xff bgtu a3,s5,.L21 addiw a4,a4,-87 .L19: beq a5,s2,.L21 .L36: slliw a5,a5,4 addw a0,a5,a4 beq s3,zero,.L22 mv a1,s3 call fputc@plt .L22: addi s1,s1,2 sext.w a5,s1 bleu s4,a5,.L14 ld a5,8(s0) add a4,a5,s1 lbu a5,0(a4) addiw a3,a5,-48 andi a2,a3,0xff bgtu a2,s6,.L15 .L38: lbu a4,1(a4) sext.w a5,a3 addiw a3,a4,-48 andi a2,a3,0xff bgtu a2,s6,.L18 .L40: sext.w a4,a3 bne a5,s2,.L36 .L21: la a5,stderr ld a3,0(a5) li a2,14 li a1,1 lla a0,.LC3 call fwrite@plt li a0,1 call exit@plt .L13: la a5,stderr ld a3,0(a5) li a2,19 li a1,1 lla a0,.LC2 call fwrite@plt li a0,1 call exit@plt .L39: addiw a5,a5,-55 j .L16 .L41: addiw a4,a4,-55 j .L19 .L14: beq s3,zero,.L24 mv a0,s3 call fclose@plt .L24: li a0,0 call exit@plt .L26: li s4,-1 j .L11 .L27: li a5,-1 j .L16 .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "hex2bin.c" .option pic .text .align 1 .globl hex2int .type hex2int, @function hex2int: addiw a5,a0,-48 andi a3,a5,0xff li a4,9 bleu a3,a4,.L7 addiw a5,a0,-65 andi a5,a5,0xff li a4,5 bleu a5,a4,.L8 addiw a5,a0,-97 andi a5,a5,0xff bgtu a5,a4,.L5 addiw a0,a0,-87 ret .L8: addiw a0,a0,-55 ret .L7: sext.w a0,a5 ret .L5: li a0,-1 ret .size hex2int, .-hex2int .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "usuage is: hex2bin hexString binaryFile" .align 3 .LC1: .string "w" .align 3 .LC2: .string "invalid hex length\n" .align 3 .LC3: .string "non-hex input\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) sd s1,40(sp) sd s2,32(sp) sd s3,24(sp) sd s4,16(sp) sd s5,8(sp) sd s6,0(sp) li a5,3 beq a0,a5,.L10 lla a1,.LC0 li a0,1 call __printf_chk@plt li a0,-1 call exit@plt .L10: ld a0,16(a1) mv s0,a1 lla a1,.LC1 call fopen@plt ld a5,8(s0) mv s1,a0 lbu a4,0(a5) beq a4,zero,.L29 li a3,0 .L12: addiw a2,a3,1 slli a4,a2,32 srli a4,a4,32 add a4,a5,a4 lbu a4,0(a4) sext.w s4,a3 sext.w a3,a2 bne a4,zero,.L12 andi a3,a3,1 bne a3,zero,.L13 beq s4,zero,.L43 .L11: li s2,0 beq s1,zero,.L40 add a4,a5,s2 lbu a5,0(a4) li s6,9 li s5,5 addiw a3,a5,-48 andi a2,a3,0xff li s3,-1 bleu a2,s6,.L44 .L20: addiw a3,a5,-65 andi a3,a3,0xff bleu a3,s5,.L45 addiw a3,a5,-97 andi a3,a3,0xff bgtu a3,s5,.L31 addiw a5,a5,-87 .L21: lbu a4,1(a4) addiw a3,a4,-48 andi a2,a3,0xff sext.w a0,a3 bleu a2,s6,.L24 addiw a3,a4,-65 andi a3,a3,0xff addiw a0,a4,-55 bleu a3,s5,.L24 addiw a3,a4,-97 andi a3,a3,0xff bgtu a3,s5,.L17 addiw a0,a4,-87 .L24: beq a5,s3,.L17 slliw a5,a5,4 addw a0,a5,a0 mv a1,s1 addi s2,s2,2 call fputc@plt sext.w a5,s2 bgeu a5,s4,.L26 ld a5,8(s0) add a4,a5,s2 lbu a5,0(a4) addiw a3,a5,-48 andi a2,a3,0xff bgtu a2,s6,.L20 .L44: sext.w a5,a3 j .L21 .L13: la a5,stderr ld a3,0(a5) li a2,19 li a1,1 lla a0,.LC2 call fwrite@plt li a0,1 call exit@plt .L45: addiw a5,a5,-55 j .L21 .L40: li a3,0 li a0,9 li a2,5 j .L18 .L28: addi a3,a3,2 sext.w a4,a3 bgeu a4,s4,.L19 .L18: add a6,a5,a3 lbu a4,0(a6) addiw a1,a4,-48 andi a1,a1,0xff bleu a1,a0,.L16 addiw a1,a4,-65 andi a1,a1,0xff bleu a1,a2,.L16 addiw a4,a4,-97 andi a4,a4,0xff bgtu a4,a2,.L17 .L16: lbu a4,1(a6) addiw a1,a4,-48 andi a1,a1,0xff bleu a1,a0,.L28 andi a4,a4,-33 addiw a4,a4,-65 andi a4,a4,0xff bleu a4,a2,.L28 .L17: la a5,stderr ld a3,0(a5) li a2,14 li a1,1 lla a0,.LC3 call fwrite@plt li a0,1 call exit@plt .L43: beq s1,zero,.L19 .L26: mv a0,s1 call fclose@plt .L19: li a0,0 call exit@plt .L29: li s4,-1 j .L11 .L31: li a5,-1 j .L21 .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "hex2bin.c" .text .align 2 .global hex2int .type hex2int, %function hex2int: .LFB6: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 strb w0, [sp, 15] ldrb w0, [sp, 15] cmp w0, 47 bls .L2 ldrb w0, [sp, 15] cmp w0, 57 bhi .L2 ldrb w0, [sp, 15] sub w0, w0, #48 b .L3 .L2: ldrb w0, [sp, 15] cmp w0, 64 bls .L4 ldrb w0, [sp, 15] cmp w0, 70 bhi .L4 ldrb w0, [sp, 15] sub w0, w0, #55 b .L3 .L4: ldrb w0, [sp, 15] cmp w0, 96 bls .L5 ldrb w0, [sp, 15] cmp w0, 102 bhi .L5 ldrb w0, [sp, 15] sub w0, w0, #87 b .L3 .L5: mov w0, -1 .L3: add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size hex2int, .-hex2int .section .rodata .align 3 .LC0: .string "usuage is: hex2bin hexString binaryFile" .align 3 .LC1: .string "w" .align 3 .LC2: .string "invalid hex length\n" .align 3 .LC3: .string "non-hex input\n" .text .align 2 .global main .type main, %function main: .LFB7: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] ldr w0, [sp, 28] cmp w0, 3 beq .L7 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf mov w0, -1 bl exit .L7: str wzr, [sp, 36] ldr x0, [sp, 16] add x0, x0, 16 ldr x2, [x0] adrp x0, .LC1 add x1, x0, :lo12:.LC1 mov x0, x2 bl fopen str x0, [sp, 56] str wzr, [sp, 40] b .L8 .L9: ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L8: ldr x0, [sp, 16] add x0, x0, 8 ldr x1, [x0] ldr w0, [sp, 40] add x0, x1, x0 ldrb w0, [x0] cmp w0, 0 bne .L9 ldr w0, [sp, 40] and w0, w0, 1 cmp w0, 0 beq .L10 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] mov x3, x0 mov x2, 19 mov x1, 1 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl fwrite mov w0, 1 bl exit .L10: str wzr, [sp, 36] b .L11 .L15: ldr x0, [sp, 16] add x0, x0, 8 ldr x1, [x0] ldrsw x0, [sp, 36] add x0, x1, x0 ldrb w0, [x0] bl hex2int str w0, [sp, 44] ldr x0, [sp, 16] add x0, x0, 8 ldr x1, [x0] ldrsw x0, [sp, 36] add x0, x0, 1 add x0, x1, x0 ldrb w0, [x0] bl hex2int str w0, [sp, 48] ldr w0, [sp, 44] cmn w0, #1 beq .L12 ldr w0, [sp, 48] cmn w0, #1 bne .L13 .L12: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] mov x3, x0 mov x2, 14 mov x1, 1 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl fwrite mov w0, 1 bl exit .L13: ldr w0, [sp, 44] lsl w0, w0, 4 ldr w1, [sp, 48] add w0, w1, w0 str w0, [sp, 52] ldr x0, [sp, 56] cmp x0, 0 beq .L14 ldr x1, [sp, 56] ldr w0, [sp, 52] bl fputc .L14: ldr w0, [sp, 36] add w0, w0, 2 str w0, [sp, 36] .L11: ldr w0, [sp, 40] sub w1, w0, #1 ldr w0, [sp, 36] cmp w1, w0 bhi .L15 ldr x0, [sp, 56] cmp x0, 0 beq .L16 ldr x0, [sp, 56] bl fclose .L16: mov w0, 0 bl exit .cfi_endproc .LFE7: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "hex2bin.c" .text .align 2 .global hex2int .type hex2int, %function hex2int: .LFB39: .cfi_startproc and w0, w0, 255 sub w1, w0, #48 and w1, w1, 255 cmp w1, 9 bls .L6 sub w1, w0, #65 and w1, w1, 255 cmp w1, 5 bls .L7 sub w1, w0, #97 and w1, w1, 255 cmp w1, 5 bhi .L5 sub w0, w0, #87 .L1: ret .L6: sub w0, w0, #48 b .L1 .L7: sub w0, w0, #55 b .L1 .L5: mov w0, -1 b .L1 .cfi_endproc .LFE39: .size hex2int, .-hex2int .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "usuage is: hex2bin hexString binaryFile" .align 3 .LC1: .string "w" .align 3 .LC2: .string "invalid hex length\n" .align 3 .LC3: .string "non-hex input\n" .text .align 2 .global main .type main, %function main: .LFB40: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov x29, sp cmp w0, 3 beq .L9 stp x19, x20, [sp, 16] .cfi_remember_state .cfi_offset 20, -40 .cfi_offset 19, -48 stp x21, x22, [sp, 32] .cfi_offset 22, -24 .cfi_offset 21, -32 stp x23, x24, [sp, 48] .cfi_offset 24, -8 .cfi_offset 23, -16 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk mov w0, -1 bl exit .L9: .cfi_restore_state stp x19, x20, [sp, 16] .cfi_offset 20, -40 .cfi_offset 19, -48 stp x21, x22, [sp, 32] .cfi_offset 22, -24 .cfi_offset 21, -32 stp x23, x24, [sp, 48] .cfi_offset 24, -8 .cfi_offset 23, -16 mov x21, x1 adrp x1, .LC1 add x1, x1, :lo12:.LC1 ldr x0, [x21, 16] bl fopen mov x22, x0 ldr x1, [x21, 8] ldrb w0, [x1] cbz w0, .L18 mov w2, 0 .L11: mov w23, w2 add w2, w2, 1 ldrb w0, [x1, w2, uxtw] cbnz w0, .L11 tbnz x2, 0, .L12 cbz w23, .L13 .L10: mov x24, 0 .L16: ldr x20, [x21, 8] ldrb w0, [x20, x24] bl hex2int mov w19, w0 add x20, x20, x24 ldrb w0, [x20, 1] bl hex2int cmn w19, #1 ccmn w0, #1, 4, ne beq .L22 add w0, w0, w19, lsl 4 cbz x22, .L15 mov x1, x22 bl fputc .L15: add x24, x24, 2 cmp w23, w24 bhi .L16 .L13: cbz x22, .L17 mov x0, x22 bl fclose .L17: mov w0, 0 bl exit .L12: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] mov x2, 19 mov x1, 1 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl fwrite mov w0, 1 bl exit .L18: mov w23, -1 b .L10 .L22: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] mov x2, 14 mov x1, 1 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl fwrite mov w0, 1 bl exit .cfi_endproc .LFE40: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "hex2bin.c" .text .align 2 .p2align 4,,11 .global hex2int .type hex2int, %function hex2int: .LFB39: .cfi_startproc and w1, w0, 255 sub w0, w1, #48 and w2, w0, 255 cmp w2, 9 bls .L1 sub w0, w1, #65 and w0, w0, 255 cmp w0, 5 bls .L7 sub w0, w1, #97 and w0, w0, 255 cmp w0, 5 bhi .L5 sub w0, w1, #87 .L1: ret .p2align 2,,3 .L7: sub w0, w1, #55 ret .L5: mov w0, -1 ret .cfi_endproc .LFE39: .size hex2int, .-hex2int .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "usuage is: hex2bin hexString binaryFile" .align 3 .LC1: .string "w" .align 3 .LC2: .string "invalid hex length\n" .align 3 .LC3: .string "non-hex input\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB40: .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 20, -24 .cfi_offset 19, -32 stp x21, x22, [sp, 32] .cfi_offset 22, -8 .cfi_offset 21, -16 cmp w0, 3 beq .L9 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk mov w0, -1 bl exit .L9: mov x20, x1 adrp x1, .LC1 add x1, x1, :lo12:.LC1 ldr x0, [x20, 16] bl fopen mov x22, x0 ldr x3, [x20, 8] ldrb w0, [x3] cbz w0, .L25 mov w2, 0 .p2align 3,,7 .L11: mov w21, w2 add w2, w2, 1 ldrb w4, [x3, w2, uxtw] cbnz w4, .L11 tbnz x2, 0, .L12 cbz w21, .L13 .L10: mov x19, 0 b .L23 .p2align 2,,3 .L16: sub w0, w4, #97 and w0, w0, 255 cmp w0, 5 bhi .L26 sub w2, w4, #87 .L15: add x3, x3, x19 ldrb w4, [x3, 1] sub w3, w4, #48 and w0, w3, 255 cmp w0, 9 bls .L18 sub w3, w4, #65 and w3, w3, 255 cmp w3, 5 bls .L36 sub w0, w4, #97 and w0, w0, 255 cmp w0, 5 bhi .L20 sub w3, w4, #87 .L18: cmn w2, #1 beq .L20 add w0, w3, w2, lsl 4 cbz x22, .L22 mov x1, x22 bl fputc .L22: add x19, x19, 2 cmp w21, w19 bls .L13 ldr x3, [x20, 8] .L23: ldrb w4, [x3, x19] sub w2, w4, #48 and w0, w2, 255 cmp w0, 9 bls .L15 sub w2, w4, #65 and w2, w2, 255 cmp w2, 5 bhi .L16 sub w2, w4, #55 b .L15 .L12: adrp x3, :got:stderr mov x2, 19 mov x1, 1 adrp x0, .LC2 ldr x3, [x3, #:got_lo12:stderr] add x0, x0, :lo12:.LC2 ldr x3, [x3] bl fwrite mov w0, 1 bl exit .L13: cbz x22, .L24 mov x0, x22 bl fclose .L24: mov w0, 0 bl exit .L36: sub w3, w4, #55 b .L18 .L20: adrp x3, :got:stderr mov x2, 14 mov x1, 1 adrp x0, .LC3 ldr x3, [x3, #:got_lo12:stderr] add x0, x0, :lo12:.LC3 ldr x3, [x3] bl fwrite mov w0, 1 bl exit .L25: mov w21, -1 b .L10 .L26: mov w2, -1 b .L15 .cfi_endproc .LFE40: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "hex2bin.c" .text .align 2 .p2align 4,,11 .global hex2int .type hex2int, %function hex2int: .LFB39: .cfi_startproc and w1, w0, 255 sub w0, w1, #48 and w2, w0, 255 cmp w2, 9 bls .L1 sub w0, w1, #65 and w0, w0, 255 cmp w0, 5 bls .L7 sub w0, w1, #97 and w0, w0, 255 cmp w0, 5 bhi .L5 sub w0, w1, #87 .L1: ret .p2align 2,,3 .L7: sub w0, w1, #55 ret .L5: mov w0, -1 ret .cfi_endproc .LFE39: .size hex2int, .-hex2int .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "usuage is: hex2bin hexString binaryFile" .align 3 .LC1: .string "w" .align 3 .LC2: .string "invalid hex length\n" .align 3 .LC3: .string "non-hex input\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB40: .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 20, -24 .cfi_offset 19, -32 stp x21, x22, [sp, 32] .cfi_offset 22, -8 .cfi_offset 21, -16 cmp w0, 3 beq .L9 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk mov w0, -1 bl exit .L9: mov x20, x1 adrp x1, .LC1 add x1, x1, :lo12:.LC1 ldr x0, [x20, 16] bl fopen mov x22, x0 ldr x2, [x20, 8] ldrb w0, [x2] cbz w0, .L28 mov w3, 0 .p2align 3,,7 .L11: mov w21, w3 add w3, w3, 1 ldrb w4, [x2, w3, uxtw] cbnz w4, .L11 tbnz x3, 0, .L12 cbz w21, .L40 .L10: mov x19, 0 cbnz x22, .L14 b .L41 .p2align 2,,3 .L21: sub w3, w4, #97 and w3, w3, 255 cmp w3, 5 bhi .L30 sub w3, w4, #87 .L20: add x2, x2, x19 ldrb w2, [x2, 1] sub w0, w2, #48 and w4, w0, 255 cmp w4, 9 bls .L23 sub w4, w2, #65 sub w0, w2, #55 and w4, w4, 255 cmp w4, 5 bls .L23 sub w4, w2, #97 and w4, w4, 255 cmp w4, 5 bhi .L16 sub w0, w2, #87 .L23: cmn w3, #1 beq .L16 add x19, x19, 2 add w0, w0, w3, lsl 4 mov x1, x22 bl fputc cmp w21, w19 bls .L26 ldr x2, [x20, 8] .L14: ldrb w4, [x2, x19] sub w3, w4, #48 and w5, w3, 255 cmp w5, 9 bls .L20 sub w3, w4, #65 and w3, w3, 255 cmp w3, 5 bhi .L21 sub w3, w4, #55 b .L20 .L12: adrp x3, :got:stderr mov x2, 19 mov x1, 1 adrp x0, .LC2 ldr x3, [x3, #:got_lo12:stderr] add x0, x0, :lo12:.LC2 ldr x3, [x3] bl fwrite mov w0, 1 bl exit .L40: cbz x22, .L18 .L26: mov x0, x22 bl fclose .L18: mov w0, 0 bl exit .L41: mov x1, 0 b .L17 .L27: add x1, x1, 2 cmp w21, w1 bls .L18 .L17: ldrb w0, [x2, x1] sub w3, w0, #48 and w3, w3, 255 cmp w3, 9 bls .L15 sub w3, w0, #65 and w3, w3, 255 cmp w3, 5 bls .L15 sub w0, w0, #97 and w0, w0, 255 cmp w0, 5 bhi .L16 .L15: add x0, x2, x1 ldrb w0, [x0, 1] sub w3, w0, #48 and w3, w3, 255 cmp w3, 9 bls .L27 and w0, w0, -33 sub w0, w0, #65 and w0, w0, 255 cmp w0, 5 bls .L27 .L16: adrp x3, :got:stderr mov x2, 14 mov x1, 1 adrp x0, .LC3 ldr x3, [x3, #:got_lo12:stderr] add x0, x0, :lo12:.LC3 ldr x3, [x3] bl fwrite mov w0, 1 bl exit .L28: mov w21, -1 b .L10 .L30: mov w3, -1 b .L20 .cfi_endproc .LFE40: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
ds2490.c
const char dtlib[] = "DS2490";
.file "ds2490.c" .option pic .text .globl dtlib .section .rodata .align 3 .type dtlib, @object .size dtlib, 7 dtlib: .string "DS2490" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "ds2490.c" .option pic .text .globl dtlib .section .rodata .align 3 .type dtlib, @object .size dtlib, 7 dtlib: .string "DS2490" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "ds2490.c" .option pic .text .globl dtlib .section .rodata .align 3 .type dtlib, @object .size dtlib, 7 dtlib: .string "DS2490" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "ds2490.c" .option pic .text .globl dtlib .section .rodata .align 3 .type dtlib, @object .size dtlib, 7 dtlib: .string "DS2490" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ds2490.c" .text .global dtlib .section .rodata .align 3 .type dtlib, %object .size dtlib, 7 dtlib: .string "DS2490" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ds2490.c" .text .global dtlib .section .rodata .align 3 .type dtlib, %object .size dtlib, 7 dtlib: .string "DS2490" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ds2490.c" .text .global dtlib .section .rodata .align 3 .type dtlib, %object .size dtlib, 7 dtlib: .string "DS2490" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ds2490.c" .text .global dtlib .section .rodata .align 3 .type dtlib, %object .size dtlib, 7 dtlib: .string "DS2490" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
linearsearch.c
#include<stdio.h> struct Array { int A[10]; int size; int length; }; void Display(struct Array arr) { int i; printf("\nElements are\n"); for(i=0;i<arr.length;i++) printf("%d ",arr.A[i]); } void Append(struct Array *arr,int x) { if(arr->length<arr->size) arr->A[arr->length++]=x; } void Insert(struct Array *arr,int index,int x) { int i; if(index>=0 && index <=arr->length) { for(i=arr->length;i>index;i--) arr->A[i]=arr->A[i-1]; arr->A[index]=x; arr->length++; } } void delete(struct Array *arr,int index){ if(index>=0 && index<arr->length){ for(int i=index;i<arr->length- 1;i++){ arr->A[i]=arr->A[i+ 1]; } arr->length--; } } int swap(int *x,int *y){ int temp; temp=*x; *x=*y; *y=temp; } int linear_search(struct Array *arr,int key){ for(int i=0;i<arr->length;i++){ if(key==arr->A[i]){ swap(&arr->A[i],&arr->A[i- 1]); return i+ 1; //move to front/head //swap(&arr->A[i],&arr->A[i- 1]); } } return 0; } int main() { struct Array arr1={{2,3,4,5,6},10,5}; Append(&arr1,10); Insert(&arr1,0,12); delete(&arr1,arr1.length-1); Display(arr1); printf("\n"); printf("%d",linear_search(&arr1,5)); printf("\n"); Display(arr1); return 0; }
.file "linearsearch.c" .option pic .text .section .rodata .align 3 .LC0: .string "\nElements are" .align 3 .LC1: .string "%d " .text .align 1 .globl Display .type Display, @function Display: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) addi s0,sp,48 mv s1,a0 lla a0,.LC0 call puts@plt sw zero,-36(s0) j .L2 .L3: lw a5,-36(s0) slli a5,a5,2 add a5,s1,a5 lw a5,0(a5) mv a1,a5 lla a0,.LC1 call printf@plt lw a5,-36(s0) addiw a5,a5,1 sw a5,-36(s0) .L2: lw a4,44(s1) lw a5,-36(s0) sext.w a5,a5 blt a5,a4,.L3 nop nop ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) addi sp,sp,48 jr ra .size Display, .-Display .align 1 .globl Append .type Append, @function Append: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-24(s0) mv a5,a1 sw a5,-28(s0) ld a5,-24(s0) lw a4,44(a5) ld a5,-24(s0) lw a5,40(a5) bge a4,a5,.L6 ld a5,-24(s0) lw a5,44(a5) addiw a4,a5,1 sext.w a3,a4 ld a4,-24(s0) sw a3,44(a4) ld a4,-24(s0) slli a5,a5,2 add a5,a4,a5 lw a4,-28(s0) sw a4,0(a5) .L6: nop ld s0,24(sp) addi sp,sp,32 jr ra .size Append, .-Append .align 1 .globl Insert .type Insert, @function Insert: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 mv a4,a2 sw a5,-44(s0) mv a5,a4 sw a5,-48(s0) lw a5,-44(s0) sext.w a5,a5 blt a5,zero,.L11 ld a5,-40(s0) lw a4,44(a5) lw a5,-44(s0) sext.w a5,a5 bgt a5,a4,.L11 ld a5,-40(s0) lw a5,44(a5) sw a5,-20(s0) j .L9 .L10: lw a5,-20(s0) addiw a5,a5,-1 sext.w a5,a5 ld a4,-40(s0) slli a5,a5,2 add a5,a4,a5 lw a4,0(a5) ld a3,-40(s0) lw a5,-20(s0) slli a5,a5,2 add a5,a3,a5 sw a4,0(a5) lw a5,-20(s0) addiw a5,a5,-1 sw a5,-20(s0) .L9: lw a5,-20(s0) mv a4,a5 lw a5,-44(s0) sext.w a4,a4 sext.w a5,a5 bgt a4,a5,.L10 ld a4,-40(s0) lw a5,-44(s0) slli a5,a5,2 add a5,a4,a5 lw a4,-48(s0) sw a4,0(a5) ld a5,-40(s0) lw a5,44(a5) addiw a5,a5,1 sext.w a4,a5 ld a5,-40(s0) sw a4,44(a5) .L11: nop ld s0,40(sp) addi sp,sp,48 jr ra .size Insert, .-Insert .align 1 .globl delete .type delete, @function delete: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 sw a5,-44(s0) lw a5,-44(s0) sext.w a5,a5 blt a5,zero,.L16 ld a5,-40(s0) lw a4,44(a5) lw a5,-44(s0) sext.w a5,a5 bge a5,a4,.L16 lw a5,-44(s0) sw a5,-20(s0) j .L14 .L15: lw a5,-20(s0) addiw a5,a5,1 sext.w a5,a5 ld a4,-40(s0) slli a5,a5,2 add a5,a4,a5 lw a4,0(a5) ld a3,-40(s0) lw a5,-20(s0) slli a5,a5,2 add a5,a3,a5 sw a4,0(a5) lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L14: ld a5,-40(s0) lw a5,44(a5) addiw a5,a5,-1 sext.w a4,a5 lw a5,-20(s0) sext.w a5,a5 blt a5,a4,.L15 ld a5,-40(s0) lw a5,44(a5) addiw a5,a5,-1 sext.w a4,a5 ld a5,-40(s0) sw a4,44(a5) .L16: nop ld s0,40(sp) addi sp,sp,48 jr ra .size delete, .-delete .align 1 .globl swap .type swap, @function swap: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd a0,-40(s0) sd a1,-48(s0) ld a5,-40(s0) lw a5,0(a5) sw a5,-20(s0) ld a5,-48(s0) lw a4,0(a5) ld a5,-40(s0) sw a4,0(a5) ld a5,-48(s0) lw a4,-20(s0) sw a4,0(a5) nop mv a0,a5 ld s0,40(sp) addi sp,sp,48 jr ra .size swap, .-swap .align 1 .globl linear_search .type linear_search, @function linear_search: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 sw a5,-44(s0) sw zero,-20(s0) j .L19 .L22: ld a4,-40(s0) lw a5,-20(s0) slli a5,a5,2 add a5,a4,a5 lw a4,0(a5) lw a5,-44(s0) sext.w a5,a5 bne a5,a4,.L20 lw a5,-20(s0) slli a5,a5,2 ld a4,-40(s0) add a3,a4,a5 lw a5,-20(s0) addiw a5,a5,-1 sext.w a5,a5 slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 mv a1,a5 mv a0,a3 call swap lw a5,-20(s0) addiw a5,a5,1 sext.w a5,a5 j .L21 .L20: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L19: ld a5,-40(s0) lw a4,44(a5) lw a5,-20(s0) sext.w a5,a5 blt a5,a4,.L22 li a5,0 .L21: mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size linear_search, .-linear_search .section .rodata .align 3 .LC2: .string "%d" .text .align 1 .globl main .type main, @function main: addi sp,sp,-128 sd ra,120(sp) sd s0,112(sp) addi s0,sp,128 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 sd zero,-72(s0) sd zero,-64(s0) sd zero,-56(s0) sd zero,-48(s0) sd zero,-40(s0) sd zero,-32(s0) li a5,2 sw a5,-72(s0) li a5,3 sw a5,-68(s0) li a5,4 sw a5,-64(s0) li a5,5 sw a5,-60(s0) li a5,6 sw a5,-56(s0) li a5,10 sw a5,-32(s0) li a5,5 sw a5,-28(s0) addi a5,s0,-72 li a1,10 mv a0,a5 call Append addi a5,s0,-72 li a2,12 li a1,0 mv a0,a5 call Insert lw a5,-28(s0) addiw a5,a5,-1 sext.w a4,a5 addi a5,s0,-72 mv a1,a4 mv a0,a5 call delete ld a0,-72(s0) ld a1,-64(s0) ld a2,-56(s0) ld a3,-48(s0) ld a4,-40(s0) ld a5,-32(s0) sd a0,-128(s0) sd a1,-120(s0) sd a2,-112(s0) sd a3,-104(s0) sd a4,-96(s0) sd a5,-88(s0) addi a5,s0,-128 mv a0,a5 call Display li a0,10 call putchar@plt addi a5,s0,-72 li a1,5 mv a0,a5 call linear_search mv a5,a0 mv a1,a5 lla a0,.LC2 call printf@plt li a0,10 call putchar@plt ld a0,-72(s0) ld a1,-64(s0) ld a2,-56(s0) ld a3,-48(s0) ld a4,-40(s0) ld a5,-32(s0) sd a0,-128(s0) sd a1,-120(s0) sd a2,-112(s0) sd a3,-104(s0) sd a4,-96(s0) sd a5,-88(s0) addi a5,s0,-128 mv a0,a5 call Display li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L25 call __stack_chk_fail@plt .L25: mv a0,a4 ld ra,120(sp) ld s0,112(sp) addi sp,sp,128 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "linearsearch.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nElements are" .align 3 .LC1: .string "%d " .text .align 1 .globl Display .type Display, @function Display: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) mv s2,a0 lw s1,44(a0) lla a0,.LC0 call puts@plt ble s1,zero,.L1 mv s0,s2 addiw s1,s1,-1 slli a5,s1,32 srli s1,a5,30 addi s2,s2,4 add s1,s1,s2 lla s2,.LC1 .L3: lw a2,0(s0) mv a1,s2 li a0,1 call __printf_chk@plt addi s0,s0,4 bne s0,s1,.L3 .L1: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .size Display, .-Display .align 1 .globl Append .type Append, @function Append: lw a5,44(a0) lw a4,40(a0) ble a4,a5,.L6 addiw a4,a5,1 sw a4,44(a0) slli a5,a5,2 add a0,a0,a5 sw a1,0(a0) .L6: ret .size Append, .-Append .align 1 .globl Insert .type Insert, @function Insert: blt a1,zero,.L8 lw a6,44(a0) blt a6,a1,.L8 ble a6,a1,.L10 slli a4,a6,2 add a5,a0,a4 addi a3,a0,-4 add a3,a3,a4 addiw a4,a6,-1 subw a4,a4,a1 slli a7,a4,32 srli a4,a7,30 sub a3,a3,a4 .L11: lw a4,-4(a5) sw a4,0(a5) addi a5,a5,-4 bne a5,a3,.L11 .L10: slli a1,a1,2 add a1,a0,a1 sw a2,0(a1) addiw a6,a6,1 sw a6,44(a0) .L8: ret .size Insert, .-Insert .align 1 .globl delete .type delete, @function delete: blt a1,zero,.L13 lw a4,44(a0) ble a4,a1,.L13 addiw a2,a4,-1 sext.w a5,a2 bge a1,a5,.L15 slli a5,a1,2 add a5,a0,a5 addiw a4,a4,-2 subw a4,a4,a1 slli a4,a4,32 srli a4,a4,32 add a4,a4,a1 slli a4,a4,2 addi a3,a0,4 add a4,a4,a3 .L16: lw a3,4(a5) sw a3,0(a5) addi a5,a5,4 bne a5,a4,.L16 .L15: sw a2,44(a0) .L13: ret .size delete, .-delete .align 1 .globl swap .type swap, @function swap: lw a5,0(a0) lw a4,0(a1) sw a4,0(a0) sw a5,0(a1) ret .size swap, .-swap .align 1 .globl linear_search .type linear_search, @function linear_search: lw a2,44(a0) ble a2,zero,.L23 mv a4,a0 li a5,0 .L22: lw a3,0(a4) beq a3,a1,.L25 addiw a5,a5,1 addi a4,a4,4 bne a2,a5,.L22 li a0,0 ret .L25: slli a4,a5,2 add a0,a0,a4 lw a4,-4(a0) sw a4,0(a0) sw a3,-4(a0) addiw a0,a5,1 ret .L23: li a0,0 ret .size linear_search, .-linear_search .section .rodata.str1.8 .align 3 .LC2: .string "%d" .text .align 1 .globl main .type main, @function main: addi sp,sp,-144 sd ra,136(sp) sd s0,128(sp) sd s1,120(sp) sd s2,112(sp) la s1,__stack_chk_guard ld a5, 0(s1) sd a5, 104(sp) li a5, 0 sd zero,80(sp) sd zero,88(sp) li a5,2 sw a5,56(sp) li a5,3 sw a5,60(sp) li a5,4 sw a5,64(sp) li a5,5 sw a5,68(sp) li a4,6 sw a4,72(sp) li a5,10 sw a5,96(sp) sw a4,100(sp) sw a5,76(sp) li a2,12 li a1,0 addi s0,sp,56 mv a0,s0 call Insert lw a1,100(sp) addiw a1,a1,-1 mv a0,s0 call delete ld a5,56(sp) sd a5,0(sp) ld a5,64(sp) sd a5,8(sp) ld a5,72(sp) sd a5,16(sp) ld a5,80(sp) sd a5,24(sp) ld a5,88(sp) sd a5,32(sp) ld a5,96(sp) sd a5,40(sp) mv s2,sp mv a0,s2 call Display li a0,10 call putchar@plt li a1,5 mv a0,s0 call linear_search mv a2,a0 lla a1,.LC2 li a0,1 call __printf_chk@plt li a0,10 call putchar@plt ld a5,56(sp) sd a5,0(sp) ld a5,64(sp) sd a5,8(sp) ld a5,72(sp) sd a5,16(sp) ld a5,80(sp) sd a5,24(sp) ld a5,88(sp) sd a5,32(sp) ld a5,96(sp) sd a5,40(sp) mv a0,s2 call Display ld a4, 104(sp) ld a5, 0(s1) xor a5, a4, a5 li a4, 0 bne a5,zero,.L29 li a0,0 ld ra,136(sp) ld s0,128(sp) ld s1,120(sp) ld s2,112(sp) addi sp,sp,144 jr ra .L29: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "linearsearch.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nElements are" .align 3 .LC1: .string "%d " .text .align 1 .globl Display .type Display, @function Display: addi sp,sp,-32 sd s1,8(sp) lw s1,44(a0) sd s0,16(sp) mv s0,a0 lla a0,.LC0 sd ra,24(sp) sd s2,0(sp) call puts@plt ble s1,zero,.L1 addiw s1,s1,-1 slli a5,s1,32 srli s1,a5,30 addi a5,s0,4 add s1,s1,a5 lla s2,.LC1 .L3: lw a2,0(s0) mv a1,s2 addi s0,s0,4 li a0,1 call __printf_chk@plt bne s0,s1,.L3 .L1: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .size Display, .-Display .align 1 .globl Append .type Append, @function Append: lw a5,44(a0) lw a4,40(a0) ble a4,a5,.L7 addiw a4,a5,1 slli a5,a5,2 sw a4,44(a0) add a0,a0,a5 sw a1,0(a0) .L7: ret .size Append, .-Append .align 1 .globl Insert .type Insert, @function Insert: blt a1,zero,.L13 addi sp,sp,-48 sd s3,8(sp) lw s3,44(a0) sd s0,32(sp) sd s1,24(sp) sd ra,40(sp) sd s2,16(sp) mv s0,a1 mv s1,a0 bgt a1,s3,.L9 mv s2,a2 bge a1,s3,.L11 subw a2,s3,a1 addiw a2,a2,-1 slli a2,a2,32 srli a2,a2,32 neg a5,a2 addi a1,s3,-1 slli a5,a5,2 slli a1,a1,2 slli a0,s3,2 addi a2,a2,1 add a1,a1,a5 add a0,a0,a5 slli a2,a2,2 add a1,s1,a1 add a0,s1,a0 call memmove@plt .L11: slli s0,s0,2 add s0,s1,s0 sw s2,0(s0) addiw s3,s3,1 sw s3,44(s1) .L9: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L13: ret .size Insert, .-Insert .align 1 .globl delete .type delete, @function delete: blt a1,zero,.L20 lw a5,44(a0) addi sp,sp,-32 sd s0,16(sp) sd ra,24(sp) sd s1,8(sp) mv s0,a0 bge a1,a5,.L16 addiw a4,a5,-1 mv s1,a4 bge a1,a4,.L18 addiw a2,a5,-2 subw a2,a2,a1 slli a0,a1,2 slli a5,a2,32 addi a1,a0,4 srli a2,a5,30 addi a2,a2,4 add a1,s0,a1 add a0,s0,a0 call memmove@plt .L18: sw s1,44(s0) .L16: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .L20: ret .size delete, .-delete .align 1 .globl swap .type swap, @function swap: lw a4,0(a1) lw a5,0(a0) sw a4,0(a0) sw a5,0(a1) ret .size swap, .-swap .align 1 .globl linear_search .type linear_search, @function linear_search: lw a3,44(a0) mv a6,a0 ble a3,zero,.L28 mv a5,a0 li a0,0 j .L27 .L26: addi a5,a5,4 beq a0,a3,.L28 .L27: lw a4,0(a5) mv a2,a0 addiw a0,a0,1 bne a4,a1,.L26 slli a2,a2,2 add a6,a6,a2 lw a5,-4(a6) sw a1,-4(a6) sw a5,0(a6) ret .L28: li a0,0 ret .size linear_search, .-linear_search .section .rodata.str1.8 .align 3 .LC2: .string "%d" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-144 li a4,1 li a5,3 sd s0,128(sp) sd s1,120(sp) slli a5,a5,33 slli a3,a4,33 la s1,__stack_chk_guard mv s0,sp slli a4,a4,34 addi a4,a4,3 addi a3,a3,12 addi a1,a5,5 li a2,10 addi a5,a5,10 ld a6, 0(s1) sd a6, 104(sp) li a6, 0 mv a0,s0 sd a4,64(sp) sd a4,8(sp) sd ra,136(sp) sd a3,56(sp) sd a5,96(sp) sd a3,0(sp) sd a5,40(sp) sd a2,80(sp) sd a2,24(sp) sd a1,72(sp) sd a1,16(sp) sd zero,88(sp) sd zero,32(sp) call Display li a0,10 call putchar@plt li a1,5 addi a0,sp,56 call linear_search mv a2,a0 lla a1,.LC2 li a0,1 call __printf_chk@plt li a0,10 call putchar@plt ld a5,56(sp) mv a0,s0 sd a5,0(sp) ld a5,64(sp) sd a5,8(sp) ld a5,72(sp) sd a5,16(sp) ld a5,80(sp) sd a5,24(sp) ld a5,88(sp) sd a5,32(sp) ld a5,96(sp) sd a5,40(sp) call Display ld a4, 104(sp) ld a5, 0(s1) xor a5, a4, a5 li a4, 0 bne a5,zero,.L33 ld ra,136(sp) ld s0,128(sp) ld s1,120(sp) li a0,0 addi sp,sp,144 jr ra .L33: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "linearsearch.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nElements are" .align 3 .LC1: .string "%d " .text .align 1 .globl Display .type Display, @function Display: addi sp,sp,-32 sd s1,8(sp) lw s1,44(a0) sd s0,16(sp) mv s0,a0 lla a0,.LC0 sd ra,24(sp) sd s2,0(sp) call puts@plt ble s1,zero,.L1 addiw s1,s1,-1 slli a5,s1,32 srli s1,a5,30 addi a5,s0,4 add s1,s1,a5 lla s2,.LC1 .L3: lw a2,0(s0) mv a1,s2 addi s0,s0,4 li a0,1 call __printf_chk@plt bne s0,s1,.L3 .L1: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .size Display, .-Display .align 1 .globl Append .type Append, @function Append: lw a5,44(a0) lw a4,40(a0) ble a4,a5,.L7 addiw a4,a5,1 slli a5,a5,2 sw a4,44(a0) add a0,a0,a5 sw a1,0(a0) .L7: ret .size Append, .-Append .align 1 .globl Insert .type Insert, @function Insert: blt a1,zero,.L13 addi sp,sp,-48 sd s3,8(sp) lw s3,44(a0) sd s0,32(sp) sd s1,24(sp) sd ra,40(sp) sd s2,16(sp) mv s0,a1 mv s1,a0 bgt a1,s3,.L9 mv s2,a2 bge a1,s3,.L11 subw a2,s3,a1 addiw a2,a2,-1 slli a2,a2,32 srli a2,a2,32 neg a5,a2 addi a1,s3,-1 slli a5,a5,2 slli a1,a1,2 slli a0,s3,2 addi a2,a2,1 add a1,a1,a5 add a0,a0,a5 slli a2,a2,2 add a1,s1,a1 add a0,s1,a0 call memmove@plt .L11: slli s0,s0,2 add s0,s1,s0 sw s2,0(s0) addiw s3,s3,1 sw s3,44(s1) .L9: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L13: ret .size Insert, .-Insert .align 1 .globl delete .type delete, @function delete: blt a1,zero,.L20 lw a5,44(a0) addi sp,sp,-32 sd s0,16(sp) sd ra,24(sp) sd s1,8(sp) mv s0,a0 bge a1,a5,.L16 addiw a4,a5,-1 mv s1,a4 bge a1,a4,.L18 addiw a2,a5,-2 subw a2,a2,a1 slli a0,a1,2 slli a5,a2,32 addi a1,a0,4 srli a2,a5,30 addi a2,a2,4 add a1,s0,a1 add a0,s0,a0 call memmove@plt .L18: sw s1,44(s0) .L16: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .L20: ret .size delete, .-delete .align 1 .globl swap .type swap, @function swap: lw a4,0(a1) lw a5,0(a0) sw a4,0(a0) sw a5,0(a1) ret .size swap, .-swap .align 1 .globl linear_search .type linear_search, @function linear_search: lw a4,44(a0) mv a5,a0 ble a4,zero,.L45 lw a3,0(a0) beq a3,a1,.L28 li a3,1 beq a4,a3,.L45 lw a3,4(a0) beq a3,a1,.L30 li a3,2 beq a4,a3,.L45 lw a3,8(a0) beq a3,a1,.L32 li a3,3 beq a4,a3,.L45 lw a3,12(a0) beq a3,a1,.L34 li a3,4 beq a4,a3,.L45 lw a3,16(a0) beq a3,a1,.L36 li a3,5 beq a4,a3,.L45 lw a3,20(a0) beq a3,a1,.L38 li a3,6 beq a4,a3,.L45 lw a3,24(a0) beq a3,a1,.L40 li a3,7 beq a4,a3,.L45 lw a3,28(a0) beq a3,a1,.L42 li a3,8 beq a4,a3,.L45 lw a3,32(a0) beq a3,a1,.L44 li a3,9 beq a4,a3,.L45 lw a4,36(a0) li a0,0 beq a4,a1,.L47 ret .L45: li a0,0 ret .L28: li a4,0 li a0,1 .L26: slli a4,a4,2 add a5,a5,a4 lw a4,-4(a5) sw a1,-4(a5) sw a4,0(a5) ret .L47: li a4,9 li a0,10 j .L26 .L30: li a4,1 li a0,2 j .L26 .L32: li a4,2 li a0,3 j .L26 .L34: li a4,3 li a0,4 j .L26 .L36: li a4,4 li a0,5 j .L26 .L38: li a4,5 li a0,6 j .L26 .L40: li a4,6 li a0,7 j .L26 .L42: li a4,7 li a0,8 j .L26 .L44: li a4,8 li a0,9 j .L26 .size linear_search, .-linear_search .section .rodata.str1.8 .align 3 .LC2: .string "%d" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-144 sd s0,128(sp) sd s1,120(sp) li s0,5 la s1,__stack_chk_guard li a5,3 ld a6, 0(s1) sd a6, 104(sp) li a6, 0 slli a3,s0,32 slli a4,s0,33 slli a5,a5,32 addi a4,a4,6 addi a3,a3,4 li a6,10 li a2,24 addi a1,sp,56 addi a5,a5,2 addi a0,sp,60 sd a4,72(sp) sd ra,136(sp) sw a6,96(sp) sd a3,64(sp) sd s2,112(sp) sd a5,56(sp) sd zero,80(sp) sd zero,88(sp) call memmove@plt li a5,12 sw a5,56(sp) li a5,6 sw a5,100(sp) ld a5,56(sp) mv s2,sp mv a0,s2 sd a5,0(sp) ld a5,64(sp) sd a5,8(sp) ld a5,72(sp) sd a5,16(sp) ld a5,80(sp) sd a5,24(sp) ld a5,88(sp) sd a5,32(sp) ld a5,96(sp) sd a5,40(sp) call Display li a0,10 call putchar@plt li a5,4 li a2,5 lla a1,.LC2 li a0,1 sw a5,72(sp) sw s0,68(sp) call __printf_chk@plt li a0,10 call putchar@plt ld a5,56(sp) mv a0,s2 sd a5,0(sp) ld a5,64(sp) sd a5,8(sp) ld a5,72(sp) sd a5,16(sp) ld a5,80(sp) sd a5,24(sp) ld a5,88(sp) sd a5,32(sp) ld a5,96(sp) sd a5,40(sp) call Display ld a4, 104(sp) ld a5, 0(s1) xor a5, a4, a5 li a4, 0 bne a5,zero,.L51 ld ra,136(sp) ld s0,128(sp) ld s1,120(sp) ld s2,112(sp) li a0,0 addi sp,sp,144 jr ra .L51: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "linearsearch.c" .text .section .rodata .align 3 .LC0: .string "\nElements are" .align 3 .LC1: .string "%d " .text .align 2 .global Display .type Display, %function Display: .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 mov x19, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts str wzr, [sp, 44] b .L2 .L3: ldrsw x0, [sp, 44] ldr w0, [x19, x0, lsl 2] mov w1, w0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L2: ldr w0, [x19, 44] ldr w1, [sp, 44] cmp w1, w0 blt .L3 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 .LFE0: .size Display, .-Display .align 2 .global Append .type Append, %function Append: .LFB1: .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, [x0, 44] ldr x0, [sp, 8] ldr w0, [x0, 40] cmp w1, w0 bge .L6 ldr x0, [sp, 8] ldr w0, [x0, 44] add w2, w0, 1 ldr x1, [sp, 8] str w2, [x1, 44] ldr x1, [sp, 8] sxtw x0, w0 ldr w2, [sp, 4] str w2, [x1, x0, lsl 2] .L6: nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size Append, .-Append .align 2 .global Insert .type Insert, %function Insert: .LFB2: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] str w2, [sp] ldr w0, [sp, 4] cmp w0, 0 blt .L11 ldr x0, [sp, 8] ldr w0, [x0, 44] ldr w1, [sp, 4] cmp w1, w0 bgt .L11 ldr x0, [sp, 8] ldr w0, [x0, 44] str w0, [sp, 28] b .L9 .L10: ldr w0, [sp, 28] sub w1, w0, #1 ldr x0, [sp, 8] sxtw x1, w1 ldr w2, [x0, x1, lsl 2] ldr x0, [sp, 8] ldrsw x1, [sp, 28] str w2, [x0, x1, lsl 2] ldr w0, [sp, 28] sub w0, w0, #1 str w0, [sp, 28] .L9: ldr w1, [sp, 28] ldr w0, [sp, 4] cmp w1, w0 bgt .L10 ldr x0, [sp, 8] ldrsw x1, [sp, 4] ldr w2, [sp] str w2, [x0, x1, lsl 2] ldr x0, [sp, 8] ldr w0, [x0, 44] add w1, w0, 1 ldr x0, [sp, 8] str w1, [x0, 44] .L11: nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size Insert, .-Insert .align 2 .global delete .type delete, %function delete: .LFB3: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] ldr w0, [sp, 4] cmp w0, 0 blt .L16 ldr x0, [sp, 8] ldr w0, [x0, 44] ldr w1, [sp, 4] cmp w1, w0 bge .L16 ldr w0, [sp, 4] str w0, [sp, 28] b .L14 .L15: ldr w0, [sp, 28] add w1, w0, 1 ldr x0, [sp, 8] sxtw x1, w1 ldr w2, [x0, x1, lsl 2] ldr x0, [sp, 8] ldrsw x1, [sp, 28] str w2, [x0, x1, lsl 2] ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L14: ldr x0, [sp, 8] ldr w0, [x0, 44] sub w0, w0, #1 ldr w1, [sp, 28] cmp w1, w0 blt .L15 ldr x0, [sp, 8] ldr w0, [x0, 44] sub w1, w0, #1 ldr x0, [sp, 8] str w1, [x0, 44] .L16: nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size delete, .-delete .align 2 .global swap .type swap, %function swap: .LFB4: .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, 28] ldr x0, [sp] ldr w1, [x0] ldr x0, [sp, 8] str w1, [x0] ldr x0, [sp] ldr w1, [sp, 28] str w1, [x0] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size swap, .-swap .align 2 .global linear_search .type linear_search, %function linear_search: .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 x0, [sp, 24] str w1, [sp, 20] str wzr, [sp, 44] b .L19 .L22: ldr x0, [sp, 24] ldrsw x1, [sp, 44] ldr w0, [x0, x1, lsl 2] ldr w1, [sp, 20] cmp w1, w0 bne .L20 ldrsw x0, [sp, 44] lsl x0, x0, 2 ldr x1, [sp, 24] add x2, x1, x0 ldr w0, [sp, 44] sub w0, w0, #1 sxtw x0, w0 lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 mov x1, x0 mov x0, x2 bl swap ldr w0, [sp, 44] add w0, w0, 1 b .L21 .L20: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L19: ldr x0, [sp, 24] ldr w0, [x0, 44] ldr w1, [sp, 44] cmp w1, w0 blt .L22 mov w0, 0 .L21: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE5: .size linear_search, .-linear_search .section .rodata .align 3 .LC2: .string "%d" .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 stp xzr, xzr, [sp, 72] stp xzr, xzr, [sp, 88] stp xzr, xzr, [sp, 104] mov w0, 2 str w0, [sp, 72] mov w0, 3 str w0, [sp, 76] mov w0, 4 str w0, [sp, 80] mov w0, 5 str w0, [sp, 84] mov w0, 6 str w0, [sp, 88] mov w0, 10 str w0, [sp, 112] mov w0, 5 str w0, [sp, 116] add x0, sp, 72 mov w1, 10 bl Append add x0, sp, 72 mov w2, 12 mov w1, 0 bl Insert ldr w0, [sp, 116] sub w1, w0, #1 add x0, sp, 72 bl delete add x0, sp, 16 add x1, sp, 72 ldp q0, q1, [x1] stp q0, q1, [x0] ldr q0, [x1, 32] str q0, [x0, 32] add x0, sp, 16 bl Display mov w0, 10 bl putchar add x0, sp, 72 mov w1, 5 bl linear_search mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf mov w0, 10 bl putchar add x0, sp, 16 add x1, sp, 72 ldp q0, q1, [x1] stp q0, q1, [x0] ldr q0, [x1, 32] str q0, [x0, 32] add x0, sp, 16 bl Display mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 120] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L25 bl __stack_chk_fail .L25: mov w0, w1 ldp x29, x30, [sp], 128 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "linearsearch.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nElements are" .align 3 .LC1: .string "%d " .text .align 2 .global Display .type Display, %function Display: .LFB23: .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] stp x21, x22, [sp, 32] .cfi_offset 19, -48 .cfi_offset 20, -40 .cfi_offset 21, -32 .cfi_offset 22, -24 mov x20, x0 ldr w21, [x0, 44] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts cmp w21, 0 ble .L1 str x23, [sp, 48] .cfi_offset 23, -16 add w21, w21, 1 mov x19, 1 adrp x22, .LC1 add x22, x22, :lo12:.LC1 mov w23, 1 .L3: add x1, x20, x19, lsl 2 ldr w2, [x1, -4] mov x1, x22 mov w0, w23 bl __printf_chk add x19, x19, 1 cmp x19, x21 bne .L3 ldr x23, [sp, 48] .cfi_restore 23 .L1: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size Display, .-Display .align 2 .global Append .type Append, %function Append: .LFB24: .cfi_startproc ldr w2, [x0, 44] ldr w3, [x0, 40] cmp w2, w3 bge .L6 add w3, w2, 1 str w3, [x0, 44] str w1, [x0, w2, sxtw 2] .L6: ret .cfi_endproc .LFE24: .size Append, .-Append .align 2 .global Insert .type Insert, %function Insert: .LFB25: .cfi_startproc tbnz w1, #31, .L8 ldr w6, [x0, 44] cmp w6, w1 blt .L8 ble .L10 sxtw x3, w6 sub x5, x0, #4 .L11: ldr w4, [x5, x3, lsl 2] str w4, [x0, x3, lsl 2] sub x3, x3, #1 cmp w1, w3 blt .L11 .L10: str w2, [x0, w1, sxtw 2] add w6, w6, 1 str w6, [x0, 44] .L8: ret .cfi_endproc .LFE25: .size Insert, .-Insert .align 2 .global delete .type delete, %function delete: .LFB26: .cfi_startproc tbnz w1, #31, .L13 ldr w3, [x0, 44] cmp w3, w1 ble .L13 sub w3, w3, #1 cmp w1, w3 bge .L15 sxtw x1, w1 add x4, x0, 4 .L16: ldr w2, [x4, x1, lsl 2] str w2, [x0, x1, lsl 2] add x1, x1, 1 cmp w3, w1 bgt .L16 .L15: str w3, [x0, 44] .L13: ret .cfi_endproc .LFE26: .size delete, .-delete .align 2 .global swap .type swap, %function swap: .LFB27: .cfi_startproc ldr w2, [x0] ldr w3, [x1] str w3, [x0] str w2, [x1] ret .cfi_endproc .LFE27: .size swap, .-swap .align 2 .global linear_search .type linear_search, %function linear_search: .LFB28: .cfi_startproc ldr w5, [x0, 44] cmp w5, 0 ble .L23 mov x2, 0 .L22: mov w4, w2 ldr w3, [x0, x2, lsl 2] cmp w3, w1 beq .L25 add x2, x2, 1 cmp w5, w2 bgt .L22 mov w0, 0 b .L19 .L25: add x1, x0, w2, sxtw 2 ldr w2, [x1, -4] str w2, [x0, w4, sxtw 2] str w3, [x1, -4] add w0, w4, 1 .L19: ret .L23: mov w0, 0 b .L19 .cfi_endproc .LFE28: .size linear_search, .-linear_search .section .rodata.str1.8 .align 3 .LC2: .string "%d" .text .align 2 .global main .type main, %function main: .LFB29: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -144 .cfi_offset 20, -136 .cfi_offset 21, -128 .cfi_offset 22, -120 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, 128] mov w0, 2 str w0, [sp, 104] mov w0, 3 str w0, [sp, 108] mov w0, 4 str w0, [sp, 112] mov w22, 5 str w22, [sp, 116] mov w0, 6 str w0, [sp, 120] mov w21, 10 str w21, [sp, 144] str w0, [sp, 148] str w21, [sp, 124] add x19, sp, 104 mov w2, 12 mov x0, x19 bl Insert ldr w1, [sp, 148] sub w1, w1, #1 mov x0, x19 bl delete add x20, sp, 48 ldp q0, q1, [x19] stp q0, q1, [x20] ldr q0, [x19, 32] str q0, [x20, 32] mov x0, x20 bl Display mov w0, w21 bl putchar mov w1, w22 mov x0, x19 bl linear_search mov w2, w0 adrp x1, .LC2 add x1, x1, :lo12:.LC2 mov w0, 1 bl __printf_chk mov w0, w21 bl putchar ldp q0, q1, [x19] stp q0, q1, [x20] ldr q0, [x19, 32] str q0, [x20, 32] mov x0, x20 bl Display adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 152] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L29 mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 160 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L29: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE29: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "linearsearch.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nElements are" .align 3 .LC1: .string "%d " .text .align 2 .p2align 4,,11 .global Display .type Display, %function Display: .LFB23: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LC0 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x20, x0 add x0, x1, :lo12:.LC0 stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 ldr w21, [x20, 44] bl puts cmp w21, 0 ble .L1 adrp x22, .LC1 add w21, w21, 1 add x22, x22, :lo12:.LC1 mov x19, 1 .p2align 3,,7 .L3: add x2, x20, x19, lsl 2 mov x1, x22 add x19, x19, 1 mov w0, 1 ldr w2, [x2, -4] bl __printf_chk cmp x19, x21 bne .L3 .L1: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size Display, .-Display .align 2 .p2align 4,,11 .global Append .type Append, %function Append: .LFB24: .cfi_startproc ldp w3, w2, [x0, 40] cmp w2, w3 bge .L7 add w3, w2, 1 str w3, [x0, 44] str w1, [x0, w2, sxtw 2] .L7: ret .cfi_endproc .LFE24: .size Append, .-Append .align 2 .p2align 4,,11 .global Insert .type Insert, %function Insert: .LFB25: .cfi_startproc tbnz w1, #31, .L13 stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 ldr w22, [x0, 44] stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x20, x0 mov w19, w1 cmp w1, w22 bgt .L9 mov w21, w2 bge .L11 sub w0, w22, w1 sub w0, w0, #1 add x2, x0, 1 neg x0, x0, lsl 2 add x1, x0, w22, sxtw 2 lsl x2, x2, 2 mov x0, x1 sub x1, x1, #4 add x1, x20, x1 add x0, x20, x0 bl memmove .L11: str w21, [x20, w19, sxtw 2] add w22, w22, 1 str w22, [x20, 44] .L9: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L13: ret .cfi_endproc .LFE25: .size Insert, .-Insert .align 2 .p2align 4,,11 .global delete .type delete, %function delete: .LFB26: .cfi_startproc tbnz w1, #31, .L20 stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov x19, x0 ldr w0, [x0, 44] cmp w1, w0 bge .L16 sub w20, w0, #1 cmp w1, w20 bge .L18 sub w2, w0, #2 sbfiz x0, x1, 2, 32 sub w2, w2, w1 add x1, x0, 4 add x2, x2, 1 add x1, x19, x1 add x0, x19, x0 lsl x2, x2, 2 bl memmove .L18: str w20, [x19, 44] .L16: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L20: ret .cfi_endproc .LFE26: .size delete, .-delete .align 2 .p2align 4,,11 .global swap .type swap, %function swap: .LFB27: .cfi_startproc mov x2, x0 ldr w4, [x1] ldr w3, [x2] str w4, [x2] str w3, [x1] ret .cfi_endproc .LFE27: .size swap, .-swap .align 2 .p2align 4,,11 .global linear_search .type linear_search, %function linear_search: .LFB28: .cfi_startproc ldr w5, [x0, 44] mov x4, x0 cmp w5, 0 ble .L28 mov x2, 0 b .L27 .p2align 2,,3 .L26: cmp w5, w2 ble .L28 .L27: ldr w3, [x4, x2, lsl 2] mov w6, w2 add w0, w2, 1 add x2, x2, 1 cmp w3, w1 bne .L26 add x2, x4, w6, sxtw 2 ldr w3, [x2, -4] str w3, [x4, w6, sxtw 2] str w1, [x2, -4] ret .p2align 2,,3 .L28: mov w0, 0 ret .cfi_endproc .LFE28: .size linear_search, .-linear_search .section .rodata.str1.8 .align 3 .LC2: .string "%d" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB29: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 adrp x0, :got:__stack_chk_guard mov x4, 12 mov x29, sp ldr x0, [x0, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] mov x3, 3 str x21, [sp, 32] .cfi_offset 19, -144 .cfi_offset 20, -136 .cfi_offset 21, -128 add x20, sp, 104 mov x2, 5 mov x1, 10 ldr x5, [x0] str x5, [sp, 152] mov x5, 0 movk x4, 0x2, lsl 32 movk x3, 0x4, lsl 32 movk x2, 0x6, lsl 32 movk x1, 0x6, lsl 32 mov x21, 10 stp x4, x3, [sp, 104] add x19, sp, 48 mov x0, x19 stp x2, x21, [sp, 120] stp xzr, x1, [sp, 136] ldp q1, q2, [x20] ldr q0, [x20, 32] stp q1, q2, [x19] str q0, [x19, 32] bl Display mov w0, w21 bl putchar mov w1, 5 mov x0, x20 bl linear_search adrp x1, .LC2 mov w2, w0 add x1, x1, :lo12:.LC2 mov w0, 1 bl __printf_chk mov w0, w21 bl putchar ldp q1, q2, [x20] mov x0, x19 ldr q0, [x20, 32] stp q1, q2, [x19] str q0, [x19, 32] bl Display adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 152] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L33 mov w0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 160 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L33: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE29: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "linearsearch.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nElements are" .align 3 .LC1: .string "%d " .text .align 2 .p2align 4,,11 .global Display .type Display, %function Display: .LFB23: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LC0 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x20, x0 add x0, x1, :lo12:.LC0 stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 ldr w21, [x20, 44] bl puts cmp w21, 0 ble .L1 adrp x22, .LC1 add w21, w21, 1 add x22, x22, :lo12:.LC1 mov x19, 1 .p2align 3,,7 .L3: add x2, x20, x19, lsl 2 mov x1, x22 add x19, x19, 1 mov w0, 1 ldr w2, [x2, -4] bl __printf_chk cmp x19, x21 bne .L3 .L1: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size Display, .-Display .align 2 .p2align 4,,11 .global Append .type Append, %function Append: .LFB24: .cfi_startproc ldp w3, w2, [x0, 40] cmp w2, w3 bge .L7 add w3, w2, 1 str w3, [x0, 44] str w1, [x0, w2, sxtw 2] .L7: ret .cfi_endproc .LFE24: .size Append, .-Append .align 2 .p2align 4,,11 .global Insert .type Insert, %function Insert: .LFB25: .cfi_startproc tbnz w1, #31, .L13 stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 ldr w22, [x0, 44] stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x20, x0 mov w19, w1 cmp w1, w22 bgt .L9 mov w21, w2 bge .L11 sub w0, w22, w1 sub w0, w0, #1 add x2, x0, 1 neg x0, x0, lsl 2 add x1, x0, w22, sxtw 2 lsl x2, x2, 2 mov x0, x1 sub x1, x1, #4 add x1, x20, x1 add x0, x20, x0 bl memmove .L11: str w21, [x20, w19, sxtw 2] add w22, w22, 1 str w22, [x20, 44] .L9: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L13: ret .cfi_endproc .LFE25: .size Insert, .-Insert .align 2 .p2align 4,,11 .global delete .type delete, %function delete: .LFB26: .cfi_startproc tbnz w1, #31, .L20 stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov x19, x0 ldr w0, [x0, 44] cmp w1, w0 bge .L16 sub w20, w0, #1 cmp w1, w20 bge .L18 sub w2, w0, #2 sbfiz x0, x1, 2, 32 sub w2, w2, w1 add x1, x0, 4 add x2, x2, 1 add x1, x19, x1 add x0, x19, x0 lsl x2, x2, 2 bl memmove .L18: str w20, [x19, 44] .L16: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L20: ret .cfi_endproc .LFE26: .size delete, .-delete .align 2 .p2align 4,,11 .global swap .type swap, %function swap: .LFB27: .cfi_startproc mov x2, x0 ldr w4, [x1] ldr w3, [x2] str w4, [x2] str w3, [x1] ret .cfi_endproc .LFE27: .size swap, .-swap .align 2 .p2align 4,,11 .global linear_search .type linear_search, %function linear_search: .LFB28: .cfi_startproc mov x2, x0 ldr w0, [x0, 44] cmp w0, 0 ble .L45 ldr w3, [x2] cmp w1, w3 beq .L28 cmp w0, 1 beq .L45 ldr w3, [x2, 4] cmp w1, w3 beq .L30 cmp w0, 2 beq .L45 ldr w3, [x2, 8] cmp w1, w3 beq .L32 cmp w0, 3 beq .L45 ldr w3, [x2, 12] cmp w1, w3 beq .L34 cmp w0, 4 beq .L45 ldr w3, [x2, 16] cmp w1, w3 beq .L36 cmp w0, 5 beq .L45 ldr w3, [x2, 20] cmp w1, w3 beq .L38 cmp w0, 6 beq .L45 ldr w3, [x2, 24] cmp w1, w3 beq .L40 cmp w0, 7 beq .L45 ldr w3, [x2, 28] cmp w1, w3 beq .L42 cmp w0, 8 beq .L45 ldr w3, [x2, 32] cmp w1, w3 beq .L44 cmp w0, 9 beq .L45 ldr w3, [x2, 36] mov w0, 0 cmp w3, w1 beq .L47 ret .p2align 2,,3 .L45: mov w0, 0 ret .L28: mov w4, 0 mov w0, 1 .L26: add x3, x2, w4, sxtw 2 ldr w5, [x3, -4] str w5, [x2, w4, sxtw 2] str w1, [x3, -4] ret .L47: mov w4, 9 mov w0, 10 b .L26 .L30: mov w4, 1 mov w0, 2 b .L26 .L32: mov w4, 2 mov w0, 3 b .L26 .L34: mov w4, 3 mov w0, 4 b .L26 .L36: mov w4, 4 mov w0, 5 b .L26 .L38: mov w4, 5 mov w0, 6 b .L26 .L40: mov w4, 6 mov w0, 7 b .L26 .L42: mov w4, 7 mov w0, 8 b .L26 .L44: mov w4, 8 mov w0, 9 b .L26 .cfi_endproc .LFE28: .size linear_search, .-linear_search .section .rodata.str1.8 .align 3 .LC2: .string "%d" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB29: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 adrp x1, .LC3 adrp x0, :got:__stack_chk_guard mov x29, sp ldr d0, [x1, #:lo12:.LC3] adrp x1, .LC4 ldr x0, [x0, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] .cfi_offset 19, -144 .cfi_offset 20, -136 add x20, sp, 96 str x21, [sp, 32] .cfi_offset 21, -128 mov x2, 24 ldr q1, [x1, #:lo12:.LC4] ldr x3, [x0] str x3, [sp, 152] mov x3, 0 mov w21, 10 mov x1, x20 add x0, sp, 100 str d0, [sp, 112] str q1, [sp, 96] add x19, sp, 48 stp xzr, xzr, [sp, 120] str w21, [sp, 136] bl memmove mov w1, 6 mov w0, 12 str w0, [sp, 96] mov x0, x19 str w1, [sp, 140] ldp q1, q2, [x20] ldr q0, [x20, 32] stp q1, q2, [x19] str q0, [x19, 32] bl Display mov w0, w21 bl putchar adrp x0, .LC5 adrp x1, .LC2 add x1, x1, :lo12:.LC2 mov w2, 5 ldr d0, [x0, #:lo12:.LC5] mov w0, 1 str d0, [sp, 108] bl __printf_chk mov w0, w21 bl putchar ldp q1, q2, [x20] mov x0, x19 ldr q0, [x20, 32] stp q1, q2, [x19] str q0, [x19, 32] bl Display adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 152] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L51 mov w0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 160 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L51: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE29: .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC3: .word 6 .word 10 .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC4: .word 2 .word 3 .word 4 .word 5 .section .rodata.cst8 .align 3 .LC5: .word 5 .word 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
main.c
/*------------------------------------------------------------ PROGRAMACIÓN AVANZADA HW01P04 Andrés César Magaña Martínez cesar@cimat.mx --------------------------------------------------------------*/ float SumFloats (int n){ int i; float sumf = 0.0; for ( i=1; i<n+1; i++ ) sumf+=(1/(float)n); return sumf; } double SumDoubles (int n){ int i; float sumd = 0.0; for ( i=1; i<n+1; i++ ) sumd+=(1/(float)n); return sumd; } #include <stdio.h> int main (int argc, const char * argv[]) { int i, n=10; float sumf, errorf; double sumd, errord; printf("n\tSuma con floats Diferencia con el valor real\n"); for ( i=1; i<n+1; i++ ) { sumf = SumFloats(i); errorf = 1.0-sumf; printf("%d %.25f \t%.25f\n", i, sumf, errorf); } printf("\n\n"); printf("n Suma con doubles Diferencia con el valor real\n"); for ( i=1; i<n+1; i++ ) { sumd = SumDoubles(i); errord = 1.0-sumd; printf( "%d %.25lf \t%.25lf\n", i, sumd, errord ); } printf("Presione cualquier tecla para salir...\n"); getchar(); return 0; }
.file "main.c" .option pic .text .align 1 .globl SumFloats .type SumFloats, @function SumFloats: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 mv a5,a0 sw a5,-36(s0) sw zero,-20(s0) li a5,1 sw a5,-24(s0) j .L2 .L3: lw a5,-36(s0) fcvt.s.w fa5,a5 lla a5,.LC0 flw fa4,0(a5) fdiv.s fa5,fa4,fa5 flw fa4,-20(s0) fadd.s fa5,fa4,fa5 fsw fa5,-20(s0) lw a5,-24(s0) addiw a5,a5,1 sw a5,-24(s0) .L2: lw a5,-36(s0) mv a4,a5 lw a5,-24(s0) sext.w a4,a4 sext.w a5,a5 bge a4,a5,.L3 flw fa5,-20(s0) fmv.s fa0,fa5 ld s0,40(sp) addi sp,sp,48 jr ra .size SumFloats, .-SumFloats .align 1 .globl SumDoubles .type SumDoubles, @function SumDoubles: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 mv a5,a0 sw a5,-36(s0) sw zero,-20(s0) li a5,1 sw a5,-24(s0) j .L6 .L7: lw a5,-36(s0) fcvt.s.w fa5,a5 lla a5,.LC0 flw fa4,0(a5) fdiv.s fa5,fa4,fa5 flw fa4,-20(s0) fadd.s fa5,fa4,fa5 fsw fa5,-20(s0) lw a5,-24(s0) addiw a5,a5,1 sw a5,-24(s0) .L6: lw a5,-36(s0) mv a4,a5 lw a5,-24(s0) sext.w a4,a4 sext.w a5,a5 bge a4,a5,.L7 flw fa5,-20(s0) fcvt.d.s fa5,fa5 fmv.d fa0,fa5 ld s0,40(sp) addi sp,sp,48 jr ra .size SumDoubles, .-SumDoubles .section .rodata .align 3 .LC1: .string "n\tSuma con floats Diferencia con el valor real" .align 3 .LC2: .string "%d %.25f \t%.25f\n" .align 3 .LC3: .string "\n" .align 3 .LC4: .string "n Suma con doubles Diferencia con el valor real" .align 3 .LC6: .string "%d %.25lf \t%.25lf\n" .align 3 .LC7: .string "Presione cualquier tecla para salir..." .text .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 mv a5,a0 sd a1,-64(s0) sw a5,-52(s0) li a5,10 sw a5,-44(s0) lla a0,.LC1 call puts@plt li a5,1 sw a5,-48(s0) j .L10 .L11: lw a5,-48(s0) mv a0,a5 call SumFloats fsw fa0,-40(s0) lla a5,.LC0 flw fa4,0(a5) flw fa5,-40(s0) fsub.s fa5,fa4,fa5 fsw fa5,-36(s0) flw fa5,-40(s0) fcvt.d.s fa4,fa5 flw fa5,-36(s0) fcvt.d.s fa5,fa5 lw a5,-48(s0) fmv.x.d a3,fa5 fmv.x.d a2,fa4 mv a1,a5 lla a0,.LC2 call printf@plt lw a5,-48(s0) addiw a5,a5,1 sw a5,-48(s0) .L10: lw a5,-44(s0) mv a4,a5 lw a5,-48(s0) sext.w a4,a4 sext.w a5,a5 bge a4,a5,.L11 lla a0,.LC3 call puts@plt lla a0,.LC4 call puts@plt li a5,1 sw a5,-48(s0) j .L12 .L13: lw a5,-48(s0) mv a0,a5 call SumDoubles fsd fa0,-32(s0) lla a5,.LC5 fld fa4,0(a5) fld fa5,-32(s0) fsub.d fa5,fa4,fa5 fsd fa5,-24(s0) lw a5,-48(s0) ld a3,-24(s0) ld a2,-32(s0) mv a1,a5 lla a0,.LC6 call printf@plt lw a5,-48(s0) addiw a5,a5,1 sw a5,-48(s0) .L12: lw a5,-44(s0) mv a4,a5 lw a5,-48(s0) sext.w a4,a4 sext.w a5,a5 bge a4,a5,.L13 lla a0,.LC7 call puts@plt call getchar@plt li a5,0 mv a0,a5 ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .size main, .-main .section .rodata .align 2 .LC0: .word 1065353216 .align 3 .LC5: .word 0 .word 1072693248 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "main.c" .option pic .text .align 1 .globl SumFloats .type SumFloats, @function SumFloats: ble a0,zero,.L4 fcvt.s.w fa4,a0 flw fa5,.LC0,a5 fdiv.s fa5,fa5,fa4 addiw a0,a0,1 fmv.w.x fa0,zero li a5,1 .L3: fadd.s fa0,fa0,fa5 addiw a5,a5,1 bne a5,a0,.L3 ret .L4: fmv.w.x fa0,zero ret .size SumFloats, .-SumFloats .align 1 .globl SumDoubles .type SumDoubles, @function SumDoubles: ble a0,zero,.L9 fcvt.s.w fa4,a0 flw fa5,.LC0,a5 fdiv.s fa5,fa5,fa4 addiw a0,a0,1 fmv.w.x fa0,zero li a5,1 .L8: fadd.s fa0,fa0,fa5 addiw a5,a5,1 bne a5,a0,.L8 .L7: fcvt.d.s fa0,fa0 ret .L9: fmv.w.x fa0,zero j .L7 .size SumDoubles, .-SumDoubles .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC1: .string "n\tSuma con floats Diferencia con el valor real" .align 3 .LC2: .string "%d %.25f \t%.25f\n" .align 3 .LC3: .string "\n" .align 3 .LC4: .string "n Suma con doubles Diferencia con el valor real" .align 3 .LC6: .string "%d %.25lf \t%.25lf\n" .align 3 .LC7: .string "Presione cualquier tecla para salir..." .text .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) fsd fs0,8(sp) lla a0,.LC1 call puts@plt li s0,1 flw fs0,.LC0,a5 lla s2,.LC2 li s1,11 .L12: mv a0,s0 call SumFloats fsub.s fa5,fs0,fa0 fcvt.d.s fa5,fa5 fmv.x.d a4,fa5 fcvt.d.s fa5,fa0 fmv.x.d a3,fa5 mv a2,s0 mv a1,s2 li a0,1 call __printf_chk@plt addiw s0,s0,1 bne s0,s1,.L12 lla a0,.LC3 call puts@plt lla a0,.LC4 call puts@plt li s0,1 fld fs0,.LC5,a5 lla s2,.LC6 li s1,11 .L13: mv a0,s0 call SumDoubles fsub.d fa5,fs0,fa0 fmv.x.d a4,fa5 fmv.x.d a3,fa0 mv a2,s0 mv a1,s2 li a0,1 call __printf_chk@plt addiw s0,s0,1 bne s0,s1,.L13 lla a0,.LC7 call puts@plt la a5,stdin ld a0,0(a5) call getc@plt li a0,0 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) fld fs0,8(sp) addi sp,sp,48 jr ra .size main, .-main .section .rodata.cst4,"aM",@progbits,4 .align 2 .LC0: .word 1065353216 .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC5: .word 0 .word 1072693248 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "main.c" .option pic .text .align 1 .globl SumFloats .type SumFloats, @function SumFloats: ble a0,zero,.L4 fcvt.s.w fa4,a0 flw fa5,.LC0,a5 fmv.w.x fa0,zero fdiv.s fa5,fa5,fa4 addiw a0,a0,1 li a5,1 .L3: addiw a5,a5,1 fadd.s fa0,fa0,fa5 bne a5,a0,.L3 ret .L4: fmv.w.x fa0,zero ret .size SumFloats, .-SumFloats .align 1 .globl SumDoubles .type SumDoubles, @function SumDoubles: ble a0,zero,.L10 fcvt.s.w fa4,a0 flw fa5,.LC0,a5 fmv.w.x fa0,zero fdiv.s fa5,fa5,fa4 addiw a0,a0,1 li a5,1 .L9: addiw a5,a5,1 fadd.s fa0,fa0,fa5 bne a0,a5,.L9 fcvt.d.s fa0,fa0 ret .L10: fmv.d.x fa0,zero ret .size SumDoubles, .-SumDoubles .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC1: .string "n\tSuma con floats Diferencia con el valor real" .align 3 .LC2: .string "%d %.25f \t%.25f\n" .align 3 .LC3: .string "\n" .align 3 .LC4: .string "n Suma con doubles Diferencia con el valor real" .align 3 .LC6: .string "%d %.25lf \t%.25lf\n" .align 3 .LC7: .string "Presione cualquier tecla para salir..." .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-48 lla a0,.LC1 sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) fsd fs0,8(sp) sd ra,40(sp) fsd fs1,0(sp) li s0,2 call puts@plt lla s2,.LC2 flw fs0,.LC0,a5 li s1,12 .L13: addiw a2,s0,-1 fcvt.s.w fa4,a2 fmv.w.x fa5,zero li a5,1 fdiv.s fa4,fs0,fa4 sext.w a4,s0 .L14: addiw a5,a5,1 fadd.s fa5,fa5,fa4 bne a5,a4,.L14 fsub.s fa4,fs0,fa5 fcvt.d.s fa5,fa5 addiw s0,s0,1 mv a1,s2 fmv.x.d a3,fa5 fcvt.d.s fa5,fa4 li a0,1 fmv.x.d a4,fa5 call __printf_chk@plt bne s0,s1,.L13 lla a0,.LC3 call puts@plt lla a0,.LC4 call puts@plt li s0,2 fld fs1,.LC5,a5 lla s2,.LC6 li s1,12 .L16: addiw a2,s0,-1 fcvt.s.w fa4,a2 fmv.w.x fa5,zero li a5,1 fdiv.s fa4,fs0,fa4 sext.w a4,s0 .L17: addiw a5,a5,1 fadd.s fa5,fa5,fa4 bne a4,a5,.L17 fcvt.d.s fa5,fa5 addiw s0,s0,1 mv a1,s2 fsub.d fa4,fs1,fa5 fmv.x.d a3,fa5 li a0,1 fmv.x.d a4,fa4 call __printf_chk@plt bne s0,s1,.L16 lla a0,.LC7 call puts@plt la a5,stdin ld a0,0(a5) call getc@plt ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) fld fs0,8(sp) fld fs1,0(sp) li a0,0 addi sp,sp,48 jr ra .size main, .-main .section .rodata.cst4,"aM",@progbits,4 .align 2 .LC0: .word 1065353216 .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC5: .word 0 .word 1072693248 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "main.c" .option pic .text .align 1 .globl SumFloats .type SumFloats, @function SumFloats: ble a0,zero,.L4 fcvt.s.w fa4,a0 flw fa5,.LC0,a5 fmv.w.x fa0,zero fdiv.s fa5,fa5,fa4 addiw a0,a0,1 li a5,1 .L3: addiw a5,a5,1 fadd.s fa0,fa0,fa5 bne a5,a0,.L3 ret .L4: fmv.w.x fa0,zero ret .size SumFloats, .-SumFloats .align 1 .globl SumDoubles .type SumDoubles, @function SumDoubles: ble a0,zero,.L10 fcvt.s.w fa4,a0 flw fa5,.LC0,a5 fmv.w.x fa0,zero fdiv.s fa5,fa5,fa4 addiw a0,a0,1 li a5,1 .L9: addiw a5,a5,1 fadd.s fa0,fa0,fa5 bne a0,a5,.L9 fcvt.d.s fa0,fa0 ret .L10: fmv.d.x fa0,zero ret .size SumDoubles, .-SumDoubles .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC1: .string "n\tSuma con floats Diferencia con el valor real" .align 3 .LC2: .string "%d %.25f \t%.25f\n" .align 3 .LC3: .string "\n" .align 3 .LC4: .string "n Suma con doubles Diferencia con el valor real" .align 3 .LC6: .string "%d %.25lf \t%.25lf\n" .align 3 .LC7: .string "Presione cualquier tecla para salir..." .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-112 fsd fs1,16(sp) fmv.w.x fs1,zero lla a0,.LC1 sd s0,96(sp) sd s1,88(sp) sd s2,80(sp) sd s3,72(sp) sd s4,64(sp) sd s5,56(sp) sd s6,48(sp) sd s7,40(sp) fsd fs0,24(sp) sd ra,104(sp) fsd fs2,8(sp) li s0,1 call puts@plt li s1,1 flw fs0,.LC0,a5 li s2,2 li s3,3 li s4,4 li s5,5 li s6,6 li s7,7 .L13: fcvt.s.w fa4,s0 fdiv.s fa4,fs0,fa4 fadd.s fa5,fa4,fs1 beq s0,s1,.L15 fadd.s fa5,fa5,fa4 beq s0,s2,.L15 fadd.s fa5,fa5,fa4 beq s0,s3,.L15 fadd.s fa5,fa5,fa4 beq s0,s4,.L15 fadd.s fa5,fa5,fa4 beq s0,s5,.L15 fadd.s fa5,fa5,fa4 beq s0,s6,.L15 fadd.s fa5,fa5,fa4 beq s0,s7,.L15 li a5,8 fadd.s fa5,fa5,fa4 beq s0,a5,.L15 li a5,10 fadd.s fa5,fa5,fa4 bne s0,a5,.L15 fadd.s fa5,fa5,fa4 .L15: fsub.s fa4,fs0,fa5 fcvt.d.s fa5,fa5 mv a2,s0 lla a1,.LC2 fmv.x.d a3,fa5 fcvt.d.s fa5,fa4 li a0,1 addiw s0,s0,1 fmv.x.d a4,fa5 call __printf_chk@plt li a5,11 bne s0,a5,.L13 lla a0,.LC3 call puts@plt fmv.w.x fs2,zero lla a0,.LC4 call puts@plt li s0,1 fld fs1,.LC5,a5 li s1,1 li s2,2 li s3,3 li s4,4 li s5,5 li s6,6 li s7,7 .L17: fcvt.s.w fa4,s0 fdiv.s fa4,fs0,fa4 fadd.s fa5,fa4,fs2 beq s0,s1,.L19 fadd.s fa5,fa5,fa4 beq s0,s2,.L19 fadd.s fa5,fa5,fa4 beq s0,s3,.L19 fadd.s fa5,fa5,fa4 beq s0,s4,.L19 fadd.s fa5,fa5,fa4 beq s0,s5,.L19 fadd.s fa5,fa5,fa4 beq s0,s6,.L19 fadd.s fa5,fa5,fa4 beq s0,s7,.L19 li a5,8 fadd.s fa5,fa5,fa4 beq s0,a5,.L19 li a5,10 fadd.s fa5,fa5,fa4 bne s0,a5,.L19 fadd.s fa5,fa5,fa4 .L19: fcvt.d.s fa5,fa5 mv a2,s0 lla a1,.LC6 fsub.d fa4,fs1,fa5 fmv.x.d a3,fa5 li a0,1 addiw s0,s0,1 fmv.x.d a4,fa4 call __printf_chk@plt li a5,11 bne s0,a5,.L17 lla a0,.LC7 call puts@plt la a5,stdin ld a0,0(a5) call getc@plt ld ra,104(sp) ld s0,96(sp) ld s1,88(sp) ld s2,80(sp) ld s3,72(sp) ld s4,64(sp) ld s5,56(sp) ld s6,48(sp) ld s7,40(sp) fld fs0,24(sp) fld fs1,16(sp) fld fs2,8(sp) li a0,0 addi sp,sp,112 jr ra .size main, .-main .section .rodata.cst4,"aM",@progbits,4 .align 2 .LC0: .word 1065353216 .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC5: .word 0 .word 1072693248 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "main.c" .text .align 2 .global SumFloats .type SumFloats, %function SumFloats: .LFB0: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, 12] str wzr, [sp, 28] mov w0, 1 str w0, [sp, 24] b .L2 .L3: ldr s0, [sp, 12] scvtf s0, s0 fmov s1, 1.0e+0 fdiv s0, s1, s0 ldr s1, [sp, 28] fadd s0, s1, s0 str s0, [sp, 28] ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L2: ldr w1, [sp, 12] ldr w0, [sp, 24] cmp w1, w0 bge .L3 ldr s0, [sp, 28] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size SumFloats, .-SumFloats .align 2 .global SumDoubles .type SumDoubles, %function SumDoubles: .LFB1: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, 12] str wzr, [sp, 28] mov w0, 1 str w0, [sp, 24] b .L6 .L7: ldr s0, [sp, 12] scvtf s0, s0 fmov s1, 1.0e+0 fdiv s0, s1, s0 ldr s1, [sp, 28] fadd s0, s1, s0 str s0, [sp, 28] ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L6: ldr w1, [sp, 12] ldr w0, [sp, 24] cmp w1, w0 bge .L7 ldr s0, [sp, 28] fcvt d0, s0 add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size SumDoubles, .-SumDoubles .section .rodata .align 3 .LC0: .string "n\tSuma con floats Diferencia con el valor real" .align 3 .LC1: .string "%d %.25f \t%.25f\n" .align 3 .LC2: .string "\n" .align 3 .LC3: .string "n Suma con doubles Diferencia con el valor real" .align 3 .LC4: .string "%d %.25lf \t%.25lf\n" .align 3 .LC5: .string "Presione cualquier tecla para salir..." .text .align 2 .global main .type main, %function main: .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 w0, [sp, 28] str x1, [sp, 16] mov w0, 10 str w0, [sp, 36] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts mov w0, 1 str w0, [sp, 32] b .L10 .L11: ldr w0, [sp, 32] bl SumFloats str s0, [sp, 40] fmov s1, 1.0e+0 ldr s0, [sp, 40] fsub s0, s1, s0 str s0, [sp, 44] ldr s0, [sp, 40] fcvt d2, s0 ldr s0, [sp, 44] fcvt d0, s0 fmov d1, d0 fmov d0, d2 ldr w1, [sp, 32] adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L10: ldr w1, [sp, 36] ldr w0, [sp, 32] cmp w1, w0 bge .L11 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts mov w0, 1 str w0, [sp, 32] b .L12 .L13: ldr w0, [sp, 32] bl SumDoubles str d0, [sp, 48] fmov d1, 1.0e+0 ldr d0, [sp, 48] fsub d0, d1, d0 str d0, [sp, 56] ldr d1, [sp, 56] ldr d0, [sp, 48] ldr w1, [sp, 32] adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L12: ldr w1, [sp, 36] ldr w0, [sp, 32] cmp w1, w0 bge .L13 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts bl getchar mov w0, 0 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "main.c" .text .align 2 .global SumFloats .type SumFloats, %function SumFloats: .LFB0: .cfi_startproc cmp w0, 0 ble .L4 scvtf s0, w0 fmov s1, 1.0e+0 fdiv s1, s1, s0 add w1, w0, 1 movi v0.2s, #0 mov w0, 1 .L3: fadd s0, s0, s1 add w0, w0, 1 cmp w0, w1 bne .L3 .L1: ret .L4: movi v0.2s, #0 b .L1 .cfi_endproc .LFE0: .size SumFloats, .-SumFloats .align 2 .global SumDoubles .type SumDoubles, %function SumDoubles: .LFB1: .cfi_startproc cmp w0, 0 ble .L9 scvtf s0, w0 fmov s1, 1.0e+0 fdiv s1, s1, s0 add w1, w0, 1 movi v0.2s, #0 mov w0, 1 .L8: fadd s0, s0, s1 add w0, w0, 1 cmp w0, w1 bne .L8 .L7: fcvt d0, s0 ret .L9: movi v0.2s, #0 b .L7 .cfi_endproc .LFE1: .size SumDoubles, .-SumDoubles .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "n\tSuma con floats Diferencia con el valor real" .align 3 .LC1: .string "%d %.25f \t%.25f\n" .align 3 .LC2: .string "\n" .align 3 .LC3: .string "n Suma con doubles Diferencia con el valor real" .align 3 .LC4: .string "%d %.25lf \t%.25lf\n" .align 3 .LC5: .string "Presione cualquier tecla para salir..." .text .align 2 .global main .type main, %function main: .LFB25: .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] str x21, [sp, 32] str d8, [sp, 40] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 72, -8 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts mov w19, 1 fmov s8, 1.0e+0 adrp x20, .LC1 add x20, x20, :lo12:.LC1 mov w21, w19 .L12: mov w0, w19 bl SumFloats fsub s1, s8, s0 fcvt d1, s1 fcvt d0, s0 mov w2, w19 mov x1, x20 mov w0, w21 bl __printf_chk add w19, w19, 1 cmp w19, 11 bne .L12 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts mov w19, 1 fmov d8, 1.0e+0 adrp x20, .LC4 add x20, x20, :lo12:.LC4 mov w21, w19 .L13: mov w0, w19 bl SumDoubles fsub d1, d8, d0 mov w2, w19 mov x1, x20 mov w0, w21 bl __printf_chk add w19, w19, 1 cmp w19, 11 bne .L13 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts adrp x0, :got:stdin ldr x0, [x0, #:got_lo12:stdin] ldr x0, [x0] bl getc mov w0, 0 ldr d8, [sp, 40] ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_restore 72 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE25: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "main.c" .text .align 2 .p2align 4,,11 .global SumFloats .type SumFloats, %function SumFloats: .LFB0: .cfi_startproc cmp w0, 0 ble .L4 scvtf s2, w0 fmov s1, 1.0e+0 movi v0.2s, #0 add w1, w0, 1 mov w0, 1 fdiv s1, s1, s2 .p2align 3,,7 .L3: add w0, w0, 1 fadd s0, s0, s1 cmp w0, w1 bne .L3 ret .p2align 2,,3 .L4: movi v0.2s, #0 ret .cfi_endproc .LFE0: .size SumFloats, .-SumFloats .align 2 .p2align 4,,11 .global SumDoubles .type SumDoubles, %function SumDoubles: .LFB1: .cfi_startproc cmp w0, 0 ble .L10 scvtf s2, w0 fmov s1, 1.0e+0 movi v0.2s, #0 add w1, w0, 1 mov w0, 1 fdiv s1, s1, s2 .p2align 3,,7 .L9: add w0, w0, 1 fadd s0, s0, s1 cmp w1, w0 bne .L9 fcvt d0, s0 ret .p2align 2,,3 .L10: movi d0, #0 ret .cfi_endproc .LFE1: .size SumDoubles, .-SumDoubles .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "n\tSuma con floats Diferencia con el valor real" .align 3 .LC1: .string "%d %.25f \t%.25f\n" .align 3 .LC2: .string "\n" .align 3 .LC3: .string "n Suma con doubles Diferencia con el valor real" .align 3 .LC4: .string "%d %.25lf \t%.25lf\n" .align 3 .LC5: .string "Presione cualquier tecla para salir..." .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB25: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x0, .LC0 add x0, x0, :lo12:.LC0 mov x29, sp stp d8, d9, [sp, 32] .cfi_offset 72, -16 .cfi_offset 73, -8 fmov s8, 1.0e+0 stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 adrp x20, .LC1 bl puts add x20, x20, :lo12:.LC1 mov w0, 2 .p2align 3,,7 .L13: sub w2, w0, #1 movi v0.2s, #0 mov w19, 1 scvtf s1, w2 fdiv s1, s8, s1 .p2align 3,,7 .L14: add w19, w19, 1 fadd s0, s0, s1 cmp w19, w0 bne .L14 fsub s1, s8, s0 fcvt d0, s0 mov x1, x20 mov w0, 1 fcvt d1, s1 bl __printf_chk add w0, w19, 1 cmp w19, 11 bne .L13 adrp x0, .LC2 adrp x20, .LC4 add x0, x0, :lo12:.LC2 add x20, x20, :lo12:.LC4 bl puts mov w19, 2 fmov s9, 1.0e+0 fmov d8, 1.0e+0 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl puts .p2align 3,,7 .L16: sub w2, w19, #1 movi v0.2s, #0 mov w0, 1 scvtf s1, w2 fdiv s1, s9, s1 .p2align 3,,7 .L17: add w0, w0, 1 fadd s0, s0, s1 cmp w19, w0 bne .L17 fcvt d0, s0 add w19, w19, 1 mov x1, x20 mov w0, 1 fsub d1, d8, d0 bl __printf_chk cmp w19, 12 bne .L16 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts adrp x0, :got:stdin ldr x0, [x0, #:got_lo12:stdin] ldr x0, [x0] bl getc mov w0, 0 ldp x19, x20, [sp, 16] ldp d8, d9, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_restore 72 .cfi_restore 73 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE25: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "main.c" .text .align 2 .p2align 4,,11 .global SumFloats .type SumFloats, %function SumFloats: .LFB0: .cfi_startproc cmp w0, 0 ble .L4 scvtf s2, w0 fmov s1, 1.0e+0 movi v0.2s, #0 add w1, w0, 1 mov w0, 1 fdiv s1, s1, s2 .p2align 3,,7 .L3: add w0, w0, 1 fadd s0, s0, s1 cmp w0, w1 bne .L3 ret .p2align 2,,3 .L4: movi v0.2s, #0 ret .cfi_endproc .LFE0: .size SumFloats, .-SumFloats .align 2 .p2align 4,,11 .global SumDoubles .type SumDoubles, %function SumDoubles: .LFB1: .cfi_startproc cmp w0, 0 ble .L10 scvtf s2, w0 fmov s1, 1.0e+0 movi v0.2s, #0 add w1, w0, 1 mov w0, 1 fdiv s1, s1, s2 .p2align 3,,7 .L9: add w0, w0, 1 fadd s0, s0, s1 cmp w1, w0 bne .L9 fcvt d0, s0 ret .p2align 2,,3 .L10: movi d0, #0 ret .cfi_endproc .LFE1: .size SumDoubles, .-SumDoubles .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "n\tSuma con floats Diferencia con el valor real" .align 3 .LC1: .string "%d %.25f \t%.25f\n" .align 3 .LC2: .string "\n" .align 3 .LC3: .string "n Suma con doubles Diferencia con el valor real" .align 3 .LC4: .string "%d %.25lf \t%.25lf\n" .align 3 .LC5: .string "Presione cualquier tecla para salir..." .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB25: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 adrp x0, .LC0 add x0, x0, :lo12:.LC0 mov x29, sp stp d8, d9, [sp, 32] .cfi_offset 72, -32 .cfi_offset 73, -24 fmov s8, 1.0e+0 stp x19, x20, [sp, 16] .cfi_offset 19, -48 .cfi_offset 20, -40 adrp x20, .LC1 add x20, x20, :lo12:.LC1 str d10, [sp, 48] .cfi_offset 74, -16 bl puts movi v9.2s, #0 mov w19, 1 .p2align 3,,7 .L13: scvtf s1, w19 fdiv s1, s8, s1 fadd s0, s1, s9 cmp w19, 1 beq .L15 fadd s0, s0, s1 cmp w19, 2 beq .L15 fadd s0, s0, s1 cmp w19, 3 beq .L15 fadd s0, s0, s1 cmp w19, 4 beq .L15 fadd s0, s0, s1 cmp w19, 5 beq .L15 fadd s0, s0, s1 cmp w19, 6 beq .L15 fadd s0, s0, s1 cmp w19, 7 beq .L15 fadd s0, s0, s1 cmp w19, 8 beq .L15 fadd s0, s0, s1 cmp w19, 10 bne .L15 fadd s0, s0, s1 .L15: fsub s1, s8, s0 fcvt d0, s0 mov w2, w19 mov x1, x20 add w19, w19, 1 mov w0, 1 fcvt d1, s1 bl __printf_chk cmp w19, 11 bne .L13 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts adrp x20, .LC4 movi v9.2s, #0 fmov s10, 1.0e+0 adrp x0, .LC3 add x20, x20, :lo12:.LC4 add x0, x0, :lo12:.LC3 mov w19, 1 bl puts fmov d8, 1.0e+0 .p2align 3,,7 .L17: scvtf s1, w19 fdiv s1, s10, s1 fadd s0, s1, s9 cmp w19, 1 beq .L19 fadd s0, s0, s1 cmp w19, 2 beq .L19 fadd s0, s0, s1 cmp w19, 3 beq .L19 fadd s0, s0, s1 cmp w19, 4 beq .L19 fadd s0, s0, s1 cmp w19, 5 beq .L19 fadd s0, s0, s1 cmp w19, 6 beq .L19 fadd s0, s0, s1 cmp w19, 7 beq .L19 fadd s0, s0, s1 cmp w19, 8 beq .L19 fadd s0, s0, s1 cmp w19, 10 bne .L19 fadd s0, s0, s1 .L19: fcvt d0, s0 mov w2, w19 mov x1, x20 add w19, w19, 1 mov w0, 1 fsub d1, d8, d0 bl __printf_chk cmp w19, 11 bne .L17 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts adrp x0, :got:stdin ldr x0, [x0, #:got_lo12:stdin] ldr x0, [x0] bl getc mov w0, 0 ldr d10, [sp, 48] ldp x19, x20, [sp, 16] ldp d8, d9, [sp, 32] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_restore 74 .cfi_restore 72 .cfi_restore 73 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE25: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
oppgave1.c
#include <stdio.h> struct deltager { char navn[30]; int poeng; }; int main(void){ struct deltager jim, tom; printf("Navn 1: "); scanf("%s", jim.navn); printf("Poeng:"); scanf("%d", &jim.poeng); printf("Navn 2: "); scanf("%s", tom.navn); printf("Poeng:"); scanf("%d", &tom.poeng); if(tom.poeng<jim.poeng){ printf("%s, vinner\n", jim.navn); } else { printf("%s, vinner\n", tom.navn); } }
.file "oppgave1.c" .option pic .text .section .rodata .align 3 .LC0: .string "Navn 1: " .align 3 .LC1: .string "%s" .align 3 .LC2: .string "Poeng:" .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Navn 2: " .align 3 .LC5: .string "%s, vinner\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-112 sd ra,104(sp) sd s0,96(sp) addi s0,sp,112 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 lla a0,.LC0 call printf@plt addi a5,s0,-104 mv a1,a5 lla a0,.LC1 call __isoc99_scanf@plt lla a0,.LC2 call printf@plt addi a5,s0,-104 addi a5,a5,32 mv a1,a5 lla a0,.LC3 call __isoc99_scanf@plt lla a0,.LC4 call printf@plt addi a5,s0,-64 mv a1,a5 lla a0,.LC1 call __isoc99_scanf@plt lla a0,.LC2 call printf@plt addi a5,s0,-64 addi a5,a5,32 mv a1,a5 lla a0,.LC3 call __isoc99_scanf@plt lw a4,-32(s0) lw a5,-72(s0) bge a4,a5,.L2 addi a5,s0,-104 mv a1,a5 lla a0,.LC5 call printf@plt j .L3 .L2: addi a5,s0,-64 mv a1,a5 lla a0,.LC5 call printf@plt .L3: li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L5 call __stack_chk_fail@plt .L5: mv a0,a4 ld ra,104(sp) ld s0,96(sp) addi sp,sp,112 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "oppgave1.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Navn 1: " .align 3 .LC1: .string "%s" .align 3 .LC2: .string "Poeng:" .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Navn 2: " .align 3 .LC5: .string "%s, vinner\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-112 sd ra,104(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 88(sp) li a4, 0 lla a1,.LC0 li a0,1 call __printf_chk@plt addi a1,sp,8 lla a0,.LC1 call __isoc99_scanf@plt lla a1,.LC2 li a0,1 call __printf_chk@plt addi a1,sp,40 lla a0,.LC3 call __isoc99_scanf@plt lla a1,.LC4 li a0,1 call __printf_chk@plt addi a1,sp,48 lla a0,.LC1 call __isoc99_scanf@plt lla a1,.LC2 li a0,1 call __printf_chk@plt addi a1,sp,80 lla a0,.LC3 call __isoc99_scanf@plt lw a4,80(sp) lw a5,40(sp) bge a4,a5,.L2 addi a2,sp,8 lla a1,.LC5 li a0,1 call __printf_chk@plt .L3: la a5,__stack_chk_guard ld a4, 88(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L6 li a0,0 ld ra,104(sp) addi sp,sp,112 jr ra .L2: addi a2,sp,48 lla a1,.LC5 li a0,1 call __printf_chk@plt j .L3 .L6: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "oppgave1.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Navn 1: " .align 3 .LC1: .string "%s" .align 3 .LC2: .string "Poeng:" .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Navn 2: " .align 3 .LC5: .string "%s, vinner\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-128 sd s0,112(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 88(sp) li a5, 0 lla a1,.LC0 li a0,1 sd ra,120(sp) sd s1,104(sp) sd s2,96(sp) call __printf_chk@plt addi s2,sp,8 mv a1,s2 lla a0,.LC1 call __isoc99_scanf@plt lla a1,.LC2 li a0,1 call __printf_chk@plt addi a1,sp,40 lla a0,.LC3 call __isoc99_scanf@plt lla a1,.LC4 li a0,1 call __printf_chk@plt addi s1,sp,48 mv a1,s1 lla a0,.LC1 call __isoc99_scanf@plt lla a1,.LC2 li a0,1 call __printf_chk@plt addi a1,sp,80 lla a0,.LC3 call __isoc99_scanf@plt lw a4,80(sp) lw a5,40(sp) bge a4,a5,.L2 mv a2,s2 lla a1,.LC5 li a0,1 call __printf_chk@plt .L3: ld a4, 88(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L7 ld ra,120(sp) ld s0,112(sp) ld s1,104(sp) ld s2,96(sp) li a0,0 addi sp,sp,128 jr ra .L2: mv a2,s1 lla a1,.LC5 li a0,1 call __printf_chk@plt j .L3 .L7: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "oppgave1.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Navn 1: " .align 3 .LC1: .string "%s" .align 3 .LC2: .string "Poeng:" .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Navn 2: " .align 3 .LC5: .string "%s, vinner\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-128 sd s0,112(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 88(sp) li a5, 0 lla a1,.LC0 li a0,1 sd ra,120(sp) sd s1,104(sp) sd s2,96(sp) call __printf_chk@plt addi s2,sp,8 mv a1,s2 lla a0,.LC1 call __isoc99_scanf@plt lla a1,.LC2 li a0,1 call __printf_chk@plt addi a1,sp,40 lla a0,.LC3 call __isoc99_scanf@plt lla a1,.LC4 li a0,1 call __printf_chk@plt addi s1,sp,48 mv a1,s1 lla a0,.LC1 call __isoc99_scanf@plt lla a1,.LC2 li a0,1 call __printf_chk@plt addi a1,sp,80 lla a0,.LC3 call __isoc99_scanf@plt lw a4,80(sp) lw a5,40(sp) bge a4,a5,.L2 mv a2,s2 lla a1,.LC5 li a0,1 call __printf_chk@plt .L3: ld a4, 88(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L7 ld ra,120(sp) ld s0,112(sp) ld s1,104(sp) ld s2,96(sp) li a0,0 addi sp,sp,128 jr ra .L2: mv a2,s1 lla a1,.LC5 li a0,1 call __printf_chk@plt j .L3 .L7: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "oppgave1.c" .text .section .rodata .align 3 .LC0: .string "Navn 1: " .align 3 .LC1: .string "%s" .align 3 .LC2: .string "Poeng:" .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Navn 2: " .align 3 .LC5: .string "%s, vinner\n" .text .align 2 .global main .type main, %function main: .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 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf add x0, sp, 24 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf add x0, sp, 24 add x0, x0, 32 mov x1, x0 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl __isoc99_scanf adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf add x0, sp, 64 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf add x0, sp, 64 add x0, x0, 32 mov x1, x0 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl __isoc99_scanf ldr w1, [sp, 96] ldr w0, [sp, 56] cmp w1, w0 bge .L2 add x0, sp, 24 mov x1, x0 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl printf b .L3 .L2: add x0, sp, 64 mov x1, x0 adrp x0, .LC5 add x0, x0, :lo12:.LC5 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, 104] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L5 bl __stack_chk_fail .L5: mov w0, w1 ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "oppgave1.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Navn 1: " .align 3 .LC1: .string "%s" .align 3 .LC2: .string "Poeng:" .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Navn 2: " .align 3 .LC5: .string "%s, vinner\n" .text .align 2 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -144]! .cfi_def_cfa_offset 144 .cfi_offset 29, -144 .cfi_offset 30, -136 mov x29, sp stp x19, x20, [sp, 16] str x21, [sp, 32] .cfi_offset 19, -128 .cfi_offset 20, -120 .cfi_offset 21, -112 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 136] mov x1, 0 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk adrp x21, .LC1 add x21, x21, :lo12:.LC1 add x1, sp, 56 mov x0, x21 bl __isoc99_scanf adrp x20, .LC2 add x20, x20, :lo12:.LC2 mov x1, x20 mov w0, 1 bl __printf_chk adrp x19, .LC3 add x19, x19, :lo12:.LC3 add x1, sp, 88 mov x0, x19 bl __isoc99_scanf adrp x1, .LC4 add x1, x1, :lo12:.LC4 mov w0, 1 bl __printf_chk add x1, sp, 96 mov x0, x21 bl __isoc99_scanf mov x1, x20 mov w0, 1 bl __printf_chk add x1, sp, 128 mov x0, x19 bl __isoc99_scanf ldr w1, [sp, 128] ldr w0, [sp, 88] cmp w1, w0 bge .L2 add x2, sp, 56 adrp x1, .LC5 add x1, x1, :lo12:.LC5 mov w0, 1 bl __printf_chk .L3: 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 bne .L6 mov w0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 144 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L2: .cfi_restore_state add x2, sp, 96 adrp x1, .LC5 add x1, x1, :lo12:.LC5 mov w0, 1 bl __printf_chk b .L3 .L6: bl __stack_chk_fail .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "oppgave1.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Navn 1: " .align 3 .LC1: .string "%s" .align 3 .LC2: .string "Poeng:" .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Navn 2: " .align 3 .LC5: .string "%s, vinner\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 adrp x2, :got:__stack_chk_guard adrp x1, .LC0 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] add x1, x1, :lo12:.LC0 stp x21, x22, [sp, 32] mov w0, 1 .cfi_offset 19, -144 .cfi_offset 20, -136 .cfi_offset 21, -128 .cfi_offset 22, -120 adrp x21, .LC1 str x23, [sp, 48] .cfi_offset 23, -112 add x21, x21, :lo12:.LC1 add x23, sp, 72 adrp x20, .LC2 ldr x3, [x2] str x3, [sp, 152] mov x3, 0 add x20, x20, :lo12:.LC2 adrp x19, .LC3 add x19, x19, :lo12:.LC3 add x22, sp, 112 bl __printf_chk mov x1, x23 mov x0, x21 bl __isoc99_scanf mov x1, x20 mov w0, 1 bl __printf_chk add x1, sp, 104 mov x0, x19 bl __isoc99_scanf adrp x1, .LC4 mov w0, 1 add x1, x1, :lo12:.LC4 bl __printf_chk mov x1, x22 mov x0, x21 bl __isoc99_scanf mov x1, x20 mov w0, 1 bl __printf_chk add x1, sp, 144 mov x0, x19 bl __isoc99_scanf ldr w0, [sp, 104] ldr w1, [sp, 144] cmp w1, w0 bge .L2 adrp x1, .LC5 mov x2, x23 add x1, x1, :lo12:.LC5 mov w0, 1 bl __printf_chk .L3: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 152] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L7 mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 160 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L2: .cfi_restore_state mov x2, x22 adrp x1, .LC5 mov w0, 1 add x1, x1, :lo12:.LC5 bl __printf_chk b .L3 .L7: bl __stack_chk_fail .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "oppgave1.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Navn 1: " .align 3 .LC1: .string "%s" .align 3 .LC2: .string "Poeng:" .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Navn 2: " .align 3 .LC5: .string "%s, vinner\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -160]! .cfi_def_cfa_offset 160 .cfi_offset 29, -160 .cfi_offset 30, -152 adrp x2, :got:__stack_chk_guard adrp x1, .LC0 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] add x1, x1, :lo12:.LC0 stp x21, x22, [sp, 32] mov w0, 1 .cfi_offset 19, -144 .cfi_offset 20, -136 .cfi_offset 21, -128 .cfi_offset 22, -120 adrp x21, .LC1 str x23, [sp, 48] .cfi_offset 23, -112 add x21, x21, :lo12:.LC1 add x23, sp, 72 adrp x20, .LC2 ldr x3, [x2] str x3, [sp, 152] mov x3, 0 add x20, x20, :lo12:.LC2 adrp x19, .LC3 add x19, x19, :lo12:.LC3 add x22, sp, 112 bl __printf_chk mov x1, x23 mov x0, x21 bl __isoc99_scanf mov x1, x20 mov w0, 1 bl __printf_chk add x1, sp, 104 mov x0, x19 bl __isoc99_scanf adrp x1, .LC4 mov w0, 1 add x1, x1, :lo12:.LC4 bl __printf_chk mov x1, x22 mov x0, x21 bl __isoc99_scanf mov x1, x20 mov w0, 1 bl __printf_chk add x1, sp, 144 mov x0, x19 bl __isoc99_scanf ldr w0, [sp, 104] ldr w1, [sp, 144] cmp w1, w0 bge .L2 adrp x1, .LC5 mov x2, x23 add x1, x1, :lo12:.LC5 mov w0, 1 bl __printf_chk .L3: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 152] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L7 mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 160 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L2: .cfi_restore_state mov x2, x22 adrp x1, .LC5 mov w0, 1 add x1, x1, :lo12:.LC5 bl __printf_chk b .L3 .L7: bl __stack_chk_fail .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
6.c
#include<stdio.h> #include<stdlib.h> #define size 5 int cq[size],f=-1,r=-1,elm; void display(); int full(); int empty(); void insert(int); int delete(); void main() { int ch; while(1){ printf("\n############### C-Q MENU #############\n"); printf("1.Insert\t2.Delete\t3.Display\t4.Exit\n"); printf("Enter Your Choice: "); scanf("%d",&ch); switch(ch) { case 1: printf("Enter the element to insert: "); scanf("%d",&elm); insert(elm); break; case 2: elm=delete(); if(elm!=-1) printf("Deleted %d",elm); break; case 3: if(empty()) printf("No Elements!..."); else display(); break; case 4: exit(0); } } } void insert(int elm) { if(full()) printf("CQ Overflow!...\n"); else{ if(f==-1) f=0; r=(r+1)%size; cq[r]=elm; } } int delete() { int elm; if(empty()){ printf("CQ Underflow!..."); return -1;} else{ elm=cq[f]; if(f==r){ f=-1; r=-1; } else { f=(f+1)%size; } return(elm); } } int full() { if((f==r+1) || (f==0 && r==size-1)) return 1; return 0; } int empty() { if(f==-1) return 1; return 0; } void display() { int i; for(i=f;i!=r;i=(i+1)%size) printf("%d\t",cq[i]); printf("%d\n",cq[i]); }
.file "6.c" .option pic .text .globl cq .bss .align 3 .type cq, @object .size cq, 20 cq: .zero 20 .globl f .data .align 2 .type f, @object .size f, 4 f: .word -1 .globl r .align 2 .type r, @object .size r, 4 r: .word -1 .globl elm .bss .align 2 .type elm, @object .size elm, 4 elm: .zero 4 .section .rodata .align 3 .LC0: .string "\n############### C-Q MENU #############" .align 3 .LC1: .string "1.Insert\t2.Delete\t3.Display\t4.Exit" .align 3 .LC2: .string "Enter Your Choice: " .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Enter the element to insert: " .align 3 .LC5: .string "Deleted %d" .align 3 .LC6: .string "No Elements!..." .text .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 .L10: lla a0,.LC0 call puts@plt lla a0,.LC1 call puts@plt lla a0,.LC2 call printf@plt addi a5,s0,-28 mv a1,a5 lla a0,.LC3 call __isoc99_scanf@plt lw a5,-28(s0) mv a3,a5 li a4,4 beq a3,a4,.L2 mv a3,a5 li a4,4 bgt a3,a4,.L10 mv a3,a5 li a4,3 beq a3,a4,.L4 mv a3,a5 li a4,3 bgt a3,a4,.L10 mv a3,a5 li a4,1 beq a3,a4,.L5 mv a4,a5 li a5,2 beq a4,a5,.L6 j .L3 .L5: lla a0,.LC4 call printf@plt lla a1,elm lla a0,.LC3 call __isoc99_scanf@plt lla a5,elm lw a5,0(a5) mv a0,a5 call insert j .L3 .L6: call delete mv a5,a0 mv a4,a5 lla a5,elm sw a4,0(a5) lla a5,elm lw a5,0(a5) mv a4,a5 li a5,-1 beq a4,a5,.L12 lla a5,elm lw a5,0(a5) mv a1,a5 lla a0,.LC5 call printf@plt j .L12 .L4: call empty mv a5,a0 beq a5,zero,.L8 lla a0,.LC6 call printf@plt j .L3 .L8: call display j .L3 .L2: li a0,0 call exit@plt .L12: nop .L3: j .L10 .size main, .-main .section .rodata .align 3 .LC7: .string "CQ Overflow!..." .text .align 1 .globl insert .type insert, @function insert: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 mv a5,a0 sw a5,-20(s0) call full mv a5,a0 beq a5,zero,.L14 lla a0,.LC7 call puts@plt j .L17 .L14: lla a5,f lw a5,0(a5) mv a4,a5 li a5,-1 bne a4,a5,.L16 lla a5,f sw zero,0(a5) .L16: lla a5,r lw a5,0(a5) addiw a5,a5,1 sext.w a5,a5 mv a4,a5 li a5,5 remw a5,a4,a5 sext.w a4,a5 lla a5,r sw a4,0(a5) lla a5,r lw a5,0(a5) lla a4,cq slli a5,a5,2 add a5,a4,a5 lw a4,-20(s0) sw a4,0(a5) .L17: nop ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size insert, .-insert .section .rodata .align 3 .LC8: .string "CQ Underflow!..." .text .align 1 .globl delete .type delete, @function delete: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 call empty mv a5,a0 beq a5,zero,.L19 lla a0,.LC8 call printf@plt li a5,-1 j .L20 .L19: lla a5,f lw a5,0(a5) lla a4,cq slli a5,a5,2 add a5,a4,a5 lw a5,0(a5) sw a5,-20(s0) lla a5,f lw a4,0(a5) lla a5,r lw a5,0(a5) bne a4,a5,.L21 lla a5,f li a4,-1 sw a4,0(a5) lla a5,r li a4,-1 sw a4,0(a5) j .L22 .L21: lla a5,f lw a5,0(a5) addiw a5,a5,1 sext.w a5,a5 mv a4,a5 li a5,5 remw a5,a4,a5 sext.w a4,a5 lla a5,f sw a4,0(a5) .L22: lw a5,-20(s0) .L20: mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size delete, .-delete .align 1 .globl full .type full, @function full: addi sp,sp,-16 sd s0,8(sp) addi s0,sp,16 lla a5,r lw a5,0(a5) addiw a5,a5,1 sext.w a4,a5 lla a5,f lw a5,0(a5) beq a4,a5,.L24 lla a5,f lw a5,0(a5) bne a5,zero,.L25 lla a5,r lw a5,0(a5) mv a4,a5 li a5,4 bne a4,a5,.L25 .L24: li a5,1 j .L26 .L25: li a5,0 .L26: mv a0,a5 ld s0,8(sp) addi sp,sp,16 jr ra .size full, .-full .align 1 .globl empty .type empty, @function empty: addi sp,sp,-16 sd s0,8(sp) addi s0,sp,16 lla a5,f lw a5,0(a5) mv a4,a5 li a5,-1 bne a4,a5,.L28 li a5,1 j .L29 .L28: li a5,0 .L29: mv a0,a5 ld s0,8(sp) addi sp,sp,16 jr ra .size empty, .-empty .section .rodata .align 3 .LC9: .string "%d\t" .align 3 .LC10: .string "%d\n" .text .align 1 .globl display .type display, @function display: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 lla a5,f lw a5,0(a5) sw a5,-20(s0) j .L31 .L32: lla a4,cq lw a5,-20(s0) slli a5,a5,2 add a5,a4,a5 lw a5,0(a5) mv a1,a5 lla a0,.LC9 call printf@plt lw a5,-20(s0) addiw a5,a5,1 sext.w a5,a5 mv a4,a5 li a5,5 remw a5,a4,a5 sw a5,-20(s0) .L31: lla a5,r lw a4,0(a5) lw a5,-20(s0) sext.w a5,a5 bne a5,a4,.L32 lla a4,cq lw a5,-20(s0) slli a5,a5,2 add a5,a4,a5 lw a5,0(a5) mv a1,a5 lla a0,.LC10 call printf@plt nop ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size display, .-display .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "6.c" .option pic .text .align 1 .globl full .type full, @function full: lla a4,.LANCHOR0 lw a5,0(a4) lw a4,4(a4) addiw a3,a5,1 li a0,1 beq a3,a4,.L2 li a0,0 bne a4,zero,.L2 addi a5,a5,-4 seqz a0,a5 .L2: ret .size full, .-full .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "CQ Overflow!..." .text .align 1 .globl insert .type insert, @function insert: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) mv s0,a0 call full bne a0,zero,.L10 lw a4,.LANCHOR0+4 li a5,-1 beq a4,a5,.L11 .L8: lla a3,.LANCHOR0 lw a5,0(a3) addiw a5,a5,1 li a4,5 remw a5,a5,a4 sext.w a4,a5 sw a5,0(a3) slli a4,a4,2 lla a5,.LANCHOR1 add a5,a5,a4 sw s0,0(a5) .L5: ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .L10: lla a0,.LC0 call puts@plt j .L5 .L11: sw zero,.LANCHOR0+4,a5 j .L8 .size insert, .-insert .align 1 .globl empty .type empty, @function empty: lw a0,.LANCHOR0+4 addi a0,a0,1 seqz a0,a0 ret .size empty, .-empty .section .rodata.str1.8 .align 3 .LC1: .string "CQ Underflow!..." .text .align 1 .globl delete .type delete, @function delete: addi sp,sp,-16 sd ra,8(sp) call empty bne a0,zero,.L18 lla a3,.LANCHOR0 lw a5,4(a3) slli a2,a5,2 lla a4,.LANCHOR1 add a4,a4,a2 lw a0,0(a4) lw a4,0(a3) beq a4,a5,.L19 addiw a5,a5,1 li a4,5 remw a5,a5,a4 sw a5,.LANCHOR0+4,a4 .L15: ld ra,8(sp) addi sp,sp,16 jr ra .L18: lla a1,.LC1 li a0,1 call __printf_chk@plt li a0,-1 j .L15 .L19: li a4,-1 sw a4,4(a3) sw a4,0(a3) j .L15 .size delete, .-delete .section .rodata.str1.8 .align 3 .LC2: .string "%d\t" .align 3 .LC3: .string "%d\n" .text .align 1 .globl display .type display, @function display: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) sd s4,0(sp) lla a5,.LANCHOR0 lw s0,4(a5) lw a5,0(a5) beq s0,a5,.L23 lla s4,.LANCHOR1 lla s3,.LC2 li s2,5 lla s1,.LANCHOR0 .L22: slli a5,s0,2 add a5,s4,a5 lw a2,0(a5) mv a1,s3 li a0,1 call __printf_chk@plt addiw s0,s0,1 remw s0,s0,s2 lw a5,0(s1) bne a5,s0,.L22 .L21: slli s0,s0,2 lla a5,.LANCHOR1 add a5,a5,s0 lw a2,0(a5) lla a1,.LC3 li a0,1 call __printf_chk@plt ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) addi sp,sp,48 jr ra .L23: mv s0,a5 j .L21 .size display, .-display .section .rodata.str1.8 .align 3 .LC4: .string "\n############### C-Q MENU #############" .align 3 .LC5: .string "1.Insert\t2.Delete\t3.Display\t4.Exit" .align 3 .LC6: .string "Enter Your Choice: " .align 3 .LC7: .string "%d" .align 3 .LC8: .string "Enter the element to insert: " .align 3 .LC9: .string "Deleted %d" .align 3 .LC10: .string "No Elements!..." .text .align 1 .globl main .type main, @function main: addi sp,sp,-96 sd ra,88(sp) sd s0,80(sp) sd s1,72(sp) sd s2,64(sp) sd s3,56(sp) sd s4,48(sp) sd s5,40(sp) sd s6,32(sp) sd s7,24(sp) sd s8,16(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 8(sp) li a4, 0 lla s7,.LC4 lla s6,.LC5 lla s5,.LC6 addi s4,sp,4 lla s3,.LC7 li s0,3 lla s8,.LANCHOR1 j .L27 .L29: bne a5,s2,.L37 li a0,0 call exit@plt .L30: lla a1,.LC8 li a0,1 call __printf_chk@plt lla a1,.LANCHOR1+20 mv a0,s3 call __isoc99_scanf@plt lw a0,20(s8) call insert .L27: li s2,4 li s1,2 .L37: mv a0,s7 call puts@plt mv a0,s6 call puts@plt mv a1,s5 li a0,1 call __printf_chk@plt mv a1,s4 mv a0,s3 call __isoc99_scanf@plt lw a5,4(sp) beq a5,s0,.L28 bgt a5,s0,.L29 li a4,1 beq a5,a4,.L30 bne a5,s1,.L37 call delete sw a0,20(s8) li a5,-1 beq a0,a5,.L27 mv a2,a0 lla a1,.LC9 li a0,1 call __printf_chk@plt j .L27 .L28: call empty beq a0,zero,.L35 lla a1,.LC10 li a0,1 call __printf_chk@plt j .L27 .L35: call display j .L27 .size main, .-main .globl elm .globl r .globl f .globl cq .data .align 2 .set .LANCHOR0,. + 0 .type r, @object .size r, 4 r: .word -1 .type f, @object .size f, 4 f: .word -1 .bss .align 3 .set .LANCHOR1,. + 0 .type cq, @object .size cq, 20 cq: .zero 20 .type elm, @object .size elm, 4 elm: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "6.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "CQ Overflow!..." .text .align 1 .globl insert .type insert, @function insert: lla a4,.LANCHOR0 lw a2,0(a4) lw a3,4(a4) addiw a1,a2,1 mv a5,a1 beq a1,a3,.L2 bne a3,zero,.L3 li a3,4 beq a2,a3,.L2 .L4: li a3,5 remw a2,a5,a3 lla a3,.LANCHOR1 mv a5,a2 slli a2,a2,2 add a3,a3,a2 sw a5,0(a4) sw a0,0(a3) ret .L3: li a2,-1 bne a3,a2,.L4 sw zero,.LANCHOR0+4,a3 j .L4 .L2: lla a0,.LC0 tail puts@plt .size insert, .-insert .section .rodata.str1.8 .align 3 .LC1: .string "CQ Underflow!..." .text .align 1 .globl delete .type delete, @function delete: lla a4,.LANCHOR0 lw a5,4(a4) li a2,-1 beq a5,a2,.L7 lw a1,0(a4) slli a0,a5,2 lla a3,.LANCHOR1 add a3,a3,a0 lw a0,0(a3) beq a1,a5,.L15 li a3,5 addiw a5,a5,1 remw a5,a5,a3 sw a5,4(a4) ret .L15: sw a2,4(a4) sw a2,0(a4) ret .L7: addi sp,sp,-16 lla a1,.LC1 li a0,1 sd ra,8(sp) call __printf_chk@plt ld ra,8(sp) li a0,-1 addi sp,sp,16 jr ra .size delete, .-delete .align 1 .globl full .type full, @function full: lla a4,.LANCHOR0 lw a5,0(a4) lw a4,4(a4) li a0,1 addiw a3,a5,1 beq a3,a4,.L17 li a0,0 bne a4,zero,.L17 addi a5,a5,-4 seqz a0,a5 .L17: ret .size full, .-full .align 1 .globl empty .type empty, @function empty: lw a0,.LANCHOR0+4 addi a0,a0,1 seqz a0,a0 ret .size empty, .-empty .section .rodata.str1.8 .align 3 .LC2: .string "%d\t" .align 3 .LC3: .string "%d\n" .text .align 1 .globl display .type display, @function display: addi sp,sp,-48 sd s2,16(sp) lla s2,.LANCHOR0 sd s0,32(sp) lw a5,0(s2) lw s0,4(s2) sd s1,24(sp) sd s3,8(sp) sd s4,0(sp) sd ra,40(sp) lla s1,.LANCHOR1 lla s4,.LC2 li s3,5 beq s0,a5,.L22 .L23: slli a5,s0,2 add a5,s1,a5 lw a2,0(a5) mv a1,s4 li a0,1 addiw s0,s0,1 call __printf_chk@plt remw s0,s0,s3 lw a5,0(s2) bne a5,s0,.L23 .L22: slli s0,s0,2 add s1,s1,s0 ld s0,32(sp) lw a2,0(s1) ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) lla a1,.LC3 li a0,1 addi sp,sp,48 tail __printf_chk@plt .size display, .-display .section .rodata.str1.8 .align 3 .LC4: .string "\n############### C-Q MENU #############" .align 3 .LC5: .string "1.Insert\t2.Delete\t3.Display\t4.Exit" .align 3 .LC6: .string "Enter Your Choice: " .align 3 .LC7: .string "%d" .align 3 .LC8: .string "Enter the element to insert: " .align 3 .LC9: .string "Deleted %d" .align 3 .LC10: .string "No Elements!..." .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-112 la a5,__stack_chk_guard sd s2,80(sp) sd s3,72(sp) sd s4,64(sp) sd s5,56(sp) sd s6,48(sp) sd s7,40(sp) sd s8,32(sp) sd s9,24(sp) sd ra,104(sp) sd s0,96(sp) sd s1,88(sp) ld a4, 0(a5) sd a4, 8(sp) li a4, 0 addi s7,sp,4 lla s6,.LC4 lla s5,.LC5 lla s4,.LC6 lla s2,.LC7 li s3,4 lla s8,.LANCHOR1 lla s9,.LANCHOR0 .L30: li s0,3 li s1,2 .L40: mv a0,s6 call puts@plt mv a0,s5 call puts@plt mv a1,s4 li a0,1 call __printf_chk@plt mv a1,s7 mv a0,s2 call __isoc99_scanf@plt lw a5,4(sp) beq a5,s0,.L31 bgt a5,s0,.L32 li a4,1 beq a5,a4,.L33 bne a5,s1,.L40 call delete sw a0,20(s8) li a5,-1 beq a0,a5,.L30 mv a2,a0 lla a1,.LC9 li a0,1 call __printf_chk@plt j .L30 .L32: bne a5,s3,.L40 li a0,0 call exit@plt .L31: lw a4,4(s9) li a5,-1 beq a4,a5,.L38 call display j .L30 .L33: lla a1,.LC8 li a0,1 call __printf_chk@plt lla a1,.LANCHOR1+20 mv a0,s2 call __isoc99_scanf@plt lw a0,20(s8) call insert j .L30 .L38: lla a1,.LC10 li a0,1 call __printf_chk@plt j .L30 .size main, .-main .globl elm .globl r .globl f .globl cq .data .align 2 .set .LANCHOR0,. + 0 .type r, @object .size r, 4 r: .word -1 .type f, @object .size f, 4 f: .word -1 .bss .align 3 .set .LANCHOR1,. + 0 .type cq, @object .size cq, 20 cq: .zero 20 .type elm, @object .size elm, 4 elm: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "6.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "CQ Overflow!..." .text .align 1 .globl insert .type insert, @function insert: lla a4,.LANCHOR0 lw a2,0(a4) lw a3,4(a4) addiw a1,a2,1 mv a5,a1 beq a1,a3,.L2 beq a3,zero,.L6 li a2,-1 bne a3,a2,.L4 sw zero,.LANCHOR0+4,a3 .L4: li a3,5 remw a2,a5,a3 lla a3,.LANCHOR1 mv a5,a2 slli a2,a2,2 add a3,a3,a2 sw a5,0(a4) sw a0,0(a3) ret .L6: li a3,4 bne a2,a3,.L4 .L2: lla a0,.LC0 tail puts@plt .size insert, .-insert .section .rodata.str1.8 .align 3 .LC1: .string "CQ Underflow!..." .text .align 1 .globl delete .type delete, @function delete: lla a4,.LANCHOR0 lw a5,4(a4) li a2,-1 beq a5,a2,.L8 lw a1,0(a4) slli a0,a5,2 lla a3,.LANCHOR1 add a3,a3,a0 lw a0,0(a3) beq a1,a5,.L16 li a3,5 addiw a5,a5,1 remw a5,a5,a3 sw a5,4(a4) ret .L16: sw a2,4(a4) sw a2,0(a4) ret .L8: addi sp,sp,-16 lla a1,.LC1 li a0,1 sd ra,8(sp) call __printf_chk@plt ld ra,8(sp) li a0,-1 addi sp,sp,16 jr ra .size delete, .-delete .align 1 .globl full .type full, @function full: lla a4,.LANCHOR0 lw a5,0(a4) lw a4,4(a4) li a0,1 addiw a3,a5,1 beq a3,a4,.L18 li a0,0 bne a4,zero,.L18 addi a5,a5,-4 seqz a0,a5 .L18: ret .size full, .-full .align 1 .globl empty .type empty, @function empty: lw a0,.LANCHOR0+4 addi a0,a0,1 seqz a0,a0 ret .size empty, .-empty .section .rodata.str1.8 .align 3 .LC2: .string "%d\t" .align 3 .LC3: .string "%d\n" .text .align 1 .globl display .type display, @function display: addi sp,sp,-48 sd s2,16(sp) lla s2,.LANCHOR0 sd s0,32(sp) lw a5,0(s2) lw s0,4(s2) sd s1,24(sp) sd s3,8(sp) sd s4,0(sp) sd ra,40(sp) lla s1,.LANCHOR1 lla s4,.LC2 li s3,5 beq s0,a5,.L23 .L24: slli a5,s0,2 add a5,s1,a5 lw a2,0(a5) mv a1,s4 li a0,1 addiw s0,s0,1 call __printf_chk@plt remw s0,s0,s3 lw a5,0(s2) bne a5,s0,.L24 .L23: slli s0,s0,2 add s1,s1,s0 ld s0,32(sp) lw a2,0(s1) ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) lla a1,.LC3 li a0,1 addi sp,sp,48 tail __printf_chk@plt .size display, .-display .section .rodata.str1.8 .align 3 .LC4: .string "\n############### C-Q MENU #############" .align 3 .LC5: .string "1.Insert\t2.Delete\t3.Display\t4.Exit" .align 3 .LC6: .string "Enter Your Choice: " .align 3 .LC7: .string "%d" .align 3 .LC8: .string "Enter the element to insert: " .align 3 .LC9: .string "Deleted %d" .align 3 .LC10: .string "No Elements!..." .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-112 la a5,__stack_chk_guard sd s2,80(sp) sd s3,72(sp) sd s4,64(sp) sd s5,56(sp) sd s6,48(sp) sd s7,40(sp) sd s8,32(sp) sd s9,24(sp) sd ra,104(sp) sd s0,96(sp) sd s1,88(sp) ld a4, 0(a5) sd a4, 8(sp) li a4, 0 addi s7,sp,4 lla s6,.LC4 lla s5,.LC5 lla s4,.LC6 lla s2,.LC7 li s3,4 lla s8,.LANCHOR1 lla s9,.LANCHOR0 .L31: li s0,3 li s1,2 .L41: mv a0,s6 call puts@plt mv a0,s5 call puts@plt mv a1,s4 li a0,1 call __printf_chk@plt mv a1,s7 mv a0,s2 call __isoc99_scanf@plt lw a5,4(sp) beq a5,s0,.L32 bgt a5,s0,.L33 li a4,1 beq a5,a4,.L34 bne a5,s1,.L41 call delete sw a0,20(s8) li a5,-1 beq a0,a5,.L31 mv a2,a0 lla a1,.LC9 li a0,1 call __printf_chk@plt j .L31 .L33: bne a5,s3,.L41 li a0,0 call exit@plt .L32: lw a4,4(s9) li a5,-1 beq a4,a5,.L39 call display j .L31 .L34: lla a1,.LC8 li a0,1 call __printf_chk@plt lla a1,.LANCHOR1+20 mv a0,s2 call __isoc99_scanf@plt lw a0,20(s8) call insert j .L31 .L39: lla a1,.LC10 li a0,1 call __printf_chk@plt j .L31 .size main, .-main .globl elm .globl r .globl f .globl cq .data .align 2 .set .LANCHOR0,. + 0 .type r, @object .size r, 4 r: .word -1 .type f, @object .size f, 4 f: .word -1 .bss .align 3 .set .LANCHOR1,. + 0 .type cq, @object .size cq, 20 cq: .zero 20 .type elm, @object .size elm, 4 elm: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "6.c" .text .global cq .bss .align 3 .type cq, %object .size cq, 20 cq: .zero 20 .global f .data .align 2 .type f, %object .size f, 4 f: .word -1 .global r .align 2 .type r, %object .size r, 4 r: .word -1 .global elm .bss .align 2 .type elm, %object .size elm, 4 elm: .zero 4 .section .rodata .align 3 .LC0: .string "\n############### C-Q MENU #############" .align 3 .LC1: .string "1.Insert\t2.Delete\t3.Display\t4.Exit" .align 3 .LC2: .string "Enter Your Choice: " .align 3 .LC3: .string "%d" .align 3 .LC4: .string "Enter the element to insert: " .align 3 .LC5: .string "Deleted %d" .align 3 .LC6: .string "No Elements!..." .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 .L10: 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] cmp w0, 4 beq .L2 cmp w0, 4 bgt .L10 cmp w0, 3 beq .L4 cmp w0, 3 bgt .L10 cmp w0, 1 beq .L5 cmp w0, 2 beq .L6 b .L3 .L5: adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf adrp x0, elm add x1, x0, :lo12:elm adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl __isoc99_scanf adrp x0, elm add x0, x0, :lo12:elm ldr w0, [x0] bl insert b .L3 .L6: bl delete mov w1, w0 adrp x0, elm add x0, x0, :lo12:elm str w1, [x0] adrp x0, elm add x0, x0, :lo12:elm ldr w0, [x0] cmn w0, #1 beq .L12 adrp x0, elm add x0, x0, :lo12:elm ldr w0, [x0] mov w1, w0 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl printf b .L12 .L4: bl empty cmp w0, 0 beq .L8 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl printf b .L3 .L8: bl display b .L3 .L2: mov w0, 0 bl exit .L12: nop .L3: b .L10 .cfi_endproc .LFE6: .size main, .-main .section .rodata .align 3 .LC7: .string "CQ Overflow!..." .text .align 2 .global insert .type insert, %function insert: .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] bl full cmp w0, 0 beq .L14 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts b .L17 .L14: adrp x0, f add x0, x0, :lo12:f ldr w0, [x0] cmn w0, #1 bne .L16 adrp x0, f add x0, x0, :lo12:f str wzr, [x0] .L16: adrp x0, r add x0, x0, :lo12:r ldr w0, [x0] add w2, w0, 1 mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w2, w0 lsr x0, x0, 32 asr w1, w0, 1 asr w0, w2, 31 sub w1, w1, w0 mov w0, w1 lsl w0, w0, 2 add w0, w0, w1 sub w1, w2, w0 adrp x0, r add x0, x0, :lo12:r str w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr w1, [x0] adrp x0, cq add x0, x0, :lo12:cq sxtw x1, w1 ldr w2, [sp, 28] str w2, [x0, x1, lsl 2] .L17: nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size insert, .-insert .section .rodata .align 3 .LC8: .string "CQ Underflow!..." .text .align 2 .global delete .type delete, %function delete: .LFB8: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp bl empty cmp w0, 0 beq .L19 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl printf mov w0, -1 b .L20 .L19: adrp x0, f add x0, x0, :lo12:f ldr w1, [x0] adrp x0, cq add x0, x0, :lo12:cq sxtw x1, w1 ldr w0, [x0, x1, lsl 2] str w0, [sp, 28] adrp x0, f add x0, x0, :lo12:f ldr w1, [x0] adrp x0, r add x0, x0, :lo12:r ldr w0, [x0] cmp w1, w0 bne .L21 adrp x0, f add x0, x0, :lo12:f mov w1, -1 str w1, [x0] adrp x0, r add x0, x0, :lo12:r mov w1, -1 str w1, [x0] b .L22 .L21: adrp x0, f add x0, x0, :lo12:f ldr w0, [x0] add w2, w0, 1 mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w2, w0 lsr x0, x0, 32 asr w1, w0, 1 asr w0, w2, 31 sub w1, w1, w0 mov w0, w1 lsl w0, w0, 2 add w0, w0, w1 sub w1, w2, w0 adrp x0, f add x0, x0, :lo12:f str w1, [x0] .L22: ldr w0, [sp, 28] .L20: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size delete, .-delete .align 2 .global full .type full, %function full: .LFB9: .cfi_startproc adrp x0, r add x0, x0, :lo12:r ldr w0, [x0] add w1, w0, 1 adrp x0, f add x0, x0, :lo12:f ldr w0, [x0] cmp w1, w0 beq .L24 adrp x0, f add x0, x0, :lo12:f ldr w0, [x0] cmp w0, 0 bne .L25 adrp x0, r add x0, x0, :lo12:r ldr w0, [x0] cmp w0, 4 bne .L25 .L24: mov w0, 1 b .L26 .L25: mov w0, 0 .L26: ret .cfi_endproc .LFE9: .size full, .-full .align 2 .global empty .type empty, %function empty: .LFB10: .cfi_startproc adrp x0, f add x0, x0, :lo12:f ldr w0, [x0] cmn w0, #1 bne .L28 mov w0, 1 b .L29 .L28: mov w0, 0 .L29: ret .cfi_endproc .LFE10: .size empty, .-empty .section .rodata .align 3 .LC9: .string "%d\t" .align 3 .LC10: .string "%d\n" .text .align 2 .global display .type display, %function display: .LFB11: .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, f add x0, x0, :lo12:f ldr w0, [x0] str w0, [sp, 28] b .L31 .L32: adrp x0, cq add x0, x0, :lo12:cq ldrsw x1, [sp, 28] ldr w0, [x0, x1, lsl 2] mov w1, w0 adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl printf ldr w0, [sp, 28] add w1, w0, 1 mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w1, w0 lsr x0, x0, 32 asr w2, w0, 1 asr w0, w1, 31 sub w2, w2, w0 mov w0, w2 lsl w0, w0, 2 add w0, w0, w2 sub w0, w1, w0 str w0, [sp, 28] .L31: adrp x0, r add x0, x0, :lo12:r ldr w0, [x0] ldr w1, [sp, 28] cmp w1, w0 bne .L32 adrp x0, cq add x0, x0, :lo12:cq ldrsw x1, [sp, 28] ldr w0, [x0, x1, lsl 2] mov w1, w0 adrp x0, .LC10 add x0, x0, :lo12:.LC10 bl printf nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size display, .-display .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "6.c" .text .align 2 .global full .type full, %function full: .LFB42: .cfi_startproc adrp x0, .LANCHOR0 add x2, x0, :lo12:.LANCHOR0 ldr w1, [x0, #:lo12:.LANCHOR0] ldr w2, [x2, 4] add w3, w1, 1 mov w0, 1 cmp w3, w2 beq .L1 cmp w2, 0 ccmp w1, 4, 0, eq cset w0, eq .L1: ret .cfi_endproc .LFE42: .size full, .-full .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "CQ Overflow!..." .text .align 2 .global insert .type insert, %function insert: .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 x19, [sp, 16] .cfi_offset 19, -16 mov w19, w0 bl full cbnz w0, .L9 adrp x0, .LANCHOR0+4 ldr w0, [x0, #:lo12:.LANCHOR0+4] cmn w0, #1 beq .L10 .L7: adrp x0, .LANCHOR0 ldr w2, [x0, #:lo12:.LANCHOR0] add w2, w2, 1 mov w1, 26215 movk w1, 0x6666, lsl 16 smull x1, w2, w1 asr x1, x1, 33 sub w1, w1, w2, asr 31 add w1, w1, w1, lsl 2 sub w1, w2, w1 str w1, [x0, #:lo12:.LANCHOR0] adrp x0, .LANCHOR1 add x0, x0, :lo12:.LANCHOR1 str w19, [x0, w1, sxtw 2] .L4: ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .L9: .cfi_restore_state adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts b .L4 .L10: adrp x0, .LANCHOR0+4 str wzr, [x0, #:lo12:.LANCHOR0+4] b .L7 .cfi_endproc .LFE40: .size insert, .-insert .align 2 .global empty .type empty, %function empty: .LFB43: .cfi_startproc adrp x0, .LANCHOR0+4 ldr w0, [x0, #:lo12:.LANCHOR0+4] cmn w0, #1 cset w0, eq ret .cfi_endproc .LFE43: .size empty, .-empty .section .rodata.str1.8 .align 3 .LC1: .string "CQ Underflow!..." .text .align 2 .global delete .type delete, %function delete: .LFB41: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp bl empty cbnz w0, .L17 adrp x2, .LANCHOR0 add x0, x2, :lo12:.LANCHOR0 ldr w1, [x0, 4] adrp x0, .LANCHOR1 add x0, x0, :lo12:.LANCHOR1 ldr w0, [x0, w1, sxtw 2] ldr w2, [x2, #:lo12:.LANCHOR0] cmp w1, w2 beq .L18 add w1, w1, 1 mov w2, 26215 movk w2, 0x6666, lsl 16 smull x2, w1, w2 asr x2, x2, 33 sub w2, w2, w1, asr 31 add w2, w2, w2, lsl 2 sub w1, w1, w2 adrp x2, .LANCHOR0+4 str w1, [x2, #:lo12:.LANCHOR0+4] .L12: ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L17: .cfi_restore_state adrp x1, .LC1 add x1, x1, :lo12:.LC1 mov w0, 1 bl __printf_chk mov w0, -1 b .L12 .L18: adrp x1, .LANCHOR0 add x3, x1, :lo12:.LANCHOR0 mov w2, -1 str w2, [x3, 4] str w2, [x1, #:lo12:.LANCHOR0] b .L12 .cfi_endproc .LFE41: .size delete, .-delete .section .rodata.str1.8 .align 3 .LC2: .string "%d\t" .align 3 .LC3: .string "%d\n" .text .align 2 .global display .type display, %function display: .LFB44: .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 adrp x0, .LANCHOR0 add x1, x0, :lo12:.LANCHOR0 ldr w19, [x1, 4] ldr w0, [x0, #:lo12:.LANCHOR0] cmp w19, w0 beq .L22 stp x21, x22, [sp, 32] .cfi_offset 22, -24 .cfi_offset 21, -32 stp x23, x24, [sp, 48] .cfi_offset 24, -8 .cfi_offset 23, -16 adrp x22, .LANCHOR1 add x22, x22, :lo12:.LANCHOR1 adrp x21, .LC2 add x21, x21, :lo12:.LC2 mov w24, 1 mov w23, 26215 movk w23, 0x6666, lsl 16 mov x20, x1 .L21: ldr w2, [x22, w19, sxtw 2] mov x1, x21 mov w0, w24 bl __printf_chk add w0, w19, 1 smull x19, w0, w23 asr x19, x19, 33 sub w19, w19, w0, asr 31 add w19, w19, w19, lsl 2 sub w19, w0, w19 ldr w0, [x20] cmp w0, w19 bne .L21 ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 ldp x23, x24, [sp, 48] .cfi_restore 24 .cfi_restore 23 .L20: adrp x0, .LANCHOR1 add x0, x0, :lo12:.LANCHOR1 ldr w2, [x0, w19, sxtw 2] adrp x1, .LC3 add x1, x1, :lo12:.LC3 mov w0, 1 bl __printf_chk ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L22: .cfi_restore_state mov w19, w0 b .L20 .cfi_endproc .LFE44: .size display, .-display .section .rodata.str1.8 .align 3 .LC4: .string "\n############### C-Q MENU #############" .align 3 .LC5: .string "1.Insert\t2.Delete\t3.Display\t4.Exit" .align 3 .LC6: .string "Enter Your Choice: " .align 3 .LC7: .string "%d" .align 3 .LC8: .string "Enter the element to insert: " .align 3 .LC9: .string "Deleted %d" .align 3 .LC10: .string "No Elements!..." .text .align 2 .global main .type main, %function main: .LFB39: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] str x25, [sp, 64] .cfi_offset 19, -80 .cfi_offset 20, -72 .cfi_offset 21, -64 .cfi_offset 22, -56 .cfi_offset 23, -48 .cfi_offset 24, -40 .cfi_offset 25, -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 adrp x23, .LC4 add x23, x23, :lo12:.LC4 adrp x22, .LC5 add x22, x22, :lo12:.LC5 adrp x24, .LANCHOR1 add x24, x24, :lo12:.LANCHOR1 add x25, x24, 20 b .L26 .L28: cmp w2, 4 bne .L36 mov w0, 0 bl exit .L29: adrp x1, .LC8 add x1, x1, :lo12:.LC8 mov w0, 1 bl __printf_chk mov x1, x25 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl __isoc99_scanf ldr w0, [x24, 20] bl insert .L26: adrp x20, .LC6 add x20, x20, :lo12:.LC6 mov w21, 1 adrp x19, .LC7 add x19, x19, :lo12:.LC7 .L36: mov x0, x23 bl puts mov x0, x22 bl puts mov x1, x20 mov w0, w21 bl __printf_chk add x1, sp, 84 mov x0, x19 bl __isoc99_scanf ldr w2, [sp, 84] cmp w2, 3 beq .L27 bgt .L28 cmp w2, 1 beq .L29 cmp w2, 2 bne .L36 bl delete str w0, [x24, 20] cmn w0, #1 beq .L26 mov w2, w0 adrp x1, .LC9 add x1, x1, :lo12:.LC9 mov w0, 1 bl __printf_chk b .L26 .L27: bl empty cbz w0, .L34 adrp x1, .LC10 add x1, x1, :lo12:.LC10 mov w0, 1 bl __printf_chk b .L26 .L34: bl display b .L26 .cfi_endproc .LFE39: .size main, .-main .global elm .global r .global f .global cq .data .align 2 .set .LANCHOR0,. + 0 .type r, %object .size r, 4 r: .word -1 .type f, %object .size f, 4 f: .word -1 .bss .align 3 .set .LANCHOR1,. + 0 .type cq, %object .size cq, 20 cq: .zero 20 .type elm, %object .size elm, 4 elm: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "6.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "CQ Overflow!..." .text .align 2 .p2align 4,,11 .global insert .type insert, %function insert: .LFB40: .cfi_startproc adrp x3, .LANCHOR0 add x5, x3, :lo12:.LANCHOR0 ldr w4, [x3, #:lo12:.LANCHOR0] ldr w1, [x5, 4] add w2, w4, 1 cmp w2, w1 beq .L2 cmp w1, 0 ccmp w4, 4, 0, eq beq .L2 cmn w1, #1 beq .L6 .L4: mov w1, 26215 adrp x4, .LANCHOR1 movk w1, 0x6666, lsl 16 add x4, x4, :lo12:.LANCHOR1 smull x1, w2, w1 asr x1, x1, 33 sub w1, w1, w2, asr 31 add w1, w1, w1, lsl 2 sub w1, w2, w1 str w1, [x3, #:lo12:.LANCHOR0] str w0, [x4, w1, sxtw 2] ret .p2align 2,,3 .L6: str wzr, [x5, 4] b .L4 .p2align 2,,3 .L2: adrp x0, .LC0 add x0, x0, :lo12:.LC0 b puts .cfi_endproc .LFE40: .size insert, .-insert .section .rodata.str1.8 .align 3 .LC1: .string "CQ Underflow!..." .text .align 2 .p2align 4,,11 .global delete .type delete, %function delete: .LFB41: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x1, .LANCHOR0 add x2, x1, :lo12:.LANCHOR0 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -16 ldr w19, [x2, 4] cmn w19, #1 beq .L8 adrp x0, .LANCHOR1 add x0, x0, :lo12:.LANCHOR1 ldr w3, [x1, #:lo12:.LANCHOR0] ldr w0, [x0, w19, sxtw 2] cmp w3, w19 beq .L14 add w19, w19, 1 mov w1, 26215 movk w1, 0x6666, lsl 16 smull x1, w19, w1 asr x1, x1, 33 sub w1, w1, w19, asr 31 add w1, w1, w1, lsl 2 sub w19, w19, w1 str w19, [x2, 4] ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L14: .cfi_restore_state mov w3, -1 str w3, [x2, 4] str w3, [x1, #:lo12:.LANCHOR0] ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L8: .cfi_restore_state adrp x1, .LC1 mov w0, 1 add x1, x1, :lo12:.LC1 bl __printf_chk mov w0, w19 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 .LFE41: .size delete, .-delete .align 2 .p2align 4,,11 .global full .type full, %function full: .LFB42: .cfi_startproc adrp x1, .LANCHOR0 add x2, x1, :lo12:.LANCHOR0 mov w0, 1 ldr w1, [x1, #:lo12:.LANCHOR0] ldr w2, [x2, 4] add w3, w1, w0 cmp w3, w2 beq .L15 cmp w2, 0 ccmp w1, 4, 0, eq cset w0, eq .L15: ret .cfi_endproc .LFE42: .size full, .-full .align 2 .p2align 4,,11 .global empty .type empty, %function empty: .LFB43: .cfi_startproc adrp x0, .LANCHOR0+4 ldr w0, [x0, #:lo12:.LANCHOR0+4] cmn w0, #1 cset w0, eq ret .cfi_endproc .LFE43: .size empty, .-empty .section .rodata.str1.8 .align 3 .LC2: .string "%d\t" .align 3 .LC3: .string "%d\n" .text .align 2 .p2align 4,,11 .global display .type display, %function display: .LFB44: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 adrp x0, .LANCHOR0 mov x29, sp stp x23, x24, [sp, 48] .cfi_offset 23, -16 .cfi_offset 24, -8 add x24, x0, :lo12:.LANCHOR0 ldr w0, [x0, #:lo12:.LANCHOR0] stp x19, x20, [sp, 16] .cfi_offset 19, -48 .cfi_offset 20, -40 ldr w19, [x24, 4] stp x21, x22, [sp, 32] .cfi_offset 21, -32 .cfi_offset 22, -24 adrp x22, .LANCHOR1 cmp w19, w0 beq .L20 adrp x20, .LC2 mov w23, 26215 add x21, x22, :lo12:.LANCHOR1 add x20, x20, :lo12:.LC2 movk w23, 0x6666, lsl 16 .p2align 3,,7 .L21: ldr w2, [x21, w19, sxtw 2] mov x1, x20 mov w0, 1 bl __printf_chk add w0, w19, 1 ldr w2, [x24] smull x19, w0, w23 asr x19, x19, 33 sub w19, w19, w0, asr 31 add w19, w19, w19, lsl 2 sub w19, w0, w19 cmp w2, w19 bne .L21 .L20: add x22, x22, :lo12:.LANCHOR1 adrp x1, .LC3 ldp x23, x24, [sp, 48] add x1, x1, :lo12:.LC3 ldr w2, [x22, w19, sxtw 2] mov w0, 1 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b __printf_chk .cfi_endproc .LFE44: .size display, .-display .section .rodata.str1.8 .align 3 .LC4: .string "\n############### C-Q MENU #############" .align 3 .LC5: .string "1.Insert\t2.Delete\t3.Display\t4.Exit" .align 3 .LC6: .string "Enter Your Choice: " .align 3 .LC7: .string "%d" .align 3 .LC8: .string "Enter the element to insert: " .align 3 .LC9: .string "Deleted %d" .align 3 .LC10: .string "No Elements!..." .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB39: .cfi_startproc stp x29, x30, [sp, -128]! .cfi_def_cfa_offset 128 .cfi_offset 29, -128 .cfi_offset 30, -120 adrp x0, :got:__stack_chk_guard adrp x1, .LC8 mov x29, sp ldr x0, [x0, #:got_lo12:__stack_chk_guard] stp x23, x24, [sp, 48] .cfi_offset 23, -80 .cfi_offset 24, -72 adrp x23, .LANCHOR1 add x23, x23, :lo12:.LANCHOR1 add x1, x1, :lo12:.LC8 add x2, x23, 20 stp x19, x20, [sp, 16] adrp x24, .LC7 stp x21, x22, [sp, 32] .cfi_offset 19, -112 .cfi_offset 20, -104 .cfi_offset 21, -96 .cfi_offset 22, -88 add x22, sp, 116 stp x25, x26, [sp, 64] .cfi_offset 25, -64 .cfi_offset 26, -56 adrp x26, .LC5 adrp x25, .LC6 stp x27, x28, [sp, 80] .cfi_offset 27, -48 .cfi_offset 28, -40 adrp x27, .LC4 stp x1, x2, [sp, 96] ldr x1, [x0] str x1, [sp, 120] mov x1, 0 .L28: add x28, x27, :lo12:.LC4 add x21, x26, :lo12:.LC5 add x20, x25, :lo12:.LC6 add x19, x24, :lo12:.LC7 .L41: mov x0, x28 bl puts mov x0, x21 bl puts mov x1, x20 mov w0, 1 bl __printf_chk mov x1, x22 mov x0, x19 bl __isoc99_scanf ldr w0, [sp, 116] cmp w0, 3 beq .L29 bgt .L30 cmp w0, 1 beq .L31 cmp w0, 2 bne .L41 bl delete str w0, [x23, 20] cmn w0, #1 beq .L28 mov w2, w0 adrp x1, .LC9 mov w0, 1 add x1, x1, :lo12:.LC9 bl __printf_chk b .L28 .p2align 2,,3 .L30: cmp w0, 4 bne .L41 mov w0, 0 bl exit .p2align 2,,3 .L29: adrp x0, .LANCHOR0+4 ldr w0, [x0, #:lo12:.LANCHOR0+4] cmn w0, #1 beq .L36 bl display b .L28 .p2align 2,,3 .L31: ldr x1, [sp, 96] bl __printf_chk ldr x1, [sp, 104] mov x0, x19 bl __isoc99_scanf ldr w0, [x23, 20] bl insert b .L28 .L36: adrp x1, .LC10 mov w0, 1 add x1, x1, :lo12:.LC10 bl __printf_chk b .L28 .cfi_endproc .LFE39: .size main, .-main .global elm .global r .global f .global cq .data .align 2 .set .LANCHOR0,. + 0 .type r, %object .size r, 4 r: .word -1 .type f, %object .size f, 4 f: .word -1 .bss .align 3 .set .LANCHOR1,. + 0 .type cq, %object .size cq, 20 cq: .zero 20 .type elm, %object .size elm, 4 elm: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "6.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "CQ Overflow!..." .text .align 2 .p2align 4,,11 .global insert .type insert, %function insert: .LFB40: .cfi_startproc adrp x3, .LANCHOR0 add x5, x3, :lo12:.LANCHOR0 ldr w4, [x3, #:lo12:.LANCHOR0] ldr w1, [x5, 4] add w2, w4, 1 cmp w2, w1 beq .L2 cmp w1, 0 ccmp w4, 4, 0, eq beq .L2 cmn w1, #1 beq .L6 .L4: mov w1, 26215 adrp x4, .LANCHOR1 movk w1, 0x6666, lsl 16 add x4, x4, :lo12:.LANCHOR1 smull x1, w2, w1 asr x1, x1, 33 sub w1, w1, w2, asr 31 add w1, w1, w1, lsl 2 sub w1, w2, w1 str w1, [x3, #:lo12:.LANCHOR0] str w0, [x4, w1, sxtw 2] ret .p2align 2,,3 .L6: str wzr, [x5, 4] b .L4 .p2align 2,,3 .L2: adrp x0, .LC0 add x0, x0, :lo12:.LC0 b puts .cfi_endproc .LFE40: .size insert, .-insert .section .rodata.str1.8 .align 3 .LC1: .string "CQ Underflow!..." .text .align 2 .p2align 4,,11 .global delete .type delete, %function delete: .LFB41: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x1, .LANCHOR0 add x2, x1, :lo12:.LANCHOR0 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -16 ldr w19, [x2, 4] cmn w19, #1 beq .L8 adrp x0, .LANCHOR1 add x0, x0, :lo12:.LANCHOR1 ldr w3, [x1, #:lo12:.LANCHOR0] ldr w0, [x0, w19, sxtw 2] cmp w3, w19 beq .L14 add w19, w19, 1 mov w1, 26215 movk w1, 0x6666, lsl 16 smull x1, w19, w1 asr x1, x1, 33 sub w1, w1, w19, asr 31 add w1, w1, w1, lsl 2 sub w19, w19, w1 str w19, [x2, 4] ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L14: .cfi_restore_state mov w3, -1 str w3, [x2, 4] str w3, [x1, #:lo12:.LANCHOR0] ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L8: .cfi_restore_state adrp x1, .LC1 mov w0, 1 add x1, x1, :lo12:.LC1 bl __printf_chk mov w0, w19 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 .LFE41: .size delete, .-delete .align 2 .p2align 4,,11 .global full .type full, %function full: .LFB42: .cfi_startproc adrp x1, .LANCHOR0 add x2, x1, :lo12:.LANCHOR0 mov w0, 1 ldr w1, [x1, #:lo12:.LANCHOR0] ldr w2, [x2, 4] add w3, w1, w0 cmp w3, w2 beq .L15 cmp w2, 0 ccmp w1, 4, 0, eq cset w0, eq .L15: ret .cfi_endproc .LFE42: .size full, .-full .align 2 .p2align 4,,11 .global empty .type empty, %function empty: .LFB43: .cfi_startproc adrp x0, .LANCHOR0+4 ldr w0, [x0, #:lo12:.LANCHOR0+4] cmn w0, #1 cset w0, eq ret .cfi_endproc .LFE43: .size empty, .-empty .section .rodata.str1.8 .align 3 .LC2: .string "%d\t" .align 3 .LC3: .string "%d\n" .text .align 2 .p2align 4,,11 .global display .type display, %function display: .LFB44: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 adrp x0, .LANCHOR0 mov x29, sp stp x23, x24, [sp, 48] .cfi_offset 23, -16 .cfi_offset 24, -8 add x24, x0, :lo12:.LANCHOR0 ldr w0, [x0, #:lo12:.LANCHOR0] stp x19, x20, [sp, 16] .cfi_offset 19, -48 .cfi_offset 20, -40 ldr w19, [x24, 4] stp x21, x22, [sp, 32] .cfi_offset 21, -32 .cfi_offset 22, -24 adrp x22, .LANCHOR1 cmp w19, w0 beq .L20 adrp x20, .LC2 mov w23, 26215 add x21, x22, :lo12:.LANCHOR1 add x20, x20, :lo12:.LC2 movk w23, 0x6666, lsl 16 .p2align 3,,7 .L21: ldr w2, [x21, w19, sxtw 2] mov x1, x20 mov w0, 1 bl __printf_chk add w0, w19, 1 ldr w2, [x24] smull x19, w0, w23 asr x19, x19, 33 sub w19, w19, w0, asr 31 add w19, w19, w19, lsl 2 sub w19, w0, w19 cmp w2, w19 bne .L21 .L20: add x22, x22, :lo12:.LANCHOR1 adrp x1, .LC3 ldp x23, x24, [sp, 48] add x1, x1, :lo12:.LC3 ldr w2, [x22, w19, sxtw 2] mov w0, 1 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b __printf_chk .cfi_endproc .LFE44: .size display, .-display .section .rodata.str1.8 .align 3 .LC4: .string "\n############### C-Q MENU #############" .align 3 .LC5: .string "1.Insert\t2.Delete\t3.Display\t4.Exit" .align 3 .LC6: .string "Enter Your Choice: " .align 3 .LC7: .string "%d" .align 3 .LC8: .string "Enter the element to insert: " .align 3 .LC9: .string "Deleted %d" .align 3 .LC10: .string "No Elements!..." .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB39: .cfi_startproc stp x29, x30, [sp, -128]! .cfi_def_cfa_offset 128 .cfi_offset 29, -128 .cfi_offset 30, -120 adrp x0, :got:__stack_chk_guard adrp x1, .LC8 mov x29, sp ldr x0, [x0, #:got_lo12:__stack_chk_guard] stp x23, x24, [sp, 48] .cfi_offset 23, -80 .cfi_offset 24, -72 adrp x23, .LANCHOR1 add x23, x23, :lo12:.LANCHOR1 add x1, x1, :lo12:.LC8 add x2, x23, 20 stp x19, x20, [sp, 16] adrp x24, .LC7 stp x21, x22, [sp, 32] .cfi_offset 19, -112 .cfi_offset 20, -104 .cfi_offset 21, -96 .cfi_offset 22, -88 add x22, sp, 116 stp x25, x26, [sp, 64] .cfi_offset 25, -64 .cfi_offset 26, -56 adrp x26, .LC5 adrp x25, .LC6 stp x27, x28, [sp, 80] .cfi_offset 27, -48 .cfi_offset 28, -40 adrp x27, .LC4 stp x1, x2, [sp, 96] ldr x1, [x0] str x1, [sp, 120] mov x1, 0 .L28: add x28, x27, :lo12:.LC4 add x21, x26, :lo12:.LC5 add x20, x25, :lo12:.LC6 add x19, x24, :lo12:.LC7 .L41: mov x0, x28 bl puts mov x0, x21 bl puts mov x1, x20 mov w0, 1 bl __printf_chk mov x1, x22 mov x0, x19 bl __isoc99_scanf ldr w0, [sp, 116] cmp w0, 3 beq .L29 bgt .L30 cmp w0, 1 beq .L31 cmp w0, 2 bne .L41 bl delete str w0, [x23, 20] cmn w0, #1 beq .L28 mov w2, w0 adrp x1, .LC9 mov w0, 1 add x1, x1, :lo12:.LC9 bl __printf_chk b .L28 .p2align 2,,3 .L30: cmp w0, 4 bne .L41 mov w0, 0 bl exit .p2align 2,,3 .L29: adrp x0, .LANCHOR0+4 ldr w0, [x0, #:lo12:.LANCHOR0+4] cmn w0, #1 beq .L36 bl display b .L28 .p2align 2,,3 .L31: ldr x1, [sp, 96] bl __printf_chk ldr x1, [sp, 104] mov x0, x19 bl __isoc99_scanf ldr w0, [x23, 20] bl insert b .L28 .L36: adrp x1, .LC10 mov w0, 1 add x1, x1, :lo12:.LC10 bl __printf_chk b .L28 .cfi_endproc .LFE39: .size main, .-main .global elm .global r .global f .global cq .data .align 2 .set .LANCHOR0,. + 0 .type r, %object .size r, 4 r: .word -1 .type f, %object .size f, 4 f: .word -1 .bss .align 4 .set .LANCHOR1,. + 0 .type cq, %object .size cq, 20 cq: .zero 20 .type elm, %object .size elm, 4 elm: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
compile000d.c
int main(int argc, char **argv) { if (argc || argc - 1) return 2; return 1; }
.file "compile000d.c" .option pic .text .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 mv a5,a0 sd a1,-32(s0) sw a5,-20(s0) lw a5,-20(s0) sext.w a5,a5 bne a5,zero,.L2 lw a5,-20(s0) sext.w a4,a5 li a5,1 beq a4,a5,.L3 .L2: li a5,2 j .L4 .L3: li a5,1 .L4: mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "compile000d.c" .option pic .text .align 1 .globl main .type main, @function main: li a0,2 ret .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "compile000d.c" .option pic .text .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: li a0,2 ret .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "compile000d.c" .option pic .text .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: li a0,2 ret .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "compile000d.c" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] str x1, [sp] ldr w0, [sp, 12] cmp w0, 0 bne .L2 ldr w0, [sp, 12] cmp w0, 1 beq .L3 .L2: mov w0, 2 b .L4 .L3: mov w0, 1 .L4: add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "compile000d.c" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc mov w0, 2 ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "compile000d.c" .text .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB0: .cfi_startproc mov w0, 2 ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "compile000d.c" .text .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB0: .cfi_startproc mov w0, 2 ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
q1_server.c
#include<string.h> #include<unistd.h> #include<sys/socket.h> #include<sys/types.h> #include<netinet/in.h> #include<stdlib.h> #include<stdio.h> #define MAX_LEN 100 void replaceAll(char *str, const char *oldWord, const char *newWord) { char *pos, temp[1000]; int index = 0; int owlen; owlen = strlen(oldWord); /* * Repeat till all occurrences are replaced. */ while ((pos = strstr(str, oldWord)) != NULL) { // Bakup current line strcpy(temp, str); // Index of current found word index = pos - str; // Terminate str after word found index str[index] = '\0'; // Concatenate str with new word strcat(str, newWord); // Concatenate str with remaining words after // oldword found index. strcat(str, temp + index + owlen); } } int main() { int s,r,recb,sntb,x,ns,a=0; printf("INPUT port number: "); scanf("%d", &x); socklen_t len; struct sockaddr_in server,client; char buff[50]; s=socket(AF_INET,SOCK_STREAM,0); if(s==-1) { printf("\nSocket creation error."); exit(0); } printf("\nSocket created."); server.sin_family=AF_INET; server.sin_port=htons(x); server.sin_addr.s_addr=htonl(INADDR_ANY); r=bind(s,(struct sockaddr*)&server,sizeof(server)); if(r==-1) { printf("\nBinding error."); exit(0); } printf("\nSocket binded."); r=listen(s,1); if(r==-1) { close(s); exit(0); } printf("\nSocket listening.\n"); len=sizeof(client); ns=accept(s,(struct sockaddr*)&client, &len); if(ns==-1) { close(s); exit(0); } printf("\nSocket accepting.\n"); recb=recv(ns,buff,sizeof(buff),0); if(recb==-1) { printf("\nMessage Recieving Failed"); close(s); close(ns); exit(0); } printf("\nFile Name Recieved!\n"); /*printf("%s", buff); printf("\n\n"); scanf("%s", buff);*/ char fil[50]; if( access( buff, F_OK ) != -1 ) { // file exists strcpy(fil,buff); strcpy(buff,"File exists"); } else { // file doesn't exist strcpy(buff,"File does not exist!"); } sntb=send(ns,buff,sizeof(buff),0); if(sntb==-1) { printf("\nMessage Sending Failed"); close(s); close(ns); exit(0); } if(strcmp(buff,"File does not exist!")==0) { close(s); close(ns); exit(0); } int ch=0; while(ch!=4){ recb=recv(ns,buff,sizeof(buff),0); if(recb==-1) { printf("\nMessage Recieving Failed"); close(s); close(ns); exit(0); } ch = buff[0]; int i,n,n1,n2,j; char str[50],str1[50],str2[50]; char strTempData[MAX_LEN]; char **strData = NULL; // String List int noOfLines = 0; switch(ch) { case 1: printf("\nSearching..\n"); n=buff[1]; for(i=0;i<n;i++) str[i]=buff[i+2]; str[n]='\0'; FILE *fp; int line_num = 1; int find_result = 0; char temp[512]; if((fp = fopen(fil, "r")) == NULL) { printf("\nFile not found"); close(s); close(ns); exit(0); } while(fgets(temp, 512, fp) != NULL) { if((strstr(temp, str)) != NULL) { find_result++; } line_num++; } if(fp) { fclose(fp); } buff[0]=find_result; sntb=send(ns,buff,sizeof(buff),0); if(sntb==-1) { printf("\nMessage Sending Failed"); close(s); close(ns); exit(0); } break; case 2: n1=buff[1]; i=2; for(j=0;j<n1;j++) { str1[j]=buff[i]; i++; } str1[j]='\0'; recb=recv(ns,buff,sizeof(buff),0); if(recb==-1) { printf("\nMessage Recieving Failed"); close(s); close(ns); exit(0); } n=buff[1]; i=2; for(j=0;j<n;j++) { str2[j]=buff[i]; i++; } str2[j]='\0'; printf("\nReplacing %s with %s..\n",str1,str2); FILE * fPtr; FILE * fTemp; char buffer[1000]; fPtr = fopen(fil, "r"); fTemp = fopen("replace.tmp", "w"); if (fPtr == NULL || fTemp == NULL) { /* Unable to open file hence exit */ printf("\nUnable to open file.\n"); printf("Please check whether file exists and you have read/write privilege.\n"); exit(0); } while ((fgets(buffer, 1000, fPtr)) != NULL) { // Replace all occurrence of word from current line replaceAll(buffer, str1, str2); // After replacing write it to temp file. fputs(buffer, fTemp); } /* Close all files to release resource */ fclose(fPtr); fclose(fTemp); /* Delete original source file */ remove(fil); /* Rename temp file as original file */ rename("replace.tmp", fil); strcpy(buff,"Replace finished!"); sntb=send(ns,buff,sizeof(buff),0); if(sntb==-1) { printf("\nMessage Sending Failed"); close(s); close(ns); exit(0); } break; case 3:printf("\nOrdering file..\n"); FILE * ptrFileLog = NULL; FILE * ptrSummary = NULL; if ( (ptrFileLog = fopen(fil, "r")) == NULL ) { fprintf(stderr,"Error: Could not open %s\n",fil); return 1; } if ( (ptrSummary = fopen("temp.txt", "a")) == NULL ) { fprintf(stderr,"Error: Could not open temp.txt\n"); return 1; } // Read and store in a string list. while(fgets(strTempData, MAX_LEN, ptrFileLog) != NULL) { // Remove the trailing newline character if(strchr(strTempData,'\n')) strTempData[strlen(strTempData)-1] = '\0'; strData = (char**)realloc(strData, sizeof(char**)*(noOfLines+1)); strData[noOfLines] = (char*)calloc(MAX_LEN,sizeof(char)); strcpy(strData[noOfLines], strTempData); noOfLines++; } // Sort the array. for(i= 0; i < (noOfLines - 1); ++i) { for(j = 0; j < ( noOfLines - i - 1); ++j) { if(strcmp(strData[j], strData[j+1]) > 0) { strcpy(strTempData, strData[j]); strcpy(strData[j], strData[j+1]); strcpy(strData[j+1], strTempData); } } } // Write it to outfile. file. for(i = 0; i < noOfLines; i++) fprintf(ptrSummary,"%s\n",strData[i]); // free each string for(i = 0; i < noOfLines; i++) free(strData[i]); // free string list. free(strData); remove(fil); rename("temp.txt",fil); fclose(ptrFileLog); fclose(ptrSummary); strcpy(buff,"Ordering done!"); sntb=send(ns,buff,sizeof(buff),0); if(sntb==-1) { printf("\nMessage Sending Failed"); close(s); close(ns); exit(0); } break; case 4: ch=4; break; } } close(ns); close(s); }
.file "q1_server.c" .option pic .text .align 1 .globl replaceAll .type replaceAll, @function replaceAll: addi sp,sp,-1072 sd ra,1064(sp) sd s0,1056(sp) addi s0,sp,1072 sd a0,-1048(s0) sd a1,-1056(s0) sd a2,-1064(s0) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 sw zero,-1040(s0) ld a0,-1056(s0) call strlen@plt mv a5,a0 sw a5,-1036(s0) j .L2 .L3: addi a5,s0,-1024 ld a1,-1048(s0) mv a0,a5 call strcpy@plt ld a4,-1032(s0) ld a5,-1048(s0) sub a5,a4,a5 sw a5,-1040(s0) lw a5,-1040(s0) ld a4,-1048(s0) add a5,a4,a5 sb zero,0(a5) ld a1,-1064(s0) ld a0,-1048(s0) call strcat@plt lw a4,-1040(s0) lw a5,-1036(s0) add a5,a4,a5 addi a4,s0,-1024 add a5,a4,a5 mv a1,a5 ld a0,-1048(s0) call strcat@plt .L2: ld a1,-1056(s0) ld a0,-1048(s0) call strstr@plt sd a0,-1032(s0) ld a5,-1032(s0) bne a5,zero,.L3 nop la a5,__stack_chk_guard ld a4, -24(s0) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 beq a5,zero,.L4 call __stack_chk_fail@plt .L4: ld ra,1064(sp) ld s0,1056(sp) addi sp,sp,1072 jr ra .size replaceAll, .-replaceAll .section .rodata .align 3 .LC0: .string "INPUT port number: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "\nSocket creation error." .align 3 .LC3: .string "\nSocket created." .align 3 .LC4: .string "\nBinding error." .align 3 .LC5: .string "\nSocket binded." .align 3 .LC6: .string "\nSocket listening." .align 3 .LC7: .string "\nSocket accepting." .align 3 .LC8: .string "\nMessage Recieving Failed" .align 3 .LC9: .string "\nFile Name Recieved!" .align 3 .LC10: .string "File exists" .align 3 .LC11: .string "File does not exist!" .align 3 .LC12: .string "\nMessage Sending Failed" .align 3 .LC13: .string "\nSearching.." .align 3 .LC14: .string "r" .align 3 .LC15: .string "\nFile not found" .align 3 .LC16: .string "\nReplacing %s with %s..\n" .align 3 .LC17: .string "w" .align 3 .LC18: .string "replace.tmp" .align 3 .LC19: .string "\nUnable to open file." .align 3 .LC20: .string "Please check whether file exists and you have read/write privilege." .align 3 .LC21: .string "Replace finished!" .align 3 .LC22: .string "\nOrdering file.." .align 3 .LC23: .string "Error: Could not open %s\n" .align 3 .LC24: .string "a" .align 3 .LC25: .string "temp.txt" .align 3 .LC26: .string "Error: Could not open temp.txt\n" .align 3 .LC27: .string "%s\n" .align 3 .LC28: .string "Ordering done!" .text .align 1 .globl main .type main, @function main: addi sp,sp,-1408 sd ra,1400(sp) sd s0,1392(sp) sd s1,1384(sp) addi s0,sp,1408 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -40(s0) li a4, 0 sw zero,-1376(s0) lla a0,.LC0 call printf@plt addi a5,s0,-1408 mv a1,a5 lla a0,.LC1 call __isoc99_scanf@plt li a2,0 li a1,1 li a0,2 call socket@plt mv a5,a0 sw a5,-1372(s0) lw a5,-1372(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L6 lla a0,.LC2 call printf@plt li a0,0 call exit@plt .L6: lla a0,.LC3 call printf@plt li a5,2 sh a5,-1296(s0) lw a5,-1408(s0) slli a5,a5,48 srli a5,a5,48 mv a0,a5 call htons@plt mv a5,a0 sh a5,-1294(s0) li a0,0 call htonl@plt mv a5,a0 sext.w a5,a5 sw a5,-1292(s0) addi a4,s0,-1296 lw a5,-1372(s0) li a2,16 mv a1,a4 mv a0,a5 call bind@plt mv a5,a0 sw a5,-1368(s0) lw a5,-1368(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L7 lla a0,.LC4 call printf@plt li a0,0 call exit@plt .L7: lla a0,.LC5 call printf@plt lw a5,-1372(s0) li a1,1 mv a0,a5 call listen@plt mv a5,a0 sw a5,-1368(s0) lw a5,-1368(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L8 lw a5,-1372(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L8: lla a0,.LC6 call puts@plt li a5,16 sw a5,-1404(s0) addi a3,s0,-1404 addi a4,s0,-1280 lw a5,-1372(s0) mv a2,a3 mv a1,a4 mv a0,a5 call accept@plt mv a5,a0 sw a5,-1364(s0) lw a5,-1364(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L9 lw a5,-1372(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L9: lla a0,.LC7 call puts@plt addi a4,s0,-1264 lw a5,-1364(s0) li a3,0 li a2,50 mv a1,a4 mv a0,a5 call recv@plt mv a5,a0 sw a5,-1360(s0) lw a5,-1360(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L10 lla a0,.LC8 call printf@plt lw a5,-1372(s0) mv a0,a5 call close@plt lw a5,-1364(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L10: lla a0,.LC9 call puts@plt addi a5,s0,-1264 li a1,0 mv a0,a5 call access@plt mv a5,a0 mv a4,a5 li a5,-1 beq a4,a5,.L11 addi a4,s0,-1264 addi a5,s0,-1208 mv a1,a4 mv a0,a5 call strcpy@plt addi a5,s0,-1264 lla a4,.LC10 ld a3,0(a4) sd a3,0(a5) lw a4,8(a4) sw a4,8(a5) j .L12 .L11: addi a5,s0,-1264 lla a4,.LC11 ld a2,0(a4) ld a3,8(a4) sd a2,0(a5) sd a3,8(a5) lw a3,16(a4) sw a3,16(a5) lbu a4,20(a4) sb a4,20(a5) .L12: addi a4,s0,-1264 lw a5,-1364(s0) li a3,0 li a2,50 mv a1,a4 mv a0,a5 call send@plt mv a5,a0 sw a5,-1356(s0) lw a5,-1356(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L13 lla a0,.LC12 call printf@plt lw a5,-1372(s0) mv a0,a5 call close@plt lw a5,-1364(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L13: addi a5,s0,-1264 lla a1,.LC11 mv a0,a5 call strcmp@plt mv a5,a0 bne a5,zero,.L14 lw a5,-1372(s0) mv a0,a5 call close@plt lw a5,-1364(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L14: sw zero,-1400(s0) j .L15 .L58: addi a4,s0,-1264 lw a5,-1364(s0) li a3,0 li a2,50 mv a1,a4 mv a0,a5 call recv@plt mv a5,a0 sw a5,-1360(s0) lw a5,-1360(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L16 lla a0,.LC8 call printf@plt lw a5,-1372(s0) mv a0,a5 call close@plt lw a5,-1364(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L16: lbu a5,-1264(s0) sw a5,-1400(s0) sd zero,-1344(s0) sw zero,-1388(s0) lw a5,-1400(s0) sext.w a4,a5 li a5,4 beq a4,a5,.L17 lw a5,-1400(s0) sext.w a4,a5 li a5,4 bgt a4,a5,.L15 lw a5,-1400(s0) sext.w a4,a5 li a5,3 beq a4,a5,.L19 lw a5,-1400(s0) sext.w a4,a5 li a5,3 bgt a4,a5,.L15 lw a5,-1400(s0) sext.w a4,a5 li a5,1 beq a4,a5,.L20 lw a5,-1400(s0) sext.w a4,a5 li a5,2 beq a4,a5,.L21 j .L15 .L20: lla a0,.LC13 call puts@plt lbu a5,-1263(s0) sw a5,-1348(s0) sw zero,-1396(s0) j .L22 .L23: lw a5,-1396(s0) addiw a5,a5,2 sext.w a5,a5 addi a5,a5,-32 add a5,a5,s0 lbu a4,-1232(a5) lw a5,-1396(s0) addi a5,a5,-32 add a5,a5,s0 sb a4,-1064(a5) lw a5,-1396(s0) addiw a5,a5,1 sw a5,-1396(s0) .L22: lw a5,-1396(s0) mv a4,a5 lw a5,-1348(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L23 lw a5,-1348(s0) addi a5,a5,-32 add a5,a5,s0 sb zero,-1064(a5) li a5,1 sw a5,-1384(s0) sw zero,-1380(s0) addi a5,s0,-1208 lla a1,.LC14 mv a0,a5 call fopen@plt mv a5,a0 sd a5,-1304(s0) ld a5,-1304(s0) bne a5,zero,.L25 lla a0,.LC15 call printf@plt lw a5,-1372(s0) mv a0,a5 call close@plt lw a5,-1364(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L27: addi a4,s0,-1096 addi a5,s0,-1040 mv a1,a4 mv a0,a5 call strstr@plt mv a5,a0 beq a5,zero,.L26 lw a5,-1380(s0) addiw a5,a5,1 sw a5,-1380(s0) .L26: lw a5,-1384(s0) addiw a5,a5,1 sw a5,-1384(s0) .L25: addi a5,s0,-1040 ld a2,-1304(s0) li a1,512 mv a0,a5 call fgets@plt mv a5,a0 bne a5,zero,.L27 ld a5,-1304(s0) beq a5,zero,.L28 ld a0,-1304(s0) call fclose@plt .L28: lw a5,-1380(s0) andi a5,a5,0xff sb a5,-1264(s0) addi a4,s0,-1264 lw a5,-1364(s0) li a3,0 li a2,50 mv a1,a4 mv a0,a5 call send@plt mv a5,a0 sw a5,-1356(s0) lw a5,-1356(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L60 lla a0,.LC12 call printf@plt lw a5,-1372(s0) mv a0,a5 call close@plt lw a5,-1364(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L21: lbu a5,-1263(s0) sw a5,-1352(s0) li a5,2 sw a5,-1396(s0) sw zero,-1392(s0) j .L31 .L32: lw a5,-1396(s0) addi a5,a5,-32 add a5,a5,s0 lbu a4,-1232(a5) lw a5,-1392(s0) addi a5,a5,-32 add a5,a5,s0 sb a4,-1120(a5) lw a5,-1396(s0) addiw a5,a5,1 sw a5,-1396(s0) lw a5,-1392(s0) addiw a5,a5,1 sw a5,-1392(s0) .L31: lw a5,-1392(s0) mv a4,a5 lw a5,-1352(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L32 lw a5,-1392(s0) addi a5,a5,-32 add a5,a5,s0 sb zero,-1120(a5) addi a4,s0,-1264 lw a5,-1364(s0) li a3,0 li a2,50 mv a1,a4 mv a0,a5 call recv@plt mv a5,a0 sw a5,-1360(s0) lw a5,-1360(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L33 lla a0,.LC8 call printf@plt lw a5,-1372(s0) mv a0,a5 call close@plt lw a5,-1364(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L33: lbu a5,-1263(s0) sw a5,-1348(s0) li a5,2 sw a5,-1396(s0) sw zero,-1392(s0) j .L34 .L35: lw a5,-1396(s0) addi a5,a5,-32 add a5,a5,s0 lbu a4,-1232(a5) lw a5,-1392(s0) addi a5,a5,-32 add a5,a5,s0 sb a4,-1064(a5) lw a5,-1396(s0) addiw a5,a5,1 sw a5,-1396(s0) lw a5,-1392(s0) addiw a5,a5,1 sw a5,-1392(s0) .L34: lw a5,-1392(s0) mv a4,a5 lw a5,-1348(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L35 lw a5,-1392(s0) addi a5,a5,-32 add a5,a5,s0 sb zero,-1064(a5) addi a4,s0,-1096 addi a5,s0,-1152 mv a2,a4 mv a1,a5 lla a0,.LC16 call printf@plt addi a5,s0,-1208 lla a1,.LC14 mv a0,a5 call fopen@plt mv a5,a0 sd a5,-1320(s0) lla a1,.LC17 lla a0,.LC18 call fopen@plt mv a5,a0 sd a5,-1312(s0) ld a5,-1320(s0) beq a5,zero,.L36 ld a5,-1312(s0) bne a5,zero,.L38 .L36: lla a0,.LC19 call puts@plt lla a0,.LC20 call puts@plt li a0,0 call exit@plt .L39: addi a3,s0,-1096 addi a4,s0,-1152 addi a5,s0,-1040 mv a2,a3 mv a1,a4 mv a0,a5 call replaceAll addi a5,s0,-1040 ld a1,-1312(s0) mv a0,a5 call fputs@plt .L38: addi a5,s0,-1040 ld a2,-1320(s0) li a1,1000 mv a0,a5 call fgets@plt mv a5,a0 bne a5,zero,.L39 ld a0,-1320(s0) call fclose@plt ld a0,-1312(s0) call fclose@plt addi a5,s0,-1208 mv a0,a5 call remove@plt addi a5,s0,-1208 mv a1,a5 lla a0,.LC18 call rename@plt addi a5,s0,-1264 lla a4,.LC21 ld a3,0(a4) sd a3,0(a5) ld a3,8(a4) sd a3,8(a5) lhu a4,16(a4) sh a4,16(a5) addi a4,s0,-1264 lw a5,-1364(s0) li a3,0 li a2,50 mv a1,a4 mv a0,a5 call send@plt mv a5,a0 sw a5,-1356(s0) lw a5,-1356(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L61 lla a0,.LC12 call printf@plt lw a5,-1372(s0) mv a0,a5 call close@plt lw a5,-1364(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L19: lla a0,.LC22 call puts@plt sd zero,-1336(s0) sd zero,-1328(s0) addi a5,s0,-1208 lla a1,.LC14 mv a0,a5 call fopen@plt mv a5,a0 sd a5,-1336(s0) ld a5,-1336(s0) bne a5,zero,.L41 la a5,stderr ld a5,0(a5) addi a4,s0,-1208 mv a2,a4 lla a1,.LC23 mv a0,a5 call fprintf@plt li a5,1 j .L57 .L41: lla a1,.LC24 lla a0,.LC25 call fopen@plt mv a5,a0 sd a5,-1328(s0) ld a5,-1328(s0) bne a5,zero,.L44 la a5,stderr ld a5,0(a5) mv a3,a5 li a2,31 li a1,1 lla a0,.LC26 call fwrite@plt li a5,1 j .L57 .L46: addi a5,s0,-1040 li a1,10 mv a0,a5 call strchr@plt mv a5,a0 beq a5,zero,.L45 addi a5,s0,-1040 mv a0,a5 call strlen@plt mv a5,a0 addi a5,a5,-1 addi a5,a5,-32 add a5,a5,s0 sb zero,-1008(a5) .L45: lw a5,-1388(s0) addiw a5,a5,1 sext.w a5,a5 slli a5,a5,3 mv a1,a5 ld a0,-1344(s0) call realloc@plt sd a0,-1344(s0) lw a5,-1388(s0) slli a5,a5,3 ld a4,-1344(s0) add s1,a4,a5 li a1,1 li a0,100 call calloc@plt mv a5,a0 sd a5,0(s1) lw a5,-1388(s0) slli a5,a5,3 ld a4,-1344(s0) add a5,a4,a5 ld a5,0(a5) addi a4,s0,-1040 mv a1,a4 mv a0,a5 call strcpy@plt lw a5,-1388(s0) addiw a5,a5,1 sw a5,-1388(s0) .L44: addi a5,s0,-1040 ld a2,-1336(s0) li a1,100 mv a0,a5 call fgets@plt mv a5,a0 bne a5,zero,.L46 sw zero,-1396(s0) j .L47 .L51: sw zero,-1392(s0) j .L48 .L50: lw a5,-1392(s0) slli a5,a5,3 ld a4,-1344(s0) add a5,a4,a5 ld a3,0(a5) lw a5,-1392(s0) addi a5,a5,1 slli a5,a5,3 ld a4,-1344(s0) add a5,a4,a5 ld a5,0(a5) mv a1,a5 mv a0,a3 call strcmp@plt mv a5,a0 ble a5,zero,.L49 lw a5,-1392(s0) slli a5,a5,3 ld a4,-1344(s0) add a5,a4,a5 ld a4,0(a5) addi a5,s0,-1040 mv a1,a4 mv a0,a5 call strcpy@plt lw a5,-1392(s0) slli a5,a5,3 ld a4,-1344(s0) add a5,a4,a5 ld a3,0(a5) lw a5,-1392(s0) addi a5,a5,1 slli a5,a5,3 ld a4,-1344(s0) add a5,a4,a5 ld a5,0(a5) mv a1,a5 mv a0,a3 call strcpy@plt lw a5,-1392(s0) addi a5,a5,1 slli a5,a5,3 ld a4,-1344(s0) add a5,a4,a5 ld a5,0(a5) addi a4,s0,-1040 mv a1,a4 mv a0,a5 call strcpy@plt .L49: lw a5,-1392(s0) addiw a5,a5,1 sw a5,-1392(s0) .L48: lw a5,-1388(s0) mv a4,a5 lw a5,-1396(s0) subw a5,a4,a5 sext.w a5,a5 addiw a5,a5,-1 sext.w a4,a5 lw a5,-1392(s0) sext.w a5,a5 blt a5,a4,.L50 lw a5,-1396(s0) addiw a5,a5,1 sw a5,-1396(s0) .L47: lw a5,-1388(s0) addiw a5,a5,-1 sext.w a4,a5 lw a5,-1396(s0) sext.w a5,a5 blt a5,a4,.L51 sw zero,-1396(s0) j .L52 .L53: lw a5,-1396(s0) slli a5,a5,3 ld a4,-1344(s0) add a5,a4,a5 ld a5,0(a5) mv a2,a5 lla a1,.LC27 ld a0,-1328(s0) call fprintf@plt lw a5,-1396(s0) addiw a5,a5,1 sw a5,-1396(s0) .L52: lw a5,-1396(s0) mv a4,a5 lw a5,-1388(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L53 sw zero,-1396(s0) j .L54 .L55: lw a5,-1396(s0) slli a5,a5,3 ld a4,-1344(s0) add a5,a4,a5 ld a5,0(a5) mv a0,a5 call free@plt lw a5,-1396(s0) addiw a5,a5,1 sw a5,-1396(s0) .L54: lw a5,-1396(s0) mv a4,a5 lw a5,-1388(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L55 ld a0,-1344(s0) call free@plt addi a5,s0,-1208 mv a0,a5 call remove@plt addi a5,s0,-1208 mv a1,a5 lla a0,.LC25 call rename@plt ld a0,-1336(s0) call fclose@plt ld a0,-1328(s0) call fclose@plt addi a5,s0,-1264 lla a4,.LC28 ld a3,0(a4) sd a3,0(a5) lw a3,8(a4) sw a3,8(a5) lhu a3,12(a4) sh a3,12(a5) lbu a4,14(a4) sb a4,14(a5) addi a4,s0,-1264 lw a5,-1364(s0) li a3,0 li a2,50 mv a1,a4 mv a0,a5 call send@plt mv a5,a0 sw a5,-1356(s0) lw a5,-1356(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L62 lla a0,.LC12 call printf@plt lw a5,-1372(s0) mv a0,a5 call close@plt lw a5,-1364(s0) mv a0,a5 call close@plt li a0,0 call exit@plt .L17: li a5,4 sw a5,-1400(s0) j .L15 .L60: nop j .L15 .L61: nop j .L15 .L62: nop .L15: lw a5,-1400(s0) sext.w a4,a5 li a5,4 bne a4,a5,.L58 lw a5,-1364(s0) mv a0,a5 call close@plt lw a5,-1372(s0) mv a0,a5 call close@plt li a5,0 .L57: mv a4,a5 la a5,__stack_chk_guard ld a3, -40(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L59 call __stack_chk_fail@plt .L59: mv a0,a4 ld ra,1400(sp) ld s0,1392(sp) ld s1,1384(sp) addi sp,sp,1408 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "q1_server.c" .option pic .text .align 1 .globl replaceAll .type replaceAll, @function replaceAll: addi sp,sp,-1072 sd ra,1064(sp) sd s0,1056(sp) sd s1,1048(sp) sd s2,1040(sp) sd s3,1032(sp) sd s4,1024(sp) sd s5,1016(sp) mv s1,a0 mv s3,a1 mv s5,a2 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 1000(sp) li a4, 0 mv a0,a1 call strlen@plt sext.w s4,a0 mv s2,sp j .L2 .L3: li a2,1000 mv a1,s1 mv a0,s2 call __strcpy_chk@plt subw s0,s0,s1 add a5,s1,s0 sb zero,0(a5) mv a1,s5 mv a0,s1 call strcat@plt add s0,s4,s0 add a1,s2,s0 mv a0,s1 call strcat@plt .L2: mv a1,s3 mv a0,s1 call strstr@plt mv s0,a0 bne a0,zero,.L3 la a5,__stack_chk_guard ld a4, 1000(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L6 ld ra,1064(sp) ld s0,1056(sp) ld s1,1048(sp) ld s2,1040(sp) ld s3,1032(sp) ld s4,1024(sp) ld s5,1016(sp) addi sp,sp,1072 jr ra .L6: call __stack_chk_fail@plt .size replaceAll, .-replaceAll .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "INPUT port number: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "\nSocket creation error." .align 3 .LC3: .string "\nSocket created." .align 3 .LC4: .string "\nBinding error." .align 3 .LC5: .string "\nSocket binded." .align 3 .LC6: .string "\nSocket listening." .align 3 .LC7: .string "\nSocket accepting." .align 3 .LC8: .string "\nMessage Recieving Failed" .align 3 .LC9: .string "\nFile Name Recieved!" .align 3 .LC10: .string "File exists" .align 3 .LC11: .string "File does not exist!" .align 3 .LC12: .string "\nMessage Sending Failed" .align 3 .LC13: .string "\nSearching.." .align 3 .LC14: .string "r" .align 3 .LC15: .string "\nFile not found" .align 3 .LC16: .string "\nReplacing %s with %s..\n" .align 3 .LC17: .string "w" .align 3 .LC18: .string "replace.tmp" .align 3 .LC19: .string "\nUnable to open file." .align 3 .LC20: .string "Please check whether file exists and you have read/write privilege." .align 3 .LC21: .string "Replace finished!" .align 3 .LC22: .string "\nOrdering file.." .align 3 .LC23: .string "Error: Could not open %s\n" .align 3 .LC24: .string "a" .align 3 .LC25: .string "temp.txt" .align 3 .LC26: .string "Error: Could not open temp.txt\n" .align 3 .LC27: .string "%s\n" .align 3 .LC28: .string "Ordering done!" .text .align 1 .globl main .type main, @function main: addi sp,sp,-1456 sd ra,1448(sp) sd s0,1440(sp) sd s1,1432(sp) sd s2,1424(sp) sd s3,1416(sp) sd s4,1408(sp) sd s5,1400(sp) sd s6,1392(sp) sd s7,1384(sp) sd s8,1376(sp) sd s9,1368(sp) sd s10,1360(sp) sd s11,1352(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 1336(sp) li a4, 0 lla a1,.LC0 li a0,1 call __printf_chk@plt addi a1,sp,72 lla a0,.LC1 call __isoc99_scanf@plt li a2,0 li a1,1 li a0,2 call socket@plt li a5,-1 beq a0,a5,.L64 mv s4,a0 lla a1,.LC3 li a0,1 call __printf_chk@plt li a5,2 sh a5,80(sp) lw a5,72(sp) slliw a4,a5,8 slliw a5,a5,16 srliw a5,a5,16 srliw a5,a5,8 or a5,a4,a5 sh a5,82(sp) sw zero,84(sp) li a2,16 addi a1,sp,80 mv a0,s4 call bind@plt li a5,-1 beq a0,a5,.L65 lla a1,.LC5 li a0,1 call __printf_chk@plt li a1,1 mv a0,s4 call listen@plt li a5,-1 beq a0,a5,.L66 lla a0,.LC6 call puts@plt li a5,16 sw a5,76(sp) addi a2,sp,76 addi a1,sp,96 mv a0,s4 call accept@plt sd a0,8(sp) li a5,-1 beq a0,a5,.L67 lla a0,.LC7 call puts@plt li a3,0 li a2,50 addi a1,sp,112 ld a0,8(sp) call recv@plt sext.w a0,a0 li a5,-1 beq a0,a5,.L68 lla a0,.LC9 call puts@plt li a1,0 addi a0,sp,112 call access@plt li a5,-1 beq a0,a5,.L13 li a2,50 addi s0,sp,112 mv a1,s0 addi a0,sp,168 call __strcpy_chk@plt lla a5,.LC10 ld a4,0(a5) sd a4,112(sp) lw a5,8(a5) sw a5,120(sp) .L14: li a3,0 li a2,50 addi a1,sp,112 ld a0,8(sp) call send@plt sext.w a0,a0 li a5,-1 beq a0,a5,.L69 lla a1,.LC11 addi a0,sp,112 call strcmp@plt beq a0,zero,.L62 addi s8,sp,112 addi a5,sp,168 sd a5,56(sp) addi s3,sp,336 addi s9,sp,280 j .L16 .L64: lla a1,.LC2 li a0,1 call __printf_chk@plt li a0,0 call exit@plt .L65: lla a1,.LC4 li a0,1 call __printf_chk@plt li a0,0 call exit@plt .L66: mv a0,s4 call close@plt li a0,0 call exit@plt .L67: mv a0,s4 call close@plt li a0,0 call exit@plt .L68: lla a1,.LC8 li a0,1 call __printf_chk@plt mv a0,s4 call close@plt ld a0,8(sp) call close@plt li a0,0 call exit@plt .L13: lla a4,.LC11 ld a5,0(a4) ld a3,8(a4) sd a5,112(sp) addi a5,sp,112 sd a3,120(sp) lw a3,16(a4) sw a3,16(a5) lbu a4,20(a4) sb a4,132(sp) j .L14 .L69: lla a1,.LC12 li a0,1 call __printf_chk@plt mv a0,s4 call close@plt ld a0,8(sp) call close@plt li a0,0 call exit@plt .L62: mv a0,s4 call close@plt ld a0,8(sp) call close@plt li a0,0 call exit@plt .L75: lla a1,.LC8 li a0,1 call __printf_chk@plt mv a0,s4 call close@plt ld a0,8(sp) call close@plt li a0,0 call exit@plt .L19: li a5,4 bne s10,a5,.L16 .L52: ld a0,8(sp) call close@plt mv a0,s4 call close@plt li a0,0 .L54: la a5,__stack_chk_guard ld a4, 1336(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L70 ld ra,1448(sp) ld s0,1440(sp) ld s1,1432(sp) ld s2,1424(sp) ld s3,1416(sp) ld s4,1408(sp) ld s5,1400(sp) ld s6,1392(sp) ld s7,1384(sp) ld s8,1376(sp) ld s9,1368(sp) ld s10,1360(sp) ld s11,1352(sp) addi sp,sp,1456 jr ra .L20: lla a0,.LC13 call puts@plt lbu a1,113(sp) addi a4,sp,112 li a5,0 j .L24 .L25: add a3,s9,a5 lbu a2,1(a4) sb a2,0(a3) addi a5,a5,1 .L24: addi a4,a4,1 sext.w a3,a5 blt a3,a1,.L25 addi a5,a1,1280 addi a4,sp,64 add a1,a5,a4 sb zero,-1064(a1) lla a1,.LC14 ld a0,56(sp) call fopen@plt mv s0,a0 beq a0,zero,.L71 li s1,0 j .L26 .L71: lla a1,.LC15 li a0,1 call __printf_chk@plt mv a0,s4 call close@plt ld a0,8(sp) call close@plt li a0,0 call exit@plt .L73: addiw s1,s1,1 .L26: mv a2,s0 li a1,512 mv a0,s3 call fgets@plt beq a0,zero,.L72 mv a1,s9 mv a0,s3 call strstr@plt bne a0,zero,.L73 j .L26 .L72: mv a0,s0 call fclose@plt sb s1,112(sp) li a3,0 li a2,50 mv a1,s8 ld a0,8(sp) call send@plt sext.w a5,a0 li a4,-1 beq a5,a4,.L74 .L29: li a5,4 beq s10,a5,.L52 .L16: li a3,0 li a2,50 mv a1,s8 ld a0,8(sp) call recv@plt sext.w a0,a0 li a5,-1 beq a0,a5,.L75 lbu s10,112(sp) li a5,3 beq s10,a5,.L18 bgtu s10,a5,.L19 li a5,1 beq s10,a5,.L20 li a5,2 bne s10,a5,.L16 lbu a1,113(sp) addi s0,sp,112 mv a4,s0 li a5,0 addi a0,sp,224 j .L30 .L74: lla a1,.LC12 li a0,1 call __printf_chk@plt mv a0,s4 call close@plt ld a0,8(sp) call close@plt li a0,0 call exit@plt .L31: add a3,a0,a5 lbu a2,1(a4) sb a2,0(a3) addi a5,a5,1 .L30: addi a4,a4,1 sext.w a3,a5 bgt a1,a3,.L31 addi a5,a1,1280 addi a4,sp,64 add a1,a5,a4 sb zero,-1120(a1) li a3,0 li a2,50 mv a1,s8 ld a0,8(sp) call recv@plt sext.w a5,a0 li a4,-1 beq a5,a4,.L76 lbu a2,113(sp) li a5,0 j .L33 .L76: lla a1,.LC8 li a0,1 call __printf_chk@plt mv a0,s4 call close@plt ld a0,8(sp) call close@plt li a0,0 call exit@plt .L34: add a4,s9,a5 lbu a3,1(s0) sb a3,0(a4) addi a5,a5,1 .L33: addi s0,s0,1 sext.w a4,a5 bgt a2,a4,.L34 addi a5,a2,1280 addi a4,sp,64 add a2,a5,a4 sb zero,-1064(a2) mv a3,s9 addi a2,sp,224 lla a1,.LC16 li a0,1 call __printf_chk@plt lla a1,.LC14 ld a0,56(sp) call fopen@plt mv s0,a0 lla a1,.LC17 lla a0,.LC18 call fopen@plt mv s1,a0 beq s0,zero,.L35 beq a0,zero,.L35 addi s2,sp,224 j .L36 .L35: lla a0,.LC19 call puts@plt lla a0,.LC20 call puts@plt li a0,0 call exit@plt .L37: mv a2,s9 mv a1,s2 mv a0,s3 call replaceAll mv a1,s1 mv a0,s3 call fputs@plt .L36: mv a2,s0 li a1,1000 mv a0,s3 call fgets@plt bne a0,zero,.L37 mv a0,s0 call fclose@plt mv a0,s1 call fclose@plt ld s0,56(sp) mv a0,s0 call remove@plt mv a1,s0 lla a0,.LC18 call rename@plt lla a5,.LC21 ld a3,0(a5) ld a4,8(a5) sd a3,0(s8) sd a4,8(s8) lhu a5,16(a5) sh a5,16(s8) li a3,0 li a2,50 mv a1,s8 ld a0,8(sp) call send@plt sext.w a5,a0 li a4,-1 bne a5,a4,.L29 lla a1,.LC12 li a0,1 call __printf_chk@plt mv a0,s4 call close@plt ld a0,8(sp) call close@plt li a0,0 call exit@plt .L18: lla a0,.LC22 call puts@plt lla a1,.LC14 ld a0,56(sp) call fopen@plt sd a0,16(sp) beq a0,zero,.L77 lla a1,.LC24 lla a0,.LC25 call fopen@plt sd a0,24(sp) beq a0,zero,.L78 li s0,0 li s6,0 j .L40 .L77: addi a3,sp,168 lla a2,.LC23 li a1,1 la a5,stderr ld a0,0(a5) call __fprintf_chk@plt .L39: li a0,1 j .L54 .L78: la a5,stderr ld a3,0(a5) li a2,31 li a1,1 lla a0,.LC26 call fwrite@plt j .L39 .L41: addi s0,s0,1 slli s1,s0,3 mv a1,s1 mv a0,s6 call realloc@plt mv s6,a0 li a1,1 li a0,100 call calloc@plt add s1,s6,s1 sd a0,-8(s1) li a2,100 mv a1,s3 call __strcpy_chk@plt .L40: sext.w s11,s0 ld a2,16(sp) li a1,100 mv a0,s3 call fgets@plt beq a0,zero,.L79 li a1,10 mv a0,s3 call strchr@plt beq a0,zero,.L41 mv a0,s3 call strlen@plt addi a5,a0,1280 addi a4,sp,64 add a0,a5,a4 sb zero,-1009(a0) j .L41 .L79: sd s11,32(sp) mv s7,s11 addiw a5,s11,-1 sd a5,40(sp) addi a5,s6,8 sd a5,48(sp) j .L43 .L44: addi s0,s0,8 beq s0,s5,.L48 .L45: ld s2,0(s0) ld s1,8(s0) mv a1,s1 mv a0,s2 call strcmp@plt ble a0,zero,.L44 li a2,100 mv a1,s2 mv a0,s3 call __strcpy_chk@plt mv a1,s1 mv a0,s2 call strcpy@plt mv a1,s3 mv a0,s1 call strcpy@plt j .L44 .L48: addiw s7,s7,-1 .L43: ld a5,32(sp) subw a5,a5,s7 ld a4,40(sp) ble a4,a5,.L58 addiw a5,s7,-1 ble a5,zero,.L48 mv s0,s6 addiw s5,s7,-2 slli a5,s5,32 srli s5,a5,29 ld a5,48(sp) add s5,s5,a5 j .L45 .L49: slli a5,s0,3 add a5,s6,a5 ld a3,0(a5) lla a2,.LC27 li a1,1 ld a0,24(sp) call __fprintf_chk@plt addi s0,s0,1 .L46: sext.w a5,s0 bgt s11,a5,.L49 li s0,0 j .L50 .L58: li s0,0 j .L46 .L51: slli a5,s0,3 add a5,s6,a5 ld a0,0(a5) call free@plt addi s0,s0,1 .L50: sext.w a5,s0 bgt s11,a5,.L51 mv a0,s6 call free@plt ld s0,56(sp) mv a0,s0 call remove@plt mv a1,s0 lla a0,.LC25 call rename@plt ld a0,16(sp) call fclose@plt ld a0,24(sp) call fclose@plt lla a5,.LC28 ld a4,0(a5) sd a4,0(s8) lw a4,8(a5) sw a4,8(s8) lhu a4,12(a5) sh a4,12(s8) lbu a5,14(a5) sb a5,14(s8) li a3,0 li a2,50 mv a1,s8 ld a0,8(sp) call send@plt sext.w a5,a0 li a4,-1 bne a5,a4,.L29 lla a1,.LC12 li a0,1 call __printf_chk@plt mv a0,s4 call close@plt ld a0,8(sp) call close@plt li a0,0 call exit@plt .L70: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "q1_server.c" .option pic .text .align 1 .globl replaceAll .type replaceAll, @function replaceAll: addi sp,sp,-1072 sd s6,1008(sp) la s6,__stack_chk_guard sd s1,1048(sp) ld a5, 0(s6) sd a5, 1000(sp) li a5, 0 mv s1,a0 mv a0,a1 sd s2,1040(sp) sd s3,1032(sp) sd s4,1024(sp) sd s5,1016(sp) sd ra,1064(sp) sd s0,1056(sp) mv s3,a1 mv s5,a2 call strlen@plt sext.w s4,a0 mv s2,sp j .L2 .L3: li a2,1000 mv a1,s1 subw s0,a0,s1 mv a0,s2 call __strcpy_chk@plt add a5,s1,s0 sb zero,0(a5) mv a0,s1 call strlen@plt mv a1,s5 add a0,s1,a0 call stpcpy@plt add s0,s4,s0 add a1,s2,s0 call strcpy@plt .L2: mv a1,s3 mv a0,s1 call strstr@plt bne a0,zero,.L3 ld a4, 1000(sp) ld a5, 0(s6) xor a5, a4, a5 li a4, 0 bne a5,zero,.L7 ld ra,1064(sp) ld s0,1056(sp) ld s1,1048(sp) ld s2,1040(sp) ld s3,1032(sp) ld s4,1024(sp) ld s5,1016(sp) ld s6,1008(sp) addi sp,sp,1072 jr ra .L7: call __stack_chk_fail@plt .size replaceAll, .-replaceAll .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "INPUT port number: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "\nSocket creation error." .align 3 .LC3: .string "\nSocket created." .align 3 .LC4: .string "\nBinding error." .align 3 .LC5: .string "\nSocket binded." .align 3 .LC6: .string "\nSocket listening." .align 3 .LC7: .string "\nSocket accepting." .align 3 .LC8: .string "\nMessage Recieving Failed" .align 3 .LC9: .string "\nFile Name Recieved!" .align 3 .LC10: .string "File exists" .align 3 .LC11: .string "File does not exist!" .align 3 .LC12: .string "\nMessage Sending Failed" .align 3 .LC13: .string "\nSearching.." .align 3 .LC14: .string "r" .align 3 .LC15: .string "\nFile not found" .align 3 .LC16: .string "\nReplacing %s with %s..\n" .align 3 .LC17: .string "w" .align 3 .LC18: .string "replace.tmp" .align 3 .LC19: .string "\nUnable to open file." .align 3 .LC20: .string "Please check whether file exists and you have read/write privilege." .align 3 .LC21: .string "Replace finished!" .align 3 .LC22: .string "\nOrdering file.." .align 3 .LC23: .string "Error: Could not open %s\n" .align 3 .LC24: .string "a" .align 3 .LC25: .string "temp.txt" .align 3 .LC26: .string "Error: Could not open temp.txt\n" .align 3 .LC27: .string "%s\n" .align 3 .LC28: .string "Ordering done!" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-1472 sd s5,1416(sp) la s5,__stack_chk_guard ld a5, 0(s5) sd a5, 1352(sp) li a5, 0 lla a1,.LC0 li a0,1 sd ra,1464(sp) sd s0,1456(sp) sd s1,1448(sp) sd s2,1440(sp) sd s3,1432(sp) sd s4,1424(sp) sd s6,1408(sp) sd s7,1400(sp) sd s8,1392(sp) sd s9,1384(sp) sd s10,1376(sp) sd s11,1368(sp) call __printf_chk@plt addi a1,sp,88 lla a0,.LC1 call __isoc99_scanf@plt li a2,0 li a1,1 li a0,2 call socket@plt li s0,-1 beq a0,s0,.L75 mv s2,a0 lla a1,.LC3 li a0,1 call __printf_chk@plt lw a5,88(sp) li a2,16 addi a1,sp,96 slliw a4,a5,16 srliw a4,a4,16 srliw a4,a4,8 slliw a5,a5,8 or a5,a5,a4 mv a0,s2 li a4,2 sh a4,96(sp) sh a5,98(sp) sw zero,100(sp) call bind@plt beq a0,s0,.L76 lla a1,.LC5 li a0,1 call __printf_chk@plt li a1,1 mv a0,s2 call listen@plt beq a0,s0,.L70 lla a0,.LC6 call puts@plt li a5,16 addi a2,sp,92 addi a1,sp,112 mv a0,s2 sw a5,92(sp) call accept@plt mv s4,a0 beq a0,s0,.L70 lla a0,.LC7 call puts@plt addi s7,sp,128 li a3,0 li a2,50 mv a1,s7 mv a0,s4 call recv@plt sext.w a0,a0 beq a0,s0,.L74 lla a0,.LC9 call puts@plt li a1,0 mv a0,s7 call access@plt beq a0,s0,.L14 li a2,50 mv a1,s7 addi a0,sp,184 call __strcpy_chk@plt lla a5,.LC10 ld a4,0(a5) lw a5,8(a5) sd a4,128(sp) sw a5,8(s7) .L15: li a3,0 li a2,50 mv a1,s7 mv a0,s4 call send@plt sext.w a0,a0 li a5,-1 beq a0,a5,.L72 lla a1,.LC11 mv a0,s7 call strcmp@plt beq a0,zero,.L73 addi a5,sp,184 sd a5,64(sp) addi a5,sp,296 sd a5,8(sp) addi a5,sp,130 sd a5,72(sp) addi a5,sp,240 addi s0,sp,352 sd a5,24(sp) .L17: li a3,0 li a2,50 mv a1,s7 mv a0,s4 call recv@plt sext.w a0,a0 li s3,-1 beq a0,s3,.L74 lbu s1,128(sp) li a5,3 beq s1,a5,.L19 bgtu s1,a5,.L28 li a5,1 beq s1,a5,.L21 li a5,2 bne s1,a5,.L17 lbu s6,129(sp) ld a1,72(sp) ld a0,24(sp) mv a2,s6 call memcpy@plt addi a5,s6,1280 addi a4,sp,80 add s6,a5,a4 li a3,0 li a2,50 mv a1,s7 mv a0,s4 sb zero,-1120(s6) call recv@plt sext.w a5,a0 beq a5,s3,.L74 lbu s3,129(sp) ld s6,8(sp) ld a1,72(sp) mv a2,s3 mv a0,s6 call memcpy@plt addi a5,s3,1280 addi a4,sp,80 ld a2,24(sp) add s3,a5,a4 mv a3,s6 lla a1,.LC16 sb zero,-1064(s3) li a0,1 call __printf_chk@plt ld a0,64(sp) lla a1,.LC14 call fopen@plt mv s3,a0 lla a1,.LC17 lla a0,.LC18 call fopen@plt mv s6,a0 beq s3,zero,.L30 bne a0,zero,.L31 j .L30 .L32: ld a1,24(sp) ld a2,8(sp) mv a0,s0 call replaceAll mv a1,s6 mv a0,s0 call fputs@plt .L31: mv a2,s3 li a1,1000 mv a0,s0 call fgets@plt bne a0,zero,.L32 mv a0,s3 call fclose@plt mv a0,s6 call fclose@plt ld s3,64(sp) mv a0,s3 call remove@plt mv a1,s3 lla a0,.LC18 call rename@plt lla a5,.LC21 ld a4,8(a5) ld a6,0(a5) lhu a5,16(a5) li a3,0 li a2,50 mv a1,s7 mv a0,s4 sd a4,8(s7) sh a5,16(s7) sd a6,0(s7) call send@plt sext.w a5,a0 li a4,-1 beq a5,a4,.L72 .L28: li a5,4 bne s1,a5,.L17 mv a0,s4 call close@plt mv a0,s2 call close@plt li a0,0 .L50: ld a4, 1352(sp) ld a5, 0(s5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L77 ld ra,1464(sp) ld s0,1456(sp) ld s1,1448(sp) ld s2,1440(sp) ld s3,1432(sp) ld s4,1424(sp) ld s5,1416(sp) ld s6,1408(sp) ld s7,1400(sp) ld s8,1392(sp) ld s9,1384(sp) ld s10,1376(sp) ld s11,1368(sp) addi sp,sp,1472 jr ra .L76: lla a1,.LC4 li a0,1 call __printf_chk@plt li a0,0 call exit@plt .L70: mv a0,s2 call close@plt li a0,0 call exit@plt .L75: lla a1,.LC2 li a0,1 call __printf_chk@plt li a0,0 call exit@plt .L74: lla a1,.LC8 .L71: li a0,1 call __printf_chk@plt .L73: mv a0,s2 call close@plt mv a0,s4 call close@plt li a0,0 call exit@plt .L21: lla a0,.LC13 call puts@plt lbu s3,129(sp) ld a1,72(sp) ld a0,8(sp) mv a2,s3 call memcpy@plt addi a5,s3,1280 addi a4,sp,80 ld a0,64(sp) add s3,a5,a4 sb zero,-1064(s3) lla a1,.LC14 call fopen@plt mv s3,a0 beq a0,zero,.L78 li s6,0 .L25: mv a2,s3 li a1,512 mv a0,s0 call fgets@plt beq a0,zero,.L79 ld a1,8(sp) mv a0,s0 call strstr@plt beq a0,zero,.L25 addiw s6,s6,1 j .L25 .L19: lla a0,.LC22 call puts@plt ld a0,64(sp) lla a1,.LC14 call fopen@plt sd a0,32(sp) beq a0,zero,.L80 lla a1,.LC24 lla a0,.LC25 call fopen@plt sd a0,40(sp) beq a0,zero,.L81 li s1,0 li s3,0 j .L35 .L37: li a1,10 mv a0,s0 call strchr@plt beq a0,zero,.L36 mv a0,s0 call strlen@plt addi a5,a0,1280 addi a4,sp,80 add a0,a5,a4 sb zero,-1009(a0) .L36: slli s6,s1,3 addi a1,s6,8 mv a0,s3 call realloc@plt mv s3,a0 li a1,1 li a0,100 call calloc@plt add s6,s3,s6 sd a0,0(s6) li a2,100 mv a1,s0 call __strcpy_chk@plt addi s1,s1,1 .L35: ld a2,32(sp) li a1,100 mv a0,s0 call fgets@plt sext.w s6,s1 bne a0,zero,.L37 addiw a5,s6,-1 sd a5,48(sp) addi a5,s3,8 mv s1,s6 sd a5,56(sp) .L38: ld a4,48(sp) subw a5,s6,s1 bge a5,a4,.L54 addiw a5,s1,-1 sd a5,16(sp) ble a5,zero,.L43 addiw s1,s1,-2 slli a5,s1,32 srli s1,a5,29 ld a5,56(sp) mv s10,s3 add s1,s1,a5 .L40: ld s9,0(s10) ld s11,8(s10) mv a0,s9 mv a1,s11 call strcmp@plt ble a0,zero,.L39 li a2,100 mv a1,s9 mv a0,s0 call __stpcpy_chk@plt mv s8,a0 mv a1,s11 mv a0,s9 call strcpy@plt sub a2,s8,s0 addi a2,a2,1 mv a1,s0 mv a0,s11 call memcpy@plt .L39: addi s10,s10,8 bne s1,s10,.L40 .L43: ld s1,16(sp) j .L38 .L54: li s1,0 j .L41 .L44: slli a5,s1,3 add a5,s3,a5 ld a3,0(a5) ld a0,40(sp) lla a2,.LC27 li a1,1 call __fprintf_chk@plt addi s1,s1,1 .L41: sext.w a5,s1 blt a5,s6,.L44 li s1,0 j .L45 .L46: slli a5,s1,3 add a5,s3,a5 ld a0,0(a5) addi s1,s1,1 call free@plt .L45: sext.w a5,s1 blt a5,s6,.L46 mv a0,s3 call free@plt ld s1,64(sp) mv a0,s1 call remove@plt mv a1,s1 lla a0,.LC25 call rename@plt ld a0,32(sp) call fclose@plt ld a0,40(sp) call fclose@plt lla a5,.LC28 lhu a4,12(a5) ld a7,0(a5) lw a6,8(a5) lbu a5,14(a5) li a3,0 li a2,50 mv a1,s7 mv a0,s4 sh a4,12(s7) sb a5,14(s7) sd a7,0(s7) sw a6,8(s7) call send@plt sext.w a5,a0 li a4,-1 bne a5,a4,.L17 .L72: lla a1,.LC12 j .L71 .L79: mv a0,s3 call fclose@plt li a3,0 li a2,50 mv a1,s7 mv a0,s4 sb s6,128(sp) call send@plt sext.w a5,a0 li a4,-1 bne a5,a4,.L28 lla a1,.LC12 j .L71 .L14: lla a5,.LC11 ld a2,0(a5) ld a3,8(a5) lw a4,16(a5) lbu a5,20(a5) sd a2,128(sp) sd a3,8(s7) sw a4,16(s7) sb a5,20(s7) j .L15 .L81: la a5,stderr ld a3,0(a5) li a2,31 li a1,1 lla a0,.LC26 call fwrite@plt li a0,1 j .L50 .L80: la a5,stderr ld a0,0(a5) ld a3,64(sp) lla a2,.LC23 li a1,1 call __fprintf_chk@plt li a0,1 j .L50 .L77: call __stack_chk_fail@plt .L30: lla a0,.LC19 call puts@plt lla a0,.LC20 call puts@plt li a0,0 call exit@plt .L78: lla a1,.LC15 j .L71 .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "q1_server.c" .option pic .text .align 1 .globl replaceAll .type replaceAll, @function replaceAll: addi sp,sp,-1072 sd s6,1008(sp) la s6,__stack_chk_guard sd s1,1048(sp) ld a5, 0(s6) sd a5, 1000(sp) li a5, 0 mv s1,a0 mv a0,a1 sd s2,1040(sp) sd s3,1032(sp) sd s4,1024(sp) sd s5,1016(sp) sd ra,1064(sp) sd s0,1056(sp) mv s3,a1 mv s5,a2 call strlen@plt sext.w s4,a0 mv s2,sp j .L2 .L3: li a2,1000 mv a1,s1 subw s0,a0,s1 mv a0,s2 call __strcpy_chk@plt add a5,s1,s0 sb zero,0(a5) mv a0,s1 call strlen@plt mv a1,s5 add a0,s1,a0 call stpcpy@plt add s0,s4,s0 add a1,s2,s0 call strcpy@plt .L2: mv a1,s3 mv a0,s1 call strstr@plt bne a0,zero,.L3 ld a4, 1000(sp) ld a5, 0(s6) xor a5, a4, a5 li a4, 0 bne a5,zero,.L7 ld ra,1064(sp) ld s0,1056(sp) ld s1,1048(sp) ld s2,1040(sp) ld s3,1032(sp) ld s4,1024(sp) ld s5,1016(sp) ld s6,1008(sp) addi sp,sp,1072 jr ra .L7: call __stack_chk_fail@plt .size replaceAll, .-replaceAll .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "INPUT port number: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "\nSocket creation error." .align 3 .LC3: .string "\nSocket created." .align 3 .LC4: .string "\nBinding error." .align 3 .LC5: .string "\nSocket binded." .align 3 .LC6: .string "\nSocket listening." .align 3 .LC7: .string "\nSocket accepting." .align 3 .LC8: .string "\nMessage Recieving Failed" .align 3 .LC9: .string "\nFile Name Recieved!" .align 3 .LC10: .string "File exists" .align 3 .LC11: .string "File does not exist!" .align 3 .LC12: .string "\nMessage Sending Failed" .align 3 .LC13: .string "\nSearching.." .align 3 .LC14: .string "r" .align 3 .LC15: .string "\nFile not found" .align 3 .LC16: .string "\nReplacing %s with %s..\n" .align 3 .LC17: .string "w" .align 3 .LC18: .string "replace.tmp" .align 3 .LC19: .string "\nUnable to open file." .align 3 .LC20: .string "Please check whether file exists and you have read/write privilege." .align 3 .LC21: .string "Replace finished!" .align 3 .LC22: .string "\nOrdering file.." .align 3 .LC23: .string "Error: Could not open %s\n" .align 3 .LC24: .string "a" .align 3 .LC25: .string "temp.txt" .align 3 .LC26: .string "Error: Could not open temp.txt\n" .align 3 .LC27: .string "%s\n" .align 3 .LC28: .string "Ordering done!" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-1472 sd s5,1416(sp) la s5,__stack_chk_guard ld a5, 0(s5) sd a5, 1352(sp) li a5, 0 lla a1,.LC0 li a0,1 sd ra,1464(sp) sd s0,1456(sp) sd s1,1448(sp) sd s2,1440(sp) sd s3,1432(sp) sd s4,1424(sp) sd s6,1408(sp) sd s7,1400(sp) sd s8,1392(sp) sd s9,1384(sp) sd s10,1376(sp) sd s11,1368(sp) call __printf_chk@plt addi a1,sp,88 lla a0,.LC1 call __isoc99_scanf@plt li a2,0 li a1,1 li a0,2 call socket@plt li s0,-1 beq a0,s0,.L75 mv s2,a0 lla a1,.LC3 li a0,1 call __printf_chk@plt lw a5,88(sp) li a2,16 addi a1,sp,96 slliw a4,a5,16 srliw a4,a4,16 srliw a4,a4,8 slliw a5,a5,8 or a5,a5,a4 mv a0,s2 li a4,2 sh a4,96(sp) sh a5,98(sp) sw zero,100(sp) call bind@plt beq a0,s0,.L76 lla a1,.LC5 li a0,1 call __printf_chk@plt li a1,1 mv a0,s2 call listen@plt beq a0,s0,.L70 lla a0,.LC6 call puts@plt li a5,16 addi a2,sp,92 addi a1,sp,112 mv a0,s2 sw a5,92(sp) call accept@plt mv s4,a0 beq a0,s0,.L70 lla a0,.LC7 call puts@plt addi s7,sp,128 li a3,0 li a2,50 mv a1,s7 mv a0,s4 call recv@plt sext.w a0,a0 beq a0,s0,.L74 lla a0,.LC9 call puts@plt li a1,0 mv a0,s7 call access@plt beq a0,s0,.L14 li a2,50 mv a1,s7 addi a0,sp,184 call __strcpy_chk@plt lla a5,.LC10 ld a4,0(a5) lw a5,8(a5) sd a4,128(sp) sw a5,8(s7) .L15: li a3,0 li a2,50 mv a1,s7 mv a0,s4 call send@plt sext.w a0,a0 li a5,-1 beq a0,a5,.L72 lla a1,.LC11 mv a0,s7 call strcmp@plt beq a0,zero,.L73 addi a5,sp,184 sd a5,64(sp) addi a5,sp,296 sd a5,8(sp) addi a5,sp,130 sd a5,72(sp) addi a5,sp,240 addi s0,sp,352 sd a5,24(sp) .L17: li a3,0 li a2,50 mv a1,s7 mv a0,s4 call recv@plt sext.w a0,a0 li s3,-1 beq a0,s3,.L74 lbu s1,128(sp) li a5,3 beq s1,a5,.L19 bgtu s1,a5,.L28 li a5,1 beq s1,a5,.L21 li a5,2 bne s1,a5,.L17 lbu s6,129(sp) ld a1,72(sp) ld a0,24(sp) mv a2,s6 call memcpy@plt addi a5,s6,1280 addi a4,sp,80 add s6,a5,a4 li a3,0 li a2,50 mv a1,s7 mv a0,s4 sb zero,-1120(s6) call recv@plt sext.w a5,a0 beq a5,s3,.L74 lbu s3,129(sp) ld s6,8(sp) ld a1,72(sp) mv a2,s3 mv a0,s6 call memcpy@plt addi a5,s3,1280 addi a4,sp,80 ld a2,24(sp) add s3,a5,a4 mv a3,s6 lla a1,.LC16 sb zero,-1064(s3) li a0,1 call __printf_chk@plt ld a0,64(sp) lla a1,.LC14 call fopen@plt mv s3,a0 lla a1,.LC17 lla a0,.LC18 call fopen@plt mv s6,a0 beq s3,zero,.L30 bne a0,zero,.L31 j .L30 .L32: ld a1,24(sp) ld a2,8(sp) mv a0,s0 call replaceAll mv a1,s6 mv a0,s0 call fputs@plt .L31: mv a2,s3 li a1,1000 mv a0,s0 call fgets@plt bne a0,zero,.L32 mv a0,s3 call fclose@plt mv a0,s6 call fclose@plt ld s3,64(sp) mv a0,s3 call remove@plt mv a1,s3 lla a0,.LC18 call rename@plt lla a5,.LC21 ld a4,8(a5) ld a6,0(a5) lhu a5,16(a5) li a3,0 li a2,50 mv a1,s7 mv a0,s4 sd a4,8(s7) sh a5,16(s7) sd a6,0(s7) call send@plt sext.w a5,a0 li a4,-1 beq a5,a4,.L72 .L28: li a5,4 bne s1,a5,.L17 mv a0,s4 call close@plt mv a0,s2 call close@plt li a0,0 .L50: ld a4, 1352(sp) ld a5, 0(s5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L77 ld ra,1464(sp) ld s0,1456(sp) ld s1,1448(sp) ld s2,1440(sp) ld s3,1432(sp) ld s4,1424(sp) ld s5,1416(sp) ld s6,1408(sp) ld s7,1400(sp) ld s8,1392(sp) ld s9,1384(sp) ld s10,1376(sp) ld s11,1368(sp) addi sp,sp,1472 jr ra .L76: lla a1,.LC4 li a0,1 call __printf_chk@plt li a0,0 call exit@plt .L70: mv a0,s2 call close@plt li a0,0 call exit@plt .L75: lla a1,.LC2 li a0,1 call __printf_chk@plt li a0,0 call exit@plt .L74: lla a1,.LC8 .L71: li a0,1 call __printf_chk@plt .L73: mv a0,s2 call close@plt mv a0,s4 call close@plt li a0,0 call exit@plt .L21: lla a0,.LC13 call puts@plt lbu s3,129(sp) ld a1,72(sp) ld a0,8(sp) mv a2,s3 call memcpy@plt addi a5,s3,1280 addi a4,sp,80 ld a0,64(sp) add s3,a5,a4 sb zero,-1064(s3) lla a1,.LC14 call fopen@plt mv s3,a0 beq a0,zero,.L78 li s6,0 .L25: mv a2,s3 li a1,512 mv a0,s0 call fgets@plt beq a0,zero,.L79 ld a1,8(sp) mv a0,s0 call strstr@plt beq a0,zero,.L25 addiw s6,s6,1 j .L25 .L19: lla a0,.LC22 call puts@plt ld a0,64(sp) lla a1,.LC14 call fopen@plt sd a0,32(sp) beq a0,zero,.L80 lla a1,.LC24 lla a0,.LC25 call fopen@plt sd a0,40(sp) beq a0,zero,.L81 li s1,0 li s3,0 j .L35 .L37: li a1,10 mv a0,s0 call strchr@plt beq a0,zero,.L36 mv a0,s0 call strlen@plt addi a5,a0,1280 addi a4,sp,80 add a0,a5,a4 sb zero,-1009(a0) .L36: slli s6,s1,3 addi a1,s6,8 mv a0,s3 call realloc@plt mv s3,a0 li a1,1 li a0,100 call calloc@plt add s6,s3,s6 sd a0,0(s6) li a2,100 mv a1,s0 call __strcpy_chk@plt addi s1,s1,1 .L35: ld a2,32(sp) li a1,100 mv a0,s0 call fgets@plt sext.w s6,s1 bne a0,zero,.L37 addiw a5,s6,-1 sd a5,48(sp) addi a5,s3,8 mv s1,s6 sd a5,56(sp) .L38: ld a4,48(sp) subw a5,s6,s1 ble a4,a5,.L54 addiw a5,s1,-1 sd a5,16(sp) ble a5,zero,.L43 addiw s1,s1,-2 slli a5,s1,32 srli s1,a5,29 ld a5,56(sp) mv s10,s3 add s1,s1,a5 .L40: ld s9,0(s10) ld s11,8(s10) mv a0,s9 mv a1,s11 call strcmp@plt ble a0,zero,.L39 li a2,100 mv a1,s9 mv a0,s0 call __stpcpy_chk@plt mv s8,a0 mv a1,s11 mv a0,s9 call strcpy@plt sub a2,s8,s0 addi a2,a2,1 mv a1,s0 mv a0,s11 call memcpy@plt .L39: addi s10,s10,8 bne s10,s1,.L40 .L43: ld s1,16(sp) j .L38 .L54: li s1,0 j .L41 .L44: slli a5,s1,3 add a5,s3,a5 ld a3,0(a5) ld a0,40(sp) lla a2,.LC27 li a1,1 call __fprintf_chk@plt addi s1,s1,1 .L41: sext.w a5,s1 bgt s6,a5,.L44 li s1,0 j .L45 .L46: slli a5,s1,3 add a5,s3,a5 ld a0,0(a5) addi s1,s1,1 call free@plt .L45: sext.w a5,s1 bgt s6,a5,.L46 mv a0,s3 call free@plt ld s1,64(sp) mv a0,s1 call remove@plt mv a1,s1 lla a0,.LC25 call rename@plt ld a0,32(sp) call fclose@plt ld a0,40(sp) call fclose@plt lla a5,.LC28 lhu a4,12(a5) ld a7,0(a5) lw a6,8(a5) lbu a5,14(a5) li a3,0 li a2,50 mv a1,s7 mv a0,s4 sh a4,12(s7) sb a5,14(s7) sd a7,0(s7) sw a6,8(s7) call send@plt sext.w a5,a0 li a4,-1 bne a5,a4,.L17 .L72: lla a1,.LC12 j .L71 .L79: mv a0,s3 call fclose@plt li a3,0 li a2,50 mv a1,s7 mv a0,s4 sb s6,128(sp) call send@plt sext.w a5,a0 li a4,-1 bne a5,a4,.L28 lla a1,.LC12 j .L71 .L14: lla a5,.LC11 ld a2,0(a5) ld a3,8(a5) lw a4,16(a5) lbu a5,20(a5) sd a2,128(sp) sd a3,8(s7) sw a4,16(s7) sb a5,20(s7) j .L15 .L81: la a5,stderr ld a3,0(a5) li a2,31 li a1,1 lla a0,.LC26 call fwrite@plt li a0,1 j .L50 .L80: la a5,stderr ld a0,0(a5) ld a3,64(sp) lla a2,.LC23 li a1,1 call __fprintf_chk@plt li a0,1 j .L50 .L77: call __stack_chk_fail@plt .L30: lla a0,.LC19 call puts@plt lla a0,.LC20 call puts@plt li a0,0 call exit@plt .L78: lla a1,.LC15 j .L71 .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "q1_server.c" .text .align 2 .global replaceAll .type replaceAll, %function replaceAll: .LFB6: .cfi_startproc sub sp, sp, #1072 .cfi_def_cfa_offset 1072 stp x29, x30, [sp] .cfi_offset 29, -1072 .cfi_offset 30, -1064 mov x29, sp str x0, [sp, 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, 1064] mov x1, 0 str wzr, [sp, 48] ldr x0, [sp, 32] bl strlen str w0, [sp, 52] b .L2 .L3: add x0, sp, 64 ldr x1, [sp, 40] bl strcpy ldr x1, [sp, 56] ldr x0, [sp, 40] sub x0, x1, x0 str w0, [sp, 48] ldrsw x0, [sp, 48] ldr x1, [sp, 40] add x0, x1, x0 strb wzr, [x0] ldr x1, [sp, 24] ldr x0, [sp, 40] bl strcat ldrsw x1, [sp, 48] ldrsw x0, [sp, 52] add x0, x1, x0 add x1, sp, 64 add x0, x1, x0 mov x1, x0 ldr x0, [sp, 40] bl strcat .L2: ldr x1, [sp, 32] ldr x0, [sp, 40] bl strstr str x0, [sp, 56] ldr x0, [sp, 56] cmp x0, 0 bne .L3 nop adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1064] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 beq .L4 bl __stack_chk_fail .L4: ldp x29, x30, [sp] add sp, sp, 1072 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size replaceAll, .-replaceAll .section .rodata .align 3 .LC0: .string "INPUT port number: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "\nSocket creation error." .align 3 .LC3: .string "\nSocket created." .align 3 .LC4: .string "\nBinding error." .align 3 .LC5: .string "\nSocket binded." .align 3 .LC6: .string "\nSocket listening." .align 3 .LC7: .string "\nSocket accepting." .align 3 .LC8: .string "\nMessage Recieving Failed" .align 3 .LC9: .string "\nFile Name Recieved!" .align 3 .LC10: .string "File exists" .align 3 .LC11: .string "File does not exist!" .align 3 .LC12: .string "\nMessage Sending Failed" .align 3 .LC13: .string "\nSearching.." .align 3 .LC14: .string "r" .align 3 .LC15: .string "\nFile not found" .align 3 .LC16: .string "\nReplacing %s with %s..\n" .align 3 .LC17: .string "w" .align 3 .LC18: .string "replace.tmp" .align 3 .LC19: .string "\nUnable to open file." .align 3 .LC20: .string "Please check whether file exists and you have read/write privilege." .align 3 .LC21: .string "Replace finished!" .align 3 .LC22: .string "\nOrdering file.." .align 3 .LC23: .string "Error: Could not open %s\n" .align 3 .LC24: .string "a" .align 3 .LC25: .string "temp.txt" .align 3 .LC26: .string "Error: Could not open temp.txt\n" .align 3 .LC27: .string "%s\n" .align 3 .LC28: .string "Ordering done!" .text .align 2 .global main .type main, %function main: .LFB7: .cfi_startproc sub sp, sp, #1408 .cfi_def_cfa_offset 1408 stp x29, x30, [sp] .cfi_offset 29, -1408 .cfi_offset 30, -1400 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -1392 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1400] mov x1, 0 str wzr, [sp, 64] 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 mov w2, 0 mov w1, 1 mov w0, 2 bl socket str w0, [sp, 68] ldr w0, [sp, 68] cmn w0, #1 bne .L6 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf mov w0, 0 bl exit .L6: adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl printf mov w0, 2 strh w0, [sp, 144] ldr w0, [sp, 32] and w0, w0, 65535 bl htons and w0, w0, 65535 strh w0, [sp, 146] mov w0, 0 bl htonl str w0, [sp, 148] add x0, sp, 144 mov w2, 16 mov x1, x0 ldr w0, [sp, 68] bl bind str w0, [sp, 72] ldr w0, [sp, 72] cmn w0, #1 bne .L7 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf mov w0, 0 bl exit .L7: adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl printf mov w1, 1 ldr w0, [sp, 68] bl listen str w0, [sp, 72] ldr w0, [sp, 72] cmn w0, #1 bne .L8 ldr w0, [sp, 68] bl close mov w0, 0 bl exit .L8: adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts mov w0, 16 str w0, [sp, 36] add x1, sp, 36 add x0, sp, 160 mov x2, x1 mov x1, x0 ldr w0, [sp, 68] bl accept str w0, [sp, 76] ldr w0, [sp, 76] cmn w0, #1 bne .L9 ldr w0, [sp, 68] bl close mov w0, 0 bl exit .L9: adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts add x0, sp, 176 mov w3, 0 mov x2, 50 mov x1, x0 ldr w0, [sp, 76] bl recv str w0, [sp, 80] ldr w0, [sp, 80] cmn w0, #1 bne .L10 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl printf ldr w0, [sp, 68] bl close ldr w0, [sp, 76] bl close mov w0, 0 bl exit .L10: adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts add x0, sp, 176 mov w1, 0 bl access cmn w0, #1 beq .L11 add x1, sp, 176 add x0, sp, 232 bl strcpy add x2, sp, 176 adrp x0, .LC10 add x1, x0, :lo12:.LC10 mov x0, x2 ldr x2, [x1] str x2, [x0] ldr w1, [x1, 8] str w1, [x0, 8] b .L12 .L11: add x1, sp, 176 adrp x0, .LC11 add x0, x0, :lo12:.LC11 mov x2, x1 mov x3, x0 ldp x0, x1, [x3] stp x0, x1, [x2] add x1, x3, 13 add x0, x2, 13 ldr x1, [x1] str x1, [x0] .L12: add x0, sp, 176 mov w3, 0 mov x2, 50 mov x1, x0 ldr w0, [sp, 76] bl send str w0, [sp, 84] ldr w0, [sp, 84] cmn w0, #1 bne .L13 adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl printf ldr w0, [sp, 68] bl close ldr w0, [sp, 76] bl close mov w0, 0 bl exit .L13: add x2, sp, 176 adrp x0, .LC11 add x1, x0, :lo12:.LC11 mov x0, x2 bl strcmp cmp w0, 0 bne .L14 ldr w0, [sp, 68] bl close ldr w0, [sp, 76] bl close mov w0, 0 bl exit .L14: str wzr, [sp, 40] b .L15 .L58: add x0, sp, 176 mov w3, 0 mov x2, 50 mov x1, x0 ldr w0, [sp, 76] bl recv str w0, [sp, 80] ldr w0, [sp, 80] cmn w0, #1 bne .L16 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl printf ldr w0, [sp, 68] bl close ldr w0, [sp, 76] bl close mov w0, 0 bl exit .L16: ldrb w0, [sp, 176] str w0, [sp, 40] str xzr, [sp, 96] str wzr, [sp, 52] ldr w0, [sp, 40] cmp w0, 4 beq .L17 ldr w0, [sp, 40] cmp w0, 4 bgt .L15 ldr w0, [sp, 40] cmp w0, 3 beq .L19 ldr w0, [sp, 40] cmp w0, 3 bgt .L15 ldr w0, [sp, 40] cmp w0, 1 beq .L20 ldr w0, [sp, 40] cmp w0, 2 beq .L21 b .L15 .L20: adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts ldrb w0, [sp, 177] str w0, [sp, 92] str wzr, [sp, 44] b .L22 .L23: ldr w0, [sp, 44] add w0, w0, 2 sxtw x0, w0 add x1, sp, 176 ldrb w2, [x1, x0] ldrsw x0, [sp, 44] add x1, sp, 344 strb w2, [x1, x0] ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L22: ldr w1, [sp, 44] ldr w0, [sp, 92] cmp w1, w0 blt .L23 ldrsw x0, [sp, 92] add x1, sp, 344 strb wzr, [x1, x0] mov w0, 1 str w0, [sp, 56] str wzr, [sp, 60] add x2, sp, 232 adrp x0, .LC14 add x1, x0, :lo12:.LC14 mov x0, x2 bl fopen str x0, [sp, 136] ldr x0, [sp, 136] cmp x0, 0 bne .L25 adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl printf ldr w0, [sp, 68] bl close ldr w0, [sp, 76] bl close mov w0, 0 bl exit .L27: add x1, sp, 344 add x0, sp, 400 bl strstr cmp x0, 0 beq .L26 ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 60] .L26: ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 56] .L25: add x0, sp, 400 ldr x2, [sp, 136] mov w1, 512 bl fgets cmp x0, 0 bne .L27 ldr x0, [sp, 136] cmp x0, 0 beq .L28 ldr x0, [sp, 136] bl fclose .L28: ldr w0, [sp, 60] and w0, w0, 255 strb w0, [sp, 176] add x0, sp, 176 mov w3, 0 mov x2, 50 mov x1, x0 ldr w0, [sp, 76] bl send str w0, [sp, 84] ldr w0, [sp, 84] cmn w0, #1 bne .L60 adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl printf ldr w0, [sp, 68] bl close ldr w0, [sp, 76] bl close mov w0, 0 bl exit .L21: ldrb w0, [sp, 177] str w0, [sp, 88] mov w0, 2 str w0, [sp, 44] str wzr, [sp, 48] b .L31 .L32: ldrsw x0, [sp, 44] add x1, sp, 176 ldrb w2, [x1, x0] ldrsw x0, [sp, 48] add x1, sp, 288 strb w2, [x1, x0] ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L31: ldr w1, [sp, 48] ldr w0, [sp, 88] cmp w1, w0 blt .L32 ldrsw x0, [sp, 48] add x1, sp, 288 strb wzr, [x1, x0] add x0, sp, 176 mov w3, 0 mov x2, 50 mov x1, x0 ldr w0, [sp, 76] bl recv str w0, [sp, 80] ldr w0, [sp, 80] cmn w0, #1 bne .L33 adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl printf ldr w0, [sp, 68] bl close ldr w0, [sp, 76] bl close mov w0, 0 bl exit .L33: ldrb w0, [sp, 177] str w0, [sp, 92] mov w0, 2 str w0, [sp, 44] str wzr, [sp, 48] b .L34 .L35: ldrsw x0, [sp, 44] add x1, sp, 176 ldrb w2, [x1, x0] ldrsw x0, [sp, 48] add x1, sp, 344 strb w2, [x1, x0] ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L34: ldr w1, [sp, 48] ldr w0, [sp, 92] cmp w1, w0 blt .L35 ldrsw x0, [sp, 48] add x1, sp, 344 strb wzr, [x1, x0] add x1, sp, 344 add x0, sp, 288 mov x2, x1 mov x1, x0 adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl printf add x2, sp, 232 adrp x0, .LC14 add x1, x0, :lo12:.LC14 mov x0, x2 bl fopen str x0, [sp, 120] adrp x0, .LC17 add x1, x0, :lo12:.LC17 adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl fopen str x0, [sp, 128] ldr x0, [sp, 120] cmp x0, 0 beq .L36 ldr x0, [sp, 128] cmp x0, 0 bne .L38 .L36: adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl puts adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl puts mov w0, 0 bl exit .L39: add x2, sp, 344 add x1, sp, 288 add x0, sp, 400 bl replaceAll add x0, sp, 400 ldr x1, [sp, 128] bl fputs .L38: add x0, sp, 400 ldr x2, [sp, 120] mov w1, 1000 bl fgets cmp x0, 0 bne .L39 ldr x0, [sp, 120] bl fclose ldr x0, [sp, 128] bl fclose add x0, sp, 232 bl remove add x0, sp, 232 mov x1, x0 adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl rename add x1, sp, 176 adrp x0, .LC21 add x0, x0, :lo12:.LC21 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, 176 mov w3, 0 mov x2, 50 mov x1, x0 ldr w0, [sp, 76] bl send str w0, [sp, 84] ldr w0, [sp, 84] cmn w0, #1 bne .L61 adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl printf ldr w0, [sp, 68] bl close ldr w0, [sp, 76] bl close mov w0, 0 bl exit .L19: adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl puts str xzr, [sp, 104] str xzr, [sp, 112] add x2, sp, 232 adrp x0, .LC14 add x1, x0, :lo12:.LC14 mov x0, x2 bl fopen str x0, [sp, 104] ldr x0, [sp, 104] cmp x0, 0 bne .L41 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] add x0, sp, 232 mov x2, x0 adrp x0, .LC23 add x1, x0, :lo12:.LC23 mov x0, x3 bl fprintf mov w0, 1 b .L57 .L41: adrp x0, .LC24 add x1, x0, :lo12:.LC24 adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl fopen str x0, [sp, 112] ldr x0, [sp, 112] cmp x0, 0 bne .L44 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] mov x3, x0 mov x2, 31 mov x1, 1 adrp x0, .LC26 add x0, x0, :lo12:.LC26 bl fwrite mov w0, 1 b .L57 .L46: add x0, sp, 400 mov w1, 10 bl strchr cmp x0, 0 beq .L45 add x0, sp, 400 bl strlen sub x0, x0, #1 add x1, sp, 400 strb wzr, [x1, x0] .L45: ldr w0, [sp, 52] add w0, w0, 1 sxtw x0, w0 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 96] bl realloc str x0, [sp, 96] ldrsw x0, [sp, 52] lsl x0, x0, 3 ldr x1, [sp, 96] add x19, x1, x0 mov x1, 1 mov x0, 100 bl calloc str x0, [x19] ldrsw x0, [sp, 52] lsl x0, x0, 3 ldr x1, [sp, 96] add x0, x1, x0 ldr x0, [x0] add x1, sp, 400 bl strcpy ldr w0, [sp, 52] add w0, w0, 1 str w0, [sp, 52] .L44: add x0, sp, 400 ldr x2, [sp, 104] mov w1, 100 bl fgets cmp x0, 0 bne .L46 str wzr, [sp, 44] b .L47 .L51: str wzr, [sp, 48] b .L48 .L50: ldrsw x0, [sp, 48] lsl x0, x0, 3 ldr x1, [sp, 96] add x0, x1, x0 ldr x2, [x0] ldrsw x0, [sp, 48] add x0, x0, 1 lsl x0, x0, 3 ldr x1, [sp, 96] add x0, x1, x0 ldr x0, [x0] mov x1, x0 mov x0, x2 bl strcmp cmp w0, 0 ble .L49 ldrsw x0, [sp, 48] lsl x0, x0, 3 ldr x1, [sp, 96] add x0, x1, x0 ldr x1, [x0] add x0, sp, 400 bl strcpy ldrsw x0, [sp, 48] lsl x0, x0, 3 ldr x1, [sp, 96] add x0, x1, x0 ldr x2, [x0] ldrsw x0, [sp, 48] add x0, x0, 1 lsl x0, x0, 3 ldr x1, [sp, 96] add x0, x1, x0 ldr x0, [x0] mov x1, x0 mov x0, x2 bl strcpy ldrsw x0, [sp, 48] add x0, x0, 1 lsl x0, x0, 3 ldr x1, [sp, 96] add x0, x1, x0 ldr x0, [x0] add x1, sp, 400 bl strcpy .L49: ldr w0, [sp, 48] add w0, w0, 1 str w0, [sp, 48] .L48: ldr w1, [sp, 52] ldr w0, [sp, 44] sub w0, w1, w0 sub w0, w0, #1 ldr w1, [sp, 48] cmp w1, w0 blt .L50 ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L47: ldr w0, [sp, 52] sub w0, w0, #1 ldr w1, [sp, 44] cmp w1, w0 blt .L51 str wzr, [sp, 44] b .L52 .L53: ldrsw x0, [sp, 44] lsl x0, x0, 3 ldr x1, [sp, 96] add x0, x1, x0 ldr x0, [x0] mov x2, x0 adrp x0, .LC27 add x1, x0, :lo12:.LC27 ldr x0, [sp, 112] bl fprintf ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L52: ldr w1, [sp, 44] ldr w0, [sp, 52] cmp w1, w0 blt .L53 str wzr, [sp, 44] b .L54 .L55: ldrsw x0, [sp, 44] lsl x0, x0, 3 ldr x1, [sp, 96] add x0, x1, x0 ldr x0, [x0] bl free ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L54: ldr w1, [sp, 44] ldr w0, [sp, 52] cmp w1, w0 blt .L55 ldr x0, [sp, 96] bl free add x0, sp, 232 bl remove add x0, sp, 232 mov x1, x0 adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl rename ldr x0, [sp, 104] bl fclose ldr x0, [sp, 112] bl fclose add x2, sp, 176 adrp x0, .LC28 add x1, x0, :lo12:.LC28 mov x0, x2 ldr x2, [x1] str x2, [x0] ldr x1, [x1, 7] str x1, [x0, 7] add x0, sp, 176 mov w3, 0 mov x2, 50 mov x1, x0 ldr w0, [sp, 76] bl send str w0, [sp, 84] ldr w0, [sp, 84] cmn w0, #1 bne .L62 adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl printf ldr w0, [sp, 68] bl close ldr w0, [sp, 76] bl close mov w0, 0 bl exit .L17: mov w0, 4 str w0, [sp, 40] b .L15 .L60: nop b .L15 .L61: nop b .L15 .L62: nop .L15: ldr w0, [sp, 40] cmp w0, 4 bne .L58 ldr w0, [sp, 76] bl close ldr w0, [sp, 68] bl close mov w0, 0 .L57: mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 1400] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L59 bl __stack_chk_fail .L59: mov w0, w1 ldr x19, [sp, 16] ldp x29, x30, [sp] add sp, sp, 1408 .cfi_restore 29 .cfi_restore 30 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "q1_server.c" .text .align 2 .global replaceAll .type replaceAll, %function replaceAll: .LFB66: .cfi_startproc sub sp, sp, #1088 .cfi_def_cfa_offset 1088 stp x29, x30, [sp] .cfi_offset 29, -1088 .cfi_offset 30, -1080 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] str x25, [sp, 64] .cfi_offset 19, -1072 .cfi_offset 20, -1064 .cfi_offset 21, -1056 .cfi_offset 22, -1048 .cfi_offset 23, -1040 .cfi_offset 24, -1032 .cfi_offset 25, -1024 mov x20, x0 mov x22, x1 mov x24, x2 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1080] mov x1, 0 mov x0, x22 bl strlen add x21, sp, 80 mov x25, 1000 sxtw x23, w0 b .L2 .L3: mov x2, x25 mov x1, x20 mov x0, x21 bl __strcpy_chk sub x19, x19, x20 sxtw x19, w19 strb wzr, [x20, x19] mov x1, x24 mov x0, x20 bl strcat add x19, x23, x19 add x1, x21, x19 mov x0, x20 bl strcat .L2: mov x1, x22 mov x0, x20 bl strstr mov x19, x0 cbnz x0, .L3 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1080] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L6 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldr x25, [sp, 64] ldp x29, x30, [sp] add sp, sp, 1088 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 25 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L6: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE66: .size replaceAll, .-replaceAll .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "INPUT port number: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "\nSocket creation error." .align 3 .LC3: .string "\nSocket created." .align 3 .LC4: .string "\nBinding error." .align 3 .LC5: .string "\nSocket binded." .align 3 .LC6: .string "\nSocket listening." .align 3 .LC7: .string "\nSocket accepting." .align 3 .LC8: .string "\nMessage Recieving Failed" .align 3 .LC9: .string "\nFile Name Recieved!" .align 3 .LC10: .string "File exists" .align 3 .LC11: .string "File does not exist!" .align 3 .LC12: .string "\nMessage Sending Failed" .align 3 .LC13: .string "\nSearching.." .align 3 .LC14: .string "r" .align 3 .LC15: .string "\nFile not found" .align 3 .LC16: .string "\nReplacing %s with %s..\n" .align 3 .LC17: .string "w" .align 3 .LC18: .string "replace.tmp" .align 3 .LC19: .string "\nUnable to open file." .align 3 .LC20: .string "Please check whether file exists and you have read/write privilege." .align 3 .LC21: .string "Replace finished!" .align 3 .LC22: .string "\nOrdering file.." .align 3 .LC23: .string "Error: Could not open %s\n" .align 3 .LC24: .string "a" .align 3 .LC25: .string "temp.txt" .align 3 .LC26: .string "Error: Could not open temp.txt\n" .align 3 .LC27: .string "%s\n" .align 3 .LC28: .string "Ordering done!" .text .align 2 .global main .type main, %function main: .LFB67: .cfi_startproc sub sp, sp, #1440 .cfi_def_cfa_offset 1440 stp x29, x30, [sp] .cfi_offset 29, -1440 .cfi_offset 30, -1432 mov x29, sp 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] .cfi_offset 19, -1424 .cfi_offset 20, -1416 .cfi_offset 21, -1408 .cfi_offset 22, -1400 .cfi_offset 23, -1392 .cfi_offset 24, -1384 .cfi_offset 25, -1376 .cfi_offset 26, -1368 .cfi_offset 27, -1360 .cfi_offset 28, -1352 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1432] mov x1, 0 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk add x1, sp, 168 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf mov w2, 0 mov w1, 1 mov w0, 2 bl socket cmn w0, #1 beq .L64 mov w22, w0 adrp x1, .LC3 add x1, x1, :lo12:.LC3 mov w0, 1 bl __printf_chk mov w0, 2 strh w0, [sp, 176] ldr w0, [sp, 168] rev16 w0, w0 strh w0, [sp, 178] str wzr, [sp, 180] mov w2, 16 add x1, sp, 176 mov w0, w22 bl bind cmn w0, #1 beq .L65 adrp x1, .LC5 add x1, x1, :lo12:.LC5 mov w0, 1 bl __printf_chk mov w1, 1 mov w0, w22 bl listen cmn w0, #1 beq .L66 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts mov w0, 16 str w0, [sp, 172] add x2, sp, 172 add x1, sp, 192 mov w0, w22 bl accept str w0, [sp, 128] cmn w0, #1 beq .L67 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts mov w3, 0 mov x2, 50 add x1, sp, 208 ldr w0, [sp, 128] bl recv cmn w0, #1 beq .L68 adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts mov w1, 0 add x0, sp, 208 bl access cmn w0, #1 beq .L13 add x19, sp, 208 mov x2, 50 mov x1, x19 add x0, sp, 264 bl __strcpy_chk adrp x0, .LC10 add x0, x0, :lo12:.LC10 ldr x1, [x0] str x1, [sp, 208] ldr w0, [x0, 8] str w0, [sp, 216] .L14: mov w3, 0 mov x2, 50 add x1, sp, 208 ldr w0, [sp, 128] bl send cmn w0, #1 beq .L69 adrp x1, .LC11 add x1, x1, :lo12:.LC11 add x0, sp, 208 bl strcmp cbz w0, .L61 adrp x0, .LC22 add x0, x0, :lo12:.LC22 str x0, [sp, 152] adrp x0, .LC27 add x0, x0, :lo12:.LC27 str x0, [sp, 136] b .L16 .L64: adrp x1, .LC2 add x1, x1, :lo12:.LC2 mov w0, 1 bl __printf_chk mov w0, 0 bl exit .L65: adrp x1, .LC4 add x1, x1, :lo12:.LC4 mov w0, 1 bl __printf_chk mov w0, 0 bl exit .L66: mov w0, w22 bl close mov w0, 0 bl exit .L67: mov w0, w22 bl close mov w0, 0 bl exit .L68: adrp x1, .LC8 add x1, x1, :lo12:.LC8 mov w0, 1 bl __printf_chk mov w0, w22 bl close ldr w0, [sp, 128] bl close mov w0, 0 bl exit .L13: adrp x0, .LC11 add x0, x0, :lo12:.LC11 ldp x2, x3, [x0] stp x2, x3, [sp, 208] ldr x0, [x0, 13] str x0, [sp, 221] b .L14 .L69: adrp x1, .LC12 add x1, x1, :lo12:.LC12 mov w0, 1 bl __printf_chk mov w0, w22 bl close ldr w0, [sp, 128] bl close mov w0, 0 bl exit .L61: mov w0, w22 bl close ldr w0, [sp, 128] bl close mov w0, 0 bl exit .L73: adrp x1, .LC8 add x1, x1, :lo12:.LC8 mov w0, 1 bl __printf_chk mov w0, w22 bl close ldr w0, [sp, 128] bl close mov w0, 0 bl exit .L19: cmp w28, 4 bne .L16 .L51: ldr w0, [sp, 128] bl close mov w0, w22 bl close mov w0, 0 .L7: adrp x1, :got:__stack_chk_guard ldr x1, [x1, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 1432] ldr x2, [x1] subs x3, x3, x2 mov x2, 0 bne .L70 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] add sp, sp, 1440 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .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_offset 0 ret .L20: .cfi_restore_state adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts ldrb w2, [sp, 209] mov x0, 0 add x4, sp, 376 add x3, sp, 208 b .L24 .L25: add x1, x0, x3 ldrb w1, [x1, 2] strb w1, [x0, x4] add x0, x0, 1 .L24: cmp w2, w0 bgt .L25 add x0, sp, 376 strb wzr, [x0, w2, sxtw] adrp x1, .LC14 add x1, x1, :lo12:.LC14 add x0, sp, 264 bl fopen mov x21, x0 cbz x0, .L71 mov w19, 0 add x20, sp, 432 mov w23, 512 add x24, sp, 376 b .L26 .L71: adrp x1, .LC15 add x1, x1, :lo12:.LC15 mov w0, 1 bl __printf_chk mov w0, w22 bl close ldr w0, [sp, 128] bl close mov w0, 0 bl exit .L28: mov x1, x24 mov x0, x20 bl strstr cmp x0, 0 cinc w19, w19, ne .L26: mov x2, x21 mov w1, w23 mov x0, x20 bl fgets cbnz x0, .L28 mov x0, x21 bl fclose strb w19, [sp, 208] mov w3, 0 mov x2, 50 add x1, sp, 208 ldr w0, [sp, 128] bl send cmn w0, #1 beq .L72 .L29: cmp w28, 4 beq .L51 .L16: mov w3, 0 mov x2, 50 add x1, sp, 208 ldr w0, [sp, 128] bl recv cmn w0, #1 beq .L73 ldrb w28, [sp, 208] cmp w28, 3 beq .L18 bhi .L19 cmp w28, 1 beq .L20 cmp w28, 2 bne .L16 ldrb w2, [sp, 209] mov x0, 0 add x4, sp, 320 add x3, sp, 208 b .L30 .L72: adrp x1, .LC12 add x1, x1, :lo12:.LC12 mov w0, 1 bl __printf_chk mov w0, w22 bl close ldr w0, [sp, 128] bl close mov w0, 0 bl exit .L31: add x1, x0, x3 ldrb w1, [x1, 2] strb w1, [x0, x4] add x0, x0, 1 .L30: cmp w2, w0 bgt .L31 add x0, sp, 320 strb wzr, [x0, w2, sxtw] mov w3, 0 mov x2, 50 add x1, sp, 208 ldr w0, [sp, 128] bl recv cmn w0, #1 beq .L74 ldrb w2, [sp, 209] mov x0, 0 add x4, sp, 376 add x3, sp, 208 b .L33 .L74: adrp x1, .LC8 add x1, x1, :lo12:.LC8 mov w0, 1 bl __printf_chk mov w0, w22 bl close ldr w0, [sp, 128] bl close mov w0, 0 bl exit .L34: add x1, x0, x3 ldrb w1, [x1, 2] strb w1, [x0, x4] add x0, x0, 1 .L33: cmp w2, w0 bgt .L34 add x3, sp, 376 strb wzr, [x3, w2, sxtw] add x2, sp, 320 adrp x1, .LC16 add x1, x1, :lo12:.LC16 mov w0, 1 bl __printf_chk adrp x1, .LC14 add x1, x1, :lo12:.LC14 add x0, sp, 264 bl fopen mov x20, x0 adrp x1, .LC17 add x1, x1, :lo12:.LC17 adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl fopen mov x21, x0 cmp x20, 0 ccmp x0, 0, 4, ne beq .L62 add x19, sp, 432 mov w23, 1000 add x25, sp, 376 add x24, sp, 320 b .L35 .L62: adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl puts adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl puts mov w0, 0 bl exit .L36: mov x2, x25 mov x1, x24 mov x0, x19 bl replaceAll mov x1, x21 mov x0, x19 bl fputs .L35: mov x2, x20 mov w1, w23 mov x0, x19 bl fgets cbnz x0, .L36 mov x0, x20 bl fclose mov x0, x21 bl fclose add x19, sp, 264 mov x0, x19 bl remove mov x1, x19 adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl rename add x1, sp, 208 adrp x0, .LC21 add x0, x0, :lo12:.LC21 ldp x2, x3, [x0] stp x2, x3, [sp, 208] ldrh w0, [x0, 16] strh w0, [x1, 16] mov w3, 0 mov x2, 50 ldr w0, [sp, 128] bl send cmn w0, #1 bne .L29 adrp x1, .LC12 add x1, x1, :lo12:.LC12 mov w0, 1 bl __printf_chk mov w0, w22 bl close ldr w0, [sp, 128] bl close mov w0, 0 bl exit .L18: ldr x0, [sp, 152] bl puts adrp x1, .LC14 add x1, x1, :lo12:.LC14 add x0, sp, 264 bl fopen str x0, [sp, 104] cbz x0, .L75 adrp x1, .LC24 add x1, x1, :lo12:.LC24 adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl fopen str x0, [sp, 112] cbz x0, .L76 mov x23, 0 mov x25, 0 add x19, sp, 432 mov w20, 100 mov w24, 10 add x0, sp, 431 str x0, [sp, 120] mov x26, 1 b .L39 .L75: add x3, sp, 264 adrp x2, .LC23 add x2, x2, :lo12:.LC23 mov w1, 1 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x0, [x0] bl __fprintf_chk .L38: mov w0, 1 b .L7 .L76: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x3, [x0] mov x2, 31 mov x1, 1 adrp x0, .LC26 add x0, x0, :lo12:.LC26 bl fwrite b .L38 .L40: add x23, x23, 1 lsl x21, x23, 3 mov x1, x21 mov x0, x25 bl realloc mov x25, x0 mov x1, x26 mov x0, 100 bl calloc add x21, x25, x21 str x0, [x21, -8] mov x2, 100 mov x1, x19 bl __strcpy_chk .L39: mov w27, w23 ldr x2, [sp, 104] mov w1, w20 mov x0, x19 bl fgets cbz x0, .L77 mov w1, w24 mov x0, x19 bl strchr cbz x0, .L40 mov x0, x19 bl strlen ldr x1, [sp, 120] strb wzr, [x1, x0] b .L40 .L77: str w23, [sp, 120] sub w0, w23, #1 str w0, [sp, 132] add x0, x25, 8 str x0, [sp, 144] add x26, sp, 432 b .L42 .L43: add x19, x19, 8 cmp x19, x24 beq .L47 .L44: ldr x21, [x19] ldr x20, [x19, 8] mov x1, x20 mov x0, x21 bl strcmp cmp w0, 0 ble .L43 mov x2, 100 mov x1, x21 mov x0, x26 bl __strcpy_chk mov x1, x20 mov x0, x21 bl strcpy mov x1, x26 mov x0, x20 bl strcpy b .L43 .L47: sub w23, w23, #1 .L42: ldr w0, [sp, 120] sub w0, w0, w23 ldr w1, [sp, 132] cmp w1, w0 ble .L57 sub w0, w23, #1 cmp w0, 0 ble .L47 mov x19, x25 sub w24, w23, #2 ldr x0, [sp, 144] add x24, x0, x24, lsl 3 b .L44 .L48: ldr x3, [x25, x19, lsl 3] ldr x2, [sp, 136] mov w1, w20 ldr x0, [sp, 112] bl __fprintf_chk add x19, x19, 1 .L45: cmp w27, w19 bgt .L48 mov x19, 0 b .L49 .L57: mov x19, 0 mov w20, 1 b .L45 .L50: ldr x0, [x25, x19, lsl 3] bl free add x19, x19, 1 .L49: cmp w27, w19 bgt .L50 mov x0, x25 bl free add x19, sp, 264 mov x0, x19 bl remove mov x1, x19 adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl rename ldr x0, [sp, 104] bl fclose ldr x0, [sp, 112] bl fclose add x1, sp, 208 adrp x0, .LC28 add x0, x0, :lo12:.LC28 ldr x2, [x0] str x2, [sp, 208] ldr x0, [x0, 7] str x0, [x1, 7] mov w3, 0 mov x2, 50 ldr w0, [sp, 128] bl send cmn w0, #1 bne .L29 adrp x1, .LC12 add x1, x1, :lo12:.LC12 mov w0, 1 bl __printf_chk mov w0, w22 bl close ldr w0, [sp, 128] bl close mov w0, 0 bl exit .L70: bl __stack_chk_fail .cfi_endproc .LFE67: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "q1_server.c" .text .align 2 .p2align 4,,11 .global replaceAll .type replaceAll, %function replaceAll: .LFB66: .cfi_startproc sub sp, sp, #1072 .cfi_def_cfa_offset 1072 adrp x3, :got:__stack_chk_guard stp x29, x30, [sp] .cfi_offset 29, -1072 .cfi_offset 30, -1064 mov x29, sp ldr x3, [x3, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] .cfi_offset 19, -1056 .cfi_offset 20, -1048 mov x20, x0 stp x21, x22, [sp, 32] mov x0, x1 .cfi_offset 21, -1040 .cfi_offset 22, -1032 mov x22, x1 stp x23, x24, [sp, 48] .cfi_offset 23, -1024 .cfi_offset 24, -1016 add x21, sp, 64 mov x24, x2 ldr x1, [x3] str x1, [sp, 1064] mov x1, 0 bl strlen sxtw x23, w0 b .L2 .p2align 2,,3 .L3: sub x19, x19, x20 mov x1, x20 mov x2, 1000 mov x0, x21 sxtw x19, w19 bl __strcpy_chk mov x0, x20 strb wzr, [x20, x19] add x19, x23, x19 bl strlen add x0, x20, x0 mov x1, x24 bl stpcpy add x1, x21, x19 bl strcpy .L2: mov x1, x22 mov x0, x20 bl strstr mov x19, x0 cbnz x0, .L3 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1064] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L7 ldp x29, x30, [sp] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] add sp, sp, 1072 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L7: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE66: .size replaceAll, .-replaceAll .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "INPUT port number: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "\nSocket creation error." .align 3 .LC3: .string "\nSocket created." .align 3 .LC4: .string "\nBinding error." .align 3 .LC5: .string "\nSocket binded." .align 3 .LC6: .string "\nSocket listening." .align 3 .LC7: .string "\nSocket accepting." .align 3 .LC8: .string "\nMessage Recieving Failed" .align 3 .LC9: .string "\nFile Name Recieved!" .align 3 .LC10: .string "File exists" .align 3 .LC11: .string "File does not exist!" .align 3 .LC12: .string "\nMessage Sending Failed" .align 3 .LC13: .string "\nSearching.." .align 3 .LC14: .string "r" .align 3 .LC15: .string "\nFile not found" .align 3 .LC16: .string "\nReplacing %s with %s..\n" .align 3 .LC17: .string "w" .align 3 .LC18: .string "replace.tmp" .align 3 .LC19: .string "\nUnable to open file." .align 3 .LC20: .string "Please check whether file exists and you have read/write privilege." .align 3 .LC21: .string "Replace finished!" .align 3 .LC22: .string "\nOrdering file.." .align 3 .LC23: .string "Error: Could not open %s\n" .align 3 .LC24: .string "a" .align 3 .LC25: .string "temp.txt" .align 3 .LC26: .string "Error: Could not open temp.txt\n" .align 3 .LC27: .string "%s\n" .align 3 .LC28: .string "Ordering done!" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB67: .cfi_startproc sub sp, sp, #1440 .cfi_def_cfa_offset 1440 adrp x2, :got:__stack_chk_guard adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 stp x29, x30, [sp] .cfi_offset 29, -1440 .cfi_offset 30, -1432 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] 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] .cfi_offset 19, -1424 .cfi_offset 20, -1416 .cfi_offset 21, -1408 .cfi_offset 22, -1400 .cfi_offset 23, -1392 .cfi_offset 24, -1384 .cfi_offset 25, -1376 .cfi_offset 26, -1368 .cfi_offset 27, -1360 .cfi_offset 28, -1352 ldr x3, [x2] str x3, [sp, 1432] mov x3, 0 bl __printf_chk add x1, sp, 168 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf mov w2, 0 mov w1, 1 mov w0, 2 bl socket cmn w0, #1 beq .L73 mov w21, w0 adrp x1, .LC3 mov w0, 1 add x1, x1, :lo12:.LC3 bl __printf_chk str wzr, [sp, 180] ldr w3, [sp, 168] mov w4, 2 add x1, sp, 176 mov w0, w21 rev16 w3, w3 mov w2, 16 strh w4, [sp, 176] strh w3, [sp, 178] bl bind cmn w0, #1 beq .L74 adrp x1, .LC5 mov w0, 1 add x1, x1, :lo12:.LC5 bl __printf_chk mov w0, w21 mov w1, 1 bl listen cmn w0, #1 beq .L68 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts mov w3, 16 add x2, sp, 172 add x1, sp, 192 mov w0, w21 str w3, [sp, 172] bl accept mov w23, w0 cmn w0, #1 beq .L68 add x24, sp, 208 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 bl recv cmn w0, #1 beq .L72 adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts mov x0, x24 mov w1, 0 bl access cmn w0, #1 beq .L14 mov x1, x24 add x0, sp, 264 mov x2, 50 bl __strcpy_chk adrp x0, .LC10 add x0, x0, :lo12:.LC10 ldr x1, [x0] str x1, [sp, 208] ldr w0, [x0, 8] str w0, [x24, 8] .L15: mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 bl send cmn w0, #1 beq .L70 adrp x1, .LC11 mov x0, x24 add x1, x1, :lo12:.LC11 bl strcmp cbz w0, .L71 adrp x1, .LC22 adrp x0, .LC27 add x1, x1, :lo12:.LC22 add x0, x0, :lo12:.LC27 str x0, [sp, 128] str x1, [sp, 152] .L17: mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 bl recv cmn w0, #1 beq .L72 ldrb w20, [sp, 208] cmp w20, 3 beq .L19 bhi .L20 cmp w20, 1 beq .L21 cmp w20, 2 bne .L17 ldrb w2, [sp, 209] add x26, sp, 320 ldrb w19, [sp, 209] add x20, sp, 210 mov x1, x20 mov x0, x26 bl memcpy strb wzr, [x26, w19, sxtw] mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 bl recv cmn w0, #1 beq .L72 ldrb w2, [sp, 209] add x3, sp, 264 ldrb w22, [sp, 209] add x19, sp, 376 mov x1, x20 mov x0, x19 mov x20, x3 str x3, [sp, 144] bl memcpy adrp x27, .LC18 mov x3, x19 mov x2, x26 strb wzr, [x19, w22, sxtw] adrp x1, .LC16 mov w0, 1 add x1, x1, :lo12:.LC16 bl __printf_chk mov x0, x20 adrp x1, .LC14 add x1, x1, :lo12:.LC14 bl fopen adrp x1, .LC17 mov x22, x0 add x1, x1, :lo12:.LC17 add x0, x27, :lo12:.LC18 bl fopen mov x25, x0 cmp x22, 0 ccmp x0, 0, 4, ne beq .L66 add x20, sp, 432 b .L30 .L31: mov x2, x19 mov x1, x26 mov x0, x20 bl replaceAll mov x1, x25 mov x0, x20 bl fputs .L30: mov x2, x22 mov x0, x20 mov w1, 1000 bl fgets cbnz x0, .L31 mov x0, x22 bl fclose mov x0, x25 bl fclose ldr x19, [sp, 144] mov x0, x19 bl remove mov x1, x19 add x0, x27, :lo12:.LC18 bl rename adrp x4, .LC21 add x4, x4, :lo12:.LC21 mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 ldp x6, x7, [x4] stp x6, x7, [x24] ldrh w4, [x4, 16] strh w4, [x24, 16] bl send cmn w0, #1 bne .L17 .L70: adrp x1, .LC12 add x1, x1, :lo12:.LC12 b .L69 .L74: adrp x1, .LC4 add x1, x1, :lo12:.LC4 mov w0, 1 bl __printf_chk mov w0, 0 bl exit .L68: mov w0, w21 bl close mov w0, 0 bl exit .L73: adrp x1, .LC2 add x1, x1, :lo12:.LC2 mov w0, 1 bl __printf_chk mov w0, 0 bl exit .L20: cmp w20, 4 bne .L17 mov w0, w23 bl close mov w0, w21 bl close mov w0, 0 .L8: adrp x1, :got:__stack_chk_guard ldr x1, [x1, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 1432] ldr x2, [x1] subs x3, x3, x2 mov x2, 0 bne .L75 ldp x29, x30, [sp] 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] add sp, sp, 1440 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .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_offset 0 ret .L72: .cfi_restore_state adrp x1, .LC8 add x1, x1, :lo12:.LC8 .L69: mov w0, 1 bl __printf_chk .L71: mov w0, w21 bl close mov w0, w23 bl close mov w0, 0 bl exit .L21: adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts ldrb w22, [sp, 209] ldrb w2, [sp, 209] add x19, sp, 376 add x1, sp, 210 mov x0, x19 bl memcpy strb wzr, [x19, w22, sxtw] add x0, sp, 264 adrp x1, .LC14 add x1, x1, :lo12:.LC14 bl fopen mov x25, x0 cbz x0, .L76 add x20, sp, 432 mov w22, 0 b .L25 .L27: mov x1, x19 mov x0, x20 bl strstr cmp x0, 0 cinc w22, w22, ne .L25: mov x2, x25 mov x0, x20 mov w1, 512 bl fgets cbnz x0, .L27 mov x0, x25 bl fclose mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 strb w22, [sp, 208] bl send cmn w0, #1 bne .L17 b .L70 .L19: ldr x0, [sp, 152] add x1, sp, 264 mov x19, x1 str x1, [sp, 144] bl puts mov x0, x19 adrp x1, .LC14 add x1, x1, :lo12:.LC14 bl fopen str x0, [sp, 104] cbz x0, .L77 adrp x1, .LC24 adrp x0, .LC25 add x1, x1, :lo12:.LC24 add x0, x0, :lo12:.LC25 bl fopen str x0, [sp, 112] cbz x0, .L78 add x20, sp, 432 add x26, sp, 431 mov x19, 0 mov x22, 0 b .L34 .L36: mov x0, x20 mov w1, 10 bl strchr cbz x0, .L35 mov x0, x20 bl strlen strb wzr, [x26, x0] .L35: lsl x25, x19, 3 mov x0, x22 add x1, x25, 8 bl realloc mov x22, x0 mov x1, 1 mov x0, 100 bl calloc add x19, x19, 1 mov x1, x20 str x0, [x22, x25] mov x2, 100 bl __strcpy_chk .L34: ldr x2, [sp, 104] mov x0, x20 mov w1, 100 str w19, [sp, 100] bl fgets str w19, [sp, 96] cbnz x0, .L36 ldr w0, [sp, 100] sub w0, w0, #1 str w0, [sp, 124] add x0, x22, 8 str x0, [sp, 136] .L37: ldr w0, [sp, 100] ldr w1, [sp, 124] sub w0, w0, w19 cmp w0, w1 bge .L53 sub w0, w19, #1 str w0, [sp, 120] cmp w0, 0 ble .L42 ldr x0, [sp, 136] sub w19, w19, #2 mov x28, x22 add x19, x0, w19, uxtw 3 .p2align 3,,7 .L39: ldp x25, x27, [x28] mov x0, x25 mov x1, x27 bl strcmp cmp w0, 0 ble .L38 mov x2, 100 mov x1, x25 mov x0, x20 bl __stpcpy_chk mov x1, x27 mov x26, x0 mov x0, x25 bl strcpy sub x2, x26, x20 mov x0, x27 add x2, x2, 1 mov x1, x20 bl memcpy .L38: add x28, x28, 8 cmp x19, x28 bne .L39 .L42: ldr w19, [sp, 120] b .L37 .L53: mov x19, 0 b .L40 .L43: ldr x3, [x22, x19, lsl 3] mov w1, 1 ldr x0, [sp, 112] add x19, x19, 1 ldr x2, [sp, 128] bl __fprintf_chk .L40: ldr w0, [sp, 96] cmp w0, w19 bgt .L43 mov x19, 0 b .L44 .L45: ldr x0, [x22, x19, lsl 3] add x19, x19, 1 bl free .L44: ldr w0, [sp, 96] cmp w0, w19 bgt .L45 mov x0, x22 bl free ldr x19, [sp, 144] mov x0, x19 bl remove mov x1, x19 adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl rename ldr x0, [sp, 104] bl fclose ldr x0, [sp, 112] bl fclose adrp x4, .LC28 add x4, x4, :lo12:.LC28 mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 ldr x5, [x4] str x5, [x24] ldr x4, [x4, 7] str x4, [x24, 7] bl send cmn w0, #1 bne .L17 b .L70 .L14: adrp x0, .LC11 add x0, x0, :lo12:.LC11 ldp x2, x3, [x0] stp x2, x3, [sp, 208] ldr x0, [x0, 13] str x0, [sp, 221] b .L15 .L78: adrp x3, :got:stderr adrp x0, .LC26 mov x2, 31 add x0, x0, :lo12:.LC26 ldr x3, [x3, #:got_lo12:stderr] mov x1, 1 ldr x3, [x3] bl fwrite mov w0, 1 b .L8 .L77: adrp x0, :got:stderr adrp x2, .LC23 ldr x3, [sp, 144] add x2, x2, :lo12:.LC23 ldr x0, [x0, #:got_lo12:stderr] mov w1, 1 ldr x0, [x0] bl __fprintf_chk mov w0, 1 b .L8 .L75: bl __stack_chk_fail .L66: adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl puts adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl puts mov w0, 0 bl exit .L76: adrp x1, .LC15 add x1, x1, :lo12:.LC15 b .L69 .cfi_endproc .LFE67: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "q1_server.c" .text .align 2 .p2align 4,,11 .global replaceAll .type replaceAll, %function replaceAll: .LFB66: .cfi_startproc sub sp, sp, #1072 .cfi_def_cfa_offset 1072 adrp x3, :got:__stack_chk_guard stp x29, x30, [sp] .cfi_offset 29, -1072 .cfi_offset 30, -1064 mov x29, sp ldr x3, [x3, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] .cfi_offset 19, -1056 .cfi_offset 20, -1048 mov x20, x0 stp x21, x22, [sp, 32] mov x0, x1 .cfi_offset 21, -1040 .cfi_offset 22, -1032 mov x22, x1 stp x23, x24, [sp, 48] .cfi_offset 23, -1024 .cfi_offset 24, -1016 add x21, sp, 64 mov x24, x2 ldr x1, [x3] str x1, [sp, 1064] mov x1, 0 bl strlen sxtw x23, w0 b .L2 .p2align 2,,3 .L3: sub x19, x19, x20 mov x1, x20 mov x2, 1000 mov x0, x21 sxtw x19, w19 bl __strcpy_chk mov x0, x20 strb wzr, [x20, x19] add x19, x23, x19 bl strlen add x0, x20, x0 mov x1, x24 bl stpcpy add x1, x21, x19 bl strcpy .L2: mov x1, x22 mov x0, x20 bl strstr mov x19, x0 cbnz x0, .L3 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1064] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L7 ldp x29, x30, [sp] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] add sp, sp, 1072 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L7: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE66: .size replaceAll, .-replaceAll .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "INPUT port number: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "\nSocket creation error." .align 3 .LC3: .string "\nSocket created." .align 3 .LC4: .string "\nBinding error." .align 3 .LC5: .string "\nSocket binded." .align 3 .LC6: .string "\nSocket listening." .align 3 .LC7: .string "\nSocket accepting." .align 3 .LC8: .string "\nMessage Recieving Failed" .align 3 .LC9: .string "\nFile Name Recieved!" .align 3 .LC10: .string "File exists" .align 3 .LC11: .string "File does not exist!" .align 3 .LC12: .string "\nMessage Sending Failed" .align 3 .LC13: .string "\nSearching.." .align 3 .LC14: .string "r" .align 3 .LC15: .string "\nFile not found" .align 3 .LC16: .string "\nReplacing %s with %s..\n" .align 3 .LC17: .string "w" .align 3 .LC18: .string "replace.tmp" .align 3 .LC19: .string "\nUnable to open file." .align 3 .LC20: .string "Please check whether file exists and you have read/write privilege." .align 3 .LC21: .string "Replace finished!" .align 3 .LC22: .string "\nOrdering file.." .align 3 .LC23: .string "Error: Could not open %s\n" .align 3 .LC24: .string "a" .align 3 .LC25: .string "temp.txt" .align 3 .LC26: .string "Error: Could not open temp.txt\n" .align 3 .LC27: .string "%s\n" .align 3 .LC28: .string "Ordering done!" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB67: .cfi_startproc sub sp, sp, #1440 .cfi_def_cfa_offset 1440 adrp x2, :got:__stack_chk_guard adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 stp x29, x30, [sp] .cfi_offset 29, -1440 .cfi_offset 30, -1432 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] 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] .cfi_offset 19, -1424 .cfi_offset 20, -1416 .cfi_offset 21, -1408 .cfi_offset 22, -1400 .cfi_offset 23, -1392 .cfi_offset 24, -1384 .cfi_offset 25, -1376 .cfi_offset 26, -1368 .cfi_offset 27, -1360 .cfi_offset 28, -1352 ldr x3, [x2] str x3, [sp, 1432] mov x3, 0 bl __printf_chk add x1, sp, 168 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf mov w2, 0 mov w1, 1 mov w0, 2 bl socket cmn w0, #1 beq .L73 mov w21, w0 adrp x1, .LC3 mov w0, 1 add x1, x1, :lo12:.LC3 bl __printf_chk str wzr, [sp, 180] ldr w3, [sp, 168] mov w4, 2 add x1, sp, 176 mov w0, w21 rev16 w3, w3 mov w2, 16 strh w4, [sp, 176] strh w3, [sp, 178] bl bind cmn w0, #1 beq .L74 adrp x1, .LC5 mov w0, 1 add x1, x1, :lo12:.LC5 bl __printf_chk mov w0, w21 mov w1, 1 bl listen cmn w0, #1 beq .L68 adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts mov w3, 16 add x2, sp, 172 add x1, sp, 192 mov w0, w21 str w3, [sp, 172] bl accept mov w23, w0 cmn w0, #1 beq .L68 add x24, sp, 208 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 bl recv cmn w0, #1 beq .L72 adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts mov x0, x24 mov w1, 0 bl access cmn w0, #1 beq .L14 mov x1, x24 add x0, sp, 264 mov x2, 50 bl __strcpy_chk adrp x0, .LC10 add x0, x0, :lo12:.LC10 ldr x1, [x0] str x1, [sp, 208] ldr w0, [x0, 8] str w0, [x24, 8] .L15: mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 bl send cmn w0, #1 beq .L70 adrp x1, .LC11 mov x0, x24 add x1, x1, :lo12:.LC11 bl strcmp cbz w0, .L71 adrp x1, .LC22 adrp x0, .LC27 add x1, x1, :lo12:.LC22 add x0, x0, :lo12:.LC27 str x0, [sp, 128] str x1, [sp, 152] .L17: mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 bl recv cmn w0, #1 beq .L72 ldrb w20, [sp, 208] cmp w20, 3 beq .L19 bhi .L20 cmp w20, 1 beq .L21 cmp w20, 2 bne .L17 ldrb w2, [sp, 209] add x26, sp, 320 ldrb w19, [sp, 209] add x20, sp, 210 mov x1, x20 mov x0, x26 bl memcpy strb wzr, [x26, w19, sxtw] mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 bl recv cmn w0, #1 beq .L72 ldrb w2, [sp, 209] add x3, sp, 264 ldrb w22, [sp, 209] add x19, sp, 376 mov x1, x20 mov x0, x19 mov x20, x3 str x3, [sp, 144] bl memcpy adrp x27, .LC18 mov x3, x19 mov x2, x26 strb wzr, [x19, w22, sxtw] adrp x1, .LC16 mov w0, 1 add x1, x1, :lo12:.LC16 bl __printf_chk mov x0, x20 adrp x1, .LC14 add x1, x1, :lo12:.LC14 bl fopen adrp x1, .LC17 mov x22, x0 add x1, x1, :lo12:.LC17 add x0, x27, :lo12:.LC18 bl fopen mov x25, x0 cmp x22, 0 ccmp x0, 0, 4, ne beq .L66 add x20, sp, 432 b .L30 .L31: mov x2, x19 mov x1, x26 mov x0, x20 bl replaceAll mov x1, x25 mov x0, x20 bl fputs .L30: mov x2, x22 mov x0, x20 mov w1, 1000 bl fgets cbnz x0, .L31 mov x0, x22 bl fclose mov x0, x25 bl fclose ldr x19, [sp, 144] mov x0, x19 bl remove mov x1, x19 add x0, x27, :lo12:.LC18 bl rename adrp x4, .LC21 add x4, x4, :lo12:.LC21 mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 ldp x6, x7, [x4] stp x6, x7, [x24] ldrh w4, [x4, 16] strh w4, [x24, 16] bl send cmn w0, #1 bne .L17 .L70: adrp x1, .LC12 add x1, x1, :lo12:.LC12 b .L69 .L74: adrp x1, .LC4 add x1, x1, :lo12:.LC4 mov w0, 1 bl __printf_chk mov w0, 0 bl exit .L68: mov w0, w21 bl close mov w0, 0 bl exit .L73: adrp x1, .LC2 add x1, x1, :lo12:.LC2 mov w0, 1 bl __printf_chk mov w0, 0 bl exit .L20: cmp w20, 4 bne .L17 mov w0, w23 bl close mov w0, w21 bl close mov w0, 0 .L8: adrp x1, :got:__stack_chk_guard ldr x1, [x1, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 1432] ldr x2, [x1] subs x3, x3, x2 mov x2, 0 bne .L75 ldp x29, x30, [sp] 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] add sp, sp, 1440 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .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_offset 0 ret .L72: .cfi_restore_state adrp x1, .LC8 add x1, x1, :lo12:.LC8 .L69: mov w0, 1 bl __printf_chk .L71: mov w0, w21 bl close mov w0, w23 bl close mov w0, 0 bl exit .L21: adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts ldrb w22, [sp, 209] ldrb w2, [sp, 209] add x19, sp, 376 add x1, sp, 210 mov x0, x19 bl memcpy strb wzr, [x19, w22, sxtw] add x0, sp, 264 adrp x1, .LC14 add x1, x1, :lo12:.LC14 bl fopen mov x25, x0 cbz x0, .L76 add x20, sp, 432 mov w22, 0 b .L25 .L27: mov x1, x19 mov x0, x20 bl strstr cmp x0, 0 cinc w22, w22, ne .L25: mov x2, x25 mov x0, x20 mov w1, 512 bl fgets cbnz x0, .L27 mov x0, x25 bl fclose mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 strb w22, [sp, 208] bl send cmn w0, #1 bne .L17 b .L70 .L19: ldr x0, [sp, 152] add x1, sp, 264 mov x19, x1 str x1, [sp, 144] bl puts mov x0, x19 adrp x1, .LC14 add x1, x1, :lo12:.LC14 bl fopen str x0, [sp, 104] cbz x0, .L77 adrp x1, .LC24 adrp x0, .LC25 add x1, x1, :lo12:.LC24 add x0, x0, :lo12:.LC25 bl fopen str x0, [sp, 112] cbz x0, .L78 add x20, sp, 432 add x26, sp, 431 mov x19, 0 mov x22, 0 b .L34 .L36: mov x0, x20 mov w1, 10 bl strchr cbz x0, .L35 mov x0, x20 bl strlen strb wzr, [x26, x0] .L35: lsl x25, x19, 3 mov x0, x22 add x1, x25, 8 bl realloc mov x22, x0 mov x1, 1 mov x0, 100 bl calloc add x19, x19, 1 mov x1, x20 str x0, [x22, x25] mov x2, 100 bl __strcpy_chk .L34: ldr x2, [sp, 104] mov x0, x20 mov w1, 100 str w19, [sp, 100] bl fgets str w19, [sp, 96] cbnz x0, .L36 ldr w0, [sp, 100] sub w0, w0, #1 str w0, [sp, 124] add x0, x22, 8 str x0, [sp, 136] .L37: ldr w0, [sp, 100] ldr w1, [sp, 124] sub w0, w0, w19 cmp w1, w0 ble .L53 sub w0, w19, #1 str w0, [sp, 120] cmp w0, 0 ble .L42 ldr x0, [sp, 136] sub w19, w19, #2 mov x28, x22 add x19, x0, w19, uxtw 3 .p2align 3,,7 .L39: ldp x25, x27, [x28] mov x0, x25 mov x1, x27 bl strcmp cmp w0, 0 ble .L38 mov x2, 100 mov x1, x25 mov x0, x20 bl __stpcpy_chk mov x1, x27 mov x26, x0 mov x0, x25 bl strcpy sub x2, x26, x20 mov x0, x27 add x2, x2, 1 mov x1, x20 bl memcpy .L38: add x28, x28, 8 cmp x19, x28 bne .L39 .L42: ldr w19, [sp, 120] b .L37 .L53: mov x19, 0 b .L40 .L43: ldr x3, [x22, x19, lsl 3] mov w1, 1 ldr x0, [sp, 112] add x19, x19, 1 ldr x2, [sp, 128] bl __fprintf_chk .L40: ldr w0, [sp, 96] cmp w0, w19 bgt .L43 mov x19, 0 b .L44 .L45: ldr x0, [x22, x19, lsl 3] add x19, x19, 1 bl free .L44: ldr w0, [sp, 96] cmp w0, w19 bgt .L45 mov x0, x22 bl free ldr x19, [sp, 144] mov x0, x19 bl remove mov x1, x19 adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl rename ldr x0, [sp, 104] bl fclose ldr x0, [sp, 112] bl fclose adrp x4, .LC28 add x4, x4, :lo12:.LC28 mov x1, x24 mov w0, w23 mov w3, 0 mov x2, 50 ldr x5, [x4] str x5, [x24] ldr x4, [x4, 7] str x4, [x24, 7] bl send cmn w0, #1 bne .L17 b .L70 .L14: adrp x0, .LC11 add x0, x0, :lo12:.LC11 ldp x2, x3, [x0] stp x2, x3, [sp, 208] ldr x0, [x0, 13] str x0, [sp, 221] b .L15 .L78: adrp x3, :got:stderr adrp x0, .LC26 mov x2, 31 add x0, x0, :lo12:.LC26 ldr x3, [x3, #:got_lo12:stderr] mov x1, 1 ldr x3, [x3] bl fwrite mov w0, 1 b .L8 .L77: adrp x0, :got:stderr adrp x2, .LC23 ldr x3, [sp, 144] add x2, x2, :lo12:.LC23 ldr x0, [x0, #:got_lo12:stderr] mov w1, 1 ldr x0, [x0] bl __fprintf_chk mov w0, 1 b .L8 .L75: bl __stack_chk_fail .L66: adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl puts adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl puts mov w0, 0 bl exit .L76: adrp x1, .LC15 add x1, x1, :lo12:.LC15 b .L69 .cfi_endproc .LFE67: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
entertainment3.c
#include<stdio.h> #include<stdlib.h> struct opponents { long long int skill,entertainment; }; struct opponents p2[100005]; typedef struct opponents opp; int bound_lower(long long int p,long long int pri) { int small,big; long long int ret=p; for(small=0,big=p-1;small<big;) { int m=(small+big)>>1; if(p2[m].skill>pri) { ret=m; big=m-1; } else small=m+1; } return ret-1; } int fnccompare(const void *x,const void *y); int bound_upper(long long int p,long long int pri); int main() { int t,m,j,i; long long int up,l; scanf("%d",&t); for(j=0;j<t;j++) { scanf("%lld %lld",&p2[i].skill,&p2[i].entertainment); } scanf("%d",&m); qsort(p2,t,sizeof(opp),fnccompare); long long int sort[100005]; int z; sort[0]=0; sort[1]=0; for(z=1;z<=t;z++) { sort[z]=sort[z-1]+p2[z-1].entertainment; } while(m) { scanf("%lld %lld",&up,&l); long long int buup,bll; bll=bound_lower(t,l); buup=bound_upper(t,up); long long int total=0; total=sort[bll+1]-sort[buup]; printf("%lld\n",total); m--; } return 0; } int bound_upper(long long int p,long long int pri) { int less,big; long long int ret=p; for(less=0,big=p-1;less<big;) { int m=(less+big)>>1; if(p2[m].skill>pri) { ret=m-1; big=m-1; } else if(p2[m].skill==pri) { ret=m-1; big=m-1; } else less=m+1; } return ret+1; } int fnccompare(const void *x,const void *y) { opp *oa = (opp*)x; opp *ob = (opp*)y; if((oa->skill)<(ob->skill)) return -1; else if((oa->skill)>(ob->skill)) return 1; return 0; }
.file "entertainment3.c" .option pic .text .globl p2 .bss .align 3 .type p2, @object .size p2, 1600080 p2: .zero 1600080 .text .align 1 .globl bound_lower .type bound_lower, @function bound_lower: addi sp,sp,-64 sd s0,56(sp) addi s0,sp,64 sd a0,-56(s0) sd a1,-64(s0) ld a5,-56(s0) sd a5,-24(s0) sw zero,-36(s0) ld a5,-56(s0) sext.w a5,a5 addiw a5,a5,-1 sext.w a5,a5 sw a5,-32(s0) j .L2 .L4: lw a5,-36(s0) mv a4,a5 lw a5,-32(s0) addw a5,a4,a5 sext.w a5,a5 sraiw a5,a5,1 sw a5,-28(s0) lla a4,p2 lw a5,-28(s0) slli a5,a5,4 add a5,a4,a5 ld a5,0(a5) ld a4,-64(s0) bge a4,a5,.L3 lw a5,-28(s0) sd a5,-24(s0) lw a5,-28(s0) addiw a5,a5,-1 sw a5,-32(s0) j .L2 .L3: lw a5,-28(s0) addiw a5,a5,1 sw a5,-36(s0) .L2: lw a5,-36(s0) mv a4,a5 lw a5,-32(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L4 ld a5,-24(s0) sext.w a5,a5 addiw a5,a5,-1 sext.w a5,a5 sext.w a5,a5 mv a0,a5 ld s0,56(sp) addi sp,sp,64 jr ra .size bound_lower, .-bound_lower .section .rodata .align 3 .LC0: .string "%d" .align 3 .LC1: .string "%lld %lld" .align 3 .LC2: .string "%lld\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-1408 sd ra,1400(sp) sd s0,1392(sp) addi s0,sp,1408 li t0,-798720 add sp,sp,t0 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 li a5,-798720 addi a5,a5,-1388 addi a5,a5,-16 add a5,a5,s0 mv a1,a5 lla a0,.LC0 call __isoc99_scanf@plt li a5,-798720 addi a5,a5,-16 add a5,a5,s0 sw zero,-1380(a5) j .L7 .L8: li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1372(a5) slli a4,a5,4 lla a5,p2 add a3,a4,a5 li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1372(a5) slli a4,a5,4 lla a5,p2 add a5,a4,a5 addi a5,a5,8 mv a2,a5 mv a1,a3 lla a0,.LC1 call __isoc99_scanf@plt li a5,-798720 addi a5,a5,-16 add a5,a5,s0 li a4,-798720 addi a4,a4,-16 add a4,a4,s0 lw a4,-1380(a4) addiw a4,a4,1 sw a4,-1380(a5) .L7: li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a4,-1388(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1380(a5) sext.w a5,a5 blt a5,a4,.L8 li a5,-798720 addi a5,a5,-1384 addi a5,a5,-16 add a5,a5,s0 mv a1,a5 lla a0,.LC0 call __isoc99_scanf@plt li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1388(a5) lla a3,fnccompare li a2,16 mv a1,a5 lla a0,p2 call qsort@plt li a5,-798720 addi a5,a5,-16 add a5,a5,s0 sd zero,-1328(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 sd zero,-1320(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 li a4,1 sw a4,-1376(a5) j .L9 .L10: li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1376(a5) addiw a5,a5,-1 sext.w a5,a5 li a4,-798720 addi a4,a4,-16 add a4,a4,s0 slli a5,a5,3 add a5,a4,a5 ld a4,-1328(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1376(a5) addiw a5,a5,-1 sext.w a5,a5 lla a3,p2 slli a5,a5,4 add a5,a3,a5 ld a5,8(a5) add a4,a4,a5 li a5,-798720 addi a5,a5,-16 add a3,a5,s0 li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1376(a5) slli a5,a5,3 add a5,a3,a5 sd a4,-1328(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 li a4,-798720 addi a4,a4,-16 add a4,a4,s0 lw a4,-1376(a4) addiw a4,a4,1 sw a4,-1376(a5) .L9: li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a4,-1388(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1376(a5) sext.w a5,a5 ble a5,a4,.L10 j .L11 .L12: li a5,-798720 addi a5,a5,-1360 addi a5,a5,-16 add a4,a5,s0 li a5,-798720 addi a5,a5,-1368 addi a5,a5,-16 add a5,a5,s0 mv a2,a4 mv a1,a5 lla a0,.LC1 call __isoc99_scanf@plt li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1388(a5) mv a4,a5 li a5,-798720 addi a5,a5,-16 add a5,a5,s0 ld a5,-1360(a5) mv a1,a5 mv a0,a4 call bound_lower mv a5,a0 mv a4,a5 li a5,-798720 addi a5,a5,-16 add a5,a5,s0 sd a4,-1352(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1388(a5) mv a4,a5 li a5,-798720 addi a5,a5,-16 add a5,a5,s0 ld a5,-1368(a5) mv a1,a5 mv a0,a4 call bound_upper mv a5,a0 mv a4,a5 li a5,-798720 addi a5,a5,-16 add a5,a5,s0 sd a4,-1344(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 sd zero,-1336(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 ld a5,-1352(a5) addi a5,a5,1 li a4,-798720 addi a4,a4,-16 add a4,a4,s0 slli a5,a5,3 add a5,a4,a5 ld a3,-1328(a5) li a5,-798720 addi a5,a5,-16 add a4,a5,s0 li a5,-798720 addi a5,a5,-16 add a5,a5,s0 ld a5,-1344(a5) slli a5,a5,3 add a5,a4,a5 ld a4,-1328(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 sub a4,a3,a4 sd a4,-1336(a5) li a5,-798720 addi a5,a5,-16 add a5,a5,s0 ld a1,-1336(a5) lla a0,.LC2 call printf@plt li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1384(a5) addiw a5,a5,-1 sext.w a4,a5 li a5,-798720 addi a5,a5,-16 add a5,a5,s0 sw a4,-1384(a5) .L11: li a5,-798720 addi a5,a5,-16 add a5,a5,s0 lw a5,-1384(a5) bne a5,zero,.L12 li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L14 call __stack_chk_fail@plt .L14: mv a0,a4 li t0,798720 add sp,sp,t0 ld ra,1400(sp) ld s0,1392(sp) addi sp,sp,1408 jr ra .size main, .-main .align 1 .globl bound_upper .type bound_upper, @function bound_upper: addi sp,sp,-64 sd s0,56(sp) addi s0,sp,64 sd a0,-56(s0) sd a1,-64(s0) ld a5,-56(s0) sd a5,-24(s0) sw zero,-36(s0) ld a5,-56(s0) sext.w a5,a5 addiw a5,a5,-1 sext.w a5,a5 sw a5,-32(s0) j .L16 .L19: lw a5,-36(s0) mv a4,a5 lw a5,-32(s0) addw a5,a4,a5 sext.w a5,a5 sraiw a5,a5,1 sw a5,-28(s0) lla a4,p2 lw a5,-28(s0) slli a5,a5,4 add a5,a4,a5 ld a5,0(a5) ld a4,-64(s0) bge a4,a5,.L17 lw a5,-28(s0) addiw a5,a5,-1 sext.w a5,a5 sd a5,-24(s0) lw a5,-28(s0) addiw a5,a5,-1 sw a5,-32(s0) j .L16 .L17: lla a4,p2 lw a5,-28(s0) slli a5,a5,4 add a5,a4,a5 ld a5,0(a5) ld a4,-64(s0) bne a4,a5,.L18 lw a5,-28(s0) addiw a5,a5,-1 sext.w a5,a5 sd a5,-24(s0) lw a5,-28(s0) addiw a5,a5,-1 sw a5,-32(s0) j .L16 .L18: lw a5,-28(s0) addiw a5,a5,1 sw a5,-36(s0) .L16: lw a5,-36(s0) mv a4,a5 lw a5,-32(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L19 ld a5,-24(s0) sext.w a5,a5 addiw a5,a5,1 sext.w a5,a5 sext.w a5,a5 mv a0,a5 ld s0,56(sp) addi sp,sp,64 jr ra .size bound_upper, .-bound_upper .align 1 .globl fnccompare .type fnccompare, @function fnccompare: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd a0,-40(s0) sd a1,-48(s0) ld a5,-40(s0) sd a5,-32(s0) ld a5,-48(s0) sd a5,-24(s0) ld a5,-32(s0) ld a4,0(a5) ld a5,-24(s0) ld a5,0(a5) bge a4,a5,.L22 li a5,-1 j .L23 .L22: ld a5,-32(s0) ld a4,0(a5) ld a5,-24(s0) ld a5,0(a5) ble a4,a5,.L24 li a5,1 j .L23 .L24: li a5,0 .L23: mv a0,a5 ld s0,40(sp) addi sp,sp,48 jr ra .size fnccompare, .-fnccompare .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "entertainment3.c" .option pic .text .align 1 .globl fnccompare .type fnccompare, @function fnccompare: ld a0,0(a0) ld a5,0(a1) blt a0,a5,.L3 sgt a0,a0,a5 ret .L3: li a0,-1 ret .size fnccompare, .-fnccompare .align 1 .globl bound_lower .type bound_lower, @function bound_lower: addiw a3,a0,-1 ble a3,zero,.L5 li a2,0 lla a7,p2 j .L8 .L6: addiw a2,a5,1 .L7: bge a2,a3,.L5 .L8: addw a5,a2,a3 sraiw a5,a5,1 sext.w a6,a5 slli a4,a6,4 add a4,a7,a4 ld a4,0(a4) ble a4,a1,.L6 mv a0,a6 addiw a3,a5,-1 j .L7 .L5: addiw a0,a0,-1 ret .size bound_lower, .-bound_lower .align 1 .globl bound_upper .type bound_upper, @function bound_upper: addiw a3,a0,-1 ble a3,zero,.L11 li a2,0 lla a6,p2 j .L15 .L12: beq a5,a1,.L17 addiw a2,a4,1 .L13: bge a2,a3,.L11 .L15: addw a4,a2,a3 sraiw a4,a4,1 sext.w a5,a4 slli a5,a5,4 add a5,a6,a5 ld a5,0(a5) ble a5,a1,.L12 addiw a3,a4,-1 mv a0,a3 j .L13 .L17: addiw a3,a4,-1 mv a0,a3 j .L13 .L11: addiw a0,a0,1 ret .size bound_upper, .-bound_upper .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "%lld %lld" .align 3 .LC2: .string "%lld\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-1424 sd ra,1416(sp) sd s0,1408(sp) sd s1,1400(sp) sd s2,1392(sp) sd s3,1384(sp) sd s4,1376(sp) sd s5,1368(sp) sd s6,1360(sp) li t0,-798720 add sp,sp,t0 la a5,__stack_chk_guard li a4,798720 addi a3,a4,1352 add a3,a3,sp ld a2, 0(a5) sd a2, 0(a3) li a2, 0 li s0,-798720 addi a1,s0,-1352 mv s1,a4 addi a5,a4,1360 add a5,a5,a1 add a1,a5,sp lla a0,.LC0 call __isoc99_scanf@plt addi a5,s1,1360 add a5,a5,s0 add s0,a5,sp lw a5,-1352(s0) ble a5,zero,.L19 mv a4,s1 lla s4,p2 lla s3,p2+8 li s0,0 lla s2,.LC1 li s1,-798720 addi a5,a4,1360 add a5,a5,s1 add s1,a5,sp .L20: mv a2,s3 mv a1,s4 mv a0,s2 call __isoc99_scanf@plt addiw s0,s0,1 lw a5,-1352(s1) bgt a5,s0,.L20 .L19: li s0,-798720 addi a1,s0,-1348 li s1,798720 addi a5,s1,1360 add a5,a5,a1 add a1,a5,sp lla a0,.LC0 call __isoc99_scanf@plt addi a5,s1,1360 add a5,a5,s0 add s0,a5,sp lla a3,fnccompare li a2,16 lw a1,-1352(s0) lla a0,p2 call qsort@plt sd zero,-1328(s0) sd zero,-1320(s0) lw a1,-1352(s0) ble a1,zero,.L21 li a5,-798720 addi a5,a5,-1328 addi a4,s1,1360 add a4,a4,a5 add a5,a4,sp lla a3,p2+8 addiw a1,a1,-1 slli a4,a1,32 srli a1,a4,29 addi a4,a5,8 add a1,a1,a4 .L22: ld a4,0(a5) ld a2,0(a3) add a4,a4,a2 sd a4,8(a5) addi a5,a5,8 addi a3,a3,16 bne a5,a1,.L22 .L21: li a5,-798720 li a4,798720 addi a3,a4,1360 add a3,a3,a5 add a5,a3,sp lw a5,-1348(a5) beq a5,zero,.L23 li s1,-798720 addi s3,s1,-1336 addi a5,a4,1360 add a5,a5,s3 add s3,a5,sp addi s2,s1,-1344 addi a5,a4,1360 add a5,a5,s2 add s2,a5,sp lla s5,.LC1 add s1,a3,sp lla s4,.LC2 .L24: mv a2,s3 mv a1,s2 mv a0,s5 call __isoc99_scanf@plt lw s6,-1352(s1) ld a1,-1336(s1) mv a0,s6 call bound_lower mv s0,a0 ld a1,-1344(s1) mv a0,s6 call bound_upper addi s0,s0,1 slli s0,s0,3 add s0,s1,s0 slli a0,a0,3 add a0,s1,a0 ld a2,-1328(s0) ld a5,-1328(a0) sub a2,a2,a5 mv a1,s4 li a0,1 call __printf_chk@plt lw a5,-1348(s1) addiw a5,a5,-1 sext.w a4,a5 sw a5,-1348(s1) bne a4,zero,.L24 .L23: la a5,__stack_chk_guard li a4,798720 addi a3,a4,1352 add a3,a3,sp ld a4, 0(a3) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L30 li a0,0 li t0,798720 add sp,sp,t0 ld ra,1416(sp) ld s0,1408(sp) ld s1,1400(sp) ld s2,1392(sp) ld s3,1384(sp) ld s4,1376(sp) ld s5,1368(sp) ld s6,1360(sp) addi sp,sp,1424 jr ra .L30: call __stack_chk_fail@plt .size main, .-main .globl p2 .bss .align 3 .type p2, @object .size p2, 1600080 p2: .zero 1600080 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "entertainment3.c" .option pic .text .align 1 .globl fnccompare .type fnccompare, @function fnccompare: ld a0,0(a0) ld a5,0(a1) blt a0,a5,.L3 sgt a0,a0,a5 ret .L3: li a0,-1 ret .size fnccompare, .-fnccompare .align 1 .globl bound_lower .type bound_lower, @function bound_lower: mv a7,a0 addiw a0,a0,-1 ble a0,zero,.L6 li a3,0 lla a6,p2 .L9: addw a5,a3,a0 sraiw a2,a5,1 slli a4,a2,4 add a4,a6,a4 ld a4,0(a4) ble a4,a1,.L7 addiw a0,a2,-1 mv a7,a2 bgt a0,a3,.L9 .L11: addiw a0,a7,-1 .L6: ret .L7: addiw a3,a2,1 bgt a0,a3,.L9 j .L11 .size bound_lower, .-bound_lower .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "%lld %lld" .align 3 .LC2: .string "%lld\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-1424 sd s1,1400(sp) li a5,798720 li s1,-798720 addi a1,s1,-1352 li t0,-798720 addi a4,a5,1360 sd s4,1376(sp) sd ra,1416(sp) sd s0,1408(sp) sd s2,1392(sp) sd s3,1384(sp) sd s5,1368(sp) sd s6,1360(sp) add a4,a4,a1 add sp,sp,t0 add a1,a4,sp addi a4,a5,1360 add a4,a4,s1 add s1,a4,sp addi a4,a5,1352 add a4,a4,sp la s4,__stack_chk_guard ld a5, 0(s4) sd a5, 0(a4) li a5, 0 lla a0,.LC0 call __isoc99_scanf@plt lw a5,-1352(s1) ble a5,zero,.L17 lla s5,p2 lla s3,p2+8 li s0,0 lla s2,.LC1 .L16: mv a2,s3 mv a1,s5 mv a0,s2 call __isoc99_scanf@plt lw a5,-1352(s1) addiw s0,s0,1 bgt a5,s0,.L16 .L17: li s0,-798720 li s2,798720 addi a1,s0,-1348 addi a5,s2,1360 add a5,a5,a1 add a1,a5,sp lla a0,.LC0 call __isoc99_scanf@plt addi a5,s2,1360 add a5,a5,s0 add s1,a5,sp lw a1,-1352(s1) lla a3,fnccompare li a2,16 lla a0,p2 call qsort@plt lw a4,-1352(s1) sd zero,-1328(s1) sd zero,-1320(s1) ble a4,zero,.L14 addiw a1,a4,-1 slli a4,a1,32 srli a1,a4,29 addi a5,s1,-1320 lla a3,p2+8 add a1,a1,a5 li a4,0 j .L15 .L42: addi a5,a5,8 .L15: ld a2,0(a3) addi a3,a3,16 add a4,a4,a2 sd a4,0(a5) bne a1,a5,.L42 .L14: li a3,798720 li a5,-798720 addi a4,a3,1360 add a4,a4,a5 add s6,a4,sp lw a4,-1348(s6) beq a4,zero,.L28 addi s1,a5,-1336 addi a4,a3,1360 add a4,a4,s1 addi a5,a5,-1344 add s1,a4,sp addi a4,a3,1360 add a4,a4,a5 add s0,a4,sp lla s3,.LC1 lla s5,p2 lla s2,.LC2 .L18: mv a2,s1 mv a1,s0 mv a0,s3 call __isoc99_scanf@plt lw a7,-1352(s6) ld t1,-1336(s6) addiw a3,a7,-1 sext.w a4,a7 ble a3,zero,.L19 mv a6,a7 mv a1,a3 li a2,0 .L22: addw a5,a2,a1 sraiw a0,a5,1 slli a4,a0,4 add a4,s5,a4 ld a4,0(a4) bge t1,a4,.L20 addiw a1,a0,-1 mv a6,a0 blt a2,a1,.L22 .L45: ld a1,-1344(s6) addiw a6,a6,-1 li a2,0 .L27: addw a4,a2,a3 sraiw a5,a4,1 mv a4,a5 slli a5,a5,4 add a5,s5,a5 ld a5,0(a5) bgt a5,a1,.L41 beq a5,a1,.L41 addiw a2,a4,1 blt a2,a3,.L27 .L44: sext.w a4,a7 .L29: addi a5,a6,1 addiw a4,a4,1 slli a5,a5,3 slli a4,a4,3 add a4,s6,a4 add a5,s6,a5 ld a2,-1328(a5) ld a5,-1328(a4) mv a1,s2 li a0,1 sub a2,a2,a5 call __printf_chk@plt lw a5,-1348(s6) addiw a4,a5,-1 sw a4,-1348(s6) bne a4,zero,.L18 .L28: li a5,798720 addi a5,a5,1352 add a5,a5,sp ld a4, 0(a5) ld a5, 0(s4) xor a5, a4, a5 li a4, 0 bne a5,zero,.L43 li t0,798720 add sp,sp,t0 ld ra,1416(sp) ld s0,1408(sp) ld s1,1400(sp) ld s2,1392(sp) ld s3,1384(sp) ld s4,1376(sp) ld s5,1368(sp) ld s6,1360(sp) li a0,0 addi sp,sp,1424 jr ra .L41: addiw a3,a4,-1 mv a7,a3 blt a2,a3,.L27 j .L44 .L20: addiw a2,a0,1 blt a2,a1,.L22 j .L45 .L19: mv a6,a3 j .L29 .L43: call __stack_chk_fail@plt .size main, .-main .text .align 1 .globl bound_upper .type bound_upper, @function bound_upper: addiw a3,a0,-1 sext.w a5,a0 ble a3,zero,.L47 li a2,0 lla a6,p2 .L51: addw a4,a3,a2 sraiw a5,a4,1 mv a4,a5 slli a5,a5,4 add a5,a6,a5 ld a5,0(a5) bgt a5,a1,.L53 beq a5,a1,.L53 addiw a2,a4,1 bgt a3,a2,.L51 .L54: sext.w a5,a0 .L47: addiw a0,a5,1 ret .L53: addiw a3,a4,-1 mv a0,a3 bgt a3,a2,.L51 j .L54 .size bound_upper, .-bound_upper .globl p2 .bss .align 3 .type p2, @object .size p2, 1600080 p2: .zero 1600080 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "entertainment3.c" .option pic .text .align 1 .globl fnccompare .type fnccompare, @function fnccompare: ld a0,0(a0) ld a5,0(a1) blt a0,a5,.L3 sgt a0,a0,a5 ret .L3: li a0,-1 ret .size fnccompare, .-fnccompare .align 1 .globl bound_lower .type bound_lower, @function bound_lower: mv a7,a0 addiw a0,a0,-1 ble a0,zero,.L6 li a3,0 lla a6,p2 .L10: addw a5,a0,a3 sraiw a2,a5,1 slli a4,a2,4 add a4,a6,a4 ld a4,0(a4) bge a1,a4,.L7 addiw a0,a2,-1 mv a7,a2 bgt a0,a3,.L10 addiw a0,a7,-1 .L6: ret .L7: addiw a3,a2,1 blt a3,a0,.L10 addiw a0,a7,-1 j .L6 .size bound_lower, .-bound_lower .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "%lld %lld" .align 3 .LC2: .string "%lld\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-1424 sd s1,1400(sp) li a5,798720 li s1,-798720 addi a1,s1,-1352 li t0,-798720 addi a4,a5,1360 sd s4,1376(sp) sd ra,1416(sp) sd s0,1408(sp) sd s2,1392(sp) sd s3,1384(sp) sd s5,1368(sp) sd s6,1360(sp) add a4,a4,a1 add sp,sp,t0 add a1,a4,sp addi a4,a5,1360 add a4,a4,s1 add s1,a4,sp addi a4,a5,1352 add a4,a4,sp la s4,__stack_chk_guard ld a5, 0(s4) sd a5, 0(a4) li a5, 0 lla a0,.LC0 call __isoc99_scanf@plt lw a5,-1352(s1) ble a5,zero,.L16 lla s5,p2 lla s3,p2+8 li s0,0 lla s2,.LC1 .L15: mv a2,s3 mv a1,s5 mv a0,s2 call __isoc99_scanf@plt lw a5,-1352(s1) addiw s0,s0,1 bgt a5,s0,.L15 .L16: li s1,798720 li s0,-798720 addi a1,s0,-1348 addi a5,s1,1360 add a5,a5,a1 add a1,a5,sp lla a0,.LC0 call __isoc99_scanf@plt addi a5,s1,1360 add a5,a5,s0 add s1,a5,sp lw a1,-1352(s1) lla a3,fnccompare li a2,16 lla a0,p2 call qsort@plt lw a5,-1352(s1) sd zero,-1328(s1) sd zero,-1320(s1) ble a5,zero,.L14 addiw a1,a5,-1 li a5,798720 addi a5,a5,1360 add a5,a5,s0 add a4,a5,sp slli a5,a1,32 srli a1,a5,28 lla a3,p2+24 add a1,a1,a3 lla a5,p2+8 addi a4,a4,-1320 li a3,0 .L19: ld a2,0(a5) addi a4,a4,8 addi a5,a5,16 add a3,a3,a2 sd a3,-8(a4) bne a5,a1,.L19 .L14: li a3,798720 li a5,-798720 addi a4,a3,1360 add a4,a4,a5 add s6,a4,sp lw a4,-1348(s6) beq a4,zero,.L18 addi s1,a5,-1336 addi a4,a3,1360 add a4,a4,s1 addi a5,a5,-1344 add s1,a4,sp addi a4,a3,1360 add a4,a4,a5 add s0,a4,sp lla s3,.LC1 lla s5,p2 lla s2,.LC2 .L17: mv a2,s1 mv a1,s0 mv a0,s3 call __isoc99_scanf@plt lw a7,-1352(s6) ld t1,-1336(s6) addiw a3,a7,-1 sext.w a4,a7 ble a3,zero,.L20 mv a6,a7 mv a1,a3 li a2,0 .L24: addw a5,a1,a2 sraiw a0,a5,1 slli a4,a0,4 add a4,s5,a4 ld a4,0(a4) bge t1,a4,.L21 addiw a1,a0,-1 mv a6,a0 bgt a1,a2,.L24 .L23: ld a1,-1344(s6) addiw a6,a6,-1 li a2,0 .L28: addw a4,a3,a2 sraiw a5,a4,1 mv a4,a5 slli a5,a5,4 add a5,s5,a5 ld a5,0(a5) blt a1,a5,.L40 beq a1,a5,.L40 addiw a2,a4,1 bgt a3,a2,.L28 .L42: sext.w a4,a7 .L29: addi a5,a6,1 addiw a4,a4,1 slli a5,a5,3 slli a4,a4,3 add a4,s6,a4 add a5,s6,a5 ld a2,-1328(a5) ld a5,-1328(a4) mv a1,s2 li a0,1 sub a2,a2,a5 call __printf_chk@plt lw a5,-1348(s6) addiw a4,a5,-1 sw a4,-1348(s6) bne a4,zero,.L17 .L18: li a5,798720 addi a5,a5,1352 add a5,a5,sp ld a4, 0(a5) ld a5, 0(s4) xor a5, a4, a5 li a4, 0 bne a5,zero,.L41 li t0,798720 add sp,sp,t0 ld ra,1416(sp) ld s0,1408(sp) ld s1,1400(sp) ld s2,1392(sp) ld s3,1384(sp) ld s4,1376(sp) ld s5,1368(sp) ld s6,1360(sp) li a0,0 addi sp,sp,1424 jr ra .L40: addiw a3,a4,-1 mv a7,a3 bgt a3,a2,.L28 j .L42 .L21: addiw a2,a0,1 blt a2,a1,.L24 j .L23 .L20: mv a6,a3 j .L29 .L41: call __stack_chk_fail@plt .size main, .-main .text .align 1 .globl bound_upper .type bound_upper, @function bound_upper: addiw a3,a0,-1 sext.w a5,a0 ble a3,zero,.L44 li a2,0 lla a6,p2 .L48: addw a4,a3,a2 sraiw a5,a4,1 mv a4,a5 slli a5,a5,4 add a5,a6,a5 ld a5,0(a5) bgt a5,a1,.L50 beq a5,a1,.L50 addiw a2,a4,1 blt a2,a3,.L48 .L51: sext.w a5,a0 .L44: addiw a0,a5,1 ret .L50: addiw a3,a4,-1 mv a0,a3 blt a2,a3,.L48 j .L51 .size bound_upper, .-bound_upper .globl p2 .bss .align 3 .type p2, @object .size p2, 1600080 p2: .zero 1600080 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "entertainment3.c" .text .global p2 .bss .align 3 .type p2, %object .size p2, 1600080 p2: .zero 1600080 .text .align 2 .global bound_lower .type bound_lower, %function bound_lower: .LFB6: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, 8] str x1, [sp] ldr x0, [sp, 8] str x0, [sp, 40] str wzr, [sp, 28] ldr x0, [sp, 8] sub w0, w0, #1 str w0, [sp, 32] b .L2 .L4: ldr w1, [sp, 28] ldr w0, [sp, 32] add w0, w1, w0 asr w0, w0, 1 str w0, [sp, 36] adrp x0, p2 add x1, x0, :lo12:p2 ldrsw x0, [sp, 36] lsl x0, x0, 4 add x0, x1, x0 ldr x0, [x0] ldr x1, [sp] cmp x1, x0 bge .L3 ldrsw x0, [sp, 36] str x0, [sp, 40] ldr w0, [sp, 36] sub w0, w0, #1 str w0, [sp, 32] b .L2 .L3: ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 28] .L2: ldr w1, [sp, 28] ldr w0, [sp, 32] cmp w1, w0 blt .L4 ldr x0, [sp, 40] sub w0, w0, #1 add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size bound_lower, .-bound_lower .section .rodata .align 3 .LC0: .string "%d" .align 3 .LC1: .string "%lld %lld" .align 3 .LC2: .string "%lld\n" .text .align 2 .global main .type main, %function main: .LFB7: .cfi_startproc sub x12, sp, #786432 .cfi_def_cfa 12, 786432 .LPSRL0: sub sp, sp, 65536 str xzr, [sp, 1024] cmp sp, x12 b.ne .LPSRL0 .cfi_def_cfa_register 31 mov x12, 13696 sub sp, sp, x12 .cfi_def_cfa_offset 800128 stp x29, x30, [sp] .cfi_offset 29, -800128 .cfi_offset 30, -800120 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] add x1, sp, 786432 ldr x2, [x0] str x2, [x1, 13688] mov x2, 0 add x0, sp, 20 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf str wzr, [sp, 28] b .L7 .L8: ldrsw x0, [sp, 36] lsl x1, x0, 4 adrp x0, p2 add x0, x0, :lo12:p2 add x3, x1, x0 ldrsw x0, [sp, 36] lsl x1, x0, 4 adrp x0, p2 add x0, x0, :lo12:p2 add x0, x1, x0 add x0, x0, 8 mov x2, x0 mov x1, x3 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L7: ldr w0, [sp, 20] ldr w1, [sp, 28] cmp w1, w0 blt .L8 add x0, sp, 24 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr w0, [sp, 20] sxtw x1, w0 adrp x0, fnccompare add x3, x0, :lo12:fnccompare mov x2, 16 adrp x0, p2 add x0, x0, :lo12:p2 bl qsort str xzr, [sp, 80] str xzr, [sp, 88] mov w0, 1 str w0, [sp, 32] b .L9 .L10: ldr w0, [sp, 32] sub w0, w0, #1 sxtw x0, w0 lsl x0, x0, 3 add x1, sp, 80 ldr x1, [x1, x0] ldr w0, [sp, 32] sub w3, w0, #1 adrp x0, p2 add x2, x0, :lo12:p2 sxtw x0, w3 lsl x0, x0, 4 add x0, x2, x0 ldr x0, [x0, 8] add x2, x1, x0 ldrsw x0, [sp, 32] lsl x0, x0, 3 add x1, sp, 80 str x2, [x1, x0] ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L9: ldr w0, [sp, 20] ldr w1, [sp, 32] cmp w1, w0 ble .L10 b .L11 .L12: add x1, sp, 48 add x0, sp, 40 mov x2, x1 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf ldr w0, [sp, 20] sxtw x0, w0 ldr x1, [sp, 48] bl bound_lower sxtw x0, w0 str x0, [sp, 56] ldr w0, [sp, 20] sxtw x0, w0 ldr x1, [sp, 40] bl bound_upper sxtw x0, w0 str x0, [sp, 64] str xzr, [sp, 72] ldr x0, [sp, 56] add x0, x0, 1 lsl x0, x0, 3 add x1, sp, 80 ldr x1, [x1, x0] ldr x0, [sp, 64] lsl x0, x0, 3 add x2, sp, 80 ldr x0, [x2, x0] sub x0, x1, x0 str x0, [sp, 72] ldr x1, [sp, 72] adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf ldr w0, [sp, 24] sub w0, w0, #1 str w0, [sp, 24] .L11: ldr w0, [sp, 24] cmp w0, 0 bne .L12 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] add x3, sp, 786432 ldr x4, [x3, 13688] ldr x2, [x0] subs x4, x4, x2 mov x2, 0 beq .L14 bl __stack_chk_fail .L14: mov w0, w1 ldp x29, x30, [sp] .cfi_restore 29 .cfi_restore 30 add sp, sp, 1408 .cfi_def_cfa_offset 798720 add sp, sp, 798720 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size main, .-main .align 2 .global bound_upper .type bound_upper, %function bound_upper: .LFB8: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, 8] str x1, [sp] ldr x0, [sp, 8] str x0, [sp, 40] str wzr, [sp, 28] ldr x0, [sp, 8] sub w0, w0, #1 str w0, [sp, 32] b .L16 .L19: ldr w1, [sp, 28] ldr w0, [sp, 32] add w0, w1, w0 asr w0, w0, 1 str w0, [sp, 36] adrp x0, p2 add x1, x0, :lo12:p2 ldrsw x0, [sp, 36] lsl x0, x0, 4 add x0, x1, x0 ldr x0, [x0] ldr x1, [sp] cmp x1, x0 bge .L17 ldr w0, [sp, 36] sub w0, w0, #1 sxtw x0, w0 str x0, [sp, 40] ldr w0, [sp, 36] sub w0, w0, #1 str w0, [sp, 32] b .L16 .L17: adrp x0, p2 add x1, x0, :lo12:p2 ldrsw x0, [sp, 36] lsl x0, x0, 4 add x0, x1, x0 ldr x0, [x0] ldr x1, [sp] cmp x1, x0 bne .L18 ldr w0, [sp, 36] sub w0, w0, #1 sxtw x0, w0 str x0, [sp, 40] ldr w0, [sp, 36] sub w0, w0, #1 str w0, [sp, 32] b .L16 .L18: ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 28] .L16: ldr w1, [sp, 28] ldr w0, [sp, 32] cmp w1, w0 blt .L19 ldr x0, [sp, 40] add w0, w0, 1 add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size bound_upper, .-bound_upper .align 2 .global fnccompare .type fnccompare, %function fnccompare: .LFB9: .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] ldr x1, [x0] ldr x0, [sp, 24] ldr x0, [x0] cmp x1, x0 bge .L22 mov w0, -1 b .L23 .L22: ldr x0, [sp, 16] ldr x1, [x0] ldr x0, [sp, 24] ldr x0, [x0] cmp x1, x0 ble .L24 mov w0, 1 b .L23 .L24: mov w0, 0 .L23: add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size fnccompare, .-fnccompare .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "entertainment3.c" .text .align 2 .global fnccompare .type fnccompare, %function fnccompare: .LFB42: .cfi_startproc ldr x2, [x0] ldr x0, [x1] cmp x2, x0 blt .L3 cset w0, gt .L1: ret .L3: mov w0, -1 b .L1 .cfi_endproc .LFE42: .size fnccompare, .-fnccompare .align 2 .global bound_lower .type bound_lower, %function bound_lower: .LFB39: .cfi_startproc sub w3, w0, #1 cmp w3, 0 ble .L5 mov w4, 0 adrp x6, p2 add x6, x6, :lo12:p2 b .L8 .L6: add w4, w2, 1 .L7: cmp w4, w3 bge .L5 .L8: add w2, w4, w3 asr w2, w2, 1 sbfiz x5, x2, 4, 32 ldr x5, [x6, x5] cmp x5, x1 ble .L6 sxtw x0, w2 sub w3, w2, #1 b .L7 .L5: sub w0, w0, #1 ret .cfi_endproc .LFE39: .size bound_lower, .-bound_lower .align 2 .global bound_upper .type bound_upper, %function bound_upper: .LFB41: .cfi_startproc sub w3, w0, #1 cmp w3, 0 ble .L11 mov w5, 0 adrp x6, p2 add x6, x6, :lo12:p2 b .L15 .L12: beq .L17 add w5, w2, 1 .L13: cmp w5, w3 bge .L11 .L15: add w2, w5, w3 asr w2, w2, 1 sbfiz x4, x2, 4, 32 ldr x4, [x6, x4] cmp x4, x1 ble .L12 sub w3, w2, #1 sxtw x0, w3 b .L13 .L17: sub w3, w2, #1 sxtw x0, w3 b .L13 .L11: add w0, w0, 1 ret .cfi_endproc .LFE41: .size bound_upper, .-bound_upper .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "%lld %lld" .align 3 .LC2: .string "%lld\n" .text .align 2 .global main .type main, %function main: .LFB40: .cfi_startproc sub x12, sp, #786432 .cfi_def_cfa 12, 786432 .LPSRL0: sub sp, sp, 65536 str xzr, [sp, 1024] cmp sp, x12 b.ne .LPSRL0 .cfi_def_cfa_register 31 mov x12, 13728 sub sp, sp, x12 .cfi_def_cfa_offset 800160 stp x29, x30, [sp] .cfi_offset 29, -800160 .cfi_offset 30, -800152 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -800144 .cfi_offset 20, -800136 .cfi_offset 21, -800128 .cfi_offset 22, -800120 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] add x1, sp, 786432 ldr x2, [x0] str x2, [x1, 13720] mov x2, 0 add x1, sp, 88 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr w0, [sp, 88] cmp w0, 0 ble .L19 adrp x20, p2 add x22, x20, :lo12:p2 mov x20, x22 add x22, x22, 8 mov w19, 0 adrp x21, .LC1 add x21, x21, :lo12:.LC1 .L20: mov x2, x22 mov x1, x20 mov x0, x21 bl __isoc99_scanf add w19, w19, 1 ldr w0, [sp, 88] cmp w0, w19 bgt .L20 .L19: add x1, sp, 92 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf adrp x3, fnccompare add x3, x3, :lo12:fnccompare mov x2, 16 ldrsw x1, [sp, 88] adrp x0, p2 add x0, x0, :lo12:p2 bl qsort str xzr, [sp, 112] str xzr, [sp, 120] ldr w4, [sp, 88] cmp w4, 0 ble .L21 add x2, sp, 120 ubfiz x4, x4, 4, 32 mov x0, 0 adrp x5, p2+8 add x5, x5, :lo12:p2+8 .L22: ldr x1, [x2, -8] ldr x3, [x5, x0] add x1, x1, x3 str x1, [x2], 8 add x0, x0, 16 cmp x0, x4 bne .L22 .L21: ldr w0, [sp, 92] cbz w0, .L23 stp x23, x24, [sp, 48] .cfi_offset 24, -800104 .cfi_offset 23, -800112 str x25, [sp, 64] .cfi_offset 25, -800096 add x24, sp, 104 add x23, sp, 96 adrp x22, .LC1 add x22, x22, :lo12:.LC1 add x20, sp, 112 adrp x21, .LC2 add x21, x21, :lo12:.LC2 .L24: mov x2, x24 mov x1, x23 mov x0, x22 bl __isoc99_scanf ldrsw x25, [sp, 88] ldr x1, [sp, 104] mov x0, x25 bl bound_lower mov w19, w0 ldr x1, [sp, 96] mov x0, x25 bl bound_upper add x19, x20, w19, sxtw 3 ldr x2, [x19, 8] ldr x0, [x20, w0, sxtw 3] sub x2, x2, x0 mov x1, x21 mov w0, 1 bl __printf_chk ldr w0, [sp, 92] sub w0, w0, #1 str w0, [sp, 92] cbnz w0, .L24 ldp x23, x24, [sp, 48] .cfi_restore 24 .cfi_restore 23 ldr x25, [sp, 64] .cfi_restore 25 .L23: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] add x2, sp, 786432 ldr x3, [x2, 13720] ldr x1, [x0] subs x3, x3, x1 mov x1, 0 bne .L30 mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp] .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 add sp, sp, 1440 .cfi_def_cfa_offset 798720 add sp, sp, 798720 .cfi_def_cfa_offset 0 ret .L30: .cfi_restore_state stp x23, x24, [sp, 48] .cfi_offset 24, -800104 .cfi_offset 23, -800112 str x25, [sp, 64] .cfi_offset 25, -800096 bl __stack_chk_fail .cfi_endproc .LFE40: .size main, .-main .global p2 .bss .align 3 .type p2, %object .size p2, 1600080 p2: .zero 1600080 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "entertainment3.c" .text .align 2 .p2align 4,,11 .global fnccompare .type fnccompare, %function fnccompare: .LFB42: .cfi_startproc ldr x2, [x0] ldr x0, [x1] cmp x2, x0 cset w0, gt csinv w0, w0, wzr, ge ret .cfi_endproc .LFE42: .size fnccompare, .-fnccompare .align 2 .p2align 4,,11 .global bound_lower .type bound_lower, %function bound_lower: .LFB39: .cfi_startproc mov x7, x0 sub w0, w0, #1 cmp w0, 0 ble .L5 adrp x6, p2 mov w3, 0 add x6, x6, :lo12:p2 b .L9 .p2align 2,,3 .L12: sub w0, w2, #1 mov x7, x5 cmp w0, w3 ble .L11 .L9: add w2, w3, w0 asr w2, w2, 1 sbfiz x4, x2, 4, 32 sxtw x5, w2 ldr x4, [x6, x4] cmp x4, x1 bgt .L12 add w3, w2, 1 cmp w0, w3 bgt .L9 .L11: sub w0, w7, #1 .L5: ret .cfi_endproc .LFE39: .size bound_lower, .-bound_lower .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "%lld %lld" .align 3 .LC2: .string "%lld\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB40: .cfi_startproc sub x12, sp, #786432 .cfi_def_cfa 12, 786432 .LPSRL0: sub sp, sp, 65536 str xzr, [sp, 1024] cmp sp, x12 b.ne .LPSRL0 .cfi_def_cfa_register 31 mov x12, 13712 sub sp, sp, x12 .cfi_def_cfa_offset 800144 adrp x2, :got:__stack_chk_guard add x3, sp, 786432 add x1, sp, 72 stp x29, x30, [sp] .cfi_offset 29, -800144 .cfi_offset 30, -800136 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] .cfi_offset 19, -800128 .cfi_offset 20, -800120 .cfi_offset 21, -800112 .cfi_offset 22, -800104 .cfi_offset 23, -800096 .cfi_offset 24, -800088 adrp x23, .LC0 add x0, x23, :lo12:.LC0 ldr x4, [x2] str x4, [x3, 13704] mov x4, 0 adrp x24, p2 bl __isoc99_scanf ldr w0, [sp, 72] cmp w0, 0 ble .L18 add x21, x24, :lo12:p2 adrp x19, .LC1 add x21, x21, 8 add x22, x24, :lo12:p2 add x20, x19, :lo12:.LC1 mov w19, 0 .p2align 3,,7 .L17: mov x2, x21 mov x1, x22 mov x0, x20 bl __isoc99_scanf ldr w0, [sp, 72] add w19, w19, 1 cmp w0, w19 bgt .L17 .L18: add x1, sp, 76 add x0, x23, :lo12:.LC0 bl __isoc99_scanf ldrsw x1, [sp, 72] add x0, x24, :lo12:p2 adrp x3, fnccompare mov x2, 16 add x3, x3, :lo12:fnccompare bl qsort stp xzr, xzr, [sp, 96] ldr w4, [sp, 72] cmp w4, 0 ble .L15 adrp x5, p2+8 sbfiz x4, x4, 4, 32 add x2, sp, 104 add x5, x5, :lo12:p2+8 mov x0, 0 mov x1, 0 b .L16 .p2align 2,,3 .L41: add x2, x2, 8 .L16: ldr x3, [x5, x0] add x0, x0, 16 add x1, x1, x3 str x1, [x2] cmp x4, x0 bne .L41 .L15: ldr w0, [sp, 76] cbz w0, .L29 adrp x19, .LC1 adrp x21, .LC2 add x24, x24, :lo12:p2 add x19, x19, :lo12:.LC1 add x21, x21, :lo12:.LC2 add x20, sp, 96 add x23, sp, 88 add x22, sp, 80 .p2align 3,,7 .L19: mov x1, x22 mov x2, x23 mov x0, x19 bl __isoc99_scanf ldr w0, [sp, 72] ldr x7, [sp, 88] sub w1, w0, #1 sxtw x8, w0 cmp w1, 0 ble .L20 mov x6, x8 mov w3, w1 mov w2, 0 b .L23 .p2align 2,,3 .L43: sub w3, w0, #1 mov x6, x5 cmp w2, w3 bge .L42 .L23: add w0, w2, w3 asr w0, w0, 1 sbfiz x4, x0, 4, 32 sxtw x5, w0 ldr x4, [x24, x4] cmp x7, x4 blt .L43 add w2, w0, 1 cmp w2, w3 blt .L23 .L42: sub w6, w6, #1 mov w2, 0 ldr x4, [sp, 80] sxtw x6, w6 b .L28 .p2align 2,,3 .L25: beq .L40 add w2, w0, 1 cmp w2, w1 bge .L44 .L28: add w0, w2, w1 asr w0, w0, 1 sbfiz x3, x0, 4, 32 ldr x3, [x24, x3] cmp x3, x4 ble .L25 .L40: sub w1, w0, #1 sxtw x8, w1 cmp w2, w1 blt .L28 .L44: mov w0, w8 .L30: add x2, x6, 1 add w3, w0, 1 mov x1, x21 mov w0, 1 ldr x4, [x20, x2, lsl 3] ldr x2, [x20, w3, sxtw 3] sub x2, x4, x2 bl __printf_chk ldr w0, [sp, 76] sub w0, w0, #1 str w0, [sp, 76] cbnz w0, .L19 .L29: adrp x0, :got:__stack_chk_guard add x2, sp, 786432 ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [x2, 13704] ldr x1, [x0] subs x3, x3, x1 mov x1, 0 bne .L45 ldp x29, x30, [sp] mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 add sp, sp, 1424 .cfi_def_cfa_offset 798720 add sp, sp, 798720 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L20: .cfi_restore_state sxtw x6, w1 b .L30 .L45: bl __stack_chk_fail .cfi_endproc .LFE40: .size main, .-main .text .align 2 .p2align 4,,11 .global bound_upper .type bound_upper, %function bound_upper: .LFB41: .cfi_startproc sub w3, w0, #1 mov w2, w0 cmp w3, 0 ble .L47 adrp x6, p2 mov w4, 0 add x6, x6, :lo12:p2 b .L51 .p2align 2,,3 .L48: beq .L53 add w4, w2, 1 cmp w3, w4 ble .L54 .L51: add w2, w3, w4 asr w2, w2, 1 sbfiz x5, x2, 4, 32 ldr x5, [x6, x5] cmp x5, x1 ble .L48 .L53: sub w3, w2, #1 sxtw x0, w3 cmp w3, w4 bgt .L51 .L54: mov w2, w0 .L47: add w0, w2, 1 ret .cfi_endproc .LFE41: .size bound_upper, .-bound_upper .global p2 .bss .align 3 .type p2, %object .size p2, 1600080 p2: .zero 1600080 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "entertainment3.c" .text .align 2 .p2align 4,,11 .global fnccompare .type fnccompare, %function fnccompare: .LFB42: .cfi_startproc ldr x2, [x0] ldr x0, [x1] cmp x2, x0 cset w0, gt csinv w0, w0, wzr, ge ret .cfi_endproc .LFE42: .size fnccompare, .-fnccompare .align 2 .p2align 4,,11 .global bound_lower .type bound_lower, %function bound_lower: .LFB39: .cfi_startproc mov x7, x0 sub w0, w0, #1 cmp w0, 0 ble .L5 adrp x6, p2 add x6, x6, :lo12:p2 mov w3, 0 .p2align 3,,7 .L10: add w2, w0, w3 asr w2, w2, 1 sbfiz x4, x2, 4, 32 sxtw x5, w2 ldr x4, [x6, x4] cmp x1, x4 bge .L7 sub w0, w2, #1 mov x7, x5 cmp w0, w3 bgt .L10 sub w0, w7, #1 .L5: ret .p2align 2,,3 .L7: add w3, w2, 1 cmp w3, w0 blt .L10 sub w0, w7, #1 b .L5 .cfi_endproc .LFE39: .size bound_lower, .-bound_lower .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .align 3 .LC1: .string "%lld %lld" .align 3 .LC2: .string "%lld\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB40: .cfi_startproc sub x12, sp, #786432 .cfi_def_cfa 12, 786432 .LPSRL0: sub sp, sp, 65536 str xzr, [sp, 1024] cmp sp, x12 b.ne .LPSRL0 .cfi_def_cfa_register 31 mov x12, 13712 sub sp, sp, x12 .cfi_def_cfa_offset 800144 adrp x2, :got:__stack_chk_guard add x3, sp, 786432 add x1, sp, 72 stp x29, x30, [sp] .cfi_offset 29, -800144 .cfi_offset 30, -800136 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] .cfi_offset 19, -800128 .cfi_offset 20, -800120 .cfi_offset 21, -800112 .cfi_offset 22, -800104 .cfi_offset 23, -800096 .cfi_offset 24, -800088 adrp x23, .LC0 add x0, x23, :lo12:.LC0 ldr x4, [x2] str x4, [x3, 13704] mov x4, 0 adrp x24, p2 bl __isoc99_scanf ldr w0, [sp, 72] cmp w0, 0 ble .L16 add x21, x24, :lo12:p2 adrp x20, .LC1 add x21, x21, 8 add x22, x24, :lo12:p2 add x20, x20, :lo12:.LC1 mov w19, 0 .p2align 3,,7 .L15: mov x2, x21 mov x1, x22 mov x0, x20 bl __isoc99_scanf ldr w0, [sp, 72] add w19, w19, 1 cmp w0, w19 bgt .L15 .L16: add x1, sp, 76 add x0, x23, :lo12:.LC0 bl __isoc99_scanf ldrsw x1, [sp, 72] add x0, x24, :lo12:p2 adrp x3, fnccompare mov x2, 16 add x3, x3, :lo12:fnccompare bl qsort stp xzr, xzr, [sp, 96] ldr w4, [sp, 72] cmp w4, 0 ble .L14 adrp x5, p2+8 sbfiz x4, x4, 3, 32 add x19, sp, 96 add x5, x5, :lo12:p2+8 mov x0, 0 mov x1, 0 .p2align 3,,7 .L19: lsl x3, x0, 1 add x2, x19, x0 add x0, x0, 8 ldr x3, [x5, x3] add x1, x1, x3 str x1, [x2, 8] cmp x4, x0 bne .L19 .L14: ldr w0, [sp, 76] cbz w0, .L18 adrp x20, .LC1 adrp x21, .LC2 add x24, x24, :lo12:p2 add x20, x20, :lo12:.LC1 add x21, x21, :lo12:.LC2 add x19, sp, 96 add x23, sp, 88 add x22, sp, 80 .p2align 3,,7 .L17: mov x1, x22 mov x2, x23 mov x0, x20 bl __isoc99_scanf ldr w0, [sp, 72] ldr x7, [sp, 88] sub w1, w0, #1 sxtw x8, w0 cmp w1, 0 ble .L20 mov x6, x8 mov w3, w1 mov w2, 0 .p2align 3,,7 .L24: add w0, w3, w2 asr w0, w0, 1 sbfiz x4, x0, 4, 32 sxtw x5, w0 ldr x4, [x24, x4] cmp x7, x4 bge .L21 sub w3, w0, #1 mov x6, x5 cmp w3, w2 bgt .L24 .L23: sub w6, w6, #1 mov w2, 0 ldr x4, [sp, 80] sxtw x6, w6 b .L28 .p2align 2,,3 .L25: beq .L38 add w2, w0, 1 cmp w1, w2 ble .L39 .L28: add w0, w1, w2 asr w0, w0, 1 sbfiz x3, x0, 4, 32 ldr x3, [x24, x3] cmp x4, x3 bge .L25 .L38: sub w1, w0, #1 sxtw x8, w1 cmp w1, w2 bgt .L28 .L39: mov w0, w8 .L29: add x2, x6, 1 add w3, w0, 1 mov x1, x21 mov w0, 1 ldr x4, [x19, x2, lsl 3] ldr x2, [x19, w3, sxtw 3] sub x2, x4, x2 bl __printf_chk ldr w0, [sp, 76] sub w0, w0, #1 str w0, [sp, 76] cbnz w0, .L17 .L18: adrp x0, :got:__stack_chk_guard add x2, sp, 786432 ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [x2, 13704] ldr x1, [x0] subs x3, x3, x1 mov x1, 0 bne .L40 ldp x29, x30, [sp] mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 add sp, sp, 1424 .cfi_def_cfa_offset 798720 add sp, sp, 798720 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L21: .cfi_restore_state add w2, w0, 1 cmp w2, w3 blt .L24 b .L23 .p2align 2,,3 .L20: sxtw x6, w1 b .L29 .L40: bl __stack_chk_fail .cfi_endproc .LFE40: .size main, .-main .text .align 2 .p2align 4,,11 .global bound_upper .type bound_upper, %function bound_upper: .LFB41: .cfi_startproc sub w3, w0, #1 mov w2, w0 cmp w3, 0 ble .L42 adrp x6, p2 mov w4, 0 add x6, x6, :lo12:p2 b .L46 .p2align 2,,3 .L43: beq .L48 add w4, w2, 1 cmp w4, w3 bge .L49 .L46: add w2, w3, w4 asr w2, w2, 1 sbfiz x5, x2, 4, 32 ldr x5, [x6, x5] cmp x5, x1 ble .L43 .L48: sub w3, w2, #1 sxtw x0, w3 cmp w4, w3 blt .L46 .L49: mov w2, w0 .L42: add w0, w2, 1 ret .cfi_endproc .LFE41: .size bound_upper, .-bound_upper .global p2 .bss .align 3 .type p2, %object .size p2, 1600080 p2: .zero 1600080 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
osoba.c
#include <stdio.h> #include <stdlib.h> #include <sys/ipc.h> #include <sys/types.h> #include <sys/sem.h> #include <sys/shm.h> #include <errno.h> #include <unistd.h> union semun { int val; struct semid_ds *buf; unsigned short *array; }; #define H 1 int main() { key_t kljuc = ftok("./osoba.c", 'a'); int semid = semget(kljuc, 3, 0666 | IPC_CREAT); //potrebna su nam 3 sem int shmid = shmget(kljuc, sizeof(int), 0666 | IPC_CREAT); //koristicemo deljenu memoriju kao kasicuuuu int *kasica = (int*)shmat(shmid, NULL, 0); if(semid == -1) { if(errno ==EEXIST) { semid = semget(kljuc, 3, 0); } } else { union semun init_sem; init_sem.array = (unsigned short*)malloc(3 *sizeof(unsigned short)); init_sem.array[0] = 1; //sinhonizacija osoba init_sem.array[1] = 0; //javi detetu //dete je semafor 1 init_sem.array[2] = 0; //javi osobi, dakle osoba je semafor 2 semctl(semid, 0, SETALL, init_sem); (*kasica) = 0; } //pravimo operacije struct sembuf P, V, m_inc, m_dec; //za DETE P.sem_num = 2; P.sem_op = -1; P.sem_flg = 0; V.sem_num = 1; V.sem_op = 1; V.sem_flg = 0; //Za osobe, da svaka sledeca ubaci novciccc m_dec.sem_num = 0; m_dec.sem_op = -1; m_dec.sem_flg = 0; m_inc.sem_num = 0; m_inc.sem_op = 1; m_inc.sem_flg = 0; semop(semid, &m_dec, 1); (*kasica)++; if((*kasica) == H) { semop(semid, &V, 1); //dete sada radi, javili smo mu duzme pary semop(semid, &P, 1); } printf("Ubacio sam novcic, pary (%d)\n", *kasica); sleep(5); semop(semid, &m_inc, 1); shmdt(kasica); return 0; }
.file "osoba.c" .option pic .text .section .rodata .align 3 .LC0: .string "./osoba.c" .align 3 .LC1: .string "Ubacio sam novcic, pary (%d)\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-80 sd ra,72(sp) sd s0,64(sp) addi s0,sp,80 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 li a1,97 lla a0,.LC0 call ftok@plt mv a5,a0 sw a5,-72(s0) lw a5,-72(s0) li a2,950 li a1,3 mv a0,a5 call semget@plt mv a5,a0 sw a5,-76(s0) lw a5,-72(s0) li a2,950 li a1,4 mv a0,a5 call shmget@plt mv a5,a0 sw a5,-68(s0) lw a5,-68(s0) li a2,0 li a1,0 mv a0,a5 call shmat@plt sd a0,-32(s0) lw a5,-76(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L2 call __errno_location@plt mv a5,a0 lw a5,0(a5) mv a4,a5 li a5,17 bne a4,a5,.L3 lw a5,-72(s0) li a2,0 li a1,3 mv a0,a5 call semget@plt mv a5,a0 sw a5,-76(s0) j .L3 .L2: li a0,6 call malloc@plt mv a5,a0 sd a5,-40(s0) ld a5,-40(s0) li a4,1 sh a4,0(a5) ld a5,-40(s0) addi a5,a5,2 sh zero,0(a5) ld a5,-40(s0) addi a5,a5,4 sh zero,0(a5) lw a5,-76(s0) ld a3,-40(s0) li a2,17 li a1,0 mv a0,a5 call semctl@plt ld a5,-32(s0) sw zero,0(a5) .L3: li a5,2 sh a5,-64(s0) li a5,-1 sh a5,-62(s0) sh zero,-60(s0) li a5,1 sh a5,-56(s0) li a5,1 sh a5,-54(s0) sh zero,-52(s0) sh zero,-40(s0) li a5,-1 sh a5,-38(s0) sh zero,-36(s0) sh zero,-48(s0) li a5,1 sh a5,-46(s0) sh zero,-44(s0) addi a4,s0,-40 lw a5,-76(s0) li a2,1 mv a1,a4 mv a0,a5 call semop@plt ld a5,-32(s0) lw a5,0(a5) addiw a5,a5,1 sext.w a4,a5 ld a5,-32(s0) sw a4,0(a5) ld a5,-32(s0) lw a5,0(a5) mv a4,a5 li a5,1 bne a4,a5,.L4 addi a4,s0,-56 lw a5,-76(s0) li a2,1 mv a1,a4 mv a0,a5 call semop@plt addi a4,s0,-64 lw a5,-76(s0) li a2,1 mv a1,a4 mv a0,a5 call semop@plt .L4: ld a5,-32(s0) lw a5,0(a5) mv a1,a5 lla a0,.LC1 call printf@plt li a0,5 call sleep@plt addi a4,s0,-48 lw a5,-76(s0) li a2,1 mv a1,a4 mv a0,a5 call semop@plt ld a0,-32(s0) call shmdt@plt li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L6 call __stack_chk_fail@plt .L6: mv a0,a4 ld ra,72(sp) ld s0,64(sp) addi sp,sp,80 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "osoba.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "./osoba.c" .align 3 .LC1: .string "Ubacio sam novcic, pary (%d)\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-80 sd ra,72(sp) sd s0,64(sp) sd s1,56(sp) sd s2,48(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 40(sp) li a4, 0 li a1,97 lla a0,.LC0 call ftok@plt mv s2,a0 li a2,950 li a1,3 call semget@plt mv s1,a0 li a2,950 li a1,4 mv a0,s2 call shmget@plt li a2,0 li a1,0 call shmat@plt mv s0,a0 li a5,-1 bne s1,a5,.L2 call __errno_location@plt lw a4,0(a0) li a5,17 bne a4,a5,.L3 li a2,0 li a1,3 mv a0,s2 call semget@plt mv s1,a0 j .L3 .L2: li a0,6 call malloc@plt mv a3,a0 li a5,1 sh a5,0(a0) sh zero,2(a0) sh zero,4(a0) li a2,17 li a1,0 mv a0,s1 call semctl@plt sw zero,0(s0) .L3: li a5,2 sh a5,8(sp) li a5,-1 sh a5,10(sp) sh zero,12(sp) li s2,1 sh s2,16(sp) sh s2,18(sp) sh zero,20(sp) sh zero,32(sp) sh a5,34(sp) sh zero,36(sp) sh zero,24(sp) sh s2,26(sp) sh zero,28(sp) li a2,1 addi a1,sp,32 mv a0,s1 call semop@plt lw a5,0(s0) addiw a5,a5,1 sext.w a4,a5 sw a5,0(s0) beq a4,s2,.L7 .L4: lw a2,0(s0) lla a1,.LC1 li a0,1 call __printf_chk@plt li a0,5 call sleep@plt li a2,1 addi a1,sp,24 mv a0,s1 call semop@plt mv a0,s0 call shmdt@plt la a5,__stack_chk_guard ld a4, 40(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L8 li a0,0 ld ra,72(sp) ld s0,64(sp) ld s1,56(sp) ld s2,48(sp) addi sp,sp,80 jr ra .L7: li a2,1 addi a1,sp,16 mv a0,s1 call semop@plt li a2,1 addi a1,sp,8 mv a0,s1 call semop@plt j .L4 .L8: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "osoba.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "./osoba.c" .align 3 .LC1: .string "Ubacio sam novcic, pary (%d)\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-96 sd s3,56(sp) la s3,__stack_chk_guard ld a5, 0(s3) sd a5, 40(sp) li a5, 0 li a1,97 lla a0,.LC0 sd ra,88(sp) sd s0,80(sp) sd s1,72(sp) sd s2,64(sp) call ftok@plt li a2,950 li a1,3 mv s2,a0 call semget@plt li a2,950 li a1,4 mv s0,a0 mv a0,s2 call shmget@plt li a2,0 li a1,0 call shmat@plt li a5,-1 mv s1,a0 bne s0,a5,.L2 call __errno_location@plt lw a4,0(a0) li a5,17 beq a4,a5,.L8 .L3: li a4,-65536 li a5,65536 addi a6,a4,2 addi a3,a5,1 li a2,1 addi a1,sp,32 mv a0,s0 sw a4,32(sp) sw a5,24(sp) sw a6,8(sp) sh zero,12(sp) sw a3,16(sp) sh zero,20(sp) sh zero,36(sp) sh zero,28(sp) call semop@plt lw a5,0(s1) li a4,1 addiw a2,a5,1 sw a2,0(s1) beq a2,a4,.L9 .L4: lla a1,.LC1 li a0,1 call __printf_chk@plt li a0,5 call sleep@plt li a2,1 addi a1,sp,24 mv a0,s0 call semop@plt mv a0,s1 call shmdt@plt ld a4, 40(sp) ld a5, 0(s3) xor a5, a4, a5 li a4, 0 bne a5,zero,.L10 ld ra,88(sp) ld s0,80(sp) ld s1,72(sp) ld s2,64(sp) ld s3,56(sp) li a0,0 addi sp,sp,96 jr ra .L2: li a0,6 call malloc@plt mv a3,a0 li a5,1 li a2,17 li a1,0 mv a0,s0 sw a5,0(a3) sh zero,4(a3) call semctl@plt sw zero,0(s1) j .L3 .L9: li a2,1 addi a1,sp,16 mv a0,s0 call semop@plt li a2,1 addi a1,sp,8 mv a0,s0 call semop@plt lw a2,0(s1) j .L4 .L8: li a2,0 li a1,3 mv a0,s2 call semget@plt mv s0,a0 j .L3 .L10: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "osoba.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "./osoba.c" .align 3 .LC1: .string "Ubacio sam novcic, pary (%d)\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-96 sd s3,56(sp) la s3,__stack_chk_guard ld a5, 0(s3) sd a5, 40(sp) li a5, 0 li a1,97 lla a0,.LC0 sd ra,88(sp) sd s0,80(sp) sd s1,72(sp) sd s2,64(sp) call ftok@plt li a2,950 li a1,3 mv s2,a0 call semget@plt li a2,950 li a1,4 mv s0,a0 mv a0,s2 call shmget@plt li a2,0 li a1,0 call shmat@plt li a5,-1 mv s1,a0 bne s0,a5,.L2 call __errno_location@plt lw a4,0(a0) li a5,17 beq a4,a5,.L8 .L3: li a4,-65536 li a5,65536 addi a6,a4,2 addi a3,a5,1 li a2,1 addi a1,sp,32 mv a0,s0 sw a4,32(sp) sw a5,24(sp) sw a6,8(sp) sh zero,12(sp) sw a3,16(sp) sh zero,20(sp) sh zero,36(sp) sh zero,28(sp) call semop@plt lw a5,0(s1) li a4,1 addiw a2,a5,1 sw a2,0(s1) beq a2,a4,.L9 .L4: lla a1,.LC1 li a0,1 call __printf_chk@plt li a0,5 call sleep@plt li a2,1 addi a1,sp,24 mv a0,s0 call semop@plt mv a0,s1 call shmdt@plt ld a4, 40(sp) ld a5, 0(s3) xor a5, a4, a5 li a4, 0 bne a5,zero,.L10 ld ra,88(sp) ld s0,80(sp) ld s1,72(sp) ld s2,64(sp) ld s3,56(sp) li a0,0 addi sp,sp,96 jr ra .L2: li a0,6 call malloc@plt mv a3,a0 li a5,1 li a2,17 li a1,0 mv a0,s0 sw a5,0(a3) sh zero,4(a3) call semctl@plt sw zero,0(s1) j .L3 .L9: li a2,1 addi a1,sp,16 mv a0,s0 call semop@plt li a2,1 addi a1,sp,8 mv a0,s0 call semop@plt lw a2,0(s1) j .L4 .L8: li a2,0 li a1,3 mv a0,s2 call semget@plt mv s0,a0 j .L3 .L10: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "osoba.c" .text .section .rodata .align 3 .LC0: .string "./osoba.c" .align 3 .LC1: .string "Ubacio sam novcic, pary (%d)\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 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 w1, 97 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl ftok str w0, [sp, 24] mov w2, 950 mov w1, 3 ldr w0, [sp, 24] bl semget str w0, [sp, 20] mov w2, 950 mov x1, 4 ldr w0, [sp, 24] bl shmget str w0, [sp, 28] mov w2, 0 mov x1, 0 ldr w0, [sp, 28] bl shmat str x0, [sp, 64] ldr w0, [sp, 20] cmn w0, #1 bne .L2 bl __errno_location ldr w0, [x0] cmp w0, 17 bne .L3 mov w2, 0 mov w1, 3 ldr w0, [sp, 24] bl semget str w0, [sp, 20] b .L3 .L2: mov x0, 6 bl malloc str x0, [sp, 56] ldr x0, [sp, 56] mov w1, 1 strh w1, [x0] ldr x0, [sp, 56] add x0, x0, 2 strh wzr, [x0] ldr x0, [sp, 56] add x0, x0, 4 strh wzr, [x0] ldr x3, [sp, 56] mov w2, 17 mov w1, 0 ldr w0, [sp, 20] bl semctl ldr x0, [sp, 64] str wzr, [x0] .L3: mov w0, 2 strh w0, [sp, 32] mov w0, -1 strh w0, [sp, 34] strh wzr, [sp, 36] mov w0, 1 strh w0, [sp, 40] mov w0, 1 strh w0, [sp, 42] strh wzr, [sp, 44] strh wzr, [sp, 56] mov w0, -1 strh w0, [sp, 58] strh wzr, [sp, 60] strh wzr, [sp, 48] mov w0, 1 strh w0, [sp, 50] strh wzr, [sp, 52] add x0, sp, 56 mov x2, 1 mov x1, x0 ldr w0, [sp, 20] bl semop ldr x0, [sp, 64] ldr w0, [x0] add w1, w0, 1 ldr x0, [sp, 64] str w1, [x0] ldr x0, [sp, 64] ldr w0, [x0] cmp w0, 1 bne .L4 add x0, sp, 40 mov x2, 1 mov x1, x0 ldr w0, [sp, 20] bl semop add x0, sp, 32 mov x2, 1 mov x1, x0 ldr w0, [sp, 20] bl semop .L4: ldr x0, [sp, 64] ldr w0, [x0] mov w1, w0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf mov w0, 5 bl sleep add x0, sp, 48 mov x2, 1 mov x1, x0 ldr w0, [sp, 20] bl semop ldr x0, [sp, 64] bl shmdt 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 .L6 bl __stack_chk_fail .L6: mov w0, w1 ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "osoba.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "./osoba.c" .align 3 .LC1: .string "Ubacio sam novcic, pary (%d)\n" .text .align 2 .global main .type main, %function main: .LFB51: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp stp x19, x20, [sp, 16] str x21, [sp, 32] .cfi_offset 19, -80 .cfi_offset 20, -72 .cfi_offset 21, -64 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 88] mov x1, 0 mov w1, 97 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl ftok mov w21, w0 mov w2, 950 mov w1, 3 bl semget mov w20, w0 mov w2, 950 mov x1, 4 mov w0, w21 bl shmget mov w2, 0 mov x1, 0 bl shmat mov x19, x0 cmn w20, #1 bne .L2 bl __errno_location ldr w0, [x0] cmp w0, 17 bne .L3 mov w2, 0 mov w1, 3 mov w0, w21 bl semget mov w20, w0 b .L3 .L2: mov x0, 6 bl malloc mov x3, x0 mov w0, 1 strh w0, [x3] strh wzr, [x3, 2] strh wzr, [x3, 4] mov w2, 17 mov w1, 0 mov w0, w20 bl semctl str wzr, [x19] .L3: mov w0, 2 strh w0, [sp, 56] mov w1, -1 strh w1, [sp, 58] strh wzr, [sp, 60] mov w0, 1 strh w0, [sp, 64] strh w0, [sp, 66] strh wzr, [sp, 68] strh wzr, [sp, 80] strh w1, [sp, 82] strh wzr, [sp, 84] strh wzr, [sp, 72] strh w0, [sp, 74] strh wzr, [sp, 76] mov x2, 1 add x1, sp, 80 mov w0, w20 bl semop ldr w0, [x19] add w0, w0, 1 str w0, [x19] cmp w0, 1 beq .L7 .L4: ldr w2, [x19] adrp x1, .LC1 add x1, x1, :lo12:.LC1 mov w0, 1 bl __printf_chk mov w0, 5 bl sleep mov x2, 1 add x1, sp, 72 mov w0, w20 bl semop mov x0, x19 bl shmdt 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 bne .L8 mov w0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 96 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L7: .cfi_restore_state mov x2, 1 add x1, sp, 64 mov w0, w20 bl semop mov x2, 1 add x1, sp, 56 mov w0, w20 bl semop b .L4 .L8: bl __stack_chk_fail .cfi_endproc .LFE51: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "osoba.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "./osoba.c" .align 3 .LC1: .string "Ubacio sam novcic, pary (%d)\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB51: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 adrp x2, :got:__stack_chk_guard mov w1, 97 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] adrp x0, .LC0 str x21, [sp, 32] .cfi_offset 19, -80 .cfi_offset 20, -72 .cfi_offset 21, -64 add x0, x0, :lo12:.LC0 ldr x3, [x2] str x3, [sp, 88] mov x3, 0 bl ftok mov w21, w0 mov w2, 950 mov w1, 3 bl semget mov w19, w0 mov w2, 950 mov x1, 4 mov w0, w21 bl shmget mov w2, 0 mov x1, 0 bl shmat mov x20, x0 cmn w19, #1 bne .L2 bl __errno_location ldr w0, [x0] cmp w0, 17 beq .L8 .L3: mov w6, -65534 mov w5, 65537 mov w3, -65536 mov w4, 65536 mov x2, 1 add x1, sp, 80 mov w0, w19 str w6, [sp, 56] strh wzr, [sp, 60] str w5, [sp, 64] strh wzr, [sp, 68] str w4, [sp, 72] strh wzr, [sp, 76] str w3, [sp, 80] strh wzr, [sp, 84] bl semop ldr w2, [x20] add w2, w2, 1 str w2, [x20] cmp w2, 1 beq .L9 .L4: adrp x1, .LC1 add x1, x1, :lo12:.LC1 mov w0, 1 bl __printf_chk mov w0, 5 bl sleep add x1, sp, 72 mov x2, 1 mov w0, w19 bl semop mov x0, x20 bl shmdt 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 bne .L10 mov w0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 96 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L2: .cfi_restore_state mov x0, 6 bl malloc mov x3, x0 mov w4, 1 mov w0, w19 mov w2, 17 mov w1, 0 str w4, [x3] strh wzr, [x3, 4] bl semctl str wzr, [x20] b .L3 .L9: add x1, sp, 64 mov x2, 1 mov w0, w19 bl semop mov x2, 1 add x1, sp, 56 mov w0, w19 bl semop ldr w2, [x20] b .L4 .L8: mov w0, w21 mov w2, 0 mov w1, 3 bl semget mov w19, w0 b .L3 .L10: bl __stack_chk_fail .cfi_endproc .LFE51: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "osoba.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "./osoba.c" .align 3 .LC1: .string "Ubacio sam novcic, pary (%d)\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB51: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 adrp x2, :got:__stack_chk_guard mov w1, 97 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] adrp x0, .LC0 str x21, [sp, 32] .cfi_offset 19, -80 .cfi_offset 20, -72 .cfi_offset 21, -64 add x0, x0, :lo12:.LC0 ldr x3, [x2] str x3, [sp, 88] mov x3, 0 bl ftok mov w21, w0 mov w2, 950 mov w1, 3 bl semget mov w19, w0 mov w2, 950 mov x1, 4 mov w0, w21 bl shmget mov w2, 0 mov x1, 0 bl shmat mov x20, x0 cmn w19, #1 bne .L2 bl __errno_location ldr w0, [x0] cmp w0, 17 beq .L8 .L3: mov w6, -65534 mov w5, 65537 mov w3, -65536 mov w4, 65536 mov x2, 1 add x1, sp, 80 mov w0, w19 str w6, [sp, 56] strh wzr, [sp, 60] str w5, [sp, 64] strh wzr, [sp, 68] str w4, [sp, 72] strh wzr, [sp, 76] str w3, [sp, 80] strh wzr, [sp, 84] bl semop ldr w2, [x20] add w2, w2, 1 str w2, [x20] cmp w2, 1 beq .L9 .L4: adrp x1, .LC1 add x1, x1, :lo12:.LC1 mov w0, 1 bl __printf_chk mov w0, 5 bl sleep add x1, sp, 72 mov x2, 1 mov w0, w19 bl semop mov x0, x20 bl shmdt 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 bne .L10 mov w0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 96 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L2: .cfi_restore_state mov x0, 6 bl malloc mov x3, x0 mov w4, 1 mov w0, w19 mov w2, 17 mov w1, 0 str w4, [x3] strh wzr, [x3, 4] bl semctl str wzr, [x20] b .L3 .L9: add x1, sp, 64 mov x2, 1 mov w0, w19 bl semop mov x2, 1 add x1, sp, 56 mov w0, w19 bl semop ldr w2, [x20] b .L4 .L8: mov w0, w21 mov w2, 0 mov w1, 3 bl semget mov w19, w0 b .L3 .L10: bl __stack_chk_fail .cfi_endproc .LFE51: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
selection_sort.c
#include <stdio.h> #include <stdlib.h> void swap(int *, int *); /** * Selection sort algorithm. * * @param int input Array to sort * @param int n Number of data in search array * * @return void */ void selection_sort(int *input, int n) { int min; for (int i = 0; i < n - 1; i++) { min = i; for (int j = i + 1; j < n; j++) { if (input[j] < input[min]) { min = j; } } if (min != i) { swap(input + i, input + min); } } } /** * Swap two integers. * * @param int a * @param int b * * @return void */ void swap(int *a, int *b) { int temp = *b; *b = *a; *a = temp; } int main() { int n = 5000; printf("How many numbers? %d\n", n); int *input = (int *) malloc(n * sizeof(int)); printf("Enter %d numbers: ", n); for (int i = 0; i < n; i++) { input[i] = n-i; } selection_sort(input, n); for (int i = 0; i < n; i++) { printf("%d\t", *(input + i)); } free(input); }
.file "selection_sort.c" .option pic .text .align 1 .globl selection_sort .type selection_sort, @function selection_sort: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 sw a5,-44(s0) sw zero,-24(s0) j .L2 .L7: lw a5,-24(s0) sw a5,-28(s0) lw a5,-24(s0) addiw a5,a5,1 sw a5,-20(s0) j .L3 .L5: lw a5,-20(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a3,0(a5) lw a5,-28(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a5,0(a5) mv a4,a3 bge a4,a5,.L4 lw a5,-20(s0) sw a5,-28(s0) .L4: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L3: lw a5,-20(s0) mv a4,a5 lw a5,-44(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L5 lw a5,-28(s0) mv a4,a5 lw a5,-24(s0) sext.w a4,a4 sext.w a5,a5 beq a4,a5,.L6 lw a5,-24(s0) slli a5,a5,2 ld a4,-40(s0) add a3,a4,a5 lw a5,-28(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 mv a1,a5 mv a0,a3 call swap .L6: lw a5,-24(s0) addiw a5,a5,1 sw a5,-24(s0) .L2: lw a5,-44(s0) addiw a5,a5,-1 sext.w a4,a5 lw a5,-24(s0) sext.w a5,a5 blt a5,a4,.L7 nop nop ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size selection_sort, .-selection_sort .align 1 .globl swap .type swap, @function swap: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd a0,-40(s0) sd a1,-48(s0) ld a5,-48(s0) lw a5,0(a5) sw a5,-20(s0) ld a5,-40(s0) lw a4,0(a5) ld a5,-48(s0) sw a4,0(a5) ld a5,-40(s0) lw a4,-20(s0) sw a4,0(a5) nop ld s0,40(sp) addi sp,sp,48 jr ra .size swap, .-swap .section .rodata .align 3 .LC0: .string "How many numbers? %d\n" .align 3 .LC1: .string "Enter %d numbers: " .align 3 .LC2: .string "%d\t" .text .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 li a5,4096 addi a5,a5,904 sw a5,-28(s0) lw a5,-28(s0) mv a1,a5 lla a0,.LC0 call printf@plt lw a5,-28(s0) slli a5,a5,2 mv a0,a5 call malloc@plt mv a5,a0 sd a5,-24(s0) lw a5,-28(s0) mv a1,a5 lla a0,.LC1 call printf@plt sw zero,-36(s0) j .L10 .L11: lw a5,-36(s0) slli a5,a5,2 ld a4,-24(s0) add a5,a4,a5 lw a4,-28(s0) mv a3,a4 lw a4,-36(s0) subw a4,a3,a4 sext.w a4,a4 sw a4,0(a5) lw a5,-36(s0) addiw a5,a5,1 sw a5,-36(s0) .L10: lw a5,-36(s0) mv a4,a5 lw a5,-28(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L11 lw a5,-28(s0) mv a1,a5 ld a0,-24(s0) call selection_sort sw zero,-32(s0) j .L12 .L13: lw a5,-32(s0) slli a5,a5,2 ld a4,-24(s0) add a5,a4,a5 lw a5,0(a5) mv a1,a5 lla a0,.LC2 call printf@plt lw a5,-32(s0) addiw a5,a5,1 sw a5,-32(s0) .L12: lw a5,-32(s0) mv a4,a5 lw a5,-28(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L13 ld a0,-24(s0) call free@plt li a5,0 mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "selection_sort.c" .option pic .text .align 1 .globl selection_sort .type selection_sort, @function selection_sort: li a5,1 ble a1,a5,.L1 addi t1,a0,4 addiw t4,a1,-1 li a7,0 j .L6 .L4: addiw a4,a4,1 addi a3,a3,4 beq a1,a4,.L9 .L5: slli a5,a2,2 add a5,a0,a5 lw a6,0(a3) lw a5,0(a5) bge a6,a5,.L4 mv a2,a4 j .L4 .L9: beq a2,t3,.L3 slli a2,a2,2 add a2,a0,a2 lw a5,0(a2) lw a4,-4(t1) sw a4,0(a2) sw a5,-4(t1) .L3: addi t1,t1,4 beq a7,t4,.L1 .L6: mv t3,a7 addiw a7,a7,1 ble a1,a7,.L3 mv a3,t1 mv a4,a7 mv a2,t3 j .L5 .L1: ret .size selection_sort, .-selection_sort .align 1 .globl swap .type swap, @function swap: lw a5,0(a1) lw a4,0(a0) sw a4,0(a1) sw a5,0(a0) ret .size swap, .-swap .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "How many numbers? %d\n" .align 3 .LC1: .string "Enter %d numbers: " .align 3 .LC2: .string "%d\t" .text .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) li s0,4096 addi a2,s0,904 lla a1,.LC0 li a0,1 call __printf_chk@plt li a0,20480 addi a0,a0,-480 call malloc@plt mv s3,a0 addi a2,s0,904 lla a1,.LC1 li a0,1 call __printf_chk@plt mv s1,s3 mv a4,s3 addi a5,s0,904 .L12: sw a5,0(a4) addiw a5,a5,-1 addi a4,a4,4 bne a5,zero,.L12 li a1,4096 addi a1,a1,904 mv a0,s3 call selection_sort li s0,20480 addi s0,s0,-480 add s0,s3,s0 lla s2,.LC2 .L13: lw a2,0(s1) mv a1,s2 li a0,1 call __printf_chk@plt addi s1,s1,4 bne s1,s0,.L13 mv a0,s3 call free@plt li a0,0 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "selection_sort.c" .option pic .text .align 1 .globl selection_sort .type selection_sort, @function selection_sort: addiw t4,a1,-1 ble t4,zero,.L1 addi t1,a0,4 li a7,0 .L6: mv t3,a7 addiw a7,a7,1 ble a1,a7,.L3 mv a3,t1 mv a4,a7 mv a2,t3 .L5: slli a5,a2,2 add a5,a0,a5 lw a6,0(a3) lw a5,0(a5) addi a3,a3,4 bge a6,a5,.L4 mv a2,a4 .L4: addiw a4,a4,1 bne a1,a4,.L5 beq a2,t3,.L3 slli a2,a2,2 lw a4,-4(t1) add a2,a0,a2 lw a5,0(a2) sw a4,0(a2) sw a5,-4(t1) .L3: addi t1,t1,4 bne a7,t4,.L6 .L1: ret .size selection_sort, .-selection_sort .align 1 .globl swap .type swap, @function swap: lw a4,0(a0) lw a5,0(a1) sw a4,0(a1) sw a5,0(a0) ret .size swap, .-swap .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "How many numbers? %d\n" .align 3 .LC1: .string "Enter %d numbers: " .align 3 .LC2: .string "%d\t" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd s0,32(sp) li s0,4096 addi a2,s0,904 lla a1,.LC0 li a0,1 sd ra,40(sp) sd s1,24(sp) sd s3,8(sp) sd s2,16(sp) call __printf_chk@plt li a0,20480 addi a0,a0,-480 call malloc@plt mv s3,a0 addi a2,s0,904 lla a1,.LC1 li a0,1 call __printf_chk@plt mv s1,s3 mv a4,s3 addi a5,s0,904 .L12: sw a5,0(a4) addiw a5,a5,-1 addi a4,a4,4 bne a5,zero,.L12 li a1,4096 li s0,20480 addi a1,a1,904 mv a0,s3 addi s0,s0,-480 call selection_sort add s0,s3,s0 lla s2,.LC2 .L13: lw a2,0(s1) mv a1,s2 addi s1,s1,4 li a0,1 call __printf_chk@plt bne s0,s1,.L13 mv a0,s3 call free@plt ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) li a0,0 addi sp,sp,48 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "selection_sort.c" .option pic .text .align 1 .globl selection_sort .type selection_sort, @function selection_sort: addiw t0,a1,-1 addi t4,a0,4 li t3,0 ble t0,zero,.L1 .L6: mv t5,t3 addiw t3,t3,1 ble a1,t3,.L3 lw t6,-4(t4) mv a5,t4 mv a4,t3 mv a6,t6 mv a2,t5 j .L5 .L14: addiw a4,a4,1 add a7,a0,t1 addi a5,a5,4 beq a4,a1,.L13 .L5: lw a3,0(a5) slli t1,a2,2 mv a7,a5 bge a3,a6,.L14 mv a2,a4 addiw a4,a4,1 mv a6,a3 addi a5,a5,4 bne a4,a1,.L5 .L13: beq a2,t5,.L3 sw t6,0(a7) sw a6,-4(t4) .L3: addi t4,t4,4 bne t3,t0,.L6 .L1: ret .size selection_sort, .-selection_sort .align 1 .globl swap .type swap, @function swap: lw a4,0(a0) lw a5,0(a1) sw a4,0(a1) sw a5,0(a0) ret .size swap, .-swap .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "How many numbers? %d\n" .align 3 .LC1: .string "Enter %d numbers: " .align 3 .LC2: .string "%d\t" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd s0,32(sp) li s0,4096 addi a2,s0,904 lla a1,.LC0 li a0,1 sd ra,40(sp) sd s1,24(sp) sd s3,8(sp) sd s2,16(sp) call __printf_chk@plt li a0,20480 addi a0,a0,-480 call malloc@plt mv s3,a0 addi a2,s0,904 lla a1,.LC1 li a0,1 call __printf_chk@plt mv s1,s3 mv a4,s3 addi a5,s0,904 .L17: sw a5,0(a4) addiw a5,a5,-1 addi a4,a4,4 bne a5,zero,.L17 li a1,4096 li s0,20480 addi a1,a1,904 mv a0,s3 addi s0,s0,-480 call selection_sort add s0,s3,s0 lla s2,.LC2 .L18: lw a2,0(s1) mv a1,s2 addi s1,s1,4 li a0,1 call __printf_chk@plt bne s0,s1,.L18 mv a0,s3 call free@plt ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) li a0,0 addi sp,sp,48 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "selection_sort.c" .text .align 2 .global selection_sort .type selection_sort, %function selection_sort: .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 wzr, [sp, 40] b .L2 .L7: ldr w0, [sp, 40] str w0, [sp, 36] ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 44] b .L3 .L5: ldrsw x0, [sp, 44] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 ldr w1, [x0] ldrsw x0, [sp, 36] lsl x0, x0, 2 ldr x2, [sp, 24] add x0, x2, x0 ldr w0, [x0] cmp w1, w0 bge .L4 ldr w0, [sp, 44] str w0, [sp, 36] .L4: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L3: ldr w1, [sp, 44] ldr w0, [sp, 20] cmp w1, w0 blt .L5 ldr w1, [sp, 36] ldr w0, [sp, 40] cmp w1, w0 beq .L6 ldrsw x0, [sp, 40] lsl x0, x0, 2 ldr x1, [sp, 24] add x2, x1, x0 ldrsw x0, [sp, 36] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 mov x1, x0 mov x0, x2 bl swap .L6: ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L2: ldr w0, [sp, 20] sub w0, w0, #1 ldr w1, [sp, 40] cmp w1, w0 blt .L7 nop nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size selection_sort, .-selection_sort .align 2 .global swap .type swap, %function swap: .LFB7: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str x1, [sp] ldr x0, [sp] ldr w0, [x0] str w0, [sp, 28] ldr x0, [sp, 8] ldr w1, [x0] ldr x0, [sp] str w1, [x0] ldr x0, [sp, 8] ldr w1, [sp, 28] str w1, [x0] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size swap, .-swap .section .rodata .align 3 .LC0: .string "How many numbers? %d\n" .align 3 .LC1: .string "Enter %d numbers: " .align 3 .LC2: .string "%d\t" .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 mov w0, 5000 str w0, [sp, 36] ldr w1, [sp, 36] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf ldrsw x0, [sp, 36] lsl x0, x0, 2 bl malloc str x0, [sp, 40] ldr w1, [sp, 36] adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf str wzr, [sp, 28] b .L10 .L11: ldrsw x0, [sp, 28] lsl x0, x0, 2 ldr x1, [sp, 40] add x0, x1, x0 ldr w2, [sp, 36] ldr w1, [sp, 28] sub w1, w2, w1 str w1, [x0] ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L10: ldr w1, [sp, 28] ldr w0, [sp, 36] cmp w1, w0 blt .L11 ldr w1, [sp, 36] ldr x0, [sp, 40] bl selection_sort str wzr, [sp, 32] b .L12 .L13: ldrsw x0, [sp, 32] lsl x0, x0, 2 ldr x1, [sp, 40] add x0, x1, x0 ldr w0, [x0] mov w1, w0 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L12: ldr w1, [sp, 32] ldr w0, [sp, 36] cmp w1, w0 blt .L13 ldr x0, [sp, 40] bl free mov w0, 0 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "selection_sort.c" .text .align 2 .global selection_sort .type selection_sort, %function selection_sort: .LFB39: .cfi_startproc sub w8, w1, #1 cmp w8, 0 ble .L1 mov x7, 1 mov x6, 0 b .L6 .L3: add x6, x6, 1 add x7, x7, 1 cmp w8, w6 ble .L1 .L6: mov w3, w6 cmp w1, w7 ble .L3 mov x2, x7 .L5: ldr w5, [x0, x2, lsl 2] ldr w4, [x0, w3, sxtw 2] cmp w5, w4 csel w3, w3, w2, ge add x2, x2, 1 cmp w1, w2 bgt .L5 cmp w3, w6 beq .L3 sxtw x3, w3 ldr w2, [x0, x3, lsl 2] ldr w4, [x0, x6, lsl 2] str w4, [x0, x3, lsl 2] str w2, [x0, x6, lsl 2] b .L3 .L1: ret .cfi_endproc .LFE39: .size selection_sort, .-selection_sort .align 2 .global swap .type swap, %function swap: .LFB40: .cfi_startproc ldr w2, [x1] ldr w3, [x0] str w3, [x1] str w2, [x0] ret .cfi_endproc .LFE40: .size swap, .-swap .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "How many numbers? %d\n" .align 3 .LC1: .string "Enter %d numbers: " .align 3 .LC2: .string "%d\t" .text .align 2 .global main .type main, %function main: .LFB41: .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] stp x21, x22, [sp, 32] str x23, [sp, 48] .cfi_offset 19, -48 .cfi_offset 20, -40 .cfi_offset 21, -32 .cfi_offset 22, -24 .cfi_offset 23, -16 mov w2, 5000 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk mov x0, 20000 bl malloc mov x20, x0 mov w2, 5000 adrp x1, .LC1 add x1, x1, :lo12:.LC1 mov w0, 1 bl __printf_chk mov x1, 0 mov w3, 5000 mov x0, 5000 .L11: sub w2, w3, w1 str w2, [x20, x1, lsl 2] add x1, x1, 1 cmp x1, x0 bne .L11 mov w1, 5000 mov x0, x20 bl selection_sort mov x19, x20 add x23, x20, 16384 add x23, x23, 3616 adrp x21, .LC2 add x21, x21, :lo12:.LC2 mov w22, 1 .L12: ldr w2, [x19], 4 mov x1, x21 mov w0, w22 bl __printf_chk cmp x19, x23 bne .L12 mov x0, x20 bl free mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "selection_sort.c" .text .align 2 .p2align 4,,11 .global selection_sort .type selection_sort, %function selection_sort: .LFB39: .cfi_startproc sub w8, w1, #1 cmp w8, 0 ble .L1 mov x7, 1 mov x6, 0 .p2align 3,,7 .L6: mov w3, w6 cmp w1, w7 ble .L3 mov x2, x7 .p2align 3,,7 .L5: ldr w5, [x0, x2, lsl 2] ldr w4, [x0, w3, sxtw 2] cmp w5, w4 csel w3, w3, w2, ge add x2, x2, 1 cmp w1, w2 bgt .L5 cmp w3, w6 beq .L3 sxtw x3, w3 ldr w4, [x0, x6, lsl 2] ldr w2, [x0, x3, lsl 2] str w4, [x0, x3, lsl 2] str w2, [x0, x6, lsl 2] .L3: add x6, x6, 1 add x7, x7, 1 cmp w8, w6 bgt .L6 .L1: ret .cfi_endproc .LFE39: .size selection_sort, .-selection_sort .align 2 .p2align 4,,11 .global swap .type swap, %function swap: .LFB40: .cfi_startproc ldr w3, [x0] ldr w2, [x1] str w3, [x1] str w2, [x0] ret .cfi_endproc .LFE40: .size swap, .-swap .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "How many numbers? %d\n" .align 3 .LC1: .string "Enter %d numbers: " .align 3 .LC2: .string "%d\t" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB41: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov x29, sp mov w2, 5000 mov w0, 1 stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 bl __printf_chk mov x0, 20000 bl malloc mov x20, x0 adrp x1, .LC1 mov w2, 5000 add x1, x1, :lo12:.LC1 mov w0, 1 bl __printf_chk mov x1, 0 mov w3, 5000 mov x0, 5000 .p2align 3,,7 .L12: sub w2, w3, w1 str w2, [x20, x1, lsl 2] add x1, x1, 1 cmp x1, x0 bne .L12 mov x0, x20 adrp x21, .LC2 bl selection_sort mov x19, x20 mov x0, 20000 add x21, x21, :lo12:.LC2 add x22, x20, x0 .p2align 3,,7 .L13: ldr w2, [x19], 4 mov x1, x21 mov w0, 1 bl __printf_chk cmp x22, x19 bne .L13 mov x0, x20 bl free mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "selection_sort.c" .text .align 2 .p2align 4,,11 .global selection_sort .type selection_sort, %function selection_sort: .LFB39: .cfi_startproc sub w12, w1, #1 add x9, x0, 4 mov w8, 0 cmp w12, 0 ble .L1 .p2align 3,,7 .L6: mov w10, w8 add w8, w8, 1 cmp w1, w8 ble .L3 ldr w11, [x9, -4] mov x2, x9 mov w3, w8 mov w7, w10 mov w5, w11 b .L5 .p2align 2,,3 .L14: add w3, w3, 1 add x6, x0, w7, sxtw 2 add x2, x2, 4 cmp w3, w1 beq .L13 .L5: ldr w4, [x2] mov x6, x2 cmp w4, w5 bge .L14 mov w7, w3 add w3, w3, 1 mov w5, w4 add x2, x2, 4 cmp w3, w1 bne .L5 .L13: cmp w7, w10 beq .L3 str w11, [x6] str w5, [x9, -4] .L3: add x9, x9, 4 cmp w8, w12 bne .L6 .L1: ret .cfi_endproc .LFE39: .size selection_sort, .-selection_sort .align 2 .p2align 4,,11 .global swap .type swap, %function swap: .LFB40: .cfi_startproc ldr w3, [x0] ldr w2, [x1] str w3, [x1] str w2, [x0] ret .cfi_endproc .LFE40: .size swap, .-swap .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "How many numbers? %d\n" .align 3 .LC1: .string "Enter %d numbers: " .align 3 .LC2: .string "%d\t" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB41: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov x29, sp mov w2, 5000 mov w0, 1 stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 bl __printf_chk mov x0, 20000 bl malloc mov x22, x0 adrp x1, .LC1 mov w2, 5000 add x1, x1, :lo12:.LC1 mov w0, 1 bl __printf_chk mov x19, x22 adrp x0, .LC3 mov x1, x22 movi v3.4s, 0x4 ldr q1, [x0, #:lo12:.LC3] mov x0, 20000 add x20, x22, x0 adrp x0, .LC4 ldr q2, [x0, #:lo12:.LC4] .p2align 3,,7 .L17: mov v0.16b, v1.16b add v1.4s, v1.4s, v3.4s sub v0.4s, v2.4s, v0.4s str q0, [x1], 16 cmp x1, x20 bne .L17 adrp x21, .LC2 add x21, x21, :lo12:.LC2 mov x0, x22 mov w1, 5000 bl selection_sort .p2align 3,,7 .L18: ldr w2, [x19], 4 mov x1, x21 mov w0, 1 bl __printf_chk cmp x19, x20 bne .L18 mov x0, x22 bl free mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size main, .-main .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC3: .word 0 .word 1 .word 2 .word 3 .align 4 .LC4: .word 5000 .word 5000 .word 5000 .word 5000 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
ast-print.c
// RUN: %clang_cc1 %s -ast-print | FileCheck %s // RUN: %clang_cc1 %s -ast-print | %clang_cc1 -fsyntax-only - typedef void func_typedef(); func_typedef xxx; typedef void func_t(int x); func_t a; struct blah { struct { struct { int b; }; }; }; int foo(const struct blah *b) { // CHECK: return b->b; return b->b; } int arr(int a[static 3]) { // CHECK: int a[static 3] return a[2]; } int rarr(int a[restrict static 3]) { // CHECK: int a[restrict static 3] return a[2]; } int varr(int n, int a[static n]) { // CHECK: int a[static n] return a[2]; } int rvarr(int n, int a[restrict static n]) { // CHECK: int a[restrict static n] return a[2]; } // CHECK: typedef struct { typedef struct { int f; } T __attribute__ ((__aligned__)); // CHECK: struct __attribute__((visibility("default"))) S; struct __attribute__((visibility("default"))) S; struct pair_t { int a; int b; }; // CHECK: struct pair_t p = {a: 3, .b = 4}; struct pair_t p = {a: 3, .b = 4}; void initializers() { // CHECK: int *x = ((void *)0), *y = ((void *)0); int *x = ((void *)0), *y = ((void *)0); struct Z{}; struct { struct Z z; // CHECK: } z = {(struct Z){}}; } z = {(struct Z){}}; } // CHECK-LABEL: enum EnumWithAttributes { enum EnumWithAttributes { // CHECK-NEXT: EnumWithAttributesFoo __attribute__((deprecated(""))), EnumWithAttributesFoo __attribute__((deprecated)), // CHECK-NEXT: EnumWithAttributesBar __attribute__((unavailable(""))) = 50 EnumWithAttributesBar __attribute__((unavailable)) = 50 // CHECK-NEXT: } __attribute__((deprecated(""))) } __attribute__((deprecated));
.file "ast-print.c" .option pic .text .align 1 .globl foo .type foo, @function foo: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-24(s0) ld a5,-24(s0) lw a5,0(a5) mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size foo, .-foo .align 1 .globl arr .type arr, @function arr: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-24(s0) ld a5,-24(s0) lw a5,8(a5) mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size arr, .-arr .align 1 .globl rarr .type rarr, @function rarr: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-24(s0) ld a5,-24(s0) lw a5,8(a5) mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size rarr, .-rarr .align 1 .globl varr .type varr, @function varr: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 mv a5,a0 sd a1,-32(s0) sw a5,-20(s0) ld a5,-32(s0) lw a5,8(a5) mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size varr, .-varr .align 1 .globl rvarr .type rvarr, @function rvarr: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 mv a5,a0 sd a1,-32(s0) sw a5,-20(s0) ld a5,-32(s0) lw a5,8(a5) mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size rvarr, .-rvarr .globl p .data .align 3 .type p, @object .size p, 8 p: .word 3 .word 4 .text .align 1 .globl initializers .type initializers, @function initializers: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd zero,-32(s0) sd zero,-24(s0) nop ld s0,40(sp) addi sp,sp,48 jr ra .size initializers, .-initializers .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "ast-print.c" .option pic .text .align 1 .globl foo .type foo, @function foo: lw a0,0(a0) ret .size foo, .-foo .align 1 .globl arr .type arr, @function arr: lw a0,8(a0) ret .size arr, .-arr .align 1 .globl rarr .type rarr, @function rarr: lw a0,8(a0) ret .size rarr, .-rarr .align 1 .globl varr .type varr, @function varr: lw a0,8(a1) ret .size varr, .-varr .align 1 .globl rvarr .type rvarr, @function rvarr: lw a0,8(a1) ret .size rvarr, .-rvarr .align 1 .globl initializers .type initializers, @function initializers: ret .size initializers, .-initializers .globl p .data .align 3 .type p, @object .size p, 8 p: .word 3 .word 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "ast-print.c" .option pic .text .align 1 .globl foo .type foo, @function foo: lw a0,0(a0) ret .size foo, .-foo .align 1 .globl arr .type arr, @function arr: lw a0,8(a0) ret .size arr, .-arr .align 1 .globl rarr .type rarr, @function rarr: lw a0,8(a0) ret .size rarr, .-rarr .align 1 .globl varr .type varr, @function varr: lw a0,8(a1) ret .size varr, .-varr .align 1 .globl rvarr .type rvarr, @function rvarr: lw a0,8(a1) ret .size rvarr, .-rvarr .align 1 .globl initializers .type initializers, @function initializers: ret .size initializers, .-initializers .globl p .data .align 3 .type p, @object .size p, 8 p: .word 3 .word 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "ast-print.c" .option pic .text .align 1 .globl foo .type foo, @function foo: lw a0,0(a0) ret .size foo, .-foo .align 1 .globl arr .type arr, @function arr: lw a0,8(a0) ret .size arr, .-arr .align 1 .globl rarr .type rarr, @function rarr: lw a0,8(a0) ret .size rarr, .-rarr .align 1 .globl varr .type varr, @function varr: lw a0,8(a1) ret .size varr, .-varr .align 1 .globl rvarr .type rvarr, @function rvarr: lw a0,8(a1) ret .size rvarr, .-rvarr .align 1 .globl initializers .type initializers, @function initializers: ret .size initializers, .-initializers .globl p .data .align 3 .type p, @object .size p, 8 p: .word 3 .word 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ast-print.c" .text .align 2 .global foo .type foo, %function foo: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] ldr w0, [x0] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size foo, .-foo .align 2 .global arr .type arr, %function arr: .LFB1: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] ldr w0, [x0, 8] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size arr, .-arr .align 2 .global rarr .type rarr, %function rarr: .LFB2: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, 8] ldr x0, [sp, 8] ldr w0, [x0, 8] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size rarr, .-rarr .align 2 .global varr .type varr, %function varr: .LFB3: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] str x1, [sp] ldr x0, [sp] ldr w0, [x0, 8] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size varr, .-varr .align 2 .global rvarr .type rvarr, %function rvarr: .LFB4: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] str x1, [sp] ldr x0, [sp] ldr w0, [x0, 8] add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size rvarr, .-rvarr .global p .data .align 3 .type p, %object .size p, 8 p: .word 3 .word 4 .text .align 2 .global initializers .type initializers, %function initializers: .LFB5: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str xzr, [sp, 16] str xzr, [sp, 24] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE5: .size initializers, .-initializers .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ast-print.c" .text .align 2 .global foo .type foo, %function foo: .LFB0: .cfi_startproc ldr w0, [x0] ret .cfi_endproc .LFE0: .size foo, .-foo .align 2 .global arr .type arr, %function arr: .LFB1: .cfi_startproc ldr w0, [x0, 8] ret .cfi_endproc .LFE1: .size arr, .-arr .align 2 .global rarr .type rarr, %function rarr: .LFB2: .cfi_startproc ldr w0, [x0, 8] ret .cfi_endproc .LFE2: .size rarr, .-rarr .align 2 .global varr .type varr, %function varr: .LFB3: .cfi_startproc ldr w0, [x1, 8] ret .cfi_endproc .LFE3: .size varr, .-varr .align 2 .global rvarr .type rvarr, %function rvarr: .LFB4: .cfi_startproc ldr w0, [x1, 8] ret .cfi_endproc .LFE4: .size rvarr, .-rvarr .align 2 .global initializers .type initializers, %function initializers: .LFB5: .cfi_startproc ret .cfi_endproc .LFE5: .size initializers, .-initializers .global p .data .align 3 .type p, %object .size p, 8 p: .word 3 .word 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ast-print.c" .text .align 2 .p2align 4,,11 .global foo .type foo, %function foo: .LFB0: .cfi_startproc ldr w0, [x0] ret .cfi_endproc .LFE0: .size foo, .-foo .align 2 .p2align 4,,11 .global arr .type arr, %function arr: .LFB1: .cfi_startproc ldr w0, [x0, 8] ret .cfi_endproc .LFE1: .size arr, .-arr .align 2 .p2align 4,,11 .global rarr .type rarr, %function rarr: .LFB2: .cfi_startproc ldr w0, [x0, 8] ret .cfi_endproc .LFE2: .size rarr, .-rarr .align 2 .p2align 4,,11 .global varr .type varr, %function varr: .LFB3: .cfi_startproc ldr w0, [x1, 8] ret .cfi_endproc .LFE3: .size varr, .-varr .align 2 .p2align 4,,11 .global rvarr .type rvarr, %function rvarr: .LFB4: .cfi_startproc ldr w0, [x1, 8] ret .cfi_endproc .LFE4: .size rvarr, .-rvarr .align 2 .p2align 4,,11 .global initializers .type initializers, %function initializers: .LFB5: .cfi_startproc ret .cfi_endproc .LFE5: .size initializers, .-initializers .global p .data .align 3 .type p, %object .size p, 8 p: .word 3 .word 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ast-print.c" .text .align 2 .p2align 4,,11 .global foo .type foo, %function foo: .LFB0: .cfi_startproc ldr w0, [x0] ret .cfi_endproc .LFE0: .size foo, .-foo .align 2 .p2align 4,,11 .global arr .type arr, %function arr: .LFB1: .cfi_startproc ldr w0, [x0, 8] ret .cfi_endproc .LFE1: .size arr, .-arr .align 2 .p2align 4,,11 .global rarr .type rarr, %function rarr: .LFB2: .cfi_startproc ldr w0, [x0, 8] ret .cfi_endproc .LFE2: .size rarr, .-rarr .align 2 .p2align 4,,11 .global varr .type varr, %function varr: .LFB3: .cfi_startproc ldr w0, [x1, 8] ret .cfi_endproc .LFE3: .size varr, .-varr .align 2 .p2align 4,,11 .global rvarr .type rvarr, %function rvarr: .LFB4: .cfi_startproc ldr w0, [x1, 8] ret .cfi_endproc .LFE4: .size rvarr, .-rvarr .align 2 .p2align 4,,11 .global initializers .type initializers, %function initializers: .LFB5: .cfi_startproc ret .cfi_endproc .LFE5: .size initializers, .-initializers .global p .data .align 3 .type p, %object .size p, 8 p: .word 3 .word 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
gauss.c
#include <stdio.h> #include <stdlib.h> #define N 10 float *remontee(float A[N][N], float B[N], int n) { /******Implement the solution here******/ /***************************************/ float *x; x = malloc(sizeof(float) * n); x[n-1]=B[n-1]/A[n-1][n-1]; for(int i=n-2;i>=0;i--) { int s=0; for(int j=i+1;j<n;j++) { s=s+A[i][j]*x[j]; } x[i]=(B[i]-s)/A[i][i]; } /***************************************/ return x; } float *gauss(float A[N][N] ,float B[N], int n) { /******Implement the Gaussian elimination******/ /**********************************************/ float *x; for(int k=0;k<n-1;k++) { for(int i=k+1;i<n;i++) { float factor=A[i][k]/A[k][k]; for(int j=k;j<n;j++) { A[i][j]=A[i][j]-factor*A[k][j]; } B[i]=B[i]-factor*B[k]; } } /**********************************************/ /*Resolve the system using the back substitution method*/ /*You can use your solution of the exercice 1-b*/ x = remontee(A, B, n); return(x); } int main() { float A[N][N], B[N]; float *x; int n; printf("Enter the size of the matrix: "); scanf("%d", &n); /* Filling the matrix A */ printf("Filling the matrix A\n"); for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { printf("A[%d][%d] = ", i, j); scanf("%f", &A[i][j]); } } /* Filling the vector B*/ printf("Filling the matrix B\n"); for (int i = 0; i < n; i++) { printf("B[%d] = ", i); scanf("%f", &B[i]); } /* The calculation of the result */ x = gauss(A, B, n); /* the matrix after gauss*/ /* for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { printf("%f \t",A[i][j]); } printf("\n"); }*/ /* The calculation of the result */ x = gauss(A, B, n); /* Printing the results */ printf("\nThe resulting vector: ["); for (int i = 0; i < n; i++) printf("%f%c", x[i], ",]"[i == n - 1]); }
.file "gauss.c" .option pic .text .align 1 .globl remontee .type remontee, @function remontee: addi sp,sp,-80 sd ra,72(sp) sd s0,64(sp) addi s0,sp,80 sd a0,-56(s0) sd a1,-64(s0) mv a5,a2 sw a5,-68(s0) lw a5,-68(s0) slli a5,a5,2 mv a0,a5 call malloc@plt mv a5,a0 sd a5,-24(s0) lw a5,-68(s0) slli a5,a5,2 addi a5,a5,-4 ld a4,-64(s0) add a5,a4,a5 flw fa4,0(a5) lw a4,-68(s0) mv a5,a4 slli a5,a5,2 add a5,a5,a4 slli a5,a5,3 addi a5,a5,-40 ld a4,-56(s0) add a4,a4,a5 lw a5,-68(s0) addiw a5,a5,-1 sext.w a5,a5 slli a5,a5,2 add a5,a4,a5 flw fa5,0(a5) lw a5,-68(s0) slli a5,a5,2 addi a5,a5,-4 ld a4,-24(s0) add a5,a4,a5 fdiv.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-68(s0) addiw a5,a5,-2 sw a5,-36(s0) j .L2 .L5: sw zero,-32(s0) lw a5,-36(s0) addiw a5,a5,1 sw a5,-28(s0) j .L3 .L4: lw a5,-32(s0) fcvt.s.w fa4,a5 lw a4,-36(s0) mv a5,a4 slli a5,a5,2 add a5,a5,a4 slli a5,a5,3 mv a4,a5 ld a5,-56(s0) add a4,a5,a4 lw a5,-28(s0) slli a5,a5,2 add a5,a4,a5 flw fa3,0(a5) lw a5,-28(s0) slli a5,a5,2 ld a4,-24(s0) add a5,a4,a5 flw fa5,0(a5) fmul.s fa5,fa3,fa5 fadd.s fa5,fa4,fa5 fcvt.w.s a5,fa5,rtz sw a5,-32(s0) lw a5,-28(s0) addiw a5,a5,1 sw a5,-28(s0) .L3: lw a5,-28(s0) mv a4,a5 lw a5,-68(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L4 lw a5,-36(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 flw fa4,0(a5) lw a5,-32(s0) fcvt.s.w fa5,a5 fsub.s fa4,fa4,fa5 lw a4,-36(s0) mv a5,a4 slli a5,a5,2 add a5,a5,a4 slli a5,a5,3 mv a4,a5 ld a5,-56(s0) add a4,a5,a4 lw a5,-36(s0) slli a5,a5,2 add a5,a4,a5 flw fa5,0(a5) lw a5,-36(s0) slli a5,a5,2 ld a4,-24(s0) add a5,a4,a5 fdiv.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-36(s0) addiw a5,a5,-1 sw a5,-36(s0) .L2: lw a5,-36(s0) sext.w a5,a5 bge a5,zero,.L5 ld a5,-24(s0) mv a0,a5 ld ra,72(sp) ld s0,64(sp) addi sp,sp,80 jr ra .size remontee, .-remontee .align 1 .globl gauss .type gauss, @function gauss: addi sp,sp,-80 sd ra,72(sp) sd s0,64(sp) addi s0,sp,80 sd a0,-56(s0) sd a1,-64(s0) mv a5,a2 sw a5,-68(s0) sw zero,-40(s0) j .L8 .L13: lw a5,-40(s0) addiw a5,a5,1 sw a5,-36(s0) j .L9 .L12: lw a4,-36(s0) mv a5,a4 slli a5,a5,2 add a5,a5,a4 slli a5,a5,3 mv a4,a5 ld a5,-56(s0) add a4,a5,a4 lw a5,-40(s0) slli a5,a5,2 add a5,a4,a5 flw fa4,0(a5) lw a4,-40(s0) mv a5,a4 slli a5,a5,2 add a5,a5,a4 slli a5,a5,3 mv a4,a5 ld a5,-56(s0) add a4,a5,a4 lw a5,-40(s0) slli a5,a5,2 add a5,a4,a5 flw fa5,0(a5) fdiv.s fa5,fa4,fa5 fsw fa5,-28(s0) lw a5,-40(s0) sw a5,-32(s0) j .L10 .L11: lw a4,-36(s0) mv a5,a4 slli a5,a5,2 add a5,a5,a4 slli a5,a5,3 mv a4,a5 ld a5,-56(s0) add a4,a5,a4 lw a5,-32(s0) slli a5,a5,2 add a5,a4,a5 flw fa4,0(a5) lw a4,-40(s0) mv a5,a4 slli a5,a5,2 add a5,a5,a4 slli a5,a5,3 mv a4,a5 ld a5,-56(s0) add a4,a5,a4 lw a5,-32(s0) slli a5,a5,2 add a5,a4,a5 flw fa3,0(a5) flw fa5,-28(s0) fmul.s fa5,fa3,fa5 lw a4,-36(s0) mv a5,a4 slli a5,a5,2 add a5,a5,a4 slli a5,a5,3 mv a4,a5 ld a5,-56(s0) add a4,a5,a4 fsub.s fa5,fa4,fa5 lw a5,-32(s0) slli a5,a5,2 add a5,a4,a5 fsw fa5,0(a5) lw a5,-32(s0) addiw a5,a5,1 sw a5,-32(s0) .L10: lw a5,-32(s0) mv a4,a5 lw a5,-68(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L11 lw a5,-36(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 flw fa4,0(a5) lw a5,-40(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 flw fa3,0(a5) flw fa5,-28(s0) fmul.s fa5,fa3,fa5 lw a5,-36(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 fsub.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-36(s0) addiw a5,a5,1 sw a5,-36(s0) .L9: lw a5,-36(s0) mv a4,a5 lw a5,-68(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L12 lw a5,-40(s0) addiw a5,a5,1 sw a5,-40(s0) .L8: lw a5,-68(s0) addiw a5,a5,-1 sext.w a4,a5 lw a5,-40(s0) sext.w a5,a5 blt a5,a4,.L13 lw a5,-68(s0) mv a2,a5 ld a1,-64(s0) ld a0,-56(s0) call remontee sd a0,-24(s0) ld a5,-24(s0) mv a0,a5 ld ra,72(sp) ld s0,64(sp) addi sp,sp,80 jr ra .size gauss, .-gauss .section .rodata .align 3 .LC0: .string "Enter the size of the matrix: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Filling the matrix A" .align 3 .LC3: .string "A[%d][%d] = " .align 3 .LC4: .string "%f" .align 3 .LC5: .string "Filling the matrix B" .align 3 .LC6: .string "B[%d] = " .align 3 .LC7: .string "\nThe resulting vector: [" .align 3 .LC9: .string "%f%c" .align 3 .LC8: .string ",]" .text .align 1 .globl main .type main, @function main: addi sp,sp,-496 sd ra,488(sp) sd s0,480(sp) addi s0,sp,496 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 lla a0,.LC0 call printf@plt addi a5,s0,-492 mv a1,a5 lla a0,.LC1 call __isoc99_scanf@plt lla a0,.LC2 call puts@plt sw zero,-488(s0) j .L16 .L19: sw zero,-484(s0) j .L17 .L18: lw a4,-484(s0) lw a5,-488(s0) mv a2,a4 mv a1,a5 lla a0,.LC3 call printf@plt addi a3,s0,-424 lw a2,-484(s0) lw a4,-488(s0) mv a5,a4 slli a5,a5,2 add a5,a5,a4 slli a5,a5,1 add a5,a2,a5 slli a5,a5,2 add a5,a3,a5 mv a1,a5 lla a0,.LC4 call __isoc99_scanf@plt lw a5,-484(s0) addiw a5,a5,1 sw a5,-484(s0) .L17: lw a4,-492(s0) lw a5,-484(s0) sext.w a5,a5 blt a5,a4,.L18 lw a5,-488(s0) addiw a5,a5,1 sw a5,-488(s0) .L16: lw a4,-492(s0) lw a5,-488(s0) sext.w a5,a5 blt a5,a4,.L19 lla a0,.LC5 call puts@plt sw zero,-480(s0) j .L20 .L21: lw a5,-480(s0) mv a1,a5 lla a0,.LC6 call printf@plt addi a4,s0,-464 lw a5,-480(s0) slli a5,a5,2 add a5,a4,a5 mv a1,a5 lla a0,.LC4 call __isoc99_scanf@plt lw a5,-480(s0) addiw a5,a5,1 sw a5,-480(s0) .L20: lw a4,-492(s0) lw a5,-480(s0) sext.w a5,a5 blt a5,a4,.L21 lw a3,-492(s0) addi a4,s0,-464 addi a5,s0,-424 mv a2,a3 mv a1,a4 mv a0,a5 call gauss sd a0,-472(s0) lw a3,-492(s0) addi a4,s0,-464 addi a5,s0,-424 mv a2,a3 mv a1,a4 mv a0,a5 call gauss sd a0,-472(s0) lla a0,.LC7 call printf@plt sw zero,-476(s0) j .L22 .L23: lw a5,-476(s0) slli a5,a5,2 ld a4,-472(s0) add a5,a4,a5 flw fa5,0(a5) fcvt.d.s fa5,fa5 lw a5,-492(s0) addiw a5,a5,-1 sext.w a4,a5 lw a5,-476(s0) sext.w a5,a5 sub a5,a5,a4 seqz a5,a5 andi a5,a5,0xff sext.w a5,a5 lla a4,.LC8 add a5,a4,a5 lbu a5,0(a5) sext.w a5,a5 mv a2,a5 fmv.x.d a1,fa5 lla a0,.LC9 call printf@plt lw a5,-476(s0) addiw a5,a5,1 sw a5,-476(s0) .L22: lw a4,-492(s0) lw a5,-476(s0) sext.w a5,a5 blt a5,a4,.L23 li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L25 call __stack_chk_fail@plt .L25: mv a0,a4 ld ra,488(sp) ld s0,480(sp) addi sp,sp,496 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "gauss.c" .option pic .text .align 1 .globl remontee .type remontee, @function remontee: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) mv s2,a0 mv s1,a1 mv s0,a2 slli s3,a2,2 mv a0,s3 call malloc@plt addi a4,s3,-4 add a5,s3,s0 slli a5,a5,3 addiw a2,s0,-1 sext.w a1,a2 add a6,a0,a4 add a4,s1,a4 add a3,s2,a5 slli a1,a1,2 add a3,a3,a1 flw fa5,0(a4) flw fa4,-40(a3) fdiv.s fa5,fa5,fa4 fsw fa5,0(a6) addiw a7,s0,-2 blt a7,zero,.L1 sext.w a2,a2 li a1,44 mul a1,s0,a1 addi a1,a1,-88 add a1,s2,a1 addi a5,a5,-80 add t1,s2,a5 li t3,0 addiw t4,s0,-1 .L5: sext.w a3,a2 ble s0,a3,.L6 slli a3,a3,2 add a3,a0,a3 subw a6,t4,a2 slli a6,a6,32 srli a6,a6,32 add a6,a6,a7 slli a6,a6,2 addi a5,t1,4 add a6,a6,a5 mv a4,a1 mv a5,t3 .L4: flw fa5,4(a4) flw fa4,0(a3) fmul.s fa5,fa5,fa4 fcvt.s.w fa4,a5 fadd.s fa5,fa5,fa4 fcvt.w.s a5,fa5,rtz sext.w a5,a5 addi a4,a4,4 addi a3,a3,4 bne a4,a6,.L4 .L3: slli a4,a7,2 add a3,a0,a4 add a4,s1,a4 fcvt.s.w fa4,a5 flw fa5,0(a4) fsub.s fa5,fa5,fa4 flw fa4,0(a1) fdiv.s fa5,fa5,fa4 fsw fa5,0(a3) addi a7,a7,-1 addiw a2,a2,-1 addi a1,a1,-44 addi t1,t1,-40 bne a2,zero,.L5 .L1: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L6: mv a5,t3 j .L3 .size remontee, .-remontee .align 1 .globl gauss .type gauss, @function gauss: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) mv ra,a0 mv s0,a1 li a5,1 ble a2,a5,.L11 mv t1,a0 addi t4,a1,4 addiw a5,a2,-1 sext.w t2,a5 addi a1,a0,40 mv a0,t2 li t6,0 li t0,0 addi s1,s0,8 .L16: addiw t0,t0,1 ble a2,t0,.L12 addi a7,t1,40 slli a3,t2,32 srli a3,a3,32 add a3,a3,t6 slli a3,a3,2 addi a5,a1,4 add a3,a3,a5 addiw t3,t2,-1 slli t3,t3,32 srli t3,t3,32 add t3,t3,t6 slli t3,t3,2 add t3,t3,s1 mv a6,t4 sext.w t5,t6 .L15: flw fa5,0(a7) flw fa4,0(t1) fdiv.s fa3,fa5,fa4 ble a2,t5,.L13 mv a4,t1 mv a5,a7 .L14: flw fa5,0(a4) fmul.s fa5,fa3,fa5 flw fa4,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) addi a5,a5,4 addi a4,a4,4 bne a5,a3,.L14 .L13: flw fa5,-4(t4) fmul.s fa5,fa3,fa5 flw fa4,0(a6) fsub.s fa4,fa4,fa5 fsw fa4,0(a6) addi a7,a7,40 addi a6,a6,4 addi a3,a3,40 bne a6,t3,.L15 .L12: addi t6,t6,1 addi t1,t1,44 addi t4,t4,4 addiw t2,t2,-1 addi a1,a1,40 bne t0,a0,.L16 .L11: mv a1,s0 mv a0,ra call remontee ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size gauss, .-gauss .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Enter the size of the matrix: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Filling the matrix A" .align 3 .LC3: .string "A[%d][%d] = " .align 3 .LC4: .string "%f" .align 3 .LC5: .string "Filling the matrix B" .align 3 .LC6: .string "B[%d] = " .align 3 .LC7: .string "\nThe resulting vector: [" .align 3 .LC9: .string "%f%c" .align 3 .LC8: .string ",]" .text .align 1 .globl main .type main, @function main: addi sp,sp,-528 sd ra,520(sp) sd s0,512(sp) sd s1,504(sp) sd s2,496(sp) sd s3,488(sp) sd s4,480(sp) sd s5,472(sp) sd s6,464(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 456(sp) li a4, 0 lla a1,.LC0 li a0,1 call __printf_chk@plt addi a1,sp,12 lla a0,.LC1 call __isoc99_scanf@plt lla a0,.LC2 call puts@plt lw a5,12(sp) ble a5,zero,.L22 addi s5,sp,56 li s2,0 li s6,0 lla s4,.LC3 lla s3,.LC4 j .L23 .L24: mv a3,s0 mv a2,s2 mv a1,s4 li a0,1 call __printf_chk@plt mv a1,s1 mv a0,s3 call __isoc99_scanf@plt addiw s0,s0,1 addi s1,s1,4 lw a5,12(sp) bgt a5,s0,.L24 .L25: addiw s2,s2,1 addi s5,s5,40 lw a5,12(sp) ble a5,s2,.L22 .L23: lw a5,12(sp) mv s1,s5 mv s0,s6 bgt a5,zero,.L24 j .L25 .L22: lla a0,.LC5 call puts@plt lw a2,12(sp) ble a2,zero,.L26 addi s1,sp,16 li s0,0 lla s3,.LC6 lla s2,.LC4 .L27: mv a2,s0 mv a1,s3 li a0,1 call __printf_chk@plt mv a1,s1 mv a0,s2 call __isoc99_scanf@plt addiw s0,s0,1 lw a2,12(sp) addi s1,s1,4 bgt a2,s0,.L27 .L26: addi s1,sp,16 mv a1,s1 addi s0,sp,56 mv a0,s0 call gauss lw a2,12(sp) mv a1,s1 mv a0,s0 call gauss mv s1,a0 lla a1,.LC7 li a0,1 call __printf_chk@plt lw a5,12(sp) ble a5,zero,.L28 li s0,0 lla s3,.LC8 lla s2,.LC9 .L29: addiw a5,a5,-1 sub a5,a5,s0 seqz a5,a5 add a5,s3,a5 flw fa5,0(s1) lbu a3,0(a5) fcvt.d.s fa5,fa5 fmv.x.d a2,fa5 mv a1,s2 li a0,1 call __printf_chk@plt addiw s0,s0,1 lw a5,12(sp) addi s1,s1,4 bgt a5,s0,.L29 .L28: la a5,__stack_chk_guard ld a4, 456(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L37 li a0,0 ld ra,520(sp) ld s0,512(sp) ld s1,504(sp) ld s2,496(sp) ld s3,488(sp) ld s4,480(sp) ld s5,472(sp) ld s6,464(sp) addi sp,sp,528 jr ra .L37: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "gauss.c" .option pic .text .align 1 .globl remontee .type remontee, @function remontee: addi sp,sp,-48 sd s3,8(sp) slli s3,a2,2 sd s0,32(sp) mv s0,a0 mv a0,s3 sd s1,24(sp) sd s2,16(sp) mv s1,a2 mv s2,a1 sd ra,40(sp) call malloc@plt add a5,s3,s1 addiw a7,s1,-1 slli a5,a5,3 addi s3,s3,-4 add a4,s0,a5 slli a1,a7,2 add a3,s2,s3 add a4,a4,a1 flw fa5,0(a3) flw fa4,-40(a4) add s3,a0,s3 addiw t3,s1,-2 fdiv.s fa5,fa5,fa4 fsw fa5,0(s3) blt t3,zero,.L1 li a4,44 mul a4,s1,a4 addi a5,a5,-80 add t4,s0,a5 mv a2,a7 addi a5,a4,-88 add t1,s0,a5 .L5: sext.w a3,a7 ble s1,a7,.L7 subw a6,a2,a7 slli a6,a6,32 srli a6,a6,32 add a6,a6,t3 addi a5,t4,4 slli a3,a3,2 slli a6,a6,2 add a6,a6,a5 add a3,a0,a3 mv a4,t1 li a5,0 .L4: fcvt.s.w fa4,a5 flw fa5,4(a4) flw fa3,0(a3) addi a4,a4,4 addi a3,a3,4 fmadd.s fa5,fa5,fa3,fa4 fcvt.w.s a5,fa5,rtz sext.w a5,a5 bne a6,a4,.L4 fcvt.s.w fa3,a5 .L3: slli a5,t3,2 add a4,s2,a5 flw fa5,0(a4) flw fa4,0(t1) add a5,a0,a5 fsub.s fa5,fa5,fa3 addiw a7,a7,-1 addi t3,t3,-1 addi t1,t1,-44 addi t4,t4,-40 fdiv.s fa5,fa5,fa4 fsw fa5,0(a5) bne a7,zero,.L5 .L1: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L7: fmv.w.x fa3,zero j .L3 .size remontee, .-remontee .align 1 .globl gauss .type gauss, @function gauss: addi sp,sp,-32 sd s1,16(sp) sd s2,8(sp) mv s1,a0 sd s0,24(sp) addiw a0,a2,-1 mv s2,a1 ble a0,zero,.L16 mv t1,s1 mv a5,a0 addi t4,a1,4 addi t2,s1,40 li t6,0 li t0,0 addi s0,a1,8 .L15: addiw t0,t0,1 addiw a1,a5,-1 ble a2,t0,.L20 slli a3,a5,32 slli t3,a1,32 srli a3,a3,32 srli t3,t3,32 add a3,a3,t6 add t3,t3,t6 slli a3,a3,2 slli t3,t3,2 addi a7,t1,40 add a3,a3,t2 add t3,t3,s0 mv a6,t4 sext.w t5,t6 .L19: flw fa4,0(a7) flw fa5,0(t1) fdiv.s fa3,fa4,fa5 ble a2,t5,.L17 mv a4,t1 mv a5,a7 j .L18 .L24: flw fa5,0(a4) flw fa4,4(a5) addi a5,a5,4 .L18: fnmsub.s fa5,fa3,fa5,fa4 addi a4,a4,4 fsw fa5,0(a5) bne a5,a3,.L24 .L17: flw fa4,0(a6) flw fa5,-4(t4) addi a6,a6,4 addi a7,a7,40 fnmsub.s fa5,fa5,fa3,fa4 addi a3,a3,40 fsw fa5,-4(a6) bne a6,t3,.L19 .L20: addi t6,t6,1 addi t1,t1,44 sext.w a5,a1 addi t4,t4,4 addi t2,t2,40 bne t0,a0,.L15 .L16: ld s0,24(sp) mv a1,s2 mv a0,s1 ld s2,8(sp) ld s1,16(sp) addi sp,sp,32 tail remontee .size gauss, .-gauss .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Enter the size of the matrix: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Filling the matrix A" .align 3 .LC3: .string "A[%d][%d] = " .align 3 .LC4: .string "%f" .align 3 .LC5: .string "Filling the matrix B" .align 3 .LC6: .string "B[%d] = " .align 3 .LC7: .string "\nThe resulting vector: [" .align 3 .LC9: .string "%f%c" .align 3 .LC8: .string ",]" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-544 sd s5,488(sp) la s5,__stack_chk_guard ld a5, 0(s5) sd a5, 456(sp) li a5, 0 lla a1,.LC0 li a0,1 sd ra,536(sp) sd s7,472(sp) sd s0,528(sp) sd s1,520(sp) sd s2,512(sp) sd s3,504(sp) sd s4,496(sp) sd s6,480(sp) call __printf_chk@plt addi a1,sp,12 lla a0,.LC1 call __isoc99_scanf@plt lla a0,.LC2 call puts@plt lw a5,12(sp) addi s7,sp,56 ble a5,zero,.L26 mv s6,s7 li s2,0 lla s4,.LC3 lla s3,.LC4 .L28: mv s1,s6 li s0,0 .L27: mv a3,s0 mv a2,s2 mv a1,s4 li a0,1 call __printf_chk@plt mv a1,s1 mv a0,s3 call __isoc99_scanf@plt lw a5,12(sp) addiw s0,s0,1 addi s1,s1,4 bgt a5,s0,.L27 addiw s2,s2,1 addi s6,s6,40 ble a5,s2,.L26 bgt a5,zero,.L28 .L26: lla a0,.LC5 call puts@plt lw s2,12(sp) addi s6,sp,16 ble s2,zero,.L29 mv s1,s6 li s0,0 lla s4,.LC6 lla s3,.LC4 .L30: mv a2,s0 mv a1,s4 li a0,1 call __printf_chk@plt mv a1,s1 mv a0,s3 call __isoc99_scanf@plt lw s2,12(sp) addiw s0,s0,1 addi s1,s1,4 bgt s2,s0,.L30 .L29: mv a2,s2 mv a1,s6 mv a0,s7 call gauss mv a2,s2 mv a1,s6 mv a0,s7 call gauss mv s1,a0 lla a1,.LC7 li a0,1 call __printf_chk@plt lw a5,12(sp) li s0,0 lla s3,.LC8 lla s2,.LC9 ble a5,zero,.L33 .L32: flw fa5,0(s1) addiw a5,a5,-1 sub a5,a5,s0 fcvt.d.s fa5,fa5 seqz a5,a5 add a5,s3,a5 lbu a3,0(a5) fmv.x.d a2,fa5 mv a1,s2 li a0,1 call __printf_chk@plt lw a5,12(sp) addiw s0,s0,1 addi s1,s1,4 bgt a5,s0,.L32 .L33: ld a4, 456(sp) ld a5, 0(s5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L46 ld ra,536(sp) ld s0,528(sp) ld s1,520(sp) ld s2,512(sp) ld s3,504(sp) ld s4,496(sp) ld s5,488(sp) ld s6,480(sp) ld s7,472(sp) li a0,0 addi sp,sp,544 jr ra .L46: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "gauss.c" .option pic .text .align 1 .globl remontee .type remontee, @function remontee: addi sp,sp,-48 sd s3,8(sp) slli s3,a2,2 sd s0,32(sp) mv s0,a0 mv a0,s3 sd s1,24(sp) sd s2,16(sp) mv s1,a2 mv s2,a1 sd ra,40(sp) call malloc@plt add a5,s3,s1 addiw a7,s1,-1 slli a5,a5,3 addi s3,s3,-4 add a4,s0,a5 slli a1,a7,2 add a3,s2,s3 add a4,a4,a1 flw fa5,0(a3) flw fa4,-40(a4) add s3,a0,s3 addiw t3,s1,-2 fdiv.s fa5,fa5,fa4 fsw fa5,0(s3) blt t3,zero,.L1 li a4,44 mul a4,s1,a4 addi a5,a5,-80 add t4,s0,a5 mv a2,a7 addi a5,a4,-88 add t1,s0,a5 .L5: sext.w a3,a7 ble s1,a7,.L7 subw a6,a2,a7 slli a6,a6,32 srli a6,a6,32 add a6,a6,t3 addi a5,t4,4 slli a3,a3,2 slli a6,a6,2 add a6,a6,a5 add a3,a0,a3 mv a4,t1 li a5,0 .L4: fcvt.s.w fa4,a5 flw fa5,4(a4) flw fa3,0(a3) addi a4,a4,4 addi a3,a3,4 fmadd.s fa5,fa5,fa3,fa4 fcvt.w.s a5,fa5,rtz sext.w a5,a5 bne a6,a4,.L4 fcvt.s.w fa3,a5 .L3: slli a5,t3,2 add a4,s2,a5 flw fa5,0(a4) flw fa4,0(t1) add a5,a0,a5 fsub.s fa5,fa5,fa3 addiw a7,a7,-1 addi t3,t3,-1 addi t1,t1,-44 addi t4,t4,-40 fdiv.s fa5,fa5,fa4 fsw fa5,0(a5) bne a7,zero,.L5 .L1: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L7: fmv.w.x fa3,zero j .L3 .size remontee, .-remontee .align 1 .globl gauss .type gauss, @function gauss: addi sp,sp,-368 addiw a4,a2,-1 sd s9,288(sp) sd s0,360(sp) sd s1,352(sp) sd s2,344(sp) sd s3,336(sp) sd s4,328(sp) sd s5,320(sp) sd s6,312(sp) sd s7,304(sp) sd s8,296(sp) sd s10,280(sp) sd s11,272(sp) sw a4,268(sp) sd a4,248(sp) sd a0,216(sp) sd a1,256(sp) mv s9,a2 ble a4,zero,.L13 sd zero,208(sp) ble a2,zero,.L14 sext.w a4,a2 sd a4,232(sp) addiw a4,a2,2 sd a4,224(sp) li a4,10 sd a4,88(sp) li a4,9 sd a4,80(sp) li a4,8 sd a4,72(sp) li a4,7 sd a4,64(sp) li a4,6 sd a4,56(sp) li a4,5 sd a4,48(sp) li a4,4 sd a4,40(sp) li a4,3 sd a4,192(sp) li a4,2 sd a4,184(sp) li a4,11 li t6,0 li t2,0 sd a4,176(sp) addi a5,a1,8 li a4,1 mv s11,a0 addi s4,a0,40 addi s10,a1,4 sd a4,128(sp) sd a5,240(sp) sd t2,136(sp) mv t5,t6 .L19: lw a5,128(sp) sd a5,208(sp) ble s9,a5,.L35 ld t2,192(sp) addi t5,t5,10 ld s0,184(sp) add a2,t2,t5 slli t0,t2,2 sext.w t2,t2 sd t2,0(sp) lw t2,40(sp) ld a5,232(sp) ld a4,128(sp) sd t2,8(sp) lw t2,48(sp) ld s2,40(sp) ld s3,48(sp) sd t2,16(sp) lw t2,56(sp) ld s6,64(sp) ld s1,72(sp) subw a5,a5,s0 sd t2,24(sp) lw t2,64(sp) slli a5,a5,32 addi a4,a4,-1 srli a5,a5,32 ld s5,56(sp) slli a3,s0,32 add a1,s2,t5 add a0,s3,t5 add a7,s6,t5 add a5,a5,a4 slli t6,s0,2 mv a4,s0 slli s7,s6,2 slli s0,s2,2 slli s6,s1,2 slli s2,s3,2 ld s1,88(sp) ld s3,80(sp) sd t2,32(sp) lw t2,72(sp) ld t1,72(sp) ld t3,80(sp) ld t4,88(sp) add a6,s5,t5 slli s8,s5,2 sd t2,96(sp) slli s5,s3,2 lw t2,80(sp) slli s3,s1,2 srli a3,a3,32 sext.w s1,a4 ld a4,216(sp) add a3,a3,t5 add t1,t1,t5 add t3,t3,t5 add t4,t4,t5 slli a3,a3,2 slli a2,a2,2 slli a1,a1,2 slli a0,a0,2 slli a6,a6,2 slli a7,a7,2 slli t1,t1,2 slli t3,t3,2 slli t4,t4,2 sd t2,104(sp) add a3,a4,a3 lw t2,88(sp) add a2,a4,a2 add a1,a4,a1 add a0,a4,a0 add a6,a4,a6 add a7,a4,a7 add t1,a4,t1 add t3,a4,t3 add t4,a4,t4 ld a4,240(sp) slli a5,a5,2 sd t2,144(sp) add t2,a5,a4 lw a5,176(sp) add s6,s11,s6 add s5,s11,s5 sd a5,160(sp) sd s6,112(sp) mv s6,t2 ld t2,136(sp) add s3,s11,s3 add s7,s11,s7 add t6,s11,t6 add t0,s11,t0 add s0,s11,s0 add s2,s11,s2 add s8,s11,s8 sd s11,120(sp) mv a4,s10 mv a5,s4 sd s5,152(sp) sd s3,168(sp) sd t5,200(sp) mv s11,s7 .L18: flw fa4,-40(s4) flw fa3,0(a5) flw fa2,4(a5) add s5,a5,t2 fdiv.s fa5,fa3,fa4 fnmsub.s fa4,fa4,fa5,fa3 fsw fa4,0(a5) flw fa4,-36(s4) fnmsub.s fa4,fa5,fa4,fa2 fsw fa4,4(a5) ble s9,s1,.L16 flw fa4,0(t6) flw fa3,0(a3) ld t5,0(sp) fnmsub.s fa4,fa5,fa4,fa3 fsw fa4,0(a3) ble s9,t5,.L16 flw fa4,0(t0) flw fa3,0(a2) ld t5,8(sp) fnmsub.s fa4,fa5,fa4,fa3 fsw fa4,0(a2) ble s9,t5,.L16 flw fa4,0(s0) flw fa3,0(a1) ld t5,16(sp) fnmsub.s fa4,fa5,fa4,fa3 fsw fa4,0(a1) ble s9,t5,.L16 flw fa4,0(s2) flw fa3,0(a0) ld t5,24(sp) fnmsub.s fa4,fa5,fa4,fa3 fsw fa4,0(a0) ble s9,t5,.L16 flw fa4,0(s8) flw fa3,0(a6) ld t5,32(sp) fnmsub.s fa4,fa5,fa4,fa3 fsw fa4,0(a6) ble s9,t5,.L16 flw fa4,0(s11) flw fa3,0(a7) ld t5,96(sp) fnmsub.s fa4,fa5,fa4,fa3 fsw fa4,0(a7) ble s9,t5,.L16 ld t5,112(sp) flw fa3,0(t1) flw fa4,0(t5) ld t5,104(sp) fnmsub.s fa4,fa5,fa4,fa3 fsw fa4,0(t1) ble s9,t5,.L16 ld t5,152(sp) flw fa3,0(t3) flw fa4,0(t5) ld t5,144(sp) fnmsub.s fa4,fa5,fa4,fa3 fsw fa4,0(t3) ble s9,t5,.L16 ld t5,168(sp) flw fa3,0(t4) flw fa4,0(t5) ld t5,160(sp) fnmsub.s fa4,fa5,fa4,fa3 fsw fa4,0(t4) ble s9,t5,.L16 sd a5,136(sp) .L17: ld a5,120(sp) slli s3,t5,2 add s7,s5,s3 add s3,a5,s3 flw fa4,0(s3) flw fa3,0(s7) addi t5,t5,1 sext.w s3,t5 fnmsub.s fa4,fa4,fa5,fa3 fsw fa4,0(s7) bgt s9,s3,.L17 ld a5,136(sp) .L16: flw fa3,0(a4) flw fa4,-4(s10) addi a4,a4,4 addi a5,a5,40 fnmsub.s fa4,fa4,fa5,fa3 addi a3,a3,40 addi a2,a2,40 addi a1,a1,40 addi a0,a0,40 fsw fa4,-4(a4) addi a6,a6,40 addi a7,a7,40 addi t1,t1,40 addi t3,t3,40 addi t4,t4,40 bne a4,s6,.L18 ld s11,120(sp) ld t5,200(sp) sd t2,136(sp) .L15: ld a4,128(sp) ld a5,192(sp) addi s11,s11,40 addi a4,a4,1 sd a4,128(sp) ld a4,176(sp) addiw a5,a5,1 sd a5,192(sp) addiw a4,a4,1 sd a4,176(sp) ld a4,136(sp) addi s4,s4,44 addi s10,s10,4 addi a4,a4,-4 sd a4,136(sp) ld a4,184(sp) addiw a4,a4,1 sd a4,184(sp) ld a4,40(sp) addiw a4,a4,1 sd a4,40(sp) ld a4,48(sp) addiw a4,a4,1 sd a4,48(sp) ld a4,56(sp) addiw a4,a4,1 sd a4,56(sp) ld a4,64(sp) addiw a4,a4,1 sd a4,64(sp) ld a4,72(sp) addiw a4,a4,1 sd a4,72(sp) ld a4,80(sp) addiw a4,a4,1 sd a4,80(sp) ld a4,88(sp) addiw a4,a4,1 sd a4,88(sp) ld a4,224(sp) bne a5,a4,.L19 ld a5,208(sp) ld a4,248(sp) bge a5,a4,.L13 .L14: ld a7,208(sp) li a2,44 ld t3,256(sp) mul a2,a7,a2 ld a5,216(sp) ld t1,248(sp) lw t4,268(sp) slli a1,a7,2 mv a0,a7 add a1,t3,a1 addi a6,t3,8 add a2,a5,a2 .L23: addiw a7,a7,1 ble s9,a7,.L21 subw a3,t4,a7 slli a3,a3,32 srli a3,a3,32 add a3,a3,a0 slli a5,a7,2 slli a3,a3,2 add a5,t3,a5 add a3,a3,a6 mv a4,a2 .L22: flw fa4,40(a4) flw fa2,0(a2) flw fa3,0(a5) flw fa5,0(a1) fdiv.s fa4,fa4,fa2 addi a5,a5,4 addi a4,a4,40 fnmsub.s fa5,fa5,fa4,fa3 fsw fa5,-4(a5) bne a5,a3,.L22 .L21: addi a0,a0,1 addi a2,a2,44 addi a1,a1,4 bgt t1,a7,.L23 .L13: ld s0,360(sp) ld a1,256(sp) ld a0,216(sp) ld s1,352(sp) ld s2,344(sp) ld s3,336(sp) ld s4,328(sp) ld s5,320(sp) ld s6,312(sp) ld s7,304(sp) ld s8,296(sp) ld s10,280(sp) ld s11,272(sp) mv a2,s9 ld s9,288(sp) addi sp,sp,368 tail remontee .L35: addi t5,t5,10 j .L15 .size gauss, .-gauss .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Enter the size of the matrix: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Filling the matrix A" .align 3 .LC3: .string "A[%d][%d] = " .align 3 .LC4: .string "%f" .align 3 .LC5: .string "Filling the matrix B" .align 3 .LC6: .string "B[%d] = " .align 3 .LC7: .string "\nThe resulting vector: [" .align 3 .LC9: .string "%f%c" .align 3 .LC8: .string ",]" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-544 sd s5,488(sp) la s5,__stack_chk_guard ld a5, 0(s5) sd a5, 456(sp) li a5, 0 lla a1,.LC0 li a0,1 sd ra,536(sp) sd s7,472(sp) sd s0,528(sp) sd s1,520(sp) sd s2,512(sp) sd s3,504(sp) sd s4,496(sp) sd s6,480(sp) call __printf_chk@plt addi a1,sp,12 lla a0,.LC1 call __isoc99_scanf@plt lla a0,.LC2 call puts@plt lw a5,12(sp) addi s7,sp,56 ble a5,zero,.L38 mv s1,s7 mv s6,s7 li s2,0 lla s4,.LC3 lla s3,.LC4 .L41: li s0,0 .L39: mv a3,s0 mv a2,s2 mv a1,s4 li a0,1 call __printf_chk@plt mv a1,s1 mv a0,s3 call __isoc99_scanf@plt lw a5,12(sp) addiw s0,s0,1 addi s1,s1,4 bgt a5,s0,.L39 addiw s2,s2,1 ble a5,s2,.L38 addi s6,s6,40 mv s1,s6 j .L41 .L38: lla a0,.LC5 call puts@plt lw s2,12(sp) addi s6,sp,16 ble s2,zero,.L42 mv s1,s6 li s0,0 lla s4,.LC6 lla s3,.LC4 .L43: mv a2,s0 mv a1,s4 li a0,1 call __printf_chk@plt mv a1,s1 mv a0,s3 call __isoc99_scanf@plt lw s2,12(sp) addiw s0,s0,1 addi s1,s1,4 bgt s2,s0,.L43 .L42: mv a2,s2 mv a1,s6 mv a0,s7 call gauss mv a2,s2 mv a1,s6 mv a0,s7 call gauss mv s1,a0 lla a1,.LC7 li a0,1 call __printf_chk@plt lw a5,12(sp) li s0,0 lla s3,.LC8 lla s2,.LC9 ble a5,zero,.L46 .L45: flw fa5,0(s1) addiw a5,a5,-1 sub a5,a5,s0 fcvt.d.s fa5,fa5 seqz a5,a5 add a5,s3,a5 lbu a3,0(a5) fmv.x.d a2,fa5 mv a1,s2 li a0,1 call __printf_chk@plt lw a5,12(sp) addiw s0,s0,1 addi s1,s1,4 bgt a5,s0,.L45 .L46: ld a4, 456(sp) ld a5, 0(s5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L58 ld ra,536(sp) ld s0,528(sp) ld s1,520(sp) ld s2,512(sp) ld s3,504(sp) ld s4,496(sp) ld s5,488(sp) ld s6,480(sp) ld s7,472(sp) li a0,0 addi sp,sp,544 jr ra .L58: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "gauss.c" .text .align 2 .global remontee .type remontee, %function remontee: .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 w2, [sp, 28] ldrsw x0, [sp, 28] lsl x0, x0, 2 bl malloc str x0, [sp, 72] ldrsw x0, [sp, 28] lsl x0, x0, 2 sub x0, x0, #4 ldr x1, [sp, 32] add x0, x1, x0 ldr s1, [x0] ldrsw x1, [sp, 28] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 sub x0, x0, #40 ldr x1, [sp, 40] add x0, x1, x0 ldr w1, [sp, 28] sub w1, w1, #1 sxtw x1, w1 ldr s0, [x0, x1, lsl 2] ldrsw x0, [sp, 28] lsl x0, x0, 2 sub x0, x0, #4 ldr x1, [sp, 72] add x0, x1, x0 fdiv s0, s1, s0 str s0, [x0] ldr w0, [sp, 28] sub w0, w0, #2 str w0, [sp, 60] b .L2 .L5: str wzr, [sp, 64] ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 68] b .L3 .L4: ldr s0, [sp, 64] scvtf s1, s0 ldrsw x1, [sp, 60] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 40] add x0, x0, x1 ldrsw x1, [sp, 68] ldr s2, [x0, x1, lsl 2] ldrsw x0, [sp, 68] lsl x0, x0, 2 ldr x1, [sp, 72] add x0, x1, x0 ldr s0, [x0] fmul s0, s2, s0 fadd s0, s1, s0 fcvtzs s0, s0 str s0, [sp, 64] ldr w0, [sp, 68] add w0, w0, 1 str w0, [sp, 68] .L3: ldr w1, [sp, 68] ldr w0, [sp, 28] cmp w1, w0 blt .L4 ldrsw x0, [sp, 60] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 ldr s1, [x0] ldr s0, [sp, 64] scvtf s0, s0 fsub s1, s1, s0 ldrsw x1, [sp, 60] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 40] add x0, x0, x1 ldrsw x1, [sp, 60] ldr s0, [x0, x1, lsl 2] ldrsw x0, [sp, 60] lsl x0, x0, 2 ldr x1, [sp, 72] add x0, x1, x0 fdiv s0, s1, s0 str s0, [x0] ldr w0, [sp, 60] sub w0, w0, #1 str w0, [sp, 60] .L2: ldr w0, [sp, 60] cmp w0, 0 bge .L5 ldr x0, [sp, 72] ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size remontee, .-remontee .align 2 .global gauss .type gauss, %function gauss: .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 x0, [sp, 40] str x1, [sp, 32] str w2, [sp, 28] str wzr, [sp, 56] b .L8 .L13: ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 60] b .L9 .L12: ldrsw x1, [sp, 60] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 40] add x0, x0, x1 ldrsw x1, [sp, 56] ldr s1, [x0, x1, lsl 2] ldrsw x1, [sp, 56] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 40] add x0, x0, x1 ldrsw x1, [sp, 56] ldr s0, [x0, x1, lsl 2] fdiv s0, s1, s0 str s0, [sp, 68] ldr w0, [sp, 56] str w0, [sp, 64] b .L10 .L11: ldrsw x1, [sp, 60] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 40] add x0, x0, x1 ldrsw x1, [sp, 64] ldr s1, [x0, x1, lsl 2] ldrsw x1, [sp, 56] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 40] add x0, x0, x1 ldrsw x1, [sp, 64] ldr s2, [x0, x1, lsl 2] ldr s0, [sp, 68] fmul s0, s2, s0 ldrsw x1, [sp, 60] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 3 mov x1, x0 ldr x0, [sp, 40] add x0, x0, x1 fsub s0, s1, s0 ldrsw x1, [sp, 64] str s0, [x0, x1, lsl 2] ldr w0, [sp, 64] add w0, w0, 1 str w0, [sp, 64] .L10: ldr w1, [sp, 64] ldr w0, [sp, 28] cmp w1, w0 blt .L11 ldrsw x0, [sp, 60] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 ldr s1, [x0] ldrsw x0, [sp, 56] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 ldr s2, [x0] ldr s0, [sp, 68] fmul s0, s2, s0 ldrsw x0, [sp, 60] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 fsub s0, s1, s0 str s0, [x0] ldr w0, [sp, 60] add w0, w0, 1 str w0, [sp, 60] .L9: ldr w1, [sp, 60] ldr w0, [sp, 28] cmp w1, w0 blt .L12 ldr w0, [sp, 56] add w0, w0, 1 str w0, [sp, 56] .L8: ldr w0, [sp, 28] sub w0, w0, #1 ldr w1, [sp, 56] cmp w1, w0 blt .L13 ldr w2, [sp, 28] ldr x1, [sp, 32] ldr x0, [sp, 40] bl remontee str x0, [sp, 72] ldr x0, [sp, 72] ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size gauss, .-gauss .section .rodata .align 3 .LC0: .string "Enter the size of the matrix: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Filling the matrix A" .align 3 .LC3: .string "A[%d][%d] = " .align 3 .LC4: .string "%f" .align 3 .LC5: .string "Filling the matrix B" .align 3 .LC6: .string "B[%d] = " .align 3 .LC7: .string "\nThe resulting vector: [" .align 3 .LC9: .string "%f%c" .text .align 2 .global main .type main, %function main: .LFB8: .cfi_startproc stp x29, x30, [sp, -496]! .cfi_def_cfa_offset 496 .cfi_offset 29, -496 .cfi_offset 30, -488 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 488] 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 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts str wzr, [sp, 24] b .L16 .L19: str wzr, [sp, 28] b .L17 .L18: ldr w2, [sp, 28] ldr w1, [sp, 24] adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl printf add x2, sp, 88 ldrsw x3, [sp, 28] ldrsw x1, [sp, 24] mov x0, x1 lsl x0, x0, 2 add x0, x0, x1 lsl x0, x0, 1 add x0, x3, x0 lsl x0, x0, 2 add x0, x2, x0 mov x1, x0 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl __isoc99_scanf ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L17: ldr w0, [sp, 20] ldr w1, [sp, 28] cmp w1, w0 blt .L18 ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L16: ldr w0, [sp, 20] ldr w1, [sp, 24] cmp w1, w0 blt .L19 adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts str wzr, [sp, 32] b .L20 .L21: ldr w1, [sp, 32] adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl printf add x1, sp, 48 ldrsw x0, [sp, 32] lsl x0, x0, 2 add x0, x1, x0 mov x1, x0 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl __isoc99_scanf ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L20: ldr w0, [sp, 20] ldr w1, [sp, 32] cmp w1, w0 blt .L21 ldr w2, [sp, 20] add x1, sp, 48 add x0, sp, 88 bl gauss str x0, [sp, 40] ldr w2, [sp, 20] add x1, sp, 48 add x0, sp, 88 bl gauss str x0, [sp, 40] adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl printf str wzr, [sp, 36] b .L22 .L23: ldrsw x0, [sp, 36] lsl x0, x0, 2 ldr x1, [sp, 40] add x0, x1, x0 ldr s0, [x0] fcvt d0, s0 ldr w0, [sp, 20] sub w0, w0, #1 ldr w1, [sp, 36] cmp w1, w0 cset w0, eq and w0, w0, 255 mov w2, w0 adrp x0, .LC8 add x1, x0, :lo12:.LC8 sxtw x0, w2 ldrb w0, [x1, x0] mov w1, w0 adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl printf ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L22: ldr w0, [sp, 20] ldr w1, [sp, 36] cmp w1, w0 blt .L23 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 488] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L25 bl __stack_chk_fail .L25: mov w0, w1 ldp x29, x30, [sp], 496 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size main, .-main .section .rodata .align 3 .LC8: .string ",]" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "gauss.c" .text .align 2 .global remontee .type remontee, %function remontee: .LFB39: .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] stp x21, x22, [sp, 32] str x23, [sp, 48] .cfi_offset 19, -48 .cfi_offset 20, -40 .cfi_offset 21, -32 .cfi_offset 22, -24 .cfi_offset 23, -16 mov x21, x0 mov x20, x1 mov w19, w2 sxtw x22, w2 sbfiz x23, x2, 2, 32 mov x0, x23 bl malloc sub x3, x23, #4 add x2, x23, x22 lsl x2, x2, 3 sub w5, w19, #1 add x1, x21, x2 sub x1, x1, #40 ldr s1, [x1, w5, sxtw 2] ldr s0, [x20, x3] fdiv s0, s0, s1 str s0, [x0, x3] subs w4, w19, #2 bmi .L1 sxtw x4, w4 add x1, x22, x22, lsl 1 lsl x1, x1, 2 sub x1, x1, x22 add x1, x21, x1, lsl 2 sub x2, x2, #80 add x21, x21, x2 mov w6, 0 .L5: cmp w19, w5 ble .L6 mov x2, x21 sxtw x3, w5 fmov s1, w6 .L4: ldr s0, [x2, x3, lsl 2] ldr s2, [x0, x3, lsl 2] fmul s0, s0, s2 scvtf s1, s1 fadd s0, s0, s1 fcvtzs s1, s0 add x3, x3, 1 cmp w19, w3 bgt .L4 .L3: scvtf s1, s1 ldr s0, [x20, x4, lsl 2] fsub s0, s0, s1 ldr s1, [x1, -88] fdiv s0, s0, s1 str s0, [x0, x4, lsl 2] sub x4, x4, #1 sub w5, w5, #1 sub x1, x1, #44 sub x21, x21, #40 tbz w4, #31, .L5 .L1: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L6: .cfi_restore_state fmov s1, w6 b .L3 .cfi_endproc .LFE39: .size remontee, .-remontee .align 2 .global gauss .type gauss, %function gauss: .LFB40: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp sub w12, w2, #1 cmp w12, 0 ble .L11 add x11, x0, 40 mov x9, x0 mov x10, 1 mov x7, 0 .L16: cmp w2, w10 ble .L12 sub x5, x11, #40 mov x8, x11 mov x6, x10 .L15: mov x4, x8 ldr s0, [x9] ldr s2, [x8, x7, lsl 2] fdiv s2, s2, s0 cmp w2, w7 ble .L13 mov x3, x7 .L14: ldr s1, [x5, x3, lsl 2] fmul s1, s2, s1 ldr s0, [x4, x3, lsl 2] fsub s0, s0, s1 str s0, [x4, x3, lsl 2] add x3, x3, 1 cmp w2, w3 bgt .L14 .L13: ldr s0, [x1, x7, lsl 2] fmul s2, s2, s0 ldr s0, [x1, x6, lsl 2] fsub s0, s0, s2 str s0, [x1, x6, lsl 2] add x6, x6, 1 add x8, x8, 40 cmp w2, w6 bgt .L15 .L12: add x7, x7, 1 add x10, x10, 1 add x11, x11, 40 add x9, x9, 44 cmp w12, w7 bgt .L16 .L11: bl remontee ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE40: .size gauss, .-gauss .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Enter the size of the matrix: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Filling the matrix A" .align 3 .LC3: .string "A[%d][%d] = " .align 3 .LC4: .string "%f" .align 3 .LC5: .string "Filling the matrix B" .align 3 .LC6: .string "B[%d] = " .align 3 .LC7: .string "\nThe resulting vector: [" .align 3 .LC9: .string "%f%c" .text .align 2 .global main .type main, %function main: .LFB41: .cfi_startproc sub sp, sp, #544 .cfi_def_cfa_offset 544 stp x29, x30, [sp] .cfi_offset 29, -544 .cfi_offset 30, -536 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] .cfi_offset 19, -528 .cfi_offset 20, -520 .cfi_offset 21, -512 .cfi_offset 22, -504 .cfi_offset 23, -496 .cfi_offset 24, -488 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 536] mov x1, 0 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk add x1, sp, 92 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts ldr w0, [sp, 92] cmp w0, 0 ble .L22 str x25, [sp, 64] .cfi_offset 25, -480 add x25, sp, 136 mov w21, 0 adrp x23, .LC3 add x23, x23, :lo12:.LC3 mov w24, 1 adrp x22, .LC4 add x22, x22, :lo12:.LC4 b .L23 .L24: mov w3, w19 mov w2, w21 mov x1, x23 mov w0, w24 bl __printf_chk mov x1, x20 mov x0, x22 bl __isoc99_scanf add w19, w19, 1 add x20, x20, 4 ldr w0, [sp, 92] cmp w0, w19 bgt .L24 .L25: add w21, w21, 1 add x25, x25, 40 ldr w0, [sp, 92] cmp w0, w21 ble .L37 .L23: mov x20, x25 mov w19, 0 ldr w0, [sp, 92] cmp w0, 0 bgt .L24 b .L25 .L37: ldr x25, [sp, 64] .cfi_restore 25 .L22: adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts ldr w2, [sp, 92] cmp w2, 0 ble .L26 add x20, sp, 96 mov w19, 0 adrp x22, .LC6 add x22, x22, :lo12:.LC6 mov w23, 1 adrp x21, .LC4 add x21, x21, :lo12:.LC4 .L27: mov w2, w19 mov x1, x22 mov w0, w23 bl __printf_chk mov x1, x20 mov x0, x21 bl __isoc99_scanf add w19, w19, 1 ldr w2, [sp, 92] add x20, x20, 4 cmp w2, w19 bgt .L27 .L26: add x20, sp, 96 add x19, sp, 136 mov x1, x20 mov x0, x19 bl gauss ldr w2, [sp, 92] mov x1, x20 mov x0, x19 bl gauss mov x20, x0 adrp x1, .LC7 add x1, x1, :lo12:.LC7 mov w0, 1 bl __printf_chk ldr w1, [sp, 92] cmp w1, 0 ble .L28 mov x19, 0 adrp x22, .LC8 add x22, x22, :lo12:.LC8 adrp x21, .LC9 add x21, x21, :lo12:.LC9 mov w23, 1 .L29: sub w1, w1, #1 cmp w1, w19 cset w1, eq ldr s0, [x20, x19, lsl 2] ldrb w2, [x22, w1, sxtw] fcvt d0, s0 mov x1, x21 mov w0, w23 bl __printf_chk ldr w1, [sp, 92] add x19, x19, 1 cmp w1, w19 bgt .L29 .L28: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 536] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L38 mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldp x29, x30, [sp] add sp, sp, 544 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L38: .cfi_restore_state str x25, [sp, 64] .cfi_offset 25, -480 bl __stack_chk_fail .cfi_endproc .LFE41: .size main, .-main .section .rodata.str1.8 .align 3 .LC8: .string ",]" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "gauss.c" .text .align 2 .p2align 4,,11 .global remontee .type remontee, %function remontee: .LFB39: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 sbfiz x21, x2, 2, 32 mov x22, x0 mov x0, x21 stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov w19, w2 mov x20, x1 bl malloc mov w3, 40 sub x21, x21, #4 sub w5, w19, #1 subs w2, w19, #2 smull x3, w19, w3 ldr s0, [x20, x21] add x1, x22, x3 sub x1, x1, #40 ldr s1, [x1, w5, sxtw 2] fdiv s0, s0, s1 str s0, [x0, x21] bmi .L1 mov w6, 44 sub x3, x3, #80 add x4, x22, x3 sxtw x2, w2 smaddl x6, w19, w6, x22 .p2align 3,,7 .L5: cmp w19, w5 ble .L7 sxtw x3, w5 fmov s0, wzr .p2align 3,,7 .L4: scvtf s0, s0 ldr s2, [x4, x3, lsl 2] ldr s1, [x0, x3, lsl 2] add x3, x3, 1 fmadd s0, s2, s1, s0 fcvtzs s0, s0 cmp w19, w3 bgt .L4 scvtf s0, s0 .L3: ldr s1, [x20, x2, lsl 2] sub w5, w5, #1 ldr s2, [x6, -88] sub x4, x4, #40 sub x6, x6, #44 fsub s0, s1, s0 fdiv s0, s0, s2 str s0, [x0, x2, lsl 2] sub x2, x2, #1 tbz w2, #31, .L5 .L1: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L7: .cfi_restore_state movi v0.2s, #0 b .L3 .cfi_endproc .LFE39: .size remontee, .-remontee .align 2 .p2align 4,,11 .global gauss .type gauss, %function gauss: .LFB40: .cfi_startproc sub w12, w2, #1 cmp w12, 0 ble .L16 mov x5, x0 mov x8, x0 mov x7, 0 mov w9, 0 .p2align 3,,7 .L15: add x11, x7, 1 add x10, x5, 40 add w9, w9, 1 mov x6, x11 mov x4, x10 cmp w2, w9 ble .L20 .p2align 3,,7 .L19: ldr s0, [x4, x7, lsl 2] ldr s1, [x8] fdiv s2, s0, s1 cmp w2, w7 ble .L17 mov x3, x7 b .L18 .p2align 2,,3 .L23: ldr s0, [x4, x3, lsl 2] ldr s1, [x5, x3, lsl 2] .L18: fmsub s0, s2, s1, s0 str s0, [x4, x3, lsl 2] add x3, x3, 1 cmp w2, w3 bgt .L23 .L17: ldr s1, [x1, x7, lsl 2] add x4, x4, 40 ldr s0, [x1, x6, lsl 2] fmsub s0, s1, s2, s0 str s0, [x1, x6, lsl 2] add x6, x6, 1 cmp w2, w6 bgt .L19 .L20: mov x7, x11 mov x5, x10 add x8, x8, 44 cmp w9, w12 bne .L15 .L16: b remontee .cfi_endproc .LFE40: .size gauss, .-gauss .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Enter the size of the matrix: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Filling the matrix A" .align 3 .LC3: .string "A[%d][%d] = " .align 3 .LC4: .string "%f" .align 3 .LC5: .string "Filling the matrix B" .align 3 .LC6: .string "B[%d] = " .align 3 .LC7: .string "\nThe resulting vector: [" .align 3 .LC9: .string "%f%c" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB41: .cfi_startproc sub sp, sp, #544 .cfi_def_cfa_offset 544 adrp x2, :got:__stack_chk_guard adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 stp x29, x30, [sp] .cfi_offset 29, -544 .cfi_offset 30, -536 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] .cfi_offset 19, -528 .cfi_offset 20, -520 .cfi_offset 21, -512 .cfi_offset 22, -504 .cfi_offset 23, -496 .cfi_offset 24, -488 add x24, sp, 136 str x25, [sp, 64] .cfi_offset 25, -480 ldr x3, [x2] str x3, [sp, 536] mov x3, 0 bl __printf_chk add x1, sp, 92 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts ldr w0, [sp, 92] cmp w0, 0 ble .L25 adrp x23, .LC3 adrp x19, .LC4 mov x25, x24 add x23, x23, :lo12:.LC3 add x22, x19, :lo12:.LC4 mov w21, 0 .p2align 3,,7 .L27: mov x20, x25 mov w19, 0 .p2align 3,,7 .L26: mov w3, w19 mov w2, w21 mov x1, x23 mov w0, 1 bl __printf_chk add w19, w19, 1 mov x1, x20 mov x0, x22 bl __isoc99_scanf add x20, x20, 4 ldr w0, [sp, 92] cmp w0, w19 bgt .L26 add w21, w21, 1 add x25, x25, 40 cmp w0, w21 ble .L25 cmp w0, 0 bgt .L27 .L25: adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts ldr w22, [sp, 92] add x25, sp, 96 cmp w22, 0 ble .L28 adrp x19, .LC4 adrp x23, .LC6 mov x21, x25 add x19, x19, :lo12:.LC4 add x23, x23, :lo12:.LC6 mov w20, 0 .p2align 3,,7 .L29: mov w2, w20 mov x1, x23 mov w0, 1 bl __printf_chk mov x1, x21 mov x0, x19 bl __isoc99_scanf ldr w22, [sp, 92] add w20, w20, 1 add x21, x21, 4 cmp w22, w20 bgt .L29 .L28: mov w2, w22 mov x1, x25 mov x0, x24 bl gauss mov w2, w22 mov x1, x25 mov x0, x24 bl gauss adrp x1, .LC7 mov x22, x0 add x1, x1, :lo12:.LC7 mov w0, 1 bl __printf_chk adrp x21, .LC8 ldr w2, [sp, 92] adrp x20, .LC9 add x21, x21, :lo12:.LC8 add x20, x20, :lo12:.LC9 mov x19, 0 cmp w2, 0 ble .L31 .p2align 3,,7 .L30: sub w2, w2, #1 ldr s0, [x22, x19, lsl 2] cmp w2, w19 mov x1, x20 cset w2, eq mov w0, 1 fcvt d0, s0 add x19, x19, 1 ldrb w2, [x21, w2, sxtw] bl __printf_chk ldr w2, [sp, 92] cmp w2, w19 bgt .L30 .L31: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 536] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L45 mov w0, 0 ldp x29, x30, [sp] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldr x25, [sp, 64] add sp, sp, 544 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 25 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L45: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE41: .size main, .-main .section .rodata.str1.8 .align 3 .LC8: .string ",]" .section .text.startup .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "gauss.c" .text .align 2 .p2align 4,,11 .global remontee .type remontee, %function remontee: .LFB39: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 sbfiz x21, x2, 2, 32 mov x22, x0 mov x0, x21 stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov w19, w2 mov x20, x1 bl malloc mov w3, 40 sub x21, x21, #4 sub w5, w19, #1 subs w2, w19, #2 smull x3, w19, w3 ldr s0, [x20, x21] add x1, x22, x3 sub x1, x1, #40 ldr s1, [x1, w5, sxtw 2] fdiv s0, s0, s1 str s0, [x0, x21] bmi .L1 mov w6, 44 sub x3, x3, #80 add x4, x22, x3 sxtw x2, w2 smaddl x6, w19, w6, x22 .p2align 3,,7 .L5: cmp w19, w5 ble .L7 sxtw x3, w5 fmov s0, wzr .p2align 3,,7 .L4: scvtf s0, s0 ldr s2, [x4, x3, lsl 2] ldr s1, [x0, x3, lsl 2] add x3, x3, 1 fmadd s0, s2, s1, s0 fcvtzs s0, s0 cmp w19, w3 bgt .L4 scvtf s0, s0 .L3: ldr s1, [x20, x2, lsl 2] sub w5, w5, #1 ldr s2, [x6, -88] sub x4, x4, #40 sub x6, x6, #44 fsub s0, s1, s0 fdiv s0, s0, s2 str s0, [x0, x2, lsl 2] sub x2, x2, #1 tbz w2, #31, .L5 .L1: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L7: .cfi_restore_state movi v0.2s, #0 b .L3 .cfi_endproc .LFE39: .size remontee, .-remontee .align 2 .p2align 4,,11 .global gauss .type gauss, %function gauss: .LFB40: .cfi_startproc stp x29, x30, [sp, -288]! .cfi_def_cfa_offset 288 .cfi_offset 29, -288 .cfi_offset 30, -280 mov x29, sp stp x27, x28, [sp, 80] .cfi_offset 27, -208 .cfi_offset 28, -200 mov w28, w2 sub w2, w2, #1 str w2, [sp, 276] mov x27, x1 str x0, [sp, 280] cmp w2, 0 ble .L13 cmp w28, 0 ble .L13 stp x19, x20, [sp, 16] .cfi_offset 20, -264 .cfi_offset 19, -272 mov x20, x0 mov w30, w28 stp x21, x22, [sp, 32] .cfi_offset 22, -248 .cfi_offset 21, -256 mov x21, x0 neg x0, x0 str x0, [sp, 136] mov w0, 10 str w0, [sp, 132] mov w0, 9 str w0, [sp, 128] mov w0, 8 str w0, [sp, 124] mov w0, 7 str w0, [sp, 120] mov w0, 6 str w0, [sp, 116] mov w0, 5 str w0, [sp, 112] mov w0, 4 mov w22, w2 str w0, [sp, 108] mov w0, 3 mov x19, 0 stp x23, x24, [sp, 48] .cfi_offset 24, -232 .cfi_offset 23, -240 mov w23, 2 mov x24, 0 stp x25, x26, [sp, 64] .cfi_offset 26, -216 .cfi_offset 25, -224 mov x26, 1 mov w25, 0 str w0, [sp, 104] mov w0, 11 str w0, [sp, 272] .p2align 3,,7 .L23: mov w0, w25 add w25, w25, 1 cmp w28, w25 ble .L15 ldpsw x1, x2, [sp, 104] sxtw x13, w0 ldpsw x3, x4, [sp, 112] sub x17, x1, x24 ldpsw x7, x9, [sp, 128] stp x13, x7, [sp, 144] and w10, w30, -4 ldpsw x5, x8, [sp, 120] stp x9, x1, [sp, 160] sub x1, x2, x24 str x1, [sp, 184] sub x1, x3, x24 add w6, w0, w10 str x1, [sp, 200] sub x1, x4, x24 str x1, [sp, 216] ldr x0, [sp, 152] sub x1, x5, x24 str x1, [sp, 232] sub x1, x8, x24 str x1, [sp, 248] sub x1, x0, x24 ldr x0, [sp, 160] str x2, [sp, 176] ldr x2, [sp, 136] add w11, w6, 1 add w12, w6, 2 sub x0, x0, x24 sxtw x18, w23 sxtw x13, w6 sxtw x14, w11 sxtw x15, w12 sub x16, x18, x24 sbfiz x7, x11, 2, 32 sbfiz x9, x12, 2, 32 sbfiz x6, x6, 2, 32 str x5, [sp, 224] lsr w5, w30, 2 str x8, [sp, 240] sub x8, x2, #4 stp x1, x0, [sp, 256] add x0, x20, 40 mov x1, x26 str x3, [sp, 192] str x4, [sp, 208] .p2align 3,,7 .L22: ldr s1, [x0] add x2, x8, x0 ldr s2, [x20] cmp x2, 8 ccmp w22, 2, 0, hi add x2, x0, x19 fdiv s0, s1, s2 bls .L16 dup v2.4s, v0.s[0] ldr q1, [x0] ldr q3, [x20] fmls v1.4s, v2.4s, v3.4s str q1, [x0] cmp w5, 1 bls .L17 ldr q1, [x0, 16] ldr q3, [x20, 16] fmls v1.4s, v2.4s, v3.4s str q1, [x0, 16] cmp w5, 2 beq .L17 mov x3, 32 mov w4, 2 .L18: ldr q3, [x20, x3] add w4, w4, 1 ldr q1, [x0, x3] fmls v1.4s, v3.4s, v2.4s str q1, [x0, x3] add x3, x3, 16 cmp w5, w4 bne .L18 .L17: cmp w10, w30 beq .L20 ldr s2, [x21, x13, lsl 2] ldr s1, [x2, x6] fmsub s1, s0, s2, s1 str s1, [x2, x6] cmp w28, w11 ble .L20 ldr s2, [x21, x14, lsl 2] ldr s1, [x2, x7] fmsub s1, s0, s2, s1 str s1, [x2, x7] cmp w28, w12 ble .L20 ldr s2, [x21, x15, lsl 2] ldr s1, [x2, x9] fmsub s1, s0, s2, s1 str s1, [x2, x9] .L20: ldr s2, [x27, x24, lsl 2] add x0, x0, 40 ldr s1, [x27, x1, lsl 2] fmsub s0, s2, s0, s1 str s0, [x27, x1, lsl 2] add x1, x1, 1 cmp w28, w1 bgt .L22 .L15: ldr w0, [sp, 272] add x24, x24, 1 add x26, x26, 1 add x21, x21, 40 add w0, w0, 1 str w0, [sp, 272] ldr w0, [sp, 104] add x20, x20, 44 add w23, w23, 1 sub x19, x19, #4 add w0, w0, 1 str w0, [sp, 104] ldr w0, [sp, 108] sub w22, w22, #1 sub w30, w30, #1 add w0, w0, 1 str w0, [sp, 108] ldr w0, [sp, 112] add w0, w0, 1 str w0, [sp, 112] ldr w0, [sp, 116] add w0, w0, 1 str w0, [sp, 116] ldr w0, [sp, 120] add w0, w0, 1 str w0, [sp, 120] ldr w0, [sp, 124] add w0, w0, 1 str w0, [sp, 124] ldr w0, [sp, 128] add w0, w0, 1 str w0, [sp, 128] ldr w0, [sp, 132] add w0, w0, 1 str w0, [sp, 132] ldr x0, [sp, 136] sub x0, x0, #44 str x0, [sp, 136] ldr w0, [sp, 276] cmp w25, w0 bne .L23 ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 ldp x23, x24, [sp, 48] .cfi_restore 24 .cfi_restore 23 ldp x25, x26, [sp, 64] .cfi_restore 26 .cfi_restore 25 .L13: mov w2, w28 mov x1, x27 ldp x27, x28, [sp, 80] ldr x0, [sp, 280] ldp x29, x30, [sp], 288 .cfi_restore 30 .cfi_restore 29 .cfi_restore 27 .cfi_restore 28 .cfi_def_cfa_offset 0 b remontee .p2align 2,,3 .L16: .cfi_def_cfa_offset 288 .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 .cfi_offset 29, -288 .cfi_offset 30, -280 fmsub s1, s2, s0, s1 sub x3, x26, x24 ldr x4, [sp, 144] str s1, [x2, x4, lsl 2] ldr s2, [x20, 4] ldr s1, [x0, x3, lsl 2] fmsub s1, s0, s2, s1 str s1, [x0, x3, lsl 2] cmp w28, w23 ble .L20 ldr s2, [x21, x18, lsl 2] ldr s1, [x0, x16, lsl 2] ldr w3, [sp, 104] fmsub s1, s0, s2, s1 str s1, [x0, x16, lsl 2] cmp w28, w3 ble .L20 ldr x3, [sp, 168] ldr s1, [x0, x17, lsl 2] ldr s2, [x21, x3, lsl 2] ldr w3, [sp, 108] fmsub s1, s0, s2, s1 str s1, [x0, x17, lsl 2] cmp w28, w3 ble .L20 ldr x3, [sp, 176] ldr s2, [x21, x3, lsl 2] ldr x3, [sp, 184] ldr s1, [x0, x3, lsl 2] fmsub s1, s0, s2, s1 str s1, [x0, x3, lsl 2] ldr w3, [sp, 112] cmp w28, w3 ble .L20 ldr x3, [sp, 192] ldr s2, [x21, x3, lsl 2] ldr x3, [sp, 200] ldr s1, [x0, x3, lsl 2] fmsub s1, s0, s2, s1 str s1, [x0, x3, lsl 2] ldr w3, [sp, 116] cmp w28, w3 ble .L20 ldr x3, [sp, 208] ldr s2, [x21, x3, lsl 2] ldr x3, [sp, 216] ldr s1, [x0, x3, lsl 2] fmsub s1, s0, s2, s1 str s1, [x0, x3, lsl 2] ldr w3, [sp, 120] cmp w28, w3 ble .L20 ldr x3, [sp, 224] ldr s2, [x21, x3, lsl 2] ldr x3, [sp, 232] ldr s1, [x0, x3, lsl 2] fmsub s1, s0, s2, s1 str s1, [x0, x3, lsl 2] ldr w3, [sp, 124] cmp w28, w3 ble .L20 ldr x3, [sp, 240] ldr s2, [x21, x3, lsl 2] ldr x3, [sp, 248] ldr s1, [x0, x3, lsl 2] fmsub s1, s0, s2, s1 str s1, [x0, x3, lsl 2] ldr w3, [sp, 128] cmp w28, w3 ble .L20 ldr x3, [sp, 152] ldr s2, [x21, x3, lsl 2] ldr x3, [sp, 256] ldr s1, [x0, x3, lsl 2] fmsub s1, s0, s2, s1 str s1, [x0, x3, lsl 2] ldr w3, [sp, 132] cmp w28, w3 ble .L20 ldr x3, [sp, 160] ldr s2, [x21, x3, lsl 2] ldr x3, [sp, 264] ldr s1, [x0, x3, lsl 2] fmsub s1, s0, s2, s1 str s1, [x0, x3, lsl 2] ldr w3, [sp, 272] cmp w28, w3 ble .L20 sxtw x3, w3 .L21: ldr s2, [x21, x3, lsl 2] ldr s1, [x2, x3, lsl 2] fmsub s1, s0, s2, s1 str s1, [x2, x3, lsl 2] add x3, x3, 1 cmp w28, w3 bgt .L21 b .L20 .cfi_endproc .LFE40: .size gauss, .-gauss .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Enter the size of the matrix: " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Filling the matrix A" .align 3 .LC3: .string "A[%d][%d] = " .align 3 .LC4: .string "%f" .align 3 .LC5: .string "Filling the matrix B" .align 3 .LC6: .string "B[%d] = " .align 3 .LC7: .string "\nThe resulting vector: [" .align 3 .LC9: .string "%f%c" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB41: .cfi_startproc sub sp, sp, #544 .cfi_def_cfa_offset 544 adrp x2, :got:__stack_chk_guard adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 stp x29, x30, [sp] .cfi_offset 29, -544 .cfi_offset 30, -536 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] .cfi_offset 19, -528 .cfi_offset 20, -520 .cfi_offset 21, -512 .cfi_offset 22, -504 .cfi_offset 23, -496 .cfi_offset 24, -488 add x24, sp, 136 str x25, [sp, 64] .cfi_offset 25, -480 ldr x3, [x2] str x3, [sp, 536] mov x3, 0 bl __printf_chk add x1, sp, 92 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts ldr w0, [sp, 92] cmp w0, 0 ble .L34 adrp x23, .LC3 adrp x19, .LC4 mov x20, x24 mov x25, x24 add x23, x23, :lo12:.LC3 add x22, x19, :lo12:.LC4 mov w21, 0 .p2align 3,,7 .L37: mov w19, 0 .p2align 3,,7 .L35: mov w3, w19 mov w2, w21 mov x1, x23 mov w0, 1 bl __printf_chk add w19, w19, 1 mov x1, x20 mov x0, x22 bl __isoc99_scanf add x20, x20, 4 ldr w0, [sp, 92] cmp w0, w19 bgt .L35 add w21, w21, 1 cmp w0, w21 ble .L34 add x25, x25, 40 mov x20, x25 b .L37 .L34: adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts ldr w22, [sp, 92] add x25, sp, 96 cmp w22, 0 ble .L38 adrp x19, .LC4 adrp x23, .LC6 mov x21, x25 add x19, x19, :lo12:.LC4 add x23, x23, :lo12:.LC6 mov w20, 0 .p2align 3,,7 .L39: mov w2, w20 mov x1, x23 mov w0, 1 bl __printf_chk mov x1, x21 mov x0, x19 bl __isoc99_scanf ldr w22, [sp, 92] add w20, w20, 1 add x21, x21, 4 cmp w22, w20 bgt .L39 .L38: mov w2, w22 mov x1, x25 mov x0, x24 bl gauss mov w2, w22 mov x1, x25 mov x0, x24 bl gauss adrp x1, .LC7 mov x22, x0 add x1, x1, :lo12:.LC7 mov w0, 1 bl __printf_chk adrp x21, .LC8 ldr w2, [sp, 92] adrp x20, .LC9 add x21, x21, :lo12:.LC8 add x20, x20, :lo12:.LC9 mov x19, 0 cmp w2, 0 ble .L41 .p2align 3,,7 .L40: sub w2, w2, #1 ldr s0, [x22, x19, lsl 2] cmp w2, w19 mov x1, x20 cset w2, eq mov w0, 1 fcvt d0, s0 add x19, x19, 1 ldrb w2, [x21, w2, sxtw] bl __printf_chk ldr w2, [sp, 92] cmp w2, w19 bgt .L40 .L41: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 536] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L54 mov w0, 0 ldp x29, x30, [sp] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldr x25, [sp, 64] add sp, sp, 544 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 25 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L54: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE41: .size main, .-main .section .rodata.str1.8 .align 3 .LC8: .string ",]" .section .text.startup .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
3202.c
#include <stdio.h> #include <math.h> #include <string.h> int prime(int a) { int i=0,l=0,k=0; for (i=1;i<=a-1;i++) { k=a%i; if (k==0) l=l+1; } if (l==1) return 1; else return 0; } int main () {int num=0; scanf ("%d",&num); while (1) {num=num+1; if (prime(num)==1) break ;} printf ("%d",num); return 0; }
.file "3202.c" .option pic .text .align 1 .globl prime .type prime, @function prime: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 mv a5,a0 sw a5,-36(s0) sw zero,-28(s0) sw zero,-24(s0) sw zero,-20(s0) li a5,1 sw a5,-28(s0) j .L2 .L4: lw a5,-36(s0) mv a4,a5 lw a5,-28(s0) remw a5,a4,a5 sw a5,-20(s0) lw a5,-20(s0) sext.w a5,a5 bne a5,zero,.L3 lw a5,-24(s0) addiw a5,a5,1 sw a5,-24(s0) .L3: lw a5,-28(s0) addiw a5,a5,1 sw a5,-28(s0) .L2: lw a5,-36(s0) mv a4,a5 lw a5,-28(s0) sext.w a4,a4 sext.w a5,a5 bgt a4,a5,.L4 lw a5,-24(s0) sext.w a4,a5 li a5,1 bne a4,a5,.L5 li a5,1 j .L6 .L5: li a5,0 .L6: mv a0,a5 ld s0,40(sp) addi sp,sp,48 jr ra .size prime, .-prime .section .rodata .align 3 .LC0: .string "%d" .text .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 sw zero,-28(s0) addi a5,s0,-28 mv a1,a5 lla a0,.LC0 call __isoc99_scanf@plt .L10: lw a5,-28(s0) addiw a5,a5,1 sext.w a5,a5 sw a5,-28(s0) lw a5,-28(s0) mv a0,a5 call prime mv a5,a0 mv a4,a5 li a5,1 beq a4,a5,.L14 j .L10 .L14: nop lw a5,-28(s0) mv a1,a5 lla a0,.LC0 call printf@plt li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L12 call __stack_chk_fail@plt .L12: mv a0,a4 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "3202.c" .option pic .text .align 1 .globl prime .type prime, @function prime: li a5,1 ble a0,a5,.L5 li a3,0 j .L4 .L3: addiw a5,a5,1 beq a0,a5,.L2 .L4: remw a4,a0,a5 bne a4,zero,.L3 addiw a3,a3,1 j .L3 .L5: li a3,0 .L2: addi a0,a3,-1 seqz a0,a0 ret .size prime, .-prime .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .text .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 8(sp) li a4, 0 sw zero,4(sp) addi a1,sp,4 lla a0,.LC0 call __isoc99_scanf@plt lw s0,4(sp) addiw s0,s0,1 li s2,1 .L8: sext.w s1,s0 mv a0,s1 call prime addiw s0,s0,1 bne a0,s2,.L8 sw s1,4(sp) mv a2,s1 lla a1,.LC0 li a0,1 call __printf_chk@plt la a5,__stack_chk_guard ld a4, 8(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L12 li a0,0 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) addi sp,sp,48 jr ra .L12: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "3202.c" .option pic .text .align 1 .globl prime .type prime, @function prime: li a5,1 ble a0,a5,.L5 li a3,0 .L4: remw a4,a0,a5 addiw a5,a5,1 bne a4,zero,.L3 addiw a3,a3,1 .L3: bne a0,a5,.L4 addi a0,a3,-1 seqz a0,a0 ret .L5: li a0,0 ret .size prime, .-prime .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd s0,16(sp) la s0,__stack_chk_guard addi a1,sp,4 lla a0,.LC0 ld a5, 0(s0) sd a5, 8(sp) li a5, 0 sd ra,24(sp) sw zero,4(sp) call __isoc99_scanf@plt lw a2,4(sp) li a0,1 .L14: mv a1,a2 addiw a2,a2,1 ble a2,a0,.L14 li a3,0 li a5,1 j .L11 .L13: mv a5,a4 .L11: remw a4,a2,a5 bne a4,zero,.L10 addiw a3,a3,1 .L10: addiw a4,a5,1 bne a1,a5,.L13 bne a3,a0,.L14 lla a1,.LC0 li a0,1 sw a2,4(sp) call __printf_chk@plt ld a4, 8(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L16 ld ra,24(sp) ld s0,16(sp) li a0,0 addi sp,sp,32 jr ra .L16: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "3202.c" .option pic .text .align 1 .globl prime .type prime, @function prime: li a5,1 ble a0,a5,.L5 li a3,0 .L4: remw a4,a0,a5 addiw a5,a5,1 bne a4,zero,.L3 addiw a3,a3,1 .L3: bne a5,a0,.L4 addi a0,a3,-1 seqz a0,a0 ret .L5: li a0,0 ret .size prime, .-prime .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd s0,16(sp) la s0,__stack_chk_guard addi a1,sp,4 lla a0,.LC0 ld a5, 0(s0) sd a5, 8(sp) li a5, 0 sd ra,24(sp) sw zero,4(sp) call __isoc99_scanf@plt lw a2,4(sp) li a0,1 .L14: mv a1,a2 addiw a2,a2,1 ble a2,a0,.L14 li a3,0 li a5,1 j .L11 .L13: mv a5,a4 .L11: remw a4,a2,a5 bne a4,zero,.L10 addiw a3,a3,1 .L10: addiw a4,a5,1 bne a5,a1,.L13 bne a3,a0,.L14 lla a1,.LC0 li a0,1 sw a2,4(sp) call __printf_chk@plt ld a4, 8(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L16 ld ra,24(sp) ld s0,16(sp) li a0,0 addi sp,sp,32 jr ra .L16: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "3202.c" .text .align 2 .global prime .type prime, %function prime: .LFB0: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, 12] str wzr, [sp, 20] str wzr, [sp, 24] str wzr, [sp, 28] mov w0, 1 str w0, [sp, 20] b .L2 .L4: ldr w0, [sp, 12] ldr w1, [sp, 20] sdiv w2, w0, w1 ldr w1, [sp, 20] mul w1, w2, w1 sub w0, w0, w1 str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 0 bne .L3 ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L3: ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L2: ldr w1, [sp, 12] ldr w0, [sp, 20] cmp w1, w0 bgt .L4 ldr w0, [sp, 24] cmp w0, 1 bne .L5 mov w0, 1 b .L6 .L5: mov w0, 0 .L6: add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size prime, .-prime .section .rodata .align 3 .LC0: .string "%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 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 24] mov x1, 0 str wzr, [sp, 20] add x0, sp, 20 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf .L10: ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] ldr w0, [sp, 20] bl prime cmp w0, 1 beq .L14 b .L10 .L14: nop ldr w0, [sp, 20] mov w1, w0 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 .L12 bl __stack_chk_fail .L12: 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 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "3202.c" .text .align 2 .global prime .type prime, %function prime: .LFB35: .cfi_startproc cmp w0, 1 ble .L5 mov w3, 0 mov w1, 1 .L4: sdiv w2, w0, w1 msub w2, w2, w1, w0 cmp w2, 0 cinc w3, w3, eq add w1, w1, 1 cmp w0, w1 bne .L4 .L2: cmp w3, 1 cset w0, eq ret .L5: mov w3, 0 b .L2 .cfi_endproc .LFE35: .size prime, .-prime .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .text .align 2 .global main .type main, %function main: .LFB36: .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 str wzr, [sp, 36] add x1, sp, 36 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr w19, [sp, 36] add w19, w19, 1 .L8: mov w20, w19 mov w0, w19 bl prime add w19, w19, 1 cmp w0, 1 bne .L8 str w20, [sp, 36] mov w2, w20 adrp x1, .LC0 add x1, x1, :lo12:.LC0 bl __printf_chk 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 bne .L12 mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L12: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE36: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "3202.c" .text .align 2 .p2align 4,,11 .global prime .type prime, %function prime: .LFB35: .cfi_startproc cmp w0, 1 ble .L5 mov w3, 0 mov w1, 1 .p2align 3,,7 .L4: sdiv w2, w0, w1 msub w2, w2, w1, w0 add w1, w1, 1 cmp w2, 0 cinc w3, w3, eq cmp w0, w1 bne .L4 cmp w3, 1 cset w0, eq ret .p2align 2,,3 .L5: mov w0, 0 ret .cfi_endproc .LFE35: .size prime, .-prime .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB36: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x2, :got:__stack_chk_guard mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] str x19, [sp, 16] .cfi_offset 19, -32 add x1, sp, 36 adrp x19, .LC0 ldr x3, [x2] str x3, [sp, 40] mov x3, 0 add x0, x19, :lo12:.LC0 str wzr, [sp, 36] bl __isoc99_scanf ldr w2, [sp, 36] .L14: mov w5, w2 add w2, w2, 1 cmp w2, 1 ble .L14 mov w0, 0 mov w1, 1 b .L11 .p2align 2,,3 .L13: mov w1, w4 .L11: sdiv w3, w2, w1 add w4, w1, 1 msub w3, w3, w1, w2 cmp w3, 0 cinc w0, w0, eq cmp w5, w1 bne .L13 cmp w0, 1 bne .L14 add x1, x19, :lo12:.LC0 str w2, [sp, 36] bl __printf_chk 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 bne .L16 mov w0, 0 ldr x19, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .L16: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE36: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "3202.c" .text .align 2 .p2align 4,,11 .global prime .type prime, %function prime: .LFB35: .cfi_startproc cmp w0, 1 ble .L5 mov w3, 0 mov w1, 1 .p2align 3,,7 .L4: sdiv w2, w0, w1 msub w2, w2, w1, w0 add w1, w1, 1 cmp w2, 0 cinc w3, w3, eq cmp w1, w0 bne .L4 cmp w3, 1 cset w0, eq ret .p2align 2,,3 .L5: mov w0, 0 ret .cfi_endproc .LFE35: .size prime, .-prime .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB36: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x2, :got:__stack_chk_guard mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] str x19, [sp, 16] .cfi_offset 19, -32 add x1, sp, 36 adrp x19, .LC0 ldr x3, [x2] str x3, [sp, 40] mov x3, 0 add x0, x19, :lo12:.LC0 str wzr, [sp, 36] bl __isoc99_scanf ldr w2, [sp, 36] .L14: mov w5, w2 add w2, w2, 1 cmp w2, 1 ble .L14 mov w0, 0 mov w1, 1 b .L11 .p2align 2,,3 .L13: mov w1, w4 .L11: sdiv w3, w2, w1 add w4, w1, 1 msub w3, w3, w1, w2 cmp w3, 0 cinc w0, w0, eq cmp w1, w5 bne .L13 cmp w0, 1 bne .L14 add x1, x19, :lo12:.LC0 str w2, [sp, 36] bl __printf_chk 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 bne .L16 mov w0, 0 ldr x19, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .L16: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE36: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
watchpoint-reuse-slot.c
/* This testcase is part of GDB, the GNU debugger. Copyright 2014-2021 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ union aligned_buf { char byte[12]; /* So that testing consistently starts on an aligned address. */ unsigned long long force_align; }; union aligned_buf buf; int main (void) { volatile int i = 0; /* Must be a single line. */ for (i = 0; i < 100000; i++); /* stepi line */ return 0; }
.file "watchpoint-reuse-slot.c" .option pic .text .globl buf .bss .align 3 .type buf, @object .size buf, 16 buf: .zero 16 .text .align 1 .globl main .type main, @function main: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sw zero,-20(s0) sw zero,-20(s0) j .L2 .L3: lw a5,-20(s0) sext.w a5,a5 addiw a5,a5,1 sext.w a5,a5 sw a5,-20(s0) .L2: lw a5,-20(s0) sext.w a5,a5 mv a4,a5 li a5,98304 addi a5,a5,1695 ble a4,a5,.L3 li a5,0 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "watchpoint-reuse-slot.c" .option pic .text .align 1 .globl main .type main, @function main: addi sp,sp,-16 sw zero,12(sp) sw zero,12(sp) lw a4,12(sp) sext.w a4,a4 li a5,98304 addi a5,a5,1695 bgt a4,a5,.L2 mv a4,a5 .L3: lw a5,12(sp) addiw a5,a5,1 sw a5,12(sp) lw a5,12(sp) sext.w a5,a5 ble a5,a4,.L3 .L2: li a0,0 addi sp,sp,16 jr ra .size main, .-main .globl buf .bss .align 3 .type buf, @object .size buf, 16 buf: .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "watchpoint-reuse-slot.c" .option pic .text .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-16 sw zero,12(sp) sw zero,12(sp) lw a5,12(sp) li a4,98304 addi a4,a4,1695 bgt a5,a4,.L2 .L3: lw a5,12(sp) addiw a5,a5,1 sw a5,12(sp) lw a5,12(sp) ble a5,a4,.L3 .L2: li a0,0 addi sp,sp,16 jr ra .size main, .-main .globl buf .bss .align 3 .type buf, @object .size buf, 16 buf: .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "watchpoint-reuse-slot.c" .option pic .text .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-16 sw zero,12(sp) sw zero,12(sp) lw a5,12(sp) li a4,98304 addi a4,a4,1695 bgt a5,a4,.L2 .L3: lw a5,12(sp) addiw a5,a5,1 sw a5,12(sp) lw a5,12(sp) ble a5,a4,.L3 .L2: li a0,0 addi sp,sp,16 jr ra .size main, .-main .globl buf .bss .align 3 .type buf, @object .size buf, 16 buf: .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "watchpoint-reuse-slot.c" .text .global buf .bss .align 3 .type buf, %object .size buf, 16 buf: .zero 16 .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str wzr, [sp, 12] str wzr, [sp, 12] b .L2 .L3: ldr w0, [sp, 12] add w0, w0, 1 str w0, [sp, 12] .L2: ldr w1, [sp, 12] mov w0, 34463 movk w0, 0x1, lsl 16 cmp w1, w0 ble .L3 mov w0, 0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "watchpoint-reuse-slot.c" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str wzr, [sp, 12] str wzr, [sp, 12] ldr w1, [sp, 12] mov w0, 34463 movk w0, 0x1, lsl 16 cmp w1, w0 bgt .L2 mov w1, w0 .L3: ldr w0, [sp, 12] add w0, w0, 1 str w0, [sp, 12] ldr w0, [sp, 12] cmp w0, w1 ble .L3 .L2: mov w0, 0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .global buf .bss .align 3 .type buf, %object .size buf, 16 buf: .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "watchpoint-reuse-slot.c" .text .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 mov w1, 34463 movk w1, 0x1, lsl 16 str wzr, [sp, 12] str wzr, [sp, 12] ldr w0, [sp, 12] cmp w0, w1 bgt .L2 .p2align 3,,7 .L3: ldr w0, [sp, 12] add w0, w0, 1 str w0, [sp, 12] ldr w0, [sp, 12] cmp w0, w1 ble .L3 .L2: mov w0, 0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .global buf .bss .align 3 .type buf, %object .size buf, 16 buf: .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "watchpoint-reuse-slot.c" .text .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 mov w1, 34463 movk w1, 0x1, lsl 16 str wzr, [sp, 12] str wzr, [sp, 12] ldr w0, [sp, 12] cmp w0, w1 bgt .L2 .p2align 3,,7 .L3: ldr w0, [sp, 12] add w0, w0, 1 str w0, [sp, 12] ldr w0, [sp, 12] cmp w0, w1 ble .L3 .L2: mov w0, 0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .global buf .bss .align 3 .type buf, %object .size buf, 16 buf: .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
sse2-extract-1.c
/* { dg-do run } */ /* { dg-options "-O2 -msse2" } */ /* { dg-require-effective-target sse2_runtime } */ extern void abort (void); typedef unsigned long long uint64_t; #define vector(elcount, type) \ __attribute__((vector_size((elcount)*sizeof(type)))) type #define FN(elcount, type, idx) \ __attribute__((noinline, noclone)) \ type f##type##elcount##_##idx (vector (elcount, type) x) { return x[idx] + 1; } #define T2(elcount, type) \ H (elcount, type) \ F (elcount, type, 0) \ F (elcount, type, 1) #define T4(elcount, type) \ T2 (elcount, type) \ F (elcount, type, 2) \ F (elcount, type, 3) #define T8(elcount, type) \ T4 (elcount, type) \ F (elcount, type, 4) \ F (elcount, type, 5) \ F (elcount, type, 6) \ F (elcount, type, 7) #define T16(elcount, type) \ T8 (elcount, type) \ F (elcount, type, 8) \ F (elcount, type, 9) \ F (elcount, type, 10) \ F (elcount, type, 11) \ F (elcount, type, 12) \ F (elcount, type, 13) \ F (elcount, type, 14) \ F (elcount, type, 15) #define T32(elcount, type) \ T16 (elcount, type) \ F (elcount, type, 16) \ F (elcount, type, 17) \ F (elcount, type, 18) \ F (elcount, type, 19) \ F (elcount, type, 20) \ F (elcount, type, 21) \ F (elcount, type, 22) \ F (elcount, type, 23) \ F (elcount, type, 24) \ F (elcount, type, 25) \ F (elcount, type, 26) \ F (elcount, type, 27) \ F (elcount, type, 28) \ F (elcount, type, 29) \ F (elcount, type, 30) \ F (elcount, type, 31) #define TESTS_SSE2 \ T2 (2, double) E \ T2 (2, uint64_t) E \ T4 (4, float) E \ T4 (4, int) E \ T8 (8, short) E \ T16 (16, char) E #define TESTS_AVX \ T4 (4, double) E \ T4 (4, uint64_t) E \ T8 (8, float) E \ T8 (8, int) E \ T16 (16, short) E \ T32 (32, char) E #ifdef __AVX__ #define TESTS TESTS_SSE2 TESTS_AVX #else #define TESTS TESTS_SSE2 #endif #define F FN #define H(elcount, type) #define E TESTS int main () { #undef F #undef H #undef E #define H(elcount, type) \ vector (elcount, type) v##type##elcount = { #define E }; #define F(elcount, type, idx) idx + 1, TESTS #undef F #undef H #undef E #define H(elcount, type) #define E #define F(elcount, type, idx) \ if (f##type##elcount##_##idx (v##type##elcount) != idx + 2) \ abort (); TESTS return 0; }
.file "sse2-extract-1.c" .option pic .text .align 1 .globl fdouble2_0 .type fdouble2_0, @function fdouble2_0: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) fld fa4,-32(s0) lla a5,.LC0 fld fa5,0(a5) fadd.d fa5,fa4,fa5 fmv.d fa0,fa5 ld s0,24(sp) addi sp,sp,32 jr ra .size fdouble2_0, .-fdouble2_0 .align 1 .globl fdouble2_1 .type fdouble2_1, @function fdouble2_1: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) fld fa4,-24(s0) lla a5,.LC0 fld fa5,0(a5) fadd.d fa5,fa4,fa5 fmv.d fa0,fa5 ld s0,24(sp) addi sp,sp,32 jr ra .size fdouble2_1, .-fdouble2_1 .align 1 .globl fuint64_t2_0 .type fuint64_t2_0, @function fuint64_t2_0: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) ld a5,-32(s0) addi a5,a5,1 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fuint64_t2_0, .-fuint64_t2_0 .align 1 .globl fuint64_t2_1 .type fuint64_t2_1, @function fuint64_t2_1: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) ld a5,-24(s0) addi a5,a5,1 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fuint64_t2_1, .-fuint64_t2_1 .align 1 .globl ffloat4_0 .type ffloat4_0, @function ffloat4_0: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) flw fa4,-32(s0) lla a5,.LC1 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fmv.s fa0,fa5 ld s0,24(sp) addi sp,sp,32 jr ra .size ffloat4_0, .-ffloat4_0 .align 1 .globl ffloat4_1 .type ffloat4_1, @function ffloat4_1: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) flw fa4,-28(s0) lla a5,.LC1 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fmv.s fa0,fa5 ld s0,24(sp) addi sp,sp,32 jr ra .size ffloat4_1, .-ffloat4_1 .align 1 .globl ffloat4_2 .type ffloat4_2, @function ffloat4_2: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) flw fa4,-24(s0) lla a5,.LC1 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fmv.s fa0,fa5 ld s0,24(sp) addi sp,sp,32 jr ra .size ffloat4_2, .-ffloat4_2 .align 1 .globl ffloat4_3 .type ffloat4_3, @function ffloat4_3: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) flw fa4,-20(s0) lla a5,.LC1 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fmv.s fa0,fa5 ld s0,24(sp) addi sp,sp,32 jr ra .size ffloat4_3, .-ffloat4_3 .align 1 .globl fint4_0 .type fint4_0, @function fint4_0: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lw a5,-32(s0) addiw a5,a5,1 sext.w a5,a5 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fint4_0, .-fint4_0 .align 1 .globl fint4_1 .type fint4_1, @function fint4_1: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lw a5,-28(s0) addiw a5,a5,1 sext.w a5,a5 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fint4_1, .-fint4_1 .align 1 .globl fint4_2 .type fint4_2, @function fint4_2: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lw a5,-24(s0) addiw a5,a5,1 sext.w a5,a5 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fint4_2, .-fint4_2 .align 1 .globl fint4_3 .type fint4_3, @function fint4_3: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lw a5,-20(s0) addiw a5,a5,1 sext.w a5,a5 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fint4_3, .-fint4_3 .align 1 .globl fshort8_0 .type fshort8_0, @function fshort8_0: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lh a5,-32(s0) slli a5,a5,48 srli a5,a5,48 addiw a5,a5,1 slli a5,a5,48 srli a5,a5,48 slliw a5,a5,16 sraiw a5,a5,16 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fshort8_0, .-fshort8_0 .align 1 .globl fshort8_1 .type fshort8_1, @function fshort8_1: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lh a5,-30(s0) slli a5,a5,48 srli a5,a5,48 addiw a5,a5,1 slli a5,a5,48 srli a5,a5,48 slliw a5,a5,16 sraiw a5,a5,16 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fshort8_1, .-fshort8_1 .align 1 .globl fshort8_2 .type fshort8_2, @function fshort8_2: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lh a5,-28(s0) slli a5,a5,48 srli a5,a5,48 addiw a5,a5,1 slli a5,a5,48 srli a5,a5,48 slliw a5,a5,16 sraiw a5,a5,16 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fshort8_2, .-fshort8_2 .align 1 .globl fshort8_3 .type fshort8_3, @function fshort8_3: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lh a5,-26(s0) slli a5,a5,48 srli a5,a5,48 addiw a5,a5,1 slli a5,a5,48 srli a5,a5,48 slliw a5,a5,16 sraiw a5,a5,16 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fshort8_3, .-fshort8_3 .align 1 .globl fshort8_4 .type fshort8_4, @function fshort8_4: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lh a5,-24(s0) slli a5,a5,48 srli a5,a5,48 addiw a5,a5,1 slli a5,a5,48 srli a5,a5,48 slliw a5,a5,16 sraiw a5,a5,16 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fshort8_4, .-fshort8_4 .align 1 .globl fshort8_5 .type fshort8_5, @function fshort8_5: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lh a5,-22(s0) slli a5,a5,48 srli a5,a5,48 addiw a5,a5,1 slli a5,a5,48 srli a5,a5,48 slliw a5,a5,16 sraiw a5,a5,16 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fshort8_5, .-fshort8_5 .align 1 .globl fshort8_6 .type fshort8_6, @function fshort8_6: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lh a5,-20(s0) slli a5,a5,48 srli a5,a5,48 addiw a5,a5,1 slli a5,a5,48 srli a5,a5,48 slliw a5,a5,16 sraiw a5,a5,16 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fshort8_6, .-fshort8_6 .align 1 .globl fshort8_7 .type fshort8_7, @function fshort8_7: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lh a5,-18(s0) slli a5,a5,48 srli a5,a5,48 addiw a5,a5,1 slli a5,a5,48 srli a5,a5,48 slliw a5,a5,16 sraiw a5,a5,16 mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fshort8_7, .-fshort8_7 .align 1 .globl fchar16_0 .type fchar16_0, @function fchar16_0: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-32(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_0, .-fchar16_0 .align 1 .globl fchar16_1 .type fchar16_1, @function fchar16_1: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-31(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_1, .-fchar16_1 .align 1 .globl fchar16_2 .type fchar16_2, @function fchar16_2: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-30(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_2, .-fchar16_2 .align 1 .globl fchar16_3 .type fchar16_3, @function fchar16_3: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-29(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_3, .-fchar16_3 .align 1 .globl fchar16_4 .type fchar16_4, @function fchar16_4: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-28(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_4, .-fchar16_4 .align 1 .globl fchar16_5 .type fchar16_5, @function fchar16_5: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-27(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_5, .-fchar16_5 .align 1 .globl fchar16_6 .type fchar16_6, @function fchar16_6: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-26(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_6, .-fchar16_6 .align 1 .globl fchar16_7 .type fchar16_7, @function fchar16_7: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-25(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_7, .-fchar16_7 .align 1 .globl fchar16_8 .type fchar16_8, @function fchar16_8: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-24(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_8, .-fchar16_8 .align 1 .globl fchar16_9 .type fchar16_9, @function fchar16_9: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-23(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_9, .-fchar16_9 .align 1 .globl fchar16_10 .type fchar16_10, @function fchar16_10: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-22(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_10, .-fchar16_10 .align 1 .globl fchar16_11 .type fchar16_11, @function fchar16_11: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-21(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_11, .-fchar16_11 .align 1 .globl fchar16_12 .type fchar16_12, @function fchar16_12: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-20(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_12, .-fchar16_12 .align 1 .globl fchar16_13 .type fchar16_13, @function fchar16_13: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-19(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_13, .-fchar16_13 .align 1 .globl fchar16_14 .type fchar16_14, @function fchar16_14: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-18(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_14, .-fchar16_14 .align 1 .globl fchar16_15 .type fchar16_15, @function fchar16_15: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 sd a0,-32(s0) sd a1,-24(s0) lbu a5,-17(s0) addiw a5,a5,1 andi a5,a5,0xff mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size fchar16_15, .-fchar16_15 .align 1 .globl main .type main, @function main: addi sp,sp,-112 sd ra,104(sp) sd s0,96(sp) addi s0,sp,112 lla a5,.LC0 fld fa5,0(a5) fsd fa5,-112(s0) lla a5,.LC2 fld fa5,0(a5) fsd fa5,-104(s0) lla a5,.LC3 ld a4,0(a5) sd a4,-96(s0) ld a5,8(a5) sd a5,-88(s0) lla a5,.LC1 flw fa5,0(a5) fsw fa5,-80(s0) lla a5,.LC4 flw fa5,0(a5) fsw fa5,-76(s0) lla a5,.LC5 flw fa5,0(a5) fsw fa5,-72(s0) lla a5,.LC6 flw fa5,0(a5) fsw fa5,-68(s0) lla a5,.LC7 ld a4,0(a5) sd a4,-64(s0) ld a5,8(a5) sd a5,-56(s0) lla a5,.LC8 ld a4,0(a5) sd a4,-48(s0) ld a5,8(a5) sd a5,-40(s0) lla a5,.LC9 ld a4,0(a5) sd a4,-32(s0) ld a5,8(a5) sd a5,-24(s0) ld a0,-112(s0) ld a1,-104(s0) call fdouble2_0 fmv.d fa4,fa0 lla a5,.LC2 fld fa5,0(a5) feq.d a5,fa4,fa5 bne a5,zero,.L74 call abort@plt .L74: ld a0,-112(s0) ld a1,-104(s0) call fdouble2_1 fmv.d fa4,fa0 lla a5,.LC10 fld fa5,0(a5) feq.d a5,fa4,fa5 bne a5,zero,.L75 call abort@plt .L75: ld a0,-96(s0) ld a1,-88(s0) call fuint64_t2_0 mv a4,a0 li a5,2 beq a4,a5,.L76 call abort@plt .L76: ld a0,-96(s0) ld a1,-88(s0) call fuint64_t2_1 mv a4,a0 li a5,3 beq a4,a5,.L77 call abort@plt .L77: ld a0,-80(s0) ld a1,-72(s0) call ffloat4_0 fmv.s fa4,fa0 lla a5,.LC4 flw fa5,0(a5) feq.s a5,fa4,fa5 bne a5,zero,.L78 call abort@plt .L78: ld a0,-80(s0) ld a1,-72(s0) call ffloat4_1 fmv.s fa4,fa0 lla a5,.LC5 flw fa5,0(a5) feq.s a5,fa4,fa5 bne a5,zero,.L79 call abort@plt .L79: ld a0,-80(s0) ld a1,-72(s0) call ffloat4_2 fmv.s fa4,fa0 lla a5,.LC6 flw fa5,0(a5) feq.s a5,fa4,fa5 bne a5,zero,.L80 call abort@plt .L80: ld a0,-80(s0) ld a1,-72(s0) call ffloat4_3 fmv.s fa4,fa0 lla a5,.LC11 flw fa5,0(a5) feq.s a5,fa4,fa5 bne a5,zero,.L81 call abort@plt .L81: ld a0,-64(s0) ld a1,-56(s0) call fint4_0 mv a5,a0 mv a4,a5 li a5,2 beq a4,a5,.L82 call abort@plt .L82: ld a0,-64(s0) ld a1,-56(s0) call fint4_1 mv a5,a0 mv a4,a5 li a5,3 beq a4,a5,.L83 call abort@plt .L83: ld a0,-64(s0) ld a1,-56(s0) call fint4_2 mv a5,a0 mv a4,a5 li a5,4 beq a4,a5,.L84 call abort@plt .L84: ld a0,-64(s0) ld a1,-56(s0) call fint4_3 mv a5,a0 mv a4,a5 li a5,5 beq a4,a5,.L85 call abort@plt .L85: ld a0,-48(s0) ld a1,-40(s0) call fshort8_0 mv a5,a0 sext.w a4,a5 li a5,2 beq a4,a5,.L86 call abort@plt .L86: ld a0,-48(s0) ld a1,-40(s0) call fshort8_1 mv a5,a0 sext.w a4,a5 li a5,3 beq a4,a5,.L87 call abort@plt .L87: ld a0,-48(s0) ld a1,-40(s0) call fshort8_2 mv a5,a0 sext.w a4,a5 li a5,4 beq a4,a5,.L88 call abort@plt .L88: ld a0,-48(s0) ld a1,-40(s0) call fshort8_3 mv a5,a0 sext.w a4,a5 li a5,5 beq a4,a5,.L89 call abort@plt .L89: ld a0,-48(s0) ld a1,-40(s0) call fshort8_4 mv a5,a0 sext.w a4,a5 li a5,6 beq a4,a5,.L90 call abort@plt .L90: ld a0,-48(s0) ld a1,-40(s0) call fshort8_5 mv a5,a0 sext.w a4,a5 li a5,7 beq a4,a5,.L91 call abort@plt .L91: ld a0,-48(s0) ld a1,-40(s0) call fshort8_6 mv a5,a0 sext.w a4,a5 li a5,8 beq a4,a5,.L92 call abort@plt .L92: ld a0,-48(s0) ld a1,-40(s0) call fshort8_7 mv a5,a0 sext.w a4,a5 li a5,9 beq a4,a5,.L93 call abort@plt .L93: ld a0,-32(s0) ld a1,-24(s0) call fchar16_0 mv a5,a0 mv a4,a5 li a5,2 beq a4,a5,.L94 call abort@plt .L94: ld a0,-32(s0) ld a1,-24(s0) call fchar16_1 mv a5,a0 mv a4,a5 li a5,3 beq a4,a5,.L95 call abort@plt .L95: ld a0,-32(s0) ld a1,-24(s0) call fchar16_2 mv a5,a0 mv a4,a5 li a5,4 beq a4,a5,.L96 call abort@plt .L96: ld a0,-32(s0) ld a1,-24(s0) call fchar16_3 mv a5,a0 mv a4,a5 li a5,5 beq a4,a5,.L97 call abort@plt .L97: ld a0,-32(s0) ld a1,-24(s0) call fchar16_4 mv a5,a0 mv a4,a5 li a5,6 beq a4,a5,.L98 call abort@plt .L98: ld a0,-32(s0) ld a1,-24(s0) call fchar16_5 mv a5,a0 mv a4,a5 li a5,7 beq a4,a5,.L99 call abort@plt .L99: ld a0,-32(s0) ld a1,-24(s0) call fchar16_6 mv a5,a0 mv a4,a5 li a5,8 beq a4,a5,.L100 call abort@plt .L100: ld a0,-32(s0) ld a1,-24(s0) call fchar16_7 mv a5,a0 mv a4,a5 li a5,9 beq a4,a5,.L101 call abort@plt .L101: ld a0,-32(s0) ld a1,-24(s0) call fchar16_8 mv a5,a0 mv a4,a5 li a5,10 beq a4,a5,.L102 call abort@plt .L102: ld a0,-32(s0) ld a1,-24(s0) call fchar16_9 mv a5,a0 mv a4,a5 li a5,11 beq a4,a5,.L103 call abort@plt .L103: ld a0,-32(s0) ld a1,-24(s0) call fchar16_10 mv a5,a0 mv a4,a5 li a5,12 beq a4,a5,.L104 call abort@plt .L104: ld a0,-32(s0) ld a1,-24(s0) call fchar16_11 mv a5,a0 mv a4,a5 li a5,13 beq a4,a5,.L105 call abort@plt .L105: ld a0,-32(s0) ld a1,-24(s0) call fchar16_12 mv a5,a0 mv a4,a5 li a5,14 beq a4,a5,.L106 call abort@plt .L106: ld a0,-32(s0) ld a1,-24(s0) call fchar16_13 mv a5,a0 mv a4,a5 li a5,15 beq a4,a5,.L107 call abort@plt .L107: ld a0,-32(s0) ld a1,-24(s0) call fchar16_14 mv a5,a0 mv a4,a5 li a5,16 beq a4,a5,.L108 call abort@plt .L108: ld a0,-32(s0) ld a1,-24(s0) call fchar16_15 mv a5,a0 mv a4,a5 li a5,17 beq a4,a5,.L109 call abort@plt .L109: li a5,0 mv a0,a5 ld ra,104(sp) ld s0,96(sp) addi sp,sp,112 jr ra .size main, .-main .section .rodata .align 3 .LC0: .word 0 .word 1072693248 .align 2 .LC1: .word 1065353216 .align 3 .LC2: .word 0 .word 1073741824 .align 4 .LC3: .dword 1 .dword 2 .align 2 .LC4: .word 1073741824 .align 2 .LC5: .word 1077936128 .align 2 .LC6: .word 1082130432 .align 4 .LC7: .dword 8589934593 .dword 17179869187 .align 4 .LC8: .dword 1125912791875585 .dword 2251829878849541 .align 4 .LC9: .dword 578437695752307201 .dword 1157159078456920585 .align 3 .LC10: .word 0 .word 1074266112 .align 2 .LC11: .word 1084227584 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "sse2-extract-1.c" .option pic .text .align 1 .globl fdouble2_0 .type fdouble2_0, @function fdouble2_0: addi sp,sp,-16 fld fa0,.LC0,a5 fmv.d.x fa5,a0 fadd.d fa0,fa5,fa0 addi sp,sp,16 jr ra .size fdouble2_0, .-fdouble2_0 .align 1 .globl fdouble2_1 .type fdouble2_1, @function fdouble2_1: addi sp,sp,-16 fld fa0,.LC0,a5 fmv.d.x fa5,a1 fadd.d fa0,fa5,fa0 addi sp,sp,16 jr ra .size fdouble2_1, .-fdouble2_1 .align 1 .globl fuint64_t2_0 .type fuint64_t2_0, @function fuint64_t2_0: addi a0,a0,1 ret .size fuint64_t2_0, .-fuint64_t2_0 .align 1 .globl fuint64_t2_1 .type fuint64_t2_1, @function fuint64_t2_1: addi a0,a1,1 ret .size fuint64_t2_1, .-fuint64_t2_1 .align 1 .globl ffloat4_0 .type ffloat4_0, @function ffloat4_0: addi sp,sp,-16 flw fa0,.LC1,a5 fmv.w.x fa5,a0 fadd.s fa0,fa5,fa0 addi sp,sp,16 jr ra .size ffloat4_0, .-ffloat4_0 .align 1 .globl ffloat4_1 .type ffloat4_1, @function ffloat4_1: addi sp,sp,-16 srli a0,a0,32 flw fa0,.LC1,a5 fmv.w.x fa5,a0 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_1, .-ffloat4_1 .align 1 .globl ffloat4_2 .type ffloat4_2, @function ffloat4_2: addi sp,sp,-16 flw fa0,.LC1,a5 fmv.w.x fa5,a1 fadd.s fa0,fa5,fa0 addi sp,sp,16 jr ra .size ffloat4_2, .-ffloat4_2 .align 1 .globl ffloat4_3 .type ffloat4_3, @function ffloat4_3: addi sp,sp,-16 srli a1,a1,32 flw fa0,.LC1,a5 fmv.w.x fa5,a1 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_3, .-ffloat4_3 .align 1 .globl fint4_0 .type fint4_0, @function fint4_0: addiw a0,a0,1 ret .size fint4_0, .-fint4_0 .align 1 .globl fint4_1 .type fint4_1, @function fint4_1: srai a0,a0,32 addiw a0,a0,1 ret .size fint4_1, .-fint4_1 .align 1 .globl fint4_2 .type fint4_2, @function fint4_2: addiw a0,a1,1 ret .size fint4_2, .-fint4_2 .align 1 .globl fint4_3 .type fint4_3, @function fint4_3: srai a0,a1,32 addiw a0,a0,1 ret .size fint4_3, .-fint4_3 .align 1 .globl fshort8_0 .type fshort8_0, @function fshort8_0: addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_0, .-fshort8_0 .align 1 .globl fshort8_1 .type fshort8_1, @function fshort8_1: sraiw a0,a0,16 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_1, .-fshort8_1 .align 1 .globl fshort8_2 .type fshort8_2, @function fshort8_2: slli a0,a0,16 srai a0,a0,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_2, .-fshort8_2 .align 1 .globl fshort8_3 .type fshort8_3, @function fshort8_3: srai a0,a0,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_3, .-fshort8_3 .align 1 .globl fshort8_4 .type fshort8_4, @function fshort8_4: addiw a0,a1,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_4, .-fshort8_4 .align 1 .globl fshort8_5 .type fshort8_5, @function fshort8_5: sraiw a0,a1,16 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_5, .-fshort8_5 .align 1 .globl fshort8_6 .type fshort8_6, @function fshort8_6: slli a0,a1,16 srai a0,a0,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_6, .-fshort8_6 .align 1 .globl fshort8_7 .type fshort8_7, @function fshort8_7: srai a0,a1,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_7, .-fshort8_7 .align 1 .globl fchar16_0 .type fchar16_0, @function fchar16_0: addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_0, .-fchar16_0 .align 1 .globl fchar16_1 .type fchar16_1, @function fchar16_1: srli a0,a0,8 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_1, .-fchar16_1 .align 1 .globl fchar16_2 .type fchar16_2, @function fchar16_2: srli a0,a0,16 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_2, .-fchar16_2 .align 1 .globl fchar16_3 .type fchar16_3, @function fchar16_3: srli a0,a0,24 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_3, .-fchar16_3 .align 1 .globl fchar16_4 .type fchar16_4, @function fchar16_4: srli a0,a0,32 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_4, .-fchar16_4 .align 1 .globl fchar16_5 .type fchar16_5, @function fchar16_5: srli a0,a0,40 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_5, .-fchar16_5 .align 1 .globl fchar16_6 .type fchar16_6, @function fchar16_6: srli a0,a0,48 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_6, .-fchar16_6 .align 1 .globl fchar16_7 .type fchar16_7, @function fchar16_7: srli a0,a0,56 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_7, .-fchar16_7 .align 1 .globl fchar16_8 .type fchar16_8, @function fchar16_8: addiw a0,a1,1 andi a0,a0,0xff ret .size fchar16_8, .-fchar16_8 .align 1 .globl fchar16_9 .type fchar16_9, @function fchar16_9: srli a0,a1,8 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_9, .-fchar16_9 .align 1 .globl fchar16_10 .type fchar16_10, @function fchar16_10: srli a0,a1,16 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_10, .-fchar16_10 .align 1 .globl fchar16_11 .type fchar16_11, @function fchar16_11: srli a0,a1,24 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_11, .-fchar16_11 .align 1 .globl fchar16_12 .type fchar16_12, @function fchar16_12: srli a0,a1,32 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_12, .-fchar16_12 .align 1 .globl fchar16_13 .type fchar16_13, @function fchar16_13: srli a0,a1,40 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_13, .-fchar16_13 .align 1 .globl fchar16_14 .type fchar16_14, @function fchar16_14: srli a0,a1,48 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_14, .-fchar16_14 .align 1 .globl fchar16_15 .type fchar16_15, @function fchar16_15: srli a0,a1,56 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_15, .-fchar16_15 .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) fsd fs0,24(sp) ld a0,.LC0 sd a0,0(sp) ld s0,.LC2 sd s0,8(sp) mv a1,s0 call fdouble2_0 fmv.d.x fa5,s0 feq.d a5,fa0,fa5 beq a5,zero,.L81 ld a0,.LC0 sd a0,0(sp) ld a1,.LC2 sd a1,8(sp) call fdouble2_1 fld fa5,.LC3,a5 feq.d a5,fa0,fa5 beq a5,zero,.L82 lla a5,.LC4 ld a0,0(a5) ld a1,8(a5) call fuint64_t2_0 li a5,2 bne a0,a5,.L83 lla a5,.LC4 ld a0,0(a5) ld a1,8(a5) call fuint64_t2_1 li a5,3 bne a0,a5,.L84 flw fa5,.LC1,a5 fsw fa5,0(sp) flw fs0,.LC5,a5 fsw fs0,4(sp) flw fa5,.LC6,a5 fsw fa5,8(sp) flw fa5,.LC7,a5 fsw fa5,12(sp) ld a0,0(sp) ld a1,8(sp) call ffloat4_0 feq.s a5,fa0,fs0 beq a5,zero,.L85 flw fa5,.LC1,a5 fsw fa5,0(sp) flw fa5,.LC5,a5 fsw fa5,4(sp) flw fs0,.LC6,a5 fsw fs0,8(sp) flw fa5,.LC7,a5 fsw fa5,12(sp) ld a0,0(sp) ld a1,8(sp) call ffloat4_1 feq.s a5,fa0,fs0 beq a5,zero,.L86 flw fa5,.LC1,a5 fsw fa5,0(sp) flw fa5,.LC5,a5 fsw fa5,4(sp) flw fa5,.LC6,a5 fsw fa5,8(sp) flw fs0,.LC7,a5 fsw fs0,12(sp) ld a0,0(sp) ld a1,8(sp) call ffloat4_2 feq.s a5,fa0,fs0 beq a5,zero,.L87 flw fa5,.LC1,a5 fsw fa5,0(sp) flw fa5,.LC5,a5 fsw fa5,4(sp) flw fa5,.LC6,a5 fsw fa5,8(sp) flw fa5,.LC7,a5 fsw fa5,12(sp) ld a0,0(sp) ld a1,8(sp) call ffloat4_3 flw fa5,.LC8,a5 feq.s a5,fa0,fa5 beq a5,zero,.L88 lla a5,.LC9 ld a0,0(a5) ld a1,8(a5) call fint4_0 li a5,2 bne a0,a5,.L89 lla a5,.LC9 ld a0,0(a5) ld a1,8(a5) call fint4_1 li a5,3 bne a0,a5,.L90 lla a5,.LC9 ld a0,0(a5) ld a1,8(a5) call fint4_2 li a5,4 bne a0,a5,.L91 lla a5,.LC9 ld a0,0(a5) ld a1,8(a5) call fint4_3 li a5,5 bne a0,a5,.L92 lla a5,.LC10 ld a0,0(a5) ld a1,8(a5) call fshort8_0 sext.w a0,a0 li a5,2 bne a0,a5,.L93 lla a5,.LC10 ld a0,0(a5) ld a1,8(a5) call fshort8_1 sext.w a0,a0 li a5,3 bne a0,a5,.L94 lla a5,.LC10 ld a0,0(a5) ld a1,8(a5) call fshort8_2 sext.w a0,a0 li a5,4 bne a0,a5,.L95 lla a5,.LC10 ld a0,0(a5) ld a1,8(a5) call fshort8_3 sext.w a0,a0 li a5,5 bne a0,a5,.L96 lla a5,.LC10 ld a0,0(a5) ld a1,8(a5) call fshort8_4 sext.w a0,a0 li a5,6 bne a0,a5,.L97 lla a5,.LC10 ld a0,0(a5) ld a1,8(a5) call fshort8_5 sext.w a0,a0 li a5,7 bne a0,a5,.L98 lla a5,.LC10 ld a0,0(a5) ld a1,8(a5) call fshort8_6 sext.w a0,a0 li a5,8 bne a0,a5,.L99 lla a5,.LC10 ld a0,0(a5) ld a1,8(a5) call fshort8_7 sext.w a0,a0 li a5,9 bne a0,a5,.L100 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_0 li a5,2 bne a0,a5,.L101 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_1 li a5,3 bne a0,a5,.L102 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_2 li a5,4 bne a0,a5,.L103 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_3 li a5,5 bne a0,a5,.L104 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_4 li a5,6 bne a0,a5,.L105 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_5 li a5,7 bne a0,a5,.L106 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_6 li a5,8 bne a0,a5,.L107 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_7 li a5,9 bne a0,a5,.L108 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_8 li a5,10 bne a0,a5,.L109 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_9 li a5,11 bne a0,a5,.L110 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_10 li a5,12 bne a0,a5,.L111 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_11 li a5,13 bne a0,a5,.L112 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_12 li a5,14 bne a0,a5,.L113 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_13 li a5,15 bne a0,a5,.L114 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_14 li a5,16 bne a0,a5,.L115 lla a5,.LC11 ld a0,0(a5) ld a1,8(a5) call fchar16_15 li a5,17 bne a0,a5,.L116 li a0,0 ld ra,40(sp) ld s0,32(sp) fld fs0,24(sp) addi sp,sp,48 jr ra .L81: call abort@plt .L82: call abort@plt .L83: call abort@plt .L84: call abort@plt .L85: call abort@plt .L86: call abort@plt .L87: call abort@plt .L88: call abort@plt .L89: call abort@plt .L90: call abort@plt .L91: call abort@plt .L92: call abort@plt .L93: call abort@plt .L94: call abort@plt .L95: call abort@plt .L96: call abort@plt .L97: call abort@plt .L98: call abort@plt .L99: call abort@plt .L100: call abort@plt .L101: call abort@plt .L102: call abort@plt .L103: call abort@plt .L104: call abort@plt .L105: call abort@plt .L106: call abort@plt .L107: call abort@plt .L108: call abort@plt .L109: call abort@plt .L110: call abort@plt .L111: call abort@plt .L112: call abort@plt .L113: call abort@plt .L114: call abort@plt .L115: call abort@plt .L116: call abort@plt .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 0 .word 1072693248 .section .rodata.cst4,"aM",@progbits,4 .align 2 .LC1: .word 1065353216 .section .rodata.cst8 .align 3 .LC2: .word 0 .word 1073741824 .align 3 .LC3: .word 0 .word 1074266112 .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC4: .dword 1 .dword 2 .set .LC5,.LC2+4 .section .rodata.cst4 .align 2 .LC6: .word 1077936128 .align 2 .LC7: .word 1082130432 .align 2 .LC8: .word 1084227584 .section .rodata.cst16 .align 4 .LC9: .dword 8589934593 .dword 17179869187 .align 4 .LC10: .dword 1125912791875585 .dword 2251829878849541 .align 4 .LC11: .dword 578437695752307201 .dword 1157159078456920585 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "sse2-extract-1.c" .option pic .text .align 1 .globl fdouble2_0 .type fdouble2_0, @function fdouble2_0: fmv.d.x fa0,a0 addi sp,sp,-16 fld fa5,.LC0,a5 fadd.d fa0,fa0,fa5 addi sp,sp,16 jr ra .size fdouble2_0, .-fdouble2_0 .align 1 .globl fdouble2_1 .type fdouble2_1, @function fdouble2_1: fmv.d.x fa0,a1 addi sp,sp,-16 fld fa5,.LC0,a5 fadd.d fa0,fa0,fa5 addi sp,sp,16 jr ra .size fdouble2_1, .-fdouble2_1 .align 1 .globl fuint64_t2_0 .type fuint64_t2_0, @function fuint64_t2_0: addi a0,a0,1 ret .size fuint64_t2_0, .-fuint64_t2_0 .align 1 .globl fuint64_t2_1 .type fuint64_t2_1, @function fuint64_t2_1: addi a0,a1,1 ret .size fuint64_t2_1, .-fuint64_t2_1 .align 1 .globl ffloat4_0 .type ffloat4_0, @function ffloat4_0: fmv.w.x fa0,a0 addi sp,sp,-16 flw fa5,.LC1,a5 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_0, .-ffloat4_0 .align 1 .globl ffloat4_1 .type ffloat4_1, @function ffloat4_1: srli a0,a0,32 fmv.w.x fa5,a0 addi sp,sp,-16 flw fa0,.LC1,a5 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_1, .-ffloat4_1 .align 1 .globl ffloat4_2 .type ffloat4_2, @function ffloat4_2: fmv.w.x fa0,a1 addi sp,sp,-16 flw fa5,.LC1,a5 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_2, .-ffloat4_2 .align 1 .globl ffloat4_3 .type ffloat4_3, @function ffloat4_3: srli a1,a1,32 fmv.w.x fa5,a1 addi sp,sp,-16 flw fa0,.LC1,a5 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_3, .-ffloat4_3 .align 1 .globl fint4_0 .type fint4_0, @function fint4_0: addiw a0,a0,1 ret .size fint4_0, .-fint4_0 .align 1 .globl fint4_1 .type fint4_1, @function fint4_1: srai a0,a0,32 addiw a0,a0,1 ret .size fint4_1, .-fint4_1 .align 1 .globl fint4_2 .type fint4_2, @function fint4_2: addiw a0,a1,1 ret .size fint4_2, .-fint4_2 .align 1 .globl fint4_3 .type fint4_3, @function fint4_3: srai a0,a1,32 addiw a0,a0,1 ret .size fint4_3, .-fint4_3 .align 1 .globl fshort8_0 .type fshort8_0, @function fshort8_0: addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_0, .-fshort8_0 .align 1 .globl fshort8_1 .type fshort8_1, @function fshort8_1: sraiw a0,a0,16 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_1, .-fshort8_1 .align 1 .globl fshort8_2 .type fshort8_2, @function fshort8_2: slli a0,a0,16 srai a0,a0,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_2, .-fshort8_2 .align 1 .globl fshort8_3 .type fshort8_3, @function fshort8_3: srai a0,a0,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_3, .-fshort8_3 .align 1 .globl fshort8_4 .type fshort8_4, @function fshort8_4: addiw a0,a1,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_4, .-fshort8_4 .align 1 .globl fshort8_5 .type fshort8_5, @function fshort8_5: sraiw a0,a1,16 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_5, .-fshort8_5 .align 1 .globl fshort8_6 .type fshort8_6, @function fshort8_6: slli a0,a1,16 srai a0,a0,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_6, .-fshort8_6 .align 1 .globl fshort8_7 .type fshort8_7, @function fshort8_7: srai a0,a1,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_7, .-fshort8_7 .align 1 .globl fchar16_0 .type fchar16_0, @function fchar16_0: addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_0, .-fchar16_0 .align 1 .globl fchar16_1 .type fchar16_1, @function fchar16_1: srli a0,a0,8 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_1, .-fchar16_1 .align 1 .globl fchar16_2 .type fchar16_2, @function fchar16_2: srli a0,a0,16 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_2, .-fchar16_2 .align 1 .globl fchar16_3 .type fchar16_3, @function fchar16_3: srli a0,a0,24 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_3, .-fchar16_3 .align 1 .globl fchar16_4 .type fchar16_4, @function fchar16_4: srli a0,a0,32 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_4, .-fchar16_4 .align 1 .globl fchar16_5 .type fchar16_5, @function fchar16_5: srli a0,a0,40 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_5, .-fchar16_5 .align 1 .globl fchar16_6 .type fchar16_6, @function fchar16_6: srli a0,a0,48 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_6, .-fchar16_6 .align 1 .globl fchar16_7 .type fchar16_7, @function fchar16_7: srli a0,a0,56 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_7, .-fchar16_7 .align 1 .globl fchar16_8 .type fchar16_8, @function fchar16_8: addiw a0,a1,1 andi a0,a0,0xff ret .size fchar16_8, .-fchar16_8 .align 1 .globl fchar16_9 .type fchar16_9, @function fchar16_9: srli a0,a1,8 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_9, .-fchar16_9 .align 1 .globl fchar16_10 .type fchar16_10, @function fchar16_10: srli a0,a1,16 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_10, .-fchar16_10 .align 1 .globl fchar16_11 .type fchar16_11, @function fchar16_11: srli a0,a1,24 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_11, .-fchar16_11 .align 1 .globl fchar16_12 .type fchar16_12, @function fchar16_12: srli a0,a1,32 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_12, .-fchar16_12 .align 1 .globl fchar16_13 .type fchar16_13, @function fchar16_13: srli a0,a1,40 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_13, .-fchar16_13 .align 1 .globl fchar16_14 .type fchar16_14, @function fchar16_14: srli a0,a1,48 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_14, .-fchar16_14 .align 1 .globl fchar16_15 .type fchar16_15, @function fchar16_15: srli a0,a1,56 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_15, .-fchar16_15 .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-112 ld a5,.LC0 sd s0,96(sp) ld s0,.LC2 mv a0,a5 mv a1,s0 sd a5,16(sp) sd ra,104(sp) sd s1,88(sp) sd s2,80(sp) sd s3,72(sp) sd s4,64(sp) fsd fs0,56(sp) fsd fs1,48(sp) fsd fs2,40(sp) sd s0,24(sp) call fdouble2_0 fmv.d.x fa5,s0 feq.d a5,fa0,fa5 beq a5,zero,.L46 ld a0,16(sp) ld a1,24(sp) call fdouble2_1 fld fa5,.LC3,a5 feq.d a5,fa0,fa5 beq a5,zero,.L46 lla a5,.LC4 ld s1,0(a5) ld s0,8(a5) mv a0,s1 mv a1,s0 call fuint64_t2_0 li a5,2 mv s2,a0 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fuint64_t2_1 li a5,3 mv s1,a0 bne a0,a5,.L46 flw fa5,.LC1,a5 flw fs2,.LC5,a5 flw fs1,.LC6,a5 flw fs0,.LC7,a5 fsw fa5,0(sp) fsw fs2,4(sp) fsw fs1,8(sp) fsw fs0,12(sp) ld a0,0(sp) ld a1,8(sp) call ffloat4_0 feq.s a5,fa0,fs2 beq a5,zero,.L46 ld a0,0(sp) ld a1,8(sp) call ffloat4_1 feq.s a5,fa0,fs1 beq a5,zero,.L46 ld a0,0(sp) ld a1,8(sp) call ffloat4_2 feq.s a5,fa0,fs0 beq a5,zero,.L46 ld a0,0(sp) ld a1,8(sp) call ffloat4_3 flw fa5,.LC8,a5 feq.s a5,fa0,fa5 beq a5,zero,.L46 lla s0,.LC9 ld s4,0(s0) ld s3,8(s0) mv a0,s4 mv a1,s3 call fint4_0 bne a0,s2,.L46 mv a0,s4 mv a1,s3 call fint4_1 bne a0,s1,.L46 mv a1,s3 mv a0,s4 call fint4_2 li a5,4 mv s0,s3 mv s3,a0 bne a0,a5,.L46 mv a0,s4 mv a1,s0 call fint4_3 li a5,5 mv s2,a0 bne a0,a5,.L46 lla a5,.LC10 ld s1,0(a5) ld s0,8(a5) mv a0,s1 mv a1,s0 call fshort8_0 sext.w a0,a0 li a5,2 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_1 sext.w a0,a0 li a5,3 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_2 sext.w a0,a0 bne a0,s3,.L46 mv a0,s1 mv a1,s0 call fshort8_3 sext.w a0,a0 bne a0,s2,.L46 mv a0,s1 mv a1,s0 call fshort8_4 sext.w a0,a0 li a5,6 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_5 sext.w a0,a0 li a5,7 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_6 sext.w a0,a0 li a5,8 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_7 sext.w a0,a0 li a5,9 bne a0,a5,.L46 lla s2,.LC11 ld s1,0(s2) ld s0,8(s2) mv a0,s1 mv a1,s0 call fchar16_0 li a5,2 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_1 li a5,3 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_2 li a5,4 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_3 li a5,5 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_4 li a5,6 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_5 li a5,7 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_6 li a5,8 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_7 li a5,9 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_8 li a5,10 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_9 li a5,11 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_10 li a5,12 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_11 li a5,13 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_12 li a5,14 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_13 li a5,15 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_14 li a5,16 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_15 li a5,17 bne a0,a5,.L46 ld ra,104(sp) ld s0,96(sp) ld s1,88(sp) ld s2,80(sp) ld s3,72(sp) ld s4,64(sp) fld fs0,56(sp) fld fs1,48(sp) fld fs2,40(sp) li a0,0 addi sp,sp,112 jr ra .L46: call abort@plt .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 0 .word 1072693248 .section .rodata.cst4,"aM",@progbits,4 .align 2 .LC1: .word 1065353216 .section .rodata.cst8 .align 3 .LC2: .word 0 .word 1073741824 .align 3 .LC3: .word 0 .word 1074266112 .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC4: .dword 1 .dword 2 .set .LC5,.LC2+4 .section .rodata.cst4 .align 2 .LC6: .word 1077936128 .align 2 .LC7: .word 1082130432 .align 2 .LC8: .word 1084227584 .section .rodata.cst16 .align 4 .LC9: .dword 8589934593 .dword 17179869187 .align 4 .LC10: .dword 1125912791875585 .dword 2251829878849541 .align 4 .LC11: .dword 578437695752307201 .dword 1157159078456920585 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "sse2-extract-1.c" .option pic .text .align 1 .globl fdouble2_0 .type fdouble2_0, @function fdouble2_0: fmv.d.x fa0,a0 addi sp,sp,-16 fld fa5,.LC0,a5 fadd.d fa0,fa0,fa5 addi sp,sp,16 jr ra .size fdouble2_0, .-fdouble2_0 .align 1 .globl fdouble2_1 .type fdouble2_1, @function fdouble2_1: fmv.d.x fa0,a1 addi sp,sp,-16 fld fa5,.LC0,a5 fadd.d fa0,fa0,fa5 addi sp,sp,16 jr ra .size fdouble2_1, .-fdouble2_1 .align 1 .globl fuint64_t2_0 .type fuint64_t2_0, @function fuint64_t2_0: addi a0,a0,1 ret .size fuint64_t2_0, .-fuint64_t2_0 .align 1 .globl fuint64_t2_1 .type fuint64_t2_1, @function fuint64_t2_1: addi a0,a1,1 ret .size fuint64_t2_1, .-fuint64_t2_1 .align 1 .globl ffloat4_0 .type ffloat4_0, @function ffloat4_0: fmv.w.x fa0,a0 addi sp,sp,-16 flw fa5,.LC1,a5 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_0, .-ffloat4_0 .align 1 .globl ffloat4_1 .type ffloat4_1, @function ffloat4_1: srli a0,a0,32 fmv.w.x fa5,a0 addi sp,sp,-16 flw fa0,.LC1,a5 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_1, .-ffloat4_1 .align 1 .globl ffloat4_2 .type ffloat4_2, @function ffloat4_2: fmv.w.x fa0,a1 addi sp,sp,-16 flw fa5,.LC1,a5 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_2, .-ffloat4_2 .align 1 .globl ffloat4_3 .type ffloat4_3, @function ffloat4_3: srli a1,a1,32 fmv.w.x fa5,a1 addi sp,sp,-16 flw fa0,.LC1,a5 fadd.s fa0,fa0,fa5 addi sp,sp,16 jr ra .size ffloat4_3, .-ffloat4_3 .align 1 .globl fint4_0 .type fint4_0, @function fint4_0: addiw a0,a0,1 ret .size fint4_0, .-fint4_0 .align 1 .globl fint4_1 .type fint4_1, @function fint4_1: srai a0,a0,32 addiw a0,a0,1 ret .size fint4_1, .-fint4_1 .align 1 .globl fint4_2 .type fint4_2, @function fint4_2: addiw a0,a1,1 ret .size fint4_2, .-fint4_2 .align 1 .globl fint4_3 .type fint4_3, @function fint4_3: srai a0,a1,32 addiw a0,a0,1 ret .size fint4_3, .-fint4_3 .align 1 .globl fshort8_0 .type fshort8_0, @function fshort8_0: addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_0, .-fshort8_0 .align 1 .globl fshort8_1 .type fshort8_1, @function fshort8_1: sraiw a0,a0,16 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_1, .-fshort8_1 .align 1 .globl fshort8_2 .type fshort8_2, @function fshort8_2: slli a0,a0,16 srai a0,a0,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_2, .-fshort8_2 .align 1 .globl fshort8_3 .type fshort8_3, @function fshort8_3: srai a0,a0,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_3, .-fshort8_3 .align 1 .globl fshort8_4 .type fshort8_4, @function fshort8_4: addiw a0,a1,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_4, .-fshort8_4 .align 1 .globl fshort8_5 .type fshort8_5, @function fshort8_5: sraiw a0,a1,16 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_5, .-fshort8_5 .align 1 .globl fshort8_6 .type fshort8_6, @function fshort8_6: slli a0,a1,16 srai a0,a0,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_6, .-fshort8_6 .align 1 .globl fshort8_7 .type fshort8_7, @function fshort8_7: srai a0,a1,48 addiw a0,a0,1 slliw a0,a0,16 sraiw a0,a0,16 ret .size fshort8_7, .-fshort8_7 .align 1 .globl fchar16_0 .type fchar16_0, @function fchar16_0: addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_0, .-fchar16_0 .align 1 .globl fchar16_1 .type fchar16_1, @function fchar16_1: srli a0,a0,8 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_1, .-fchar16_1 .align 1 .globl fchar16_2 .type fchar16_2, @function fchar16_2: srli a0,a0,16 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_2, .-fchar16_2 .align 1 .globl fchar16_3 .type fchar16_3, @function fchar16_3: srli a0,a0,24 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_3, .-fchar16_3 .align 1 .globl fchar16_4 .type fchar16_4, @function fchar16_4: srli a0,a0,32 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_4, .-fchar16_4 .align 1 .globl fchar16_5 .type fchar16_5, @function fchar16_5: srli a0,a0,40 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_5, .-fchar16_5 .align 1 .globl fchar16_6 .type fchar16_6, @function fchar16_6: srli a0,a0,48 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_6, .-fchar16_6 .align 1 .globl fchar16_7 .type fchar16_7, @function fchar16_7: srli a0,a0,56 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_7, .-fchar16_7 .align 1 .globl fchar16_8 .type fchar16_8, @function fchar16_8: addiw a0,a1,1 andi a0,a0,0xff ret .size fchar16_8, .-fchar16_8 .align 1 .globl fchar16_9 .type fchar16_9, @function fchar16_9: srli a0,a1,8 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_9, .-fchar16_9 .align 1 .globl fchar16_10 .type fchar16_10, @function fchar16_10: srli a0,a1,16 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_10, .-fchar16_10 .align 1 .globl fchar16_11 .type fchar16_11, @function fchar16_11: srli a0,a1,24 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_11, .-fchar16_11 .align 1 .globl fchar16_12 .type fchar16_12, @function fchar16_12: srli a0,a1,32 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_12, .-fchar16_12 .align 1 .globl fchar16_13 .type fchar16_13, @function fchar16_13: srli a0,a1,40 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_13, .-fchar16_13 .align 1 .globl fchar16_14 .type fchar16_14, @function fchar16_14: srli a0,a1,48 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_14, .-fchar16_14 .align 1 .globl fchar16_15 .type fchar16_15, @function fchar16_15: srli a0,a1,56 addiw a0,a0,1 andi a0,a0,0xff ret .size fchar16_15, .-fchar16_15 .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-112 ld a5,.LC0 sd s0,96(sp) ld s0,.LC2 mv a0,a5 mv a1,s0 sd a5,16(sp) sd ra,104(sp) sd s1,88(sp) sd s2,80(sp) sd s3,72(sp) sd s4,64(sp) fsd fs0,56(sp) fsd fs1,48(sp) fsd fs2,40(sp) sd s0,24(sp) call fdouble2_0 fmv.d.x fa5,s0 feq.d a5,fa0,fa5 beq a5,zero,.L46 ld a0,16(sp) ld a1,24(sp) call fdouble2_1 fld fa5,.LC3,a5 feq.d a5,fa0,fa5 beq a5,zero,.L46 lla a5,.LC4 ld s1,0(a5) ld s0,8(a5) mv a0,s1 mv a1,s0 call fuint64_t2_0 li a5,2 mv s2,a0 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fuint64_t2_1 li a5,3 mv s1,a0 bne a0,a5,.L46 flw fa5,.LC1,a5 flw fs2,.LC5,a5 flw fs1,.LC6,a5 flw fs0,.LC7,a5 fsw fa5,0(sp) fsw fs2,4(sp) fsw fs1,8(sp) fsw fs0,12(sp) ld a0,0(sp) ld a1,8(sp) call ffloat4_0 feq.s a5,fa0,fs2 beq a5,zero,.L46 ld a0,0(sp) ld a1,8(sp) call ffloat4_1 feq.s a5,fa0,fs1 beq a5,zero,.L46 ld a0,0(sp) ld a1,8(sp) call ffloat4_2 feq.s a5,fa0,fs0 beq a5,zero,.L46 ld a0,0(sp) ld a1,8(sp) call ffloat4_3 flw fa5,.LC8,a5 feq.s a5,fa0,fa5 beq a5,zero,.L46 lla s0,.LC9 ld s4,0(s0) ld s3,8(s0) mv a0,s4 mv a1,s3 call fint4_0 bne a0,s2,.L46 mv a0,s4 mv a1,s3 call fint4_1 bne a0,s1,.L46 mv a1,s3 mv a0,s4 call fint4_2 li a5,4 mv s0,s3 mv s3,a0 bne a0,a5,.L46 mv a0,s4 mv a1,s0 call fint4_3 li a5,5 mv s2,a0 bne a0,a5,.L46 lla a5,.LC10 ld s1,0(a5) ld s0,8(a5) mv a0,s1 mv a1,s0 call fshort8_0 sext.w a0,a0 li a5,2 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_1 sext.w a0,a0 li a5,3 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_2 sext.w a0,a0 bne a0,s3,.L46 mv a0,s1 mv a1,s0 call fshort8_3 sext.w a0,a0 bne a0,s2,.L46 mv a0,s1 mv a1,s0 call fshort8_4 sext.w a0,a0 li a5,6 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_5 sext.w a0,a0 li a5,7 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_6 sext.w a0,a0 li a5,8 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fshort8_7 sext.w a0,a0 li a5,9 bne a0,a5,.L46 lla s2,.LC11 ld s1,0(s2) ld s0,8(s2) mv a0,s1 mv a1,s0 call fchar16_0 li a5,2 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_1 li a5,3 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_2 li a5,4 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_3 li a5,5 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_4 li a5,6 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_5 li a5,7 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_6 li a5,8 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_7 li a5,9 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_8 li a5,10 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_9 li a5,11 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_10 li a5,12 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_11 li a5,13 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_12 li a5,14 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_13 li a5,15 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_14 li a5,16 bne a0,a5,.L46 mv a0,s1 mv a1,s0 call fchar16_15 li a5,17 bne a0,a5,.L46 ld ra,104(sp) ld s0,96(sp) ld s1,88(sp) ld s2,80(sp) ld s3,72(sp) ld s4,64(sp) fld fs0,56(sp) fld fs1,48(sp) fld fs2,40(sp) li a0,0 addi sp,sp,112 jr ra .L46: call abort@plt .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 0 .word 1072693248 .section .rodata.cst4,"aM",@progbits,4 .align 2 .LC1: .word 1065353216 .section .rodata.cst8 .align 3 .LC2: .word 0 .word 1073741824 .align 3 .LC3: .word 0 .word 1074266112 .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC4: .dword 1 .dword 2 .set .LC5,.LC2+4 .section .rodata.cst4 .align 2 .LC6: .word 1077936128 .align 2 .LC7: .word 1082130432 .align 2 .LC8: .word 1084227584 .section .rodata.cst16 .align 4 .LC9: .dword 8589934593 .dword 17179869187 .align 4 .LC10: .dword 1125912791875585 .dword 2251829878849541 .align 4 .LC11: .dword 578437695752307201 .dword 1157159078456920585 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "sse2-extract-1.c" .text .align 2 .global fdouble2_0 .type fdouble2_0, %function fdouble2_0: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr d1, [sp] fmov d0, 1.0e+0 fadd d0, d1, d0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size fdouble2_0, .-fdouble2_0 .align 2 .global fdouble2_1 .type fdouble2_1, %function fdouble2_1: .LFB1: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr d1, [sp, 8] fmov d0, 1.0e+0 fadd d0, d1, d0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size fdouble2_1, .-fdouble2_1 .align 2 .global fuint64_t2_0 .type fuint64_t2_0, %function fuint64_t2_0: .LFB2: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr x0, [sp] add x0, x0, 1 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size fuint64_t2_0, .-fuint64_t2_0 .align 2 .global fuint64_t2_1 .type fuint64_t2_1, %function fuint64_t2_1: .LFB3: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr x0, [sp, 8] add x0, x0, 1 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size fuint64_t2_1, .-fuint64_t2_1 .align 2 .global ffloat4_0 .type ffloat4_0, %function ffloat4_0: .LFB4: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr s1, [sp] fmov s0, 1.0e+0 fadd s0, s1, s0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size ffloat4_0, .-ffloat4_0 .align 2 .global ffloat4_1 .type ffloat4_1, %function ffloat4_1: .LFB5: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr s1, [sp, 4] fmov s0, 1.0e+0 fadd s0, s1, s0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE5: .size ffloat4_1, .-ffloat4_1 .align 2 .global ffloat4_2 .type ffloat4_2, %function ffloat4_2: .LFB6: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr s1, [sp, 8] fmov s0, 1.0e+0 fadd s0, s1, s0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size ffloat4_2, .-ffloat4_2 .align 2 .global ffloat4_3 .type ffloat4_3, %function ffloat4_3: .LFB7: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr s1, [sp, 12] fmov s0, 1.0e+0 fadd s0, s1, s0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size ffloat4_3, .-ffloat4_3 .align 2 .global fint4_0 .type fint4_0, %function fint4_0: .LFB8: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr w0, [sp] add w0, w0, 1 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size fint4_0, .-fint4_0 .align 2 .global fint4_1 .type fint4_1, %function fint4_1: .LFB9: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr w0, [sp, 4] add w0, w0, 1 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size fint4_1, .-fint4_1 .align 2 .global fint4_2 .type fint4_2, %function fint4_2: .LFB10: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr w0, [sp, 8] add w0, w0, 1 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size fint4_2, .-fint4_2 .align 2 .global fint4_3 .type fint4_3, %function fint4_3: .LFB11: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldr w0, [sp, 12] add w0, w0, 1 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size fint4_3, .-fint4_3 .align 2 .global fshort8_0 .type fshort8_0, %function fshort8_0: .LFB12: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrsh w0, [sp] and w0, w0, 65535 add w0, w0, 1 and w0, w0, 65535 sxth w0, w0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size fshort8_0, .-fshort8_0 .align 2 .global fshort8_1 .type fshort8_1, %function fshort8_1: .LFB13: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrsh w0, [sp, 2] and w0, w0, 65535 add w0, w0, 1 and w0, w0, 65535 sxth w0, w0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size fshort8_1, .-fshort8_1 .align 2 .global fshort8_2 .type fshort8_2, %function fshort8_2: .LFB14: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrsh w0, [sp, 4] and w0, w0, 65535 add w0, w0, 1 and w0, w0, 65535 sxth w0, w0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE14: .size fshort8_2, .-fshort8_2 .align 2 .global fshort8_3 .type fshort8_3, %function fshort8_3: .LFB15: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrsh w0, [sp, 6] and w0, w0, 65535 add w0, w0, 1 and w0, w0, 65535 sxth w0, w0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE15: .size fshort8_3, .-fshort8_3 .align 2 .global fshort8_4 .type fshort8_4, %function fshort8_4: .LFB16: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrsh w0, [sp, 8] and w0, w0, 65535 add w0, w0, 1 and w0, w0, 65535 sxth w0, w0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE16: .size fshort8_4, .-fshort8_4 .align 2 .global fshort8_5 .type fshort8_5, %function fshort8_5: .LFB17: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrsh w0, [sp, 10] and w0, w0, 65535 add w0, w0, 1 and w0, w0, 65535 sxth w0, w0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE17: .size fshort8_5, .-fshort8_5 .align 2 .global fshort8_6 .type fshort8_6, %function fshort8_6: .LFB18: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrsh w0, [sp, 12] and w0, w0, 65535 add w0, w0, 1 and w0, w0, 65535 sxth w0, w0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE18: .size fshort8_6, .-fshort8_6 .align 2 .global fshort8_7 .type fshort8_7, %function fshort8_7: .LFB19: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrsh w0, [sp, 14] and w0, w0, 65535 add w0, w0, 1 and w0, w0, 65535 sxth w0, w0 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE19: .size fshort8_7, .-fshort8_7 .align 2 .global fchar16_0 .type fchar16_0, %function fchar16_0: .LFB20: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE20: .size fchar16_0, .-fchar16_0 .align 2 .global fchar16_1 .type fchar16_1, %function fchar16_1: .LFB21: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 1] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE21: .size fchar16_1, .-fchar16_1 .align 2 .global fchar16_2 .type fchar16_2, %function fchar16_2: .LFB22: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 2] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE22: .size fchar16_2, .-fchar16_2 .align 2 .global fchar16_3 .type fchar16_3, %function fchar16_3: .LFB23: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 3] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size fchar16_3, .-fchar16_3 .align 2 .global fchar16_4 .type fchar16_4, %function fchar16_4: .LFB24: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 4] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE24: .size fchar16_4, .-fchar16_4 .align 2 .global fchar16_5 .type fchar16_5, %function fchar16_5: .LFB25: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 5] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE25: .size fchar16_5, .-fchar16_5 .align 2 .global fchar16_6 .type fchar16_6, %function fchar16_6: .LFB26: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 6] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE26: .size fchar16_6, .-fchar16_6 .align 2 .global fchar16_7 .type fchar16_7, %function fchar16_7: .LFB27: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 7] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE27: .size fchar16_7, .-fchar16_7 .align 2 .global fchar16_8 .type fchar16_8, %function fchar16_8: .LFB28: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 8] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE28: .size fchar16_8, .-fchar16_8 .align 2 .global fchar16_9 .type fchar16_9, %function fchar16_9: .LFB29: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 9] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE29: .size fchar16_9, .-fchar16_9 .align 2 .global fchar16_10 .type fchar16_10, %function fchar16_10: .LFB30: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 10] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE30: .size fchar16_10, .-fchar16_10 .align 2 .global fchar16_11 .type fchar16_11, %function fchar16_11: .LFB31: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 11] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE31: .size fchar16_11, .-fchar16_11 .align 2 .global fchar16_12 .type fchar16_12, %function fchar16_12: .LFB32: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 12] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE32: .size fchar16_12, .-fchar16_12 .align 2 .global fchar16_13 .type fchar16_13, %function fchar16_13: .LFB33: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 13] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE33: .size fchar16_13, .-fchar16_13 .align 2 .global fchar16_14 .type fchar16_14, %function fchar16_14: .LFB34: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 14] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE34: .size fchar16_14, .-fchar16_14 .align 2 .global fchar16_15 .type fchar16_15, %function fchar16_15: .LFB35: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str q0, [sp] ldrb w0, [sp, 15] add w0, w0, 1 and w0, w0, 255 add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE35: .size fchar16_15, .-fchar16_15 .align 2 .global main .type main, %function main: .LFB36: .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, .LC0 ldr q0, [x0, #:lo12:.LC0] str q0, [sp, 16] adrp x0, .LC1 ldr q0, [x0, #:lo12:.LC1] str q0, [sp, 32] adrp x0, .LC2 ldr q0, [x0, #:lo12:.LC2] str q0, [sp, 48] adrp x0, .LC3 ldr q0, [x0, #:lo12:.LC3] str q0, [sp, 64] adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] str q0, [sp, 80] adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] str q0, [sp, 96] ldr q0, [sp, 16] bl fdouble2_0 fmov d1, d0 fmov d0, 2.0e+0 fcmp d1, d0 beq .L74 bl abort .L74: ldr q0, [sp, 16] bl fdouble2_1 fmov d1, d0 fmov d0, 3.0e+0 fcmp d1, d0 beq .L75 bl abort .L75: ldr q0, [sp, 32] bl fuint64_t2_0 cmp x0, 2 beq .L76 bl abort .L76: ldr q0, [sp, 32] bl fuint64_t2_1 cmp x0, 3 beq .L77 bl abort .L77: ldr q0, [sp, 48] bl ffloat4_0 fmov s1, s0 fmov s0, 2.0e+0 fcmp s1, s0 beq .L78 bl abort .L78: ldr q0, [sp, 48] bl ffloat4_1 fmov s1, s0 fmov s0, 3.0e+0 fcmp s1, s0 beq .L79 bl abort .L79: ldr q0, [sp, 48] bl ffloat4_2 fmov s1, s0 fmov s0, 4.0e+0 fcmp s1, s0 beq .L80 bl abort .L80: ldr q0, [sp, 48] bl ffloat4_3 fmov s1, s0 fmov s0, 5.0e+0 fcmp s1, s0 beq .L81 bl abort .L81: ldr q0, [sp, 64] bl fint4_0 cmp w0, 2 beq .L82 bl abort .L82: ldr q0, [sp, 64] bl fint4_1 cmp w0, 3 beq .L83 bl abort .L83: ldr q0, [sp, 64] bl fint4_2 cmp w0, 4 beq .L84 bl abort .L84: ldr q0, [sp, 64] bl fint4_3 cmp w0, 5 beq .L85 bl abort .L85: ldr q0, [sp, 80] bl fshort8_0 sxth w0, w0 cmp w0, 2 beq .L86 bl abort .L86: ldr q0, [sp, 80] bl fshort8_1 sxth w0, w0 cmp w0, 3 beq .L87 bl abort .L87: ldr q0, [sp, 80] bl fshort8_2 sxth w0, w0 cmp w0, 4 beq .L88 bl abort .L88: ldr q0, [sp, 80] bl fshort8_3 sxth w0, w0 cmp w0, 5 beq .L89 bl abort .L89: ldr q0, [sp, 80] bl fshort8_4 sxth w0, w0 cmp w0, 6 beq .L90 bl abort .L90: ldr q0, [sp, 80] bl fshort8_5 sxth w0, w0 cmp w0, 7 beq .L91 bl abort .L91: ldr q0, [sp, 80] bl fshort8_6 sxth w0, w0 cmp w0, 8 beq .L92 bl abort .L92: ldr q0, [sp, 80] bl fshort8_7 sxth w0, w0 cmp w0, 9 beq .L93 bl abort .L93: ldr q0, [sp, 96] bl fchar16_0 and w0, w0, 255 cmp w0, 2 beq .L94 bl abort .L94: ldr q0, [sp, 96] bl fchar16_1 and w0, w0, 255 cmp w0, 3 beq .L95 bl abort .L95: ldr q0, [sp, 96] bl fchar16_2 and w0, w0, 255 cmp w0, 4 beq .L96 bl abort .L96: ldr q0, [sp, 96] bl fchar16_3 and w0, w0, 255 cmp w0, 5 beq .L97 bl abort .L97: ldr q0, [sp, 96] bl fchar16_4 and w0, w0, 255 cmp w0, 6 beq .L98 bl abort .L98: ldr q0, [sp, 96] bl fchar16_5 and w0, w0, 255 cmp w0, 7 beq .L99 bl abort .L99: ldr q0, [sp, 96] bl fchar16_6 and w0, w0, 255 cmp w0, 8 beq .L100 bl abort .L100: ldr q0, [sp, 96] bl fchar16_7 and w0, w0, 255 cmp w0, 9 beq .L101 bl abort .L101: ldr q0, [sp, 96] bl fchar16_8 and w0, w0, 255 cmp w0, 10 beq .L102 bl abort .L102: ldr q0, [sp, 96] bl fchar16_9 and w0, w0, 255 cmp w0, 11 beq .L103 bl abort .L103: ldr q0, [sp, 96] bl fchar16_10 and w0, w0, 255 cmp w0, 12 beq .L104 bl abort .L104: ldr q0, [sp, 96] bl fchar16_11 and w0, w0, 255 cmp w0, 13 beq .L105 bl abort .L105: ldr q0, [sp, 96] bl fchar16_12 and w0, w0, 255 cmp w0, 14 beq .L106 bl abort .L106: ldr q0, [sp, 96] bl fchar16_13 and w0, w0, 255 cmp w0, 15 beq .L107 bl abort .L107: ldr q0, [sp, 96] bl fchar16_14 and w0, w0, 255 cmp w0, 16 beq .L108 bl abort .L108: ldr q0, [sp, 96] bl fchar16_15 and w0, w0, 255 cmp w0, 17 beq .L109 bl abort .L109: mov w0, 0 ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE36: .size main, .-main .section .rodata .align 4 .LC0: .word 0 .word 1072693248 .word 0 .word 1073741824 .align 4 .LC1: .xword 1 .xword 2 .align 4 .LC2: .word 1065353216 .word 1073741824 .word 1077936128 .word 1082130432 .align 4 .LC3: .word 1 .word 2 .word 3 .word 4 .align 4 .LC4: .hword 1 .hword 2 .hword 3 .hword 4 .hword 5 .hword 6 .hword 7 .hword 8 .align 4 .LC5: .byte 1 .byte 2 .byte 3 .byte 4 .byte 5 .byte 6 .byte 7 .byte 8 .byte 9 .byte 10 .byte 11 .byte 12 .byte 13 .byte 14 .byte 15 .byte 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "sse2-extract-1.c" .text .align 2 .global fdouble2_0 .type fdouble2_0, %function fdouble2_0: .LFB0: .cfi_startproc fmov d1, 1.0e+0 fadd d0, d0, d1 ret .cfi_endproc .LFE0: .size fdouble2_0, .-fdouble2_0 .align 2 .global fdouble2_1 .type fdouble2_1, %function fdouble2_1: .LFB1: .cfi_startproc dup d0, v0.d[1] fmov d1, 1.0e+0 fadd d0, d0, d1 ret .cfi_endproc .LFE1: .size fdouble2_1, .-fdouble2_1 .align 2 .global fuint64_t2_0 .type fuint64_t2_0, %function fuint64_t2_0: .LFB2: .cfi_startproc fmov x0, d0 add x0, x0, 1 ret .cfi_endproc .LFE2: .size fuint64_t2_0, .-fuint64_t2_0 .align 2 .global fuint64_t2_1 .type fuint64_t2_1, %function fuint64_t2_1: .LFB3: .cfi_startproc umov x0, v0.d[1] add x0, x0, 1 ret .cfi_endproc .LFE3: .size fuint64_t2_1, .-fuint64_t2_1 .align 2 .global ffloat4_0 .type ffloat4_0, %function ffloat4_0: .LFB4: .cfi_startproc fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE4: .size ffloat4_0, .-ffloat4_0 .align 2 .global ffloat4_1 .type ffloat4_1, %function ffloat4_1: .LFB5: .cfi_startproc dup s0, v0.s[1] fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE5: .size ffloat4_1, .-ffloat4_1 .align 2 .global ffloat4_2 .type ffloat4_2, %function ffloat4_2: .LFB6: .cfi_startproc dup s0, v0.s[2] fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE6: .size ffloat4_2, .-ffloat4_2 .align 2 .global ffloat4_3 .type ffloat4_3, %function ffloat4_3: .LFB7: .cfi_startproc dup s0, v0.s[3] fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE7: .size ffloat4_3, .-ffloat4_3 .align 2 .global fint4_0 .type fint4_0, %function fint4_0: .LFB8: .cfi_startproc fmov w0, s0 add w0, w0, 1 ret .cfi_endproc .LFE8: .size fint4_0, .-fint4_0 .align 2 .global fint4_1 .type fint4_1, %function fint4_1: .LFB9: .cfi_startproc umov w0, v0.s[1] add w0, w0, 1 ret .cfi_endproc .LFE9: .size fint4_1, .-fint4_1 .align 2 .global fint4_2 .type fint4_2, %function fint4_2: .LFB10: .cfi_startproc umov w0, v0.s[2] add w0, w0, 1 ret .cfi_endproc .LFE10: .size fint4_2, .-fint4_2 .align 2 .global fint4_3 .type fint4_3, %function fint4_3: .LFB11: .cfi_startproc umov w0, v0.s[3] add w0, w0, 1 ret .cfi_endproc .LFE11: .size fint4_3, .-fint4_3 .align 2 .global fshort8_0 .type fshort8_0, %function fshort8_0: .LFB12: .cfi_startproc umov w0, v0.h[0] add w0, w0, 1 ret .cfi_endproc .LFE12: .size fshort8_0, .-fshort8_0 .align 2 .global fshort8_1 .type fshort8_1, %function fshort8_1: .LFB13: .cfi_startproc umov w0, v0.h[1] add w0, w0, 1 ret .cfi_endproc .LFE13: .size fshort8_1, .-fshort8_1 .align 2 .global fshort8_2 .type fshort8_2, %function fshort8_2: .LFB14: .cfi_startproc umov w0, v0.h[2] add w0, w0, 1 ret .cfi_endproc .LFE14: .size fshort8_2, .-fshort8_2 .align 2 .global fshort8_3 .type fshort8_3, %function fshort8_3: .LFB15: .cfi_startproc umov w0, v0.h[3] add w0, w0, 1 ret .cfi_endproc .LFE15: .size fshort8_3, .-fshort8_3 .align 2 .global fshort8_4 .type fshort8_4, %function fshort8_4: .LFB16: .cfi_startproc umov w0, v0.h[4] add w0, w0, 1 ret .cfi_endproc .LFE16: .size fshort8_4, .-fshort8_4 .align 2 .global fshort8_5 .type fshort8_5, %function fshort8_5: .LFB17: .cfi_startproc umov w0, v0.h[5] add w0, w0, 1 ret .cfi_endproc .LFE17: .size fshort8_5, .-fshort8_5 .align 2 .global fshort8_6 .type fshort8_6, %function fshort8_6: .LFB18: .cfi_startproc umov w0, v0.h[6] add w0, w0, 1 ret .cfi_endproc .LFE18: .size fshort8_6, .-fshort8_6 .align 2 .global fshort8_7 .type fshort8_7, %function fshort8_7: .LFB19: .cfi_startproc umov w0, v0.h[7] add w0, w0, 1 ret .cfi_endproc .LFE19: .size fshort8_7, .-fshort8_7 .align 2 .global fchar16_0 .type fchar16_0, %function fchar16_0: .LFB20: .cfi_startproc umov w0, v0.b[0] add w0, w0, 1 ret .cfi_endproc .LFE20: .size fchar16_0, .-fchar16_0 .align 2 .global fchar16_1 .type fchar16_1, %function fchar16_1: .LFB21: .cfi_startproc umov w0, v0.b[1] add w0, w0, 1 ret .cfi_endproc .LFE21: .size fchar16_1, .-fchar16_1 .align 2 .global fchar16_2 .type fchar16_2, %function fchar16_2: .LFB22: .cfi_startproc umov w0, v0.b[2] add w0, w0, 1 ret .cfi_endproc .LFE22: .size fchar16_2, .-fchar16_2 .align 2 .global fchar16_3 .type fchar16_3, %function fchar16_3: .LFB23: .cfi_startproc umov w0, v0.b[3] add w0, w0, 1 ret .cfi_endproc .LFE23: .size fchar16_3, .-fchar16_3 .align 2 .global fchar16_4 .type fchar16_4, %function fchar16_4: .LFB24: .cfi_startproc umov w0, v0.b[4] add w0, w0, 1 ret .cfi_endproc .LFE24: .size fchar16_4, .-fchar16_4 .align 2 .global fchar16_5 .type fchar16_5, %function fchar16_5: .LFB25: .cfi_startproc umov w0, v0.b[5] add w0, w0, 1 ret .cfi_endproc .LFE25: .size fchar16_5, .-fchar16_5 .align 2 .global fchar16_6 .type fchar16_6, %function fchar16_6: .LFB26: .cfi_startproc umov w0, v0.b[6] add w0, w0, 1 ret .cfi_endproc .LFE26: .size fchar16_6, .-fchar16_6 .align 2 .global fchar16_7 .type fchar16_7, %function fchar16_7: .LFB27: .cfi_startproc umov w0, v0.b[7] add w0, w0, 1 ret .cfi_endproc .LFE27: .size fchar16_7, .-fchar16_7 .align 2 .global fchar16_8 .type fchar16_8, %function fchar16_8: .LFB28: .cfi_startproc umov w0, v0.b[8] add w0, w0, 1 ret .cfi_endproc .LFE28: .size fchar16_8, .-fchar16_8 .align 2 .global fchar16_9 .type fchar16_9, %function fchar16_9: .LFB29: .cfi_startproc umov w0, v0.b[9] add w0, w0, 1 ret .cfi_endproc .LFE29: .size fchar16_9, .-fchar16_9 .align 2 .global fchar16_10 .type fchar16_10, %function fchar16_10: .LFB30: .cfi_startproc umov w0, v0.b[10] add w0, w0, 1 ret .cfi_endproc .LFE30: .size fchar16_10, .-fchar16_10 .align 2 .global fchar16_11 .type fchar16_11, %function fchar16_11: .LFB31: .cfi_startproc umov w0, v0.b[11] add w0, w0, 1 ret .cfi_endproc .LFE31: .size fchar16_11, .-fchar16_11 .align 2 .global fchar16_12 .type fchar16_12, %function fchar16_12: .LFB32: .cfi_startproc umov w0, v0.b[12] add w0, w0, 1 ret .cfi_endproc .LFE32: .size fchar16_12, .-fchar16_12 .align 2 .global fchar16_13 .type fchar16_13, %function fchar16_13: .LFB33: .cfi_startproc umov w0, v0.b[13] add w0, w0, 1 ret .cfi_endproc .LFE33: .size fchar16_13, .-fchar16_13 .align 2 .global fchar16_14 .type fchar16_14, %function fchar16_14: .LFB34: .cfi_startproc umov w0, v0.b[14] add w0, w0, 1 ret .cfi_endproc .LFE34: .size fchar16_14, .-fchar16_14 .align 2 .global fchar16_15 .type fchar16_15, %function fchar16_15: .LFB35: .cfi_startproc umov w0, v0.b[15] add w0, w0, 1 ret .cfi_endproc .LFE35: .size fchar16_15, .-fchar16_15 .align 2 .global main .type main, %function main: .LFB36: .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 ldr q0, [x0, #:lo12:.LC0] bl fdouble2_0 fmov d1, 2.0e+0 fcmp d0, d1 bne .L75 adrp x0, .LC0 ldr q0, [x0, #:lo12:.LC0] bl fdouble2_1 fmov d1, 3.0e+0 fcmp d0, d1 bne .L76 adrp x0, .LC1 ldr q0, [x0, #:lo12:.LC1] bl fuint64_t2_0 cmp x0, 2 bne .L77 adrp x0, .LC1 ldr q0, [x0, #:lo12:.LC1] bl fuint64_t2_1 cmp x0, 3 bne .L78 adrp x0, .LC2 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_0 fmov s1, 2.0e+0 fcmp s0, s1 bne .L79 adrp x0, .LC2 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_1 fmov s1, 3.0e+0 fcmp s0, s1 bne .L80 adrp x0, .LC2 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_2 fmov s1, 4.0e+0 fcmp s0, s1 bne .L81 adrp x0, .LC2 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_3 fmov s1, 5.0e+0 fcmp s0, s1 bne .L82 adrp x0, .LC3 ldr q0, [x0, #:lo12:.LC3] bl fint4_0 cmp w0, 2 bne .L83 adrp x0, .LC3 ldr q0, [x0, #:lo12:.LC3] bl fint4_1 cmp w0, 3 bne .L84 adrp x0, .LC3 ldr q0, [x0, #:lo12:.LC3] bl fint4_2 cmp w0, 4 bne .L85 adrp x0, .LC3 ldr q0, [x0, #:lo12:.LC3] bl fint4_3 cmp w0, 5 bne .L86 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_0 sxth w0, w0 cmp w0, 2 bne .L87 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_1 sxth w0, w0 cmp w0, 3 bne .L88 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_2 sxth w0, w0 cmp w0, 4 bne .L89 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_3 sxth w0, w0 cmp w0, 5 bne .L90 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_4 sxth w0, w0 cmp w0, 6 bne .L91 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_5 sxth w0, w0 cmp w0, 7 bne .L92 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_6 sxth w0, w0 cmp w0, 8 bne .L93 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_7 sxth w0, w0 cmp w0, 9 bne .L94 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_0 and w0, w0, 255 cmp w0, 2 bne .L95 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_1 and w0, w0, 255 cmp w0, 3 bne .L96 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_2 and w0, w0, 255 cmp w0, 4 bne .L97 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_3 and w0, w0, 255 cmp w0, 5 bne .L98 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_4 and w0, w0, 255 cmp w0, 6 bne .L99 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_5 and w0, w0, 255 cmp w0, 7 bne .L100 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_6 and w0, w0, 255 cmp w0, 8 bne .L101 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_7 and w0, w0, 255 cmp w0, 9 bne .L102 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_8 and w0, w0, 255 cmp w0, 10 bne .L103 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_9 and w0, w0, 255 cmp w0, 11 bne .L104 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_10 and w0, w0, 255 cmp w0, 12 bne .L105 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_11 and w0, w0, 255 cmp w0, 13 bne .L106 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_12 and w0, w0, 255 cmp w0, 14 bne .L107 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_13 and w0, w0, 255 cmp w0, 15 bne .L108 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_14 and w0, w0, 255 cmp w0, 16 bne .L109 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_15 and w0, w0, 255 cmp w0, 17 bne .L110 mov w0, 0 ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L75: .cfi_restore_state bl abort .L76: bl abort .L77: bl abort .L78: bl abort .L79: bl abort .L80: bl abort .L81: bl abort .L82: bl abort .L83: bl abort .L84: bl abort .L85: bl abort .L86: bl abort .L87: bl abort .L88: bl abort .L89: bl abort .L90: bl abort .L91: bl abort .L92: bl abort .L93: bl abort .L94: bl abort .L95: bl abort .L96: bl abort .L97: bl abort .L98: bl abort .L99: bl abort .L100: bl abort .L101: bl abort .L102: bl abort .L103: bl abort .L104: bl abort .L105: bl abort .L106: bl abort .L107: bl abort .L108: bl abort .L109: bl abort .L110: bl abort .cfi_endproc .LFE36: .size main, .-main .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC0: .word 0 .word 1072693248 .word 0 .word 1073741824 .align 4 .LC1: .xword 1 .xword 2 .align 4 .LC2: .word 1065353216 .word 1073741824 .word 1077936128 .word 1082130432 .align 4 .LC3: .word 1 .word 2 .word 3 .word 4 .align 4 .LC4: .hword 1 .hword 2 .hword 3 .hword 4 .hword 5 .hword 6 .hword 7 .hword 8 .align 4 .LC5: .byte 1 .byte 2 .byte 3 .byte 4 .byte 5 .byte 6 .byte 7 .byte 8 .byte 9 .byte 10 .byte 11 .byte 12 .byte 13 .byte 14 .byte 15 .byte 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "sse2-extract-1.c" .text .align 2 .p2align 4,,11 .global fdouble2_0 .type fdouble2_0, %function fdouble2_0: .LFB0: .cfi_startproc fmov d1, 1.0e+0 fadd d0, d0, d1 ret .cfi_endproc .LFE0: .size fdouble2_0, .-fdouble2_0 .align 2 .p2align 4,,11 .global fdouble2_1 .type fdouble2_1, %function fdouble2_1: .LFB1: .cfi_startproc dup d0, v0.d[1] fmov d1, 1.0e+0 fadd d0, d0, d1 ret .cfi_endproc .LFE1: .size fdouble2_1, .-fdouble2_1 .align 2 .p2align 4,,11 .global fuint64_t2_0 .type fuint64_t2_0, %function fuint64_t2_0: .LFB2: .cfi_startproc fmov x0, d0 add x0, x0, 1 ret .cfi_endproc .LFE2: .size fuint64_t2_0, .-fuint64_t2_0 .align 2 .p2align 4,,11 .global fuint64_t2_1 .type fuint64_t2_1, %function fuint64_t2_1: .LFB3: .cfi_startproc umov x0, v0.d[1] add x0, x0, 1 ret .cfi_endproc .LFE3: .size fuint64_t2_1, .-fuint64_t2_1 .align 2 .p2align 4,,11 .global ffloat4_0 .type ffloat4_0, %function ffloat4_0: .LFB4: .cfi_startproc fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE4: .size ffloat4_0, .-ffloat4_0 .align 2 .p2align 4,,11 .global ffloat4_1 .type ffloat4_1, %function ffloat4_1: .LFB5: .cfi_startproc dup s0, v0.s[1] fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE5: .size ffloat4_1, .-ffloat4_1 .align 2 .p2align 4,,11 .global ffloat4_2 .type ffloat4_2, %function ffloat4_2: .LFB6: .cfi_startproc dup s0, v0.s[2] fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE6: .size ffloat4_2, .-ffloat4_2 .align 2 .p2align 4,,11 .global ffloat4_3 .type ffloat4_3, %function ffloat4_3: .LFB7: .cfi_startproc dup s0, v0.s[3] fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE7: .size ffloat4_3, .-ffloat4_3 .align 2 .p2align 4,,11 .global fint4_0 .type fint4_0, %function fint4_0: .LFB8: .cfi_startproc fmov w0, s0 add w0, w0, 1 ret .cfi_endproc .LFE8: .size fint4_0, .-fint4_0 .align 2 .p2align 4,,11 .global fint4_1 .type fint4_1, %function fint4_1: .LFB9: .cfi_startproc umov w0, v0.s[1] add w0, w0, 1 ret .cfi_endproc .LFE9: .size fint4_1, .-fint4_1 .align 2 .p2align 4,,11 .global fint4_2 .type fint4_2, %function fint4_2: .LFB10: .cfi_startproc umov w0, v0.s[2] add w0, w0, 1 ret .cfi_endproc .LFE10: .size fint4_2, .-fint4_2 .align 2 .p2align 4,,11 .global fint4_3 .type fint4_3, %function fint4_3: .LFB11: .cfi_startproc umov w0, v0.s[3] add w0, w0, 1 ret .cfi_endproc .LFE11: .size fint4_3, .-fint4_3 .align 2 .p2align 4,,11 .global fshort8_0 .type fshort8_0, %function fshort8_0: .LFB12: .cfi_startproc umov w0, v0.h[0] add w0, w0, 1 ret .cfi_endproc .LFE12: .size fshort8_0, .-fshort8_0 .align 2 .p2align 4,,11 .global fshort8_1 .type fshort8_1, %function fshort8_1: .LFB13: .cfi_startproc umov w0, v0.h[1] add w0, w0, 1 ret .cfi_endproc .LFE13: .size fshort8_1, .-fshort8_1 .align 2 .p2align 4,,11 .global fshort8_2 .type fshort8_2, %function fshort8_2: .LFB14: .cfi_startproc umov w0, v0.h[2] add w0, w0, 1 ret .cfi_endproc .LFE14: .size fshort8_2, .-fshort8_2 .align 2 .p2align 4,,11 .global fshort8_3 .type fshort8_3, %function fshort8_3: .LFB15: .cfi_startproc umov w0, v0.h[3] add w0, w0, 1 ret .cfi_endproc .LFE15: .size fshort8_3, .-fshort8_3 .align 2 .p2align 4,,11 .global fshort8_4 .type fshort8_4, %function fshort8_4: .LFB16: .cfi_startproc umov w0, v0.h[4] add w0, w0, 1 ret .cfi_endproc .LFE16: .size fshort8_4, .-fshort8_4 .align 2 .p2align 4,,11 .global fshort8_5 .type fshort8_5, %function fshort8_5: .LFB17: .cfi_startproc umov w0, v0.h[5] add w0, w0, 1 ret .cfi_endproc .LFE17: .size fshort8_5, .-fshort8_5 .align 2 .p2align 4,,11 .global fshort8_6 .type fshort8_6, %function fshort8_6: .LFB18: .cfi_startproc umov w0, v0.h[6] add w0, w0, 1 ret .cfi_endproc .LFE18: .size fshort8_6, .-fshort8_6 .align 2 .p2align 4,,11 .global fshort8_7 .type fshort8_7, %function fshort8_7: .LFB19: .cfi_startproc umov w0, v0.h[7] add w0, w0, 1 ret .cfi_endproc .LFE19: .size fshort8_7, .-fshort8_7 .align 2 .p2align 4,,11 .global fchar16_0 .type fchar16_0, %function fchar16_0: .LFB20: .cfi_startproc umov w0, v0.b[0] add w0, w0, 1 ret .cfi_endproc .LFE20: .size fchar16_0, .-fchar16_0 .align 2 .p2align 4,,11 .global fchar16_1 .type fchar16_1, %function fchar16_1: .LFB21: .cfi_startproc umov w0, v0.b[1] add w0, w0, 1 ret .cfi_endproc .LFE21: .size fchar16_1, .-fchar16_1 .align 2 .p2align 4,,11 .global fchar16_2 .type fchar16_2, %function fchar16_2: .LFB22: .cfi_startproc umov w0, v0.b[2] add w0, w0, 1 ret .cfi_endproc .LFE22: .size fchar16_2, .-fchar16_2 .align 2 .p2align 4,,11 .global fchar16_3 .type fchar16_3, %function fchar16_3: .LFB23: .cfi_startproc umov w0, v0.b[3] add w0, w0, 1 ret .cfi_endproc .LFE23: .size fchar16_3, .-fchar16_3 .align 2 .p2align 4,,11 .global fchar16_4 .type fchar16_4, %function fchar16_4: .LFB24: .cfi_startproc umov w0, v0.b[4] add w0, w0, 1 ret .cfi_endproc .LFE24: .size fchar16_4, .-fchar16_4 .align 2 .p2align 4,,11 .global fchar16_5 .type fchar16_5, %function fchar16_5: .LFB25: .cfi_startproc umov w0, v0.b[5] add w0, w0, 1 ret .cfi_endproc .LFE25: .size fchar16_5, .-fchar16_5 .align 2 .p2align 4,,11 .global fchar16_6 .type fchar16_6, %function fchar16_6: .LFB26: .cfi_startproc umov w0, v0.b[6] add w0, w0, 1 ret .cfi_endproc .LFE26: .size fchar16_6, .-fchar16_6 .align 2 .p2align 4,,11 .global fchar16_7 .type fchar16_7, %function fchar16_7: .LFB27: .cfi_startproc umov w0, v0.b[7] add w0, w0, 1 ret .cfi_endproc .LFE27: .size fchar16_7, .-fchar16_7 .align 2 .p2align 4,,11 .global fchar16_8 .type fchar16_8, %function fchar16_8: .LFB28: .cfi_startproc umov w0, v0.b[8] add w0, w0, 1 ret .cfi_endproc .LFE28: .size fchar16_8, .-fchar16_8 .align 2 .p2align 4,,11 .global fchar16_9 .type fchar16_9, %function fchar16_9: .LFB29: .cfi_startproc umov w0, v0.b[9] add w0, w0, 1 ret .cfi_endproc .LFE29: .size fchar16_9, .-fchar16_9 .align 2 .p2align 4,,11 .global fchar16_10 .type fchar16_10, %function fchar16_10: .LFB30: .cfi_startproc umov w0, v0.b[10] add w0, w0, 1 ret .cfi_endproc .LFE30: .size fchar16_10, .-fchar16_10 .align 2 .p2align 4,,11 .global fchar16_11 .type fchar16_11, %function fchar16_11: .LFB31: .cfi_startproc umov w0, v0.b[11] add w0, w0, 1 ret .cfi_endproc .LFE31: .size fchar16_11, .-fchar16_11 .align 2 .p2align 4,,11 .global fchar16_12 .type fchar16_12, %function fchar16_12: .LFB32: .cfi_startproc umov w0, v0.b[12] add w0, w0, 1 ret .cfi_endproc .LFE32: .size fchar16_12, .-fchar16_12 .align 2 .p2align 4,,11 .global fchar16_13 .type fchar16_13, %function fchar16_13: .LFB33: .cfi_startproc umov w0, v0.b[13] add w0, w0, 1 ret .cfi_endproc .LFE33: .size fchar16_13, .-fchar16_13 .align 2 .p2align 4,,11 .global fchar16_14 .type fchar16_14, %function fchar16_14: .LFB34: .cfi_startproc umov w0, v0.b[14] add w0, w0, 1 ret .cfi_endproc .LFE34: .size fchar16_14, .-fchar16_14 .align 2 .p2align 4,,11 .global fchar16_15 .type fchar16_15, %function fchar16_15: .LFB35: .cfi_startproc umov w0, v0.b[15] add w0, w0, 1 ret .cfi_endproc .LFE35: .size fchar16_15, .-fchar16_15 .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB36: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC0 mov x29, sp ldr q0, [x0, #:lo12:.LC0] bl fdouble2_0 fmov d1, 2.0e+0 fcmp d0, d1 bne .L40 adrp x0, .LC0 ldr q0, [x0, #:lo12:.LC0] bl fdouble2_1 fmov d1, 3.0e+0 fcmp d0, d1 bne .L40 adrp x0, .LC1 ldr q0, [x0, #:lo12:.LC1] bl fuint64_t2_0 cmp x0, 2 bne .L40 bl fuint64_t2_1 cmp x0, 3 bne .L40 adrp x0, .LC2 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_0 fmov s1, 2.0e+0 fcmp s0, s1 bne .L40 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_1 fmov s1, 3.0e+0 fcmp s0, s1 bne .L40 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_2 fmov s1, 4.0e+0 fcmp s0, s1 bne .L40 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_3 fmov s1, 5.0e+0 fcmp s0, s1 bne .L40 adrp x0, .LC3 ldr q0, [x0, #:lo12:.LC3] bl fint4_0 cmp w0, 2 bne .L40 bl fint4_1 cmp w0, 3 bne .L40 bl fint4_2 cmp w0, 4 bne .L40 bl fint4_3 cmp w0, 5 bne .L40 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_0 sxth w0, w0 cmp w0, 2 bne .L40 bl fshort8_1 sxth w0, w0 cmp w0, 3 bne .L40 bl fshort8_2 sxth w0, w0 cmp w0, 4 bne .L40 bl fshort8_3 sxth w0, w0 cmp w0, 5 bne .L40 bl fshort8_4 sxth w0, w0 cmp w0, 6 bne .L40 bl fshort8_5 sxth w0, w0 cmp w0, 7 bne .L40 bl fshort8_6 sxth w0, w0 cmp w0, 8 bne .L40 bl fshort8_7 sxth w0, w0 cmp w0, 9 bne .L40 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_0 and w0, w0, 255 cmp w0, 2 bne .L40 bl fchar16_1 and w0, w0, 255 cmp w0, 3 bne .L40 bl fchar16_2 and w0, w0, 255 cmp w0, 4 bne .L40 bl fchar16_3 and w0, w0, 255 cmp w0, 5 bne .L40 bl fchar16_4 and w0, w0, 255 cmp w0, 6 bne .L40 bl fchar16_5 and w0, w0, 255 cmp w0, 7 bne .L40 bl fchar16_6 and w0, w0, 255 cmp w0, 8 bne .L40 bl fchar16_7 and w0, w0, 255 cmp w0, 9 bne .L40 bl fchar16_8 and w0, w0, 255 cmp w0, 10 bne .L40 bl fchar16_9 and w0, w0, 255 cmp w0, 11 bne .L40 bl fchar16_10 and w0, w0, 255 cmp w0, 12 bne .L40 bl fchar16_11 and w0, w0, 255 cmp w0, 13 bne .L40 bl fchar16_12 and w0, w0, 255 cmp w0, 14 bne .L40 bl fchar16_13 and w0, w0, 255 cmp w0, 15 bne .L40 bl fchar16_14 and w0, w0, 255 cmp w0, 16 bne .L40 bl fchar16_15 and w0, w0, 255 cmp w0, 17 bne .L40 mov w0, 0 ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L40: .cfi_restore_state bl abort .cfi_endproc .LFE36: .size main, .-main .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC0: .word 0 .word 1072693248 .word 0 .word 1073741824 .align 4 .LC1: .xword 1 .xword 2 .align 4 .LC2: .word 1065353216 .word 1073741824 .word 1077936128 .word 1082130432 .align 4 .LC3: .word 1 .word 2 .word 3 .word 4 .align 4 .LC4: .hword 1 .hword 2 .hword 3 .hword 4 .hword 5 .hword 6 .hword 7 .hword 8 .align 4 .LC5: .byte 1 .byte 2 .byte 3 .byte 4 .byte 5 .byte 6 .byte 7 .byte 8 .byte 9 .byte 10 .byte 11 .byte 12 .byte 13 .byte 14 .byte 15 .byte 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "sse2-extract-1.c" .text .align 2 .p2align 4,,11 .global fdouble2_0 .type fdouble2_0, %function fdouble2_0: .LFB0: .cfi_startproc fmov d1, 1.0e+0 fadd d0, d0, d1 ret .cfi_endproc .LFE0: .size fdouble2_0, .-fdouble2_0 .align 2 .p2align 4,,11 .global fdouble2_1 .type fdouble2_1, %function fdouble2_1: .LFB1: .cfi_startproc dup d0, v0.d[1] fmov d1, 1.0e+0 fadd d0, d0, d1 ret .cfi_endproc .LFE1: .size fdouble2_1, .-fdouble2_1 .align 2 .p2align 4,,11 .global fuint64_t2_0 .type fuint64_t2_0, %function fuint64_t2_0: .LFB2: .cfi_startproc fmov x0, d0 add x0, x0, 1 ret .cfi_endproc .LFE2: .size fuint64_t2_0, .-fuint64_t2_0 .align 2 .p2align 4,,11 .global fuint64_t2_1 .type fuint64_t2_1, %function fuint64_t2_1: .LFB3: .cfi_startproc umov x0, v0.d[1] add x0, x0, 1 ret .cfi_endproc .LFE3: .size fuint64_t2_1, .-fuint64_t2_1 .align 2 .p2align 4,,11 .global ffloat4_0 .type ffloat4_0, %function ffloat4_0: .LFB4: .cfi_startproc fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE4: .size ffloat4_0, .-ffloat4_0 .align 2 .p2align 4,,11 .global ffloat4_1 .type ffloat4_1, %function ffloat4_1: .LFB5: .cfi_startproc dup s0, v0.s[1] fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE5: .size ffloat4_1, .-ffloat4_1 .align 2 .p2align 4,,11 .global ffloat4_2 .type ffloat4_2, %function ffloat4_2: .LFB6: .cfi_startproc dup s0, v0.s[2] fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE6: .size ffloat4_2, .-ffloat4_2 .align 2 .p2align 4,,11 .global ffloat4_3 .type ffloat4_3, %function ffloat4_3: .LFB7: .cfi_startproc dup s0, v0.s[3] fmov s1, 1.0e+0 fadd s0, s0, s1 ret .cfi_endproc .LFE7: .size ffloat4_3, .-ffloat4_3 .align 2 .p2align 4,,11 .global fint4_0 .type fint4_0, %function fint4_0: .LFB8: .cfi_startproc fmov w0, s0 add w0, w0, 1 ret .cfi_endproc .LFE8: .size fint4_0, .-fint4_0 .align 2 .p2align 4,,11 .global fint4_1 .type fint4_1, %function fint4_1: .LFB9: .cfi_startproc umov w0, v0.s[1] add w0, w0, 1 ret .cfi_endproc .LFE9: .size fint4_1, .-fint4_1 .align 2 .p2align 4,,11 .global fint4_2 .type fint4_2, %function fint4_2: .LFB10: .cfi_startproc umov w0, v0.s[2] add w0, w0, 1 ret .cfi_endproc .LFE10: .size fint4_2, .-fint4_2 .align 2 .p2align 4,,11 .global fint4_3 .type fint4_3, %function fint4_3: .LFB11: .cfi_startproc umov w0, v0.s[3] add w0, w0, 1 ret .cfi_endproc .LFE11: .size fint4_3, .-fint4_3 .align 2 .p2align 4,,11 .global fshort8_0 .type fshort8_0, %function fshort8_0: .LFB12: .cfi_startproc umov w0, v0.h[0] add w0, w0, 1 ret .cfi_endproc .LFE12: .size fshort8_0, .-fshort8_0 .align 2 .p2align 4,,11 .global fshort8_1 .type fshort8_1, %function fshort8_1: .LFB13: .cfi_startproc umov w0, v0.h[1] add w0, w0, 1 ret .cfi_endproc .LFE13: .size fshort8_1, .-fshort8_1 .align 2 .p2align 4,,11 .global fshort8_2 .type fshort8_2, %function fshort8_2: .LFB14: .cfi_startproc umov w0, v0.h[2] add w0, w0, 1 ret .cfi_endproc .LFE14: .size fshort8_2, .-fshort8_2 .align 2 .p2align 4,,11 .global fshort8_3 .type fshort8_3, %function fshort8_3: .LFB15: .cfi_startproc umov w0, v0.h[3] add w0, w0, 1 ret .cfi_endproc .LFE15: .size fshort8_3, .-fshort8_3 .align 2 .p2align 4,,11 .global fshort8_4 .type fshort8_4, %function fshort8_4: .LFB16: .cfi_startproc umov w0, v0.h[4] add w0, w0, 1 ret .cfi_endproc .LFE16: .size fshort8_4, .-fshort8_4 .align 2 .p2align 4,,11 .global fshort8_5 .type fshort8_5, %function fshort8_5: .LFB17: .cfi_startproc umov w0, v0.h[5] add w0, w0, 1 ret .cfi_endproc .LFE17: .size fshort8_5, .-fshort8_5 .align 2 .p2align 4,,11 .global fshort8_6 .type fshort8_6, %function fshort8_6: .LFB18: .cfi_startproc umov w0, v0.h[6] add w0, w0, 1 ret .cfi_endproc .LFE18: .size fshort8_6, .-fshort8_6 .align 2 .p2align 4,,11 .global fshort8_7 .type fshort8_7, %function fshort8_7: .LFB19: .cfi_startproc umov w0, v0.h[7] add w0, w0, 1 ret .cfi_endproc .LFE19: .size fshort8_7, .-fshort8_7 .align 2 .p2align 4,,11 .global fchar16_0 .type fchar16_0, %function fchar16_0: .LFB20: .cfi_startproc umov w0, v0.b[0] add w0, w0, 1 ret .cfi_endproc .LFE20: .size fchar16_0, .-fchar16_0 .align 2 .p2align 4,,11 .global fchar16_1 .type fchar16_1, %function fchar16_1: .LFB21: .cfi_startproc umov w0, v0.b[1] add w0, w0, 1 ret .cfi_endproc .LFE21: .size fchar16_1, .-fchar16_1 .align 2 .p2align 4,,11 .global fchar16_2 .type fchar16_2, %function fchar16_2: .LFB22: .cfi_startproc umov w0, v0.b[2] add w0, w0, 1 ret .cfi_endproc .LFE22: .size fchar16_2, .-fchar16_2 .align 2 .p2align 4,,11 .global fchar16_3 .type fchar16_3, %function fchar16_3: .LFB23: .cfi_startproc umov w0, v0.b[3] add w0, w0, 1 ret .cfi_endproc .LFE23: .size fchar16_3, .-fchar16_3 .align 2 .p2align 4,,11 .global fchar16_4 .type fchar16_4, %function fchar16_4: .LFB24: .cfi_startproc umov w0, v0.b[4] add w0, w0, 1 ret .cfi_endproc .LFE24: .size fchar16_4, .-fchar16_4 .align 2 .p2align 4,,11 .global fchar16_5 .type fchar16_5, %function fchar16_5: .LFB25: .cfi_startproc umov w0, v0.b[5] add w0, w0, 1 ret .cfi_endproc .LFE25: .size fchar16_5, .-fchar16_5 .align 2 .p2align 4,,11 .global fchar16_6 .type fchar16_6, %function fchar16_6: .LFB26: .cfi_startproc umov w0, v0.b[6] add w0, w0, 1 ret .cfi_endproc .LFE26: .size fchar16_6, .-fchar16_6 .align 2 .p2align 4,,11 .global fchar16_7 .type fchar16_7, %function fchar16_7: .LFB27: .cfi_startproc umov w0, v0.b[7] add w0, w0, 1 ret .cfi_endproc .LFE27: .size fchar16_7, .-fchar16_7 .align 2 .p2align 4,,11 .global fchar16_8 .type fchar16_8, %function fchar16_8: .LFB28: .cfi_startproc umov w0, v0.b[8] add w0, w0, 1 ret .cfi_endproc .LFE28: .size fchar16_8, .-fchar16_8 .align 2 .p2align 4,,11 .global fchar16_9 .type fchar16_9, %function fchar16_9: .LFB29: .cfi_startproc umov w0, v0.b[9] add w0, w0, 1 ret .cfi_endproc .LFE29: .size fchar16_9, .-fchar16_9 .align 2 .p2align 4,,11 .global fchar16_10 .type fchar16_10, %function fchar16_10: .LFB30: .cfi_startproc umov w0, v0.b[10] add w0, w0, 1 ret .cfi_endproc .LFE30: .size fchar16_10, .-fchar16_10 .align 2 .p2align 4,,11 .global fchar16_11 .type fchar16_11, %function fchar16_11: .LFB31: .cfi_startproc umov w0, v0.b[11] add w0, w0, 1 ret .cfi_endproc .LFE31: .size fchar16_11, .-fchar16_11 .align 2 .p2align 4,,11 .global fchar16_12 .type fchar16_12, %function fchar16_12: .LFB32: .cfi_startproc umov w0, v0.b[12] add w0, w0, 1 ret .cfi_endproc .LFE32: .size fchar16_12, .-fchar16_12 .align 2 .p2align 4,,11 .global fchar16_13 .type fchar16_13, %function fchar16_13: .LFB33: .cfi_startproc umov w0, v0.b[13] add w0, w0, 1 ret .cfi_endproc .LFE33: .size fchar16_13, .-fchar16_13 .align 2 .p2align 4,,11 .global fchar16_14 .type fchar16_14, %function fchar16_14: .LFB34: .cfi_startproc umov w0, v0.b[14] add w0, w0, 1 ret .cfi_endproc .LFE34: .size fchar16_14, .-fchar16_14 .align 2 .p2align 4,,11 .global fchar16_15 .type fchar16_15, %function fchar16_15: .LFB35: .cfi_startproc umov w0, v0.b[15] add w0, w0, 1 ret .cfi_endproc .LFE35: .size fchar16_15, .-fchar16_15 .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB36: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC0 mov x29, sp ldr q0, [x0, #:lo12:.LC0] bl fdouble2_0 fmov d1, 2.0e+0 fcmp d0, d1 bne .L40 adrp x0, .LC0 ldr q0, [x0, #:lo12:.LC0] bl fdouble2_1 fmov d1, 3.0e+0 fcmp d0, d1 bne .L40 adrp x0, .LC1 ldr q0, [x0, #:lo12:.LC1] bl fuint64_t2_0 cmp x0, 2 bne .L40 bl fuint64_t2_1 cmp x0, 3 bne .L40 adrp x0, .LC2 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_0 fmov s1, 2.0e+0 fcmp s0, s1 bne .L40 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_1 fmov s1, 3.0e+0 fcmp s0, s1 bne .L40 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_2 fmov s1, 4.0e+0 fcmp s0, s1 bne .L40 ldr q0, [x0, #:lo12:.LC2] bl ffloat4_3 fmov s1, 5.0e+0 fcmp s0, s1 bne .L40 adrp x0, .LC3 ldr q0, [x0, #:lo12:.LC3] bl fint4_0 cmp w0, 2 bne .L40 bl fint4_1 cmp w0, 3 bne .L40 bl fint4_2 cmp w0, 4 bne .L40 bl fint4_3 cmp w0, 5 bne .L40 adrp x0, .LC4 ldr q0, [x0, #:lo12:.LC4] bl fshort8_0 sxth w0, w0 cmp w0, 2 bne .L40 bl fshort8_1 sxth w0, w0 cmp w0, 3 bne .L40 bl fshort8_2 sxth w0, w0 cmp w0, 4 bne .L40 bl fshort8_3 sxth w0, w0 cmp w0, 5 bne .L40 bl fshort8_4 sxth w0, w0 cmp w0, 6 bne .L40 bl fshort8_5 sxth w0, w0 cmp w0, 7 bne .L40 bl fshort8_6 sxth w0, w0 cmp w0, 8 bne .L40 bl fshort8_7 sxth w0, w0 cmp w0, 9 bne .L40 adrp x0, .LC5 ldr q0, [x0, #:lo12:.LC5] bl fchar16_0 and w0, w0, 255 cmp w0, 2 bne .L40 bl fchar16_1 and w0, w0, 255 cmp w0, 3 bne .L40 bl fchar16_2 and w0, w0, 255 cmp w0, 4 bne .L40 bl fchar16_3 and w0, w0, 255 cmp w0, 5 bne .L40 bl fchar16_4 and w0, w0, 255 cmp w0, 6 bne .L40 bl fchar16_5 and w0, w0, 255 cmp w0, 7 bne .L40 bl fchar16_6 and w0, w0, 255 cmp w0, 8 bne .L40 bl fchar16_7 and w0, w0, 255 cmp w0, 9 bne .L40 bl fchar16_8 and w0, w0, 255 cmp w0, 10 bne .L40 bl fchar16_9 and w0, w0, 255 cmp w0, 11 bne .L40 bl fchar16_10 and w0, w0, 255 cmp w0, 12 bne .L40 bl fchar16_11 and w0, w0, 255 cmp w0, 13 bne .L40 bl fchar16_12 and w0, w0, 255 cmp w0, 14 bne .L40 bl fchar16_13 and w0, w0, 255 cmp w0, 15 bne .L40 bl fchar16_14 and w0, w0, 255 cmp w0, 16 bne .L40 bl fchar16_15 and w0, w0, 255 cmp w0, 17 bne .L40 mov w0, 0 ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L40: .cfi_restore_state bl abort .cfi_endproc .LFE36: .size main, .-main .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC0: .word 0 .word 1072693248 .word 0 .word 1073741824 .align 4 .LC1: .xword 1 .xword 2 .align 4 .LC2: .word 1065353216 .word 1073741824 .word 1077936128 .word 1082130432 .align 4 .LC3: .word 1 .word 2 .word 3 .word 4 .align 4 .LC4: .hword 1 .hword 2 .hword 3 .hword 4 .hword 5 .hword 6 .hword 7 .hword 8 .align 4 .LC5: .byte 1 .byte 2 .byte 3 .byte 4 .byte 5 .byte 6 .byte 7 .byte 8 .byte 9 .byte 10 .byte 11 .byte 12 .byte 13 .byte 14 .byte 15 .byte 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
ttas-5.c
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <pthread.h> #include <stdatomic.h> #include <assert.h> // ttaslock.h // struct ttaslock_s { atomic_int state; }; typedef struct ttaslock_s ttaslock_t; static inline void ttaslock_init(struct ttaslock_s *l); static inline void ttaslock_acquire(struct ttaslock_s *l); static inline void ttaslock_release(struct ttaslock_s *l); // ttaslock.c // static inline void ttaslock_init(struct ttaslock_s *l) { atomic_init(&l->state, 0); } static inline void await_for_lock(struct ttaslock_s *l) { while (atomic_load_explicit(&l->state, memory_order_relaxed) != 0) ; return; } static inline int try_acquire(struct ttaslock_s *l) { return atomic_exchange_explicit(&l->state, 1, memory_order_acquire); } static inline void ttaslock_acquire(struct ttaslock_s *l) { while (1) { await_for_lock(l); if (!try_acquire(l)) return; } } static inline void ttaslock_release(struct ttaslock_s *l) { atomic_store_explicit(&l->state, 0, memory_order_release); } // main.c // int shared; ttaslock_t lock; void *thread_n(void *arg) { intptr_t index = ((intptr_t) arg); ttaslock_acquire(&lock); shared = index; int r = shared; assert(r == index); ttaslock_release(&lock); return NULL; } // variant // int main() { pthread_t t1, t2, t3, t4, t5; ttaslock_init(&lock); pthread_create(&t1, NULL, thread_n, (void *) 0); pthread_create(&t2, NULL, thread_n, (void *) 1); pthread_create(&t3, NULL, thread_n, (void *) 2); pthread_create(&t4, NULL, thread_n, (void *) 3); pthread_create(&t5, NULL, thread_n, (void *) 4); return 0; }
.file "ttas-5.c" .option pic .text .align 1 .type ttaslock_init, @function ttaslock_init: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 sd a0,-56(s0) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 ld a5,-56(s0) sd a5,-32(s0) sw zero,-36(s0) lw a5,-36(s0) sext.w a4,a5 ld a5,-32(s0) amoswap.w zero,a4,0(a5) nop la a5,__stack_chk_guard ld a4, -24(s0) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 beq a5,zero,.L2 call __stack_chk_fail@plt .L2: ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .size ttaslock_init, .-ttaslock_init .align 1 .type await_for_lock, @function await_for_lock: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 sd a0,-56(s0) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 nop .L4: ld a5,-56(s0) sd a5,-32(s0) ld a5,-32(s0) lw a5,0(a5) sext.w a5,a5 sext.w a5,a5 sw a5,-36(s0) lw a5,-36(s0) bne a5,zero,.L4 nop la a5,__stack_chk_guard ld a4, -24(s0) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 beq a5,zero,.L6 call __stack_chk_fail@plt .L6: ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .size await_for_lock, .-await_for_lock .align 1 .type try_acquire, @function try_acquire: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 sd a0,-56(s0) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 ld a5,-56(s0) sd a5,-32(s0) li a5,1 sw a5,-40(s0) lw a5,-40(s0) sext.w a3,a5 ld a5,-32(s0) mv a4,a3 amoswap.w.aq a4,a4,0(a5) sext.w a5,a4 sext.w a5,a5 sw a5,-36(s0) lw a5,-36(s0) mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L9 call __stack_chk_fail@plt .L9: mv a0,a4 ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .size try_acquire, .-try_acquire .align 1 .type ttaslock_acquire, @function ttaslock_acquire: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 sd a0,-24(s0) .L13: ld a0,-24(s0) call await_for_lock ld a0,-24(s0) call try_acquire mv a5,a0 beq a5,zero,.L15 j .L13 .L15: nop ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size ttaslock_acquire, .-ttaslock_acquire .align 1 .type ttaslock_release, @function ttaslock_release: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 sd a0,-56(s0) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 ld a5,-56(s0) sd a5,-32(s0) sw zero,-36(s0) lw a5,-36(s0) sext.w a4,a5 ld a5,-32(s0) fence iorw,ow; amoswap.w zero,a4,0(a5) nop la a5,__stack_chk_guard ld a4, -24(s0) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 beq a5,zero,.L17 call __stack_chk_fail@plt .L17: ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .size ttaslock_release, .-ttaslock_release .globl shared .bss .align 2 .type shared, @object .size shared, 4 shared: .zero 4 .globl lock .align 3 .type lock, @object .size lock, 4 lock: .zero 4 .section .rodata .align 3 .LC0: .string "programs/ttas-5.c" .align 3 .LC1: .string "r == index" .text .align 1 .globl thread_n .type thread_n, @function thread_n: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) ld a5,-40(s0) sd a5,-24(s0) lla a0,lock call ttaslock_acquire ld a5,-24(s0) sext.w a4,a5 lla a5,shared sw a4,0(a5) lla a5,shared lw a5,0(a5) sw a5,-28(s0) lw a5,-28(s0) ld a4,-24(s0) beq a4,a5,.L19 lla a3,__PRETTY_FUNCTION__.0 li a2,64 lla a1,.LC0 lla a0,.LC1 call __assert_fail@plt .L19: lla a0,lock call ttaslock_release li a5,0 mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size thread_n, .-thread_n .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 lla a0,lock call ttaslock_init addi a5,s0,-64 li a3,0 lla a2,thread_n li a1,0 mv a0,a5 call pthread_create@plt addi a5,s0,-56 li a3,1 lla a2,thread_n li a1,0 mv a0,a5 call pthread_create@plt addi a5,s0,-48 li a3,2 lla a2,thread_n li a1,0 mv a0,a5 call pthread_create@plt addi a5,s0,-40 li a3,3 lla a2,thread_n li a1,0 mv a0,a5 call pthread_create@plt addi a5,s0,-32 li a3,4 lla a2,thread_n li a1,0 mv a0,a5 call pthread_create@plt li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L23 call __stack_chk_fail@plt .L23: mv a0,a4 ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .size main, .-main .section .rodata .align 3 .type __PRETTY_FUNCTION__.0, @object .size __PRETTY_FUNCTION__.0, 9 __PRETTY_FUNCTION__.0: .string "thread_n" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "ttas-5.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "programs/ttas-5.c" .align 3 .LC1: .string "r == index" .text .align 1 .globl thread_n .type thread_n, @function thread_n: lla a4,.LANCHOR0 li a3,1 .L2: lw a5,0(a4) sext.w a5,a5 bne a5,zero,.L2 mv a5,a3 amoswap.w.aq a5,a5,0(a4) sext.w a5,a5 bne a5,zero,.L2 sext.w a5,a0 sw a5,.LANCHOR0+4,a4 bne a5,a0,.L10 lla a5,.LANCHOR0 fence iorw,ow; amoswap.w zero,zero,0(a5) li a0,0 ret .L10: addi sp,sp,-16 sd ra,8(sp) lla a3,.LANCHOR1 li a2,64 lla a1,.LC0 lla a0,.LC1 call __assert_fail@plt .size thread_n, .-thread_n .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 40(sp) li a5, 0 lla a5,.LANCHOR0 amoswap.w zero,zero,0(a5) li a3,0 lla a2,thread_n li a1,0 mv a0,sp call pthread_create@plt li a3,1 lla a2,thread_n li a1,0 addi a0,sp,8 call pthread_create@plt li a3,2 lla a2,thread_n li a1,0 addi a0,sp,16 call pthread_create@plt li a3,3 lla a2,thread_n li a1,0 addi a0,sp,24 call pthread_create@plt li a3,4 lla a2,thread_n li a1,0 addi a0,sp,32 call pthread_create@plt ld a4, 40(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L14 li a0,0 ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .L14: call __stack_chk_fail@plt .size main, .-main .globl lock .globl shared .section .rodata .align 3 .set .LANCHOR1,. + 0 .type __PRETTY_FUNCTION__.0, @object .size __PRETTY_FUNCTION__.0, 9 __PRETTY_FUNCTION__.0: .string "thread_n" .bss .align 3 .set .LANCHOR0,. + 0 .type lock, @object .size lock, 4 lock: .zero 4 .type shared, @object .size shared, 4 shared: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "ttas-5.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "programs/ttas-5.c" .align 3 .LC1: .string "r == index" .text .align 1 .globl thread_n .type thread_n, @function thread_n: lla a4,.LANCHOR0 li a3,1 .L2: lw a5,0(a4) bne a5,zero,.L2 mv a5,a3 amoswap.w.aq a5,a5,0(a4) sext.w a5,a5 bne a5,zero,.L2 sext.w a5,a0 sw a5,4(a4) bne a5,a0,.L11 fence iorw,ow; amoswap.w zero,zero,0(a4) li a0,0 ret .L11: addi sp,sp,-16 lla a3,.LANCHOR1 li a2,64 lla a1,.LC0 lla a0,.LC1 sd ra,8(sp) call __assert_fail@plt .size thread_n, .-thread_n .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd s0,48(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 40(sp) li a5, 0 sd ra,56(sp) lla a5,.LANCHOR0 amoswap.w zero,zero,0(a5) li a3,0 lla a2,thread_n li a1,0 mv a0,sp call pthread_create@plt li a3,1 lla a2,thread_n li a1,0 addi a0,sp,8 call pthread_create@plt li a3,2 lla a2,thread_n li a1,0 addi a0,sp,16 call pthread_create@plt li a3,3 lla a2,thread_n li a1,0 addi a0,sp,24 call pthread_create@plt li a3,4 lla a2,thread_n li a1,0 addi a0,sp,32 call pthread_create@plt ld a4, 40(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L15 ld ra,56(sp) ld s0,48(sp) li a0,0 addi sp,sp,64 jr ra .L15: call __stack_chk_fail@plt .size main, .-main .globl lock .globl shared .section .rodata .align 3 .set .LANCHOR1,. + 0 .type __PRETTY_FUNCTION__.0, @object .size __PRETTY_FUNCTION__.0, 9 __PRETTY_FUNCTION__.0: .string "thread_n" .bss .align 3 .set .LANCHOR0,. + 0 .type lock, @object .size lock, 4 lock: .zero 4 .type shared, @object .size shared, 4 shared: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "ttas-5.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "programs/ttas-5.c" .align 3 .LC1: .string "r == index" .text .align 1 .globl thread_n .type thread_n, @function thread_n: lla a4,.LANCHOR0 li a3,1 .L2: lw a5,0(a4) bne a5,zero,.L2 mv a5,a3 amoswap.w.aq a5,a5,0(a4) sext.w a5,a5 bne a5,zero,.L2 sext.w a5,a0 sw a5,4(a4) bne a5,a0,.L11 fence iorw,ow; amoswap.w zero,zero,0(a4) li a0,0 ret .L11: addi sp,sp,-16 lla a3,.LANCHOR1 li a2,64 lla a1,.LC0 lla a0,.LC1 sd ra,8(sp) call __assert_fail@plt .size thread_n, .-thread_n .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd s0,48(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 40(sp) li a5, 0 sd ra,56(sp) lla a5,.LANCHOR0 amoswap.w zero,zero,0(a5) li a3,0 lla a2,thread_n li a1,0 mv a0,sp call pthread_create@plt li a3,1 lla a2,thread_n li a1,0 addi a0,sp,8 call pthread_create@plt li a3,2 lla a2,thread_n li a1,0 addi a0,sp,16 call pthread_create@plt li a3,3 lla a2,thread_n li a1,0 addi a0,sp,24 call pthread_create@plt li a3,4 lla a2,thread_n li a1,0 addi a0,sp,32 call pthread_create@plt ld a4, 40(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L15 ld ra,56(sp) ld s0,48(sp) li a0,0 addi sp,sp,64 jr ra .L15: call __stack_chk_fail@plt .size main, .-main .globl lock .globl shared .section .rodata .align 3 .set .LANCHOR1,. + 0 .type __PRETTY_FUNCTION__.0, @object .size __PRETTY_FUNCTION__.0, 9 __PRETTY_FUNCTION__.0: .string "thread_n" .bss .align 3 .set .LANCHOR0,. + 0 .type lock, @object .size lock, 4 lock: .zero 4 .type shared, @object .size shared, 4 shared: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ttas-5.c" .text .align 2 .type ttaslock_init, %function ttaslock_init: .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] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 ldr x0, [sp, 24] str x0, [sp, 48] str wzr, [sp, 44] ldr w0, [sp, 44] mov w1, w0 ldr x0, [sp, 48] str w1, [x0] 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 .L2 bl __stack_chk_fail .L2: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size ttaslock_init, .-ttaslock_init .align 2 .type await_for_lock, %function await_for_lock: .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] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 nop .L4: ldr x0, [sp, 24] str x0, [sp, 48] ldr x0, [sp, 48] ldr w0, [x0] str w0, [sp, 44] ldr w0, [sp, 44] cmp w0, 0 bne .L4 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 .L6 bl __stack_chk_fail .L6: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size await_for_lock, .-await_for_lock .global __aarch64_swp4_acq .align 2 .type try_acquire, %function try_acquire: .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] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 ldr x0, [sp, 24] str x0, [sp, 48] mov w0, 1 str w0, [sp, 40] ldr w0, [sp, 40] mov w2, w0 ldr x0, [sp, 48] mov x1, x0 mov w0, w2 bl __aarch64_swp4_acq str w0, [sp, 44] ldr w0, [sp, 44] mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 56] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L9 bl __stack_chk_fail .L9: mov w0, w1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size try_acquire, .-try_acquire .align 2 .type ttaslock_acquire, %function ttaslock_acquire: .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] .L13: ldr x0, [sp, 24] bl await_for_lock ldr x0, [sp, 24] bl try_acquire cmp w0, 0 beq .L15 b .L13 .L15: nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size ttaslock_acquire, .-ttaslock_acquire .align 2 .type ttaslock_release, %function ttaslock_release: .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] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 56] mov x1, 0 ldr x0, [sp, 24] str x0, [sp, 48] str wzr, [sp, 44] ldr w0, [sp, 44] mov w1, w0 ldr x0, [sp, 48] stlr w1, [x0] 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 .L17 bl __stack_chk_fail .L17: ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size ttaslock_release, .-ttaslock_release .global shared .bss .align 2 .type shared, %object .size shared, 4 shared: .zero 4 .global lock .align 3 .type lock, %object .size lock, 4 lock: .zero 4 .section .rodata .align 3 .LC0: .string "programs/ttas-5.c" .align 3 .LC1: .string "r == index" .text .align 2 .global thread_n .type thread_n, %function thread_n: .LFB11: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] str x0, [sp, 40] adrp x0, lock add x0, x0, :lo12:lock bl ttaslock_acquire ldr x0, [sp, 40] mov w1, w0 adrp x0, shared add x0, x0, :lo12:shared str w1, [x0] adrp x0, shared add x0, x0, :lo12:shared ldr w0, [x0] str w0, [sp, 36] ldrsw x0, [sp, 36] ldr x1, [sp, 40] cmp x1, x0 beq .L19 adrp x0, __PRETTY_FUNCTION__.0 add x3, x0, :lo12:__PRETTY_FUNCTION__.0 mov w2, 64 adrp x0, .LC0 add x1, x0, :lo12:.LC0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __assert_fail .L19: adrp x0, lock add x0, x0, :lo12:lock bl ttaslock_release mov x0, 0 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size thread_n, .-thread_n .align 2 .global main .type main, %function main: .LFB12: .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, lock add x0, x0, :lo12:lock bl ttaslock_init add x4, sp, 16 mov x3, 0 adrp x0, thread_n add x2, x0, :lo12:thread_n mov x1, 0 mov x0, x4 bl pthread_create add x4, sp, 24 mov x3, 1 adrp x0, thread_n add x2, x0, :lo12:thread_n mov x1, 0 mov x0, x4 bl pthread_create add x4, sp, 32 mov x3, 2 adrp x0, thread_n add x2, x0, :lo12:thread_n mov x1, 0 mov x0, x4 bl pthread_create add x4, sp, 40 mov x3, 3 adrp x0, thread_n add x2, x0, :lo12:thread_n mov x1, 0 mov x0, x4 bl pthread_create add x4, sp, 48 mov x3, 4 adrp x0, thread_n add x2, x0, :lo12:thread_n mov x1, 0 mov x0, x4 bl pthread_create 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 .L23 bl __stack_chk_fail .L23: mov w0, w1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size main, .-main .section .rodata .align 3 .type __PRETTY_FUNCTION__.0, %object .size __PRETTY_FUNCTION__.0, 9 __PRETTY_FUNCTION__.0: .string "thread_n" .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ttas-5.c" .text .global __aarch64_swp4_acq .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "programs/ttas-5.c" .align 3 .LC1: .string "r == index" .text .align 2 .global thread_n .type thread_n, %function thread_n: .LFB45: .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] str x21, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 mov x21, x0 adrp x19, .LANCHOR0 add x19, x19, :lo12:.LANCHOR0 mov w20, 1 .L2: ldr w1, [x19] cbnz w1, .L2 mov x1, x19 mov w0, w20 bl __aarch64_swp4_acq cbnz w0, .L2 adrp x0, .LANCHOR0+4 str w21, [x0, #:lo12:.LANCHOR0+4] cmp x21, w21, sxtw bne .L8 adrp x0, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 stlr wzr, [x0] mov x0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L8: .cfi_restore_state adrp x3, .LANCHOR1 add x3, x3, :lo12:.LANCHOR1 mov w2, 64 adrp x1, .LC0 add x1, x1, :lo12:.LC0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __assert_fail .cfi_endproc .LFE45: .size thread_n, .-thread_n .align 2 .global main .type main, %function main: .LFB46: .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 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, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 str wzr, [x0] adrp x19, thread_n add x19, x19, :lo12:thread_n mov x3, 0 mov x2, x19 add x0, sp, 32 bl pthread_create mov x3, 1 mov x2, x19 mov x1, 0 add x0, sp, 40 bl pthread_create mov x3, 2 mov x2, x19 mov x1, 0 add x0, sp, 48 bl pthread_create mov x3, 3 mov x2, x19 mov x1, 0 add x0, sp, 56 bl pthread_create mov x3, 4 mov x2, x19 mov x1, 0 add x0, sp, 64 bl pthread_create adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 72] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L12 mov w0, 0 ldr x19, [sp, 16] ldp x29, x30, [sp], 80 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .L12: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE46: .size main, .-main .global lock .global shared .section .rodata .align 3 .set .LANCHOR1,. + 0 .type __PRETTY_FUNCTION__.0, %object .size __PRETTY_FUNCTION__.0, 9 __PRETTY_FUNCTION__.0: .string "thread_n" .bss .align 3 .set .LANCHOR0,. + 0 .type lock, %object .size lock, 4 lock: .zero 4 .type shared, %object .size shared, 4 shared: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ttas-5.c" .text .global __aarch64_swp4_acq .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "programs/ttas-5.c" .align 3 .LC1: .string "r == index" .text .align 2 .p2align 4,,11 .global thread_n .type thread_n, %function thread_n: .LFB45: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x19, .LANCHOR0 mov x20, x0 add x19, x19, :lo12:.LANCHOR0 .p2align 3,,7 .L2: ldr w2, [x19] cbnz w2, .L2 mov x1, x19 mov w0, 1 bl __aarch64_swp4_acq cbnz w0, .L2 str w20, [x19, 4] cmp x20, w20, sxtw bne .L9 stlr wzr, [x19] ldp x19, x20, [sp, 16] mov x0, 0 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L9: .cfi_restore_state adrp x3, .LANCHOR1 adrp x1, .LC0 adrp x0, .LC1 add x3, x3, :lo12:.LANCHOR1 add x1, x1, :lo12:.LC0 add x0, x0, :lo12:.LC1 mov w2, 64 bl __assert_fail .cfi_endproc .LFE45: .size thread_n, .-thread_n .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB46: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 adrp x1, :got:__stack_chk_guard adrp x0, .LANCHOR0 mov x29, sp ldr x1, [x1, #:got_lo12:__stack_chk_guard] str x19, [sp, 16] .cfi_offset 19, -64 add x0, x0, :lo12:.LANCHOR0 ldr x2, [x1] str x2, [sp, 72] mov x2, 0 str wzr, [x0] adrp x19, thread_n add x19, x19, :lo12:thread_n mov x2, x19 mov x3, 0 mov x1, 0 add x0, sp, 32 bl pthread_create mov x2, x19 mov x3, 1 mov x1, 0 add x0, sp, 40 bl pthread_create mov x2, x19 mov x3, 2 mov x1, 0 add x0, sp, 48 bl pthread_create mov x2, x19 mov x3, 3 mov x1, 0 add x0, sp, 56 bl pthread_create mov x2, x19 mov x1, 0 add x0, sp, 64 mov x3, 4 bl pthread_create adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 72] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L13 mov w0, 0 ldr x19, [sp, 16] ldp x29, x30, [sp], 80 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .L13: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE46: .size main, .-main .global lock .global shared .section .rodata .align 3 .set .LANCHOR1,. + 0 .type __PRETTY_FUNCTION__.0, %object .size __PRETTY_FUNCTION__.0, 9 __PRETTY_FUNCTION__.0: .string "thread_n" .bss .align 3 .set .LANCHOR0,. + 0 .type lock, %object .size lock, 4 lock: .zero 4 .type shared, %object .size shared, 4 shared: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "ttas-5.c" .text .global __aarch64_swp4_acq .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "programs/ttas-5.c" .align 3 .LC1: .string "r == index" .text .align 2 .p2align 4,,11 .global thread_n .type thread_n, %function thread_n: .LFB45: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x19, .LANCHOR0 mov x20, x0 add x19, x19, :lo12:.LANCHOR0 .p2align 3,,7 .L2: ldr w2, [x19] cbnz w2, .L2 mov x1, x19 mov w0, 1 bl __aarch64_swp4_acq cbnz w0, .L2 str w20, [x19, 4] cmp x20, w20, sxtw bne .L9 stlr wzr, [x19] ldp x19, x20, [sp, 16] mov x0, 0 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L9: .cfi_restore_state adrp x3, .LANCHOR1 adrp x1, .LC0 adrp x0, .LC1 add x3, x3, :lo12:.LANCHOR1 add x1, x1, :lo12:.LC0 add x0, x0, :lo12:.LC1 mov w2, 64 bl __assert_fail .cfi_endproc .LFE45: .size thread_n, .-thread_n .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB46: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 adrp x1, :got:__stack_chk_guard adrp x0, .LANCHOR0 mov x29, sp ldr x1, [x1, #:got_lo12:__stack_chk_guard] str x19, [sp, 16] .cfi_offset 19, -64 add x0, x0, :lo12:.LANCHOR0 ldr x2, [x1] str x2, [sp, 72] mov x2, 0 str wzr, [x0] adrp x19, thread_n add x19, x19, :lo12:thread_n mov x2, x19 mov x3, 0 mov x1, 0 add x0, sp, 32 bl pthread_create mov x2, x19 mov x3, 1 mov x1, 0 add x0, sp, 40 bl pthread_create mov x2, x19 mov x3, 2 mov x1, 0 add x0, sp, 48 bl pthread_create mov x2, x19 mov x3, 3 mov x1, 0 add x0, sp, 56 bl pthread_create mov x2, x19 mov x1, 0 add x0, sp, 64 mov x3, 4 bl pthread_create adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 72] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L13 mov w0, 0 ldr x19, [sp, 16] ldp x29, x30, [sp], 80 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .L13: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE46: .size main, .-main .global lock .global shared .section .rodata .align 3 .set .LANCHOR1,. + 0 .type __PRETTY_FUNCTION__.0, %object .size __PRETTY_FUNCTION__.0, 9 __PRETTY_FUNCTION__.0: .string "thread_n" .bss .align 3 .set .LANCHOR0,. + 0 .type lock, %object .size lock, 4 lock: .zero 4 .type shared, %object .size shared, 4 shared: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
redundant_co_20.c
/* This example is taken from the TRACER benchmarks * https://doi.org/10.1145/3276505 */ // Adapted for the tool PSChecker #include <pthread.h> #define N 20 int x; void *thread1(void *arg) { int i; for (i=0; i<N; i++) rlx_write_ps(x,1); return NULL; } void *thread2(void *arg) { int i; for (i=0; i<N; i++) rlx_write_ps(x,2); return NULL; } void *thread3(void *arg) { int _x; rlx_read_ps(x, _x); assert(_x != 3); return NULL; } int main(int argc, char **argv) { pthread_t t1, t2, t3; x = 0; pthread_create(&t1, NULL, thread1, NULL); pthread_create(&t2, NULL, thread2, NULL); pthread_create(&t3, NULL, thread3, NULL); return 0; }
.file "redundant_co_20.c" .option pic .text .globl x .bss .align 2 .type x, @object .size x, 4 x: .zero 4 .text .align 1 .globl thread1 .type thread1, @function thread1: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) sw zero,-20(s0) j .L2 .L3: lla a5,x lw a5,0(a5) li a1,1 mv a0,a5 call rlx_write_ps@plt lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L2: lw a5,-20(s0) sext.w a4,a5 li a5,19 ble a4,a5,.L3 li a5,0 mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size thread1, .-thread1 .align 1 .globl thread2 .type thread2, @function thread2: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) sw zero,-20(s0) j .L6 .L7: lla a5,x lw a5,0(a5) li a1,2 mv a0,a5 call rlx_write_ps@plt lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L6: lw a5,-20(s0) sext.w a4,a5 li a5,19 ble a4,a5,.L7 li a5,0 mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size thread2, .-thread2 .align 1 .globl thread3 .type thread3, @function thread3: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) lla a5,x lw a5,0(a5) lw a4,-20(s0) mv a1,a4 mv a0,a5 call rlx_read_ps@plt lw a5,-20(s0) sext.w a4,a5 li a5,3 sub a5,a4,a5 snez a5,a5 andi a5,a5,0xff sext.w a5,a5 mv a0,a5 call assert@plt li a5,0 mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size thread3, .-thread3 .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 mv a5,a0 sd a1,-64(s0) sw a5,-52(s0) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 lla a5,x sw zero,0(a5) addi a5,s0,-48 li a3,0 lla a2,thread1 li a1,0 mv a0,a5 call pthread_create@plt addi a5,s0,-40 li a3,0 lla a2,thread2 li a1,0 mv a0,a5 call pthread_create@plt addi a5,s0,-32 li a3,0 lla a2,thread3 li a1,0 mv a0,a5 call pthread_create@plt li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L13 call __stack_chk_fail@plt .L13: mv a0,a4 ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "redundant_co_20.c" .option pic .text .align 1 .globl thread1 .type thread1, @function thread1: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) li s0,20 lla s1,.LANCHOR0 .L2: li a1,1 lw a0,0(s1) call rlx_write_ps@plt addiw s0,s0,-1 bne s0,zero,.L2 li a0,0 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size thread1, .-thread1 .align 1 .globl thread2 .type thread2, @function thread2: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) li s0,20 lla s1,.LANCHOR0 .L6: li a1,2 lw a0,0(s1) call rlx_write_ps@plt addiw s0,s0,-1 bne s0,zero,.L6 li a0,0 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size thread2, .-thread2 .align 1 .globl thread3 .type thread3, @function thread3: addi sp,sp,-16 sd ra,8(sp) li a1,0 lw a0,.LANCHOR0 call rlx_read_ps@plt li a0,1 call assert@plt li a0,0 ld ra,8(sp) addi sp,sp,16 jr ra .size thread3, .-thread3 .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 24(sp) li a5, 0 sw zero,.LANCHOR0,a5 li a3,0 lla a2,thread1 li a1,0 mv a0,sp call pthread_create@plt li a3,0 lla a2,thread2 li a1,0 addi a0,sp,8 call pthread_create@plt li a3,0 lla a2,thread3 li a1,0 addi a0,sp,16 call pthread_create@plt ld a4, 24(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L14 li a0,0 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .L14: call __stack_chk_fail@plt .size main, .-main .globl x .bss .align 2 .set .LANCHOR0,. + 0 .type x, @object .size x, 4 x: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "redundant_co_20.c" .option pic .text .align 1 .globl thread1 .type thread1, @function thread1: addi sp,sp,-32 sd s0,16(sp) sd s1,8(sp) sd ra,24(sp) li s0,20 lla s1,.LANCHOR0 .L2: lw a0,0(s1) addiw s0,s0,-1 li a1,1 call rlx_write_ps@plt bne s0,zero,.L2 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) li a0,0 addi sp,sp,32 jr ra .size thread1, .-thread1 .align 1 .globl thread2 .type thread2, @function thread2: addi sp,sp,-32 sd s0,16(sp) sd s1,8(sp) sd ra,24(sp) li s0,20 lla s1,.LANCHOR0 .L7: lw a0,0(s1) addiw s0,s0,-1 li a1,2 call rlx_write_ps@plt bne s0,zero,.L7 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) li a0,0 addi sp,sp,32 jr ra .size thread2, .-thread2 .align 1 .globl thread3 .type thread3, @function thread3: addi sp,sp,-16 li a1,0 lw a0,.LANCHOR0 sd ra,8(sp) call rlx_read_ps@plt li a0,1 call assert@plt ld ra,8(sp) li a0,0 addi sp,sp,16 jr ra .size thread3, .-thread3 .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd s0,32(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 24(sp) li a5, 0 li a3,0 lla a2,thread1 li a1,0 mv a0,sp sd ra,40(sp) sw zero,.LANCHOR0,a5 call pthread_create@plt li a3,0 lla a2,thread2 li a1,0 addi a0,sp,8 call pthread_create@plt li a3,0 lla a2,thread3 li a1,0 addi a0,sp,16 call pthread_create@plt ld a4, 24(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L15 ld ra,40(sp) ld s0,32(sp) li a0,0 addi sp,sp,48 jr ra .L15: call __stack_chk_fail@plt .size main, .-main .globl x .bss .align 2 .set .LANCHOR0,. + 0 .type x, @object .size x, 4 x: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "redundant_co_20.c" .option pic .text .align 1 .globl thread1 .type thread1, @function thread1: addi sp,sp,-32 sd s0,16(sp) sd s1,8(sp) sd ra,24(sp) li s0,20 lla s1,.LANCHOR0 .L2: lw a0,0(s1) addiw s0,s0,-1 li a1,1 call rlx_write_ps@plt bne s0,zero,.L2 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) li a0,0 addi sp,sp,32 jr ra .size thread1, .-thread1 .align 1 .globl thread2 .type thread2, @function thread2: addi sp,sp,-32 sd s0,16(sp) sd s1,8(sp) sd ra,24(sp) li s0,20 lla s1,.LANCHOR0 .L7: lw a0,0(s1) addiw s0,s0,-1 li a1,2 call rlx_write_ps@plt bne s0,zero,.L7 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) li a0,0 addi sp,sp,32 jr ra .size thread2, .-thread2 .align 1 .globl thread3 .type thread3, @function thread3: addi sp,sp,-16 li a1,0 lw a0,.LANCHOR0 sd ra,8(sp) call rlx_read_ps@plt li a0,1 call assert@plt ld ra,8(sp) li a0,0 addi sp,sp,16 jr ra .size thread3, .-thread3 .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd s0,32(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 24(sp) li a5, 0 li a3,0 lla a2,thread1 li a1,0 mv a0,sp sd ra,40(sp) sw zero,.LANCHOR0,a5 call pthread_create@plt li a3,0 lla a2,thread2 li a1,0 addi a0,sp,8 call pthread_create@plt li a3,0 lla a2,thread3 li a1,0 addi a0,sp,16 call pthread_create@plt ld a4, 24(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L15 ld ra,40(sp) ld s0,32(sp) li a0,0 addi sp,sp,48 jr ra .L15: call __stack_chk_fail@plt .size main, .-main .globl x .bss .align 2 .set .LANCHOR0,. + 0 .type x, @object .size x, 4 x: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "redundant_co_20.c" .text .global x .bss .align 2 .type x, %object .size x, 4 x: .zero 4 .text .align 2 .global thread1 .type thread1, %function thread1: .LFB0: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str wzr, [sp, 44] b .L2 .L3: adrp x0, x add x0, x0, :lo12:x ldr w0, [x0] mov w1, 1 bl rlx_write_ps ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L2: ldr w0, [sp, 44] cmp w0, 19 ble .L3 mov x0, 0 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size thread1, .-thread1 .align 2 .global thread2 .type thread2, %function thread2: .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] str wzr, [sp, 44] b .L6 .L7: adrp x0, x add x0, x0, :lo12:x ldr w0, [x0] mov w1, 2 bl rlx_write_ps ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L6: ldr w0, [sp, 44] cmp w0, 19 ble .L7 mov x0, 0 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size thread2, .-thread2 .align 2 .global thread3 .type thread3, %function thread3: .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] adrp x0, x add x0, x0, :lo12:x ldr w0, [x0] ldr w1, [sp, 44] bl rlx_read_ps ldr w0, [sp, 44] cmp w0, 3 cset w0, ne and w0, w0, 255 bl assert mov x0, 0 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size thread3, .-thread3 .align 2 .global main .type main, %function main: .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 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, x add x0, x0, :lo12:x str wzr, [x0] add x4, sp, 32 mov x3, 0 adrp x0, thread1 add x2, x0, :lo12:thread1 mov x1, 0 mov x0, x4 bl pthread_create add x4, sp, 40 mov x3, 0 adrp x0, thread2 add x2, x0, :lo12:thread2 mov x1, 0 mov x0, x4 bl pthread_create add x4, sp, 48 mov x3, 0 adrp x0, thread3 add x2, x0, :lo12:thread3 mov x1, 0 mov x0, x4 bl pthread_create 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 .L13 bl __stack_chk_fail .L13: mov w0, w1 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "redundant_co_20.c" .text .align 2 .global thread1 .type thread1, %function thread1: .LFB1: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x19, x20, [sp, 16] str x21, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 mov w19, 20 adrp x20, .LANCHOR0 add x20, x20, :lo12:.LANCHOR0 mov w21, 1 .L2: mov w1, w21 ldr w0, [x20] bl rlx_write_ps subs w19, w19, #1 bne .L2 mov x0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size thread1, .-thread1 .align 2 .global thread2 .type thread2, %function thread2: .LFB2: .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] str x21, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 mov w19, 20 adrp x20, .LANCHOR0 add x20, x20, :lo12:.LANCHOR0 mov w21, 2 .L6: mov w1, w21 ldr w0, [x20] bl rlx_write_ps subs w19, w19, #1 bne .L6 mov x0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size thread2, .-thread2 .align 2 .global thread3 .type thread3, %function thread3: .LFB3: .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, .LANCHOR0 ldr w0, [x0, #:lo12:.LANCHOR0] bl rlx_read_ps mov w0, 1 bl assert mov x0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size thread3, .-thread3 .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 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, .LANCHOR0 str wzr, [x0, #:lo12:.LANCHOR0] mov x3, 0 adrp x2, thread1 add x2, x2, :lo12:thread1 add x0, sp, 16 bl pthread_create mov x3, 0 adrp x2, thread2 add x2, x2, :lo12:thread2 mov x1, 0 add x0, sp, 24 bl pthread_create mov x3, 0 adrp x2, thread3 add x2, x2, :lo12:thread3 mov x1, 0 add x0, sp, 32 bl pthread_create 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 bne .L14 mov w0, 0 ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L14: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE4: .size main, .-main .global x .bss .align 2 .set .LANCHOR0,. + 0 .type x, %object .size x, 4 x: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "redundant_co_20.c" .text .align 2 .p2align 4,,11 .global thread1 .type thread1, %function thread1: .LFB1: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x20, .LANCHOR0 add x20, x20, :lo12:.LANCHOR0 mov w19, 20 .p2align 3,,7 .L2: ldr w0, [x20] mov w1, 1 bl rlx_write_ps subs w19, w19, #1 bne .L2 mov x0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size thread1, .-thread1 .align 2 .p2align 4,,11 .global thread2 .type thread2, %function thread2: .LFB2: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x20, .LANCHOR0 add x20, x20, :lo12:.LANCHOR0 mov w19, 20 .p2align 3,,7 .L7: ldr w0, [x20] mov w1, 2 bl rlx_write_ps subs w19, w19, #1 bne .L7 mov x0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size thread2, .-thread2 .align 2 .p2align 4,,11 .global thread3 .type thread3, %function thread3: .LFB3: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LANCHOR0 mov w1, 0 mov x29, sp ldr w0, [x0, #:lo12:.LANCHOR0] bl rlx_read_ps mov w0, 1 bl assert mov x0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size thread3, .-thread3 .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .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 adrp x4, :got:__stack_chk_guard adrp x5, .LANCHOR0 mov x29, sp ldr x4, [x4, #:got_lo12:__stack_chk_guard] mov x3, 0 mov x1, 0 add x0, sp, 16 ldr x6, [x4] str x6, [sp, 40] mov x6, 0 adrp x2, thread1 str wzr, [x5, #:lo12:.LANCHOR0] add x2, x2, :lo12:thread1 bl pthread_create mov x3, 0 mov x1, 0 add x0, sp, 24 adrp x2, thread2 add x2, x2, :lo12:thread2 bl pthread_create mov x1, 0 add x0, sp, 32 adrp x2, thread3 mov x3, 0 add x2, x2, :lo12:thread3 bl pthread_create 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 bne .L15 mov w0, 0 ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L15: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE4: .size main, .-main .global x .bss .align 2 .set .LANCHOR0,. + 0 .type x, %object .size x, 4 x: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "redundant_co_20.c" .text .align 2 .p2align 4,,11 .global thread1 .type thread1, %function thread1: .LFB1: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x20, .LANCHOR0 add x20, x20, :lo12:.LANCHOR0 mov w19, 20 .p2align 3,,7 .L2: ldr w0, [x20] mov w1, 1 bl rlx_write_ps subs w19, w19, #1 bne .L2 mov x0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size thread1, .-thread1 .align 2 .p2align 4,,11 .global thread2 .type thread2, %function thread2: .LFB2: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x20, .LANCHOR0 add x20, x20, :lo12:.LANCHOR0 mov w19, 20 .p2align 3,,7 .L7: ldr w0, [x20] mov w1, 2 bl rlx_write_ps subs w19, w19, #1 bne .L7 mov x0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size thread2, .-thread2 .align 2 .p2align 4,,11 .global thread3 .type thread3, %function thread3: .LFB3: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LANCHOR0 mov w1, 0 mov x29, sp ldr w0, [x0, #:lo12:.LANCHOR0] bl rlx_read_ps mov w0, 1 bl assert mov x0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size thread3, .-thread3 .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .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 adrp x4, :got:__stack_chk_guard adrp x5, .LANCHOR0 mov x29, sp ldr x4, [x4, #:got_lo12:__stack_chk_guard] mov x3, 0 mov x1, 0 add x0, sp, 16 ldr x6, [x4] str x6, [sp, 40] mov x6, 0 adrp x2, thread1 str wzr, [x5, #:lo12:.LANCHOR0] add x2, x2, :lo12:thread1 bl pthread_create mov x3, 0 mov x1, 0 add x0, sp, 24 adrp x2, thread2 add x2, x2, :lo12:thread2 bl pthread_create mov x1, 0 add x0, sp, 32 adrp x2, thread3 mov x3, 0 add x2, x2, :lo12:thread3 bl pthread_create 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 bne .L15 mov w0, 0 ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L15: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE4: .size main, .-main .global x .bss .align 2 .set .LANCHOR0,. + 0 .type x, %object .size x, 4 x: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
paranoia.c
/* $Source$ * $State$ * $Revision$ */ /* This is a solo paranoia game taken from the Jan/Feb issue (No 77) of "SpaceGamer/FantasyGamer" magazine. Article by Sam Shirley. Implemented in C on Vax 11/780 under UNIX by Tim Lister Very slightly modernised to run on 2007-era (!) compilers by David Given. This is a public domain adventure and may not be sold for profit */ #include <stdio.h> #define MOXIE 13 #define AGILITY 15 #define MAXKILL 7 /* The maximum number of UV's you can kill */ int clone=1; int page=1; int computer_request=0; int ultra_violet=0; int action_doll=0; int hit_points=10; int read_letter=0; int plato_clone=3; int blast_door=0; int killer_count=0; char get_char() { char c; fflush(stdout); c=getchar(); if (c!='\n') while(getchar()!='\n'); return c; } more() { printf("---------- More ----------"); #ifdef DEBUG printf("(page %d)",page); #endif if (get_char()=='p') { character(); printf("---------- More ----------"); (void)get_char(); }; } new_clone(resume) int resume; { printf("\nClone %d just died.\n",clone); if (++clone>6) { printf("\n*** You Lose ***\n\nAll your clones are dead. Your name has been stricken from the records.\n\n THE END\n"); return 0; } else { printf("Clone %d now activated.\n",clone); ultra_violet=0; action_doll=0; hit_points=10; killer_count=0; return resume; } } dice_roll(number,faces) int number, faces; { int i,total=0; for(i=number;i>0;i--) total+= rand()%faces+1; return total; } instructions() { printf("\n\n\n\nWelcome to Paranoia!\n\n"); printf("HOW TO PLAY:\n\n"); printf(" Just press <RETURN> until you are asked to make a choice.\n"); printf(" Select 'a' or 'b' or whatever for your choice, then press <RETURN>.\n"); printf(" You may select 'p' at any time to get a display of your statistics.\n"); printf(" Always choose the least dangerous option. Continue doing this until you win.\n"); printf(" At times you will use a skill or engage in combat and and will be informed of\n"); printf(" the outcome. These sections will be self explanatory.\n\n"); printf("HOW TO DIE:\n\n"); printf(" As Philo-R-DMD you will die at times during the adventure.\n"); printf(" When this happens you will be given an new clone at a particular location.\n"); printf(" The new Philo-R will usually have to retrace some of the old Philo-R\'s path;\n"); printf(" hopefully he won\'t make the same mistake as his predecessor.\n\n"); printf("HOW TO WIN:\n\n"); printf(" Simply complete the mission before you expend all six clones.\n"); printf(" If you make it, congratulations.\n"); printf(" If not, you can try again later.\n"); } character() { printf("===============================================================================\n"); printf("The Character : Philo-R-DMD %d\n", clone); printf("Primary Attributes Secondary Attributes\n"); printf("===============================================================================\n"); printf("Strength ..................... 13 Carrying Capacity ................. 30\n"); printf("Endurance .................... 13 Damage Bonus ....................... 0\n"); printf("Agility ...................... 15 Macho Bonus ....................... -1\n"); printf("Manual Dexterity ............. 15 Melee Bonus ...................... +5%%\n"); printf("Moxie ........................ 13 Aimed Weapon Bonus .............. +10%%\n"); printf("Chutzpah ...................... 8 Comprehension Bonus .............. +4%%\n"); printf("Mechanical Aptitude .......... 14 Believability Bonus .............. +5%%\n"); printf("Power Index .................. 10 Repair Bonus ..................... +5%%\n"); printf("===============================================================================\n"); printf("Credits: 160 Secret Society: Illuminati Secret Society Rank: 1\n"); printf("Service Group: Power Services Mutant Power: Precognition\n"); printf("Weapon: laser pistol; to hit, 40%%; type, L; Range, 50m; Reload, 6r; Malfnt, 00\n"); printf("Skills: Basics 1(20%%), Aimed Weapon Combat 2(35%%), Laser 3(40%%),\n Personal Development 1(20%%), Communications 2(29%%), Intimidation 3(34%%)\n"); printf("Equipment: Red Reflec Armour, Laser Pistol, Laser Barrel (red),\n"); printf(" Notebook & Stylus, Knife, Com Unit 1, Jump suit,\n"); printf(" Secret Illuminati Eye-In-The-Pyramid(tm) Decoder ring,\n"); printf(" Utility Belt & Pouches\n"); printf("===============================================================================\n"); } choose(a,aptr,b,bptr) int a,b; char *aptr, *bptr; { printf("\nSelect \'a\' or \'b\' :\n"); printf(" a - %s.\n b - %s.\n", aptr, bptr); if (get_char()=='a') return a; else return b; } page1() { printf(" You wake up face down on the red and pink checked E-Z-Kleen linoleum floor.\n"); printf(" You recognise the pattern, it\'s the type preferred in the internal security\nbriefing cells. When you finally look around you, you see that you are alone\n"); printf("in a large mission briefing room.\n"); return 57; } page2() { printf("\"Greetings,\" says the kindly Internal Security self incrimination expert who\n"); printf("meets you at the door, \"How are we doing today?\" He offers you a doughnut\n"); printf("and coffee and asks what brings you here. This doesn\'t seem so bad, so you\n"); printf("tell him that you have come to confess some possible security lapses. He\n"); printf("smiles knowingly, deftly catching your coffee as you slump to the floor.\n"); printf("\"Nothing to be alarmed about; it\'s just the truth serum,\" he says,\n"); printf("dragging you back into a discussion room.\n"); printf("The next five hours are a dim haze, but you can recall snatches of conversation\n"); printf("about your secret society, your mutant power, and your somewhat paranoid\n"); printf("distrust of The Computer. This should explain why you are hogtied and moving\n"); printf("slowly down the conveyer belt towards the meat processing unit in Food\n"); printf("Services.\n"); if (computer_request==1) return new_clone(45); else return new_clone(32); } page3() { printf("You walk to the nearest Computer terminal and request more information about\n"); printf("Christmas. The Computer says, \"That is an A-1 ULTRAVIOLET ONLY IMMEDIATE\n"); printf("TERMINATION classified topic. What is your clearance please, Troubleshooter?\"\n"); return choose(4,"You give your correct clearance",5,"You lie and claim Ultraviolet clearance"); } page4() { printf("\"That is classified information, Troubleshooter, thank you for your inquiry.\n"); printf(" Please report to an Internal Security self incrimination station as soon as\n"); printf(" possible.\"\n"); return 9; } page5() { printf("The computer says, \"Troubleshooter, you are not wearing the correct colour\n"); printf("uniform. You must put on an Ultraviolet uniform immediately. I have seen to\n"); printf("your needs and ordered one already; it will be here shortly. Please wait with\n"); printf("your back to the wall until it arrives.\" In less than a minute an infrared\n"); printf("arrives carrying a white bundle. He asks you to sign for it, then hands it to\n"); printf("you and stands back, well outside of a fragmentation grenade\'s blast radius.\n"); return choose(6, "You open the package and put on the uniform", 7, "You finally come to your senses and run for it"); } page6() { printf("The uniform definitely makes you look snappy and pert. It really looks\n"); printf("impressive, and even has the new lopsided lapel fashion that you admire so\n"); printf("much. What\'s more, citizens of all ranks come to obsequious attention as you\n"); printf("walk past. This isn\'t so bad being an Ultraviolet. You could probably come\n"); printf("to like it, given time.\n"); printf("The beeping computer terminal interrupts your musings.\n"); ultra_violet=1; return 8; } page7() { printf("The corridor lights dim and are replaced by red battle lamps as the Security\n"); printf("Breach alarms howl all around you. You run headlong down the corridor and\n"); printf("desperately windmill around a corner, only to collide with a squad of 12 Blue\n"); printf("clearance Vulture squadron soldiers. \"Stop, Slime Face,\" shouts the\n"); printf("commander, \"or there won\'t be enough of you left for a tissue sample.\"\n"); printf("\"All right, soldiers, stuff the greasy traitor into the uniform,\" he orders,\n"); printf("waving the business end of his blue laser scant inches from your nose.\n"); printf("With his other hand he shakes open a white bundle to reveal a pristine new\n"); printf("Ultraviolet citizen's uniform.\n"); printf("One of the Vulture squadron Troubleshooters grabs you by the neck in the\n"); printf("exotic and very painful Vulture Clamp(tm) death grip (you saw a special about\n"); printf("it on the Teela O\'Malley show), while the rest tear off your clothes and\n"); printf("force you into the Ultraviolet uniform. The moment you are dressed they step\n"); printf("clear and stand at attention.\n"); printf("\"Thank you for your cooperation, sir,\" says the steely eyed leader of the\n"); printf("Vulture Squad. \"We will be going about our business now.\" With perfect\n"); printf("timing the Vultures wheel smartly and goosestep down the corridor.\n"); printf("Special Note: don\'t make the mistake of assuming that your skills have\n"); printf("improved any because of the uniform; you\'re only a Red Troubleshooter\n"); printf("traitorously posing as an Ultraviolet, and don\'t you forget it!\n"); printf("Suddenly, a computer terminal comes to life beside you.\n"); ultra_violet=1; return 8; } page8() { printf("\"Now, about your question, citizen. Christmas was an old world marketing ploy\n"); printf("to induce lower clearance citizens to purchase vast quantities of goods, thus\n"); printf("accumulation a large amount of credit under the control of a single class of\n"); printf("citizen known as Retailers. The strategy used is to imply that all good\n"); printf("citizens give gifts during Christmas, thus if one wishes to be a valuable\n"); printf("member of society one must also give gifts during Christmas. More valuable\n"); printf("gifts make one a more valuable member, and thus did the Retailers come to\n"); printf("control a disproportionate amount of the currency. In this way Christmas\n"); printf("eventually caused the collapse of the old world. Understandably, Christmas\n"); printf("has been declared a treasonable practice in Alpha Complex.\n"); printf("Thank you for your inquiry.\"\n"); printf("You continue on your way to GDH7-beta.\n"); return 10; } page9() { int choice; printf("As you walk toward the tubecar that will take you to GDH7-beta, you pass one\n"); printf("of the bright blue and orange Internal Security self incrimination stations.\n"); printf("Inside, you can see an IS agent cheerfully greet an infrared citizen and then\n"); printf("lead him at gunpoint into one of the rubber lined discussion rooms.\n"); choice=choose(2,"You decide to stop here and chat, as ordered by The Computer",10,"You just continue blithely on past"); if (choice==2) computer_request = 1; else computer_request = 0; return choice; } page10() { int choice; printf("You stroll briskly down the corridor, up a ladder, across an unrailed catwalk,\n"); printf("under a perilously swinging blast door in urgent need of repair, and into\n"); printf("tubecar grand central. This is the bustling hub of Alpha Complex tubecar\n"); printf("transportation. Before you spreads a spaghetti maze of magnalift tube tracks\n"); printf("and linear accelerators. You bravely study the specially enhanced 3-D tube\n"); printf("route map; you wouldn\'t be the first Troubleshooter to take a fast tube ride\n"); printf("to nowhere.\n"); if (ultra_violet==0) { choice=choose(3,"You decide to ask The Computer about Christmas using a nearby terminal",10,"You think you have the route worked out, so you\'ll board a tube train"); if (choice==3) return choice; }; printf("You nervously select a tubecar and step aboard.\n"); if (dice_roll(2,10)<MOXIE) { printf("You just caught a purple line tubecar.\n"); return 13; } else { printf("You just caught a brown line tubecar.\n"); return 48; } } page11() { printf("The printing on the folder says \"Experimental Self Briefing.\"\n"); printf("You open it and begin to read the following:\n"); printf("Step 1: Compel the briefing subject to attend the briefing.\n"); printf(" Note: See Experimental Briefing Sub Form Indigo-WY-2,\n"); printf(" \'Experimental Self Briefing Subject Acquisition Through The Use Of\n"); printf(" Neurotoxin Room Foggers.\'\n"); printf("Step 2: Inform the briefing subject that the briefing has begun.\n"); printf(" ATTENTION: THE BRIEFING HAS BEGUN.\n"); printf("Step 3: Present the briefing material to the briefing subject.\n"); printf(" GREETINGS TROUBLESHOOTER.\n"); printf(" YOU HAVE BEEN SPECIALLY SELECTED TO SINGLEHANDEDLY\n"); printf(" WIPE OUT A DEN OF TRAITOROUS CHRISTMAS ACTIVITY. YOUR MISSION IS TO\n"); printf(" GO TO GOODS DISTRIBUTION HALL 7-BETA AND ASSESS ANY CHRISTMAS ACTIVITY\n"); printf(" YOU FIND THERE. YOU ARE TO INFILTRATE THESE CHRISTMAS CELEBRANTS,\n"); printf(" LOCATE THEIR RINGLEADER, AN UNKNOWN MASTER RETAILER, AND BRING HIM\n"); printf(" BACK FOR EXECUTION AND TRIAL. THANK YOU. THE COMPUTER IS YOUR FRIEND.\n"); printf("Step 4: Sign the briefing subject\'s briefing release form to indicate that\n"); printf(" the briefing subject has completed the briefing.\n"); printf(" ATTENTION: PLEASE SIGN YOUR BRIEFING RELEASE FORM.\n"); printf("Step 5: Terminate the briefing\n"); printf(" ATTENTION: THE BRIEFING IS TERMINATED.\n"); more(); printf("You walk to the door and hold your signed briefing release form up to the\n"); printf("plexiglass window. A guard scrutinises it for a moment and then slides back\n"); printf("the megabolts holding the door shut. You are now free to continue the\n"); printf("mission.\n"); return choose(3,"You wish to ask The Computer for more information about Christmas",10,"You have decided to go directly to Goods Distribution Hall 7-beta"); } page12() { printf("You walk up to the door and push the button labelled \"push to exit.\"\n"); printf("Within seconds a surly looking guard shoves his face into the small plexiglass\n"); printf("window. You can see his mouth forming words but you can\'t hear any of them.\n"); printf("You just stare at him blankly for a few moments until he points down to a\n"); printf("speaker on your side of the door. When you put your ear to it you can barely\n"); printf("hear him say, \"Let\'s see your briefing release form, bud. You aren\'t\n"); printf("getting out of here without it.\"\n"); return choose(11,"You sit down at the table and read the Orange packet",57,"You stare around the room some more"); } page13() { printf("You step into the shiny plasteel tubecar, wondering why the shape has always\n"); printf("reminded you of bullets. The car shoots forward the instant your feet touch\n"); printf("the slippery gray floor, pinning you immobile against the back wall as the\n"); printf("tubecar careens toward GDH7-beta. Your only solace is the knowledge that it\n"); printf("could be worse, much worse.\n"); printf("Before too long the car comes to a stop. You can see signs for GDH7-beta\n"); printf("through the window. With a little practice you discover that you can crawl\n"); printf("to the door and pull open the latch.\n"); return 14; } page14() { printf("You manage to pull yourself out of the tubecar and look around. Before you is\n"); printf("one of the most confusing things you have ever seen, a hallway that is\n"); printf("simultaneously both red and green clearance. If this is the result of\n"); printf("Christmas then it\'s easy to see the evils inherent in its practice.\n"); printf("You are in the heart of a large goods distribution centre. You can see all\n"); printf("about you evidence of traitorous secret society Christmas celebration; rubber\n"); printf("faced robots whiz back and forth selling toys to holiday shoppers, simul-plast\n"); printf("wreaths hang from every light fixture, while ahead in the shadows is a citizen\n"); printf("wearing a huge red synthetic flower.\n"); return 22; } page15() { printf("You are set upon by a runty robot with a queer looking face and two pointy\n"); printf("rubber ears poking from beneath a tattered cap. \"Hey mister,\" it says,\n"); printf("\"you done all your last minute Christmas shopping? I got some real neat junk\n"); printf("here. You don\'t wanna miss the big day tommorrow, if you know what I mean.\"\n"); printf("The robot opens its bag to show you a pile of shoddy Troubleshooter dolls. It\n"); printf("reaches in and pulls out one of them. \"Look, these Action Troubleshooter(tm)\n"); printf("dolls are the neatest thing. This one\'s got moveable arms and when you\n"); printf("squeeze him, his little rifle squirts realistic looking napalm. It\'s only\n"); printf("50 credits. Oh yeah, Merry Christmas.\"\n"); printf("\nSelect \'a\', \'b\' or \'c\' :\n"); printf(" a - You decide to buy the doll.\n"); printf(" b - You shoot the robot.\n"); printf(" c - You ignore the robot and keep searching the hall.\n"); switch(get_char()) { case 'a' : return 16; case 'b' : return 17; case 'c' : default : return 22; } } page16() { printf("The doll is a good buy for fifty credits; it will make a fine Christmas present\n"); printf("for one of your friends. After the sale the robot rolls away. You can use\n"); printf("the doll later in combat. It works just like a cone rifle firing napalm,\n"); printf("except that occasionally it will explode and blow the user to smithereens.\n"); printf("But don\'t let that stop you.\n"); action_doll=1; return 22; } page17() { int i, robot_hp=15; printf("You whip out your laser and shoot the robot, but not before it squeezes the\n"); printf("toy at you. The squeeze toy has the same effect as a cone rifle firing napalm,\n"); printf("and the elfbot\'s armour has no effect against your laser.\n"); for(i=0;i<2;i++) { if(dice_roll(1,100)<=25) { printf("You have been hit!\n"); hit_points-= dice_roll(1,10); if (hit_points<=0) return new_clone(45); } else printf("It missed you, but not by much!\n"); if(dice_roll(1,100)<=40) { printf("You zapped the little bastard!\n"); robot_hp-= dice_roll(2,10); if (robot_hp<=0) { printf("You wasted it! Good shooting!\n"); printf("You will need more evidence, so you search GDH7-beta further\n"); if (hit_points<10) printf("after the GDH medbot has patched you up.\n"); hit_points=10; return 22; } } else printf("Damn! You missed!\n"); }; printf("It tried to fire again, but the toy exploded and demolished it.\n"); printf("You will need more evidence, so you search GDH7-beta further\n"); if (hit_points<10) printf("after the GDH medbot has patched you up.\n"); hit_points=10; return 22; } page18() { printf("You walk to the centre of the hall, ogling like an infrared fresh from the\n"); printf("clone vats. Towering before you is the most unearthly thing you have ever\n"); printf("seen, a green multi armed mutant horror hulking 15 feet above your head.\n"); printf("Its skeletal body is draped with hundreds of metallic strips (probably to\n"); printf("negate the effects of some insidious mutant power), and the entire hideous\n"); printf("creature is wrapped in a thousand blinking hazard lights. It\'s times like\n"); printf("this when you wish you\'d had some training for this job. Luckily the\n"); printf("creature doesn\'t take notice of you but stands unmoving, as though waiting for\n"); printf("a summons from its dark lord, the Master Retailer.\n"); printf("WHAM, suddenly you are struck from behind.\n"); if (dice_roll(2,10)<AGILITY) return 19; else return 20; } page19() { printf("Quickly you regain your balance, whirl and fire your laser into the Ultraviolet\n"); printf("citizen behind you. For a moment your heart leaps to your throat, then you\n"); printf("realise that he is indeed dead and you will be the only one filing a report on\n"); printf("this incident. Besides, he was participating in this traitorous Christmas\n"); printf("shopping, as is evident from the rain of shoddy toys falling all around you.\n"); printf("Another valorous deed done in the service of The Computer!\n"); if (++killer_count>(MAXKILL-clone)) return 21; if (read_letter==1) return 22; return choose(34,"You search the body, keeping an eye open for Internal Security",22,"You run away like the cowardly dog you are"); } page20() { printf("Oh no! you can\'t keep your balance. You\'re falling, falling head first into\n"); printf("the Christmas beast\'s gaping maw. It\'s a valiant struggle; you think you are\n"); printf("gone when its poisonous needles dig into your flesh, but with a heroic effort\n"); printf("you jerk a string of lights free and jam the live wires into the creature\'s\n"); printf("spine. The Christmas beast topples to the ground and begins to burn, filling\n"); printf("the area with a thick acrid smoke. It takes only a moment to compose yourself,\n"); printf("and then you are ready to continue your search for the Master Retailer.\n"); return 22; } page21() { printf("You have been wasting the leading citizens of Alpha Complex at a prodigious\n"); printf("rate. This has not gone unnoticed by the Internal Security squad at GDH7-beta.\n"); printf("Suddenly, a net of laser beams spear out of the gloomy corners of the hall,\n"); printf("chopping you into teeny, weeny bite size pieces.\n"); return new_clone(45); } page22() { printf("You are searching Goods Distribution Hall 7-beta.\n"); switch(dice_roll(1,4)) { case 1: return 18; case 2: return 15; case 3: return 18; case 4: return 29; } } page23() { printf("You go to the nearest computer terminal and declare yourself a mutant.\n"); printf("\"A mutant, he\'s a mutant,\" yells a previously unnoticed infrared who had\n"); printf("been looking over your shoulder. You easily gun him down, but not before a\n"); printf("dozen more citizens take notice and aim their weapons at you.\n"); return choose(28,"You tell them that it was really only a bad joke",24,"You want to fight it out, one against twelve"); } page24() { printf("Golly, I never expected someone to pick this. I haven\'t even designed\n"); printf("the 12 citizens who are going to make a sponge out of you. Tell you what,\n"); printf("I\'ll give you a second chance.\n"); return choose(28,"You change your mind and say it was only a bad joke",25,"You REALLY want to shoot it out"); } page25() { printf("Boy, you really can\'t take a hint!\n"); printf("They\'re closing in. Their trigger fingers are twitching, they\'re about to\n"); printf("shoot. This is your last chance.\n"); return choose(28,"You tell them it was all just a bad joke",26,"You are going to shoot"); } page26() { printf("You can read the cold, sober hatred in their eyes (They really didn\'t think\n"); printf("it was funny), as they tighten the circle around you. One of them shoves a\n"); printf("blaster up your nose, but that doesn\'t hurt as much as the multi-gigawatt\n"); printf("carbonium tipped food drill in the small of your back.\n"); printf("You spend the remaining micro-seconds of your life wondering what you did wrong\n"); return new_clone(32); } page27() { /* doesn't exist. Can't happen with computer version. designed to catch dice cheats */ } page28() { printf("They don\'t think it\'s funny.\n"); return 26; } page29() { printf("\"Psst, hey citizen, come here. Pssfft,\" you hear. When you peer around\n"); printf("you can see someone\'s dim outline in the shadows. \"I got some information\n"); printf("on the Master Retailer. It\'ll only cost you 30 psst credits.\"\n"); printf("\nSelect \'a\', \'b\' or \'c\' :\n"); printf(" a - You pay the 30 credits for the info.\n"); printf(" b - You would rather threaten him for the information.\n"); printf(" c - You ignore him and walk away.\n"); switch(get_char()) { case 'a' : return 30; case 'b' : return 31; case 'c' : default : return 22; } } page30() { printf("You step into the shadows and offer the man a thirty credit bill. \"Just drop\n"); printf("it on the floor,\" he says. \"So you\'re looking for the Master Retailer, pssfft?\n"); printf("I\'ve seen him, he\'s a fat man in a fuzzy red and white jump suit. They say\n"); printf("he\'s a high programmer with no respect for proper security. If you want to\n"); printf("find him then pssfft step behind me and go through the door.\"\n"); printf("Behind the man is a reinforced plasteel blast door. The centre of it has been\n"); printf("buckled toward you in a manner you only saw once before when you were field\n"); printf("testing the rocket assist plasma slingshot (you found it easily portable but\n"); printf("prone to misfire). Luckily it isn\'t buckled too far for you to make out the\n"); printf("warning sign. WARNING!! Don\'t open this door or the same thing will happen to\n"); printf("you. Opening this door is a capital offense. Do not do it. Not at all. This\n"); printf("is not a joke.\n"); printf("\nSelect \'a\', \'b\' or \'c\' :\n"); printf(" a - You use your Precognition mutant power on opening the door.\n"); printf(" b - You just go through the door anyway.\n"); printf(" c - You decide it\'s too dangerous and walk away.\n"); switch(get_char()) { case 'a' : return 56; case 'b' : return 33; case 'c' : default : return 22; } } page31() { printf("Like any good troubleshooter you make the least expensive decision and threaten\n"); printf("him for information. With lightning like reflexes you whip out your laser and\n"); printf("stick it up his nose. \"Talk, you traitorous Christmas celebrator, or who nose\n"); printf("what will happen to you, yuk yuk,\" you pun menacingly, and then you notice\n"); printf("something is very wrong. He doesn\'t have a nose. As a matter of fact he\'s\n"); printf("made of one eighth inch cardboard and your laser is sticking through the other\n"); printf("side of his head. \"Are you going to pay?\" says his mouth speaker,\n"); printf("\"or are you going to pssfft go away stupid?\"\n"); return choose(30,"You pay the 30 credits",22,"You pssfft go away stupid"); } page32() { printf("Finally it\'s your big chance to prove that you\'re as good a troubleshooter\n"); printf("as your previous clone. You walk briskly to mission briefing and pick up your\n"); printf("previous clone\'s personal effects and notepad. After reviewing the notes you\n"); printf("know what has to be done. You catch the purple line to Goods Distribution Hall\n"); printf("7-beta and begin to search for the blast door.\n"); return 22; } page33() { blast_door=1; printf("You release the megabolts on the blast door, then strain against it with your\n"); printf("awesome strength. Slowly the door creaks open. You bravely leap through the\n"); printf("opening and smack your head into the barrel of a 300 mm \'ultra shock\' class\n"); printf("plasma cannon. It\'s dark in the barrel now, but just before your head got\n"); printf("stuck you can remember seeing a group of technicians anxiously watch you leap\n"); printf("into the room.\n"); if (ultra_violet==1) return 35; else return 36; } page34() { printf("You have found a sealed envelope on the body. You open it and read:\n"); printf("\"WARNING: Ultraviolet Clearance ONLY. DO NOT READ.\n"); printf("Memo from Chico-U-MRX4 to Harpo-U-MRX5.\n"); printf("The planned takeover of the Troubleshooter Training Course goes well, Comrade.\n"); printf("Once we have trained the unwitting bourgeois troubleshooters to work as\n"); printf("communist dupes, the overthrow of Alpha Complex will be unstoppable. My survey\n"); printf("of the complex has convinced me that no one suspects a thing; soon it will be\n"); printf("too late for them to oppose the revolution. The only thing that could possibly\n"); printf("impede the people\'s revolution would be someone alerting The Computer to our\n"); printf("plans (for instance, some enterprising Troubleshooter could tell The Computer\n"); printf("that the communists have liberated the Troubleshooter Training Course and plan\n"); printf("to use it as a jumping off point from which to undermine the stability of all\n"); printf("Alpha Complex), but as we both know, the capitalistic Troubleshooters would\n"); printf("never serve the interests of the proletariat above their own bourgeois desires.\n"); printf("P.S. I\'m doing some Christmas shopping later today. Would you like me to pick\n"); printf("you up something?\"\n"); more(); printf("When you put down the memo you are overcome by that strange deja\'vu again.\n"); printf("You see yourself talking privately with The Computer. You are telling it all\n"); printf("about the communists\' plan, and then the scene shifts and you see yourself\n"); printf("showered with awards for foiling the insidious communist plot to take over the\n"); printf("complex.\n"); read_letter=1; return choose(46,"You rush off to the nearest computer terminal to expose the commies",22,"You wander off to look for more evidence"); } page35() { printf("\"Oh master,\" you hear through the gun barrel, \"where have you been? It is\n"); printf("time for the great Christmas gifting ceremony. You had better hurry and get\n"); printf("the costume on or the trainee may begin to suspect.\" For the second time\n"); printf("today you are forced to wear attire not of your own choosing. They zip the\n"); printf("suit to your chin just as you hear gunfire erupt behind you.\n"); printf("\"Oh no! Who left the door open? The commies will get in. Quick, fire the\n"); printf("laser cannon or we\'re all doomed.\"\n"); printf("\"Too late you capitalist swine, the people\'s revolutionary strike force claims\n"); printf("this cannon for the proletariat\'s valiant struggle against oppression. Take\n"); printf("that, you running dog imperialist lackey. ZAP, KAPOW\"\n"); printf("Just when you think that things couldn\'t get worse, \"Aha, look what we have\n"); printf("here, the Master Retailer himself with his head caught in his own cannon. His\n"); printf("death will serve as a symbol of freedom for all Alpha Complex.\n"); printf("Fire the cannon.\"\n"); return new_clone(32); } page36() { printf("\"Congratulations, troubleshooter, you have successfully found the lair of the\n"); printf("Master Retailer and completed the Troubleshooter Training Course test mission,\"\n"); printf("a muffled voice tells you through the barrel. \"Once we dislodge your head\n"); printf("from the barrel of the \'Ultra Shock\' plasma cannon you can begin with the\n"); printf("training seminars, the first of which will concern the 100%% accurate\n"); printf("identification and elimination of unregistered mutants. If you have any\n"); printf("objections please voice them now.\"\n"); printf("\nSelect \'a\', \'b\' or \'c\' :\n"); printf(" a - You appreciate his courtesy and voice an objection.\n"); printf(" b - After your head is removed from the cannon, you register as a mutant.\n"); printf(" c - After your head is removed from the cannon, you go to the unregistered\n"); printf(" mutant identification and elimination seminar.\n"); switch(get_char()) { case 'a' : return new_clone(32); case 'b' : return 23; case 'c' : default : return 37; } } page37() { printf("\"Come with me please, Troubleshooter,\" says the Green clearance technician\n"); printf("after he has dislodged your head from the cannon. \"You have been participating\n"); printf("in the Troubleshooter Training Course since you got off the tube car in\n"); printf("GDH7-beta,\" he explains as he leads you down a corridor. \"The entire\n"); printf("Christmas assignment was a test mission to assess your current level of\n"); printf("training. You didn\'t do so well. We\'re going to start at the beginning with\n"); printf("the other student. Ah, here we are, the mutant identification and elimination\n"); printf("lecture.\" He shows you into a vast lecture hall filled with empty seats.\n"); printf("There is only one other student here, a Troubleshooter near the front row\n"); printf("playing with his Action Troubleshooter(tm) figure. \"Find a seat and I will\n"); printf("begin,\" says the instructor.\n"); return 38; } page38() { printf("\"I am Plato-B-PHI%d, head of mutant propaganda here at the training course.\n",plato_clone); printf("If you have any questions about mutants please come to me. Today I will be\n"); printf("talking about mutant detection. Detecting mutants is very easy. One simply\n"); printf("watches for certain tell tale signs, such as the green scaly skin, the third\n"); printf("arm growing from the forehead, or other similar disfigurements so common with\n"); printf("their kind. There are, however, a few rare specimens that show no outward sign\n"); printf("of their treason. This has been a significant problem, so our researchers have\n"); printf("been working on a solution. I would like a volunteer to test this device,\"\n"); printf("he says, holding up a ray gun looking thing. \"It is a mutant detection ray.\n"); printf("This little button detects for mutants, and this big button stuns them once\n"); printf("they are discovered. Who would like to volunteer for a test?\"\n"); printf("The Troubleshooter down the front squirms deeper into his chair.\n"); return choose(39,"You volunteer for the test",40,"You duck behind a chair and hope the instructor doesn\'t notice you"); } page39() { printf("You bravely volunteer to test the mutant detection gun. You stand up and walk\n"); printf("down the steps to the podium, passing a very relieved Troubleshooter along the\n"); printf("way. When you reach the podium Plato-B-PHI hands you the mutant detection gun\n"); printf("and says, \"Here, aim the gun at that Troubleshooter and push the small button.\n"); printf("If you see a purple light, stun him.\" Grasping the opportunity to prove your\n"); printf("worth to The Computer, you fire the mutant detection ray at the Troubleshooter.\n"); printf("A brilliant purple nimbus instantly surrounds his body. You slip your finger\n"); printf("to the large stun button and he falls writhing to the floor.\n"); printf("\"Good shot,\" says the instructor as you hand him the mutant detection gun,\n"); printf("\"I\'ll see that you get a commendation for this. It seems you have the hang\n"); printf("of mutant detection and elimination. You can go on to the secret society\n"); printf("infiltration class. I\'ll see that the little mutie gets packaged for\n"); printf("tomorrow\'s mutant dissection class.\"\n"); return 41; } page40() { printf("You breathe a sigh of relief as Plato-B-PHI picks on the other Troubleshooter.\n"); printf("\"You down here in the front,\" says the instructor pointing at the other\n"); printf("Troubleshooter, \"you\'ll make a good volunteer. Please step forward.\"\n"); printf("The Troubleshooter looks around with a \`who me?\' expression on his face, but\n"); printf("since he is the only one visible in the audience he figures his number is up.\n"); printf("He walks down to the podium clutching his Action Troubleshooter(tm) doll before\n"); printf("him like a weapon. \"Here,\" says Plato-B-PHI, \"take the mutant detection ray\n"); printf("and point it at the audience. If there are any mutants out there we\'ll know\n"); printf("soon enough.\" Suddenly your skin prickles with static electricity as a bright\n"); printf("purple nimbus surrounds your body. \"Ha Ha, got one,\" says the instructor.\n"); printf("\"Stun him before he gets away.\"\n"); more(); while(1) { if (dice_roll(1,100)<=30) { printf("His shot hits you. You feel numb all over.\n"); return 49; } else printf("His shot just missed.\n"); if (dice_roll(1,100)<=40) { printf("You just blew his head off. His lifeless hand drops the mutant detector ray.\n"); return 50; } else printf("You burnt a hole in the podium. He sights the mutant detector ray on you.\n"); } } page41() { printf("You stumble down the hallway of the Troubleshooter Training Course looking for\n"); printf("your next class. Up ahead you see one of the instructors waving to you. When\n"); printf("you get there he shakes your hand and says, \"I am Jung-I-PSY. Welcome to the\n"); printf("secret society infiltration seminar. I hope you ...\" You don\'t catch the\n"); printf("rest of his greeting because you\'re paying too much attention to his handshake;\n"); printf("it is the strangest thing that has ever been done to your hand, sort of how it\n"); printf("would feel if you put a neuro whip in a high energy palm massage unit.\n"); printf("It doesn\'t take you long to learn what he is up to; you feel him briefly shake\n"); printf("your hand with the secret Illuminati handshake.\n"); return choose(42,"You respond with the proper Illuminati code phrase, \"Ewige Blumenkraft\"",43,"You ignore this secret society contact"); } page42() { printf("\"Aha, so you are a member of the elitist Illuminati secret society,\" he says\n"); printf("loudly, \"that is most interesting.\" He turns to the large class already\n"); printf("seated in the auditorium and says, \"You see, class, by simply using the correct\n"); printf("hand shake you can identify the member of any secret society. Please keep your\n"); printf("weapons trained on him while I call a guard.\n"); return choose(51,"You run for it",52,"You wait for the guard"); } page43() { printf("You sit through a long lecture on how to recognise and infiltrate secret\n"); printf("societies, with an emphasis on mimicking secret handshakes. The basic theory,\n"); printf("which you realise to be sound from your Iluminati training, is that with the\n"); printf("proper handshake you can pass unnoticed in any secret society gathering.\n"); printf("What\'s more, the proper handshake will open doors faster than an \'ultra shock\'\n"); printf("plasma cannon. You are certain that with the information you learn here you\n"); printf("will easily be promoted to the next level of your Illuminati secret society.\n"); printf("The lecture continues for three hours, during which you have the opportunity\n"); printf("to practice many different handshakes. Afterwards everyone is directed to\n"); printf("attend the graduation ceremony. Before you must go you have a little time to\n"); printf("talk to The Computer about, you know, certain topics.\n"); return choose(44,"You go looking for a computer terminal",55,"You go to the graduation ceremony immediately"); } page44() { printf("You walk down to a semi-secluded part of the training course complex and\n"); printf("activate a computer terminal. \"AT YOUR SERVICE\" reads the computer screen.\n"); if (read_letter==0) return choose(23,"You register yourself as a mutant",55,"You change your mind and go to the graduation ceremony"); printf("\nSelect \'a\', \'b\' or \'c\' :\n"); printf(" a - You register yourself as a mutant.\n"); printf(" b - You want to chat about the commies.\n"); printf(" c - You change your mind and go to the graduation ceremony.\n"); switch(get_char()) { case 'a' : return 23; case 'b' : return 46; case 'c' : default : return 55; } } page45() { printf("\"Hrank Hrank,\" snorts the alarm in your living quarters. Something is up.\n"); printf("You look at the monitor above the bathroom mirror and see the message you have\n"); printf("been waiting for all these years. \"ATTENTION TROUBLESHOOTER, YOU ARE BEING\n"); printf("ACTIVATED. PLEASE REPORT IMMEDIATELY TO MISSION ASSIGNMENT ROOM A17/GAMMA/LB22.\n"); printf("THANK YOU. THE COMPUTER IS YOUR FRIEND.\" When you arrive at mission\n"); printf("assignment room A17-gamma/LB22 you are given your previous clone\'s\n"); printf("remaining possessions and notebook. You puzzle through your predecessor\'s\n"); printf("cryptic notes, managing to decipher enough to lead you to the tube station and\n"); printf("the tube car to GDH7-beta.\n"); return 10; } page46() { printf("\"Why do you ask about the communists, Troubleshooter? It is not in the\n"); printf("interest of your continued survival to be asking about such topics,\" says\n"); printf("The Computer.\n"); return choose(53,"You insist on talking about the communists",54,"You change the subject"); } page47() { printf("The Computer orders the entire Vulture squadron to terminate the Troubleshooter\n"); printf("Training Course. Unfortunately you too are terminated for possessing\n"); printf("classified information.\n\n"); printf("Don\'t act so innocent, we both know that you are an Illuminatus which is in\n"); printf("itself an act of treason.\n\n"); printf("Don\'t look to me for sympathy.\n\n"); printf(" THE END\n"); return 0; } page48() { printf("The tubecar shoots forward as you enter, slamming you back into a pile of\n"); printf("garbage. The front end rotates upward and you, the garbage and the garbage\n"); printf("disposal car shoot straight up out of Alpha Complex. One of the last things\n"); printf("you see is a small blue sphere slowly dwindling behind you. After you fail to\n"); printf("report in, you will be assumed dead.\n"); return new_clone(45); } page49() { printf("The instructor drags your inert body into a specimen detainment cage.\n"); printf("\"He\'ll make a good subject for tomorrow\'s mutant dissection class,\" you hear.\n"); return new_clone(32); } page50() { printf("You put down the other Troubleshooter, and then wisely decide to drill a few\n"); printf("holes in the instructor as well; the only good witness is a dead witness.\n"); printf("You continue with the training course.\n"); plato_clone++; return 41; } page51() { printf("You run for it, but you don\'t run far. Three hundred strange and exotic\n"); printf("weapons turn you into a freeze dried cloud of soot.\n"); return new_clone(32); } page52() { printf("You wisely wait until the instructor returns with a Blue Internal Security\n"); printf("guard. The guard leads you to an Internal Security self incrimination station.\n"); return 2; } page53() { printf("You tell The Computer about:\n"); return choose(47,"The commies who have infiltrated the Troubleshooter Training Course\n and the impending People\'s Revolution",54,"Something less dangerous"); } page54() { printf("\"Do not try to change the subject, Troubleshooter,\" says The Computer.\n"); printf("\"It is a serious crime to ask about the communists. You will be terminated\n"); printf("immediately. Thank you for your inquiry. The Computer is your friend.\"\n"); printf("Steel bars drop to your left and right, trapping you here in the hallway.\n"); printf("A spotlight beams from the computer console to brilliantly iiluminate you while\n"); printf("the speaker above your head rapidly repeats \"Traitor, Traitor, Traitor.\"\n"); printf("It doesn\'t take long for a few guards to notice your predicament and come to\n"); printf("finish you off.\n"); if (blast_door==0) return new_clone(45); else return new_clone(32); } page55() { printf("You and 300 other excited graduates are marched from the lecture hall and into\n"); printf("a large auditorium for the graduation exercise. The auditorium is\n"); printf("extravagantly decorated in the colours of the graduating class. Great red and\n"); printf("green plasti-paper ribbons drape from the walls, while a huge sign reading\n"); printf("\"Congratulations class of GDH7-beta-203.44/A\" hangs from the raised stage down\n"); printf("front. Once everyone finds a seat the ceremony begins. Jung-I-PSY is the\n"); printf("first to speak, \"Congratulations students, you have successfully survived the\n"); printf("Troubleshooter Training Course. It always brings me great pride to address\n"); printf("the graduating class, for I know, as I am sure you do too, that you are now\n"); printf("qualified for the most perilous missions The Computer may select for you. The\n"); printf("thanks is not owed to us of the teaching staff, but to all of you, who have\n"); printf("persevered and graduated. Good luck and die trying.\" Then the instructor\n"); printf("begins reading the names of the students who one by one walk to the front of\n"); printf("the auditorium and receive their diplomas. Soon it is your turn,\n"); printf("\"Philo-R-DMD, graduating a master of mutant identification and secret society\n"); printf("infiltration.\" You walk up and receive your diploma from Plato-B-PHI%d, then\n",plato_clone); printf("return to your seat. There is another speech after the diplomas are handed\n"); printf("out, but it is cut short by by rapid fire laser bursts from the high spirited\n"); printf("graduating class. You are free to return to your barracks to wait, trained\n"); printf("and fully qualified, for your next mission. You also get that cherished\n"); printf("promotion from the Illuminati secret society. In a week you receive a\n"); printf("detailed Training Course bill totalling 1,523 credits.\n"); printf(" THE END\n"); return 0; } page56() { printf("That familiar strange feeling of deja\'vu envelops you again. It is hard to\n"); printf("say, but whatever is on the other side of the door does not seem to be intended\n"); printf("for you.\n"); return choose(33,"You open the door and step through",22,"You go looking for more information"); } page57() { printf("In the centre of the room is a table and a single chair. There is an Orange\n"); printf("folder on the table top, but you can\'t make out the lettering on it.\n"); return choose(11,"You sit down and read the folder",12,"You leave the room"); } next_page(this_page) int this_page; { printf("\n"); switch (this_page) { case 0 : return 0; case 1 : return page1(); case 2 : return page2(); case 3 : return page3(); case 4 : return page4(); case 5 : return page5(); case 6 : return page6(); case 7 : return page7(); case 8 : return page8(); case 9 : return page9(); case 10 : return page10(); case 11 : return page11(); case 12 : return page12(); case 13 : return page13(); case 14 : return page14(); case 15 : return page15(); case 16 : return page16(); case 17 : return page17(); case 18 : return page18(); case 19 : return page19(); case 20 : return page20(); case 21 : return page21(); case 22 : return page22(); case 23 : return page23(); case 24 : return page24(); case 25 : return page25(); case 26 : return page26(); case 27 : return page27(); case 28 : return page28(); case 29 : return page29(); case 30 : return page30(); case 31 : return page31(); case 32 : return page32(); case 33 : return page33(); case 34 : return page34(); case 35 : return page35(); case 36 : return page36(); case 37 : return page37(); case 38 : return page38(); case 39 : return page39(); case 40 : return page40(); case 41 : return page41(); case 42 : return page42(); case 43 : return page43(); case 44 : return page44(); case 45 : return page45(); case 46 : return page46(); case 47 : return page47(); case 48 : return page48(); case 49 : return page49(); case 50 : return page50(); case 51 : return page51(); case 52 : return page52(); case 53 : return page53(); case 54 : return page54(); case 55 : return page55(); case 56 : return page56(); case 57 : return page57(); default : break; } } main() { /* srand(time(0)); */ instructions(); more(); character(); more(); while((page=next_page(page))!=0) more(); }
.file "paranoia.c" .option pic .text .globl clone .data .align 2 .type clone, @object .size clone, 4 clone: .word 1 .globl page .align 2 .type page, @object .size page, 4 page: .word 1 .globl computer_request .bss .align 2 .type computer_request, @object .size computer_request, 4 computer_request: .zero 4 .globl ultra_violet .align 2 .type ultra_violet, @object .size ultra_violet, 4 ultra_violet: .zero 4 .globl action_doll .align 2 .type action_doll, @object .size action_doll, 4 action_doll: .zero 4 .globl hit_points .data .align 2 .type hit_points, @object .size hit_points, 4 hit_points: .word 10 .globl read_letter .bss .align 2 .type read_letter, @object .size read_letter, 4 read_letter: .zero 4 .globl plato_clone .data .align 2 .type plato_clone, @object .size plato_clone, 4 plato_clone: .word 3 .globl blast_door .bss .align 2 .type blast_door, @object .size blast_door, 4 blast_door: .zero 4 .globl killer_count .align 2 .type killer_count, @object .size killer_count, 4 killer_count: .zero 4 .text .align 1 .globl get_char .type get_char, @function get_char: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 la a5,stdout ld a5,0(a5) mv a0,a5 call fflush@plt call getchar@plt mv a5,a0 sb a5,-17(s0) lbu a5,-17(s0) andi a4,a5,0xff li a5,10 beq a4,a5,.L2 nop .L3: call getchar@plt mv a5,a0 mv a4,a5 li a5,10 bne a4,a5,.L3 .L2: lbu a5,-17(s0) mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size get_char, .-get_char .section .rodata .align 3 .LC0: .string "---------- More ----------" .text .align 1 .globl more .type more, @function more: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC0 call printf@plt call get_char mv a5,a0 mv a4,a5 li a5,112 bne a4,a5,.L6 call character lla a0,.LC0 call printf@plt call get_char .L6: nop mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size more, .-more .section .rodata .align 3 .LC1: .string "\nClone %d just died.\n" .align 3 .LC2: .string "\n*** You Lose ***\n\nAll your clones are dead. Your name has been stricken from the records.\n\n\t\t\tTHE END" .align 3 .LC3: .string "Clone %d now activated.\n" .text .align 1 .globl new_clone .type new_clone, @function new_clone: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 mv a5,a0 sw a5,-20(s0) lla a5,clone lw a5,0(a5) mv a1,a5 lla a0,.LC1 call printf@plt lla a5,clone lw a5,0(a5) addiw a5,a5,1 sext.w a4,a5 lla a5,clone sw a4,0(a5) lla a5,clone lw a5,0(a5) mv a4,a5 li a5,6 ble a4,a5,.L8 lla a0,.LC2 call puts@plt li a5,0 j .L9 .L8: lla a5,clone lw a5,0(a5) mv a1,a5 lla a0,.LC3 call printf@plt lla a5,ultra_violet sw zero,0(a5) lla a5,action_doll sw zero,0(a5) lla a5,hit_points li a4,10 sw a4,0(a5) lla a5,killer_count sw zero,0(a5) lw a5,-20(s0) .L9: mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size new_clone, .-new_clone .align 1 .globl dice_roll .type dice_roll, @function dice_roll: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 mv a5,a0 mv a4,a1 sw a5,-36(s0) mv a5,a4 sw a5,-40(s0) sw zero,-20(s0) lw a5,-36(s0) sw a5,-24(s0) j .L11 .L12: call rand@plt mv a5,a0 mv a4,a5 lw a5,-40(s0) remw a5,a4,a5 sext.w a5,a5 addiw a5,a5,1 sext.w a5,a5 lw a4,-20(s0) addw a5,a4,a5 sw a5,-20(s0) lw a5,-24(s0) addiw a5,a5,-1 sw a5,-24(s0) .L11: lw a5,-24(s0) sext.w a5,a5 bgt a5,zero,.L12 lw a5,-20(s0) mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size dice_roll, .-dice_roll .section .rodata .align 3 .LC4: .string "\n\n\n\nWelcome to Paranoia!\n" .align 3 .LC5: .string "HOW TO PLAY:\n" .align 3 .LC6: .string " Just press <RETURN> until you are asked to make a choice." .align 3 .LC7: .string " Select 'a' or 'b' or whatever for your choice, then press <RETURN>." .align 3 .LC8: .string " You may select 'p' at any time to get a display of your statistics." .align 3 .LC9: .string " Always choose the least dangerous option. Continue doing this until you win." .align 3 .LC10: .string " At times you will use a skill or engage in combat and and will be informed of" .align 3 .LC11: .string " the outcome. These sections will be self explanatory.\n" .align 3 .LC12: .string "HOW TO DIE:\n" .align 3 .LC13: .string " As Philo-R-DMD you will die at times during the adventure." .align 3 .LC14: .string " When this happens you will be given an new clone at a particular location." .align 3 .LC15: .string " The new Philo-R will usually have to retrace some of the old Philo-R's path;" .align 3 .LC16: .string " hopefully he won't make the same mistake as his predecessor.\n" .align 3 .LC17: .string "HOW TO WIN:\n" .align 3 .LC18: .string " Simply complete the mission before you expend all six clones." .align 3 .LC19: .string " If you make it, congratulations." .align 3 .LC20: .string " If not, you can try again later." .text .align 1 .globl instructions .type instructions, @function instructions: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC4 call puts@plt lla a0,.LC5 call puts@plt lla a0,.LC6 call puts@plt lla a0,.LC7 call puts@plt lla a0,.LC8 call puts@plt lla a0,.LC9 call puts@plt lla a0,.LC10 call puts@plt lla a0,.LC11 call puts@plt lla a0,.LC12 call puts@plt lla a0,.LC13 call puts@plt lla a0,.LC14 call puts@plt lla a0,.LC15 call puts@plt lla a0,.LC16 call puts@plt lla a0,.LC17 call puts@plt lla a0,.LC18 call puts@plt lla a0,.LC19 call puts@plt lla a0,.LC20 call puts@plt nop mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size instructions, .-instructions .section .rodata .align 3 .LC21: .string "===============================================================================" .align 3 .LC22: .string "The Character : Philo-R-DMD %d\n" .align 3 .LC23: .string "Primary Attributes Secondary Attributes" .align 3 .LC24: .string "Strength ..................... 13 Carrying Capacity ................. 30" .align 3 .LC25: .string "Endurance .................... 13 Damage Bonus ....................... 0" .align 3 .LC26: .string "Agility ...................... 15 Macho Bonus ....................... -1" .align 3 .LC27: .string "Manual Dexterity ............. 15 Melee Bonus ...................... +5%%\n" .align 3 .LC28: .string "Moxie ........................ 13 Aimed Weapon Bonus .............. +10%%\n" .align 3 .LC29: .string "Chutzpah ...................... 8 Comprehension Bonus .............. +4%%\n" .align 3 .LC30: .string "Mechanical Aptitude .......... 14 Believability Bonus .............. +5%%\n" .align 3 .LC31: .string "Power Index .................. 10 Repair Bonus ..................... +5%%\n" .align 3 .LC32: .string "Credits: 160 Secret Society: Illuminati Secret Society Rank: 1" .align 3 .LC33: .string "Service Group: Power Services Mutant Power: Precognition" .align 3 .LC34: .string "Weapon: laser pistol; to hit, 40%%; type, L; Range, 50m; Reload, 6r; Malfnt, 00\n" .align 3 .LC35: .string "Skills: Basics 1(20%%), Aimed Weapon Combat 2(35%%), Laser 3(40%%),\n Personal Development 1(20%%), Communications 2(29%%), Intimidation 3(34%%)\n" .align 3 .LC36: .string "Equipment: Red Reflec Armour, Laser Pistol, Laser Barrel (red)," .align 3 .LC37: .string " Notebook & Stylus, Knife, Com Unit 1, Jump suit," .align 3 .LC38: .string " Secret Illuminati Eye-In-The-Pyramid(tm) Decoder ring," .align 3 .LC39: .string " Utility Belt & Pouches" .text .align 1 .globl character .type character, @function character: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC21 call puts@plt lla a5,clone lw a5,0(a5) mv a1,a5 lla a0,.LC22 call printf@plt lla a0,.LC23 call puts@plt lla a0,.LC21 call puts@plt lla a0,.LC24 call puts@plt lla a0,.LC25 call puts@plt lla a0,.LC26 call puts@plt lla a0,.LC27 call printf@plt lla a0,.LC28 call printf@plt lla a0,.LC29 call printf@plt lla a0,.LC30 call printf@plt lla a0,.LC31 call printf@plt lla a0,.LC21 call puts@plt lla a0,.LC32 call puts@plt lla a0,.LC33 call puts@plt lla a0,.LC34 call printf@plt lla a0,.LC35 call printf@plt lla a0,.LC36 call puts@plt lla a0,.LC37 call puts@plt lla a0,.LC38 call puts@plt lla a0,.LC39 call puts@plt lla a0,.LC21 call puts@plt nop mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size character, .-character .section .rodata .align 3 .LC40: .string "\nSelect 'a' or 'b' :" .align 3 .LC41: .string " a - %s.\n b - %s.\n" .text .align 1 .globl choose .type choose, @function choose: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 mv a5,a0 sd a1,-32(s0) mv a4,a2 sd a3,-40(s0) sw a5,-20(s0) mv a5,a4 sw a5,-24(s0) lla a0,.LC40 call puts@plt ld a2,-40(s0) ld a1,-32(s0) lla a0,.LC41 call printf@plt call get_char mv a5,a0 mv a4,a5 li a5,97 bne a4,a5,.L17 lw a5,-20(s0) j .L18 .L17: lw a5,-24(s0) .L18: mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size choose, .-choose .section .rodata .align 3 .LC42: .string " You wake up face down on the red and pink checked E-Z-Kleen linoleum floor." .align 3 .LC43: .string " You recognise the pattern, it's the type preferred in the internal security\nbriefing cells. When you finally look around you, you see that you are alone" .align 3 .LC44: .string "in a large mission briefing room." .text .align 1 .globl page1 .type page1, @function page1: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC42 call puts@plt lla a0,.LC43 call puts@plt lla a0,.LC44 call puts@plt li a5,57 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page1, .-page1 .section .rodata .align 3 .LC45: .string "\"Greetings,\" says the kindly Internal Security self incrimination expert who" .align 3 .LC46: .string "meets you at the door, \"How are we doing today?\" He offers you a doughnut" .align 3 .LC47: .string "and coffee and asks what brings you here. This doesn't seem so bad, so you" .align 3 .LC48: .string "tell him that you have come to confess some possible security lapses. He" .align 3 .LC49: .string "smiles knowingly, deftly catching your coffee as you slump to the floor." .align 3 .LC50: .string "\"Nothing to be alarmed about; it's just the truth serum,\" he says," .align 3 .LC51: .string "dragging you back into a discussion room." .align 3 .LC52: .string "The next five hours are a dim haze, but you can recall snatches of conversation" .align 3 .LC53: .string "about your secret society, your mutant power, and your somewhat paranoid" .align 3 .LC54: .string "distrust of The Computer. This should explain why you are hogtied and moving" .align 3 .LC55: .string "slowly down the conveyer belt towards the meat processing unit in Food" .align 3 .LC56: .string "Services." .text .align 1 .globl page2 .type page2, @function page2: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC45 call puts@plt lla a0,.LC46 call puts@plt lla a0,.LC47 call puts@plt lla a0,.LC48 call puts@plt lla a0,.LC49 call puts@plt lla a0,.LC50 call puts@plt lla a0,.LC51 call puts@plt lla a0,.LC52 call puts@plt lla a0,.LC53 call puts@plt lla a0,.LC54 call puts@plt lla a0,.LC55 call puts@plt lla a0,.LC56 call puts@plt lla a5,computer_request lw a5,0(a5) mv a4,a5 li a5,1 bne a4,a5,.L22 li a0,45 call new_clone mv a5,a0 j .L23 .L22: li a0,32 call new_clone mv a5,a0 .L23: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page2, .-page2 .section .rodata .align 3 .LC57: .string "You walk to the nearest Computer terminal and request more information about" .align 3 .LC58: .string "Christmas. The Computer says, \"That is an A-1 ULTRAVIOLET ONLY IMMEDIATE" .align 3 .LC59: .string "TERMINATION classified topic. What is your clearance please, Troubleshooter?\"" .align 3 .LC60: .string "You lie and claim Ultraviolet clearance" .align 3 .LC61: .string "You give your correct clearance" .text .align 1 .globl page3 .type page3, @function page3: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC57 call puts@plt lla a0,.LC58 call puts@plt lla a0,.LC59 call puts@plt lla a3,.LC60 li a2,5 lla a1,.LC61 li a0,4 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page3, .-page3 .section .rodata .align 3 .LC62: .string "\"That is classified information, Troubleshooter, thank you for your inquiry." .align 3 .LC63: .string " Please report to an Internal Security self incrimination station as soon as" .align 3 .LC64: .string " possible.\"" .text .align 1 .globl page4 .type page4, @function page4: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC62 call puts@plt lla a0,.LC63 call puts@plt lla a0,.LC64 call puts@plt li a5,9 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page4, .-page4 .section .rodata .align 3 .LC65: .string "The computer says, \"Troubleshooter, you are not wearing the correct colour" .align 3 .LC66: .string "uniform. You must put on an Ultraviolet uniform immediately. I have seen to" .align 3 .LC67: .string "your needs and ordered one already; it will be here shortly. Please wait with" .align 3 .LC68: .string "your back to the wall until it arrives.\" In less than a minute an infrared" .align 3 .LC69: .string "arrives carrying a white bundle. He asks you to sign for it, then hands it to" .align 3 .LC70: .string "you and stands back, well outside of a fragmentation grenade's blast radius." .align 3 .LC71: .string "You finally come to your senses and run for it" .align 3 .LC72: .string "You open the package and put on the uniform" .text .align 1 .globl page5 .type page5, @function page5: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC65 call puts@plt lla a0,.LC66 call puts@plt lla a0,.LC67 call puts@plt lla a0,.LC68 call puts@plt lla a0,.LC69 call puts@plt lla a0,.LC70 call puts@plt lla a3,.LC71 li a2,7 lla a1,.LC72 li a0,6 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page5, .-page5 .section .rodata .align 3 .LC73: .string "The uniform definitely makes you look snappy and pert. It really looks" .align 3 .LC74: .string "impressive, and even has the new lopsided lapel fashion that you admire so" .align 3 .LC75: .string "much. What's more, citizens of all ranks come to obsequious attention as you" .align 3 .LC76: .string "walk past. This isn't so bad being an Ultraviolet. You could probably come" .align 3 .LC77: .string "to like it, given time." .align 3 .LC78: .string "The beeping computer terminal interrupts your musings." .text .align 1 .globl page6 .type page6, @function page6: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC73 call puts@plt lla a0,.LC74 call puts@plt lla a0,.LC75 call puts@plt lla a0,.LC76 call puts@plt lla a0,.LC77 call puts@plt lla a0,.LC78 call puts@plt lla a5,ultra_violet li a4,1 sw a4,0(a5) li a5,8 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page6, .-page6 .section .rodata .align 3 .LC79: .string "The corridor lights dim and are replaced by red battle lamps as the Security" .align 3 .LC80: .string "Breach alarms howl all around you. You run headlong down the corridor and" .align 3 .LC81: .string "desperately windmill around a corner, only to collide with a squad of 12 Blue" .align 3 .LC82: .string "clearance Vulture squadron soldiers. \"Stop, Slime Face,\" shouts the" .align 3 .LC83: .string "commander, \"or there won't be enough of you left for a tissue sample.\"" .align 3 .LC84: .string "\"All right, soldiers, stuff the greasy traitor into the uniform,\" he orders," .align 3 .LC85: .string "waving the business end of his blue laser scant inches from your nose." .align 3 .LC86: .string "With his other hand he shakes open a white bundle to reveal a pristine new" .align 3 .LC87: .string "Ultraviolet citizen's uniform." .align 3 .LC88: .string "One of the Vulture squadron Troubleshooters grabs you by the neck in the" .align 3 .LC89: .string "exotic and very painful Vulture Clamp(tm) death grip (you saw a special about" .align 3 .LC90: .string "it on the Teela O'Malley show), while the rest tear off your clothes and" .align 3 .LC91: .string "force you into the Ultraviolet uniform. The moment you are dressed they step" .align 3 .LC92: .string "clear and stand at attention." .align 3 .LC93: .string "\"Thank you for your cooperation, sir,\" says the steely eyed leader of the" .align 3 .LC94: .string "Vulture Squad. \"We will be going about our business now.\" With perfect" .align 3 .LC95: .string "timing the Vultures wheel smartly and goosestep down the corridor." .align 3 .LC96: .string "Special Note: don't make the mistake of assuming that your skills have" .align 3 .LC97: .string "improved any because of the uniform; you're only a Red Troubleshooter" .align 3 .LC98: .string "traitorously posing as an Ultraviolet, and don't you forget it!" .align 3 .LC99: .string "Suddenly, a computer terminal comes to life beside you." .text .align 1 .globl page7 .type page7, @function page7: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC79 call puts@plt lla a0,.LC80 call puts@plt lla a0,.LC81 call puts@plt lla a0,.LC82 call puts@plt lla a0,.LC83 call puts@plt lla a0,.LC84 call puts@plt lla a0,.LC85 call puts@plt lla a0,.LC86 call puts@plt lla a0,.LC87 call puts@plt lla a0,.LC88 call puts@plt lla a0,.LC89 call puts@plt lla a0,.LC90 call puts@plt lla a0,.LC91 call puts@plt lla a0,.LC92 call puts@plt lla a0,.LC93 call puts@plt lla a0,.LC94 call puts@plt lla a0,.LC95 call puts@plt lla a0,.LC96 call puts@plt lla a0,.LC97 call puts@plt lla a0,.LC98 call puts@plt lla a0,.LC99 call puts@plt lla a5,ultra_violet li a4,1 sw a4,0(a5) li a5,8 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page7, .-page7 .section .rodata .align 3 .LC100: .string "\"Now, about your question, citizen. Christmas was an old world marketing ploy" .align 3 .LC101: .string "to induce lower clearance citizens to purchase vast quantities of goods, thus" .align 3 .LC102: .string "accumulation a large amount of credit under the control of a single class of" .align 3 .LC103: .string "citizen known as Retailers. The strategy used is to imply that all good" .align 3 .LC104: .string "citizens give gifts during Christmas, thus if one wishes to be a valuable" .align 3 .LC105: .string "member of society one must also give gifts during Christmas. More valuable" .align 3 .LC106: .string "gifts make one a more valuable member, and thus did the Retailers come to" .align 3 .LC107: .string "control a disproportionate amount of the currency. In this way Christmas" .align 3 .LC108: .string "eventually caused the collapse of the old world. Understandably, Christmas" .align 3 .LC109: .string "has been declared a treasonable practice in Alpha Complex." .align 3 .LC110: .string "Thank you for your inquiry.\"" .align 3 .LC111: .string "You continue on your way to GDH7-beta." .text .align 1 .globl page8 .type page8, @function page8: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC100 call puts@plt lla a0,.LC101 call puts@plt lla a0,.LC102 call puts@plt lla a0,.LC103 call puts@plt lla a0,.LC104 call puts@plt lla a0,.LC105 call puts@plt lla a0,.LC106 call puts@plt lla a0,.LC107 call puts@plt lla a0,.LC108 call puts@plt lla a0,.LC109 call puts@plt lla a0,.LC110 call puts@plt lla a0,.LC111 call puts@plt li a5,10 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page8, .-page8 .section .rodata .align 3 .LC112: .string "As you walk toward the tubecar that will take you to GDH7-beta, you pass one" .align 3 .LC113: .string "of the bright blue and orange Internal Security self incrimination stations." .align 3 .LC114: .string "Inside, you can see an IS agent cheerfully greet an infrared citizen and then" .align 3 .LC115: .string "lead him at gunpoint into one of the rubber lined discussion rooms." .align 3 .LC116: .string "You just continue blithely on past" .align 3 .LC117: .string "You decide to stop here and chat, as ordered by The Computer" .text .align 1 .globl page9 .type page9, @function page9: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 lla a0,.LC112 call puts@plt lla a0,.LC113 call puts@plt lla a0,.LC114 call puts@plt lla a0,.LC115 call puts@plt lla a3,.LC116 li a2,10 lla a1,.LC117 li a0,2 call choose mv a5,a0 sw a5,-20(s0) lw a5,-20(s0) sext.w a4,a5 li a5,2 bne a4,a5,.L37 lla a5,computer_request li a4,1 sw a4,0(a5) j .L38 .L37: lla a5,computer_request sw zero,0(a5) .L38: lw a5,-20(s0) mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size page9, .-page9 .section .rodata .align 3 .LC118: .string "You stroll briskly down the corridor, up a ladder, across an unrailed catwalk," .align 3 .LC119: .string "under a perilously swinging blast door in urgent need of repair, and into" .align 3 .LC120: .string "tubecar grand central. This is the bustling hub of Alpha Complex tubecar" .align 3 .LC121: .string "transportation. Before you spreads a spaghetti maze of magnalift tube tracks" .align 3 .LC122: .string "and linear accelerators. You bravely study the specially enhanced 3-D tube" .align 3 .LC123: .string "route map; you wouldn't be the first Troubleshooter to take a fast tube ride" .align 3 .LC124: .string "to nowhere." .align 3 .LC125: .string "You think you have the route worked out, so you'll board a tube train" .align 3 .LC126: .string "You decide to ask The Computer about Christmas using a nearby terminal" .align 3 .LC127: .string "You nervously select a tubecar and step aboard." .align 3 .LC128: .string "You just caught a purple line tubecar." .align 3 .LC129: .string "You just caught a brown line tubecar." .text .align 1 .globl page10 .type page10, @function page10: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 lla a0,.LC118 call puts@plt lla a0,.LC119 call puts@plt lla a0,.LC120 call puts@plt lla a0,.LC121 call puts@plt lla a0,.LC122 call puts@plt lla a0,.LC123 call puts@plt lla a0,.LC124 call puts@plt lla a5,ultra_violet lw a5,0(a5) bne a5,zero,.L41 lla a3,.LC125 li a2,10 lla a1,.LC126 li a0,3 call choose mv a5,a0 sw a5,-20(s0) lw a5,-20(s0) sext.w a4,a5 li a5,3 bne a4,a5,.L41 lw a5,-20(s0) j .L42 .L41: lla a0,.LC127 call puts@plt li a1,10 li a0,2 call dice_roll mv a5,a0 mv a4,a5 li a5,12 bgt a4,a5,.L43 lla a0,.LC128 call puts@plt li a5,13 j .L42 .L43: lla a0,.LC129 call puts@plt li a5,48 .L42: mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size page10, .-page10 .section .rodata .align 3 .LC130: .string "The printing on the folder says \"Experimental Self Briefing.\"" .align 3 .LC131: .string "You open it and begin to read the following:" .align 3 .LC132: .string "Step 1: Compel the briefing subject to attend the briefing." .align 3 .LC133: .string " Note: See Experimental Briefing Sub Form Indigo-WY-2," .align 3 .LC134: .string " 'Experimental Self Briefing Subject Acquisition Through The Use Of" .align 3 .LC135: .string " Neurotoxin Room Foggers.'" .align 3 .LC136: .string "Step 2: Inform the briefing subject that the briefing has begun." .align 3 .LC137: .string " ATTENTION: THE BRIEFING HAS BEGUN." .align 3 .LC138: .string "Step 3: Present the briefing material to the briefing subject." .align 3 .LC139: .string " GREETINGS TROUBLESHOOTER." .align 3 .LC140: .string " YOU HAVE BEEN SPECIALLY SELECTED TO SINGLEHANDEDLY" .align 3 .LC141: .string " WIPE OUT A DEN OF TRAITOROUS CHRISTMAS ACTIVITY. YOUR MISSION IS TO" .align 3 .LC142: .string " GO TO GOODS DISTRIBUTION HALL 7-BETA AND ASSESS ANY CHRISTMAS ACTIVITY" .align 3 .LC143: .string " YOU FIND THERE. YOU ARE TO INFILTRATE THESE CHRISTMAS CELEBRANTS," .align 3 .LC144: .string " LOCATE THEIR RINGLEADER, AN UNKNOWN MASTER RETAILER, AND BRING HIM" .align 3 .LC145: .string " BACK FOR EXECUTION AND TRIAL. THANK YOU. THE COMPUTER IS YOUR FRIEND." .align 3 .LC146: .string "Step 4: Sign the briefing subject's briefing release form to indicate that" .align 3 .LC147: .string " the briefing subject has completed the briefing." .align 3 .LC148: .string " ATTENTION: PLEASE SIGN YOUR BRIEFING RELEASE FORM." .align 3 .LC149: .string "Step 5: Terminate the briefing" .align 3 .LC150: .string " ATTENTION: THE BRIEFING IS TERMINATED." .align 3 .LC151: .string "You walk to the door and hold your signed briefing release form up to the" .align 3 .LC152: .string "plexiglass window. A guard scrutinises it for a moment and then slides back" .align 3 .LC153: .string "the megabolts holding the door shut. You are now free to continue the" .align 3 .LC154: .string "mission." .align 3 .LC155: .string "You have decided to go directly to Goods Distribution Hall 7-beta" .align 3 .LC156: .string "You wish to ask The Computer for more information about Christmas" .text .align 1 .globl page11 .type page11, @function page11: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC130 call puts@plt lla a0,.LC131 call puts@plt lla a0,.LC132 call puts@plt lla a0,.LC133 call puts@plt lla a0,.LC134 call puts@plt lla a0,.LC135 call puts@plt lla a0,.LC136 call puts@plt lla a0,.LC137 call puts@plt lla a0,.LC138 call puts@plt lla a0,.LC139 call puts@plt lla a0,.LC140 call puts@plt lla a0,.LC141 call puts@plt lla a0,.LC142 call puts@plt lla a0,.LC143 call puts@plt lla a0,.LC144 call puts@plt lla a0,.LC145 call puts@plt lla a0,.LC146 call puts@plt lla a0,.LC147 call puts@plt lla a0,.LC148 call puts@plt lla a0,.LC149 call puts@plt lla a0,.LC150 call puts@plt call more lla a0,.LC151 call puts@plt lla a0,.LC152 call puts@plt lla a0,.LC153 call puts@plt lla a0,.LC154 call puts@plt lla a3,.LC155 li a2,10 lla a1,.LC156 li a0,3 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page11, .-page11 .section .rodata .align 3 .LC157: .string "You walk up to the door and push the button labelled \"push to exit.\"" .align 3 .LC158: .string "Within seconds a surly looking guard shoves his face into the small plexiglass" .align 3 .LC159: .string "window. You can see his mouth forming words but you can't hear any of them." .align 3 .LC160: .string "You just stare at him blankly for a few moments until he points down to a" .align 3 .LC161: .string "speaker on your side of the door. When you put your ear to it you can barely" .align 3 .LC162: .string "hear him say, \"Let's see your briefing release form, bud. You aren't" .align 3 .LC163: .string "getting out of here without it.\"" .align 3 .LC164: .string "You stare around the room some more" .align 3 .LC165: .string "You sit down at the table and read the Orange packet" .text .align 1 .globl page12 .type page12, @function page12: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC157 call puts@plt lla a0,.LC158 call puts@plt lla a0,.LC159 call puts@plt lla a0,.LC160 call puts@plt lla a0,.LC161 call puts@plt lla a0,.LC162 call puts@plt lla a0,.LC163 call puts@plt lla a3,.LC164 li a2,57 lla a1,.LC165 li a0,11 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page12, .-page12 .section .rodata .align 3 .LC166: .string "You step into the shiny plasteel tubecar, wondering why the shape has always" .align 3 .LC167: .string "reminded you of bullets. The car shoots forward the instant your feet touch" .align 3 .LC168: .string "the slippery gray floor, pinning you immobile against the back wall as the" .align 3 .LC169: .string "tubecar careens toward GDH7-beta. Your only solace is the knowledge that it" .align 3 .LC170: .string "could be worse, much worse." .align 3 .LC171: .string "Before too long the car comes to a stop. You can see signs for GDH7-beta" .align 3 .LC172: .string "through the window. With a little practice you discover that you can crawl" .align 3 .LC173: .string "to the door and pull open the latch." .text .align 1 .globl page13 .type page13, @function page13: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC166 call puts@plt lla a0,.LC167 call puts@plt lla a0,.LC168 call puts@plt lla a0,.LC169 call puts@plt lla a0,.LC170 call puts@plt lla a0,.LC171 call puts@plt lla a0,.LC172 call puts@plt lla a0,.LC173 call puts@plt li a5,14 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page13, .-page13 .section .rodata .align 3 .LC174: .string "You manage to pull yourself out of the tubecar and look around. Before you is" .align 3 .LC175: .string "one of the most confusing things you have ever seen, a hallway that is" .align 3 .LC176: .string "simultaneously both red and green clearance. If this is the result of" .align 3 .LC177: .string "Christmas then it's easy to see the evils inherent in its practice." .align 3 .LC178: .string "You are in the heart of a large goods distribution centre. You can see all" .align 3 .LC179: .string "about you evidence of traitorous secret society Christmas celebration; rubber" .align 3 .LC180: .string "faced robots whiz back and forth selling toys to holiday shoppers, simul-plast" .align 3 .LC181: .string "wreaths hang from every light fixture, while ahead in the shadows is a citizen" .align 3 .LC182: .string "wearing a huge red synthetic flower." .text .align 1 .globl page14 .type page14, @function page14: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC174 call puts@plt lla a0,.LC175 call puts@plt lla a0,.LC176 call puts@plt lla a0,.LC177 call puts@plt lla a0,.LC178 call puts@plt lla a0,.LC179 call puts@plt lla a0,.LC180 call puts@plt lla a0,.LC181 call puts@plt lla a0,.LC182 call puts@plt li a5,22 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page14, .-page14 .section .rodata .align 3 .LC183: .string "You are set upon by a runty robot with a queer looking face and two pointy" .align 3 .LC184: .string "rubber ears poking from beneath a tattered cap. \"Hey mister,\" it says," .align 3 .LC185: .string "\"you done all your last minute Christmas shopping? I got some real neat junk" .align 3 .LC186: .string "here. You don't wanna miss the big day tommorrow, if you know what I mean.\"" .align 3 .LC187: .string "The robot opens its bag to show you a pile of shoddy Troubleshooter dolls. It" .align 3 .LC188: .string "reaches in and pulls out one of them. \"Look, these Action Troubleshooter(tm)" .align 3 .LC189: .string "dolls are the neatest thing. This one's got moveable arms and when you" .align 3 .LC190: .string "squeeze him, his little rifle squirts realistic looking napalm. It's only" .align 3 .LC191: .string "50 credits. Oh yeah, Merry Christmas.\"" .align 3 .LC192: .string "\nSelect 'a', 'b' or 'c' :" .align 3 .LC193: .string " a - You decide to buy the doll." .align 3 .LC194: .string " b - You shoot the robot." .align 3 .LC195: .string " c - You ignore the robot and keep searching the hall." .text .align 1 .globl page15 .type page15, @function page15: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC183 call puts@plt lla a0,.LC184 call puts@plt lla a0,.LC185 call puts@plt lla a0,.LC186 call puts@plt lla a0,.LC187 call puts@plt lla a0,.LC188 call puts@plt lla a0,.LC189 call puts@plt lla a0,.LC190 call puts@plt lla a0,.LC191 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC193 call puts@plt lla a0,.LC194 call puts@plt lla a0,.LC195 call puts@plt call get_char mv a5,a0 sext.w a4,a5 mv a3,a4 li a5,97 beq a3,a5,.L53 li a5,98 beq a4,a5,.L54 j .L57 .L53: li a5,16 j .L56 .L54: li a5,17 j .L56 .L57: li a5,22 .L56: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page15, .-page15 .section .rodata .align 3 .LC196: .string "The doll is a good buy for fifty credits; it will make a fine Christmas present" .align 3 .LC197: .string "for one of your friends. After the sale the robot rolls away. You can use" .align 3 .LC198: .string "the doll later in combat. It works just like a cone rifle firing napalm," .align 3 .LC199: .string "except that occasionally it will explode and blow the user to smithereens." .align 3 .LC200: .string "But don't let that stop you." .text .align 1 .globl page16 .type page16, @function page16: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC196 call puts@plt lla a0,.LC197 call puts@plt lla a0,.LC198 call puts@plt lla a0,.LC199 call puts@plt lla a0,.LC200 call puts@plt lla a5,action_doll li a4,1 sw a4,0(a5) li a5,22 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page16, .-page16 .section .rodata .align 3 .LC201: .string "You whip out your laser and shoot the robot, but not before it squeezes the" .align 3 .LC202: .string "toy at you. The squeeze toy has the same effect as a cone rifle firing napalm," .align 3 .LC203: .string "and the elfbot's armour has no effect against your laser." .align 3 .LC204: .string "You have been hit!" .align 3 .LC205: .string "It missed you, but not by much!" .align 3 .LC206: .string "You zapped the little bastard!" .align 3 .LC207: .string "You wasted it! Good shooting!" .align 3 .LC208: .string "You will need more evidence, so you search GDH7-beta further" .align 3 .LC209: .string "after the GDH medbot has patched you up." .align 3 .LC210: .string "Damn! You missed!" .align 3 .LC211: .string "It tried to fire again, but the toy exploded and demolished it." .text .align 1 .globl page17 .type page17, @function page17: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 li a5,15 sw a5,-20(s0) lla a0,.LC201 call puts@plt lla a0,.LC202 call puts@plt lla a0,.LC203 call puts@plt sw zero,-24(s0) j .L61 .L68: li a1,100 li a0,1 call dice_roll mv a5,a0 mv a4,a5 li a5,25 bgt a4,a5,.L62 lla a0,.LC204 call puts@plt li a1,10 li a0,1 call dice_roll mv a5,a0 mv a4,a5 lla a5,hit_points lw a5,0(a5) subw a5,a5,a4 sext.w a4,a5 lla a5,hit_points sw a4,0(a5) lla a5,hit_points lw a5,0(a5) bgt a5,zero,.L63 li a0,45 call new_clone mv a5,a0 j .L64 .L62: lla a0,.LC205 call puts@plt .L63: li a1,100 li a0,1 call dice_roll mv a5,a0 mv a4,a5 li a5,40 bgt a4,a5,.L65 lla a0,.LC206 call puts@plt li a1,10 li a0,2 call dice_roll mv a5,a0 lw a4,-20(s0) subw a5,a4,a5 sw a5,-20(s0) lw a5,-20(s0) sext.w a5,a5 bgt a5,zero,.L66 lla a0,.LC207 call puts@plt lla a0,.LC208 call puts@plt lla a5,hit_points lw a5,0(a5) mv a4,a5 li a5,9 bgt a4,a5,.L67 lla a0,.LC209 call puts@plt .L67: lla a5,hit_points li a4,10 sw a4,0(a5) li a5,22 j .L64 .L65: lla a0,.LC210 call puts@plt .L66: lw a5,-24(s0) addiw a5,a5,1 sw a5,-24(s0) .L61: lw a5,-24(s0) sext.w a4,a5 li a5,1 ble a4,a5,.L68 lla a0,.LC211 call puts@plt lla a0,.LC208 call puts@plt lla a5,hit_points lw a5,0(a5) mv a4,a5 li a5,9 bgt a4,a5,.L69 lla a0,.LC209 call puts@plt .L69: lla a5,hit_points li a4,10 sw a4,0(a5) li a5,22 .L64: mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size page17, .-page17 .section .rodata .align 3 .LC212: .string "You walk to the centre of the hall, ogling like an infrared fresh from the" .align 3 .LC213: .string "clone vats. Towering before you is the most unearthly thing you have ever" .align 3 .LC214: .string "seen, a green multi armed mutant horror hulking 15 feet above your head." .align 3 .LC215: .string "Its skeletal body is draped with hundreds of metallic strips (probably to" .align 3 .LC216: .string "negate the effects of some insidious mutant power), and the entire hideous" .align 3 .LC217: .string "creature is wrapped in a thousand blinking hazard lights. It's times like" .align 3 .LC218: .string "this when you wish you'd had some training for this job. Luckily the" .align 3 .LC219: .string "creature doesn't take notice of you but stands unmoving, as though waiting for" .align 3 .LC220: .string "a summons from its dark lord, the Master Retailer." .align 3 .LC221: .string "WHAM, suddenly you are struck from behind." .text .align 1 .globl page18 .type page18, @function page18: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC212 call puts@plt lla a0,.LC213 call puts@plt lla a0,.LC214 call puts@plt lla a0,.LC215 call puts@plt lla a0,.LC216 call puts@plt lla a0,.LC217 call puts@plt lla a0,.LC218 call puts@plt lla a0,.LC219 call puts@plt lla a0,.LC220 call puts@plt lla a0,.LC221 call puts@plt li a1,10 li a0,2 call dice_roll mv a5,a0 mv a4,a5 li a5,14 bgt a4,a5,.L71 li a5,19 j .L72 .L71: li a5,20 .L72: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page18, .-page18 .section .rodata .align 3 .LC222: .string "Quickly you regain your balance, whirl and fire your laser into the Ultraviolet" .align 3 .LC223: .string "citizen behind you. For a moment your heart leaps to your throat, then you" .align 3 .LC224: .string "realise that he is indeed dead and you will be the only one filing a report on" .align 3 .LC225: .string "this incident. Besides, he was participating in this traitorous Christmas" .align 3 .LC226: .string "shopping, as is evident from the rain of shoddy toys falling all around you." .align 3 .LC227: .string "Another valorous deed done in the service of The Computer!" .align 3 .LC228: .string "You run away like the cowardly dog you are" .align 3 .LC229: .string "You search the body, keeping an eye open for Internal Security" .text .align 1 .globl page19 .type page19, @function page19: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC222 call puts@plt lla a0,.LC223 call puts@plt lla a0,.LC224 call puts@plt lla a0,.LC225 call puts@plt lla a0,.LC226 call puts@plt lla a0,.LC227 call puts@plt lla a5,killer_count lw a5,0(a5) addiw a5,a5,1 sext.w a4,a5 lla a5,killer_count sw a4,0(a5) lla a5,killer_count lw a3,0(a5) lla a5,clone lw a5,0(a5) li a4,7 subw a5,a4,a5 sext.w a5,a5 mv a4,a3 ble a4,a5,.L74 li a5,21 j .L75 .L74: lla a5,read_letter lw a5,0(a5) mv a4,a5 li a5,1 bne a4,a5,.L76 li a5,22 j .L75 .L76: lla a3,.LC228 li a2,22 lla a1,.LC229 li a0,34 call choose mv a5,a0 .L75: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page19, .-page19 .section .rodata .align 3 .LC230: .string "Oh no! you can't keep your balance. You're falling, falling head first into" .align 3 .LC231: .string "the Christmas beast's gaping maw. It's a valiant struggle; you think you are" .align 3 .LC232: .string "gone when its poisonous needles dig into your flesh, but with a heroic effort" .align 3 .LC233: .string "you jerk a string of lights free and jam the live wires into the creature's" .align 3 .LC234: .string "spine. The Christmas beast topples to the ground and begins to burn, filling" .align 3 .LC235: .string "the area with a thick acrid smoke. It takes only a moment to compose yourself," .align 3 .LC236: .string "and then you are ready to continue your search for the Master Retailer." .text .align 1 .globl page20 .type page20, @function page20: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC230 call puts@plt lla a0,.LC231 call puts@plt lla a0,.LC232 call puts@plt lla a0,.LC233 call puts@plt lla a0,.LC234 call puts@plt lla a0,.LC235 call puts@plt lla a0,.LC236 call puts@plt li a5,22 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page20, .-page20 .section .rodata .align 3 .LC237: .string "You have been wasting the leading citizens of Alpha Complex at a prodigious" .align 3 .LC238: .string "rate. This has not gone unnoticed by the Internal Security squad at GDH7-beta." .align 3 .LC239: .string "Suddenly, a net of laser beams spear out of the gloomy corners of the hall," .align 3 .LC240: .string "chopping you into teeny, weeny bite size pieces." .text .align 1 .globl page21 .type page21, @function page21: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC237 call puts@plt lla a0,.LC238 call puts@plt lla a0,.LC239 call puts@plt lla a0,.LC240 call puts@plt li a0,45 call new_clone mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page21, .-page21 .section .rodata .align 3 .LC241: .string "You are searching Goods Distribution Hall 7-beta." .text .align 1 .globl page22 .type page22, @function page22: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC241 call puts@plt li a1,4 li a0,1 call dice_roll mv a5,a0 mv a3,a5 li a4,4 beq a3,a4,.L82 mv a3,a5 li a4,4 bgt a3,a4,.L83 mv a3,a5 li a4,3 beq a3,a4,.L84 mv a3,a5 li a4,3 bgt a3,a4,.L83 mv a3,a5 li a4,1 beq a3,a4,.L85 mv a4,a5 li a5,2 beq a4,a5,.L86 j .L83 .L85: li a5,18 j .L81 .L86: li a5,15 j .L81 .L84: li a5,18 j .L81 .L82: li a5,29 j .L81 .L83: .L81: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page22, .-page22 .section .rodata .align 3 .LC242: .string "You go to the nearest computer terminal and declare yourself a mutant." .align 3 .LC243: .string "\"A mutant, he's a mutant,\" yells a previously unnoticed infrared who had" .align 3 .LC244: .string "been looking over your shoulder. You easily gun him down, but not before a" .align 3 .LC245: .string "dozen more citizens take notice and aim their weapons at you." .align 3 .LC246: .string "You want to fight it out, one against twelve" .align 3 .LC247: .string "You tell them that it was really only a bad joke" .text .align 1 .globl page23 .type page23, @function page23: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC242 call puts@plt lla a0,.LC243 call puts@plt lla a0,.LC244 call puts@plt lla a0,.LC245 call puts@plt lla a3,.LC246 li a2,24 lla a1,.LC247 li a0,28 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page23, .-page23 .section .rodata .align 3 .LC248: .string "Golly, I never expected someone to pick this. I haven't even designed" .align 3 .LC249: .string "the 12 citizens who are going to make a sponge out of you. Tell you what," .align 3 .LC250: .string "I'll give you a second chance." .align 3 .LC251: .string "You REALLY want to shoot it out" .align 3 .LC252: .string "You change your mind and say it was only a bad joke" .text .align 1 .globl page24 .type page24, @function page24: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC248 call puts@plt lla a0,.LC249 call puts@plt lla a0,.LC250 call puts@plt lla a3,.LC251 li a2,25 lla a1,.LC252 li a0,28 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page24, .-page24 .section .rodata .align 3 .LC253: .string "Boy, you really can't take a hint!" .align 3 .LC254: .string "They're closing in. Their trigger fingers are twitching, they're about to" .align 3 .LC255: .string "shoot. This is your last chance." .align 3 .LC256: .string "You are going to shoot" .align 3 .LC257: .string "You tell them it was all just a bad joke" .text .align 1 .globl page25 .type page25, @function page25: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC253 call puts@plt lla a0,.LC254 call puts@plt lla a0,.LC255 call puts@plt lla a3,.LC256 li a2,26 lla a1,.LC257 li a0,28 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page25, .-page25 .section .rodata .align 3 .LC258: .string "You can read the cold, sober hatred in their eyes (They really didn't think" .align 3 .LC259: .string "it was funny), as they tighten the circle around you. One of them shoves a" .align 3 .LC260: .string "blaster up your nose, but that doesn't hurt as much as the multi-gigawatt" .align 3 .LC261: .string "carbonium tipped food drill in the small of your back." .align 3 .LC262: .string "You spend the remaining micro-seconds of your life wondering what you did wrong" .text .align 1 .globl page26 .type page26, @function page26: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC258 call puts@plt lla a0,.LC259 call puts@plt lla a0,.LC260 call puts@plt lla a0,.LC261 call puts@plt lla a0,.LC262 call puts@plt li a0,32 call new_clone mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page26, .-page26 .align 1 .globl page27 .type page27, @function page27: addi sp,sp,-16 sd s0,8(sp) addi s0,sp,16 nop mv a0,a5 ld s0,8(sp) addi sp,sp,16 jr ra .size page27, .-page27 .section .rodata .align 3 .LC263: .string "They don't think it's funny." .text .align 1 .globl page28 .type page28, @function page28: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC263 call puts@plt li a5,26 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page28, .-page28 .section .rodata .align 3 .LC264: .string "\"Psst, hey citizen, come here. Pssfft,\" you hear. When you peer around" .align 3 .LC265: .string "you can see someone's dim outline in the shadows. \"I got some information" .align 3 .LC266: .string "on the Master Retailer. It'll only cost you 30 psst credits.\"" .align 3 .LC267: .string " a - You pay the 30 credits for the info." .align 3 .LC268: .string " b - You would rather threaten him for the information." .align 3 .LC269: .string " c - You ignore him and walk away." .text .align 1 .globl page29 .type page29, @function page29: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC264 call puts@plt lla a0,.LC265 call puts@plt lla a0,.LC266 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC267 call puts@plt lla a0,.LC268 call puts@plt lla a0,.LC269 call puts@plt call get_char mv a5,a0 sext.w a4,a5 mv a3,a4 li a5,97 beq a3,a5,.L100 li a5,98 beq a4,a5,.L101 j .L104 .L100: li a5,30 j .L103 .L101: li a5,31 j .L103 .L104: li a5,22 .L103: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page29, .-page29 .section .rodata .align 3 .LC270: .string "You step into the shadows and offer the man a thirty credit bill. \"Just drop" .align 3 .LC271: .string "it on the floor,\" he says. \"So you're looking for the Master Retailer, pssfft?" .align 3 .LC272: .string "I've seen him, he's a fat man in a fuzzy red and white jump suit. They say" .align 3 .LC273: .string "he's a high programmer with no respect for proper security. If you want to" .align 3 .LC274: .string "find him then pssfft step behind me and go through the door.\"" .align 3 .LC275: .string "Behind the man is a reinforced plasteel blast door. The centre of it has been" .align 3 .LC276: .string "buckled toward you in a manner you only saw once before when you were field" .align 3 .LC277: .string "testing the rocket assist plasma slingshot (you found it easily portable but" .align 3 .LC278: .string "prone to misfire). Luckily it isn't buckled too far for you to make out the" .align 3 .LC279: .string "warning sign. WARNING!! Don't open this door or the same thing will happen to" .align 3 .LC280: .string "you. Opening this door is a capital offense. Do not do it. Not at all. This" .align 3 .LC281: .string "is not a joke." .align 3 .LC282: .string " a - You use your Precognition mutant power on opening the door." .align 3 .LC283: .string " b - You just go through the door anyway." .align 3 .LC284: .string " c - You decide it's too dangerous and walk away." .text .align 1 .globl page30 .type page30, @function page30: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC270 call puts@plt lla a0,.LC271 call puts@plt lla a0,.LC272 call puts@plt lla a0,.LC273 call puts@plt lla a0,.LC274 call puts@plt lla a0,.LC275 call puts@plt lla a0,.LC276 call puts@plt lla a0,.LC277 call puts@plt lla a0,.LC278 call puts@plt lla a0,.LC279 call puts@plt lla a0,.LC280 call puts@plt lla a0,.LC281 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC282 call puts@plt lla a0,.LC283 call puts@plt lla a0,.LC284 call puts@plt call get_char mv a5,a0 sext.w a4,a5 mv a3,a4 li a5,97 beq a3,a5,.L106 li a5,98 beq a4,a5,.L107 j .L110 .L106: li a5,56 j .L109 .L107: li a5,33 j .L109 .L110: li a5,22 .L109: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page30, .-page30 .section .rodata .align 3 .LC285: .string "Like any good troubleshooter you make the least expensive decision and threaten" .align 3 .LC286: .string "him for information. With lightning like reflexes you whip out your laser and" .align 3 .LC287: .string "stick it up his nose. \"Talk, you traitorous Christmas celebrator, or who nose" .align 3 .LC288: .string "what will happen to you, yuk yuk,\" you pun menacingly, and then you notice" .align 3 .LC289: .string "something is very wrong. He doesn't have a nose. As a matter of fact he's" .align 3 .LC290: .string "made of one eighth inch cardboard and your laser is sticking through the other" .align 3 .LC291: .string "side of his head. \"Are you going to pay?\" says his mouth speaker," .align 3 .LC292: .string "\"or are you going to pssfft go away stupid?\"" .align 3 .LC293: .string "You pssfft go away stupid" .align 3 .LC294: .string "You pay the 30 credits" .text .align 1 .globl page31 .type page31, @function page31: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC285 call puts@plt lla a0,.LC286 call puts@plt lla a0,.LC287 call puts@plt lla a0,.LC288 call puts@plt lla a0,.LC289 call puts@plt lla a0,.LC290 call puts@plt lla a0,.LC291 call puts@plt lla a0,.LC292 call puts@plt lla a3,.LC293 li a2,22 lla a1,.LC294 li a0,30 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page31, .-page31 .section .rodata .align 3 .LC295: .string "Finally it's your big chance to prove that you're as good a troubleshooter" .align 3 .LC296: .string "as your previous clone. You walk briskly to mission briefing and pick up your" .align 3 .LC297: .string "previous clone's personal effects and notepad. After reviewing the notes you" .align 3 .LC298: .string "know what has to be done. You catch the purple line to Goods Distribution Hall" .align 3 .LC299: .string "7-beta and begin to search for the blast door." .text .align 1 .globl page32 .type page32, @function page32: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC295 call puts@plt lla a0,.LC296 call puts@plt lla a0,.LC297 call puts@plt lla a0,.LC298 call puts@plt lla a0,.LC299 call puts@plt li a5,22 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page32, .-page32 .section .rodata .align 3 .LC300: .string "You release the megabolts on the blast door, then strain against it with your" .align 3 .LC301: .string "awesome strength. Slowly the door creaks open. You bravely leap through the" .align 3 .LC302: .string "opening and smack your head into the barrel of a 300 mm 'ultra shock' class" .align 3 .LC303: .string "plasma cannon. It's dark in the barrel now, but just before your head got" .align 3 .LC304: .string "stuck you can remember seeing a group of technicians anxiously watch you leap" .align 3 .LC305: .string "into the room." .text .align 1 .globl page33 .type page33, @function page33: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a5,blast_door li a4,1 sw a4,0(a5) lla a0,.LC300 call puts@plt lla a0,.LC301 call puts@plt lla a0,.LC302 call puts@plt lla a0,.LC303 call puts@plt lla a0,.LC304 call puts@plt lla a0,.LC305 call puts@plt lla a5,ultra_violet lw a5,0(a5) mv a4,a5 li a5,1 bne a4,a5,.L116 li a5,35 j .L117 .L116: li a5,36 .L117: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page33, .-page33 .section .rodata .align 3 .LC306: .string "You have found a sealed envelope on the body. You open it and read:" .align 3 .LC307: .string "\"WARNING: Ultraviolet Clearance ONLY. DO NOT READ." .align 3 .LC308: .string "Memo from Chico-U-MRX4 to Harpo-U-MRX5." .align 3 .LC309: .string "The planned takeover of the Troubleshooter Training Course goes well, Comrade." .align 3 .LC310: .string "Once we have trained the unwitting bourgeois troubleshooters to work as" .align 3 .LC311: .string "communist dupes, the overthrow of Alpha Complex will be unstoppable. My survey" .align 3 .LC312: .string "of the complex has convinced me that no one suspects a thing; soon it will be" .align 3 .LC313: .string "too late for them to oppose the revolution. The only thing that could possibly" .align 3 .LC314: .string "impede the people's revolution would be someone alerting The Computer to our" .align 3 .LC315: .string "plans (for instance, some enterprising Troubleshooter could tell The Computer" .align 3 .LC316: .string "that the communists have liberated the Troubleshooter Training Course and plan" .align 3 .LC317: .string "to use it as a jumping off point from which to undermine the stability of all" .align 3 .LC318: .string "Alpha Complex), but as we both know, the capitalistic Troubleshooters would" .align 3 .LC319: .string "never serve the interests of the proletariat above their own bourgeois desires." .align 3 .LC320: .string "P.S. I'm doing some Christmas shopping later today. Would you like me to pick" .align 3 .LC321: .string "you up something?\"" .align 3 .LC322: .string "When you put down the memo you are overcome by that strange deja'vu again." .align 3 .LC323: .string "You see yourself talking privately with The Computer. You are telling it all" .align 3 .LC324: .string "about the communists' plan, and then the scene shifts and you see yourself" .align 3 .LC325: .string "showered with awards for foiling the insidious communist plot to take over the" .align 3 .LC326: .string "complex." .align 3 .LC327: .string "You wander off to look for more evidence" .align 3 .LC328: .string "You rush off to the nearest computer terminal to expose the commies" .text .align 1 .globl page34 .type page34, @function page34: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC306 call puts@plt lla a0,.LC307 call puts@plt lla a0,.LC308 call puts@plt lla a0,.LC309 call puts@plt lla a0,.LC310 call puts@plt lla a0,.LC311 call puts@plt lla a0,.LC312 call puts@plt lla a0,.LC313 call puts@plt lla a0,.LC314 call puts@plt lla a0,.LC315 call puts@plt lla a0,.LC316 call puts@plt lla a0,.LC317 call puts@plt lla a0,.LC318 call puts@plt lla a0,.LC319 call puts@plt lla a0,.LC320 call puts@plt lla a0,.LC321 call puts@plt call more lla a0,.LC322 call puts@plt lla a0,.LC323 call puts@plt lla a0,.LC324 call puts@plt lla a0,.LC325 call puts@plt lla a0,.LC326 call puts@plt lla a5,read_letter li a4,1 sw a4,0(a5) lla a3,.LC327 li a2,22 lla a1,.LC328 li a0,46 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page34, .-page34 .section .rodata .align 3 .LC329: .string "\"Oh master,\" you hear through the gun barrel, \"where have you been? It is" .align 3 .LC330: .string "time for the great Christmas gifting ceremony. You had better hurry and get" .align 3 .LC331: .string "the costume on or the trainee may begin to suspect.\" For the second time" .align 3 .LC332: .string "today you are forced to wear attire not of your own choosing. They zip the" .align 3 .LC333: .string "suit to your chin just as you hear gunfire erupt behind you." .align 3 .LC334: .string "\"Oh no! Who left the door open? The commies will get in. Quick, fire the" .align 3 .LC335: .string "laser cannon or we're all doomed.\"" .align 3 .LC336: .string "\"Too late you capitalist swine, the people's revolutionary strike force claims" .align 3 .LC337: .string "this cannon for the proletariat's valiant struggle against oppression. Take" .align 3 .LC338: .string "that, you running dog imperialist lackey. ZAP, KAPOW\"" .align 3 .LC339: .string "Just when you think that things couldn't get worse, \"Aha, look what we have" .align 3 .LC340: .string "here, the Master Retailer himself with his head caught in his own cannon. His" .align 3 .LC341: .string "death will serve as a symbol of freedom for all Alpha Complex." .align 3 .LC342: .string "Fire the cannon.\"" .text .align 1 .globl page35 .type page35, @function page35: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC329 call puts@plt lla a0,.LC330 call puts@plt lla a0,.LC331 call puts@plt lla a0,.LC332 call puts@plt lla a0,.LC333 call puts@plt lla a0,.LC334 call puts@plt lla a0,.LC335 call puts@plt lla a0,.LC336 call puts@plt lla a0,.LC337 call puts@plt lla a0,.LC338 call puts@plt lla a0,.LC339 call puts@plt lla a0,.LC340 call puts@plt lla a0,.LC341 call puts@plt lla a0,.LC342 call puts@plt li a0,32 call new_clone mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page35, .-page35 .section .rodata .align 3 .LC343: .string "\"Congratulations, troubleshooter, you have successfully found the lair of the" .align 3 .LC344: .string "Master Retailer and completed the Troubleshooter Training Course test mission,\"" .align 3 .LC345: .string "a muffled voice tells you through the barrel. \"Once we dislodge your head" .align 3 .LC346: .string "from the barrel of the 'Ultra Shock' plasma cannon you can begin with the" .align 3 .LC347: .string "training seminars, the first of which will concern the 100%% accurate\n" .align 3 .LC348: .string "identification and elimination of unregistered mutants. If you have any" .align 3 .LC349: .string "objections please voice them now.\"" .align 3 .LC350: .string " a - You appreciate his courtesy and voice an objection." .align 3 .LC351: .string " b - After your head is removed from the cannon, you register as a mutant." .align 3 .LC352: .string " c - After your head is removed from the cannon, you go to the unregistered" .align 3 .LC353: .string " mutant identification and elimination seminar." .text .align 1 .globl page36 .type page36, @function page36: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC343 call puts@plt lla a0,.LC344 call puts@plt lla a0,.LC345 call puts@plt lla a0,.LC346 call puts@plt lla a0,.LC347 call printf@plt lla a0,.LC348 call puts@plt lla a0,.LC349 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC350 call puts@plt lla a0,.LC351 call puts@plt lla a0,.LC352 call puts@plt lla a0,.LC353 call puts@plt call get_char mv a5,a0 sext.w a4,a5 mv a3,a4 li a5,97 beq a3,a5,.L123 li a5,98 beq a4,a5,.L124 j .L127 .L123: li a0,32 call new_clone mv a5,a0 j .L126 .L124: li a5,23 j .L126 .L127: li a5,37 .L126: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page36, .-page36 .section .rodata .align 3 .LC354: .string "\"Come with me please, Troubleshooter,\" says the Green clearance technician" .align 3 .LC355: .string "after he has dislodged your head from the cannon. \"You have been participating" .align 3 .LC356: .string "in the Troubleshooter Training Course since you got off the tube car in" .align 3 .LC357: .string "GDH7-beta,\" he explains as he leads you down a corridor. \"The entire" .align 3 .LC358: .string "Christmas assignment was a test mission to assess your current level of" .align 3 .LC359: .string "training. You didn't do so well. We're going to start at the beginning with" .align 3 .LC360: .string "the other student. Ah, here we are, the mutant identification and elimination" .align 3 .LC361: .string "lecture.\" He shows you into a vast lecture hall filled with empty seats." .align 3 .LC362: .string "There is only one other student here, a Troubleshooter near the front row" .align 3 .LC363: .string "playing with his Action Troubleshooter(tm) figure. \"Find a seat and I will" .align 3 .LC364: .string "begin,\" says the instructor." .text .align 1 .globl page37 .type page37, @function page37: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC354 call puts@plt lla a0,.LC355 call puts@plt lla a0,.LC356 call puts@plt lla a0,.LC357 call puts@plt lla a0,.LC358 call puts@plt lla a0,.LC359 call puts@plt lla a0,.LC360 call puts@plt lla a0,.LC361 call puts@plt lla a0,.LC362 call puts@plt lla a0,.LC363 call puts@plt lla a0,.LC364 call puts@plt li a5,38 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page37, .-page37 .section .rodata .align 3 .LC365: .string "\"I am Plato-B-PHI%d, head of mutant propaganda here at the training course.\n" .align 3 .LC366: .string "If you have any questions about mutants please come to me. Today I will be" .align 3 .LC367: .string "talking about mutant detection. Detecting mutants is very easy. One simply" .align 3 .LC368: .string "watches for certain tell tale signs, such as the green scaly skin, the third" .align 3 .LC369: .string "arm growing from the forehead, or other similar disfigurements so common with" .align 3 .LC370: .string "their kind. There are, however, a few rare specimens that show no outward sign" .align 3 .LC371: .string "of their treason. This has been a significant problem, so our researchers have" .align 3 .LC372: .string "been working on a solution. I would like a volunteer to test this device,\"" .align 3 .LC373: .string "he says, holding up a ray gun looking thing. \"It is a mutant detection ray." .align 3 .LC374: .string "This little button detects for mutants, and this big button stuns them once" .align 3 .LC375: .string "they are discovered. Who would like to volunteer for a test?\"" .align 3 .LC376: .string "The Troubleshooter down the front squirms deeper into his chair." .align 3 .LC377: .string "You duck behind a chair and hope the instructor doesn't notice you" .align 3 .LC378: .string "You volunteer for the test" .text .align 1 .globl page38 .type page38, @function page38: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a5,plato_clone lw a5,0(a5) mv a1,a5 lla a0,.LC365 call printf@plt lla a0,.LC366 call puts@plt lla a0,.LC367 call puts@plt lla a0,.LC368 call puts@plt lla a0,.LC369 call puts@plt lla a0,.LC370 call puts@plt lla a0,.LC371 call puts@plt lla a0,.LC372 call puts@plt lla a0,.LC373 call puts@plt lla a0,.LC374 call puts@plt lla a0,.LC375 call puts@plt lla a0,.LC376 call puts@plt lla a3,.LC377 li a2,40 lla a1,.LC378 li a0,39 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page38, .-page38 .section .rodata .align 3 .LC379: .string "You bravely volunteer to test the mutant detection gun. You stand up and walk" .align 3 .LC380: .string "down the steps to the podium, passing a very relieved Troubleshooter along the" .align 3 .LC381: .string "way. When you reach the podium Plato-B-PHI hands you the mutant detection gun" .align 3 .LC382: .string "and says, \"Here, aim the gun at that Troubleshooter and push the small button." .align 3 .LC383: .string "If you see a purple light, stun him.\" Grasping the opportunity to prove your" .align 3 .LC384: .string "worth to The Computer, you fire the mutant detection ray at the Troubleshooter." .align 3 .LC385: .string "A brilliant purple nimbus instantly surrounds his body. You slip your finger" .align 3 .LC386: .string "to the large stun button and he falls writhing to the floor." .align 3 .LC387: .string "\"Good shot,\" says the instructor as you hand him the mutant detection gun," .align 3 .LC388: .string "\"I'll see that you get a commendation for this. It seems you have the hang" .align 3 .LC389: .string "of mutant detection and elimination. You can go on to the secret society" .align 3 .LC390: .string "infiltration class. I'll see that the little mutie gets packaged for" .align 3 .LC391: .string "tomorrow's mutant dissection class.\"" .text .align 1 .globl page39 .type page39, @function page39: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC379 call puts@plt lla a0,.LC380 call puts@plt lla a0,.LC381 call puts@plt lla a0,.LC382 call puts@plt lla a0,.LC383 call puts@plt lla a0,.LC384 call puts@plt lla a0,.LC385 call puts@plt lla a0,.LC386 call puts@plt lla a0,.LC387 call puts@plt lla a0,.LC388 call puts@plt lla a0,.LC389 call puts@plt lla a0,.LC390 call puts@plt lla a0,.LC391 call puts@plt li a5,41 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page39, .-page39 .section .rodata .align 3 .LC392: .string "You breathe a sigh of relief as Plato-B-PHI picks on the other Troubleshooter." .align 3 .LC393: .string "\"You down here in the front,\" says the instructor pointing at the other" .align 3 .LC394: .string "Troubleshooter, \"you'll make a good volunteer. Please step forward.\"" .align 3 .LC395: .string "The Troubleshooter looks around with a `who me?' expression on his face, but" .align 3 .LC396: .string "since he is the only one visible in the audience he figures his number is up." .align 3 .LC397: .string "He walks down to the podium clutching his Action Troubleshooter(tm) doll before" .align 3 .LC398: .string "him like a weapon. \"Here,\" says Plato-B-PHI, \"take the mutant detection ray" .align 3 .LC399: .string "and point it at the audience. If there are any mutants out there we'll know" .align 3 .LC400: .string "soon enough.\" Suddenly your skin prickles with static electricity as a bright" .align 3 .LC401: .string "purple nimbus surrounds your body. \"Ha Ha, got one,\" says the instructor." .align 3 .LC402: .string "\"Stun him before he gets away.\"" .align 3 .LC403: .string "His shot hits you. You feel numb all over." .align 3 .LC404: .string "His shot just missed." .align 3 .LC405: .string "You just blew his head off. His lifeless hand drops the mutant detector ray." .align 3 .LC406: .string "You burnt a hole in the podium. He sights the mutant detector ray on you." .text .align 1 .globl page40 .type page40, @function page40: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC392 call puts@plt lla a0,.LC393 call puts@plt lla a0,.LC394 call puts@plt lla a0,.LC395 call puts@plt lla a0,.LC396 call puts@plt lla a0,.LC397 call puts@plt lla a0,.LC398 call puts@plt lla a0,.LC399 call puts@plt lla a0,.LC400 call puts@plt lla a0,.LC401 call puts@plt lla a0,.LC402 call puts@plt call more .L138: li a1,100 li a0,1 call dice_roll mv a5,a0 mv a4,a5 li a5,30 bgt a4,a5,.L135 lla a0,.LC403 call puts@plt li a5,49 j .L136 .L135: lla a0,.LC404 call puts@plt li a1,100 li a0,1 call dice_roll mv a5,a0 mv a4,a5 li a5,40 bgt a4,a5,.L137 lla a0,.LC405 call puts@plt li a5,50 j .L136 .L137: lla a0,.LC406 call puts@plt j .L138 .L136: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page40, .-page40 .section .rodata .align 3 .LC407: .string "You stumble down the hallway of the Troubleshooter Training Course looking for" .align 3 .LC408: .string "your next class. Up ahead you see one of the instructors waving to you. When" .align 3 .LC409: .string "you get there he shakes your hand and says, \"I am Jung-I-PSY. Welcome to the" .align 3 .LC410: .string "secret society infiltration seminar. I hope you ...\" You don't catch the" .align 3 .LC411: .string "rest of his greeting because you're paying too much attention to his handshake;" .align 3 .LC412: .string "it is the strangest thing that has ever been done to your hand, sort of how it" .align 3 .LC413: .string "would feel if you put a neuro whip in a high energy palm massage unit." .align 3 .LC414: .string "It doesn't take you long to learn what he is up to; you feel him briefly shake" .align 3 .LC415: .string "your hand with the secret Illuminati handshake." .align 3 .LC416: .string "You ignore this secret society contact" .align 3 .LC417: .string "You respond with the proper Illuminati code phrase, \"Ewige Blumenkraft\"" .text .align 1 .globl page41 .type page41, @function page41: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC407 call puts@plt lla a0,.LC408 call puts@plt lla a0,.LC409 call puts@plt lla a0,.LC410 call puts@plt lla a0,.LC411 call puts@plt lla a0,.LC412 call puts@plt lla a0,.LC413 call puts@plt lla a0,.LC414 call puts@plt lla a0,.LC415 call puts@plt lla a3,.LC416 li a2,43 lla a1,.LC417 li a0,42 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page41, .-page41 .section .rodata .align 3 .LC418: .string "\"Aha, so you are a member of the elitist Illuminati secret society,\" he says" .align 3 .LC419: .string "loudly, \"that is most interesting.\" He turns to the large class already" .align 3 .LC420: .string "seated in the auditorium and says, \"You see, class, by simply using the correct" .align 3 .LC421: .string "hand shake you can identify the member of any secret society. Please keep your" .align 3 .LC422: .string "weapons trained on him while I call a guard." .align 3 .LC423: .string "You wait for the guard" .align 3 .LC424: .string "You run for it" .text .align 1 .globl page42 .type page42, @function page42: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC418 call puts@plt lla a0,.LC419 call puts@plt lla a0,.LC420 call puts@plt lla a0,.LC421 call puts@plt lla a0,.LC422 call puts@plt lla a3,.LC423 li a2,52 lla a1,.LC424 li a0,51 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page42, .-page42 .section .rodata .align 3 .LC425: .string "You sit through a long lecture on how to recognise and infiltrate secret" .align 3 .LC426: .string "societies, with an emphasis on mimicking secret handshakes. The basic theory," .align 3 .LC427: .string "which you realise to be sound from your Iluminati training, is that with the" .align 3 .LC428: .string "proper handshake you can pass unnoticed in any secret society gathering." .align 3 .LC429: .string "What's more, the proper handshake will open doors faster than an 'ultra shock'" .align 3 .LC430: .string "plasma cannon. You are certain that with the information you learn here you" .align 3 .LC431: .string "will easily be promoted to the next level of your Illuminati secret society." .align 3 .LC432: .string "The lecture continues for three hours, during which you have the opportunity" .align 3 .LC433: .string "to practice many different handshakes. Afterwards everyone is directed to" .align 3 .LC434: .string "attend the graduation ceremony. Before you must go you have a little time to" .align 3 .LC435: .string "talk to The Computer about, you know, certain topics." .align 3 .LC436: .string "You go to the graduation ceremony immediately" .align 3 .LC437: .string "You go looking for a computer terminal" .text .align 1 .globl page43 .type page43, @function page43: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC425 call puts@plt lla a0,.LC426 call puts@plt lla a0,.LC427 call puts@plt lla a0,.LC428 call puts@plt lla a0,.LC429 call puts@plt lla a0,.LC430 call puts@plt lla a0,.LC431 call puts@plt lla a0,.LC432 call puts@plt lla a0,.LC433 call puts@plt lla a0,.LC434 call puts@plt lla a0,.LC435 call puts@plt lla a3,.LC436 li a2,55 lla a1,.LC437 li a0,44 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page43, .-page43 .section .rodata .align 3 .LC438: .string "You walk down to a semi-secluded part of the training course complex and" .align 3 .LC439: .string "activate a computer terminal. \"AT YOUR SERVICE\" reads the computer screen." .align 3 .LC440: .string "You change your mind and go to the graduation ceremony" .align 3 .LC441: .string "You register yourself as a mutant" .align 3 .LC442: .string " a - You register yourself as a mutant." .align 3 .LC443: .string " b - You want to chat about the commies." .align 3 .LC444: .string " c - You change your mind and go to the graduation ceremony." .text .align 1 .globl page44 .type page44, @function page44: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC438 call puts@plt lla a0,.LC439 call puts@plt lla a5,read_letter lw a5,0(a5) bne a5,zero,.L146 lla a3,.LC440 li a2,55 lla a1,.LC441 li a0,23 call choose mv a5,a0 j .L147 .L146: lla a0,.LC192 call puts@plt lla a0,.LC442 call puts@plt lla a0,.LC443 call puts@plt lla a0,.LC444 call puts@plt call get_char mv a5,a0 sext.w a4,a5 mv a3,a4 li a5,97 beq a3,a5,.L148 li a5,98 beq a4,a5,.L149 j .L151 .L148: li a5,23 j .L147 .L149: li a5,46 j .L147 .L151: li a5,55 .L147: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page44, .-page44 .section .rodata .align 3 .LC445: .string "\"Hrank Hrank,\" snorts the alarm in your living quarters. Something is up." .align 3 .LC446: .string "You look at the monitor above the bathroom mirror and see the message you have" .align 3 .LC447: .string "been waiting for all these years. \"ATTENTION TROUBLESHOOTER, YOU ARE BEING" .align 3 .LC448: .string "ACTIVATED. PLEASE REPORT IMMEDIATELY TO MISSION ASSIGNMENT ROOM A17/GAMMA/LB22." .align 3 .LC449: .string "THANK YOU. THE COMPUTER IS YOUR FRIEND.\" When you arrive at mission" .align 3 .LC450: .string "assignment room A17-gamma/LB22 you are given your previous clone's" .align 3 .LC451: .string "remaining possessions and notebook. You puzzle through your predecessor's" .align 3 .LC452: .string "cryptic notes, managing to decipher enough to lead you to the tube station and" .align 3 .LC453: .string "the tube car to GDH7-beta." .text .align 1 .globl page45 .type page45, @function page45: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC445 call puts@plt lla a0,.LC446 call puts@plt lla a0,.LC447 call puts@plt lla a0,.LC448 call puts@plt lla a0,.LC449 call puts@plt lla a0,.LC450 call puts@plt lla a0,.LC451 call puts@plt lla a0,.LC452 call puts@plt lla a0,.LC453 call puts@plt li a5,10 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page45, .-page45 .section .rodata .align 3 .LC454: .string "\"Why do you ask about the communists, Troubleshooter? It is not in the" .align 3 .LC455: .string "interest of your continued survival to be asking about such topics,\" says" .align 3 .LC456: .string "The Computer." .align 3 .LC457: .string "You change the subject" .align 3 .LC458: .string "You insist on talking about the communists" .text .align 1 .globl page46 .type page46, @function page46: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC454 call puts@plt lla a0,.LC455 call puts@plt lla a0,.LC456 call puts@plt lla a3,.LC457 li a2,54 lla a1,.LC458 li a0,53 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page46, .-page46 .section .rodata .align 3 .LC459: .string "The Computer orders the entire Vulture squadron to terminate the Troubleshooter" .align 3 .LC460: .string "Training Course. Unfortunately you too are terminated for possessing" .align 3 .LC461: .string "classified information.\n" .align 3 .LC462: .string "Don't act so innocent, we both know that you are an Illuminatus which is in" .align 3 .LC463: .string "itself an act of treason.\n" .align 3 .LC464: .string "Don't look to me for sympathy.\n" .align 3 .LC465: .string "\t\t\tTHE END" .text .align 1 .globl page47 .type page47, @function page47: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC459 call puts@plt lla a0,.LC460 call puts@plt lla a0,.LC461 call puts@plt lla a0,.LC462 call puts@plt lla a0,.LC463 call puts@plt lla a0,.LC464 call puts@plt lla a0,.LC465 call puts@plt li a5,0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page47, .-page47 .section .rodata .align 3 .LC466: .string "The tubecar shoots forward as you enter, slamming you back into a pile of" .align 3 .LC467: .string "garbage. The front end rotates upward and you, the garbage and the garbage" .align 3 .LC468: .string "disposal car shoot straight up out of Alpha Complex. One of the last things" .align 3 .LC469: .string "you see is a small blue sphere slowly dwindling behind you. After you fail to" .align 3 .LC470: .string "report in, you will be assumed dead." .text .align 1 .globl page48 .type page48, @function page48: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC466 call puts@plt lla a0,.LC467 call puts@plt lla a0,.LC468 call puts@plt lla a0,.LC469 call puts@plt lla a0,.LC470 call puts@plt li a0,45 call new_clone mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page48, .-page48 .section .rodata .align 3 .LC471: .string "The instructor drags your inert body into a specimen detainment cage." .align 3 .LC472: .string "\"He'll make a good subject for tomorrow's mutant dissection class,\" you hear." .text .align 1 .globl page49 .type page49, @function page49: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC471 call puts@plt lla a0,.LC472 call puts@plt li a0,32 call new_clone mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page49, .-page49 .section .rodata .align 3 .LC473: .string "You put down the other Troubleshooter, and then wisely decide to drill a few" .align 3 .LC474: .string "holes in the instructor as well; the only good witness is a dead witness." .align 3 .LC475: .string "You continue with the training course." .text .align 1 .globl page50 .type page50, @function page50: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC473 call puts@plt lla a0,.LC474 call puts@plt lla a0,.LC475 call puts@plt lla a5,plato_clone lw a5,0(a5) addiw a5,a5,1 sext.w a4,a5 lla a5,plato_clone sw a4,0(a5) li a5,41 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page50, .-page50 .section .rodata .align 3 .LC476: .string "You run for it, but you don't run far. Three hundred strange and exotic" .align 3 .LC477: .string "weapons turn you into a freeze dried cloud of soot." .text .align 1 .globl page51 .type page51, @function page51: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC476 call puts@plt lla a0,.LC477 call puts@plt li a0,32 call new_clone mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page51, .-page51 .section .rodata .align 3 .LC478: .string "You wisely wait until the instructor returns with a Blue Internal Security" .align 3 .LC479: .string "guard. The guard leads you to an Internal Security self incrimination station." .text .align 1 .globl page52 .type page52, @function page52: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC478 call puts@plt lla a0,.LC479 call puts@plt li a5,2 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page52, .-page52 .section .rodata .align 3 .LC480: .string "You tell The Computer about:" .align 3 .LC481: .string "Something less dangerous" .align 3 .LC482: .string "The commies who have infiltrated the Troubleshooter Training Course\n and the impending People's Revolution" .text .align 1 .globl page53 .type page53, @function page53: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC480 call puts@plt lla a3,.LC481 li a2,54 lla a1,.LC482 li a0,47 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page53, .-page53 .section .rodata .align 3 .LC483: .string "\"Do not try to change the subject, Troubleshooter,\" says The Computer." .align 3 .LC484: .string "\"It is a serious crime to ask about the communists. You will be terminated" .align 3 .LC485: .string "immediately. Thank you for your inquiry. The Computer is your friend.\"" .align 3 .LC486: .string "Steel bars drop to your left and right, trapping you here in the hallway." .align 3 .LC487: .string "A spotlight beams from the computer console to brilliantly iiluminate you while" .align 3 .LC488: .string "the speaker above your head rapidly repeats \"Traitor, Traitor, Traitor.\"" .align 3 .LC489: .string "It doesn't take long for a few guards to notice your predicament and come to" .align 3 .LC490: .string "finish you off." .text .align 1 .globl page54 .type page54, @function page54: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC483 call puts@plt lla a0,.LC484 call puts@plt lla a0,.LC485 call puts@plt lla a0,.LC486 call puts@plt lla a0,.LC487 call puts@plt lla a0,.LC488 call puts@plt lla a0,.LC489 call puts@plt lla a0,.LC490 call puts@plt lla a5,blast_door lw a5,0(a5) bne a5,zero,.L171 li a0,45 call new_clone mv a5,a0 j .L172 .L171: li a0,32 call new_clone mv a5,a0 .L172: mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page54, .-page54 .section .rodata .align 3 .LC491: .string "You and 300 other excited graduates are marched from the lecture hall and into" .align 3 .LC492: .string "a large auditorium for the graduation exercise. The auditorium is" .align 3 .LC493: .string "extravagantly decorated in the colours of the graduating class. Great red and" .align 3 .LC494: .string "green plasti-paper ribbons drape from the walls, while a huge sign reading" .align 3 .LC495: .string "\"Congratulations class of GDH7-beta-203.44/A\" hangs from the raised stage down" .align 3 .LC496: .string "front. Once everyone finds a seat the ceremony begins. Jung-I-PSY is the" .align 3 .LC497: .string "first to speak, \"Congratulations students, you have successfully survived the" .align 3 .LC498: .string "Troubleshooter Training Course. It always brings me great pride to address" .align 3 .LC499: .string "the graduating class, for I know, as I am sure you do too, that you are now" .align 3 .LC500: .string "qualified for the most perilous missions The Computer may select for you. The" .align 3 .LC501: .string "thanks is not owed to us of the teaching staff, but to all of you, who have" .align 3 .LC502: .string "persevered and graduated. Good luck and die trying.\" Then the instructor" .align 3 .LC503: .string "begins reading the names of the students who one by one walk to the front of" .align 3 .LC504: .string "the auditorium and receive their diplomas. Soon it is your turn," .align 3 .LC505: .string "\"Philo-R-DMD, graduating a master of mutant identification and secret society" .align 3 .LC506: .string "infiltration.\" You walk up and receive your diploma from Plato-B-PHI%d, then\n" .align 3 .LC507: .string "return to your seat. There is another speech after the diplomas are handed" .align 3 .LC508: .string "out, but it is cut short by by rapid fire laser bursts from the high spirited" .align 3 .LC509: .string "graduating class. You are free to return to your barracks to wait, trained" .align 3 .LC510: .string "and fully qualified, for your next mission. You also get that cherished" .align 3 .LC511: .string "promotion from the Illuminati secret society. In a week you receive a" .align 3 .LC512: .string "detailed Training Course bill totalling 1,523 credits." .text .align 1 .globl page55 .type page55, @function page55: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC491 call puts@plt lla a0,.LC492 call puts@plt lla a0,.LC493 call puts@plt lla a0,.LC494 call puts@plt lla a0,.LC495 call puts@plt lla a0,.LC496 call puts@plt lla a0,.LC497 call puts@plt lla a0,.LC498 call puts@plt lla a0,.LC499 call puts@plt lla a0,.LC500 call puts@plt lla a0,.LC501 call puts@plt lla a0,.LC502 call puts@plt lla a0,.LC503 call puts@plt lla a0,.LC504 call puts@plt lla a0,.LC505 call puts@plt lla a5,plato_clone lw a5,0(a5) mv a1,a5 lla a0,.LC506 call printf@plt lla a0,.LC507 call puts@plt lla a0,.LC508 call puts@plt lla a0,.LC509 call puts@plt lla a0,.LC510 call puts@plt lla a0,.LC511 call puts@plt lla a0,.LC512 call puts@plt lla a0,.LC465 call puts@plt li a5,0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page55, .-page55 .section .rodata .align 3 .LC513: .string "That familiar strange feeling of deja'vu envelops you again. It is hard to" .align 3 .LC514: .string "say, but whatever is on the other side of the door does not seem to be intended" .align 3 .LC515: .string "for you." .align 3 .LC516: .string "You go looking for more information" .align 3 .LC517: .string "You open the door and step through" .text .align 1 .globl page56 .type page56, @function page56: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC513 call puts@plt lla a0,.LC514 call puts@plt lla a0,.LC515 call puts@plt lla a3,.LC516 li a2,22 lla a1,.LC517 li a0,33 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page56, .-page56 .section .rodata .align 3 .LC518: .string "In the centre of the room is a table and a single chair. There is an Orange" .align 3 .LC519: .string "folder on the table top, but you can't make out the lettering on it." .align 3 .LC520: .string "You leave the room" .align 3 .LC521: .string "You sit down and read the folder" .text .align 1 .globl page57 .type page57, @function page57: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC518 call puts@plt lla a0,.LC519 call puts@plt lla a3,.LC520 li a2,12 lla a1,.LC521 li a0,11 call choose mv a5,a0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size page57, .-page57 .align 1 .globl next_page .type next_page, @function next_page: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 mv a5,a0 sw a5,-20(s0) li a0,10 call putchar@plt lw a5,-20(s0) sext.w a4,a5 li a5,57 bgtu a4,a5,.L242 lwu a5,-20(s0) slli a4,a5,2 lla a5,.L182 add a5,a4,a5 lw a5,0(a5) sext.w a4,a5 lla a5,.L182 add a5,a4,a5 jr a5 .section .rodata .align 2 .align 2 .L182: .word .L239-.L182 .word .L238-.L182 .word .L237-.L182 .word .L236-.L182 .word .L235-.L182 .word .L234-.L182 .word .L233-.L182 .word .L232-.L182 .word .L231-.L182 .word .L230-.L182 .word .L229-.L182 .word .L228-.L182 .word .L227-.L182 .word .L226-.L182 .word .L225-.L182 .word .L224-.L182 .word .L223-.L182 .word .L222-.L182 .word .L221-.L182 .word .L220-.L182 .word .L219-.L182 .word .L218-.L182 .word .L217-.L182 .word .L216-.L182 .word .L215-.L182 .word .L214-.L182 .word .L213-.L182 .word .L212-.L182 .word .L211-.L182 .word .L210-.L182 .word .L209-.L182 .word .L208-.L182 .word .L207-.L182 .word .L206-.L182 .word .L205-.L182 .word .L204-.L182 .word .L203-.L182 .word .L202-.L182 .word .L201-.L182 .word .L200-.L182 .word .L199-.L182 .word .L198-.L182 .word .L197-.L182 .word .L196-.L182 .word .L195-.L182 .word .L194-.L182 .word .L193-.L182 .word .L192-.L182 .word .L191-.L182 .word .L190-.L182 .word .L189-.L182 .word .L188-.L182 .word .L187-.L182 .word .L186-.L182 .word .L185-.L182 .word .L184-.L182 .word .L183-.L182 .word .L181-.L182 .text .L239: li a5,0 j .L179 .L238: call page1 mv a5,a0 j .L179 .L237: call page2 mv a5,a0 j .L179 .L236: call page3 mv a5,a0 j .L179 .L235: call page4 mv a5,a0 j .L179 .L234: call page5 mv a5,a0 j .L179 .L233: call page6 mv a5,a0 j .L179 .L232: call page7 mv a5,a0 j .L179 .L231: call page8 mv a5,a0 j .L179 .L230: call page9 mv a5,a0 j .L179 .L229: call page10 mv a5,a0 j .L179 .L228: call page11 mv a5,a0 j .L179 .L227: call page12 mv a5,a0 j .L179 .L226: call page13 mv a5,a0 j .L179 .L225: call page14 mv a5,a0 j .L179 .L224: call page15 mv a5,a0 j .L179 .L223: call page16 mv a5,a0 j .L179 .L222: call page17 mv a5,a0 j .L179 .L221: call page18 mv a5,a0 j .L179 .L220: call page19 mv a5,a0 j .L179 .L219: call page20 mv a5,a0 j .L179 .L218: call page21 mv a5,a0 j .L179 .L217: call page22 mv a5,a0 j .L179 .L216: call page23 mv a5,a0 j .L179 .L215: call page24 mv a5,a0 j .L179 .L214: call page25 mv a5,a0 j .L179 .L213: call page26 mv a5,a0 j .L179 .L212: call page27 mv a5,a0 j .L179 .L211: call page28 mv a5,a0 j .L179 .L210: call page29 mv a5,a0 j .L179 .L209: call page30 mv a5,a0 j .L179 .L208: call page31 mv a5,a0 j .L179 .L207: call page32 mv a5,a0 j .L179 .L206: call page33 mv a5,a0 j .L179 .L205: call page34 mv a5,a0 j .L179 .L204: call page35 mv a5,a0 j .L179 .L203: call page36 mv a5,a0 j .L179 .L202: call page37 mv a5,a0 j .L179 .L201: call page38 mv a5,a0 j .L179 .L200: call page39 mv a5,a0 j .L179 .L199: call page40 mv a5,a0 j .L179 .L198: call page41 mv a5,a0 j .L179 .L197: call page42 mv a5,a0 j .L179 .L196: call page43 mv a5,a0 j .L179 .L195: call page44 mv a5,a0 j .L179 .L194: call page45 mv a5,a0 j .L179 .L193: call page46 mv a5,a0 j .L179 .L192: call page47 mv a5,a0 j .L179 .L191: call page48 mv a5,a0 j .L179 .L190: call page49 mv a5,a0 j .L179 .L189: call page50 mv a5,a0 j .L179 .L188: call page51 mv a5,a0 j .L179 .L187: call page52 mv a5,a0 j .L179 .L186: call page53 mv a5,a0 j .L179 .L185: call page54 mv a5,a0 j .L179 .L184: call page55 mv a5,a0 j .L179 .L183: call page56 mv a5,a0 j .L179 .L181: call page57 mv a5,a0 j .L179 .L242: nop .L179: mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size next_page, .-next_page .align 1 .globl main .type main, @function main: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 call instructions call more call character call more j .L244 .L245: call more .L244: lla a5,page lw a5,0(a5) mv a0,a5 call next_page mv a5,a0 mv a4,a5 lla a5,page sw a4,0(a5) lla a5,page lw a5,0(a5) bne a5,zero,.L245 li a5,0 mv a0,a5 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "paranoia.c" .option pic .text .align 1 .globl get_char .type get_char, @function get_char: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) la a5,stdout ld a0,0(a5) call fflush@plt la a5,stdin ld a0,0(a5) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L2 la s1,stdin li s0,10 .L3: ld a0,0(s1) call getc@plt bne a0,s0,.L3 .L2: mv a0,s2 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .size get_char, .-get_char .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nClone %d just died.\n" .align 3 .LC1: .string "\n*** You Lose ***\n\nAll your clones are dead. Your name has been stricken from the records.\n\n\t\t\tTHE END" .align 3 .LC2: .string "Clone %d now activated.\n" .text .align 1 .globl new_clone .type new_clone, @function new_clone: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) mv s0,a0 lla s1,.LANCHOR0 lw a2,0(s1) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s1) addiw a5,a5,1 sext.w a2,a5 sw a5,0(s1) li a5,6 ble a2,a5,.L7 lla a0,.LC1 call puts@plt li a0,0 .L8: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .L7: lla a1,.LC2 li a0,1 call __printf_chk@plt lla a5,.LANCHOR1 sw zero,0(a5) sw zero,4(a5) li a4,10 sw a4,.LANCHOR0+4,a3 sw zero,8(a5) mv a0,s0 j .L8 .size new_clone, .-new_clone .align 1 .globl dice_roll .type dice_roll, @function dice_roll: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) ble a0,zero,.L13 mv s0,a0 mv s2,a1 li s1,0 .L12: call rand@plt remw a5,a0,s2 addiw a5,a5,1 addw s1,a5,s1 addiw s0,s0,-1 bne s0,zero,.L12 .L11: mv a0,s1 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L13: li s1,0 j .L11 .size dice_roll, .-dice_roll .section .rodata.str1.8 .align 3 .LC3: .string "\n\n\n\nWelcome to Paranoia!\n" .align 3 .LC4: .string "HOW TO PLAY:\n" .align 3 .LC5: .string " Just press <RETURN> until you are asked to make a choice." .align 3 .LC6: .string " Select 'a' or 'b' or whatever for your choice, then press <RETURN>." .align 3 .LC7: .string " You may select 'p' at any time to get a display of your statistics." .align 3 .LC8: .string " Always choose the least dangerous option. Continue doing this until you win." .align 3 .LC9: .string " At times you will use a skill or engage in combat and and will be informed of" .align 3 .LC10: .string " the outcome. These sections will be self explanatory.\n" .align 3 .LC11: .string "HOW TO DIE:\n" .align 3 .LC12: .string " As Philo-R-DMD you will die at times during the adventure." .align 3 .LC13: .string " When this happens you will be given an new clone at a particular location." .align 3 .LC14: .string " The new Philo-R will usually have to retrace some of the old Philo-R's path;" .align 3 .LC15: .string " hopefully he won't make the same mistake as his predecessor.\n" .align 3 .LC16: .string "HOW TO WIN:\n" .align 3 .LC17: .string " Simply complete the mission before you expend all six clones." .align 3 .LC18: .string " If you make it, congratulations." .align 3 .LC19: .string " If not, you can try again later." .text .align 1 .globl instructions .type instructions, @function instructions: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC3 call puts@plt lla a0,.LC4 call puts@plt lla a0,.LC5 call puts@plt lla a0,.LC6 call puts@plt lla a0,.LC7 call puts@plt lla a0,.LC8 call puts@plt lla a0,.LC9 call puts@plt lla a0,.LC10 call puts@plt lla a0,.LC11 call puts@plt lla a0,.LC12 call puts@plt lla a0,.LC13 call puts@plt lla a0,.LC14 call puts@plt lla a0,.LC15 call puts@plt lla a0,.LC16 call puts@plt lla a0,.LC17 call puts@plt lla a0,.LC18 call puts@plt lla a0,.LC19 call puts@plt ld ra,8(sp) addi sp,sp,16 jr ra .size instructions, .-instructions .section .rodata.str1.8 .align 3 .LC20: .string "===============================================================================" .align 3 .LC21: .string "The Character : Philo-R-DMD %d\n" .align 3 .LC22: .string "Primary Attributes Secondary Attributes" .align 3 .LC23: .string "Strength ..................... 13 Carrying Capacity ................. 30" .align 3 .LC24: .string "Endurance .................... 13 Damage Bonus ....................... 0" .align 3 .LC25: .string "Agility ...................... 15 Macho Bonus ....................... -1" .align 3 .LC26: .string "Manual Dexterity ............. 15 Melee Bonus ...................... +5%%\n" .align 3 .LC27: .string "Moxie ........................ 13 Aimed Weapon Bonus .............. +10%%\n" .align 3 .LC28: .string "Chutzpah ...................... 8 Comprehension Bonus .............. +4%%\n" .align 3 .LC29: .string "Mechanical Aptitude .......... 14 Believability Bonus .............. +5%%\n" .align 3 .LC30: .string "Power Index .................. 10 Repair Bonus ..................... +5%%\n" .align 3 .LC31: .string "Credits: 160 Secret Society: Illuminati Secret Society Rank: 1" .align 3 .LC32: .string "Service Group: Power Services Mutant Power: Precognition" .align 3 .LC33: .string "Weapon: laser pistol; to hit, 40%%; type, L; Range, 50m; Reload, 6r; Malfnt, 00\n" .align 3 .LC34: .string "Skills: Basics 1(20%%), Aimed Weapon Combat 2(35%%), Laser 3(40%%),\n Personal Development 1(20%%), Communications 2(29%%), Intimidation 3(34%%)\n" .align 3 .LC35: .string "Equipment: Red Reflec Armour, Laser Pistol, Laser Barrel (red)," .align 3 .LC36: .string " Notebook & Stylus, Knife, Com Unit 1, Jump suit," .align 3 .LC37: .string " Secret Illuminati Eye-In-The-Pyramid(tm) Decoder ring," .align 3 .LC38: .string " Utility Belt & Pouches" .text .align 1 .globl character .type character, @function character: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC20 call puts@plt lw a2,.LANCHOR0 lla a1,.LC21 li a0,1 call __printf_chk@plt lla a0,.LC22 call puts@plt lla a0,.LC20 call puts@plt lla a0,.LC23 call puts@plt lla a0,.LC24 call puts@plt lla a0,.LC25 call puts@plt lla a1,.LC26 li a0,1 call __printf_chk@plt lla a1,.LC27 li a0,1 call __printf_chk@plt lla a1,.LC28 li a0,1 call __printf_chk@plt lla a1,.LC29 li a0,1 call __printf_chk@plt lla a1,.LC30 li a0,1 call __printf_chk@plt lla a0,.LC20 call puts@plt lla a0,.LC31 call puts@plt lla a0,.LC32 call puts@plt lla a1,.LC33 li a0,1 call __printf_chk@plt lla a1,.LC34 li a0,1 call __printf_chk@plt lla a0,.LC35 call puts@plt lla a0,.LC36 call puts@plt lla a0,.LC37 call puts@plt lla a0,.LC38 call puts@plt lla a0,.LC20 call puts@plt ld ra,8(sp) addi sp,sp,16 jr ra .size character, .-character .section .rodata.str1.8 .align 3 .LC39: .string "---------- More ----------" .text .align 1 .globl more .type more, @function more: addi sp,sp,-16 sd ra,8(sp) lla a1,.LC39 li a0,1 call __printf_chk@plt call get_char li a5,112 beq a0,a5,.L23 .L21: ld ra,8(sp) addi sp,sp,16 jr ra .L23: call character lla a1,.LC39 li a0,1 call __printf_chk@plt call get_char j .L21 .size more, .-more .section .rodata.str1.8 .align 3 .LC40: .string "\nSelect 'a' or 'b' :" .align 3 .LC41: .string " a - %s.\n b - %s.\n" .text .align 1 .globl choose .type choose, @function choose: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) mv s3,a0 mv s1,a1 mv s0,a2 mv s2,a3 lla a0,.LC40 call puts@plt mv a3,s2 mv a2,s1 lla a1,.LC41 li a0,1 call __printf_chk@plt call get_char li a5,97 beq a0,a5,.L26 mv a0,s0 .L25: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L26: mv a0,s3 j .L25 .size choose, .-choose .section .rodata.str1.8 .align 3 .LC42: .string " You wake up face down on the red and pink checked E-Z-Kleen linoleum floor." .align 3 .LC43: .string " You recognise the pattern, it's the type preferred in the internal security\nbriefing cells. When you finally look around you, you see that you are alone" .align 3 .LC44: .string "in a large mission briefing room." .text .align 1 .globl page1 .type page1, @function page1: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC42 call puts@plt lla a0,.LC43 call puts@plt lla a0,.LC44 call puts@plt li a0,57 ld ra,8(sp) addi sp,sp,16 jr ra .size page1, .-page1 .section .rodata.str1.8 .align 3 .LC45: .string "\"Greetings,\" says the kindly Internal Security self incrimination expert who" .align 3 .LC46: .string "meets you at the door, \"How are we doing today?\" He offers you a doughnut" .align 3 .LC47: .string "and coffee and asks what brings you here. This doesn't seem so bad, so you" .align 3 .LC48: .string "tell him that you have come to confess some possible security lapses. He" .align 3 .LC49: .string "smiles knowingly, deftly catching your coffee as you slump to the floor." .align 3 .LC50: .string "\"Nothing to be alarmed about; it's just the truth serum,\" he says," .align 3 .LC51: .string "dragging you back into a discussion room." .align 3 .LC52: .string "The next five hours are a dim haze, but you can recall snatches of conversation" .align 3 .LC53: .string "about your secret society, your mutant power, and your somewhat paranoid" .align 3 .LC54: .string "distrust of The Computer. This should explain why you are hogtied and moving" .align 3 .LC55: .string "slowly down the conveyer belt towards the meat processing unit in Food" .align 3 .LC56: .string "Services." .text .align 1 .globl page2 .type page2, @function page2: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC45 call puts@plt lla a0,.LC46 call puts@plt lla a0,.LC47 call puts@plt lla a0,.LC48 call puts@plt lla a0,.LC49 call puts@plt lla a0,.LC50 call puts@plt lla a0,.LC51 call puts@plt lla a0,.LC52 call puts@plt lla a0,.LC53 call puts@plt lla a0,.LC54 call puts@plt lla a0,.LC55 call puts@plt lla a0,.LC56 call puts@plt lw a4,.LANCHOR1+12 li a5,1 beq a4,a5,.L34 li a0,32 call new_clone .L32: ld ra,8(sp) addi sp,sp,16 jr ra .L34: li a0,45 call new_clone j .L32 .size page2, .-page2 .section .rodata.str1.8 .align 3 .LC57: .string "You walk to the nearest Computer terminal and request more information about" .align 3 .LC58: .string "Christmas. The Computer says, \"That is an A-1 ULTRAVIOLET ONLY IMMEDIATE" .align 3 .LC59: .string "TERMINATION classified topic. What is your clearance please, Troubleshooter?\"" .align 3 .LC60: .string "You lie and claim Ultraviolet clearance" .align 3 .LC61: .string "You give your correct clearance" .text .align 1 .globl page3 .type page3, @function page3: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC57 call puts@plt lla a0,.LC58 call puts@plt lla a0,.LC59 call puts@plt lla a3,.LC60 li a2,5 lla a1,.LC61 li a0,4 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page3, .-page3 .section .rodata.str1.8 .align 3 .LC62: .string "\"That is classified information, Troubleshooter, thank you for your inquiry." .align 3 .LC63: .string " Please report to an Internal Security self incrimination station as soon as" .align 3 .LC64: .string " possible.\"" .text .align 1 .globl page4 .type page4, @function page4: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC62 call puts@plt lla a0,.LC63 call puts@plt lla a0,.LC64 call puts@plt li a0,9 ld ra,8(sp) addi sp,sp,16 jr ra .size page4, .-page4 .section .rodata.str1.8 .align 3 .LC65: .string "The computer says, \"Troubleshooter, you are not wearing the correct colour" .align 3 .LC66: .string "uniform. You must put on an Ultraviolet uniform immediately. I have seen to" .align 3 .LC67: .string "your needs and ordered one already; it will be here shortly. Please wait with" .align 3 .LC68: .string "your back to the wall until it arrives.\" In less than a minute an infrared" .align 3 .LC69: .string "arrives carrying a white bundle. He asks you to sign for it, then hands it to" .align 3 .LC70: .string "you and stands back, well outside of a fragmentation grenade's blast radius." .align 3 .LC71: .string "You finally come to your senses and run for it" .align 3 .LC72: .string "You open the package and put on the uniform" .text .align 1 .globl page5 .type page5, @function page5: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC65 call puts@plt lla a0,.LC66 call puts@plt lla a0,.LC67 call puts@plt lla a0,.LC68 call puts@plt lla a0,.LC69 call puts@plt lla a0,.LC70 call puts@plt lla a3,.LC71 li a2,7 lla a1,.LC72 li a0,6 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page5, .-page5 .section .rodata.str1.8 .align 3 .LC73: .string "The uniform definitely makes you look snappy and pert. It really looks" .align 3 .LC74: .string "impressive, and even has the new lopsided lapel fashion that you admire so" .align 3 .LC75: .string "much. What's more, citizens of all ranks come to obsequious attention as you" .align 3 .LC76: .string "walk past. This isn't so bad being an Ultraviolet. You could probably come" .align 3 .LC77: .string "to like it, given time." .align 3 .LC78: .string "The beeping computer terminal interrupts your musings." .text .align 1 .globl page6 .type page6, @function page6: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC73 call puts@plt lla a0,.LC74 call puts@plt lla a0,.LC75 call puts@plt lla a0,.LC76 call puts@plt lla a0,.LC77 call puts@plt lla a0,.LC78 call puts@plt li a5,1 sw a5,.LANCHOR1,a4 li a0,8 ld ra,8(sp) addi sp,sp,16 jr ra .size page6, .-page6 .section .rodata.str1.8 .align 3 .LC79: .string "The corridor lights dim and are replaced by red battle lamps as the Security" .align 3 .LC80: .string "Breach alarms howl all around you. You run headlong down the corridor and" .align 3 .LC81: .string "desperately windmill around a corner, only to collide with a squad of 12 Blue" .align 3 .LC82: .string "clearance Vulture squadron soldiers. \"Stop, Slime Face,\" shouts the" .align 3 .LC83: .string "commander, \"or there won't be enough of you left for a tissue sample.\"" .align 3 .LC84: .string "\"All right, soldiers, stuff the greasy traitor into the uniform,\" he orders," .align 3 .LC85: .string "waving the business end of his blue laser scant inches from your nose." .align 3 .LC86: .string "With his other hand he shakes open a white bundle to reveal a pristine new" .align 3 .LC87: .string "Ultraviolet citizen's uniform." .align 3 .LC88: .string "One of the Vulture squadron Troubleshooters grabs you by the neck in the" .align 3 .LC89: .string "exotic and very painful Vulture Clamp(tm) death grip (you saw a special about" .align 3 .LC90: .string "it on the Teela O'Malley show), while the rest tear off your clothes and" .align 3 .LC91: .string "force you into the Ultraviolet uniform. The moment you are dressed they step" .align 3 .LC92: .string "clear and stand at attention." .align 3 .LC93: .string "\"Thank you for your cooperation, sir,\" says the steely eyed leader of the" .align 3 .LC94: .string "Vulture Squad. \"We will be going about our business now.\" With perfect" .align 3 .LC95: .string "timing the Vultures wheel smartly and goosestep down the corridor." .align 3 .LC96: .string "Special Note: don't make the mistake of assuming that your skills have" .align 3 .LC97: .string "improved any because of the uniform; you're only a Red Troubleshooter" .align 3 .LC98: .string "traitorously posing as an Ultraviolet, and don't you forget it!" .align 3 .LC99: .string "Suddenly, a computer terminal comes to life beside you." .text .align 1 .globl page7 .type page7, @function page7: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC79 call puts@plt lla a0,.LC80 call puts@plt lla a0,.LC81 call puts@plt lla a0,.LC82 call puts@plt lla a0,.LC83 call puts@plt lla a0,.LC84 call puts@plt lla a0,.LC85 call puts@plt lla a0,.LC86 call puts@plt lla a0,.LC87 call puts@plt lla a0,.LC88 call puts@plt lla a0,.LC89 call puts@plt lla a0,.LC90 call puts@plt lla a0,.LC91 call puts@plt lla a0,.LC92 call puts@plt lla a0,.LC93 call puts@plt lla a0,.LC94 call puts@plt lla a0,.LC95 call puts@plt lla a0,.LC96 call puts@plt lla a0,.LC97 call puts@plt lla a0,.LC98 call puts@plt lla a0,.LC99 call puts@plt li a5,1 sw a5,.LANCHOR1,a4 li a0,8 ld ra,8(sp) addi sp,sp,16 jr ra .size page7, .-page7 .section .rodata.str1.8 .align 3 .LC100: .string "\"Now, about your question, citizen. Christmas was an old world marketing ploy" .align 3 .LC101: .string "to induce lower clearance citizens to purchase vast quantities of goods, thus" .align 3 .LC102: .string "accumulation a large amount of credit under the control of a single class of" .align 3 .LC103: .string "citizen known as Retailers. The strategy used is to imply that all good" .align 3 .LC104: .string "citizens give gifts during Christmas, thus if one wishes to be a valuable" .align 3 .LC105: .string "member of society one must also give gifts during Christmas. More valuable" .align 3 .LC106: .string "gifts make one a more valuable member, and thus did the Retailers come to" .align 3 .LC107: .string "control a disproportionate amount of the currency. In this way Christmas" .align 3 .LC108: .string "eventually caused the collapse of the old world. Understandably, Christmas" .align 3 .LC109: .string "has been declared a treasonable practice in Alpha Complex." .align 3 .LC110: .string "Thank you for your inquiry.\"" .align 3 .LC111: .string "You continue on your way to GDH7-beta." .text .align 1 .globl page8 .type page8, @function page8: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC100 call puts@plt lla a0,.LC101 call puts@plt lla a0,.LC102 call puts@plt lla a0,.LC103 call puts@plt lla a0,.LC104 call puts@plt lla a0,.LC105 call puts@plt lla a0,.LC106 call puts@plt lla a0,.LC107 call puts@plt lla a0,.LC108 call puts@plt lla a0,.LC109 call puts@plt lla a0,.LC110 call puts@plt lla a0,.LC111 call puts@plt li a0,10 ld ra,8(sp) addi sp,sp,16 jr ra .size page8, .-page8 .section .rodata.str1.8 .align 3 .LC112: .string "As you walk toward the tubecar that will take you to GDH7-beta, you pass one" .align 3 .LC113: .string "of the bright blue and orange Internal Security self incrimination stations." .align 3 .LC114: .string "Inside, you can see an IS agent cheerfully greet an infrared citizen and then" .align 3 .LC115: .string "lead him at gunpoint into one of the rubber lined discussion rooms." .align 3 .LC116: .string "You just continue blithely on past" .align 3 .LC117: .string "You decide to stop here and chat, as ordered by The Computer" .text .align 1 .globl page9 .type page9, @function page9: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC112 call puts@plt lla a0,.LC113 call puts@plt lla a0,.LC114 call puts@plt lla a0,.LC115 call puts@plt lla a3,.LC116 li a2,10 lla a1,.LC117 li a0,2 call choose addi a5,a0,-2 seqz a5,a5 sw a5,.LANCHOR1+12,a4 ld ra,8(sp) addi sp,sp,16 jr ra .size page9, .-page9 .section .rodata.str1.8 .align 3 .LC118: .string "You stroll briskly down the corridor, up a ladder, across an unrailed catwalk," .align 3 .LC119: .string "under a perilously swinging blast door in urgent need of repair, and into" .align 3 .LC120: .string "tubecar grand central. This is the bustling hub of Alpha Complex tubecar" .align 3 .LC121: .string "transportation. Before you spreads a spaghetti maze of magnalift tube tracks" .align 3 .LC122: .string "and linear accelerators. You bravely study the specially enhanced 3-D tube" .align 3 .LC123: .string "route map; you wouldn't be the first Troubleshooter to take a fast tube ride" .align 3 .LC124: .string "to nowhere." .align 3 .LC125: .string "You think you have the route worked out, so you'll board a tube train" .align 3 .LC126: .string "You decide to ask The Computer about Christmas using a nearby terminal" .align 3 .LC127: .string "You nervously select a tubecar and step aboard." .align 3 .LC128: .string "You just caught a purple line tubecar." .align 3 .LC129: .string "You just caught a brown line tubecar." .text .align 1 .globl page10 .type page10, @function page10: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC118 call puts@plt lla a0,.LC119 call puts@plt lla a0,.LC120 call puts@plt lla a0,.LC121 call puts@plt lla a0,.LC122 call puts@plt lla a0,.LC123 call puts@plt lla a0,.LC124 call puts@plt lw a5,.LANCHOR1 bne a5,zero,.L50 lla a3,.LC125 li a2,10 lla a1,.LC126 li a0,3 call choose li a5,3 beq a0,a5,.L51 .L50: lla a0,.LC127 call puts@plt li a1,10 li a0,2 call dice_roll li a5,12 bgt a0,a5,.L52 lla a0,.LC128 call puts@plt li a0,13 .L51: ld ra,8(sp) addi sp,sp,16 jr ra .L52: lla a0,.LC129 call puts@plt li a0,48 j .L51 .size page10, .-page10 .section .rodata.str1.8 .align 3 .LC130: .string "The printing on the folder says \"Experimental Self Briefing.\"" .align 3 .LC131: .string "You open it and begin to read the following:" .align 3 .LC132: .string "Step 1: Compel the briefing subject to attend the briefing." .align 3 .LC133: .string " Note: See Experimental Briefing Sub Form Indigo-WY-2," .align 3 .LC134: .string " 'Experimental Self Briefing Subject Acquisition Through The Use Of" .align 3 .LC135: .string " Neurotoxin Room Foggers.'" .align 3 .LC136: .string "Step 2: Inform the briefing subject that the briefing has begun." .align 3 .LC137: .string " ATTENTION: THE BRIEFING HAS BEGUN." .align 3 .LC138: .string "Step 3: Present the briefing material to the briefing subject." .align 3 .LC139: .string " GREETINGS TROUBLESHOOTER." .align 3 .LC140: .string " YOU HAVE BEEN SPECIALLY SELECTED TO SINGLEHANDEDLY" .align 3 .LC141: .string " WIPE OUT A DEN OF TRAITOROUS CHRISTMAS ACTIVITY. YOUR MISSION IS TO" .align 3 .LC142: .string " GO TO GOODS DISTRIBUTION HALL 7-BETA AND ASSESS ANY CHRISTMAS ACTIVITY" .align 3 .LC143: .string " YOU FIND THERE. YOU ARE TO INFILTRATE THESE CHRISTMAS CELEBRANTS," .align 3 .LC144: .string " LOCATE THEIR RINGLEADER, AN UNKNOWN MASTER RETAILER, AND BRING HIM" .align 3 .LC145: .string " BACK FOR EXECUTION AND TRIAL. THANK YOU. THE COMPUTER IS YOUR FRIEND." .align 3 .LC146: .string "Step 4: Sign the briefing subject's briefing release form to indicate that" .align 3 .LC147: .string " the briefing subject has completed the briefing." .align 3 .LC148: .string " ATTENTION: PLEASE SIGN YOUR BRIEFING RELEASE FORM." .align 3 .LC149: .string "Step 5: Terminate the briefing" .align 3 .LC150: .string " ATTENTION: THE BRIEFING IS TERMINATED." .align 3 .LC151: .string "You walk to the door and hold your signed briefing release form up to the" .align 3 .LC152: .string "plexiglass window. A guard scrutinises it for a moment and then slides back" .align 3 .LC153: .string "the megabolts holding the door shut. You are now free to continue the" .align 3 .LC154: .string "mission." .align 3 .LC155: .string "You have decided to go directly to Goods Distribution Hall 7-beta" .align 3 .LC156: .string "You wish to ask The Computer for more information about Christmas" .text .align 1 .globl page11 .type page11, @function page11: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC130 call puts@plt lla a0,.LC131 call puts@plt lla a0,.LC132 call puts@plt lla a0,.LC133 call puts@plt lla a0,.LC134 call puts@plt lla a0,.LC135 call puts@plt lla a0,.LC136 call puts@plt lla a0,.LC137 call puts@plt lla a0,.LC138 call puts@plt lla a0,.LC139 call puts@plt lla a0,.LC140 call puts@plt lla a0,.LC141 call puts@plt lla a0,.LC142 call puts@plt lla a0,.LC143 call puts@plt lla a0,.LC144 call puts@plt lla a0,.LC145 call puts@plt lla a0,.LC146 call puts@plt lla a0,.LC147 call puts@plt lla a0,.LC148 call puts@plt lla a0,.LC149 call puts@plt lla a0,.LC150 call puts@plt call more lla a0,.LC151 call puts@plt lla a0,.LC152 call puts@plt lla a0,.LC153 call puts@plt lla a0,.LC154 call puts@plt lla a3,.LC155 li a2,10 lla a1,.LC156 li a0,3 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page11, .-page11 .section .rodata.str1.8 .align 3 .LC157: .string "You walk up to the door and push the button labelled \"push to exit.\"" .align 3 .LC158: .string "Within seconds a surly looking guard shoves his face into the small plexiglass" .align 3 .LC159: .string "window. You can see his mouth forming words but you can't hear any of them." .align 3 .LC160: .string "You just stare at him blankly for a few moments until he points down to a" .align 3 .LC161: .string "speaker on your side of the door. When you put your ear to it you can barely" .align 3 .LC162: .string "hear him say, \"Let's see your briefing release form, bud. You aren't" .align 3 .LC163: .string "getting out of here without it.\"" .align 3 .LC164: .string "You stare around the room some more" .align 3 .LC165: .string "You sit down at the table and read the Orange packet" .text .align 1 .globl page12 .type page12, @function page12: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC157 call puts@plt lla a0,.LC158 call puts@plt lla a0,.LC159 call puts@plt lla a0,.LC160 call puts@plt lla a0,.LC161 call puts@plt lla a0,.LC162 call puts@plt lla a0,.LC163 call puts@plt lla a3,.LC164 li a2,57 lla a1,.LC165 li a0,11 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page12, .-page12 .section .rodata.str1.8 .align 3 .LC166: .string "You step into the shiny plasteel tubecar, wondering why the shape has always" .align 3 .LC167: .string "reminded you of bullets. The car shoots forward the instant your feet touch" .align 3 .LC168: .string "the slippery gray floor, pinning you immobile against the back wall as the" .align 3 .LC169: .string "tubecar careens toward GDH7-beta. Your only solace is the knowledge that it" .align 3 .LC170: .string "could be worse, much worse." .align 3 .LC171: .string "Before too long the car comes to a stop. You can see signs for GDH7-beta" .align 3 .LC172: .string "through the window. With a little practice you discover that you can crawl" .align 3 .LC173: .string "to the door and pull open the latch." .text .align 1 .globl page13 .type page13, @function page13: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC166 call puts@plt lla a0,.LC167 call puts@plt lla a0,.LC168 call puts@plt lla a0,.LC169 call puts@plt lla a0,.LC170 call puts@plt lla a0,.LC171 call puts@plt lla a0,.LC172 call puts@plt lla a0,.LC173 call puts@plt li a0,14 ld ra,8(sp) addi sp,sp,16 jr ra .size page13, .-page13 .section .rodata.str1.8 .align 3 .LC174: .string "You manage to pull yourself out of the tubecar and look around. Before you is" .align 3 .LC175: .string "one of the most confusing things you have ever seen, a hallway that is" .align 3 .LC176: .string "simultaneously both red and green clearance. If this is the result of" .align 3 .LC177: .string "Christmas then it's easy to see the evils inherent in its practice." .align 3 .LC178: .string "You are in the heart of a large goods distribution centre. You can see all" .align 3 .LC179: .string "about you evidence of traitorous secret society Christmas celebration; rubber" .align 3 .LC180: .string "faced robots whiz back and forth selling toys to holiday shoppers, simul-plast" .align 3 .LC181: .string "wreaths hang from every light fixture, while ahead in the shadows is a citizen" .align 3 .LC182: .string "wearing a huge red synthetic flower." .text .align 1 .globl page14 .type page14, @function page14: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC174 call puts@plt lla a0,.LC175 call puts@plt lla a0,.LC176 call puts@plt lla a0,.LC177 call puts@plt lla a0,.LC178 call puts@plt lla a0,.LC179 call puts@plt lla a0,.LC180 call puts@plt lla a0,.LC181 call puts@plt lla a0,.LC182 call puts@plt li a0,22 ld ra,8(sp) addi sp,sp,16 jr ra .size page14, .-page14 .section .rodata.str1.8 .align 3 .LC183: .string "You are set upon by a runty robot with a queer looking face and two pointy" .align 3 .LC184: .string "rubber ears poking from beneath a tattered cap. \"Hey mister,\" it says," .align 3 .LC185: .string "\"you done all your last minute Christmas shopping? I got some real neat junk" .align 3 .LC186: .string "here. You don't wanna miss the big day tommorrow, if you know what I mean.\"" .align 3 .LC187: .string "The robot opens its bag to show you a pile of shoddy Troubleshooter dolls. It" .align 3 .LC188: .string "reaches in and pulls out one of them. \"Look, these Action Troubleshooter(tm)" .align 3 .LC189: .string "dolls are the neatest thing. This one's got moveable arms and when you" .align 3 .LC190: .string "squeeze him, his little rifle squirts realistic looking napalm. It's only" .align 3 .LC191: .string "50 credits. Oh yeah, Merry Christmas.\"" .align 3 .LC192: .string "\nSelect 'a', 'b' or 'c' :" .align 3 .LC193: .string " a - You decide to buy the doll." .align 3 .LC194: .string " b - You shoot the robot." .align 3 .LC195: .string " c - You ignore the robot and keep searching the hall." .text .align 1 .globl page15 .type page15, @function page15: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC183 call puts@plt lla a0,.LC184 call puts@plt lla a0,.LC185 call puts@plt lla a0,.LC186 call puts@plt lla a0,.LC187 call puts@plt lla a0,.LC188 call puts@plt lla a0,.LC189 call puts@plt lla a0,.LC190 call puts@plt lla a0,.LC191 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC193 call puts@plt lla a0,.LC194 call puts@plt lla a0,.LC195 call puts@plt call get_char mv a5,a0 li a4,97 li a0,16 beq a5,a4,.L63 li a4,98 li a0,22 bne a5,a4,.L63 li a0,17 .L63: ld ra,8(sp) addi sp,sp,16 jr ra .size page15, .-page15 .section .rodata.str1.8 .align 3 .LC196: .string "The doll is a good buy for fifty credits; it will make a fine Christmas present" .align 3 .LC197: .string "for one of your friends. After the sale the robot rolls away. You can use" .align 3 .LC198: .string "the doll later in combat. It works just like a cone rifle firing napalm," .align 3 .LC199: .string "except that occasionally it will explode and blow the user to smithereens." .align 3 .LC200: .string "But don't let that stop you." .text .align 1 .globl page16 .type page16, @function page16: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC196 call puts@plt lla a0,.LC197 call puts@plt lla a0,.LC198 call puts@plt lla a0,.LC199 call puts@plt lla a0,.LC200 call puts@plt li a5,1 sw a5,.LANCHOR1+4,a4 li a0,22 ld ra,8(sp) addi sp,sp,16 jr ra .size page16, .-page16 .section .rodata.str1.8 .align 3 .LC201: .string "You whip out your laser and shoot the robot, but not before it squeezes the" .align 3 .LC202: .string "toy at you. The squeeze toy has the same effect as a cone rifle firing napalm," .align 3 .LC203: .string "and the elfbot's armour has no effect against your laser." .align 3 .LC204: .string "You have been hit!" .align 3 .LC205: .string "It missed you, but not by much!" .align 3 .LC206: .string "You zapped the little bastard!" .align 3 .LC207: .string "You wasted it! Good shooting!" .align 3 .LC208: .string "You will need more evidence, so you search GDH7-beta further" .align 3 .LC209: .string "after the GDH medbot has patched you up." .align 3 .LC210: .string "Damn! You missed!" .align 3 .LC211: .string "It tried to fire again, but the toy exploded and demolished it." .text .align 1 .globl page17 .type page17, @function page17: addi sp,sp,-80 sd ra,72(sp) sd s0,64(sp) sd s1,56(sp) sd s2,48(sp) sd s3,40(sp) sd s4,32(sp) sd s5,24(sp) sd s6,16(sp) sd s7,8(sp) sd s8,0(sp) lla a0,.LC201 call puts@plt lla a0,.LC202 call puts@plt lla a0,.LC203 call puts@plt li s0,2 li s1,15 li s3,25 lla s6,.LC205 lla s5,.LC204 lla s2,.LANCHOR0 li s4,40 lla s8,.LC210 lla s7,.LC206 j .L76 .L70: mv a0,s6 call puts@plt .L71: li a1,100 li a0,1 call dice_roll bgt a0,s4,.L73 mv a0,s7 call puts@plt li a1,10 li a0,2 call dice_roll subw s1,s1,a0 bgt s1,zero,.L74 lla a0,.LC207 call puts@plt lla a0,.LC208 call puts@plt lw a4,.LANCHOR0+4 li a5,9 ble a4,a5,.L80 .L75: li a5,10 sw a5,.LANCHOR0+4,a4 li a0,22 j .L72 .L80: lla a0,.LC209 call puts@plt j .L75 .L73: mv a0,s8 call puts@plt .L74: addiw s0,s0,-1 beq s0,zero,.L81 .L76: li a1,100 li a0,1 call dice_roll bgt a0,s3,.L70 mv a0,s5 call puts@plt li a1,10 li a0,1 call dice_roll lw a5,4(s2) subw a0,a5,a0 sext.w a5,a0 sw a0,4(s2) bgt a5,zero,.L71 li a0,45 call new_clone j .L72 .L81: lla a0,.LC211 call puts@plt lla a0,.LC208 call puts@plt lw a4,.LANCHOR0+4 li a5,9 ble a4,a5,.L82 .L77: li a5,10 sw a5,.LANCHOR0+4,a4 li a0,22 .L72: ld ra,72(sp) ld s0,64(sp) ld s1,56(sp) ld s2,48(sp) ld s3,40(sp) ld s4,32(sp) ld s5,24(sp) ld s6,16(sp) ld s7,8(sp) ld s8,0(sp) addi sp,sp,80 jr ra .L82: lla a0,.LC209 call puts@plt j .L77 .size page17, .-page17 .section .rodata.str1.8 .align 3 .LC212: .string "You walk to the centre of the hall, ogling like an infrared fresh from the" .align 3 .LC213: .string "clone vats. Towering before you is the most unearthly thing you have ever" .align 3 .LC214: .string "seen, a green multi armed mutant horror hulking 15 feet above your head." .align 3 .LC215: .string "Its skeletal body is draped with hundreds of metallic strips (probably to" .align 3 .LC216: .string "negate the effects of some insidious mutant power), and the entire hideous" .align 3 .LC217: .string "creature is wrapped in a thousand blinking hazard lights. It's times like" .align 3 .LC218: .string "this when you wish you'd had some training for this job. Luckily the" .align 3 .LC219: .string "creature doesn't take notice of you but stands unmoving, as though waiting for" .align 3 .LC220: .string "a summons from its dark lord, the Master Retailer." .align 3 .LC221: .string "WHAM, suddenly you are struck from behind." .text .align 1 .globl page18 .type page18, @function page18: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC212 call puts@plt lla a0,.LC213 call puts@plt lla a0,.LC214 call puts@plt lla a0,.LC215 call puts@plt lla a0,.LC216 call puts@plt lla a0,.LC217 call puts@plt lla a0,.LC218 call puts@plt lla a0,.LC219 call puts@plt lla a0,.LC220 call puts@plt lla a0,.LC221 call puts@plt li a1,10 li a0,2 call dice_roll li a5,14 sgt a0,a0,a5 addi a0,a0,19 ld ra,8(sp) addi sp,sp,16 jr ra .size page18, .-page18 .section .rodata.str1.8 .align 3 .LC222: .string "Quickly you regain your balance, whirl and fire your laser into the Ultraviolet" .align 3 .LC223: .string "citizen behind you. For a moment your heart leaps to your throat, then you" .align 3 .LC224: .string "realise that he is indeed dead and you will be the only one filing a report on" .align 3 .LC225: .string "this incident. Besides, he was participating in this traitorous Christmas" .align 3 .LC226: .string "shopping, as is evident from the rain of shoddy toys falling all around you." .align 3 .LC227: .string "Another valorous deed done in the service of The Computer!" .align 3 .LC228: .string "You run away like the cowardly dog you are" .align 3 .LC229: .string "You search the body, keeping an eye open for Internal Security" .text .align 1 .globl page19 .type page19, @function page19: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC222 call puts@plt lla a0,.LC223 call puts@plt lla a0,.LC224 call puts@plt lla a0,.LC225 call puts@plt lla a0,.LC226 call puts@plt lla a0,.LC227 call puts@plt lla a4,.LANCHOR1 lw a5,8(a4) addiw a5,a5,1 sext.w a3,a5 sw a5,8(a4) lw a4,.LANCHOR0 li a5,7 subw a5,a5,a4 li a0,21 blt a5,a3,.L88 lw a4,.LANCHOR1+16 li a5,1 li a0,22 beq a4,a5,.L88 lla a3,.LC228 li a2,22 lla a1,.LC229 li a0,34 call choose .L88: ld ra,8(sp) addi sp,sp,16 jr ra .size page19, .-page19 .section .rodata.str1.8 .align 3 .LC230: .string "Oh no! you can't keep your balance. You're falling, falling head first into" .align 3 .LC231: .string "the Christmas beast's gaping maw. It's a valiant struggle; you think you are" .align 3 .LC232: .string "gone when its poisonous needles dig into your flesh, but with a heroic effort" .align 3 .LC233: .string "you jerk a string of lights free and jam the live wires into the creature's" .align 3 .LC234: .string "spine. The Christmas beast topples to the ground and begins to burn, filling" .align 3 .LC235: .string "the area with a thick acrid smoke. It takes only a moment to compose yourself," .align 3 .LC236: .string "and then you are ready to continue your search for the Master Retailer." .text .align 1 .globl page20 .type page20, @function page20: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC230 call puts@plt lla a0,.LC231 call puts@plt lla a0,.LC232 call puts@plt lla a0,.LC233 call puts@plt lla a0,.LC234 call puts@plt lla a0,.LC235 call puts@plt lla a0,.LC236 call puts@plt li a0,22 ld ra,8(sp) addi sp,sp,16 jr ra .size page20, .-page20 .section .rodata.str1.8 .align 3 .LC237: .string "You have been wasting the leading citizens of Alpha Complex at a prodigious" .align 3 .LC238: .string "rate. This has not gone unnoticed by the Internal Security squad at GDH7-beta." .align 3 .LC239: .string "Suddenly, a net of laser beams spear out of the gloomy corners of the hall," .align 3 .LC240: .string "chopping you into teeny, weeny bite size pieces." .text .align 1 .globl page21 .type page21, @function page21: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC237 call puts@plt lla a0,.LC238 call puts@plt lla a0,.LC239 call puts@plt lla a0,.LC240 call puts@plt li a0,45 call new_clone ld ra,8(sp) addi sp,sp,16 jr ra .size page21, .-page21 .section .rodata.str1.8 .align 3 .LC241: .string "You are searching Goods Distribution Hall 7-beta." .text .align 1 .globl page22 .type page22, @function page22: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC241 call puts@plt li a1,4 li a0,1 call dice_roll li a4,3 beq a0,a4,.L100 mv a5,a0 bgt a0,a4,.L98 li a4,1 li a0,18 beq a5,a4,.L96 li a4,2 li a0,15 .L96: ld ra,8(sp) addi sp,sp,16 jr ra .L98: li a4,4 li a0,29 j .L96 .L100: li a0,18 j .L96 .size page22, .-page22 .section .rodata.str1.8 .align 3 .LC242: .string "You go to the nearest computer terminal and declare yourself a mutant." .align 3 .LC243: .string "\"A mutant, he's a mutant,\" yells a previously unnoticed infrared who had" .align 3 .LC244: .string "been looking over your shoulder. You easily gun him down, but not before a" .align 3 .LC245: .string "dozen more citizens take notice and aim their weapons at you." .align 3 .LC246: .string "You want to fight it out, one against twelve" .align 3 .LC247: .string "You tell them that it was really only a bad joke" .text .align 1 .globl page23 .type page23, @function page23: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC242 call puts@plt lla a0,.LC243 call puts@plt lla a0,.LC244 call puts@plt lla a0,.LC245 call puts@plt lla a3,.LC246 li a2,24 lla a1,.LC247 li a0,28 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page23, .-page23 .section .rodata.str1.8 .align 3 .LC248: .string "Golly, I never expected someone to pick this. I haven't even designed" .align 3 .LC249: .string "the 12 citizens who are going to make a sponge out of you. Tell you what," .align 3 .LC250: .string "I'll give you a second chance." .align 3 .LC251: .string "You REALLY want to shoot it out" .align 3 .LC252: .string "You change your mind and say it was only a bad joke" .text .align 1 .globl page24 .type page24, @function page24: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC248 call puts@plt lla a0,.LC249 call puts@plt lla a0,.LC250 call puts@plt lla a3,.LC251 li a2,25 lla a1,.LC252 li a0,28 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page24, .-page24 .section .rodata.str1.8 .align 3 .LC253: .string "Boy, you really can't take a hint!" .align 3 .LC254: .string "They're closing in. Their trigger fingers are twitching, they're about to" .align 3 .LC255: .string "shoot. This is your last chance." .align 3 .LC256: .string "You are going to shoot" .align 3 .LC257: .string "You tell them it was all just a bad joke" .text .align 1 .globl page25 .type page25, @function page25: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC253 call puts@plt lla a0,.LC254 call puts@plt lla a0,.LC255 call puts@plt lla a3,.LC256 li a2,26 lla a1,.LC257 li a0,28 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page25, .-page25 .section .rodata.str1.8 .align 3 .LC258: .string "You can read the cold, sober hatred in their eyes (They really didn't think" .align 3 .LC259: .string "it was funny), as they tighten the circle around you. One of them shoves a" .align 3 .LC260: .string "blaster up your nose, but that doesn't hurt as much as the multi-gigawatt" .align 3 .LC261: .string "carbonium tipped food drill in the small of your back." .align 3 .LC262: .string "You spend the remaining micro-seconds of your life wondering what you did wrong" .text .align 1 .globl page26 .type page26, @function page26: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC258 call puts@plt lla a0,.LC259 call puts@plt lla a0,.LC260 call puts@plt lla a0,.LC261 call puts@plt lla a0,.LC262 call puts@plt li a0,32 call new_clone ld ra,8(sp) addi sp,sp,16 jr ra .size page26, .-page26 .align 1 .globl page27 .type page27, @function page27: ret .size page27, .-page27 .section .rodata.str1.8 .align 3 .LC263: .string "They don't think it's funny." .text .align 1 .globl page28 .type page28, @function page28: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC263 call puts@plt li a0,26 ld ra,8(sp) addi sp,sp,16 jr ra .size page28, .-page28 .section .rodata.str1.8 .align 3 .LC264: .string "\"Psst, hey citizen, come here. Pssfft,\" you hear. When you peer around" .align 3 .LC265: .string "you can see someone's dim outline in the shadows. \"I got some information" .align 3 .LC266: .string "on the Master Retailer. It'll only cost you 30 psst credits.\"" .align 3 .LC267: .string " a - You pay the 30 credits for the info." .align 3 .LC268: .string " b - You would rather threaten him for the information." .align 3 .LC269: .string " c - You ignore him and walk away." .text .align 1 .globl page29 .type page29, @function page29: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC264 call puts@plt lla a0,.LC265 call puts@plt lla a0,.LC266 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC267 call puts@plt lla a0,.LC268 call puts@plt lla a0,.LC269 call puts@plt call get_char mv a5,a0 li a4,97 li a0,30 beq a5,a4,.L117 li a4,98 li a0,22 bne a5,a4,.L117 li a0,31 .L117: ld ra,8(sp) addi sp,sp,16 jr ra .size page29, .-page29 .section .rodata.str1.8 .align 3 .LC270: .string "You step into the shadows and offer the man a thirty credit bill. \"Just drop" .align 3 .LC271: .string "it on the floor,\" he says. \"So you're looking for the Master Retailer, pssfft?" .align 3 .LC272: .string "I've seen him, he's a fat man in a fuzzy red and white jump suit. They say" .align 3 .LC273: .string "he's a high programmer with no respect for proper security. If you want to" .align 3 .LC274: .string "find him then pssfft step behind me and go through the door.\"" .align 3 .LC275: .string "Behind the man is a reinforced plasteel blast door. The centre of it has been" .align 3 .LC276: .string "buckled toward you in a manner you only saw once before when you were field" .align 3 .LC277: .string "testing the rocket assist plasma slingshot (you found it easily portable but" .align 3 .LC278: .string "prone to misfire). Luckily it isn't buckled too far for you to make out the" .align 3 .LC279: .string "warning sign. WARNING!! Don't open this door or the same thing will happen to" .align 3 .LC280: .string "you. Opening this door is a capital offense. Do not do it. Not at all. This" .align 3 .LC281: .string "is not a joke." .align 3 .LC282: .string " a - You use your Precognition mutant power on opening the door." .align 3 .LC283: .string " b - You just go through the door anyway." .align 3 .LC284: .string " c - You decide it's too dangerous and walk away." .text .align 1 .globl page30 .type page30, @function page30: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC270 call puts@plt lla a0,.LC271 call puts@plt lla a0,.LC272 call puts@plt lla a0,.LC273 call puts@plt lla a0,.LC274 call puts@plt lla a0,.LC275 call puts@plt lla a0,.LC276 call puts@plt lla a0,.LC277 call puts@plt lla a0,.LC278 call puts@plt lla a0,.LC279 call puts@plt lla a0,.LC280 call puts@plt lla a0,.LC281 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC282 call puts@plt lla a0,.LC283 call puts@plt lla a0,.LC284 call puts@plt call get_char mv a5,a0 li a4,97 li a0,56 beq a5,a4,.L122 li a4,98 li a0,22 bne a5,a4,.L122 li a0,33 .L122: ld ra,8(sp) addi sp,sp,16 jr ra .size page30, .-page30 .section .rodata.str1.8 .align 3 .LC285: .string "Like any good troubleshooter you make the least expensive decision and threaten" .align 3 .LC286: .string "him for information. With lightning like reflexes you whip out your laser and" .align 3 .LC287: .string "stick it up his nose. \"Talk, you traitorous Christmas celebrator, or who nose" .align 3 .LC288: .string "what will happen to you, yuk yuk,\" you pun menacingly, and then you notice" .align 3 .LC289: .string "something is very wrong. He doesn't have a nose. As a matter of fact he's" .align 3 .LC290: .string "made of one eighth inch cardboard and your laser is sticking through the other" .align 3 .LC291: .string "side of his head. \"Are you going to pay?\" says his mouth speaker," .align 3 .LC292: .string "\"or are you going to pssfft go away stupid?\"" .align 3 .LC293: .string "You pssfft go away stupid" .align 3 .LC294: .string "You pay the 30 credits" .text .align 1 .globl page31 .type page31, @function page31: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC285 call puts@plt lla a0,.LC286 call puts@plt lla a0,.LC287 call puts@plt lla a0,.LC288 call puts@plt lla a0,.LC289 call puts@plt lla a0,.LC290 call puts@plt lla a0,.LC291 call puts@plt lla a0,.LC292 call puts@plt lla a3,.LC293 li a2,22 lla a1,.LC294 li a0,30 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page31, .-page31 .section .rodata.str1.8 .align 3 .LC295: .string "Finally it's your big chance to prove that you're as good a troubleshooter" .align 3 .LC296: .string "as your previous clone. You walk briskly to mission briefing and pick up your" .align 3 .LC297: .string "previous clone's personal effects and notepad. After reviewing the notes you" .align 3 .LC298: .string "know what has to be done. You catch the purple line to Goods Distribution Hall" .align 3 .LC299: .string "7-beta and begin to search for the blast door." .text .align 1 .globl page32 .type page32, @function page32: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC295 call puts@plt lla a0,.LC296 call puts@plt lla a0,.LC297 call puts@plt lla a0,.LC298 call puts@plt lla a0,.LC299 call puts@plt li a0,22 ld ra,8(sp) addi sp,sp,16 jr ra .size page32, .-page32 .section .rodata.str1.8 .align 3 .LC300: .string "You release the megabolts on the blast door, then strain against it with your" .align 3 .LC301: .string "awesome strength. Slowly the door creaks open. You bravely leap through the" .align 3 .LC302: .string "opening and smack your head into the barrel of a 300 mm 'ultra shock' class" .align 3 .LC303: .string "plasma cannon. It's dark in the barrel now, but just before your head got" .align 3 .LC304: .string "stuck you can remember seeing a group of technicians anxiously watch you leap" .align 3 .LC305: .string "into the room." .text .align 1 .globl page33 .type page33, @function page33: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) lla s1,.LANCHOR1 li s0,1 sw s0,20(s1) lla a0,.LC300 call puts@plt lla a0,.LC301 call puts@plt lla a0,.LC302 call puts@plt lla a0,.LC303 call puts@plt lla a0,.LC304 call puts@plt lla a0,.LC305 call puts@plt lw a0,0(s1) sub a0,a0,s0 snez a0,a0 addi a0,a0,35 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size page33, .-page33 .section .rodata.str1.8 .align 3 .LC306: .string "You have found a sealed envelope on the body. You open it and read:" .align 3 .LC307: .string "\"WARNING: Ultraviolet Clearance ONLY. DO NOT READ." .align 3 .LC308: .string "Memo from Chico-U-MRX4 to Harpo-U-MRX5." .align 3 .LC309: .string "The planned takeover of the Troubleshooter Training Course goes well, Comrade." .align 3 .LC310: .string "Once we have trained the unwitting bourgeois troubleshooters to work as" .align 3 .LC311: .string "communist dupes, the overthrow of Alpha Complex will be unstoppable. My survey" .align 3 .LC312: .string "of the complex has convinced me that no one suspects a thing; soon it will be" .align 3 .LC313: .string "too late for them to oppose the revolution. The only thing that could possibly" .align 3 .LC314: .string "impede the people's revolution would be someone alerting The Computer to our" .align 3 .LC315: .string "plans (for instance, some enterprising Troubleshooter could tell The Computer" .align 3 .LC316: .string "that the communists have liberated the Troubleshooter Training Course and plan" .align 3 .LC317: .string "to use it as a jumping off point from which to undermine the stability of all" .align 3 .LC318: .string "Alpha Complex), but as we both know, the capitalistic Troubleshooters would" .align 3 .LC319: .string "never serve the interests of the proletariat above their own bourgeois desires." .align 3 .LC320: .string "P.S. I'm doing some Christmas shopping later today. Would you like me to pick" .align 3 .LC321: .string "you up something?\"" .align 3 .LC322: .string "When you put down the memo you are overcome by that strange deja'vu again." .align 3 .LC323: .string "You see yourself talking privately with The Computer. You are telling it all" .align 3 .LC324: .string "about the communists' plan, and then the scene shifts and you see yourself" .align 3 .LC325: .string "showered with awards for foiling the insidious communist plot to take over the" .align 3 .LC326: .string "complex." .align 3 .LC327: .string "You wander off to look for more evidence" .align 3 .LC328: .string "You rush off to the nearest computer terminal to expose the commies" .text .align 1 .globl page34 .type page34, @function page34: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC306 call puts@plt lla a0,.LC307 call puts@plt lla a0,.LC308 call puts@plt lla a0,.LC309 call puts@plt lla a0,.LC310 call puts@plt lla a0,.LC311 call puts@plt lla a0,.LC312 call puts@plt lla a0,.LC313 call puts@plt lla a0,.LC314 call puts@plt lla a0,.LC315 call puts@plt lla a0,.LC316 call puts@plt lla a0,.LC317 call puts@plt lla a0,.LC318 call puts@plt lla a0,.LC319 call puts@plt lla a0,.LC320 call puts@plt lla a0,.LC321 call puts@plt call more lla a0,.LC322 call puts@plt lla a0,.LC323 call puts@plt lla a0,.LC324 call puts@plt lla a0,.LC325 call puts@plt lla a0,.LC326 call puts@plt li a5,1 sw a5,.LANCHOR1+16,a4 lla a3,.LC327 li a2,22 lla a1,.LC328 li a0,46 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page34, .-page34 .section .rodata.str1.8 .align 3 .LC329: .string "\"Oh master,\" you hear through the gun barrel, \"where have you been? It is" .align 3 .LC330: .string "time for the great Christmas gifting ceremony. You had better hurry and get" .align 3 .LC331: .string "the costume on or the trainee may begin to suspect.\" For the second time" .align 3 .LC332: .string "today you are forced to wear attire not of your own choosing. They zip the" .align 3 .LC333: .string "suit to your chin just as you hear gunfire erupt behind you." .align 3 .LC334: .string "\"Oh no! Who left the door open? The commies will get in. Quick, fire the" .align 3 .LC335: .string "laser cannon or we're all doomed.\"" .align 3 .LC336: .string "\"Too late you capitalist swine, the people's revolutionary strike force claims" .align 3 .LC337: .string "this cannon for the proletariat's valiant struggle against oppression. Take" .align 3 .LC338: .string "that, you running dog imperialist lackey. ZAP, KAPOW\"" .align 3 .LC339: .string "Just when you think that things couldn't get worse, \"Aha, look what we have" .align 3 .LC340: .string "here, the Master Retailer himself with his head caught in his own cannon. His" .align 3 .LC341: .string "death will serve as a symbol of freedom for all Alpha Complex." .align 3 .LC342: .string "Fire the cannon.\"" .text .align 1 .globl page35 .type page35, @function page35: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC329 call puts@plt lla a0,.LC330 call puts@plt lla a0,.LC331 call puts@plt lla a0,.LC332 call puts@plt lla a0,.LC333 call puts@plt lla a0,.LC334 call puts@plt lla a0,.LC335 call puts@plt lla a0,.LC336 call puts@plt lla a0,.LC337 call puts@plt lla a0,.LC338 call puts@plt lla a0,.LC339 call puts@plt lla a0,.LC340 call puts@plt lla a0,.LC341 call puts@plt lla a0,.LC342 call puts@plt li a0,32 call new_clone ld ra,8(sp) addi sp,sp,16 jr ra .size page35, .-page35 .section .rodata.str1.8 .align 3 .LC343: .string "\"Congratulations, troubleshooter, you have successfully found the lair of the" .align 3 .LC344: .string "Master Retailer and completed the Troubleshooter Training Course test mission,\"" .align 3 .LC345: .string "a muffled voice tells you through the barrel. \"Once we dislodge your head" .align 3 .LC346: .string "from the barrel of the 'Ultra Shock' plasma cannon you can begin with the" .align 3 .LC347: .string "training seminars, the first of which will concern the 100%% accurate\n" .align 3 .LC348: .string "identification and elimination of unregistered mutants. If you have any" .align 3 .LC349: .string "objections please voice them now.\"" .align 3 .LC350: .string " a - You appreciate his courtesy and voice an objection." .align 3 .LC351: .string " b - After your head is removed from the cannon, you register as a mutant." .align 3 .LC352: .string " c - After your head is removed from the cannon, you go to the unregistered" .align 3 .LC353: .string " mutant identification and elimination seminar." .text .align 1 .globl page36 .type page36, @function page36: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC343 call puts@plt lla a0,.LC344 call puts@plt lla a0,.LC345 call puts@plt lla a0,.LC346 call puts@plt lla a1,.LC347 li a0,1 call __printf_chk@plt lla a0,.LC348 call puts@plt lla a0,.LC349 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC350 call puts@plt lla a0,.LC351 call puts@plt lla a0,.LC352 call puts@plt lla a0,.LC353 call puts@plt call get_char li a4,97 beq a0,a4,.L139 mv a5,a0 li a4,98 li a0,37 bne a5,a4,.L140 li a0,23 .L140: ld ra,8(sp) addi sp,sp,16 jr ra .L139: li a0,32 call new_clone j .L140 .size page36, .-page36 .section .rodata.str1.8 .align 3 .LC354: .string "\"Come with me please, Troubleshooter,\" says the Green clearance technician" .align 3 .LC355: .string "after he has dislodged your head from the cannon. \"You have been participating" .align 3 .LC356: .string "in the Troubleshooter Training Course since you got off the tube car in" .align 3 .LC357: .string "GDH7-beta,\" he explains as he leads you down a corridor. \"The entire" .align 3 .LC358: .string "Christmas assignment was a test mission to assess your current level of" .align 3 .LC359: .string "training. You didn't do so well. We're going to start at the beginning with" .align 3 .LC360: .string "the other student. Ah, here we are, the mutant identification and elimination" .align 3 .LC361: .string "lecture.\" He shows you into a vast lecture hall filled with empty seats." .align 3 .LC362: .string "There is only one other student here, a Troubleshooter near the front row" .align 3 .LC363: .string "playing with his Action Troubleshooter(tm) figure. \"Find a seat and I will" .align 3 .LC364: .string "begin,\" says the instructor." .text .align 1 .globl page37 .type page37, @function page37: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC354 call puts@plt lla a0,.LC355 call puts@plt lla a0,.LC356 call puts@plt lla a0,.LC357 call puts@plt lla a0,.LC358 call puts@plt lla a0,.LC359 call puts@plt lla a0,.LC360 call puts@plt lla a0,.LC361 call puts@plt lla a0,.LC362 call puts@plt lla a0,.LC363 call puts@plt lla a0,.LC364 call puts@plt li a0,38 ld ra,8(sp) addi sp,sp,16 jr ra .size page37, .-page37 .section .rodata.str1.8 .align 3 .LC365: .string "\"I am Plato-B-PHI%d, head of mutant propaganda here at the training course.\n" .align 3 .LC366: .string "If you have any questions about mutants please come to me. Today I will be" .align 3 .LC367: .string "talking about mutant detection. Detecting mutants is very easy. One simply" .align 3 .LC368: .string "watches for certain tell tale signs, such as the green scaly skin, the third" .align 3 .LC369: .string "arm growing from the forehead, or other similar disfigurements so common with" .align 3 .LC370: .string "their kind. There are, however, a few rare specimens that show no outward sign" .align 3 .LC371: .string "of their treason. This has been a significant problem, so our researchers have" .align 3 .LC372: .string "been working on a solution. I would like a volunteer to test this device,\"" .align 3 .LC373: .string "he says, holding up a ray gun looking thing. \"It is a mutant detection ray." .align 3 .LC374: .string "This little button detects for mutants, and this big button stuns them once" .align 3 .LC375: .string "they are discovered. Who would like to volunteer for a test?\"" .align 3 .LC376: .string "The Troubleshooter down the front squirms deeper into his chair." .align 3 .LC377: .string "You duck behind a chair and hope the instructor doesn't notice you" .align 3 .LC378: .string "You volunteer for the test" .text .align 1 .globl page38 .type page38, @function page38: addi sp,sp,-16 sd ra,8(sp) lw a2,.LANCHOR0+8 lla a1,.LC365 li a0,1 call __printf_chk@plt lla a0,.LC366 call puts@plt lla a0,.LC367 call puts@plt lla a0,.LC368 call puts@plt lla a0,.LC369 call puts@plt lla a0,.LC370 call puts@plt lla a0,.LC371 call puts@plt lla a0,.LC372 call puts@plt lla a0,.LC373 call puts@plt lla a0,.LC374 call puts@plt lla a0,.LC375 call puts@plt lla a0,.LC376 call puts@plt lla a3,.LC377 li a2,40 lla a1,.LC378 li a0,39 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page38, .-page38 .section .rodata.str1.8 .align 3 .LC379: .string "You bravely volunteer to test the mutant detection gun. You stand up and walk" .align 3 .LC380: .string "down the steps to the podium, passing a very relieved Troubleshooter along the" .align 3 .LC381: .string "way. When you reach the podium Plato-B-PHI hands you the mutant detection gun" .align 3 .LC382: .string "and says, \"Here, aim the gun at that Troubleshooter and push the small button." .align 3 .LC383: .string "If you see a purple light, stun him.\" Grasping the opportunity to prove your" .align 3 .LC384: .string "worth to The Computer, you fire the mutant detection ray at the Troubleshooter." .align 3 .LC385: .string "A brilliant purple nimbus instantly surrounds his body. You slip your finger" .align 3 .LC386: .string "to the large stun button and he falls writhing to the floor." .align 3 .LC387: .string "\"Good shot,\" says the instructor as you hand him the mutant detection gun," .align 3 .LC388: .string "\"I'll see that you get a commendation for this. It seems you have the hang" .align 3 .LC389: .string "of mutant detection and elimination. You can go on to the secret society" .align 3 .LC390: .string "infiltration class. I'll see that the little mutie gets packaged for" .align 3 .LC391: .string "tomorrow's mutant dissection class.\"" .text .align 1 .globl page39 .type page39, @function page39: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC379 call puts@plt lla a0,.LC380 call puts@plt lla a0,.LC381 call puts@plt lla a0,.LC382 call puts@plt lla a0,.LC383 call puts@plt lla a0,.LC384 call puts@plt lla a0,.LC385 call puts@plt lla a0,.LC386 call puts@plt lla a0,.LC387 call puts@plt lla a0,.LC388 call puts@plt lla a0,.LC389 call puts@plt lla a0,.LC390 call puts@plt lla a0,.LC391 call puts@plt li a0,41 ld ra,8(sp) addi sp,sp,16 jr ra .size page39, .-page39 .section .rodata.str1.8 .align 3 .LC392: .string "You breathe a sigh of relief as Plato-B-PHI picks on the other Troubleshooter." .align 3 .LC393: .string "\"You down here in the front,\" says the instructor pointing at the other" .align 3 .LC394: .string "Troubleshooter, \"you'll make a good volunteer. Please step forward.\"" .align 3 .LC395: .string "The Troubleshooter looks around with a `who me?' expression on his face, but" .align 3 .LC396: .string "since he is the only one visible in the audience he figures his number is up." .align 3 .LC397: .string "He walks down to the podium clutching his Action Troubleshooter(tm) doll before" .align 3 .LC398: .string "him like a weapon. \"Here,\" says Plato-B-PHI, \"take the mutant detection ray" .align 3 .LC399: .string "and point it at the audience. If there are any mutants out there we'll know" .align 3 .LC400: .string "soon enough.\" Suddenly your skin prickles with static electricity as a bright" .align 3 .LC401: .string "purple nimbus surrounds your body. \"Ha Ha, got one,\" says the instructor." .align 3 .LC402: .string "\"Stun him before he gets away.\"" .align 3 .LC403: .string "His shot hits you. You feel numb all over." .align 3 .LC404: .string "His shot just missed." .align 3 .LC405: .string "You just blew his head off. His lifeless hand drops the mutant detector ray." .align 3 .LC406: .string "You burnt a hole in the podium. He sights the mutant detector ray on you." .text .align 1 .globl page40 .type page40, @function page40: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) lla a0,.LC392 call puts@plt lla a0,.LC393 call puts@plt lla a0,.LC394 call puts@plt lla a0,.LC395 call puts@plt lla a0,.LC396 call puts@plt lla a0,.LC397 call puts@plt lla a0,.LC398 call puts@plt lla a0,.LC399 call puts@plt lla a0,.LC400 call puts@plt lla a0,.LC401 call puts@plt lla a0,.LC402 call puts@plt call more li s0,30 lla s2,.LC404 li s1,40 lla s3,.LC406 j .L153 .L155: lla a0,.LC403 call puts@plt li a0,49 .L151: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L152: mv a0,s3 call puts@plt .L153: li a1,100 li a0,1 call dice_roll ble a0,s0,.L155 mv a0,s2 call puts@plt li a1,100 li a0,1 call dice_roll bgt a0,s1,.L152 lla a0,.LC405 call puts@plt li a0,50 j .L151 .size page40, .-page40 .section .rodata.str1.8 .align 3 .LC407: .string "You stumble down the hallway of the Troubleshooter Training Course looking for" .align 3 .LC408: .string "your next class. Up ahead you see one of the instructors waving to you. When" .align 3 .LC409: .string "you get there he shakes your hand and says, \"I am Jung-I-PSY. Welcome to the" .align 3 .LC410: .string "secret society infiltration seminar. I hope you ...\" You don't catch the" .align 3 .LC411: .string "rest of his greeting because you're paying too much attention to his handshake;" .align 3 .LC412: .string "it is the strangest thing that has ever been done to your hand, sort of how it" .align 3 .LC413: .string "would feel if you put a neuro whip in a high energy palm massage unit." .align 3 .LC414: .string "It doesn't take you long to learn what he is up to; you feel him briefly shake" .align 3 .LC415: .string "your hand with the secret Illuminati handshake." .align 3 .LC416: .string "You ignore this secret society contact" .align 3 .LC417: .string "You respond with the proper Illuminati code phrase, \"Ewige Blumenkraft\"" .text .align 1 .globl page41 .type page41, @function page41: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC407 call puts@plt lla a0,.LC408 call puts@plt lla a0,.LC409 call puts@plt lla a0,.LC410 call puts@plt lla a0,.LC411 call puts@plt lla a0,.LC412 call puts@plt lla a0,.LC413 call puts@plt lla a0,.LC414 call puts@plt lla a0,.LC415 call puts@plt lla a3,.LC416 li a2,43 lla a1,.LC417 li a0,42 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page41, .-page41 .section .rodata.str1.8 .align 3 .LC418: .string "\"Aha, so you are a member of the elitist Illuminati secret society,\" he says" .align 3 .LC419: .string "loudly, \"that is most interesting.\" He turns to the large class already" .align 3 .LC420: .string "seated in the auditorium and says, \"You see, class, by simply using the correct" .align 3 .LC421: .string "hand shake you can identify the member of any secret society. Please keep your" .align 3 .LC422: .string "weapons trained on him while I call a guard." .align 3 .LC423: .string "You wait for the guard" .align 3 .LC424: .string "You run for it" .text .align 1 .globl page42 .type page42, @function page42: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC418 call puts@plt lla a0,.LC419 call puts@plt lla a0,.LC420 call puts@plt lla a0,.LC421 call puts@plt lla a0,.LC422 call puts@plt lla a3,.LC423 li a2,52 lla a1,.LC424 li a0,51 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page42, .-page42 .section .rodata.str1.8 .align 3 .LC425: .string "You sit through a long lecture on how to recognise and infiltrate secret" .align 3 .LC426: .string "societies, with an emphasis on mimicking secret handshakes. The basic theory," .align 3 .LC427: .string "which you realise to be sound from your Iluminati training, is that with the" .align 3 .LC428: .string "proper handshake you can pass unnoticed in any secret society gathering." .align 3 .LC429: .string "What's more, the proper handshake will open doors faster than an 'ultra shock'" .align 3 .LC430: .string "plasma cannon. You are certain that with the information you learn here you" .align 3 .LC431: .string "will easily be promoted to the next level of your Illuminati secret society." .align 3 .LC432: .string "The lecture continues for three hours, during which you have the opportunity" .align 3 .LC433: .string "to practice many different handshakes. Afterwards everyone is directed to" .align 3 .LC434: .string "attend the graduation ceremony. Before you must go you have a little time to" .align 3 .LC435: .string "talk to The Computer about, you know, certain topics." .align 3 .LC436: .string "You go to the graduation ceremony immediately" .align 3 .LC437: .string "You go looking for a computer terminal" .text .align 1 .globl page43 .type page43, @function page43: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC425 call puts@plt lla a0,.LC426 call puts@plt lla a0,.LC427 call puts@plt lla a0,.LC428 call puts@plt lla a0,.LC429 call puts@plt lla a0,.LC430 call puts@plt lla a0,.LC431 call puts@plt lla a0,.LC432 call puts@plt lla a0,.LC433 call puts@plt lla a0,.LC434 call puts@plt lla a0,.LC435 call puts@plt lla a3,.LC436 li a2,55 lla a1,.LC437 li a0,44 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page43, .-page43 .section .rodata.str1.8 .align 3 .LC438: .string "You walk down to a semi-secluded part of the training course complex and" .align 3 .LC439: .string "activate a computer terminal. \"AT YOUR SERVICE\" reads the computer screen." .align 3 .LC440: .string "You change your mind and go to the graduation ceremony" .align 3 .LC441: .string "You register yourself as a mutant" .align 3 .LC442: .string " a - You register yourself as a mutant." .align 3 .LC443: .string " b - You want to chat about the commies." .align 3 .LC444: .string " c - You change your mind and go to the graduation ceremony." .text .align 1 .globl page44 .type page44, @function page44: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC438 call puts@plt lla a0,.LC439 call puts@plt lw a5,.LANCHOR1+16 beq a5,zero,.L168 lla a0,.LC192 call puts@plt lla a0,.LC442 call puts@plt lla a0,.LC443 call puts@plt lla a0,.LC444 call puts@plt call get_char mv a5,a0 li a4,97 li a0,23 beq a5,a4,.L164 li a4,98 li a0,55 bne a5,a4,.L164 li a0,46 j .L164 .L168: lla a3,.LC440 li a2,55 lla a1,.LC441 li a0,23 call choose .L164: ld ra,8(sp) addi sp,sp,16 jr ra .size page44, .-page44 .section .rodata.str1.8 .align 3 .LC445: .string "\"Hrank Hrank,\" snorts the alarm in your living quarters. Something is up." .align 3 .LC446: .string "You look at the monitor above the bathroom mirror and see the message you have" .align 3 .LC447: .string "been waiting for all these years. \"ATTENTION TROUBLESHOOTER, YOU ARE BEING" .align 3 .LC448: .string "ACTIVATED. PLEASE REPORT IMMEDIATELY TO MISSION ASSIGNMENT ROOM A17/GAMMA/LB22." .align 3 .LC449: .string "THANK YOU. THE COMPUTER IS YOUR FRIEND.\" When you arrive at mission" .align 3 .LC450: .string "assignment room A17-gamma/LB22 you are given your previous clone's" .align 3 .LC451: .string "remaining possessions and notebook. You puzzle through your predecessor's" .align 3 .LC452: .string "cryptic notes, managing to decipher enough to lead you to the tube station and" .align 3 .LC453: .string "the tube car to GDH7-beta." .text .align 1 .globl page45 .type page45, @function page45: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC445 call puts@plt lla a0,.LC446 call puts@plt lla a0,.LC447 call puts@plt lla a0,.LC448 call puts@plt lla a0,.LC449 call puts@plt lla a0,.LC450 call puts@plt lla a0,.LC451 call puts@plt lla a0,.LC452 call puts@plt lla a0,.LC453 call puts@plt li a0,10 ld ra,8(sp) addi sp,sp,16 jr ra .size page45, .-page45 .section .rodata.str1.8 .align 3 .LC454: .string "\"Why do you ask about the communists, Troubleshooter? It is not in the" .align 3 .LC455: .string "interest of your continued survival to be asking about such topics,\" says" .align 3 .LC456: .string "The Computer." .align 3 .LC457: .string "You change the subject" .align 3 .LC458: .string "You insist on talking about the communists" .text .align 1 .globl page46 .type page46, @function page46: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC454 call puts@plt lla a0,.LC455 call puts@plt lla a0,.LC456 call puts@plt lla a3,.LC457 li a2,54 lla a1,.LC458 li a0,53 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page46, .-page46 .section .rodata.str1.8 .align 3 .LC459: .string "The Computer orders the entire Vulture squadron to terminate the Troubleshooter" .align 3 .LC460: .string "Training Course. Unfortunately you too are terminated for possessing" .align 3 .LC461: .string "classified information.\n" .align 3 .LC462: .string "Don't act so innocent, we both know that you are an Illuminatus which is in" .align 3 .LC463: .string "itself an act of treason.\n" .align 3 .LC464: .string "Don't look to me for sympathy.\n" .align 3 .LC465: .string "\t\t\tTHE END" .text .align 1 .globl page47 .type page47, @function page47: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC459 call puts@plt lla a0,.LC460 call puts@plt lla a0,.LC461 call puts@plt lla a0,.LC462 call puts@plt lla a0,.LC463 call puts@plt lla a0,.LC464 call puts@plt lla a0,.LC465 call puts@plt li a0,0 ld ra,8(sp) addi sp,sp,16 jr ra .size page47, .-page47 .section .rodata.str1.8 .align 3 .LC466: .string "The tubecar shoots forward as you enter, slamming you back into a pile of" .align 3 .LC467: .string "garbage. The front end rotates upward and you, the garbage and the garbage" .align 3 .LC468: .string "disposal car shoot straight up out of Alpha Complex. One of the last things" .align 3 .LC469: .string "you see is a small blue sphere slowly dwindling behind you. After you fail to" .align 3 .LC470: .string "report in, you will be assumed dead." .text .align 1 .globl page48 .type page48, @function page48: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC466 call puts@plt lla a0,.LC467 call puts@plt lla a0,.LC468 call puts@plt lla a0,.LC469 call puts@plt lla a0,.LC470 call puts@plt li a0,45 call new_clone ld ra,8(sp) addi sp,sp,16 jr ra .size page48, .-page48 .section .rodata.str1.8 .align 3 .LC471: .string "The instructor drags your inert body into a specimen detainment cage." .align 3 .LC472: .string "\"He'll make a good subject for tomorrow's mutant dissection class,\" you hear." .text .align 1 .globl page49 .type page49, @function page49: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC471 call puts@plt lla a0,.LC472 call puts@plt li a0,32 call new_clone ld ra,8(sp) addi sp,sp,16 jr ra .size page49, .-page49 .section .rodata.str1.8 .align 3 .LC473: .string "You put down the other Troubleshooter, and then wisely decide to drill a few" .align 3 .LC474: .string "holes in the instructor as well; the only good witness is a dead witness." .align 3 .LC475: .string "You continue with the training course." .text .align 1 .globl page50 .type page50, @function page50: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC473 call puts@plt lla a0,.LC474 call puts@plt lla a0,.LC475 call puts@plt lla a4,.LANCHOR0 lw a5,8(a4) addiw a5,a5,1 sw a5,8(a4) li a0,41 ld ra,8(sp) addi sp,sp,16 jr ra .size page50, .-page50 .section .rodata.str1.8 .align 3 .LC476: .string "You run for it, but you don't run far. Three hundred strange and exotic" .align 3 .LC477: .string "weapons turn you into a freeze dried cloud of soot." .text .align 1 .globl page51 .type page51, @function page51: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC476 call puts@plt lla a0,.LC477 call puts@plt li a0,32 call new_clone ld ra,8(sp) addi sp,sp,16 jr ra .size page51, .-page51 .section .rodata.str1.8 .align 3 .LC478: .string "You wisely wait until the instructor returns with a Blue Internal Security" .align 3 .LC479: .string "guard. The guard leads you to an Internal Security self incrimination station." .text .align 1 .globl page52 .type page52, @function page52: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC478 call puts@plt lla a0,.LC479 call puts@plt li a0,2 ld ra,8(sp) addi sp,sp,16 jr ra .size page52, .-page52 .section .rodata.str1.8 .align 3 .LC480: .string "You tell The Computer about:" .align 3 .LC481: .string "Something less dangerous" .align 3 .LC482: .string "The commies who have infiltrated the Troubleshooter Training Course\n and the impending People's Revolution" .text .align 1 .globl page53 .type page53, @function page53: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC480 call puts@plt lla a3,.LC481 li a2,54 lla a1,.LC482 li a0,47 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page53, .-page53 .section .rodata.str1.8 .align 3 .LC483: .string "\"Do not try to change the subject, Troubleshooter,\" says The Computer." .align 3 .LC484: .string "\"It is a serious crime to ask about the communists. You will be terminated" .align 3 .LC485: .string "immediately. Thank you for your inquiry. The Computer is your friend.\"" .align 3 .LC486: .string "Steel bars drop to your left and right, trapping you here in the hallway." .align 3 .LC487: .string "A spotlight beams from the computer console to brilliantly iiluminate you while" .align 3 .LC488: .string "the speaker above your head rapidly repeats \"Traitor, Traitor, Traitor.\"" .align 3 .LC489: .string "It doesn't take long for a few guards to notice your predicament and come to" .align 3 .LC490: .string "finish you off." .text .align 1 .globl page54 .type page54, @function page54: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC483 call puts@plt lla a0,.LC484 call puts@plt lla a0,.LC485 call puts@plt lla a0,.LC486 call puts@plt lla a0,.LC487 call puts@plt lla a0,.LC488 call puts@plt lla a0,.LC489 call puts@plt lla a0,.LC490 call puts@plt lw a5,.LANCHOR1+20 bne a5,zero,.L188 li a0,45 call new_clone .L189: ld ra,8(sp) addi sp,sp,16 jr ra .L188: li a0,32 call new_clone j .L189 .size page54, .-page54 .section .rodata.str1.8 .align 3 .LC491: .string "You and 300 other excited graduates are marched from the lecture hall and into" .align 3 .LC492: .string "a large auditorium for the graduation exercise. The auditorium is" .align 3 .LC493: .string "extravagantly decorated in the colours of the graduating class. Great red and" .align 3 .LC494: .string "green plasti-paper ribbons drape from the walls, while a huge sign reading" .align 3 .LC495: .string "\"Congratulations class of GDH7-beta-203.44/A\" hangs from the raised stage down" .align 3 .LC496: .string "front. Once everyone finds a seat the ceremony begins. Jung-I-PSY is the" .align 3 .LC497: .string "first to speak, \"Congratulations students, you have successfully survived the" .align 3 .LC498: .string "Troubleshooter Training Course. It always brings me great pride to address" .align 3 .LC499: .string "the graduating class, for I know, as I am sure you do too, that you are now" .align 3 .LC500: .string "qualified for the most perilous missions The Computer may select for you. The" .align 3 .LC501: .string "thanks is not owed to us of the teaching staff, but to all of you, who have" .align 3 .LC502: .string "persevered and graduated. Good luck and die trying.\" Then the instructor" .align 3 .LC503: .string "begins reading the names of the students who one by one walk to the front of" .align 3 .LC504: .string "the auditorium and receive their diplomas. Soon it is your turn," .align 3 .LC505: .string "\"Philo-R-DMD, graduating a master of mutant identification and secret society" .align 3 .LC506: .string "infiltration.\" You walk up and receive your diploma from Plato-B-PHI%d, then\n" .align 3 .LC507: .string "return to your seat. There is another speech after the diplomas are handed" .align 3 .LC508: .string "out, but it is cut short by by rapid fire laser bursts from the high spirited" .align 3 .LC509: .string "graduating class. You are free to return to your barracks to wait, trained" .align 3 .LC510: .string "and fully qualified, for your next mission. You also get that cherished" .align 3 .LC511: .string "promotion from the Illuminati secret society. In a week you receive a" .align 3 .LC512: .string "detailed Training Course bill totalling 1,523 credits." .text .align 1 .globl page55 .type page55, @function page55: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC491 call puts@plt lla a0,.LC492 call puts@plt lla a0,.LC493 call puts@plt lla a0,.LC494 call puts@plt lla a0,.LC495 call puts@plt lla a0,.LC496 call puts@plt lla a0,.LC497 call puts@plt lla a0,.LC498 call puts@plt lla a0,.LC499 call puts@plt lla a0,.LC500 call puts@plt lla a0,.LC501 call puts@plt lla a0,.LC502 call puts@plt lla a0,.LC503 call puts@plt lla a0,.LC504 call puts@plt lla a0,.LC505 call puts@plt lw a2,.LANCHOR0+8 lla a1,.LC506 li a0,1 call __printf_chk@plt lla a0,.LC507 call puts@plt lla a0,.LC508 call puts@plt lla a0,.LC509 call puts@plt lla a0,.LC510 call puts@plt lla a0,.LC511 call puts@plt lla a0,.LC512 call puts@plt lla a0,.LC465 call puts@plt li a0,0 ld ra,8(sp) addi sp,sp,16 jr ra .size page55, .-page55 .section .rodata.str1.8 .align 3 .LC513: .string "That familiar strange feeling of deja'vu envelops you again. It is hard to" .align 3 .LC514: .string "say, but whatever is on the other side of the door does not seem to be intended" .align 3 .LC515: .string "for you." .align 3 .LC516: .string "You go looking for more information" .align 3 .LC517: .string "You open the door and step through" .text .align 1 .globl page56 .type page56, @function page56: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC513 call puts@plt lla a0,.LC514 call puts@plt lla a0,.LC515 call puts@plt lla a3,.LC516 li a2,22 lla a1,.LC517 li a0,33 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page56, .-page56 .section .rodata.str1.8 .align 3 .LC518: .string "In the centre of the room is a table and a single chair. There is an Orange" .align 3 .LC519: .string "folder on the table top, but you can't make out the lettering on it." .align 3 .LC520: .string "You leave the room" .align 3 .LC521: .string "You sit down and read the folder" .text .align 1 .globl page57 .type page57, @function page57: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC518 call puts@plt lla a0,.LC519 call puts@plt lla a3,.LC520 li a2,12 lla a1,.LC521 li a0,11 call choose ld ra,8(sp) addi sp,sp,16 jr ra .size page57, .-page57 .align 1 .globl next_page .type next_page, @function next_page: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) mv s0,a0 li a0,10 call putchar@plt li a5,57 bgtu s0,a5,.L197 slli a5,s0,2 lla a4,.L200 add a5,a5,a4 lw a5,0(a5) add a5,a5,a4 jr a5 .section .rodata .align 2 .align 2 .L200: .word .L258-.L200 .word .L256-.L200 .word .L255-.L200 .word .L254-.L200 .word .L253-.L200 .word .L252-.L200 .word .L251-.L200 .word .L250-.L200 .word .L249-.L200 .word .L248-.L200 .word .L247-.L200 .word .L246-.L200 .word .L245-.L200 .word .L244-.L200 .word .L243-.L200 .word .L242-.L200 .word .L241-.L200 .word .L240-.L200 .word .L239-.L200 .word .L238-.L200 .word .L237-.L200 .word .L236-.L200 .word .L235-.L200 .word .L234-.L200 .word .L233-.L200 .word .L232-.L200 .word .L231-.L200 .word .L197-.L200 .word .L229-.L200 .word .L228-.L200 .word .L227-.L200 .word .L226-.L200 .word .L225-.L200 .word .L224-.L200 .word .L223-.L200 .word .L222-.L200 .word .L221-.L200 .word .L220-.L200 .word .L219-.L200 .word .L218-.L200 .word .L217-.L200 .word .L216-.L200 .word .L215-.L200 .word .L214-.L200 .word .L213-.L200 .word .L212-.L200 .word .L211-.L200 .word .L210-.L200 .word .L209-.L200 .word .L208-.L200 .word .L207-.L200 .word .L206-.L200 .word .L205-.L200 .word .L204-.L200 .word .L203-.L200 .word .L202-.L200 .word .L201-.L200 .word .L199-.L200 .text .L256: call page1 mv s1,a0 j .L197 .L255: call page2 mv s1,a0 j .L197 .L254: call page3 mv s1,a0 j .L197 .L253: call page4 mv s1,a0 j .L197 .L252: call page5 mv s1,a0 j .L197 .L251: call page6 mv s1,a0 j .L197 .L250: call page7 mv s1,a0 j .L197 .L249: call page8 mv s1,a0 j .L197 .L248: call page9 mv s1,a0 j .L197 .L247: call page10 mv s1,a0 j .L197 .L246: call page11 mv s1,a0 j .L197 .L245: call page12 mv s1,a0 j .L197 .L244: call page13 mv s1,a0 j .L197 .L243: call page14 mv s1,a0 j .L197 .L242: call page15 mv s1,a0 j .L197 .L241: call page16 mv s1,a0 j .L197 .L240: call page17 mv s1,a0 j .L197 .L239: call page18 mv s1,a0 j .L197 .L238: call page19 mv s1,a0 j .L197 .L237: call page20 mv s1,a0 j .L197 .L236: call page21 mv s1,a0 j .L197 .L235: call page22 mv s1,a0 j .L197 .L234: call page23 mv s1,a0 j .L197 .L233: call page24 mv s1,a0 j .L197 .L232: call page25 mv s1,a0 j .L197 .L231: call page26 mv s1,a0 j .L197 .L229: call page28 mv s1,a0 j .L197 .L228: call page29 mv s1,a0 j .L197 .L227: call page30 mv s1,a0 j .L197 .L226: call page31 mv s1,a0 j .L197 .L225: call page32 mv s1,a0 j .L197 .L224: call page33 mv s1,a0 j .L197 .L223: call page34 mv s1,a0 j .L197 .L222: call page35 mv s1,a0 j .L197 .L221: call page36 mv s1,a0 j .L197 .L220: call page37 mv s1,a0 j .L197 .L219: call page38 mv s1,a0 j .L197 .L218: call page39 mv s1,a0 j .L197 .L217: call page40 mv s1,a0 j .L197 .L216: call page41 mv s1,a0 j .L197 .L215: call page42 mv s1,a0 j .L197 .L214: call page43 mv s1,a0 j .L197 .L213: call page44 mv s1,a0 j .L197 .L212: call page45 mv s1,a0 j .L197 .L211: call page46 mv s1,a0 j .L197 .L210: call page47 mv s1,a0 j .L197 .L209: call page48 mv s1,a0 j .L197 .L208: call page49 mv s1,a0 j .L197 .L207: call page50 mv s1,a0 j .L197 .L206: call page51 mv s1,a0 j .L197 .L205: call page52 mv s1,a0 j .L197 .L204: call page53 mv s1,a0 j .L197 .L203: call page54 mv s1,a0 j .L197 .L202: call page55 mv s1,a0 j .L197 .L201: call page56 mv s1,a0 j .L197 .L199: call page57 mv s1,a0 j .L197 .L258: mv s1,s0 .L197: mv a0,s1 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size next_page, .-next_page .align 1 .globl main .type main, @function main: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) call instructions call more call character call more lla s0,.LANCHOR0 j .L261 .L262: call more .L261: lw a0,12(s0) call next_page sw a0,12(s0) bne a0,zero,.L262 ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size main, .-main .globl killer_count .globl blast_door .globl plato_clone .globl read_letter .globl hit_points .globl action_doll .globl ultra_violet .globl computer_request .globl page .globl clone .data .align 2 .set .LANCHOR0,. + 0 .type clone, @object .size clone, 4 clone: .word 1 .type hit_points, @object .size hit_points, 4 hit_points: .word 10 .type plato_clone, @object .size plato_clone, 4 plato_clone: .word 3 .type page, @object .size page, 4 page: .word 1 .bss .align 2 .set .LANCHOR1,. + 0 .type ultra_violet, @object .size ultra_violet, 4 ultra_violet: .zero 4 .type action_doll, @object .size action_doll, 4 action_doll: .zero 4 .type killer_count, @object .size killer_count, 4 killer_count: .zero 4 .type computer_request, @object .size computer_request, 4 computer_request: .zero 4 .type read_letter, @object .size read_letter, 4 read_letter: .zero 4 .type blast_door, @object .size blast_door, 4 blast_door: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "paranoia.c" .option pic .text .align 1 .globl get_char .type get_char, @function get_char: la a5,stdout ld a0,0(a5) addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L2 li s1,10 .L3: ld a0,0(s0) call getc@plt bne a0,s1,.L3 .L2: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) mv a0,s2 ld s2,0(sp) addi sp,sp,32 jr ra .size get_char, .-get_char .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nClone %d just died.\n" .align 3 .LC1: .string "\n*** You Lose ***\n\nAll your clones are dead. Your name has been stricken from the records.\n\n\t\t\tTHE END" .align 3 .LC2: .string "Clone %d now activated.\n" .text .align 1 .globl new_clone .type new_clone, @function new_clone: addi sp,sp,-32 sd s1,8(sp) lla s1,.LANCHOR0 lw a2,0(s1) sd s0,16(sp) lla a1,.LC0 mv s0,a0 li a0,1 sd ra,24(sp) call __printf_chk@plt lw a5,0(s1) li a4,6 addiw a2,a5,1 sw a2,0(s1) ble a2,a4,.L8 lla a0,.LC1 call puts@plt ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) li a0,0 addi sp,sp,32 jr ra .L8: lla a1,.LC2 li a0,1 call __printf_chk@plt ld ra,24(sp) sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 mv a0,s0 ld s0,16(sp) li a5,10 sw a5,4(s1) sw zero,.LANCHOR1+8,a5 ld s1,8(sp) addi sp,sp,32 jr ra .size new_clone, .-new_clone .align 1 .globl dice_roll .type dice_roll, @function dice_roll: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) ble a0,zero,.L14 mv s0,a0 mv s2,a1 li s1,0 .L13: call rand@plt remw a5,a0,s2 addiw s0,s0,-1 addiw a5,a5,1 addw s1,a5,s1 bne s0,zero,.L13 ld ra,24(sp) ld s0,16(sp) ld s2,0(sp) mv a0,s1 ld s1,8(sp) addi sp,sp,32 jr ra .L14: ld ra,24(sp) ld s0,16(sp) li s1,0 ld s2,0(sp) mv a0,s1 ld s1,8(sp) addi sp,sp,32 jr ra .size dice_roll, .-dice_roll .section .rodata.str1.8 .align 3 .LC3: .string "\n\n\n\nWelcome to Paranoia!\n" .align 3 .LC4: .string "HOW TO PLAY:\n" .align 3 .LC5: .string " Just press <RETURN> until you are asked to make a choice." .align 3 .LC6: .string " Select 'a' or 'b' or whatever for your choice, then press <RETURN>." .align 3 .LC7: .string " You may select 'p' at any time to get a display of your statistics." .align 3 .LC8: .string " Always choose the least dangerous option. Continue doing this until you win." .align 3 .LC9: .string " At times you will use a skill or engage in combat and and will be informed of" .align 3 .LC10: .string " the outcome. These sections will be self explanatory.\n" .align 3 .LC11: .string "HOW TO DIE:\n" .align 3 .LC12: .string " As Philo-R-DMD you will die at times during the adventure." .align 3 .LC13: .string " When this happens you will be given an new clone at a particular location." .align 3 .LC14: .string " The new Philo-R will usually have to retrace some of the old Philo-R's path;" .align 3 .LC15: .string " hopefully he won't make the same mistake as his predecessor.\n" .align 3 .LC16: .string "HOW TO WIN:\n" .align 3 .LC17: .string " Simply complete the mission before you expend all six clones." .align 3 .LC18: .string " If you make it, congratulations." .align 3 .LC19: .string " If not, you can try again later." .text .align 1 .globl instructions .type instructions, @function instructions: addi sp,sp,-16 lla a0,.LC3 sd ra,8(sp) call puts@plt lla a0,.LC4 call puts@plt lla a0,.LC5 call puts@plt lla a0,.LC6 call puts@plt lla a0,.LC7 call puts@plt lla a0,.LC8 call puts@plt lla a0,.LC9 call puts@plt lla a0,.LC10 call puts@plt lla a0,.LC11 call puts@plt lla a0,.LC12 call puts@plt lla a0,.LC13 call puts@plt lla a0,.LC14 call puts@plt lla a0,.LC15 call puts@plt lla a0,.LC16 call puts@plt lla a0,.LC17 call puts@plt lla a0,.LC18 call puts@plt ld ra,8(sp) lla a0,.LC19 addi sp,sp,16 tail puts@plt .size instructions, .-instructions .section .rodata.str1.8 .align 3 .LC20: .string "===============================================================================" .align 3 .LC21: .string "The Character : Philo-R-DMD %d\n" .align 3 .LC22: .string "Primary Attributes Secondary Attributes" .align 3 .LC23: .string "Strength ..................... 13 Carrying Capacity ................. 30" .align 3 .LC24: .string "Endurance .................... 13 Damage Bonus ....................... 0" .align 3 .LC25: .string "Agility ...................... 15 Macho Bonus ....................... -1" .align 3 .LC26: .string "Manual Dexterity ............. 15 Melee Bonus ...................... +5%%\n" .align 3 .LC27: .string "Moxie ........................ 13 Aimed Weapon Bonus .............. +10%%\n" .align 3 .LC28: .string "Chutzpah ...................... 8 Comprehension Bonus .............. +4%%\n" .align 3 .LC29: .string "Mechanical Aptitude .......... 14 Believability Bonus .............. +5%%\n" .align 3 .LC30: .string "Power Index .................. 10 Repair Bonus ..................... +5%%\n" .align 3 .LC31: .string "Credits: 160 Secret Society: Illuminati Secret Society Rank: 1" .align 3 .LC32: .string "Service Group: Power Services Mutant Power: Precognition" .align 3 .LC33: .string "Weapon: laser pistol; to hit, 40%%; type, L; Range, 50m; Reload, 6r; Malfnt, 00\n" .align 3 .LC34: .string "Skills: Basics 1(20%%), Aimed Weapon Combat 2(35%%), Laser 3(40%%),\n Personal Development 1(20%%), Communications 2(29%%), Intimidation 3(34%%)\n" .align 3 .LC35: .string "Equipment: Red Reflec Armour, Laser Pistol, Laser Barrel (red)," .align 3 .LC36: .string " Notebook & Stylus, Knife, Com Unit 1, Jump suit," .align 3 .LC37: .string " Secret Illuminati Eye-In-The-Pyramid(tm) Decoder ring," .align 3 .LC38: .string " Utility Belt & Pouches" .text .align 1 .globl character .type character, @function character: addi sp,sp,-16 lla a0,.LC20 sd ra,8(sp) call puts@plt lw a2,.LANCHOR0 lla a1,.LC21 li a0,1 call __printf_chk@plt lla a0,.LC22 call puts@plt lla a0,.LC20 call puts@plt lla a0,.LC23 call puts@plt lla a0,.LC24 call puts@plt lla a0,.LC25 call puts@plt lla a1,.LC26 li a0,1 call __printf_chk@plt lla a1,.LC27 li a0,1 call __printf_chk@plt lla a1,.LC28 li a0,1 call __printf_chk@plt lla a1,.LC29 li a0,1 call __printf_chk@plt lla a1,.LC30 li a0,1 call __printf_chk@plt lla a0,.LC20 call puts@plt lla a0,.LC31 call puts@plt lla a0,.LC32 call puts@plt lla a1,.LC33 li a0,1 call __printf_chk@plt lla a1,.LC34 li a0,1 call __printf_chk@plt lla a0,.LC35 call puts@plt lla a0,.LC36 call puts@plt lla a0,.LC37 call puts@plt lla a0,.LC38 call puts@plt ld ra,8(sp) lla a0,.LC20 addi sp,sp,16 tail puts@plt .size character, .-character .section .rodata.str1.8 .align 3 .LC39: .string "---------- More ----------" .text .align 1 .globl more .type more, @function more: addi sp,sp,-48 lla a1,.LC39 li a0,1 sd ra,40(sp) sd s0,32(sp) sd s2,16(sp) sd s3,8(sp) sd s1,24(sp) la s3,stdout call __printf_chk@plt ld a0,0(s3) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L22 li s1,10 .L23: ld a0,0(s0) call getc@plt bne a0,s1,.L23 li a5,112 beq s2,a5,.L28 .L22: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L28: call character lla a1,.LC39 li a0,1 call __printf_chk@plt ld a0,0(s3) call fflush@plt ld a0,0(s0) call getc@plt andi a0,a0,0xff beq a0,s1,.L22 li s1,10 .L24: ld a0,0(s0) call getc@plt bne a0,s1,.L24 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .size more, .-more .section .rodata.str1.8 .align 3 .LC40: .string "\nSelect 'a' or 'b' :" .align 3 .LC41: .string " a - %s.\n b - %s.\n" .text .align 1 .globl choose .type choose, @function choose: addi sp,sp,-48 sd s4,0(sp) mv s4,a0 lla a0,.LC40 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) mv s0,a1 sd s2,16(sp) sd s3,8(sp) mv s1,a3 mv s3,a2 call puts@plt mv a2,s0 mv a3,s1 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L30 li s1,10 .L31: ld a0,0(s0) call getc@plt bne a0,s1,.L31 li a5,97 mv a0,s4 bne s2,a5,.L30 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) addi sp,sp,48 jr ra .L30: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s4,0(sp) mv a0,s3 ld s3,8(sp) addi sp,sp,48 jr ra .size choose, .-choose .section .rodata.str1.8 .align 3 .LC42: .string " You wake up face down on the red and pink checked E-Z-Kleen linoleum floor." .align 3 .LC43: .string " You recognise the pattern, it's the type preferred in the internal security\nbriefing cells. When you finally look around you, you see that you are alone" .align 3 .LC44: .string "in a large mission briefing room." .text .align 1 .globl page1 .type page1, @function page1: addi sp,sp,-16 lla a0,.LC42 sd ra,8(sp) call puts@plt lla a0,.LC43 call puts@plt lla a0,.LC44 call puts@plt ld ra,8(sp) li a0,57 addi sp,sp,16 jr ra .size page1, .-page1 .section .rodata.str1.8 .align 3 .LC45: .string "\"Greetings,\" says the kindly Internal Security self incrimination expert who" .align 3 .LC46: .string "meets you at the door, \"How are we doing today?\" He offers you a doughnut" .align 3 .LC47: .string "and coffee and asks what brings you here. This doesn't seem so bad, so you" .align 3 .LC48: .string "tell him that you have come to confess some possible security lapses. He" .align 3 .LC49: .string "smiles knowingly, deftly catching your coffee as you slump to the floor." .align 3 .LC50: .string "\"Nothing to be alarmed about; it's just the truth serum,\" he says," .align 3 .LC51: .string "dragging you back into a discussion room." .align 3 .LC52: .string "The next five hours are a dim haze, but you can recall snatches of conversation" .align 3 .LC53: .string "about your secret society, your mutant power, and your somewhat paranoid" .align 3 .LC54: .string "distrust of The Computer. This should explain why you are hogtied and moving" .align 3 .LC55: .string "slowly down the conveyer belt towards the meat processing unit in Food" .align 3 .LC56: .string "Services." .text .align 1 .globl page2 .type page2, @function page2: addi sp,sp,-16 lla a0,.LC45 sd ra,8(sp) call puts@plt lla a0,.LC46 call puts@plt lla a0,.LC47 call puts@plt lla a0,.LC48 call puts@plt lla a0,.LC49 call puts@plt lla a0,.LC50 call puts@plt lla a0,.LC51 call puts@plt lla a0,.LC52 call puts@plt lla a0,.LC53 call puts@plt lla a0,.LC54 call puts@plt lla a0,.LC55 call puts@plt lla a0,.LC56 call puts@plt lw a4,.LANCHOR1+12 li a5,1 beq a4,a5,.L41 ld ra,8(sp) li a0,32 addi sp,sp,16 tail new_clone .L41: ld ra,8(sp) li a0,45 addi sp,sp,16 tail new_clone .size page2, .-page2 .section .rodata.str1.8 .align 3 .LC57: .string "You walk to the nearest Computer terminal and request more information about" .align 3 .LC58: .string "Christmas. The Computer says, \"That is an A-1 ULTRAVIOLET ONLY IMMEDIATE" .align 3 .LC59: .string "TERMINATION classified topic. What is your clearance please, Troubleshooter?\"" .align 3 .LC60: .string "You lie and claim Ultraviolet clearance" .align 3 .LC61: .string "You give your correct clearance" .text .align 1 .globl page3 .type page3, @function page3: addi sp,sp,-16 lla a0,.LC57 sd ra,8(sp) call puts@plt lla a0,.LC58 call puts@plt lla a0,.LC59 call puts@plt ld ra,8(sp) lla a3,.LC60 li a2,5 lla a1,.LC61 li a0,4 addi sp,sp,16 tail choose .size page3, .-page3 .section .rodata.str1.8 .align 3 .LC62: .string "\"That is classified information, Troubleshooter, thank you for your inquiry." .align 3 .LC63: .string " Please report to an Internal Security self incrimination station as soon as" .align 3 .LC64: .string " possible.\"" .text .align 1 .globl page4 .type page4, @function page4: addi sp,sp,-16 lla a0,.LC62 sd ra,8(sp) call puts@plt lla a0,.LC63 call puts@plt lla a0,.LC64 call puts@plt ld ra,8(sp) li a0,9 addi sp,sp,16 jr ra .size page4, .-page4 .section .rodata.str1.8 .align 3 .LC65: .string "The computer says, \"Troubleshooter, you are not wearing the correct colour" .align 3 .LC66: .string "uniform. You must put on an Ultraviolet uniform immediately. I have seen to" .align 3 .LC67: .string "your needs and ordered one already; it will be here shortly. Please wait with" .align 3 .LC68: .string "your back to the wall until it arrives.\" In less than a minute an infrared" .align 3 .LC69: .string "arrives carrying a white bundle. He asks you to sign for it, then hands it to" .align 3 .LC70: .string "you and stands back, well outside of a fragmentation grenade's blast radius." .align 3 .LC71: .string "You finally come to your senses and run for it" .align 3 .LC72: .string "You open the package and put on the uniform" .text .align 1 .globl page5 .type page5, @function page5: addi sp,sp,-16 lla a0,.LC65 sd ra,8(sp) call puts@plt lla a0,.LC66 call puts@plt lla a0,.LC67 call puts@plt lla a0,.LC68 call puts@plt lla a0,.LC69 call puts@plt lla a0,.LC70 call puts@plt ld ra,8(sp) lla a3,.LC71 li a2,7 lla a1,.LC72 li a0,6 addi sp,sp,16 tail choose .size page5, .-page5 .section .rodata.str1.8 .align 3 .LC73: .string "The uniform definitely makes you look snappy and pert. It really looks" .align 3 .LC74: .string "impressive, and even has the new lopsided lapel fashion that you admire so" .align 3 .LC75: .string "much. What's more, citizens of all ranks come to obsequious attention as you" .align 3 .LC76: .string "walk past. This isn't so bad being an Ultraviolet. You could probably come" .align 3 .LC77: .string "to like it, given time." .align 3 .LC78: .string "The beeping computer terminal interrupts your musings." .text .align 1 .globl page6 .type page6, @function page6: addi sp,sp,-16 lla a0,.LC73 sd ra,8(sp) call puts@plt lla a0,.LC74 call puts@plt lla a0,.LC75 call puts@plt lla a0,.LC76 call puts@plt lla a0,.LC77 call puts@plt lla a0,.LC78 call puts@plt ld ra,8(sp) li a5,1 sw a5,.LANCHOR1,a4 li a0,8 addi sp,sp,16 jr ra .size page6, .-page6 .section .rodata.str1.8 .align 3 .LC79: .string "The corridor lights dim and are replaced by red battle lamps as the Security" .align 3 .LC80: .string "Breach alarms howl all around you. You run headlong down the corridor and" .align 3 .LC81: .string "desperately windmill around a corner, only to collide with a squad of 12 Blue" .align 3 .LC82: .string "clearance Vulture squadron soldiers. \"Stop, Slime Face,\" shouts the" .align 3 .LC83: .string "commander, \"or there won't be enough of you left for a tissue sample.\"" .align 3 .LC84: .string "\"All right, soldiers, stuff the greasy traitor into the uniform,\" he orders," .align 3 .LC85: .string "waving the business end of his blue laser scant inches from your nose." .align 3 .LC86: .string "With his other hand he shakes open a white bundle to reveal a pristine new" .align 3 .LC87: .string "Ultraviolet citizen's uniform." .align 3 .LC88: .string "One of the Vulture squadron Troubleshooters grabs you by the neck in the" .align 3 .LC89: .string "exotic and very painful Vulture Clamp(tm) death grip (you saw a special about" .align 3 .LC90: .string "it on the Teela O'Malley show), while the rest tear off your clothes and" .align 3 .LC91: .string "force you into the Ultraviolet uniform. The moment you are dressed they step" .align 3 .LC92: .string "clear and stand at attention." .align 3 .LC93: .string "\"Thank you for your cooperation, sir,\" says the steely eyed leader of the" .align 3 .LC94: .string "Vulture Squad. \"We will be going about our business now.\" With perfect" .align 3 .LC95: .string "timing the Vultures wheel smartly and goosestep down the corridor." .align 3 .LC96: .string "Special Note: don't make the mistake of assuming that your skills have" .align 3 .LC97: .string "improved any because of the uniform; you're only a Red Troubleshooter" .align 3 .LC98: .string "traitorously posing as an Ultraviolet, and don't you forget it!" .align 3 .LC99: .string "Suddenly, a computer terminal comes to life beside you." .text .align 1 .globl page7 .type page7, @function page7: addi sp,sp,-16 lla a0,.LC79 sd ra,8(sp) call puts@plt lla a0,.LC80 call puts@plt lla a0,.LC81 call puts@plt lla a0,.LC82 call puts@plt lla a0,.LC83 call puts@plt lla a0,.LC84 call puts@plt lla a0,.LC85 call puts@plt lla a0,.LC86 call puts@plt lla a0,.LC87 call puts@plt lla a0,.LC88 call puts@plt lla a0,.LC89 call puts@plt lla a0,.LC90 call puts@plt lla a0,.LC91 call puts@plt lla a0,.LC92 call puts@plt lla a0,.LC93 call puts@plt lla a0,.LC94 call puts@plt lla a0,.LC95 call puts@plt lla a0,.LC96 call puts@plt lla a0,.LC97 call puts@plt lla a0,.LC98 call puts@plt lla a0,.LC99 call puts@plt ld ra,8(sp) li a5,1 sw a5,.LANCHOR1,a4 li a0,8 addi sp,sp,16 jr ra .size page7, .-page7 .section .rodata.str1.8 .align 3 .LC100: .string "\"Now, about your question, citizen. Christmas was an old world marketing ploy" .align 3 .LC101: .string "to induce lower clearance citizens to purchase vast quantities of goods, thus" .align 3 .LC102: .string "accumulation a large amount of credit under the control of a single class of" .align 3 .LC103: .string "citizen known as Retailers. The strategy used is to imply that all good" .align 3 .LC104: .string "citizens give gifts during Christmas, thus if one wishes to be a valuable" .align 3 .LC105: .string "member of society one must also give gifts during Christmas. More valuable" .align 3 .LC106: .string "gifts make one a more valuable member, and thus did the Retailers come to" .align 3 .LC107: .string "control a disproportionate amount of the currency. In this way Christmas" .align 3 .LC108: .string "eventually caused the collapse of the old world. Understandably, Christmas" .align 3 .LC109: .string "has been declared a treasonable practice in Alpha Complex." .align 3 .LC110: .string "Thank you for your inquiry.\"" .align 3 .LC111: .string "You continue on your way to GDH7-beta." .text .align 1 .globl page8 .type page8, @function page8: addi sp,sp,-16 lla a0,.LC100 sd ra,8(sp) call puts@plt lla a0,.LC101 call puts@plt lla a0,.LC102 call puts@plt lla a0,.LC103 call puts@plt lla a0,.LC104 call puts@plt lla a0,.LC105 call puts@plt lla a0,.LC106 call puts@plt lla a0,.LC107 call puts@plt lla a0,.LC108 call puts@plt lla a0,.LC109 call puts@plt lla a0,.LC110 call puts@plt lla a0,.LC111 call puts@plt ld ra,8(sp) li a0,10 addi sp,sp,16 jr ra .size page8, .-page8 .section .rodata.str1.8 .align 3 .LC112: .string "As you walk toward the tubecar that will take you to GDH7-beta, you pass one" .align 3 .LC113: .string "of the bright blue and orange Internal Security self incrimination stations." .align 3 .LC114: .string "Inside, you can see an IS agent cheerfully greet an infrared citizen and then" .align 3 .LC115: .string "lead him at gunpoint into one of the rubber lined discussion rooms." .align 3 .LC116: .string "You just continue blithely on past" .align 3 .LC117: .string "You decide to stop here and chat, as ordered by The Computer" .text .align 1 .globl page9 .type page9, @function page9: addi sp,sp,-16 lla a0,.LC112 sd ra,8(sp) call puts@plt lla a0,.LC113 call puts@plt lla a0,.LC114 call puts@plt lla a0,.LC115 call puts@plt lla a3,.LC116 li a2,10 lla a1,.LC117 li a0,2 call choose ld ra,8(sp) addi a5,a0,-2 seqz a5,a5 sw a5,.LANCHOR1+12,a4 addi sp,sp,16 jr ra .size page9, .-page9 .section .rodata.str1.8 .align 3 .LC118: .string "You stroll briskly down the corridor, up a ladder, across an unrailed catwalk," .align 3 .LC119: .string "under a perilously swinging blast door in urgent need of repair, and into" .align 3 .LC120: .string "tubecar grand central. This is the bustling hub of Alpha Complex tubecar" .align 3 .LC121: .string "transportation. Before you spreads a spaghetti maze of magnalift tube tracks" .align 3 .LC122: .string "and linear accelerators. You bravely study the specially enhanced 3-D tube" .align 3 .LC123: .string "route map; you wouldn't be the first Troubleshooter to take a fast tube ride" .align 3 .LC124: .string "to nowhere." .align 3 .LC125: .string "You nervously select a tubecar and step aboard." .align 3 .LC126: .string "You think you have the route worked out, so you'll board a tube train" .align 3 .LC127: .string "You decide to ask The Computer about Christmas using a nearby terminal" .align 3 .LC128: .string "You just caught a purple line tubecar." .align 3 .LC129: .string "You just caught a brown line tubecar." .text .align 1 .globl page10 .type page10, @function page10: addi sp,sp,-16 lla a0,.LC118 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC119 call puts@plt lla a0,.LC120 call puts@plt lla a0,.LC121 call puts@plt lla a0,.LC122 call puts@plt lla a0,.LC123 call puts@plt lla a0,.LC124 call puts@plt lw a5,.LANCHOR1 bne a5,zero,.L61 lla a3,.LC126 li a2,10 lla a1,.LC127 li a0,3 call choose li a5,3 beq a0,a5,.L60 .L61: lla a0,.LC125 call puts@plt call rand@plt mv s0,a0 call rand@plt li a5,10 remw s0,s0,a5 li a4,12 remw a0,a0,a5 addw s0,s0,a0 addiw s0,s0,2 bgt s0,a4,.L64 lla a0,.LC128 call puts@plt li a0,13 .L60: ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .L64: lla a0,.LC129 call puts@plt ld ra,8(sp) ld s0,0(sp) li a0,48 addi sp,sp,16 jr ra .size page10, .-page10 .section .rodata.str1.8 .align 3 .LC130: .string "The printing on the folder says \"Experimental Self Briefing.\"" .align 3 .LC131: .string "You open it and begin to read the following:" .align 3 .LC132: .string "Step 1: Compel the briefing subject to attend the briefing." .align 3 .LC133: .string " Note: See Experimental Briefing Sub Form Indigo-WY-2," .align 3 .LC134: .string " 'Experimental Self Briefing Subject Acquisition Through The Use Of" .align 3 .LC135: .string " Neurotoxin Room Foggers.'" .align 3 .LC136: .string "Step 2: Inform the briefing subject that the briefing has begun." .align 3 .LC137: .string " ATTENTION: THE BRIEFING HAS BEGUN." .align 3 .LC138: .string "Step 3: Present the briefing material to the briefing subject." .align 3 .LC139: .string " GREETINGS TROUBLESHOOTER." .align 3 .LC140: .string " YOU HAVE BEEN SPECIALLY SELECTED TO SINGLEHANDEDLY" .align 3 .LC141: .string " WIPE OUT A DEN OF TRAITOROUS CHRISTMAS ACTIVITY. YOUR MISSION IS TO" .align 3 .LC142: .string " GO TO GOODS DISTRIBUTION HALL 7-BETA AND ASSESS ANY CHRISTMAS ACTIVITY" .align 3 .LC143: .string " YOU FIND THERE. YOU ARE TO INFILTRATE THESE CHRISTMAS CELEBRANTS," .align 3 .LC144: .string " LOCATE THEIR RINGLEADER, AN UNKNOWN MASTER RETAILER, AND BRING HIM" .align 3 .LC145: .string " BACK FOR EXECUTION AND TRIAL. THANK YOU. THE COMPUTER IS YOUR FRIEND." .align 3 .LC146: .string "Step 4: Sign the briefing subject's briefing release form to indicate that" .align 3 .LC147: .string " the briefing subject has completed the briefing." .align 3 .LC148: .string " ATTENTION: PLEASE SIGN YOUR BRIEFING RELEASE FORM." .align 3 .LC149: .string "Step 5: Terminate the briefing" .align 3 .LC150: .string " ATTENTION: THE BRIEFING IS TERMINATED." .align 3 .LC151: .string "You walk to the door and hold your signed briefing release form up to the" .align 3 .LC152: .string "plexiglass window. A guard scrutinises it for a moment and then slides back" .align 3 .LC153: .string "the megabolts holding the door shut. You are now free to continue the" .align 3 .LC154: .string "mission." .align 3 .LC155: .string "You have decided to go directly to Goods Distribution Hall 7-beta" .align 3 .LC156: .string "You wish to ask The Computer for more information about Christmas" .text .align 1 .globl page11 .type page11, @function page11: addi sp,sp,-16 lla a0,.LC130 sd ra,8(sp) call puts@plt lla a0,.LC131 call puts@plt lla a0,.LC132 call puts@plt lla a0,.LC133 call puts@plt lla a0,.LC134 call puts@plt lla a0,.LC135 call puts@plt lla a0,.LC136 call puts@plt lla a0,.LC137 call puts@plt lla a0,.LC138 call puts@plt lla a0,.LC139 call puts@plt lla a0,.LC140 call puts@plt lla a0,.LC141 call puts@plt lla a0,.LC142 call puts@plt lla a0,.LC143 call puts@plt lla a0,.LC144 call puts@plt lla a0,.LC145 call puts@plt lla a0,.LC146 call puts@plt lla a0,.LC147 call puts@plt lla a0,.LC148 call puts@plt lla a0,.LC149 call puts@plt lla a0,.LC150 call puts@plt call more lla a0,.LC151 call puts@plt lla a0,.LC152 call puts@plt lla a0,.LC153 call puts@plt lla a0,.LC154 call puts@plt ld ra,8(sp) lla a3,.LC155 li a2,10 lla a1,.LC156 li a0,3 addi sp,sp,16 tail choose .size page11, .-page11 .section .rodata.str1.8 .align 3 .LC157: .string "You walk up to the door and push the button labelled \"push to exit.\"" .align 3 .LC158: .string "Within seconds a surly looking guard shoves his face into the small plexiglass" .align 3 .LC159: .string "window. You can see his mouth forming words but you can't hear any of them." .align 3 .LC160: .string "You just stare at him blankly for a few moments until he points down to a" .align 3 .LC161: .string "speaker on your side of the door. When you put your ear to it you can barely" .align 3 .LC162: .string "hear him say, \"Let's see your briefing release form, bud. You aren't" .align 3 .LC163: .string "getting out of here without it.\"" .align 3 .LC164: .string "You stare around the room some more" .align 3 .LC165: .string "You sit down at the table and read the Orange packet" .text .align 1 .globl page12 .type page12, @function page12: addi sp,sp,-16 lla a0,.LC157 sd ra,8(sp) call puts@plt lla a0,.LC158 call puts@plt lla a0,.LC159 call puts@plt lla a0,.LC160 call puts@plt lla a0,.LC161 call puts@plt lla a0,.LC162 call puts@plt lla a0,.LC163 call puts@plt ld ra,8(sp) lla a3,.LC164 li a2,57 lla a1,.LC165 li a0,11 addi sp,sp,16 tail choose .size page12, .-page12 .section .rodata.str1.8 .align 3 .LC166: .string "You step into the shiny plasteel tubecar, wondering why the shape has always" .align 3 .LC167: .string "reminded you of bullets. The car shoots forward the instant your feet touch" .align 3 .LC168: .string "the slippery gray floor, pinning you immobile against the back wall as the" .align 3 .LC169: .string "tubecar careens toward GDH7-beta. Your only solace is the knowledge that it" .align 3 .LC170: .string "could be worse, much worse." .align 3 .LC171: .string "Before too long the car comes to a stop. You can see signs for GDH7-beta" .align 3 .LC172: .string "through the window. With a little practice you discover that you can crawl" .align 3 .LC173: .string "to the door and pull open the latch." .text .align 1 .globl page13 .type page13, @function page13: addi sp,sp,-16 lla a0,.LC166 sd ra,8(sp) call puts@plt lla a0,.LC167 call puts@plt lla a0,.LC168 call puts@plt lla a0,.LC169 call puts@plt lla a0,.LC170 call puts@plt lla a0,.LC171 call puts@plt lla a0,.LC172 call puts@plt lla a0,.LC173 call puts@plt ld ra,8(sp) li a0,14 addi sp,sp,16 jr ra .size page13, .-page13 .section .rodata.str1.8 .align 3 .LC174: .string "You manage to pull yourself out of the tubecar and look around. Before you is" .align 3 .LC175: .string "one of the most confusing things you have ever seen, a hallway that is" .align 3 .LC176: .string "simultaneously both red and green clearance. If this is the result of" .align 3 .LC177: .string "Christmas then it's easy to see the evils inherent in its practice." .align 3 .LC178: .string "You are in the heart of a large goods distribution centre. You can see all" .align 3 .LC179: .string "about you evidence of traitorous secret society Christmas celebration; rubber" .align 3 .LC180: .string "faced robots whiz back and forth selling toys to holiday shoppers, simul-plast" .align 3 .LC181: .string "wreaths hang from every light fixture, while ahead in the shadows is a citizen" .align 3 .LC182: .string "wearing a huge red synthetic flower." .text .align 1 .globl page14 .type page14, @function page14: addi sp,sp,-16 lla a0,.LC174 sd ra,8(sp) call puts@plt lla a0,.LC175 call puts@plt lla a0,.LC176 call puts@plt lla a0,.LC177 call puts@plt lla a0,.LC178 call puts@plt lla a0,.LC179 call puts@plt lla a0,.LC180 call puts@plt lla a0,.LC181 call puts@plt lla a0,.LC182 call puts@plt ld ra,8(sp) li a0,22 addi sp,sp,16 jr ra .size page14, .-page14 .section .rodata.str1.8 .align 3 .LC183: .string "You are set upon by a runty robot with a queer looking face and two pointy" .align 3 .LC184: .string "rubber ears poking from beneath a tattered cap. \"Hey mister,\" it says," .align 3 .LC185: .string "\"you done all your last minute Christmas shopping? I got some real neat junk" .align 3 .LC186: .string "here. You don't wanna miss the big day tommorrow, if you know what I mean.\"" .align 3 .LC187: .string "The robot opens its bag to show you a pile of shoddy Troubleshooter dolls. It" .align 3 .LC188: .string "reaches in and pulls out one of them. \"Look, these Action Troubleshooter(tm)" .align 3 .LC189: .string "dolls are the neatest thing. This one's got moveable arms and when you" .align 3 .LC190: .string "squeeze him, his little rifle squirts realistic looking napalm. It's only" .align 3 .LC191: .string "50 credits. Oh yeah, Merry Christmas.\"" .align 3 .LC192: .string "\nSelect 'a', 'b' or 'c' :" .align 3 .LC193: .string " a - You decide to buy the doll." .align 3 .LC194: .string " b - You shoot the robot." .align 3 .LC195: .string " c - You ignore the robot and keep searching the hall." .text .align 1 .globl page15 .type page15, @function page15: addi sp,sp,-32 lla a0,.LC183 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC184 call puts@plt lla a0,.LC185 call puts@plt lla a0,.LC186 call puts@plt lla a0,.LC187 call puts@plt lla a0,.LC188 call puts@plt lla a0,.LC189 call puts@plt lla a0,.LC190 call puts@plt lla a0,.LC191 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC193 call puts@plt lla a0,.LC194 call puts@plt lla a0,.LC195 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 li a0,22 beq s2,a5,.L74 li s1,10 .L75: ld a0,0(s0) call getc@plt bne a0,s1,.L75 li a5,97 li a0,16 bne s2,a5,.L81 .L74: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L81: li a5,98 bne s2,a5,.L78 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,17 addi sp,sp,32 jr ra .L78: li a0,22 j .L74 .size page15, .-page15 .section .rodata.str1.8 .align 3 .LC196: .string "The doll is a good buy for fifty credits; it will make a fine Christmas present" .align 3 .LC197: .string "for one of your friends. After the sale the robot rolls away. You can use" .align 3 .LC198: .string "the doll later in combat. It works just like a cone rifle firing napalm," .align 3 .LC199: .string "except that occasionally it will explode and blow the user to smithereens." .align 3 .LC200: .string "But don't let that stop you." .text .align 1 .globl page16 .type page16, @function page16: addi sp,sp,-16 lla a0,.LC196 sd ra,8(sp) call puts@plt lla a0,.LC197 call puts@plt lla a0,.LC198 call puts@plt lla a0,.LC199 call puts@plt lla a0,.LC200 call puts@plt ld ra,8(sp) li a5,1 sw a5,.LANCHOR1+4,a4 li a0,22 addi sp,sp,16 jr ra .size page16, .-page16 .section .rodata.str1.8 .align 3 .LC201: .string "You whip out your laser and shoot the robot, but not before it squeezes the" .align 3 .LC202: .string "toy at you. The squeeze toy has the same effect as a cone rifle firing napalm," .align 3 .LC203: .string "and the elfbot's armour has no effect against your laser." .align 3 .LC204: .string "You have been hit!" .align 3 .LC205: .string "It missed you, but not by much!" .align 3 .LC206: .string "You zapped the little bastard!" .align 3 .LC207: .string "You wasted it! Good shooting!" .align 3 .LC208: .string "You will need more evidence, so you search GDH7-beta further" .align 3 .LC209: .string "after the GDH medbot has patched you up." .align 3 .LC210: .string "Damn! You missed!" .align 3 .LC211: .string "It tried to fire again, but the toy exploded and demolished it." .text .align 1 .globl page17 .type page17, @function page17: addi sp,sp,-112 lla a0,.LC201 sd ra,104(sp) sd s0,96(sp) sd s1,88(sp) sd s2,80(sp) sd s3,72(sp) sd s4,64(sp) sd s5,56(sp) sd s6,48(sp) sd s7,40(sp) sd s8,32(sp) sd s9,24(sp) sd s10,16(sp) sd s11,8(sp) call puts@plt lla a0,.LC202 call puts@plt lla a0,.LC203 call puts@plt call rand@plt li s1,100 remw a5,a0,s1 lla s5,.LC204 li s6,24 li s4,2 li s3,15 lla s0,.LANCHOR0 lla s9,.LC205 li s2,10 li s8,39 lla s10,.LC210 lla s7,.LC206 mv a0,s5 bgt a5,s6,.L100 .L93: call puts@plt call rand@plt remw a5,a0,s2 lw a4,4(s0) addiw a5,a5,1 subw a4,a4,a5 sw a4,4(s0) ble a4,zero,.L101 call rand@plt remw a5,a0,s1 mv a0,s7 bgt a5,s8,.L87 .L103: call puts@plt call rand@plt mv s11,a0 call rand@plt remw a5,a0,s2 remw s11,s11,s2 addw a5,a5,s11 addiw a5,a5,2 subw s3,s3,a5 ble s3,zero,.L102 li a5,1 beq s4,a5,.L92 .L104: call rand@plt remw a5,a0,s1 li s4,1 mv a0,s5 ble a5,s6,.L93 .L100: mv a0,s9 call puts@plt call rand@plt remw a5,a0,s1 mv a0,s7 ble a5,s8,.L103 .L87: mv a0,s10 call puts@plt li a5,1 bne s4,a5,.L104 .L92: lla a0,.LC211 .L99: call puts@plt lla a0,.LC208 call puts@plt lw a4,4(s0) li a5,9 ble a4,a5,.L105 .L90: li a5,10 ld ra,104(sp) sw a5,4(s0) ld s0,96(sp) ld s1,88(sp) ld s2,80(sp) ld s3,72(sp) ld s4,64(sp) ld s5,56(sp) ld s6,48(sp) ld s7,40(sp) ld s8,32(sp) ld s9,24(sp) ld s10,16(sp) ld s11,8(sp) li a0,22 addi sp,sp,112 jr ra .L105: lla a0,.LC209 call puts@plt j .L90 .L102: lla a0,.LC207 j .L99 .L101: ld s0,96(sp) ld ra,104(sp) ld s1,88(sp) ld s2,80(sp) ld s3,72(sp) ld s4,64(sp) ld s5,56(sp) ld s6,48(sp) ld s7,40(sp) ld s8,32(sp) ld s9,24(sp) ld s10,16(sp) ld s11,8(sp) li a0,45 addi sp,sp,112 tail new_clone .size page17, .-page17 .section .rodata.str1.8 .align 3 .LC212: .string "You walk to the centre of the hall, ogling like an infrared fresh from the" .align 3 .LC213: .string "clone vats. Towering before you is the most unearthly thing you have ever" .align 3 .LC214: .string "seen, a green multi armed mutant horror hulking 15 feet above your head." .align 3 .LC215: .string "Its skeletal body is draped with hundreds of metallic strips (probably to" .align 3 .LC216: .string "negate the effects of some insidious mutant power), and the entire hideous" .align 3 .LC217: .string "creature is wrapped in a thousand blinking hazard lights. It's times like" .align 3 .LC218: .string "this when you wish you'd had some training for this job. Luckily the" .align 3 .LC219: .string "creature doesn't take notice of you but stands unmoving, as though waiting for" .align 3 .LC220: .string "a summons from its dark lord, the Master Retailer." .align 3 .LC221: .string "WHAM, suddenly you are struck from behind." .text .align 1 .globl page18 .type page18, @function page18: addi sp,sp,-16 lla a0,.LC212 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC213 call puts@plt lla a0,.LC214 call puts@plt lla a0,.LC215 call puts@plt lla a0,.LC216 call puts@plt lla a0,.LC217 call puts@plt lla a0,.LC218 call puts@plt lla a0,.LC219 call puts@plt lla a0,.LC220 call puts@plt lla a0,.LC221 call puts@plt call rand@plt mv s0,a0 call rand@plt li a5,10 remw s0,s0,a5 ld ra,8(sp) remw a0,a0,a5 li a5,14 addw a0,s0,a0 ld s0,0(sp) addiw a0,a0,2 sgt a0,a0,a5 addi a0,a0,19 addi sp,sp,16 jr ra .size page18, .-page18 .section .rodata.str1.8 .align 3 .LC222: .string "Quickly you regain your balance, whirl and fire your laser into the Ultraviolet" .align 3 .LC223: .string "citizen behind you. For a moment your heart leaps to your throat, then you" .align 3 .LC224: .string "realise that he is indeed dead and you will be the only one filing a report on" .align 3 .LC225: .string "this incident. Besides, he was participating in this traitorous Christmas" .align 3 .LC226: .string "shopping, as is evident from the rain of shoddy toys falling all around you." .align 3 .LC227: .string "Another valorous deed done in the service of The Computer!" .align 3 .LC228: .string "You run away like the cowardly dog you are" .align 3 .LC229: .string "You search the body, keeping an eye open for Internal Security" .text .align 1 .globl page19 .type page19, @function page19: addi sp,sp,-16 lla a0,.LC222 sd ra,8(sp) call puts@plt lla a0,.LC223 call puts@plt lla a0,.LC224 call puts@plt lla a0,.LC225 call puts@plt lla a0,.LC226 call puts@plt lla a0,.LC227 call puts@plt lla a4,.LANCHOR1 lw a5,8(a4) lw a2,.LANCHOR0 addiw a3,a5,1 li a5,7 sw a3,8(a4) subw a5,a5,a2 blt a5,a3,.L112 lw a4,16(a4) li a5,1 beq a4,a5,.L113 ld ra,8(sp) lla a3,.LC228 li a2,22 lla a1,.LC229 li a0,34 addi sp,sp,16 tail choose .L112: ld ra,8(sp) li a0,21 addi sp,sp,16 jr ra .L113: ld ra,8(sp) li a0,22 addi sp,sp,16 jr ra .size page19, .-page19 .section .rodata.str1.8 .align 3 .LC230: .string "Oh no! you can't keep your balance. You're falling, falling head first into" .align 3 .LC231: .string "the Christmas beast's gaping maw. It's a valiant struggle; you think you are" .align 3 .LC232: .string "gone when its poisonous needles dig into your flesh, but with a heroic effort" .align 3 .LC233: .string "you jerk a string of lights free and jam the live wires into the creature's" .align 3 .LC234: .string "spine. The Christmas beast topples to the ground and begins to burn, filling" .align 3 .LC235: .string "the area with a thick acrid smoke. It takes only a moment to compose yourself," .align 3 .LC236: .string "and then you are ready to continue your search for the Master Retailer." .text .align 1 .globl page20 .type page20, @function page20: addi sp,sp,-16 lla a0,.LC230 sd ra,8(sp) call puts@plt lla a0,.LC231 call puts@plt lla a0,.LC232 call puts@plt lla a0,.LC233 call puts@plt lla a0,.LC234 call puts@plt lla a0,.LC235 call puts@plt lla a0,.LC236 call puts@plt ld ra,8(sp) li a0,22 addi sp,sp,16 jr ra .size page20, .-page20 .section .rodata.str1.8 .align 3 .LC237: .string "You have been wasting the leading citizens of Alpha Complex at a prodigious" .align 3 .LC238: .string "rate. This has not gone unnoticed by the Internal Security squad at GDH7-beta." .align 3 .LC239: .string "Suddenly, a net of laser beams spear out of the gloomy corners of the hall," .align 3 .LC240: .string "chopping you into teeny, weeny bite size pieces." .text .align 1 .globl page21 .type page21, @function page21: addi sp,sp,-16 lla a0,.LC237 sd ra,8(sp) call puts@plt lla a0,.LC238 call puts@plt lla a0,.LC239 call puts@plt lla a0,.LC240 call puts@plt ld ra,8(sp) li a0,45 addi sp,sp,16 tail new_clone .size page21, .-page21 .section .rodata.str1.8 .align 3 .LC241: .string "You are searching Goods Distribution Hall 7-beta." .text .align 1 .globl page22 .type page22, @function page22: addi sp,sp,-16 lla a0,.LC241 sd ra,8(sp) call puts@plt call rand@plt sraiw a5,a0,31 srliw a5,a5,30 addw a0,a5,a0 andi a0,a0,3 subw a0,a0,a5 sext.w a4,a0 li a5,3 bgtu a4,a5,.L119 slli a5,a0,32 srli a0,a5,30 lla a5,.LANCHOR2 add a5,a5,a0 lw a0,0(a5) .L119: ld ra,8(sp) addi sp,sp,16 jr ra .size page22, .-page22 .section .rodata.str1.8 .align 3 .LC242: .string "You go to the nearest computer terminal and declare yourself a mutant." .align 3 .LC243: .string "\"A mutant, he's a mutant,\" yells a previously unnoticed infrared who had" .align 3 .LC244: .string "been looking over your shoulder. You easily gun him down, but not before a" .align 3 .LC245: .string "dozen more citizens take notice and aim their weapons at you." .align 3 .LC246: .string "You want to fight it out, one against twelve" .align 3 .LC247: .string "You tell them that it was really only a bad joke" .text .align 1 .globl page23 .type page23, @function page23: addi sp,sp,-16 lla a0,.LC242 sd ra,8(sp) call puts@plt lla a0,.LC243 call puts@plt lla a0,.LC244 call puts@plt lla a0,.LC245 call puts@plt ld ra,8(sp) lla a3,.LC246 li a2,24 lla a1,.LC247 li a0,28 addi sp,sp,16 tail choose .size page23, .-page23 .section .rodata.str1.8 .align 3 .LC248: .string "Golly, I never expected someone to pick this. I haven't even designed" .align 3 .LC249: .string "the 12 citizens who are going to make a sponge out of you. Tell you what," .align 3 .LC250: .string "I'll give you a second chance." .align 3 .LC251: .string "You REALLY want to shoot it out" .align 3 .LC252: .string "You change your mind and say it was only a bad joke" .text .align 1 .globl page24 .type page24, @function page24: addi sp,sp,-16 lla a0,.LC248 sd ra,8(sp) call puts@plt lla a0,.LC249 call puts@plt lla a0,.LC250 call puts@plt ld ra,8(sp) lla a3,.LC251 li a2,25 lla a1,.LC252 li a0,28 addi sp,sp,16 tail choose .size page24, .-page24 .section .rodata.str1.8 .align 3 .LC253: .string "Boy, you really can't take a hint!" .align 3 .LC254: .string "They're closing in. Their trigger fingers are twitching, they're about to" .align 3 .LC255: .string "shoot. This is your last chance." .align 3 .LC256: .string "You are going to shoot" .align 3 .LC257: .string "You tell them it was all just a bad joke" .text .align 1 .globl page25 .type page25, @function page25: addi sp,sp,-16 lla a0,.LC253 sd ra,8(sp) call puts@plt lla a0,.LC254 call puts@plt lla a0,.LC255 call puts@plt ld ra,8(sp) lla a3,.LC256 li a2,26 lla a1,.LC257 li a0,28 addi sp,sp,16 tail choose .size page25, .-page25 .section .rodata.str1.8 .align 3 .LC258: .string "You can read the cold, sober hatred in their eyes (They really didn't think" .align 3 .LC259: .string "it was funny), as they tighten the circle around you. One of them shoves a" .align 3 .LC260: .string "blaster up your nose, but that doesn't hurt as much as the multi-gigawatt" .align 3 .LC261: .string "carbonium tipped food drill in the small of your back." .align 3 .LC262: .string "You spend the remaining micro-seconds of your life wondering what you did wrong" .text .align 1 .globl page26 .type page26, @function page26: addi sp,sp,-16 lla a0,.LC258 sd ra,8(sp) call puts@plt lla a0,.LC259 call puts@plt lla a0,.LC260 call puts@plt lla a0,.LC261 call puts@plt lla a0,.LC262 call puts@plt ld ra,8(sp) li a0,32 addi sp,sp,16 tail new_clone .size page26, .-page26 .align 1 .globl page27 .type page27, @function page27: ret .size page27, .-page27 .section .rodata.str1.8 .align 3 .LC263: .string "They don't think it's funny." .text .align 1 .globl page28 .type page28, @function page28: addi sp,sp,-16 lla a0,.LC263 sd ra,8(sp) call puts@plt ld ra,8(sp) li a0,26 addi sp,sp,16 jr ra .size page28, .-page28 .section .rodata.str1.8 .align 3 .LC264: .string "\"Psst, hey citizen, come here. Pssfft,\" you hear. When you peer around" .align 3 .LC265: .string "you can see someone's dim outline in the shadows. \"I got some information" .align 3 .LC266: .string "on the Master Retailer. It'll only cost you 30 psst credits.\"" .align 3 .LC267: .string " a - You pay the 30 credits for the info." .align 3 .LC268: .string " b - You would rather threaten him for the information." .align 3 .LC269: .string " c - You ignore him and walk away." .text .align 1 .globl page29 .type page29, @function page29: addi sp,sp,-32 lla a0,.LC264 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC265 call puts@plt lla a0,.LC266 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC267 call puts@plt lla a0,.LC268 call puts@plt lla a0,.LC269 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 li a0,22 beq s2,a5,.L134 li s1,10 .L135: ld a0,0(s0) call getc@plt bne a0,s1,.L135 li a5,97 li a0,30 bne s2,a5,.L141 .L134: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L141: li a5,98 bne s2,a5,.L138 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,31 addi sp,sp,32 jr ra .L138: li a0,22 j .L134 .size page29, .-page29 .section .rodata.str1.8 .align 3 .LC270: .string "You step into the shadows and offer the man a thirty credit bill. \"Just drop" .align 3 .LC271: .string "it on the floor,\" he says. \"So you're looking for the Master Retailer, pssfft?" .align 3 .LC272: .string "I've seen him, he's a fat man in a fuzzy red and white jump suit. They say" .align 3 .LC273: .string "he's a high programmer with no respect for proper security. If you want to" .align 3 .LC274: .string "find him then pssfft step behind me and go through the door.\"" .align 3 .LC275: .string "Behind the man is a reinforced plasteel blast door. The centre of it has been" .align 3 .LC276: .string "buckled toward you in a manner you only saw once before when you were field" .align 3 .LC277: .string "testing the rocket assist plasma slingshot (you found it easily portable but" .align 3 .LC278: .string "prone to misfire). Luckily it isn't buckled too far for you to make out the" .align 3 .LC279: .string "warning sign. WARNING!! Don't open this door or the same thing will happen to" .align 3 .LC280: .string "you. Opening this door is a capital offense. Do not do it. Not at all. This" .align 3 .LC281: .string "is not a joke." .align 3 .LC282: .string " a - You use your Precognition mutant power on opening the door." .align 3 .LC283: .string " b - You just go through the door anyway." .align 3 .LC284: .string " c - You decide it's too dangerous and walk away." .text .align 1 .globl page30 .type page30, @function page30: addi sp,sp,-32 lla a0,.LC270 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC271 call puts@plt lla a0,.LC272 call puts@plt lla a0,.LC273 call puts@plt lla a0,.LC274 call puts@plt lla a0,.LC275 call puts@plt lla a0,.LC276 call puts@plt lla a0,.LC277 call puts@plt lla a0,.LC278 call puts@plt lla a0,.LC279 call puts@plt lla a0,.LC280 call puts@plt lla a0,.LC281 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC282 call puts@plt lla a0,.LC283 call puts@plt lla a0,.LC284 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 li a0,22 beq s2,a5,.L143 li s1,10 .L144: ld a0,0(s0) call getc@plt bne a0,s1,.L144 li a5,97 li a0,56 bne s2,a5,.L150 .L143: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L150: li a5,98 bne s2,a5,.L147 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,33 addi sp,sp,32 jr ra .L147: li a0,22 j .L143 .size page30, .-page30 .section .rodata.str1.8 .align 3 .LC285: .string "Like any good troubleshooter you make the least expensive decision and threaten" .align 3 .LC286: .string "him for information. With lightning like reflexes you whip out your laser and" .align 3 .LC287: .string "stick it up his nose. \"Talk, you traitorous Christmas celebrator, or who nose" .align 3 .LC288: .string "what will happen to you, yuk yuk,\" you pun menacingly, and then you notice" .align 3 .LC289: .string "something is very wrong. He doesn't have a nose. As a matter of fact he's" .align 3 .LC290: .string "made of one eighth inch cardboard and your laser is sticking through the other" .align 3 .LC291: .string "side of his head. \"Are you going to pay?\" says his mouth speaker," .align 3 .LC292: .string "\"or are you going to pssfft go away stupid?\"" .align 3 .LC293: .string "You pssfft go away stupid" .align 3 .LC294: .string "You pay the 30 credits" .text .align 1 .globl page31 .type page31, @function page31: addi sp,sp,-16 lla a0,.LC285 sd ra,8(sp) call puts@plt lla a0,.LC286 call puts@plt lla a0,.LC287 call puts@plt lla a0,.LC288 call puts@plt lla a0,.LC289 call puts@plt lla a0,.LC290 call puts@plt lla a0,.LC291 call puts@plt lla a0,.LC292 call puts@plt ld ra,8(sp) lla a3,.LC293 li a2,22 lla a1,.LC294 li a0,30 addi sp,sp,16 tail choose .size page31, .-page31 .section .rodata.str1.8 .align 3 .LC295: .string "Finally it's your big chance to prove that you're as good a troubleshooter" .align 3 .LC296: .string "as your previous clone. You walk briskly to mission briefing and pick up your" .align 3 .LC297: .string "previous clone's personal effects and notepad. After reviewing the notes you" .align 3 .LC298: .string "know what has to be done. You catch the purple line to Goods Distribution Hall" .align 3 .LC299: .string "7-beta and begin to search for the blast door." .text .align 1 .globl page32 .type page32, @function page32: addi sp,sp,-16 lla a0,.LC295 sd ra,8(sp) call puts@plt lla a0,.LC296 call puts@plt lla a0,.LC297 call puts@plt lla a0,.LC298 call puts@plt lla a0,.LC299 call puts@plt ld ra,8(sp) li a0,22 addi sp,sp,16 jr ra .size page32, .-page32 .section .rodata.str1.8 .align 3 .LC300: .string "You release the megabolts on the blast door, then strain against it with your" .align 3 .LC301: .string "awesome strength. Slowly the door creaks open. You bravely leap through the" .align 3 .LC302: .string "opening and smack your head into the barrel of a 300 mm 'ultra shock' class" .align 3 .LC303: .string "plasma cannon. It's dark in the barrel now, but just before your head got" .align 3 .LC304: .string "stuck you can remember seeing a group of technicians anxiously watch you leap" .align 3 .LC305: .string "into the room." .text .align 1 .globl page33 .type page33, @function page33: addi sp,sp,-16 li a5,1 sd s0,0(sp) lla a0,.LC300 lla s0,.LANCHOR1 sd ra,8(sp) sw a5,20(s0) call puts@plt lla a0,.LC301 call puts@plt lla a0,.LC302 call puts@plt lla a0,.LC303 call puts@plt lla a0,.LC304 call puts@plt lla a0,.LC305 call puts@plt lw a0,0(s0) ld ra,8(sp) ld s0,0(sp) addi a0,a0,-1 snez a0,a0 addi a0,a0,35 addi sp,sp,16 jr ra .size page33, .-page33 .section .rodata.str1.8 .align 3 .LC306: .string "You have found a sealed envelope on the body. You open it and read:" .align 3 .LC307: .string "\"WARNING: Ultraviolet Clearance ONLY. DO NOT READ." .align 3 .LC308: .string "Memo from Chico-U-MRX4 to Harpo-U-MRX5." .align 3 .LC309: .string "The planned takeover of the Troubleshooter Training Course goes well, Comrade." .align 3 .LC310: .string "Once we have trained the unwitting bourgeois troubleshooters to work as" .align 3 .LC311: .string "communist dupes, the overthrow of Alpha Complex will be unstoppable. My survey" .align 3 .LC312: .string "of the complex has convinced me that no one suspects a thing; soon it will be" .align 3 .LC313: .string "too late for them to oppose the revolution. The only thing that could possibly" .align 3 .LC314: .string "impede the people's revolution would be someone alerting The Computer to our" .align 3 .LC315: .string "plans (for instance, some enterprising Troubleshooter could tell The Computer" .align 3 .LC316: .string "that the communists have liberated the Troubleshooter Training Course and plan" .align 3 .LC317: .string "to use it as a jumping off point from which to undermine the stability of all" .align 3 .LC318: .string "Alpha Complex), but as we both know, the capitalistic Troubleshooters would" .align 3 .LC319: .string "never serve the interests of the proletariat above their own bourgeois desires." .align 3 .LC320: .string "P.S. I'm doing some Christmas shopping later today. Would you like me to pick" .align 3 .LC321: .string "you up something?\"" .align 3 .LC322: .string "When you put down the memo you are overcome by that strange deja'vu again." .align 3 .LC323: .string "You see yourself talking privately with The Computer. You are telling it all" .align 3 .LC324: .string "about the communists' plan, and then the scene shifts and you see yourself" .align 3 .LC325: .string "showered with awards for foiling the insidious communist plot to take over the" .align 3 .LC326: .string "complex." .align 3 .LC327: .string "You wander off to look for more evidence" .align 3 .LC328: .string "You rush off to the nearest computer terminal to expose the commies" .text .align 1 .globl page34 .type page34, @function page34: addi sp,sp,-16 lla a0,.LC306 sd ra,8(sp) call puts@plt lla a0,.LC307 call puts@plt lla a0,.LC308 call puts@plt lla a0,.LC309 call puts@plt lla a0,.LC310 call puts@plt lla a0,.LC311 call puts@plt lla a0,.LC312 call puts@plt lla a0,.LC313 call puts@plt lla a0,.LC314 call puts@plt lla a0,.LC315 call puts@plt lla a0,.LC316 call puts@plt lla a0,.LC317 call puts@plt lla a0,.LC318 call puts@plt lla a0,.LC319 call puts@plt lla a0,.LC320 call puts@plt lla a0,.LC321 call puts@plt call more lla a0,.LC322 call puts@plt lla a0,.LC323 call puts@plt lla a0,.LC324 call puts@plt lla a0,.LC325 call puts@plt lla a0,.LC326 call puts@plt ld ra,8(sp) li a5,1 sw a5,.LANCHOR1+16,a4 lla a3,.LC327 li a2,22 lla a1,.LC328 li a0,46 addi sp,sp,16 tail choose .size page34, .-page34 .section .rodata.str1.8 .align 3 .LC329: .string "\"Oh master,\" you hear through the gun barrel, \"where have you been? It is" .align 3 .LC330: .string "time for the great Christmas gifting ceremony. You had better hurry and get" .align 3 .LC331: .string "the costume on or the trainee may begin to suspect.\" For the second time" .align 3 .LC332: .string "today you are forced to wear attire not of your own choosing. They zip the" .align 3 .LC333: .string "suit to your chin just as you hear gunfire erupt behind you." .align 3 .LC334: .string "\"Oh no! Who left the door open? The commies will get in. Quick, fire the" .align 3 .LC335: .string "laser cannon or we're all doomed.\"" .align 3 .LC336: .string "\"Too late you capitalist swine, the people's revolutionary strike force claims" .align 3 .LC337: .string "this cannon for the proletariat's valiant struggle against oppression. Take" .align 3 .LC338: .string "that, you running dog imperialist lackey. ZAP, KAPOW\"" .align 3 .LC339: .string "Just when you think that things couldn't get worse, \"Aha, look what we have" .align 3 .LC340: .string "here, the Master Retailer himself with his head caught in his own cannon. His" .align 3 .LC341: .string "death will serve as a symbol of freedom for all Alpha Complex." .align 3 .LC342: .string "Fire the cannon.\"" .text .align 1 .globl page35 .type page35, @function page35: addi sp,sp,-16 lla a0,.LC329 sd ra,8(sp) call puts@plt lla a0,.LC330 call puts@plt lla a0,.LC331 call puts@plt lla a0,.LC332 call puts@plt lla a0,.LC333 call puts@plt lla a0,.LC334 call puts@plt lla a0,.LC335 call puts@plt lla a0,.LC336 call puts@plt lla a0,.LC337 call puts@plt lla a0,.LC338 call puts@plt lla a0,.LC339 call puts@plt lla a0,.LC340 call puts@plt lla a0,.LC341 call puts@plt lla a0,.LC342 call puts@plt ld ra,8(sp) li a0,32 addi sp,sp,16 tail new_clone .size page35, .-page35 .section .rodata.str1.8 .align 3 .LC343: .string "\"Congratulations, troubleshooter, you have successfully found the lair of the" .align 3 .LC344: .string "Master Retailer and completed the Troubleshooter Training Course test mission,\"" .align 3 .LC345: .string "a muffled voice tells you through the barrel. \"Once we dislodge your head" .align 3 .LC346: .string "from the barrel of the 'Ultra Shock' plasma cannon you can begin with the" .align 3 .LC347: .string "training seminars, the first of which will concern the 100%% accurate\n" .align 3 .LC348: .string "identification and elimination of unregistered mutants. If you have any" .align 3 .LC349: .string "objections please voice them now.\"" .align 3 .LC350: .string " a - You appreciate his courtesy and voice an objection." .align 3 .LC351: .string " b - After your head is removed from the cannon, you register as a mutant." .align 3 .LC352: .string " c - After your head is removed from the cannon, you go to the unregistered" .align 3 .LC353: .string " mutant identification and elimination seminar." .text .align 1 .globl page36 .type page36, @function page36: addi sp,sp,-32 lla a0,.LC343 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC344 call puts@plt lla a0,.LC345 call puts@plt lla a0,.LC346 call puts@plt lla a1,.LC347 li a0,1 call __printf_chk@plt lla a0,.LC348 call puts@plt lla a0,.LC349 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC350 call puts@plt lla a0,.LC351 call puts@plt lla a0,.LC352 call puts@plt lla a0,.LC353 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L168 li s1,10 .L165: ld a0,0(s0) call getc@plt bne a0,s1,.L165 li a5,97 bne s2,a5,.L171 ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) li a0,32 addi sp,sp,32 tail new_clone .L171: li a5,98 bne s2,a5,.L168 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,23 addi sp,sp,32 jr ra .L168: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,37 addi sp,sp,32 jr ra .size page36, .-page36 .section .rodata.str1.8 .align 3 .LC354: .string "\"Come with me please, Troubleshooter,\" says the Green clearance technician" .align 3 .LC355: .string "after he has dislodged your head from the cannon. \"You have been participating" .align 3 .LC356: .string "in the Troubleshooter Training Course since you got off the tube car in" .align 3 .LC357: .string "GDH7-beta,\" he explains as he leads you down a corridor. \"The entire" .align 3 .LC358: .string "Christmas assignment was a test mission to assess your current level of" .align 3 .LC359: .string "training. You didn't do so well. We're going to start at the beginning with" .align 3 .LC360: .string "the other student. Ah, here we are, the mutant identification and elimination" .align 3 .LC361: .string "lecture.\" He shows you into a vast lecture hall filled with empty seats." .align 3 .LC362: .string "There is only one other student here, a Troubleshooter near the front row" .align 3 .LC363: .string "playing with his Action Troubleshooter(tm) figure. \"Find a seat and I will" .align 3 .LC364: .string "begin,\" says the instructor." .text .align 1 .globl page37 .type page37, @function page37: addi sp,sp,-16 lla a0,.LC354 sd ra,8(sp) call puts@plt lla a0,.LC355 call puts@plt lla a0,.LC356 call puts@plt lla a0,.LC357 call puts@plt lla a0,.LC358 call puts@plt lla a0,.LC359 call puts@plt lla a0,.LC360 call puts@plt lla a0,.LC361 call puts@plt lla a0,.LC362 call puts@plt lla a0,.LC363 call puts@plt lla a0,.LC364 call puts@plt ld ra,8(sp) li a0,38 addi sp,sp,16 jr ra .size page37, .-page37 .section .rodata.str1.8 .align 3 .LC365: .string "\"I am Plato-B-PHI%d, head of mutant propaganda here at the training course.\n" .align 3 .LC366: .string "If you have any questions about mutants please come to me. Today I will be" .align 3 .LC367: .string "talking about mutant detection. Detecting mutants is very easy. One simply" .align 3 .LC368: .string "watches for certain tell tale signs, such as the green scaly skin, the third" .align 3 .LC369: .string "arm growing from the forehead, or other similar disfigurements so common with" .align 3 .LC370: .string "their kind. There are, however, a few rare specimens that show no outward sign" .align 3 .LC371: .string "of their treason. This has been a significant problem, so our researchers have" .align 3 .LC372: .string "been working on a solution. I would like a volunteer to test this device,\"" .align 3 .LC373: .string "he says, holding up a ray gun looking thing. \"It is a mutant detection ray." .align 3 .LC374: .string "This little button detects for mutants, and this big button stuns them once" .align 3 .LC375: .string "they are discovered. Who would like to volunteer for a test?\"" .align 3 .LC376: .string "The Troubleshooter down the front squirms deeper into his chair." .align 3 .LC377: .string "You duck behind a chair and hope the instructor doesn't notice you" .align 3 .LC378: .string "You volunteer for the test" .text .align 1 .globl page38 .type page38, @function page38: addi sp,sp,-16 lw a2,.LANCHOR0+8 lla a1,.LC365 li a0,1 sd ra,8(sp) call __printf_chk@plt lla a0,.LC366 call puts@plt lla a0,.LC367 call puts@plt lla a0,.LC368 call puts@plt lla a0,.LC369 call puts@plt lla a0,.LC370 call puts@plt lla a0,.LC371 call puts@plt lla a0,.LC372 call puts@plt lla a0,.LC373 call puts@plt lla a0,.LC374 call puts@plt lla a0,.LC375 call puts@plt lla a0,.LC376 call puts@plt ld ra,8(sp) lla a3,.LC377 li a2,40 lla a1,.LC378 li a0,39 addi sp,sp,16 tail choose .size page38, .-page38 .section .rodata.str1.8 .align 3 .LC379: .string "You bravely volunteer to test the mutant detection gun. You stand up and walk" .align 3 .LC380: .string "down the steps to the podium, passing a very relieved Troubleshooter along the" .align 3 .LC381: .string "way. When you reach the podium Plato-B-PHI hands you the mutant detection gun" .align 3 .LC382: .string "and says, \"Here, aim the gun at that Troubleshooter and push the small button." .align 3 .LC383: .string "If you see a purple light, stun him.\" Grasping the opportunity to prove your" .align 3 .LC384: .string "worth to The Computer, you fire the mutant detection ray at the Troubleshooter." .align 3 .LC385: .string "A brilliant purple nimbus instantly surrounds his body. You slip your finger" .align 3 .LC386: .string "to the large stun button and he falls writhing to the floor." .align 3 .LC387: .string "\"Good shot,\" says the instructor as you hand him the mutant detection gun," .align 3 .LC388: .string "\"I'll see that you get a commendation for this. It seems you have the hang" .align 3 .LC389: .string "of mutant detection and elimination. You can go on to the secret society" .align 3 .LC390: .string "infiltration class. I'll see that the little mutie gets packaged for" .align 3 .LC391: .string "tomorrow's mutant dissection class.\"" .text .align 1 .globl page39 .type page39, @function page39: addi sp,sp,-16 lla a0,.LC379 sd ra,8(sp) call puts@plt lla a0,.LC380 call puts@plt lla a0,.LC381 call puts@plt lla a0,.LC382 call puts@plt lla a0,.LC383 call puts@plt lla a0,.LC384 call puts@plt lla a0,.LC385 call puts@plt lla a0,.LC386 call puts@plt lla a0,.LC387 call puts@plt lla a0,.LC388 call puts@plt lla a0,.LC389 call puts@plt lla a0,.LC390 call puts@plt lla a0,.LC391 call puts@plt ld ra,8(sp) li a0,41 addi sp,sp,16 jr ra .size page39, .-page39 .section .rodata.str1.8 .align 3 .LC392: .string "You breathe a sigh of relief as Plato-B-PHI picks on the other Troubleshooter." .align 3 .LC393: .string "\"You down here in the front,\" says the instructor pointing at the other" .align 3 .LC394: .string "Troubleshooter, \"you'll make a good volunteer. Please step forward.\"" .align 3 .LC395: .string "The Troubleshooter looks around with a `who me?' expression on his face, but" .align 3 .LC396: .string "since he is the only one visible in the audience he figures his number is up." .align 3 .LC397: .string "He walks down to the podium clutching his Action Troubleshooter(tm) doll before" .align 3 .LC398: .string "him like a weapon. \"Here,\" says Plato-B-PHI, \"take the mutant detection ray" .align 3 .LC399: .string "and point it at the audience. If there are any mutants out there we'll know" .align 3 .LC400: .string "soon enough.\" Suddenly your skin prickles with static electricity as a bright" .align 3 .LC401: .string "purple nimbus surrounds your body. \"Ha Ha, got one,\" says the instructor." .align 3 .LC402: .string "\"Stun him before he gets away.\"" .align 3 .LC403: .string "His shot hits you. You feel numb all over." .align 3 .LC404: .string "His shot just missed." .align 3 .LC405: .string "You just blew his head off. His lifeless hand drops the mutant detector ray." .align 3 .LC406: .string "You burnt a hole in the podium. He sights the mutant detector ray on you." .text .align 1 .globl page40 .type page40, @function page40: addi sp,sp,-48 lla a0,.LC392 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) sd s4,0(sp) call puts@plt lla a0,.LC393 call puts@plt lla a0,.LC394 call puts@plt lla a0,.LC395 call puts@plt lla a0,.LC396 call puts@plt lla a0,.LC397 call puts@plt lla a0,.LC398 call puts@plt lla a0,.LC399 call puts@plt lla a0,.LC400 call puts@plt lla a0,.LC401 call puts@plt lla a0,.LC402 call puts@plt call more li s0,100 li s2,29 lla s1,.LC404 li s4,39 lla s3,.LC406 j .L182 .L179: call puts@plt call rand@plt remw a5,a0,s0 mv a0,s3 ble a5,s4,.L184 call puts@plt .L182: call rand@plt mv a5,a0 remw a5,a5,s0 mv a0,s1 bgt a5,s2,.L179 lla a0,.LC403 call puts@plt ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) li a0,49 addi sp,sp,48 jr ra .L184: lla a0,.LC405 call puts@plt ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) li a0,50 addi sp,sp,48 jr ra .size page40, .-page40 .section .rodata.str1.8 .align 3 .LC407: .string "You stumble down the hallway of the Troubleshooter Training Course looking for" .align 3 .LC408: .string "your next class. Up ahead you see one of the instructors waving to you. When" .align 3 .LC409: .string "you get there he shakes your hand and says, \"I am Jung-I-PSY. Welcome to the" .align 3 .LC410: .string "secret society infiltration seminar. I hope you ...\" You don't catch the" .align 3 .LC411: .string "rest of his greeting because you're paying too much attention to his handshake;" .align 3 .LC412: .string "it is the strangest thing that has ever been done to your hand, sort of how it" .align 3 .LC413: .string "would feel if you put a neuro whip in a high energy palm massage unit." .align 3 .LC414: .string "It doesn't take you long to learn what he is up to; you feel him briefly shake" .align 3 .LC415: .string "your hand with the secret Illuminati handshake." .align 3 .LC416: .string "You ignore this secret society contact" .align 3 .LC417: .string "You respond with the proper Illuminati code phrase, \"Ewige Blumenkraft\"" .text .align 1 .globl page41 .type page41, @function page41: addi sp,sp,-16 lla a0,.LC407 sd ra,8(sp) call puts@plt lla a0,.LC408 call puts@plt lla a0,.LC409 call puts@plt lla a0,.LC410 call puts@plt lla a0,.LC411 call puts@plt lla a0,.LC412 call puts@plt lla a0,.LC413 call puts@plt lla a0,.LC414 call puts@plt lla a0,.LC415 call puts@plt ld ra,8(sp) lla a3,.LC416 li a2,43 lla a1,.LC417 li a0,42 addi sp,sp,16 tail choose .size page41, .-page41 .section .rodata.str1.8 .align 3 .LC418: .string "\"Aha, so you are a member of the elitist Illuminati secret society,\" he says" .align 3 .LC419: .string "loudly, \"that is most interesting.\" He turns to the large class already" .align 3 .LC420: .string "seated in the auditorium and says, \"You see, class, by simply using the correct" .align 3 .LC421: .string "hand shake you can identify the member of any secret society. Please keep your" .align 3 .LC422: .string "weapons trained on him while I call a guard." .align 3 .LC423: .string "You wait for the guard" .align 3 .LC424: .string "You run for it" .text .align 1 .globl page42 .type page42, @function page42: addi sp,sp,-16 lla a0,.LC418 sd ra,8(sp) call puts@plt lla a0,.LC419 call puts@plt lla a0,.LC420 call puts@plt lla a0,.LC421 call puts@plt lla a0,.LC422 call puts@plt ld ra,8(sp) lla a3,.LC423 li a2,52 lla a1,.LC424 li a0,51 addi sp,sp,16 tail choose .size page42, .-page42 .section .rodata.str1.8 .align 3 .LC425: .string "You sit through a long lecture on how to recognise and infiltrate secret" .align 3 .LC426: .string "societies, with an emphasis on mimicking secret handshakes. The basic theory," .align 3 .LC427: .string "which you realise to be sound from your Iluminati training, is that with the" .align 3 .LC428: .string "proper handshake you can pass unnoticed in any secret society gathering." .align 3 .LC429: .string "What's more, the proper handshake will open doors faster than an 'ultra shock'" .align 3 .LC430: .string "plasma cannon. You are certain that with the information you learn here you" .align 3 .LC431: .string "will easily be promoted to the next level of your Illuminati secret society." .align 3 .LC432: .string "The lecture continues for three hours, during which you have the opportunity" .align 3 .LC433: .string "to practice many different handshakes. Afterwards everyone is directed to" .align 3 .LC434: .string "attend the graduation ceremony. Before you must go you have a little time to" .align 3 .LC435: .string "talk to The Computer about, you know, certain topics." .align 3 .LC436: .string "You go to the graduation ceremony immediately" .align 3 .LC437: .string "You go looking for a computer terminal" .text .align 1 .globl page43 .type page43, @function page43: addi sp,sp,-16 lla a0,.LC425 sd ra,8(sp) call puts@plt lla a0,.LC426 call puts@plt lla a0,.LC427 call puts@plt lla a0,.LC428 call puts@plt lla a0,.LC429 call puts@plt lla a0,.LC430 call puts@plt lla a0,.LC431 call puts@plt lla a0,.LC432 call puts@plt lla a0,.LC433 call puts@plt lla a0,.LC434 call puts@plt lla a0,.LC435 call puts@plt ld ra,8(sp) lla a3,.LC436 li a2,55 lla a1,.LC437 li a0,44 addi sp,sp,16 tail choose .size page43, .-page43 .section .rodata.str1.8 .align 3 .LC438: .string "You walk down to a semi-secluded part of the training course complex and" .align 3 .LC439: .string "activate a computer terminal. \"AT YOUR SERVICE\" reads the computer screen." .align 3 .LC440: .string "You change your mind and go to the graduation ceremony" .align 3 .LC441: .string "You register yourself as a mutant" .align 3 .LC442: .string " a - You register yourself as a mutant." .align 3 .LC443: .string " b - You want to chat about the commies." .align 3 .LC444: .string " c - You change your mind and go to the graduation ceremony." .text .align 1 .globl page44 .type page44, @function page44: addi sp,sp,-32 lla a0,.LC438 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) call puts@plt lla a0,.LC439 call puts@plt lw a5,.LANCHOR1+16 beq a5,zero,.L200 lla a0,.LC192 call puts@plt lla a0,.LC442 call puts@plt lla a0,.LC443 call puts@plt lla a0,.LC444 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 li a0,55 beq s2,a5,.L193 li s1,10 .L194: ld a0,0(s0) call getc@plt bne a0,s1,.L194 li a5,97 li a0,23 beq s2,a5,.L193 li a5,98 bne s2,a5,.L197 li a0,46 .L193: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L200: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) lla a3,.LC440 li a2,55 lla a1,.LC441 li a0,23 addi sp,sp,32 tail choose .L197: li a0,55 j .L193 .size page44, .-page44 .section .rodata.str1.8 .align 3 .LC445: .string "\"Hrank Hrank,\" snorts the alarm in your living quarters. Something is up." .align 3 .LC446: .string "You look at the monitor above the bathroom mirror and see the message you have" .align 3 .LC447: .string "been waiting for all these years. \"ATTENTION TROUBLESHOOTER, YOU ARE BEING" .align 3 .LC448: .string "ACTIVATED. PLEASE REPORT IMMEDIATELY TO MISSION ASSIGNMENT ROOM A17/GAMMA/LB22." .align 3 .LC449: .string "THANK YOU. THE COMPUTER IS YOUR FRIEND.\" When you arrive at mission" .align 3 .LC450: .string "assignment room A17-gamma/LB22 you are given your previous clone's" .align 3 .LC451: .string "remaining possessions and notebook. You puzzle through your predecessor's" .align 3 .LC452: .string "cryptic notes, managing to decipher enough to lead you to the tube station and" .align 3 .LC453: .string "the tube car to GDH7-beta." .text .align 1 .globl page45 .type page45, @function page45: addi sp,sp,-16 lla a0,.LC445 sd ra,8(sp) call puts@plt lla a0,.LC446 call puts@plt lla a0,.LC447 call puts@plt lla a0,.LC448 call puts@plt lla a0,.LC449 call puts@plt lla a0,.LC450 call puts@plt lla a0,.LC451 call puts@plt lla a0,.LC452 call puts@plt lla a0,.LC453 call puts@plt ld ra,8(sp) li a0,10 addi sp,sp,16 jr ra .size page45, .-page45 .section .rodata.str1.8 .align 3 .LC454: .string "\"Why do you ask about the communists, Troubleshooter? It is not in the" .align 3 .LC455: .string "interest of your continued survival to be asking about such topics,\" says" .align 3 .LC456: .string "The Computer." .align 3 .LC457: .string "You change the subject" .align 3 .LC458: .string "You insist on talking about the communists" .text .align 1 .globl page46 .type page46, @function page46: addi sp,sp,-16 lla a0,.LC454 sd ra,8(sp) call puts@plt lla a0,.LC455 call puts@plt lla a0,.LC456 call puts@plt ld ra,8(sp) lla a3,.LC457 li a2,54 lla a1,.LC458 li a0,53 addi sp,sp,16 tail choose .size page46, .-page46 .section .rodata.str1.8 .align 3 .LC459: .string "The Computer orders the entire Vulture squadron to terminate the Troubleshooter" .align 3 .LC460: .string "Training Course. Unfortunately you too are terminated for possessing" .align 3 .LC461: .string "classified information.\n" .align 3 .LC462: .string "Don't act so innocent, we both know that you are an Illuminatus which is in" .align 3 .LC463: .string "itself an act of treason.\n" .align 3 .LC464: .string "Don't look to me for sympathy.\n" .align 3 .LC465: .string "\t\t\tTHE END" .text .align 1 .globl page47 .type page47, @function page47: addi sp,sp,-16 lla a0,.LC459 sd ra,8(sp) call puts@plt lla a0,.LC460 call puts@plt lla a0,.LC461 call puts@plt lla a0,.LC462 call puts@plt lla a0,.LC463 call puts@plt lla a0,.LC464 call puts@plt lla a0,.LC465 call puts@plt ld ra,8(sp) li a0,0 addi sp,sp,16 jr ra .size page47, .-page47 .section .rodata.str1.8 .align 3 .LC466: .string "The tubecar shoots forward as you enter, slamming you back into a pile of" .align 3 .LC467: .string "garbage. The front end rotates upward and you, the garbage and the garbage" .align 3 .LC468: .string "disposal car shoot straight up out of Alpha Complex. One of the last things" .align 3 .LC469: .string "you see is a small blue sphere slowly dwindling behind you. After you fail to" .align 3 .LC470: .string "report in, you will be assumed dead." .text .align 1 .globl page48 .type page48, @function page48: addi sp,sp,-16 lla a0,.LC466 sd ra,8(sp) call puts@plt lla a0,.LC467 call puts@plt lla a0,.LC468 call puts@plt lla a0,.LC469 call puts@plt lla a0,.LC470 call puts@plt ld ra,8(sp) li a0,45 addi sp,sp,16 tail new_clone .size page48, .-page48 .section .rodata.str1.8 .align 3 .LC471: .string "The instructor drags your inert body into a specimen detainment cage." .align 3 .LC472: .string "\"He'll make a good subject for tomorrow's mutant dissection class,\" you hear." .text .align 1 .globl page49 .type page49, @function page49: addi sp,sp,-16 lla a0,.LC471 sd ra,8(sp) call puts@plt lla a0,.LC472 call puts@plt ld ra,8(sp) li a0,32 addi sp,sp,16 tail new_clone .size page49, .-page49 .section .rodata.str1.8 .align 3 .LC473: .string "You put down the other Troubleshooter, and then wisely decide to drill a few" .align 3 .LC474: .string "holes in the instructor as well; the only good witness is a dead witness." .align 3 .LC475: .string "You continue with the training course." .text .align 1 .globl page50 .type page50, @function page50: addi sp,sp,-16 lla a0,.LC473 sd ra,8(sp) call puts@plt lla a0,.LC474 call puts@plt lla a0,.LC475 call puts@plt lla a4,.LANCHOR0 lw a5,8(a4) ld ra,8(sp) li a0,41 addiw a5,a5,1 sw a5,8(a4) addi sp,sp,16 jr ra .size page50, .-page50 .section .rodata.str1.8 .align 3 .LC476: .string "You run for it, but you don't run far. Three hundred strange and exotic" .align 3 .LC477: .string "weapons turn you into a freeze dried cloud of soot." .text .align 1 .globl page51 .type page51, @function page51: addi sp,sp,-16 lla a0,.LC476 sd ra,8(sp) call puts@plt lla a0,.LC477 call puts@plt ld ra,8(sp) li a0,32 addi sp,sp,16 tail new_clone .size page51, .-page51 .section .rodata.str1.8 .align 3 .LC478: .string "You wisely wait until the instructor returns with a Blue Internal Security" .align 3 .LC479: .string "guard. The guard leads you to an Internal Security self incrimination station." .text .align 1 .globl page52 .type page52, @function page52: addi sp,sp,-16 lla a0,.LC478 sd ra,8(sp) call puts@plt lla a0,.LC479 call puts@plt ld ra,8(sp) li a0,2 addi sp,sp,16 jr ra .size page52, .-page52 .section .rodata.str1.8 .align 3 .LC480: .string "You tell The Computer about:" .align 3 .LC481: .string "Something less dangerous" .align 3 .LC482: .string "The commies who have infiltrated the Troubleshooter Training Course\n and the impending People's Revolution" .text .align 1 .globl page53 .type page53, @function page53: addi sp,sp,-32 lla a0,.LC480 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC481 lla a2,.LC482 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L218 li s1,10 .L219: ld a0,0(s0) call getc@plt bne a0,s1,.L219 li a5,97 li a0,47 bne s2,a5,.L218 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L218: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,54 addi sp,sp,32 jr ra .size page53, .-page53 .section .rodata.str1.8 .align 3 .LC483: .string "\"Do not try to change the subject, Troubleshooter,\" says The Computer." .align 3 .LC484: .string "\"It is a serious crime to ask about the communists. You will be terminated" .align 3 .LC485: .string "immediately. Thank you for your inquiry. The Computer is your friend.\"" .align 3 .LC486: .string "Steel bars drop to your left and right, trapping you here in the hallway." .align 3 .LC487: .string "A spotlight beams from the computer console to brilliantly iiluminate you while" .align 3 .LC488: .string "the speaker above your head rapidly repeats \"Traitor, Traitor, Traitor.\"" .align 3 .LC489: .string "It doesn't take long for a few guards to notice your predicament and come to" .align 3 .LC490: .string "finish you off." .text .align 1 .globl page54 .type page54, @function page54: addi sp,sp,-16 lla a0,.LC483 sd ra,8(sp) call puts@plt lla a0,.LC484 call puts@plt lla a0,.LC485 call puts@plt lla a0,.LC486 call puts@plt lla a0,.LC487 call puts@plt lla a0,.LC488 call puts@plt lla a0,.LC489 call puts@plt lla a0,.LC490 call puts@plt lw a5,.LANCHOR1+20 bne a5,zero,.L225 ld ra,8(sp) li a0,45 addi sp,sp,16 tail new_clone .L225: ld ra,8(sp) li a0,32 addi sp,sp,16 tail new_clone .size page54, .-page54 .section .rodata.str1.8 .align 3 .LC491: .string "You and 300 other excited graduates are marched from the lecture hall and into" .align 3 .LC492: .string "a large auditorium for the graduation exercise. The auditorium is" .align 3 .LC493: .string "extravagantly decorated in the colours of the graduating class. Great red and" .align 3 .LC494: .string "green plasti-paper ribbons drape from the walls, while a huge sign reading" .align 3 .LC495: .string "\"Congratulations class of GDH7-beta-203.44/A\" hangs from the raised stage down" .align 3 .LC496: .string "front. Once everyone finds a seat the ceremony begins. Jung-I-PSY is the" .align 3 .LC497: .string "first to speak, \"Congratulations students, you have successfully survived the" .align 3 .LC498: .string "Troubleshooter Training Course. It always brings me great pride to address" .align 3 .LC499: .string "the graduating class, for I know, as I am sure you do too, that you are now" .align 3 .LC500: .string "qualified for the most perilous missions The Computer may select for you. The" .align 3 .LC501: .string "thanks is not owed to us of the teaching staff, but to all of you, who have" .align 3 .LC502: .string "persevered and graduated. Good luck and die trying.\" Then the instructor" .align 3 .LC503: .string "begins reading the names of the students who one by one walk to the front of" .align 3 .LC504: .string "the auditorium and receive their diplomas. Soon it is your turn," .align 3 .LC505: .string "\"Philo-R-DMD, graduating a master of mutant identification and secret society" .align 3 .LC506: .string "infiltration.\" You walk up and receive your diploma from Plato-B-PHI%d, then\n" .align 3 .LC507: .string "return to your seat. There is another speech after the diplomas are handed" .align 3 .LC508: .string "out, but it is cut short by by rapid fire laser bursts from the high spirited" .align 3 .LC509: .string "graduating class. You are free to return to your barracks to wait, trained" .align 3 .LC510: .string "and fully qualified, for your next mission. You also get that cherished" .align 3 .LC511: .string "promotion from the Illuminati secret society. In a week you receive a" .align 3 .LC512: .string "detailed Training Course bill totalling 1,523 credits." .text .align 1 .globl page55 .type page55, @function page55: addi sp,sp,-16 lla a0,.LC491 sd ra,8(sp) call puts@plt lla a0,.LC492 call puts@plt lla a0,.LC493 call puts@plt lla a0,.LC494 call puts@plt lla a0,.LC495 call puts@plt lla a0,.LC496 call puts@plt lla a0,.LC497 call puts@plt lla a0,.LC498 call puts@plt lla a0,.LC499 call puts@plt lla a0,.LC500 call puts@plt lla a0,.LC501 call puts@plt lla a0,.LC502 call puts@plt lla a0,.LC503 call puts@plt lla a0,.LC504 call puts@plt lla a0,.LC505 call puts@plt lw a2,.LANCHOR0+8 lla a1,.LC506 li a0,1 call __printf_chk@plt lla a0,.LC507 call puts@plt lla a0,.LC508 call puts@plt lla a0,.LC509 call puts@plt lla a0,.LC510 call puts@plt lla a0,.LC511 call puts@plt lla a0,.LC512 call puts@plt lla a0,.LC465 call puts@plt ld ra,8(sp) li a0,0 addi sp,sp,16 jr ra .size page55, .-page55 .section .rodata.str1.8 .align 3 .LC513: .string "That familiar strange feeling of deja'vu envelops you again. It is hard to" .align 3 .LC514: .string "say, but whatever is on the other side of the door does not seem to be intended" .align 3 .LC515: .string "for you." .align 3 .LC516: .string "You go looking for more information" .align 3 .LC517: .string "You open the door and step through" .text .align 1 .globl page56 .type page56, @function page56: addi sp,sp,-16 lla a0,.LC513 sd ra,8(sp) call puts@plt lla a0,.LC514 call puts@plt lla a0,.LC515 call puts@plt ld ra,8(sp) lla a3,.LC516 li a2,22 lla a1,.LC517 li a0,33 addi sp,sp,16 tail choose .size page56, .-page56 .section .rodata.str1.8 .align 3 .LC518: .string "In the centre of the room is a table and a single chair. There is an Orange" .align 3 .LC519: .string "folder on the table top, but you can't make out the lettering on it." .align 3 .LC520: .string "You leave the room" .align 3 .LC521: .string "You sit down and read the folder" .text .align 1 .globl page57 .type page57, @function page57: addi sp,sp,-32 lla a0,.LC518 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC519 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC520 lla a2,.LC521 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L232 li s1,10 .L233: ld a0,0(s0) call getc@plt bne a0,s1,.L233 li a5,97 li a0,11 bne s2,a5,.L232 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L232: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,12 addi sp,sp,32 jr ra .size page57, .-page57 .align 1 .globl next_page .type next_page, @function next_page: addi sp,sp,-32 sd s0,16(sp) mv s0,a0 li a0,10 sd ra,24(sp) sd s1,8(sp) call putchar@plt li a5,57 bgtu s0,a5,.L238 lla a4,.L241 slli a5,s0,2 add a5,a5,a4 lw a5,0(a5) add a5,a5,a4 jr a5 .section .rodata .align 2 .align 2 .L241: .word .L299-.L241 .word .L297-.L241 .word .L296-.L241 .word .L295-.L241 .word .L294-.L241 .word .L293-.L241 .word .L292-.L241 .word .L291-.L241 .word .L290-.L241 .word .L289-.L241 .word .L288-.L241 .word .L287-.L241 .word .L286-.L241 .word .L285-.L241 .word .L284-.L241 .word .L283-.L241 .word .L282-.L241 .word .L281-.L241 .word .L280-.L241 .word .L279-.L241 .word .L278-.L241 .word .L277-.L241 .word .L276-.L241 .word .L275-.L241 .word .L274-.L241 .word .L273-.L241 .word .L272-.L241 .word .L238-.L241 .word .L270-.L241 .word .L269-.L241 .word .L268-.L241 .word .L267-.L241 .word .L266-.L241 .word .L265-.L241 .word .L264-.L241 .word .L263-.L241 .word .L262-.L241 .word .L261-.L241 .word .L260-.L241 .word .L259-.L241 .word .L258-.L241 .word .L257-.L241 .word .L256-.L241 .word .L255-.L241 .word .L254-.L241 .word .L253-.L241 .word .L252-.L241 .word .L251-.L241 .word .L250-.L241 .word .L249-.L241 .word .L248-.L241 .word .L247-.L241 .word .L246-.L241 .word .L245-.L241 .word .L244-.L241 .word .L243-.L241 .word .L242-.L241 .word .L240-.L241 .text .L299: mv s1,s0 .L238: ld ra,24(sp) ld s0,16(sp) mv a0,s1 ld s1,8(sp) addi sp,sp,32 jr ra .L258: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page40 .L259: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page39 .L260: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page38 .L261: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page37 .L262: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page36 .L263: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page35 .L264: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page34 .L265: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page33 .L266: lla a0,.LC295 call puts@plt lla a0,.LC296 call puts@plt lla a0,.LC297 call puts@plt lla a0,.LC298 call puts@plt lla a0,.LC299 call puts@plt li s1,22 j .L238 .L242: lla a0,.LC513 call puts@plt lla a0,.LC514 call puts@plt lla a0,.LC515 call puts@plt lla a3,.LC516 li a2,22 lla a1,.LC517 li a0,33 .L301: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail choose .L240: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page57 .L296: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page2 .L297: lla a0,.LC42 call puts@plt lla a0,.LC43 call puts@plt lla a0,.LC44 call puts@plt li s1,57 j .L238 .L292: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page6 .L293: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page5 .L294: lla a0,.LC62 call puts@plt lla a0,.LC63 call puts@plt lla a0,.LC64 call puts@plt li s1,9 j .L238 .L250: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page48 .L251: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page47 .L252: lla a0,.LC454 call puts@plt lla a0,.LC455 call puts@plt lla a0,.LC456 call puts@plt lla a3,.LC457 li a2,54 lla a1,.LC458 li a0,53 j .L301 .L253: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page45 .L254: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page44 .L255: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page43 .L256: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page42 .L257: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page41 .L246: lla a0,.LC478 call puts@plt lla a0,.LC479 call puts@plt li s1,2 j .L238 .L247: lla a0,.LC476 call puts@plt lla a0,.LC477 .L303: call puts@plt li a0,32 .L302: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail new_clone .L248: lla a0,.LC473 call puts@plt lla a0,.LC474 call puts@plt lla a0,.LC475 call puts@plt lla a4,.LANCHOR0 lw a5,8(a4) li s1,41 addiw a5,a5,1 sw a5,8(a4) j .L238 .L249: lla a0,.LC471 call puts@plt lla a0,.LC472 j .L303 .L244: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page54 .L245: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page53 .L243: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page55 .L283: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page15 .L295: lla a0,.LC57 call puts@plt lla a0,.LC58 call puts@plt lla a0,.LC59 call puts@plt lla a3,.LC60 li a2,5 lla a1,.LC61 li a0,4 j .L301 .L284: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page14 .L285: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page13 .L286: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page12 .L287: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page11 .L288: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page10 .L289: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page9 .L290: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page8 .L291: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page7 .L267: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page31 .L268: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page30 .L269: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page29 .L270: lla a0,.LC263 call puts@plt li s1,26 j .L238 .L272: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page26 .L273: lla a0,.LC253 call puts@plt lla a0,.LC254 call puts@plt lla a0,.LC255 call puts@plt lla a3,.LC256 li a2,26 lla a1,.LC257 li a0,28 j .L301 .L274: lla a0,.LC248 call puts@plt lla a0,.LC249 call puts@plt lla a0,.LC250 call puts@plt lla a3,.LC251 li a2,25 lla a1,.LC252 li a0,28 j .L301 .L275: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page23 .L276: lla a0,.LC241 call puts@plt call rand@plt sraiw a4,a0,31 srliw a4,a4,30 addw a5,a4,a0 andi a5,a5,3 subw a5,a5,a4 sext.w a3,a5 li a4,3 bgtu a3,a4,.L238 slli a4,a5,32 srli a5,a4,30 lla a4,.LANCHOR2 add a5,a4,a5 lw s1,0(a5) j .L238 .L277: lla a0,.LC237 call puts@plt lla a0,.LC238 call puts@plt lla a0,.LC239 call puts@plt lla a0,.LC240 call puts@plt li a0,45 j .L302 .L278: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page20 .L279: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page19 .L280: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page18 .L281: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) addi sp,sp,32 tail page17 .L282: lla a0,.LC196 call puts@plt lla a0,.LC197 call puts@plt lla a0,.LC198 call puts@plt lla a0,.LC199 call puts@plt lla a0,.LC200 call puts@plt li a5,1 sw a5,.LANCHOR1+4,a4 li s1,22 j .L238 .size next_page, .-next_page .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s1,40(sp) sd s3,24(sp) sd s4,16(sp) sd s5,8(sp) sd s6,0(sp) sd s0,48(sp) sd s2,32(sp) call instructions call more call character call more lla s3,.LANCHOR0 lla s5,.LC39 la s4,stdout li s1,10 li s6,112 .L305: la s0,stdin .L306: lw a0,12(s3) call next_page sw a0,12(s3) beq a0,zero,.L318 mv a1,s5 li a0,1 call __printf_chk@plt ld a0,0(s4) call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff beq s2,s1,.L306 .L307: ld a0,0(s0) call getc@plt bne a0,s1,.L307 bne s2,s6,.L306 call character mv a1,s5 li a0,1 call __printf_chk@plt ld a0,0(s4) call fflush@plt ld a0,0(s0) call getc@plt andi a0,a0,0xff beq a0,s1,.L306 .L310: ld a0,0(s0) call getc@plt bne a0,s1,.L310 j .L305 .L318: ld ra,56(sp) ld s0,48(sp) ld s1,40(sp) ld s2,32(sp) ld s3,24(sp) ld s4,16(sp) ld s5,8(sp) ld s6,0(sp) addi sp,sp,64 jr ra .size main, .-main .globl killer_count .globl blast_door .globl plato_clone .globl read_letter .globl hit_points .globl action_doll .globl ultra_violet .globl computer_request .globl page .globl clone .data .align 2 .set .LANCHOR0,. + 0 .type clone, @object .size clone, 4 clone: .word 1 .type hit_points, @object .size hit_points, 4 hit_points: .word 10 .type plato_clone, @object .size plato_clone, 4 plato_clone: .word 3 .type page, @object .size page, 4 page: .word 1 .bss .align 2 .set .LANCHOR1,. + 0 .type ultra_violet, @object .size ultra_violet, 4 ultra_violet: .zero 4 .type action_doll, @object .size action_doll, 4 action_doll: .zero 4 .type killer_count, @object .size killer_count, 4 killer_count: .zero 4 .type computer_request, @object .size computer_request, 4 computer_request: .zero 4 .type read_letter, @object .size read_letter, 4 read_letter: .zero 4 .type blast_door, @object .size blast_door, 4 blast_door: .zero 4 .section .rodata .align 3 .set .LANCHOR2,. + 0 .type CSWTCH.56, @object .size CSWTCH.56, 16 CSWTCH.56: .word 18 .word 15 .word 18 .word 29 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "paranoia.c" .option pic .text .align 1 .globl get_char .type get_char, @function get_char: la a5,stdout ld a0,0(a5) addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L2 li s1,10 .L3: ld a0,0(s0) call getc@plt bne a0,s1,.L3 .L2: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) mv a0,s2 ld s2,0(sp) addi sp,sp,32 jr ra .size get_char, .-get_char .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nClone %d just died.\n" .align 3 .LC1: .string "\n*** You Lose ***\n\nAll your clones are dead. Your name has been stricken from the records.\n\n\t\t\tTHE END" .align 3 .LC2: .string "Clone %d now activated.\n" .text .align 1 .globl new_clone .type new_clone, @function new_clone: addi sp,sp,-32 sd s1,8(sp) lla s1,.LANCHOR0 lw a2,0(s1) sd s0,16(sp) lla a1,.LC0 mv s0,a0 li a0,1 sd ra,24(sp) call __printf_chk@plt lw a5,0(s1) li a4,6 addiw a2,a5,1 sw a2,0(s1) ble a2,a4,.L8 lla a0,.LC1 call puts@plt ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) li a0,0 addi sp,sp,32 jr ra .L8: lla a1,.LC2 li a0,1 call __printf_chk@plt ld ra,24(sp) sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 mv a0,s0 ld s0,16(sp) li a5,10 sw a5,4(s1) sw zero,.LANCHOR1+8,a5 ld s1,8(sp) addi sp,sp,32 jr ra .size new_clone, .-new_clone .align 1 .globl dice_roll .type dice_roll, @function dice_roll: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) ble a0,zero,.L14 mv s0,a0 mv s2,a1 li s1,0 .L13: call rand@plt remw a5,a0,s2 addiw s0,s0,-1 addiw a5,a5,1 addw s1,a5,s1 bne s0,zero,.L13 ld ra,24(sp) ld s0,16(sp) ld s2,0(sp) mv a0,s1 ld s1,8(sp) addi sp,sp,32 jr ra .L14: ld ra,24(sp) ld s0,16(sp) li s1,0 ld s2,0(sp) mv a0,s1 ld s1,8(sp) addi sp,sp,32 jr ra .size dice_roll, .-dice_roll .section .rodata.str1.8 .align 3 .LC3: .string "\n\n\n\nWelcome to Paranoia!\n" .align 3 .LC4: .string "HOW TO PLAY:\n" .align 3 .LC5: .string " Just press <RETURN> until you are asked to make a choice." .align 3 .LC6: .string " Select 'a' or 'b' or whatever for your choice, then press <RETURN>." .align 3 .LC7: .string " You may select 'p' at any time to get a display of your statistics." .align 3 .LC8: .string " Always choose the least dangerous option. Continue doing this until you win." .align 3 .LC9: .string " At times you will use a skill or engage in combat and and will be informed of" .align 3 .LC10: .string " the outcome. These sections will be self explanatory.\n" .align 3 .LC11: .string "HOW TO DIE:\n" .align 3 .LC12: .string " As Philo-R-DMD you will die at times during the adventure." .align 3 .LC13: .string " When this happens you will be given an new clone at a particular location." .align 3 .LC14: .string " The new Philo-R will usually have to retrace some of the old Philo-R's path;" .align 3 .LC15: .string " hopefully he won't make the same mistake as his predecessor.\n" .align 3 .LC16: .string "HOW TO WIN:\n" .align 3 .LC17: .string " Simply complete the mission before you expend all six clones." .align 3 .LC18: .string " If you make it, congratulations." .align 3 .LC19: .string " If not, you can try again later." .text .align 1 .globl instructions .type instructions, @function instructions: addi sp,sp,-16 lla a0,.LC3 sd ra,8(sp) call puts@plt lla a0,.LC4 call puts@plt lla a0,.LC5 call puts@plt lla a0,.LC6 call puts@plt lla a0,.LC7 call puts@plt lla a0,.LC8 call puts@plt lla a0,.LC9 call puts@plt lla a0,.LC10 call puts@plt lla a0,.LC11 call puts@plt lla a0,.LC12 call puts@plt lla a0,.LC13 call puts@plt lla a0,.LC14 call puts@plt lla a0,.LC15 call puts@plt lla a0,.LC16 call puts@plt lla a0,.LC17 call puts@plt lla a0,.LC18 call puts@plt ld ra,8(sp) lla a0,.LC19 addi sp,sp,16 tail puts@plt .size instructions, .-instructions .section .rodata.str1.8 .align 3 .LC20: .string "===============================================================================" .align 3 .LC21: .string "The Character : Philo-R-DMD %d\n" .align 3 .LC22: .string "Primary Attributes Secondary Attributes" .align 3 .LC23: .string "Strength ..................... 13 Carrying Capacity ................. 30" .align 3 .LC24: .string "Endurance .................... 13 Damage Bonus ....................... 0" .align 3 .LC25: .string "Agility ...................... 15 Macho Bonus ....................... -1" .align 3 .LC26: .string "Manual Dexterity ............. 15 Melee Bonus ...................... +5%%\n" .align 3 .LC27: .string "Moxie ........................ 13 Aimed Weapon Bonus .............. +10%%\n" .align 3 .LC28: .string "Chutzpah ...................... 8 Comprehension Bonus .............. +4%%\n" .align 3 .LC29: .string "Mechanical Aptitude .......... 14 Believability Bonus .............. +5%%\n" .align 3 .LC30: .string "Power Index .................. 10 Repair Bonus ..................... +5%%\n" .align 3 .LC31: .string "Credits: 160 Secret Society: Illuminati Secret Society Rank: 1" .align 3 .LC32: .string "Service Group: Power Services Mutant Power: Precognition" .align 3 .LC33: .string "Weapon: laser pistol; to hit, 40%%; type, L; Range, 50m; Reload, 6r; Malfnt, 00\n" .align 3 .LC34: .string "Skills: Basics 1(20%%), Aimed Weapon Combat 2(35%%), Laser 3(40%%),\n Personal Development 1(20%%), Communications 2(29%%), Intimidation 3(34%%)\n" .align 3 .LC35: .string "Equipment: Red Reflec Armour, Laser Pistol, Laser Barrel (red)," .align 3 .LC36: .string " Notebook & Stylus, Knife, Com Unit 1, Jump suit," .align 3 .LC37: .string " Secret Illuminati Eye-In-The-Pyramid(tm) Decoder ring," .align 3 .LC38: .string " Utility Belt & Pouches" .text .align 1 .globl character .type character, @function character: addi sp,sp,-16 lla a0,.LC20 sd ra,8(sp) call puts@plt lw a2,.LANCHOR0 lla a1,.LC21 li a0,1 call __printf_chk@plt lla a0,.LC22 call puts@plt lla a0,.LC20 call puts@plt lla a0,.LC23 call puts@plt lla a0,.LC24 call puts@plt lla a0,.LC25 call puts@plt lla a1,.LC26 li a0,1 call __printf_chk@plt lla a1,.LC27 li a0,1 call __printf_chk@plt lla a1,.LC28 li a0,1 call __printf_chk@plt lla a1,.LC29 li a0,1 call __printf_chk@plt lla a1,.LC30 li a0,1 call __printf_chk@plt lla a0,.LC20 call puts@plt lla a0,.LC31 call puts@plt lla a0,.LC32 call puts@plt lla a1,.LC33 li a0,1 call __printf_chk@plt lla a1,.LC34 li a0,1 call __printf_chk@plt lla a0,.LC35 call puts@plt lla a0,.LC36 call puts@plt lla a0,.LC37 call puts@plt lla a0,.LC38 call puts@plt ld ra,8(sp) lla a0,.LC20 addi sp,sp,16 tail puts@plt .size character, .-character .section .rodata.str1.8 .align 3 .LC39: .string "---------- More ----------" .text .align 1 .globl more .type more, @function more: addi sp,sp,-48 lla a1,.LC39 li a0,1 sd ra,40(sp) sd s0,32(sp) sd s2,16(sp) sd s3,8(sp) sd s1,24(sp) la s3,stdout call __printf_chk@plt ld a0,0(s3) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L22 li s1,10 .L23: ld a0,0(s0) call getc@plt bne a0,s1,.L23 li a5,112 beq s2,a5,.L28 .L22: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L28: call character lla a1,.LC39 li a0,1 call __printf_chk@plt ld a0,0(s3) call fflush@plt ld a0,0(s0) call getc@plt andi a0,a0,0xff beq a0,s1,.L22 li s1,10 .L24: ld a0,0(s0) call getc@plt bne a0,s1,.L24 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .size more, .-more .section .rodata.str1.8 .align 3 .LC40: .string "\nSelect 'a' or 'b' :" .align 3 .LC41: .string " a - %s.\n b - %s.\n" .text .align 1 .globl choose .type choose, @function choose: addi sp,sp,-48 sd s4,0(sp) mv s4,a0 lla a0,.LC40 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) mv s0,a1 sd s2,16(sp) sd s3,8(sp) mv s1,a3 mv s3,a2 call puts@plt mv a2,s0 mv a3,s1 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L30 li s1,10 .L31: ld a0,0(s0) call getc@plt bne a0,s1,.L31 li a5,97 mv a0,s4 bne s2,a5,.L30 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) addi sp,sp,48 jr ra .L30: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s4,0(sp) mv a0,s3 ld s3,8(sp) addi sp,sp,48 jr ra .size choose, .-choose .section .rodata.str1.8 .align 3 .LC42: .string " You wake up face down on the red and pink checked E-Z-Kleen linoleum floor." .align 3 .LC43: .string " You recognise the pattern, it's the type preferred in the internal security\nbriefing cells. When you finally look around you, you see that you are alone" .align 3 .LC44: .string "in a large mission briefing room." .text .align 1 .globl page1 .type page1, @function page1: addi sp,sp,-16 lla a0,.LC42 sd ra,8(sp) call puts@plt lla a0,.LC43 call puts@plt lla a0,.LC44 call puts@plt ld ra,8(sp) li a0,57 addi sp,sp,16 jr ra .size page1, .-page1 .section .rodata.str1.8 .align 3 .LC45: .string "\"Greetings,\" says the kindly Internal Security self incrimination expert who" .align 3 .LC46: .string "meets you at the door, \"How are we doing today?\" He offers you a doughnut" .align 3 .LC47: .string "and coffee and asks what brings you here. This doesn't seem so bad, so you" .align 3 .LC48: .string "tell him that you have come to confess some possible security lapses. He" .align 3 .LC49: .string "smiles knowingly, deftly catching your coffee as you slump to the floor." .align 3 .LC50: .string "\"Nothing to be alarmed about; it's just the truth serum,\" he says," .align 3 .LC51: .string "dragging you back into a discussion room." .align 3 .LC52: .string "The next five hours are a dim haze, but you can recall snatches of conversation" .align 3 .LC53: .string "about your secret society, your mutant power, and your somewhat paranoid" .align 3 .LC54: .string "distrust of The Computer. This should explain why you are hogtied and moving" .align 3 .LC55: .string "slowly down the conveyer belt towards the meat processing unit in Food" .align 3 .LC56: .string "Services." .text .align 1 .globl page2 .type page2, @function page2: addi sp,sp,-16 lla a0,.LC45 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC46 call puts@plt lla a0,.LC47 call puts@plt lla a0,.LC48 call puts@plt lla a0,.LC49 call puts@plt lla a0,.LC50 call puts@plt lla a0,.LC51 call puts@plt lla a0,.LC52 call puts@plt lla a0,.LC53 call puts@plt lla a0,.LC54 call puts@plt lla a0,.LC55 call puts@plt lla a0,.LC56 call puts@plt lla s0,.LANCHOR0 lw a4,.LANCHOR1+12 li a5,1 lw a2,0(s0) lla a1,.LC0 li a0,1 beq a4,a5,.L44 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L45 .L42: lla a0,.LC1 call puts@plt ld ra,8(sp) ld s0,0(sp) li a0,0 addi sp,sp,16 jr ra .L45: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,32 addi sp,sp,16 jr ra .L44: call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) bgt a2,a4,.L42 lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,45 addi sp,sp,16 jr ra .size page2, .-page2 .section .rodata.str1.8 .align 3 .LC57: .string "You walk to the nearest Computer terminal and request more information about" .align 3 .LC58: .string "Christmas. The Computer says, \"That is an A-1 ULTRAVIOLET ONLY IMMEDIATE" .align 3 .LC59: .string "TERMINATION classified topic. What is your clearance please, Troubleshooter?\"" .align 3 .LC60: .string "You lie and claim Ultraviolet clearance" .align 3 .LC61: .string "You give your correct clearance" .text .align 1 .globl page3 .type page3, @function page3: addi sp,sp,-32 lla a0,.LC57 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC58 call puts@plt lla a0,.LC59 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC60 lla a2,.LC61 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L47 li s1,10 .L48: ld a0,0(s0) call getc@plt bne a0,s1,.L48 li a5,97 li a0,4 bne s2,a5,.L47 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L47: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,5 addi sp,sp,32 jr ra .size page3, .-page3 .section .rodata.str1.8 .align 3 .LC62: .string "\"That is classified information, Troubleshooter, thank you for your inquiry." .align 3 .LC63: .string " Please report to an Internal Security self incrimination station as soon as" .align 3 .LC64: .string " possible.\"" .text .align 1 .globl page4 .type page4, @function page4: addi sp,sp,-16 lla a0,.LC62 sd ra,8(sp) call puts@plt lla a0,.LC63 call puts@plt lla a0,.LC64 call puts@plt ld ra,8(sp) li a0,9 addi sp,sp,16 jr ra .size page4, .-page4 .section .rodata.str1.8 .align 3 .LC65: .string "The computer says, \"Troubleshooter, you are not wearing the correct colour" .align 3 .LC66: .string "uniform. You must put on an Ultraviolet uniform immediately. I have seen to" .align 3 .LC67: .string "your needs and ordered one already; it will be here shortly. Please wait with" .align 3 .LC68: .string "your back to the wall until it arrives.\" In less than a minute an infrared" .align 3 .LC69: .string "arrives carrying a white bundle. He asks you to sign for it, then hands it to" .align 3 .LC70: .string "you and stands back, well outside of a fragmentation grenade's blast radius." .align 3 .LC71: .string "You finally come to your senses and run for it" .align 3 .LC72: .string "You open the package and put on the uniform" .text .align 1 .globl page5 .type page5, @function page5: addi sp,sp,-32 lla a0,.LC65 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC66 call puts@plt lla a0,.LC67 call puts@plt lla a0,.LC68 call puts@plt lla a0,.LC69 call puts@plt lla a0,.LC70 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC71 lla a2,.LC72 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L56 li s1,10 .L57: ld a0,0(s0) call getc@plt bne a0,s1,.L57 li a5,97 li a0,6 bne s2,a5,.L56 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L56: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,7 addi sp,sp,32 jr ra .size page5, .-page5 .section .rodata.str1.8 .align 3 .LC73: .string "The uniform definitely makes you look snappy and pert. It really looks" .align 3 .LC74: .string "impressive, and even has the new lopsided lapel fashion that you admire so" .align 3 .LC75: .string "much. What's more, citizens of all ranks come to obsequious attention as you" .align 3 .LC76: .string "walk past. This isn't so bad being an Ultraviolet. You could probably come" .align 3 .LC77: .string "to like it, given time." .align 3 .LC78: .string "The beeping computer terminal interrupts your musings." .text .align 1 .globl page6 .type page6, @function page6: addi sp,sp,-16 lla a0,.LC73 sd ra,8(sp) call puts@plt lla a0,.LC74 call puts@plt lla a0,.LC75 call puts@plt lla a0,.LC76 call puts@plt lla a0,.LC77 call puts@plt lla a0,.LC78 call puts@plt ld ra,8(sp) li a5,1 sw a5,.LANCHOR1,a4 li a0,8 addi sp,sp,16 jr ra .size page6, .-page6 .section .rodata.str1.8 .align 3 .LC79: .string "The corridor lights dim and are replaced by red battle lamps as the Security" .align 3 .LC80: .string "Breach alarms howl all around you. You run headlong down the corridor and" .align 3 .LC81: .string "desperately windmill around a corner, only to collide with a squad of 12 Blue" .align 3 .LC82: .string "clearance Vulture squadron soldiers. \"Stop, Slime Face,\" shouts the" .align 3 .LC83: .string "commander, \"or there won't be enough of you left for a tissue sample.\"" .align 3 .LC84: .string "\"All right, soldiers, stuff the greasy traitor into the uniform,\" he orders," .align 3 .LC85: .string "waving the business end of his blue laser scant inches from your nose." .align 3 .LC86: .string "With his other hand he shakes open a white bundle to reveal a pristine new" .align 3 .LC87: .string "Ultraviolet citizen's uniform." .align 3 .LC88: .string "One of the Vulture squadron Troubleshooters grabs you by the neck in the" .align 3 .LC89: .string "exotic and very painful Vulture Clamp(tm) death grip (you saw a special about" .align 3 .LC90: .string "it on the Teela O'Malley show), while the rest tear off your clothes and" .align 3 .LC91: .string "force you into the Ultraviolet uniform. The moment you are dressed they step" .align 3 .LC92: .string "clear and stand at attention." .align 3 .LC93: .string "\"Thank you for your cooperation, sir,\" says the steely eyed leader of the" .align 3 .LC94: .string "Vulture Squad. \"We will be going about our business now.\" With perfect" .align 3 .LC95: .string "timing the Vultures wheel smartly and goosestep down the corridor." .align 3 .LC96: .string "Special Note: don't make the mistake of assuming that your skills have" .align 3 .LC97: .string "improved any because of the uniform; you're only a Red Troubleshooter" .align 3 .LC98: .string "traitorously posing as an Ultraviolet, and don't you forget it!" .align 3 .LC99: .string "Suddenly, a computer terminal comes to life beside you." .text .align 1 .globl page7 .type page7, @function page7: addi sp,sp,-16 lla a0,.LC79 sd ra,8(sp) call puts@plt lla a0,.LC80 call puts@plt lla a0,.LC81 call puts@plt lla a0,.LC82 call puts@plt lla a0,.LC83 call puts@plt lla a0,.LC84 call puts@plt lla a0,.LC85 call puts@plt lla a0,.LC86 call puts@plt lla a0,.LC87 call puts@plt lla a0,.LC88 call puts@plt lla a0,.LC89 call puts@plt lla a0,.LC90 call puts@plt lla a0,.LC91 call puts@plt lla a0,.LC92 call puts@plt lla a0,.LC93 call puts@plt lla a0,.LC94 call puts@plt lla a0,.LC95 call puts@plt lla a0,.LC96 call puts@plt lla a0,.LC97 call puts@plt lla a0,.LC98 call puts@plt lla a0,.LC99 call puts@plt ld ra,8(sp) li a5,1 sw a5,.LANCHOR1,a4 li a0,8 addi sp,sp,16 jr ra .size page7, .-page7 .section .rodata.str1.8 .align 3 .LC100: .string "\"Now, about your question, citizen. Christmas was an old world marketing ploy" .align 3 .LC101: .string "to induce lower clearance citizens to purchase vast quantities of goods, thus" .align 3 .LC102: .string "accumulation a large amount of credit under the control of a single class of" .align 3 .LC103: .string "citizen known as Retailers. The strategy used is to imply that all good" .align 3 .LC104: .string "citizens give gifts during Christmas, thus if one wishes to be a valuable" .align 3 .LC105: .string "member of society one must also give gifts during Christmas. More valuable" .align 3 .LC106: .string "gifts make one a more valuable member, and thus did the Retailers come to" .align 3 .LC107: .string "control a disproportionate amount of the currency. In this way Christmas" .align 3 .LC108: .string "eventually caused the collapse of the old world. Understandably, Christmas" .align 3 .LC109: .string "has been declared a treasonable practice in Alpha Complex." .align 3 .LC110: .string "Thank you for your inquiry.\"" .align 3 .LC111: .string "You continue on your way to GDH7-beta." .text .align 1 .globl page8 .type page8, @function page8: addi sp,sp,-16 lla a0,.LC100 sd ra,8(sp) call puts@plt lla a0,.LC101 call puts@plt lla a0,.LC102 call puts@plt lla a0,.LC103 call puts@plt lla a0,.LC104 call puts@plt lla a0,.LC105 call puts@plt lla a0,.LC106 call puts@plt lla a0,.LC107 call puts@plt lla a0,.LC108 call puts@plt lla a0,.LC109 call puts@plt lla a0,.LC110 call puts@plt lla a0,.LC111 call puts@plt ld ra,8(sp) li a0,10 addi sp,sp,16 jr ra .size page8, .-page8 .section .rodata.str1.8 .align 3 .LC112: .string "As you walk toward the tubecar that will take you to GDH7-beta, you pass one" .align 3 .LC113: .string "of the bright blue and orange Internal Security self incrimination stations." .align 3 .LC114: .string "Inside, you can see an IS agent cheerfully greet an infrared citizen and then" .align 3 .LC115: .string "lead him at gunpoint into one of the rubber lined discussion rooms." .align 3 .LC116: .string "You just continue blithely on past" .align 3 .LC117: .string "You decide to stop here and chat, as ordered by The Computer" .text .align 1 .globl page9 .type page9, @function page9: addi sp,sp,-32 lla a0,.LC112 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC113 call puts@plt lla a0,.LC114 call puts@plt lla a0,.LC115 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC116 lla a2,.LC117 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L69 li s1,10 .L70: ld a0,0(s0) call getc@plt bne a0,s1,.L70 li a5,97 bne s2,a5,.L69 ld ra,24(sp) ld s0,16(sp) li a5,1 sw a5,.LANCHOR1+12,a4 ld s1,8(sp) ld s2,0(sp) li a0,2 addi sp,sp,32 jr ra .L69: ld ra,24(sp) ld s0,16(sp) li a5,0 sw a5,.LANCHOR1+12,a4 ld s1,8(sp) ld s2,0(sp) li a0,10 addi sp,sp,32 jr ra .size page9, .-page9 .section .rodata.str1.8 .align 3 .LC118: .string "You stroll briskly down the corridor, up a ladder, across an unrailed catwalk," .align 3 .LC119: .string "under a perilously swinging blast door in urgent need of repair, and into" .align 3 .LC120: .string "tubecar grand central. This is the bustling hub of Alpha Complex tubecar" .align 3 .LC121: .string "transportation. Before you spreads a spaghetti maze of magnalift tube tracks" .align 3 .LC122: .string "and linear accelerators. You bravely study the specially enhanced 3-D tube" .align 3 .LC123: .string "route map; you wouldn't be the first Troubleshooter to take a fast tube ride" .align 3 .LC124: .string "to nowhere." .align 3 .LC125: .string "You nervously select a tubecar and step aboard." .align 3 .LC126: .string "You think you have the route worked out, so you'll board a tube train" .align 3 .LC127: .string "You decide to ask The Computer about Christmas using a nearby terminal" .align 3 .LC128: .string "You just caught a purple line tubecar." .align 3 .LC129: .string "You just caught a brown line tubecar." .text .align 1 .globl page10 .type page10, @function page10: addi sp,sp,-32 lla a0,.LC118 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) call puts@plt lla a0,.LC119 call puts@plt lla a0,.LC120 call puts@plt lla a0,.LC121 call puts@plt lla a0,.LC122 call puts@plt lla a0,.LC123 call puts@plt lla a0,.LC124 call puts@plt lw a5,.LANCHOR1 bne a5,zero,.L79 lla a0,.LC40 call puts@plt lla a3,.LC126 lla a2,.LC127 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L79 li s1,10 .L80: ld a0,0(s0) call getc@plt bne a0,s1,.L80 li a5,97 li a0,3 beq s2,a5,.L81 .L79: lla a0,.LC125 call puts@plt call rand@plt mv s0,a0 call rand@plt li a5,10 remw s0,s0,a5 li a4,12 remw a0,a0,a5 addw s0,s0,a0 addiw s0,s0,2 ble s0,a4,.L77 lla a0,.LC129 call puts@plt li a0,48 .L81: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L77: lla a0,.LC128 call puts@plt ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,13 addi sp,sp,32 jr ra .size page10, .-page10 .section .rodata.str1.8 .align 3 .LC130: .string "The printing on the folder says \"Experimental Self Briefing.\"" .align 3 .LC131: .string "You open it and begin to read the following:" .align 3 .LC132: .string "Step 1: Compel the briefing subject to attend the briefing." .align 3 .LC133: .string " Note: See Experimental Briefing Sub Form Indigo-WY-2," .align 3 .LC134: .string " 'Experimental Self Briefing Subject Acquisition Through The Use Of" .align 3 .LC135: .string " Neurotoxin Room Foggers.'" .align 3 .LC136: .string "Step 2: Inform the briefing subject that the briefing has begun." .align 3 .LC137: .string " ATTENTION: THE BRIEFING HAS BEGUN." .align 3 .LC138: .string "Step 3: Present the briefing material to the briefing subject." .align 3 .LC139: .string " GREETINGS TROUBLESHOOTER." .align 3 .LC140: .string " YOU HAVE BEEN SPECIALLY SELECTED TO SINGLEHANDEDLY" .align 3 .LC141: .string " WIPE OUT A DEN OF TRAITOROUS CHRISTMAS ACTIVITY. YOUR MISSION IS TO" .align 3 .LC142: .string " GO TO GOODS DISTRIBUTION HALL 7-BETA AND ASSESS ANY CHRISTMAS ACTIVITY" .align 3 .LC143: .string " YOU FIND THERE. YOU ARE TO INFILTRATE THESE CHRISTMAS CELEBRANTS," .align 3 .LC144: .string " LOCATE THEIR RINGLEADER, AN UNKNOWN MASTER RETAILER, AND BRING HIM" .align 3 .LC145: .string " BACK FOR EXECUTION AND TRIAL. THANK YOU. THE COMPUTER IS YOUR FRIEND." .align 3 .LC146: .string "Step 4: Sign the briefing subject's briefing release form to indicate that" .align 3 .LC147: .string " the briefing subject has completed the briefing." .align 3 .LC148: .string " ATTENTION: PLEASE SIGN YOUR BRIEFING RELEASE FORM." .align 3 .LC149: .string "Step 5: Terminate the briefing" .align 3 .LC150: .string " ATTENTION: THE BRIEFING IS TERMINATED." .align 3 .LC151: .string "You walk to the door and hold your signed briefing release form up to the" .align 3 .LC152: .string "plexiglass window. A guard scrutinises it for a moment and then slides back" .align 3 .LC153: .string "the megabolts holding the door shut. You are now free to continue the" .align 3 .LC154: .string "mission." .align 3 .LC155: .string "You have decided to go directly to Goods Distribution Hall 7-beta" .align 3 .LC156: .string "You wish to ask The Computer for more information about Christmas" .text .align 1 .globl page11 .type page11, @function page11: addi sp,sp,-48 lla a0,.LC130 sd ra,40(sp) sd s0,32(sp) sd s2,16(sp) sd s3,8(sp) sd s1,24(sp) call puts@plt lla a0,.LC131 call puts@plt lla a0,.LC132 call puts@plt lla a0,.LC133 call puts@plt lla a0,.LC134 call puts@plt lla a0,.LC135 call puts@plt lla a0,.LC136 call puts@plt lla a0,.LC137 call puts@plt lla a0,.LC138 call puts@plt lla a0,.LC139 call puts@plt lla a0,.LC140 call puts@plt lla a0,.LC141 call puts@plt lla a0,.LC142 call puts@plt lla a0,.LC143 call puts@plt lla a0,.LC144 call puts@plt lla a0,.LC145 call puts@plt lla a0,.LC146 call puts@plt lla a0,.LC147 call puts@plt lla a0,.LC148 call puts@plt lla a0,.LC149 call puts@plt lla a0,.LC150 call puts@plt lla a1,.LC39 li a0,1 call __printf_chk@plt la s3,stdout ld a0,0(s3) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L87 li s1,10 .L88: ld a0,0(s0) call getc@plt bne a0,s1,.L88 li a5,112 beq s2,a5,.L98 .L87: lla a0,.LC151 call puts@plt lla a0,.LC152 call puts@plt lla a0,.LC153 call puts@plt lla a0,.LC154 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC155 lla a2,.LC156 lla a1,.LC41 li a0,1 call __printf_chk@plt ld a0,0(s3) call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L90 li s1,10 .L91: ld a0,0(s0) call getc@plt bne a0,s1,.L91 li a5,97 li a0,3 bne s2,a5,.L90 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L90: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) li a0,10 addi sp,sp,48 jr ra .L98: call character lla a1,.LC39 li a0,1 call __printf_chk@plt ld a0,0(s3) call fflush@plt ld a0,0(s0) call getc@plt andi a0,a0,0xff beq a0,s1,.L87 li s1,10 .L89: ld a0,0(s0) call getc@plt bne a0,s1,.L89 j .L87 .size page11, .-page11 .section .rodata.str1.8 .align 3 .LC157: .string "You walk up to the door and push the button labelled \"push to exit.\"" .align 3 .LC158: .string "Within seconds a surly looking guard shoves his face into the small plexiglass" .align 3 .LC159: .string "window. You can see his mouth forming words but you can't hear any of them." .align 3 .LC160: .string "You just stare at him blankly for a few moments until he points down to a" .align 3 .LC161: .string "speaker on your side of the door. When you put your ear to it you can barely" .align 3 .LC162: .string "hear him say, \"Let's see your briefing release form, bud. You aren't" .align 3 .LC163: .string "getting out of here without it.\"" .align 3 .LC164: .string "You stare around the room some more" .align 3 .LC165: .string "You sit down at the table and read the Orange packet" .text .align 1 .globl page12 .type page12, @function page12: addi sp,sp,-32 lla a0,.LC157 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC158 call puts@plt lla a0,.LC159 call puts@plt lla a0,.LC160 call puts@plt lla a0,.LC161 call puts@plt lla a0,.LC162 call puts@plt lla a0,.LC163 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC164 lla a2,.LC165 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L100 li s1,10 .L101: ld a0,0(s0) call getc@plt bne a0,s1,.L101 li a5,97 li a0,11 bne s2,a5,.L100 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L100: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,57 addi sp,sp,32 jr ra .size page12, .-page12 .section .rodata.str1.8 .align 3 .LC166: .string "You step into the shiny plasteel tubecar, wondering why the shape has always" .align 3 .LC167: .string "reminded you of bullets. The car shoots forward the instant your feet touch" .align 3 .LC168: .string "the slippery gray floor, pinning you immobile against the back wall as the" .align 3 .LC169: .string "tubecar careens toward GDH7-beta. Your only solace is the knowledge that it" .align 3 .LC170: .string "could be worse, much worse." .align 3 .LC171: .string "Before too long the car comes to a stop. You can see signs for GDH7-beta" .align 3 .LC172: .string "through the window. With a little practice you discover that you can crawl" .align 3 .LC173: .string "to the door and pull open the latch." .text .align 1 .globl page13 .type page13, @function page13: addi sp,sp,-16 lla a0,.LC166 sd ra,8(sp) call puts@plt lla a0,.LC167 call puts@plt lla a0,.LC168 call puts@plt lla a0,.LC169 call puts@plt lla a0,.LC170 call puts@plt lla a0,.LC171 call puts@plt lla a0,.LC172 call puts@plt lla a0,.LC173 call puts@plt ld ra,8(sp) li a0,14 addi sp,sp,16 jr ra .size page13, .-page13 .section .rodata.str1.8 .align 3 .LC174: .string "You manage to pull yourself out of the tubecar and look around. Before you is" .align 3 .LC175: .string "one of the most confusing things you have ever seen, a hallway that is" .align 3 .LC176: .string "simultaneously both red and green clearance. If this is the result of" .align 3 .LC177: .string "Christmas then it's easy to see the evils inherent in its practice." .align 3 .LC178: .string "You are in the heart of a large goods distribution centre. You can see all" .align 3 .LC179: .string "about you evidence of traitorous secret society Christmas celebration; rubber" .align 3 .LC180: .string "faced robots whiz back and forth selling toys to holiday shoppers, simul-plast" .align 3 .LC181: .string "wreaths hang from every light fixture, while ahead in the shadows is a citizen" .align 3 .LC182: .string "wearing a huge red synthetic flower." .text .align 1 .globl page14 .type page14, @function page14: addi sp,sp,-16 lla a0,.LC174 sd ra,8(sp) call puts@plt lla a0,.LC175 call puts@plt lla a0,.LC176 call puts@plt lla a0,.LC177 call puts@plt lla a0,.LC178 call puts@plt lla a0,.LC179 call puts@plt lla a0,.LC180 call puts@plt lla a0,.LC181 call puts@plt lla a0,.LC182 call puts@plt ld ra,8(sp) li a0,22 addi sp,sp,16 jr ra .size page14, .-page14 .section .rodata.str1.8 .align 3 .LC183: .string "You are set upon by a runty robot with a queer looking face and two pointy" .align 3 .LC184: .string "rubber ears poking from beneath a tattered cap. \"Hey mister,\" it says," .align 3 .LC185: .string "\"you done all your last minute Christmas shopping? I got some real neat junk" .align 3 .LC186: .string "here. You don't wanna miss the big day tommorrow, if you know what I mean.\"" .align 3 .LC187: .string "The robot opens its bag to show you a pile of shoddy Troubleshooter dolls. It" .align 3 .LC188: .string "reaches in and pulls out one of them. \"Look, these Action Troubleshooter(tm)" .align 3 .LC189: .string "dolls are the neatest thing. This one's got moveable arms and when you" .align 3 .LC190: .string "squeeze him, his little rifle squirts realistic looking napalm. It's only" .align 3 .LC191: .string "50 credits. Oh yeah, Merry Christmas.\"" .align 3 .LC192: .string "\nSelect 'a', 'b' or 'c' :" .align 3 .LC193: .string " a - You decide to buy the doll." .align 3 .LC194: .string " b - You shoot the robot." .align 3 .LC195: .string " c - You ignore the robot and keep searching the hall." .text .align 1 .globl page15 .type page15, @function page15: addi sp,sp,-32 lla a0,.LC183 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC184 call puts@plt lla a0,.LC185 call puts@plt lla a0,.LC186 call puts@plt lla a0,.LC187 call puts@plt lla a0,.LC188 call puts@plt lla a0,.LC189 call puts@plt lla a0,.LC190 call puts@plt lla a0,.LC191 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC193 call puts@plt lla a0,.LC194 call puts@plt lla a0,.LC195 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 li a0,22 beq s2,a5,.L111 li s1,10 .L112: ld a0,0(s0) call getc@plt bne a0,s1,.L112 li a5,97 li a0,16 bne s2,a5,.L118 .L111: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L118: li a5,98 bne s2,a5,.L115 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,17 addi sp,sp,32 jr ra .L115: li a0,22 j .L111 .size page15, .-page15 .section .rodata.str1.8 .align 3 .LC196: .string "The doll is a good buy for fifty credits; it will make a fine Christmas present" .align 3 .LC197: .string "for one of your friends. After the sale the robot rolls away. You can use" .align 3 .LC198: .string "the doll later in combat. It works just like a cone rifle firing napalm," .align 3 .LC199: .string "except that occasionally it will explode and blow the user to smithereens." .align 3 .LC200: .string "But don't let that stop you." .text .align 1 .globl page16 .type page16, @function page16: addi sp,sp,-16 lla a0,.LC196 sd ra,8(sp) call puts@plt lla a0,.LC197 call puts@plt lla a0,.LC198 call puts@plt lla a0,.LC199 call puts@plt lla a0,.LC200 call puts@plt ld ra,8(sp) li a5,1 sw a5,.LANCHOR1+4,a4 li a0,22 addi sp,sp,16 jr ra .size page16, .-page16 .section .rodata.str1.8 .align 3 .LC201: .string "You whip out your laser and shoot the robot, but not before it squeezes the" .align 3 .LC202: .string "toy at you. The squeeze toy has the same effect as a cone rifle firing napalm," .align 3 .LC203: .string "and the elfbot's armour has no effect against your laser." .align 3 .LC204: .string "You have been hit!" .align 3 .LC205: .string "It missed you, but not by much!" .align 3 .LC206: .string "You zapped the little bastard!" .align 3 .LC207: .string "You wasted it! Good shooting!" .align 3 .LC208: .string "You will need more evidence, so you search GDH7-beta further" .align 3 .LC209: .string "after the GDH medbot has patched you up." .align 3 .LC210: .string "Damn! You missed!" .align 3 .LC211: .string "It tried to fire again, but the toy exploded and demolished it." .text .align 1 .globl page17 .type page17, @function page17: addi sp,sp,-112 lla a0,.LC201 sd ra,104(sp) sd s0,96(sp) sd s1,88(sp) sd s2,80(sp) sd s3,72(sp) sd s4,64(sp) sd s5,56(sp) sd s6,48(sp) sd s7,40(sp) sd s8,32(sp) sd s9,24(sp) sd s10,16(sp) sd s11,8(sp) call puts@plt lla a0,.LC202 call puts@plt lla a0,.LC203 call puts@plt li s6,2 li s8,15 lla s5,.LANCHOR0 li s0,100 li s2,24 lla s1,.LC205 lla s9,.LC204 li s7,10 li s4,39 lla s3,.LC210 lla s10,.LC206 .L129: call rand@plt remw a5,a0,s0 mv a0,s1 ble a5,s2,.L139 call puts@plt .L123: call rand@plt remw a5,a0,s0 mv a0,s3 ble a5,s4,.L140 call puts@plt .L126: li a5,1 bne s6,a5,.L133 lla a0,.LC211 .L138: call puts@plt lla a0,.LC208 call puts@plt lw a4,4(s5) li a5,9 ble a4,a5,.L141 .L128: li a5,10 sw a5,4(s5) li a0,22 .L134: ld ra,104(sp) ld s0,96(sp) ld s1,88(sp) ld s2,80(sp) ld s3,72(sp) ld s4,64(sp) ld s5,56(sp) ld s6,48(sp) ld s7,40(sp) ld s8,32(sp) ld s9,24(sp) ld s10,16(sp) ld s11,8(sp) addi sp,sp,112 jr ra .L141: lla a0,.LC209 call puts@plt j .L128 .L139: mv a0,s9 call puts@plt call rand@plt remw a5,a0,s7 lw a4,4(s5) addiw a5,a5,1 subw a4,a4,a5 sw a4,4(s5) bgt a4,zero,.L123 lw a2,0(s5) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s5) li a4,6 addiw a2,a5,1 sw a2,0(s5) ble a2,a4,.L124 lla a0,.LC1 call puts@plt li a0,0 j .L134 .L140: mv a0,s10 call puts@plt call rand@plt mv s11,a0 call rand@plt remw a0,a0,s7 remw s11,s11,s7 addw s11,s11,a0 addiw s11,s11,2 subw s8,s8,s11 bgt s8,zero,.L126 lla a0,.LC207 j .L138 .L124: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s5) li a0,45 sw zero,.LANCHOR1+8,a5 j .L134 .L133: li s6,1 j .L129 .size page17, .-page17 .section .rodata.str1.8 .align 3 .LC212: .string "You walk to the centre of the hall, ogling like an infrared fresh from the" .align 3 .LC213: .string "clone vats. Towering before you is the most unearthly thing you have ever" .align 3 .LC214: .string "seen, a green multi armed mutant horror hulking 15 feet above your head." .align 3 .LC215: .string "Its skeletal body is draped with hundreds of metallic strips (probably to" .align 3 .LC216: .string "negate the effects of some insidious mutant power), and the entire hideous" .align 3 .LC217: .string "creature is wrapped in a thousand blinking hazard lights. It's times like" .align 3 .LC218: .string "this when you wish you'd had some training for this job. Luckily the" .align 3 .LC219: .string "creature doesn't take notice of you but stands unmoving, as though waiting for" .align 3 .LC220: .string "a summons from its dark lord, the Master Retailer." .align 3 .LC221: .string "WHAM, suddenly you are struck from behind." .text .align 1 .globl page18 .type page18, @function page18: addi sp,sp,-16 lla a0,.LC212 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC213 call puts@plt lla a0,.LC214 call puts@plt lla a0,.LC215 call puts@plt lla a0,.LC216 call puts@plt lla a0,.LC217 call puts@plt lla a0,.LC218 call puts@plt lla a0,.LC219 call puts@plt lla a0,.LC220 call puts@plt lla a0,.LC221 call puts@plt call rand@plt mv s0,a0 call rand@plt li a5,10 remw s0,s0,a5 ld ra,8(sp) remw a0,a0,a5 li a5,14 addw a0,s0,a0 ld s0,0(sp) addiw a0,a0,2 sgt a0,a0,a5 addi a0,a0,19 addi sp,sp,16 jr ra .size page18, .-page18 .section .rodata.str1.8 .align 3 .LC222: .string "Quickly you regain your balance, whirl and fire your laser into the Ultraviolet" .align 3 .LC223: .string "citizen behind you. For a moment your heart leaps to your throat, then you" .align 3 .LC224: .string "realise that he is indeed dead and you will be the only one filing a report on" .align 3 .LC225: .string "this incident. Besides, he was participating in this traitorous Christmas" .align 3 .LC226: .string "shopping, as is evident from the rain of shoddy toys falling all around you." .align 3 .LC227: .string "Another valorous deed done in the service of The Computer!" .align 3 .LC228: .string "You run away like the cowardly dog you are" .align 3 .LC229: .string "You search the body, keeping an eye open for Internal Security" .text .align 1 .globl page19 .type page19, @function page19: addi sp,sp,-32 lla a0,.LC222 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) call puts@plt lla a0,.LC223 call puts@plt lla a0,.LC224 call puts@plt lla a0,.LC225 call puts@plt lla a0,.LC226 call puts@plt lla a0,.LC227 call puts@plt lla a4,.LANCHOR1 lw a5,8(a4) lw a2,.LANCHOR0 li a0,21 addiw a3,a5,1 li a5,7 sw a3,8(a4) subw a5,a5,a2 blt a5,a3,.L147 lw a4,16(a4) li a5,1 beq a4,a5,.L148 lla a0,.LC40 call puts@plt lla a3,.LC228 lla a2,.LC229 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L148 li s1,10 .L149: ld a0,0(s0) call getc@plt bne a0,s1,.L149 li a5,97 li a0,34 beq s2,a5,.L147 .L148: li a0,22 .L147: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .size page19, .-page19 .section .rodata.str1.8 .align 3 .LC230: .string "Oh no! you can't keep your balance. You're falling, falling head first into" .align 3 .LC231: .string "the Christmas beast's gaping maw. It's a valiant struggle; you think you are" .align 3 .LC232: .string "gone when its poisonous needles dig into your flesh, but with a heroic effort" .align 3 .LC233: .string "you jerk a string of lights free and jam the live wires into the creature's" .align 3 .LC234: .string "spine. The Christmas beast topples to the ground and begins to burn, filling" .align 3 .LC235: .string "the area with a thick acrid smoke. It takes only a moment to compose yourself," .align 3 .LC236: .string "and then you are ready to continue your search for the Master Retailer." .text .align 1 .globl page20 .type page20, @function page20: addi sp,sp,-16 lla a0,.LC230 sd ra,8(sp) call puts@plt lla a0,.LC231 call puts@plt lla a0,.LC232 call puts@plt lla a0,.LC233 call puts@plt lla a0,.LC234 call puts@plt lla a0,.LC235 call puts@plt lla a0,.LC236 call puts@plt ld ra,8(sp) li a0,22 addi sp,sp,16 jr ra .size page20, .-page20 .section .rodata.str1.8 .align 3 .LC237: .string "You have been wasting the leading citizens of Alpha Complex at a prodigious" .align 3 .LC238: .string "rate. This has not gone unnoticed by the Internal Security squad at GDH7-beta." .align 3 .LC239: .string "Suddenly, a net of laser beams spear out of the gloomy corners of the hall," .align 3 .LC240: .string "chopping you into teeny, weeny bite size pieces." .text .align 1 .globl page21 .type page21, @function page21: addi sp,sp,-16 lla a0,.LC237 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC238 call puts@plt lla a0,.LC239 call puts@plt lla a0,.LC240 call puts@plt lla s0,.LANCHOR0 lw a2,0(s0) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L157 lla a0,.LC1 call puts@plt ld ra,8(sp) ld s0,0(sp) li a0,0 addi sp,sp,16 jr ra .L157: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,45 addi sp,sp,16 jr ra .size page21, .-page21 .section .rodata.str1.8 .align 3 .LC241: .string "You are searching Goods Distribution Hall 7-beta." .text .align 1 .globl page22 .type page22, @function page22: addi sp,sp,-16 lla a0,.LC241 sd ra,8(sp) call puts@plt call rand@plt sraiw a5,a0,31 srliw a5,a5,30 addw a0,a5,a0 andi a0,a0,3 subw a0,a0,a5 sext.w a4,a0 li a5,3 bgtu a4,a5,.L160 slli a5,a0,32 srli a0,a5,30 lla a5,.LANCHOR2 add a5,a5,a0 lw a0,0(a5) .L160: ld ra,8(sp) addi sp,sp,16 jr ra .size page22, .-page22 .section .rodata.str1.8 .align 3 .LC242: .string "You go to the nearest computer terminal and declare yourself a mutant." .align 3 .LC243: .string "\"A mutant, he's a mutant,\" yells a previously unnoticed infrared who had" .align 3 .LC244: .string "been looking over your shoulder. You easily gun him down, but not before a" .align 3 .LC245: .string "dozen more citizens take notice and aim their weapons at you." .align 3 .LC246: .string "You want to fight it out, one against twelve" .align 3 .LC247: .string "You tell them that it was really only a bad joke" .text .align 1 .globl page23 .type page23, @function page23: addi sp,sp,-32 lla a0,.LC242 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC243 call puts@plt lla a0,.LC244 call puts@plt lla a0,.LC245 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC246 lla a2,.LC247 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L164 li s1,10 .L165: ld a0,0(s0) call getc@plt bne a0,s1,.L165 li a5,97 li a0,28 bne s2,a5,.L164 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L164: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,24 addi sp,sp,32 jr ra .size page23, .-page23 .section .rodata.str1.8 .align 3 .LC248: .string "Golly, I never expected someone to pick this. I haven't even designed" .align 3 .LC249: .string "the 12 citizens who are going to make a sponge out of you. Tell you what," .align 3 .LC250: .string "I'll give you a second chance." .align 3 .LC251: .string "You REALLY want to shoot it out" .align 3 .LC252: .string "You change your mind and say it was only a bad joke" .text .align 1 .globl page24 .type page24, @function page24: addi sp,sp,-32 lla a0,.LC248 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC249 call puts@plt lla a0,.LC250 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC251 lla a2,.LC252 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L171 li s1,10 .L172: ld a0,0(s0) call getc@plt bne a0,s1,.L172 li a5,97 li a0,28 bne s2,a5,.L171 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L171: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,25 addi sp,sp,32 jr ra .size page24, .-page24 .section .rodata.str1.8 .align 3 .LC253: .string "Boy, you really can't take a hint!" .align 3 .LC254: .string "They're closing in. Their trigger fingers are twitching, they're about to" .align 3 .LC255: .string "shoot. This is your last chance." .align 3 .LC256: .string "You are going to shoot" .align 3 .LC257: .string "You tell them it was all just a bad joke" .text .align 1 .globl page25 .type page25, @function page25: addi sp,sp,-32 lla a0,.LC253 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC254 call puts@plt lla a0,.LC255 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC256 lla a2,.LC257 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L178 li s1,10 .L179: ld a0,0(s0) call getc@plt bne a0,s1,.L179 li a5,97 li a0,28 bne s2,a5,.L178 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L178: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,26 addi sp,sp,32 jr ra .size page25, .-page25 .section .rodata.str1.8 .align 3 .LC258: .string "You can read the cold, sober hatred in their eyes (They really didn't think" .align 3 .LC259: .string "it was funny), as they tighten the circle around you. One of them shoves a" .align 3 .LC260: .string "blaster up your nose, but that doesn't hurt as much as the multi-gigawatt" .align 3 .LC261: .string "carbonium tipped food drill in the small of your back." .align 3 .LC262: .string "You spend the remaining micro-seconds of your life wondering what you did wrong" .text .align 1 .globl page26 .type page26, @function page26: addi sp,sp,-16 lla a0,.LC258 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC259 call puts@plt lla a0,.LC260 call puts@plt lla a0,.LC261 call puts@plt lla a0,.LC262 call puts@plt lla s0,.LANCHOR0 lw a2,0(s0) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L185 lla a0,.LC1 call puts@plt ld ra,8(sp) ld s0,0(sp) li a0,0 addi sp,sp,16 jr ra .L185: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,32 addi sp,sp,16 jr ra .size page26, .-page26 .align 1 .globl page27 .type page27, @function page27: ret .size page27, .-page27 .section .rodata.str1.8 .align 3 .LC263: .string "They don't think it's funny." .text .align 1 .globl page28 .type page28, @function page28: addi sp,sp,-16 lla a0,.LC263 sd ra,8(sp) call puts@plt ld ra,8(sp) li a0,26 addi sp,sp,16 jr ra .size page28, .-page28 .section .rodata.str1.8 .align 3 .LC264: .string "\"Psst, hey citizen, come here. Pssfft,\" you hear. When you peer around" .align 3 .LC265: .string "you can see someone's dim outline in the shadows. \"I got some information" .align 3 .LC266: .string "on the Master Retailer. It'll only cost you 30 psst credits.\"" .align 3 .LC267: .string " a - You pay the 30 credits for the info." .align 3 .LC268: .string " b - You would rather threaten him for the information." .align 3 .LC269: .string " c - You ignore him and walk away." .text .align 1 .globl page29 .type page29, @function page29: addi sp,sp,-32 lla a0,.LC264 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC265 call puts@plt lla a0,.LC266 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC267 call puts@plt lla a0,.LC268 call puts@plt lla a0,.LC269 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 li a0,22 beq s2,a5,.L192 li s1,10 .L193: ld a0,0(s0) call getc@plt bne a0,s1,.L193 li a5,97 li a0,30 bne s2,a5,.L199 .L192: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L199: li a5,98 bne s2,a5,.L196 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,31 addi sp,sp,32 jr ra .L196: li a0,22 j .L192 .size page29, .-page29 .section .rodata.str1.8 .align 3 .LC270: .string "You step into the shadows and offer the man a thirty credit bill. \"Just drop" .align 3 .LC271: .string "it on the floor,\" he says. \"So you're looking for the Master Retailer, pssfft?" .align 3 .LC272: .string "I've seen him, he's a fat man in a fuzzy red and white jump suit. They say" .align 3 .LC273: .string "he's a high programmer with no respect for proper security. If you want to" .align 3 .LC274: .string "find him then pssfft step behind me and go through the door.\"" .align 3 .LC275: .string "Behind the man is a reinforced plasteel blast door. The centre of it has been" .align 3 .LC276: .string "buckled toward you in a manner you only saw once before when you were field" .align 3 .LC277: .string "testing the rocket assist plasma slingshot (you found it easily portable but" .align 3 .LC278: .string "prone to misfire). Luckily it isn't buckled too far for you to make out the" .align 3 .LC279: .string "warning sign. WARNING!! Don't open this door or the same thing will happen to" .align 3 .LC280: .string "you. Opening this door is a capital offense. Do not do it. Not at all. This" .align 3 .LC281: .string "is not a joke." .align 3 .LC282: .string " a - You use your Precognition mutant power on opening the door." .align 3 .LC283: .string " b - You just go through the door anyway." .align 3 .LC284: .string " c - You decide it's too dangerous and walk away." .text .align 1 .globl page30 .type page30, @function page30: addi sp,sp,-32 lla a0,.LC270 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC271 call puts@plt lla a0,.LC272 call puts@plt lla a0,.LC273 call puts@plt lla a0,.LC274 call puts@plt lla a0,.LC275 call puts@plt lla a0,.LC276 call puts@plt lla a0,.LC277 call puts@plt lla a0,.LC278 call puts@plt lla a0,.LC279 call puts@plt lla a0,.LC280 call puts@plt lla a0,.LC281 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC282 call puts@plt lla a0,.LC283 call puts@plt lla a0,.LC284 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 li a0,22 beq s2,a5,.L201 li s1,10 .L202: ld a0,0(s0) call getc@plt bne a0,s1,.L202 li a5,97 li a0,56 bne s2,a5,.L208 .L201: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L208: li a5,98 bne s2,a5,.L205 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,33 addi sp,sp,32 jr ra .L205: li a0,22 j .L201 .size page30, .-page30 .section .rodata.str1.8 .align 3 .LC285: .string "Like any good troubleshooter you make the least expensive decision and threaten" .align 3 .LC286: .string "him for information. With lightning like reflexes you whip out your laser and" .align 3 .LC287: .string "stick it up his nose. \"Talk, you traitorous Christmas celebrator, or who nose" .align 3 .LC288: .string "what will happen to you, yuk yuk,\" you pun menacingly, and then you notice" .align 3 .LC289: .string "something is very wrong. He doesn't have a nose. As a matter of fact he's" .align 3 .LC290: .string "made of one eighth inch cardboard and your laser is sticking through the other" .align 3 .LC291: .string "side of his head. \"Are you going to pay?\" says his mouth speaker," .align 3 .LC292: .string "\"or are you going to pssfft go away stupid?\"" .align 3 .LC293: .string "You pssfft go away stupid" .align 3 .LC294: .string "You pay the 30 credits" .text .align 1 .globl page31 .type page31, @function page31: addi sp,sp,-32 lla a0,.LC285 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC286 call puts@plt lla a0,.LC287 call puts@plt lla a0,.LC288 call puts@plt lla a0,.LC289 call puts@plt lla a0,.LC290 call puts@plt lla a0,.LC291 call puts@plt lla a0,.LC292 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC293 lla a2,.LC294 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L210 li s1,10 .L211: ld a0,0(s0) call getc@plt bne a0,s1,.L211 li a5,97 li a0,30 bne s2,a5,.L210 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L210: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,22 addi sp,sp,32 jr ra .size page31, .-page31 .section .rodata.str1.8 .align 3 .LC295: .string "Finally it's your big chance to prove that you're as good a troubleshooter" .align 3 .LC296: .string "as your previous clone. You walk briskly to mission briefing and pick up your" .align 3 .LC297: .string "previous clone's personal effects and notepad. After reviewing the notes you" .align 3 .LC298: .string "know what has to be done. You catch the purple line to Goods Distribution Hall" .align 3 .LC299: .string "7-beta and begin to search for the blast door." .text .align 1 .globl page32 .type page32, @function page32: addi sp,sp,-16 lla a0,.LC295 sd ra,8(sp) call puts@plt lla a0,.LC296 call puts@plt lla a0,.LC297 call puts@plt lla a0,.LC298 call puts@plt lla a0,.LC299 call puts@plt ld ra,8(sp) li a0,22 addi sp,sp,16 jr ra .size page32, .-page32 .section .rodata.str1.8 .align 3 .LC300: .string "You release the megabolts on the blast door, then strain against it with your" .align 3 .LC301: .string "awesome strength. Slowly the door creaks open. You bravely leap through the" .align 3 .LC302: .string "opening and smack your head into the barrel of a 300 mm 'ultra shock' class" .align 3 .LC303: .string "plasma cannon. It's dark in the barrel now, but just before your head got" .align 3 .LC304: .string "stuck you can remember seeing a group of technicians anxiously watch you leap" .align 3 .LC305: .string "into the room." .text .align 1 .globl page33 .type page33, @function page33: addi sp,sp,-16 li a5,1 sd s0,0(sp) lla a0,.LC300 lla s0,.LANCHOR1 sd ra,8(sp) sw a5,20(s0) call puts@plt lla a0,.LC301 call puts@plt lla a0,.LC302 call puts@plt lla a0,.LC303 call puts@plt lla a0,.LC304 call puts@plt lla a0,.LC305 call puts@plt lw a0,0(s0) ld ra,8(sp) ld s0,0(sp) addi a0,a0,-1 snez a0,a0 addi a0,a0,35 addi sp,sp,16 jr ra .size page33, .-page33 .section .rodata.str1.8 .align 3 .LC306: .string "You have found a sealed envelope on the body. You open it and read:" .align 3 .LC307: .string "\"WARNING: Ultraviolet Clearance ONLY. DO NOT READ." .align 3 .LC308: .string "Memo from Chico-U-MRX4 to Harpo-U-MRX5." .align 3 .LC309: .string "The planned takeover of the Troubleshooter Training Course goes well, Comrade." .align 3 .LC310: .string "Once we have trained the unwitting bourgeois troubleshooters to work as" .align 3 .LC311: .string "communist dupes, the overthrow of Alpha Complex will be unstoppable. My survey" .align 3 .LC312: .string "of the complex has convinced me that no one suspects a thing; soon it will be" .align 3 .LC313: .string "too late for them to oppose the revolution. The only thing that could possibly" .align 3 .LC314: .string "impede the people's revolution would be someone alerting The Computer to our" .align 3 .LC315: .string "plans (for instance, some enterprising Troubleshooter could tell The Computer" .align 3 .LC316: .string "that the communists have liberated the Troubleshooter Training Course and plan" .align 3 .LC317: .string "to use it as a jumping off point from which to undermine the stability of all" .align 3 .LC318: .string "Alpha Complex), but as we both know, the capitalistic Troubleshooters would" .align 3 .LC319: .string "never serve the interests of the proletariat above their own bourgeois desires." .align 3 .LC320: .string "P.S. I'm doing some Christmas shopping later today. Would you like me to pick" .align 3 .LC321: .string "you up something?\"" .align 3 .LC322: .string "When you put down the memo you are overcome by that strange deja'vu again." .align 3 .LC323: .string "You see yourself talking privately with The Computer. You are telling it all" .align 3 .LC324: .string "about the communists' plan, and then the scene shifts and you see yourself" .align 3 .LC325: .string "showered with awards for foiling the insidious communist plot to take over the" .align 3 .LC326: .string "complex." .align 3 .LC327: .string "You wander off to look for more evidence" .align 3 .LC328: .string "You rush off to the nearest computer terminal to expose the commies" .text .align 1 .globl page34 .type page34, @function page34: addi sp,sp,-48 lla a0,.LC306 sd ra,40(sp) sd s0,32(sp) sd s2,16(sp) sd s3,8(sp) sd s1,24(sp) call puts@plt lla a0,.LC307 call puts@plt lla a0,.LC308 call puts@plt lla a0,.LC309 call puts@plt lla a0,.LC310 call puts@plt lla a0,.LC311 call puts@plt lla a0,.LC312 call puts@plt lla a0,.LC313 call puts@plt lla a0,.LC314 call puts@plt lla a0,.LC315 call puts@plt lla a0,.LC316 call puts@plt lla a0,.LC317 call puts@plt lla a0,.LC318 call puts@plt lla a0,.LC319 call puts@plt lla a0,.LC320 call puts@plt lla a0,.LC321 call puts@plt lla a1,.LC39 li a0,1 call __printf_chk@plt la s3,stdout ld a0,0(s3) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L223 li s1,10 .L224: ld a0,0(s0) call getc@plt bne a0,s1,.L224 li a5,112 beq s2,a5,.L234 .L223: lla a0,.LC322 call puts@plt lla a0,.LC323 call puts@plt lla a0,.LC324 call puts@plt lla a0,.LC325 call puts@plt lla a0,.LC326 call puts@plt li a5,1 lla a0,.LC40 sw a5,.LANCHOR1+16,a4 call puts@plt lla a3,.LC327 lla a2,.LC328 lla a1,.LC41 li a0,1 call __printf_chk@plt ld a0,0(s3) call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L226 li s1,10 .L227: ld a0,0(s0) call getc@plt bne a0,s1,.L227 li a5,97 li a0,46 bne s2,a5,.L226 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L226: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) li a0,22 addi sp,sp,48 jr ra .L234: call character lla a1,.LC39 li a0,1 call __printf_chk@plt ld a0,0(s3) call fflush@plt ld a0,0(s0) call getc@plt andi a0,a0,0xff beq a0,s1,.L223 li s1,10 .L225: ld a0,0(s0) call getc@plt bne a0,s1,.L225 j .L223 .size page34, .-page34 .section .rodata.str1.8 .align 3 .LC329: .string "\"Oh master,\" you hear through the gun barrel, \"where have you been? It is" .align 3 .LC330: .string "time for the great Christmas gifting ceremony. You had better hurry and get" .align 3 .LC331: .string "the costume on or the trainee may begin to suspect.\" For the second time" .align 3 .LC332: .string "today you are forced to wear attire not of your own choosing. They zip the" .align 3 .LC333: .string "suit to your chin just as you hear gunfire erupt behind you." .align 3 .LC334: .string "\"Oh no! Who left the door open? The commies will get in. Quick, fire the" .align 3 .LC335: .string "laser cannon or we're all doomed.\"" .align 3 .LC336: .string "\"Too late you capitalist swine, the people's revolutionary strike force claims" .align 3 .LC337: .string "this cannon for the proletariat's valiant struggle against oppression. Take" .align 3 .LC338: .string "that, you running dog imperialist lackey. ZAP, KAPOW\"" .align 3 .LC339: .string "Just when you think that things couldn't get worse, \"Aha, look what we have" .align 3 .LC340: .string "here, the Master Retailer himself with his head caught in his own cannon. His" .align 3 .LC341: .string "death will serve as a symbol of freedom for all Alpha Complex." .align 3 .LC342: .string "Fire the cannon.\"" .text .align 1 .globl page35 .type page35, @function page35: addi sp,sp,-16 lla a0,.LC329 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC330 call puts@plt lla a0,.LC331 call puts@plt lla a0,.LC332 call puts@plt lla a0,.LC333 call puts@plt lla a0,.LC334 call puts@plt lla a0,.LC335 call puts@plt lla a0,.LC336 call puts@plt lla a0,.LC337 call puts@plt lla a0,.LC338 call puts@plt lla a0,.LC339 call puts@plt lla a0,.LC340 call puts@plt lla a0,.LC341 call puts@plt lla a0,.LC342 call puts@plt lla s0,.LANCHOR0 lw a2,0(s0) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L236 lla a0,.LC1 call puts@plt ld ra,8(sp) ld s0,0(sp) li a0,0 addi sp,sp,16 jr ra .L236: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,32 addi sp,sp,16 jr ra .size page35, .-page35 .section .rodata.str1.8 .align 3 .LC343: .string "\"Congratulations, troubleshooter, you have successfully found the lair of the" .align 3 .LC344: .string "Master Retailer and completed the Troubleshooter Training Course test mission,\"" .align 3 .LC345: .string "a muffled voice tells you through the barrel. \"Once we dislodge your head" .align 3 .LC346: .string "from the barrel of the 'Ultra Shock' plasma cannon you can begin with the" .align 3 .LC347: .string "training seminars, the first of which will concern the 100%% accurate\n" .align 3 .LC348: .string "identification and elimination of unregistered mutants. If you have any" .align 3 .LC349: .string "objections please voice them now.\"" .align 3 .LC350: .string " a - You appreciate his courtesy and voice an objection." .align 3 .LC351: .string " b - After your head is removed from the cannon, you register as a mutant." .align 3 .LC352: .string " c - After your head is removed from the cannon, you go to the unregistered" .align 3 .LC353: .string " mutant identification and elimination seminar." .text .align 1 .globl page36 .type page36, @function page36: addi sp,sp,-32 lla a0,.LC343 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC344 call puts@plt lla a0,.LC345 call puts@plt lla a0,.LC346 call puts@plt lla a1,.LC347 li a0,1 call __printf_chk@plt lla a0,.LC348 call puts@plt lla a0,.LC349 call puts@plt lla a0,.LC192 call puts@plt lla a0,.LC350 call puts@plt lla a0,.LC351 call puts@plt lla a0,.LC352 call puts@plt lla a0,.LC353 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 li a0,37 beq s2,a5,.L240 li s1,10 .L241: ld a0,0(s0) call getc@plt bne a0,s1,.L241 li a5,97 bne s2,a5,.L248 lla s0,.LANCHOR0 lw a2,0(s0) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L243 lla a0,.LC1 call puts@plt ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,0 addi sp,sp,32 jr ra .L248: li a5,98 bne s2,a5,.L245 li a0,23 .L240: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L243: lla a1,.LC2 li a0,1 call __printf_chk@plt ld ra,24(sp) sw s1,4(s0) ld s0,16(sp) sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 sw zero,.LANCHOR1+8,a5 ld s1,8(sp) ld s2,0(sp) li a0,32 addi sp,sp,32 jr ra .L245: li a0,37 j .L240 .size page36, .-page36 .section .rodata.str1.8 .align 3 .LC354: .string "\"Come with me please, Troubleshooter,\" says the Green clearance technician" .align 3 .LC355: .string "after he has dislodged your head from the cannon. \"You have been participating" .align 3 .LC356: .string "in the Troubleshooter Training Course since you got off the tube car in" .align 3 .LC357: .string "GDH7-beta,\" he explains as he leads you down a corridor. \"The entire" .align 3 .LC358: .string "Christmas assignment was a test mission to assess your current level of" .align 3 .LC359: .string "training. You didn't do so well. We're going to start at the beginning with" .align 3 .LC360: .string "the other student. Ah, here we are, the mutant identification and elimination" .align 3 .LC361: .string "lecture.\" He shows you into a vast lecture hall filled with empty seats." .align 3 .LC362: .string "There is only one other student here, a Troubleshooter near the front row" .align 3 .LC363: .string "playing with his Action Troubleshooter(tm) figure. \"Find a seat and I will" .align 3 .LC364: .string "begin,\" says the instructor." .text .align 1 .globl page37 .type page37, @function page37: addi sp,sp,-16 lla a0,.LC354 sd ra,8(sp) call puts@plt lla a0,.LC355 call puts@plt lla a0,.LC356 call puts@plt lla a0,.LC357 call puts@plt lla a0,.LC358 call puts@plt lla a0,.LC359 call puts@plt lla a0,.LC360 call puts@plt lla a0,.LC361 call puts@plt lla a0,.LC362 call puts@plt lla a0,.LC363 call puts@plt lla a0,.LC364 call puts@plt ld ra,8(sp) li a0,38 addi sp,sp,16 jr ra .size page37, .-page37 .section .rodata.str1.8 .align 3 .LC365: .string "\"I am Plato-B-PHI%d, head of mutant propaganda here at the training course.\n" .align 3 .LC366: .string "If you have any questions about mutants please come to me. Today I will be" .align 3 .LC367: .string "talking about mutant detection. Detecting mutants is very easy. One simply" .align 3 .LC368: .string "watches for certain tell tale signs, such as the green scaly skin, the third" .align 3 .LC369: .string "arm growing from the forehead, or other similar disfigurements so common with" .align 3 .LC370: .string "their kind. There are, however, a few rare specimens that show no outward sign" .align 3 .LC371: .string "of their treason. This has been a significant problem, so our researchers have" .align 3 .LC372: .string "been working on a solution. I would like a volunteer to test this device,\"" .align 3 .LC373: .string "he says, holding up a ray gun looking thing. \"It is a mutant detection ray." .align 3 .LC374: .string "This little button detects for mutants, and this big button stuns them once" .align 3 .LC375: .string "they are discovered. Who would like to volunteer for a test?\"" .align 3 .LC376: .string "The Troubleshooter down the front squirms deeper into his chair." .align 3 .LC377: .string "You duck behind a chair and hope the instructor doesn't notice you" .align 3 .LC378: .string "You volunteer for the test" .text .align 1 .globl page38 .type page38, @function page38: addi sp,sp,-32 lw a2,.LANCHOR0+8 lla a1,.LC365 li a0,1 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call __printf_chk@plt lla a0,.LC366 call puts@plt lla a0,.LC367 call puts@plt lla a0,.LC368 call puts@plt lla a0,.LC369 call puts@plt lla a0,.LC370 call puts@plt lla a0,.LC371 call puts@plt lla a0,.LC372 call puts@plt lla a0,.LC373 call puts@plt lla a0,.LC374 call puts@plt lla a0,.LC375 call puts@plt lla a0,.LC376 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC377 lla a2,.LC378 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L252 li s1,10 .L253: ld a0,0(s0) call getc@plt bne a0,s1,.L253 li a5,97 li a0,39 bne s2,a5,.L252 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L252: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,40 addi sp,sp,32 jr ra .size page38, .-page38 .section .rodata.str1.8 .align 3 .LC379: .string "You bravely volunteer to test the mutant detection gun. You stand up and walk" .align 3 .LC380: .string "down the steps to the podium, passing a very relieved Troubleshooter along the" .align 3 .LC381: .string "way. When you reach the podium Plato-B-PHI hands you the mutant detection gun" .align 3 .LC382: .string "and says, \"Here, aim the gun at that Troubleshooter and push the small button." .align 3 .LC383: .string "If you see a purple light, stun him.\" Grasping the opportunity to prove your" .align 3 .LC384: .string "worth to The Computer, you fire the mutant detection ray at the Troubleshooter." .align 3 .LC385: .string "A brilliant purple nimbus instantly surrounds his body. You slip your finger" .align 3 .LC386: .string "to the large stun button and he falls writhing to the floor." .align 3 .LC387: .string "\"Good shot,\" says the instructor as you hand him the mutant detection gun," .align 3 .LC388: .string "\"I'll see that you get a commendation for this. It seems you have the hang" .align 3 .LC389: .string "of mutant detection and elimination. You can go on to the secret society" .align 3 .LC390: .string "infiltration class. I'll see that the little mutie gets packaged for" .align 3 .LC391: .string "tomorrow's mutant dissection class.\"" .text .align 1 .globl page39 .type page39, @function page39: addi sp,sp,-16 lla a0,.LC379 sd ra,8(sp) call puts@plt lla a0,.LC380 call puts@plt lla a0,.LC381 call puts@plt lla a0,.LC382 call puts@plt lla a0,.LC383 call puts@plt lla a0,.LC384 call puts@plt lla a0,.LC385 call puts@plt lla a0,.LC386 call puts@plt lla a0,.LC387 call puts@plt lla a0,.LC388 call puts@plt lla a0,.LC389 call puts@plt lla a0,.LC390 call puts@plt lla a0,.LC391 call puts@plt ld ra,8(sp) li a0,41 addi sp,sp,16 jr ra .size page39, .-page39 .section .rodata.str1.8 .align 3 .LC392: .string "You breathe a sigh of relief as Plato-B-PHI picks on the other Troubleshooter." .align 3 .LC393: .string "\"You down here in the front,\" says the instructor pointing at the other" .align 3 .LC394: .string "Troubleshooter, \"you'll make a good volunteer. Please step forward.\"" .align 3 .LC395: .string "The Troubleshooter looks around with a `who me?' expression on his face, but" .align 3 .LC396: .string "since he is the only one visible in the audience he figures his number is up." .align 3 .LC397: .string "He walks down to the podium clutching his Action Troubleshooter(tm) doll before" .align 3 .LC398: .string "him like a weapon. \"Here,\" says Plato-B-PHI, \"take the mutant detection ray" .align 3 .LC399: .string "and point it at the audience. If there are any mutants out there we'll know" .align 3 .LC400: .string "soon enough.\" Suddenly your skin prickles with static electricity as a bright" .align 3 .LC401: .string "purple nimbus surrounds your body. \"Ha Ha, got one,\" says the instructor." .align 3 .LC402: .string "\"Stun him before he gets away.\"" .align 3 .LC403: .string "His shot hits you. You feel numb all over." .align 3 .LC404: .string "His shot just missed." .align 3 .LC405: .string "You just blew his head off. His lifeless hand drops the mutant detector ray." .align 3 .LC406: .string "You burnt a hole in the podium. He sights the mutant detector ray on you." .text .align 1 .globl page40 .type page40, @function page40: addi sp,sp,-48 lla a0,.LC392 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) sd s4,0(sp) call puts@plt lla a0,.LC393 call puts@plt lla a0,.LC394 call puts@plt lla a0,.LC395 call puts@plt lla a0,.LC396 call puts@plt lla a0,.LC397 call puts@plt lla a0,.LC398 call puts@plt lla a0,.LC399 call puts@plt lla a0,.LC400 call puts@plt lla a0,.LC401 call puts@plt lla a0,.LC402 call puts@plt lla a1,.LC39 li a0,1 call __printf_chk@plt la s3,stdout ld a0,0(s3) la s0,stdin li s1,10 call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L263 .L261: ld a0,0(s0) call getc@plt bne a0,s1,.L261 li a5,112 beq s2,a5,.L273 .L263: li s0,100 li s1,29 lla s3,.LC404 li s2,39 lla s4,.LC406 .L262: call rand@plt remw a0,a0,s0 bgt a0,s1,.L265 lla a0,.LC403 call puts@plt ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) li a0,49 addi sp,sp,48 jr ra .L273: call character lla a1,.LC39 li a0,1 call __printf_chk@plt ld a0,0(s3) call fflush@plt ld a0,0(s0) call getc@plt andi a0,a0,0xff beq a0,s1,.L263 li s1,10 .L264: ld a0,0(s0) call getc@plt bne a0,s1,.L264 j .L263 .L265: mv a0,s3 call puts@plt call rand@plt remw a0,a0,s0 bgt a0,s2,.L267 lla a0,.LC405 call puts@plt ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) li a0,50 addi sp,sp,48 jr ra .L267: mv a0,s4 call puts@plt j .L262 .size page40, .-page40 .section .rodata.str1.8 .align 3 .LC407: .string "You stumble down the hallway of the Troubleshooter Training Course looking for" .align 3 .LC408: .string "your next class. Up ahead you see one of the instructors waving to you. When" .align 3 .LC409: .string "you get there he shakes your hand and says, \"I am Jung-I-PSY. Welcome to the" .align 3 .LC410: .string "secret society infiltration seminar. I hope you ...\" You don't catch the" .align 3 .LC411: .string "rest of his greeting because you're paying too much attention to his handshake;" .align 3 .LC412: .string "it is the strangest thing that has ever been done to your hand, sort of how it" .align 3 .LC413: .string "would feel if you put a neuro whip in a high energy palm massage unit." .align 3 .LC414: .string "It doesn't take you long to learn what he is up to; you feel him briefly shake" .align 3 .LC415: .string "your hand with the secret Illuminati handshake." .align 3 .LC416: .string "You ignore this secret society contact" .align 3 .LC417: .string "You respond with the proper Illuminati code phrase, \"Ewige Blumenkraft\"" .text .align 1 .globl page41 .type page41, @function page41: addi sp,sp,-32 lla a0,.LC407 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC408 call puts@plt lla a0,.LC409 call puts@plt lla a0,.LC410 call puts@plt lla a0,.LC411 call puts@plt lla a0,.LC412 call puts@plt lla a0,.LC413 call puts@plt lla a0,.LC414 call puts@plt lla a0,.LC415 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC416 lla a2,.LC417 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L275 li s1,10 .L276: ld a0,0(s0) call getc@plt bne a0,s1,.L276 li a5,97 li a0,42 bne s2,a5,.L275 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L275: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,43 addi sp,sp,32 jr ra .size page41, .-page41 .section .rodata.str1.8 .align 3 .LC418: .string "\"Aha, so you are a member of the elitist Illuminati secret society,\" he says" .align 3 .LC419: .string "loudly, \"that is most interesting.\" He turns to the large class already" .align 3 .LC420: .string "seated in the auditorium and says, \"You see, class, by simply using the correct" .align 3 .LC421: .string "hand shake you can identify the member of any secret society. Please keep your" .align 3 .LC422: .string "weapons trained on him while I call a guard." .align 3 .LC423: .string "You wait for the guard" .align 3 .LC424: .string "You run for it" .text .align 1 .globl page42 .type page42, @function page42: addi sp,sp,-32 lla a0,.LC418 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC419 call puts@plt lla a0,.LC420 call puts@plt lla a0,.LC421 call puts@plt lla a0,.LC422 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC423 lla a2,.LC424 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L282 li s1,10 .L283: ld a0,0(s0) call getc@plt bne a0,s1,.L283 li a5,97 li a0,51 bne s2,a5,.L282 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L282: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,52 addi sp,sp,32 jr ra .size page42, .-page42 .section .rodata.str1.8 .align 3 .LC425: .string "You sit through a long lecture on how to recognise and infiltrate secret" .align 3 .LC426: .string "societies, with an emphasis on mimicking secret handshakes. The basic theory," .align 3 .LC427: .string "which you realise to be sound from your Iluminati training, is that with the" .align 3 .LC428: .string "proper handshake you can pass unnoticed in any secret society gathering." .align 3 .LC429: .string "What's more, the proper handshake will open doors faster than an 'ultra shock'" .align 3 .LC430: .string "plasma cannon. You are certain that with the information you learn here you" .align 3 .LC431: .string "will easily be promoted to the next level of your Illuminati secret society." .align 3 .LC432: .string "The lecture continues for three hours, during which you have the opportunity" .align 3 .LC433: .string "to practice many different handshakes. Afterwards everyone is directed to" .align 3 .LC434: .string "attend the graduation ceremony. Before you must go you have a little time to" .align 3 .LC435: .string "talk to The Computer about, you know, certain topics." .align 3 .LC436: .string "You go to the graduation ceremony immediately" .align 3 .LC437: .string "You go looking for a computer terminal" .text .align 1 .globl page43 .type page43, @function page43: addi sp,sp,-32 lla a0,.LC425 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC426 call puts@plt lla a0,.LC427 call puts@plt lla a0,.LC428 call puts@plt lla a0,.LC429 call puts@plt lla a0,.LC430 call puts@plt lla a0,.LC431 call puts@plt lla a0,.LC432 call puts@plt lla a0,.LC433 call puts@plt lla a0,.LC434 call puts@plt lla a0,.LC435 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC436 lla a2,.LC437 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L289 li s1,10 .L290: ld a0,0(s0) call getc@plt bne a0,s1,.L290 li a5,97 li a0,44 bne s2,a5,.L289 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L289: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,55 addi sp,sp,32 jr ra .size page43, .-page43 .section .rodata.str1.8 .align 3 .LC438: .string "You walk down to a semi-secluded part of the training course complex and" .align 3 .LC439: .string "activate a computer terminal. \"AT YOUR SERVICE\" reads the computer screen." .align 3 .LC440: .string "You change your mind and go to the graduation ceremony" .align 3 .LC441: .string "You register yourself as a mutant" .align 3 .LC442: .string " a - You register yourself as a mutant." .align 3 .LC443: .string " b - You want to chat about the commies." .align 3 .LC444: .string " c - You change your mind and go to the graduation ceremony." .text .align 1 .globl page44 .type page44, @function page44: addi sp,sp,-32 lla a0,.LC438 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) call puts@plt lla a0,.LC439 call puts@plt lw a5,.LANCHOR1+16 beq a5,zero,.L307 lla a0,.LC192 call puts@plt lla a0,.LC442 call puts@plt lla a0,.LC443 call puts@plt lla a0,.LC444 call puts@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L303 li s1,10 .L300: ld a0,0(s0) call getc@plt bne a0,s1,.L300 li a5,97 li a0,23 beq s2,a5,.L299 li a5,98 bne s2,a5,.L303 li a0,46 .L299: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L307: lla a0,.LC40 call puts@plt lla a3,.LC440 lla a2,.LC441 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L303 li s1,10 .L298: ld a0,0(s0) call getc@plt bne a0,s1,.L298 li a5,97 li a0,23 beq s2,a5,.L299 .L303: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,55 addi sp,sp,32 jr ra .size page44, .-page44 .section .rodata.str1.8 .align 3 .LC445: .string "\"Hrank Hrank,\" snorts the alarm in your living quarters. Something is up." .align 3 .LC446: .string "You look at the monitor above the bathroom mirror and see the message you have" .align 3 .LC447: .string "been waiting for all these years. \"ATTENTION TROUBLESHOOTER, YOU ARE BEING" .align 3 .LC448: .string "ACTIVATED. PLEASE REPORT IMMEDIATELY TO MISSION ASSIGNMENT ROOM A17/GAMMA/LB22." .align 3 .LC449: .string "THANK YOU. THE COMPUTER IS YOUR FRIEND.\" When you arrive at mission" .align 3 .LC450: .string "assignment room A17-gamma/LB22 you are given your previous clone's" .align 3 .LC451: .string "remaining possessions and notebook. You puzzle through your predecessor's" .align 3 .LC452: .string "cryptic notes, managing to decipher enough to lead you to the tube station and" .align 3 .LC453: .string "the tube car to GDH7-beta." .text .align 1 .globl page45 .type page45, @function page45: addi sp,sp,-16 lla a0,.LC445 sd ra,8(sp) call puts@plt lla a0,.LC446 call puts@plt lla a0,.LC447 call puts@plt lla a0,.LC448 call puts@plt lla a0,.LC449 call puts@plt lla a0,.LC450 call puts@plt lla a0,.LC451 call puts@plt lla a0,.LC452 call puts@plt lla a0,.LC453 call puts@plt ld ra,8(sp) li a0,10 addi sp,sp,16 jr ra .size page45, .-page45 .section .rodata.str1.8 .align 3 .LC454: .string "\"Why do you ask about the communists, Troubleshooter? It is not in the" .align 3 .LC455: .string "interest of your continued survival to be asking about such topics,\" says" .align 3 .LC456: .string "The Computer." .align 3 .LC457: .string "You change the subject" .align 3 .LC458: .string "You insist on talking about the communists" .text .align 1 .globl page46 .type page46, @function page46: addi sp,sp,-32 lla a0,.LC454 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC455 call puts@plt lla a0,.LC456 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC457 lla a2,.LC458 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L311 li s1,10 .L312: ld a0,0(s0) call getc@plt bne a0,s1,.L312 li a5,97 li a0,53 bne s2,a5,.L311 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L311: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,54 addi sp,sp,32 jr ra .size page46, .-page46 .section .rodata.str1.8 .align 3 .LC459: .string "The Computer orders the entire Vulture squadron to terminate the Troubleshooter" .align 3 .LC460: .string "Training Course. Unfortunately you too are terminated for possessing" .align 3 .LC461: .string "classified information.\n" .align 3 .LC462: .string "Don't act so innocent, we both know that you are an Illuminatus which is in" .align 3 .LC463: .string "itself an act of treason.\n" .align 3 .LC464: .string "Don't look to me for sympathy.\n" .align 3 .LC465: .string "\t\t\tTHE END" .text .align 1 .globl page47 .type page47, @function page47: addi sp,sp,-16 lla a0,.LC459 sd ra,8(sp) call puts@plt lla a0,.LC460 call puts@plt lla a0,.LC461 call puts@plt lla a0,.LC462 call puts@plt lla a0,.LC463 call puts@plt lla a0,.LC464 call puts@plt lla a0,.LC465 call puts@plt ld ra,8(sp) li a0,0 addi sp,sp,16 jr ra .size page47, .-page47 .section .rodata.str1.8 .align 3 .LC466: .string "The tubecar shoots forward as you enter, slamming you back into a pile of" .align 3 .LC467: .string "garbage. The front end rotates upward and you, the garbage and the garbage" .align 3 .LC468: .string "disposal car shoot straight up out of Alpha Complex. One of the last things" .align 3 .LC469: .string "you see is a small blue sphere slowly dwindling behind you. After you fail to" .align 3 .LC470: .string "report in, you will be assumed dead." .text .align 1 .globl page48 .type page48, @function page48: addi sp,sp,-16 lla a0,.LC466 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC467 call puts@plt lla a0,.LC468 call puts@plt lla a0,.LC469 call puts@plt lla a0,.LC470 call puts@plt lla s0,.LANCHOR0 lw a2,0(s0) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L320 lla a0,.LC1 call puts@plt ld ra,8(sp) ld s0,0(sp) li a0,0 addi sp,sp,16 jr ra .L320: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,45 addi sp,sp,16 jr ra .size page48, .-page48 .section .rodata.str1.8 .align 3 .LC471: .string "The instructor drags your inert body into a specimen detainment cage." .align 3 .LC472: .string "\"He'll make a good subject for tomorrow's mutant dissection class,\" you hear." .text .align 1 .globl page49 .type page49, @function page49: addi sp,sp,-16 lla a0,.LC471 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC472 call puts@plt lla s0,.LANCHOR0 lw a2,0(s0) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L324 lla a0,.LC1 call puts@plt ld ra,8(sp) ld s0,0(sp) li a0,0 addi sp,sp,16 jr ra .L324: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,32 addi sp,sp,16 jr ra .size page49, .-page49 .section .rodata.str1.8 .align 3 .LC473: .string "You put down the other Troubleshooter, and then wisely decide to drill a few" .align 3 .LC474: .string "holes in the instructor as well; the only good witness is a dead witness." .align 3 .LC475: .string "You continue with the training course." .text .align 1 .globl page50 .type page50, @function page50: addi sp,sp,-16 lla a0,.LC473 sd ra,8(sp) call puts@plt lla a0,.LC474 call puts@plt lla a0,.LC475 call puts@plt lla a4,.LANCHOR0 lw a5,8(a4) ld ra,8(sp) li a0,41 addiw a5,a5,1 sw a5,8(a4) addi sp,sp,16 jr ra .size page50, .-page50 .section .rodata.str1.8 .align 3 .LC476: .string "You run for it, but you don't run far. Three hundred strange and exotic" .align 3 .LC477: .string "weapons turn you into a freeze dried cloud of soot." .text .align 1 .globl page51 .type page51, @function page51: addi sp,sp,-16 lla a0,.LC476 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC477 call puts@plt lla s0,.LANCHOR0 lw a2,0(s0) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L330 lla a0,.LC1 call puts@plt ld ra,8(sp) ld s0,0(sp) li a0,0 addi sp,sp,16 jr ra .L330: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,32 addi sp,sp,16 jr ra .size page51, .-page51 .section .rodata.str1.8 .align 3 .LC478: .string "You wisely wait until the instructor returns with a Blue Internal Security" .align 3 .LC479: .string "guard. The guard leads you to an Internal Security self incrimination station." .text .align 1 .globl page52 .type page52, @function page52: addi sp,sp,-16 lla a0,.LC478 sd ra,8(sp) call puts@plt lla a0,.LC479 call puts@plt ld ra,8(sp) li a0,2 addi sp,sp,16 jr ra .size page52, .-page52 .section .rodata.str1.8 .align 3 .LC480: .string "You tell The Computer about:" .align 3 .LC481: .string "Something less dangerous" .align 3 .LC482: .string "The commies who have infiltrated the Troubleshooter Training Course\n and the impending People's Revolution" .text .align 1 .globl page53 .type page53, @function page53: addi sp,sp,-32 lla a0,.LC480 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC481 lla a2,.LC482 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L336 li s1,10 .L337: ld a0,0(s0) call getc@plt bne a0,s1,.L337 li a5,97 li a0,47 bne s2,a5,.L336 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L336: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,54 addi sp,sp,32 jr ra .size page53, .-page53 .section .rodata.str1.8 .align 3 .LC483: .string "\"Do not try to change the subject, Troubleshooter,\" says The Computer." .align 3 .LC484: .string "\"It is a serious crime to ask about the communists. You will be terminated" .align 3 .LC485: .string "immediately. Thank you for your inquiry. The Computer is your friend.\"" .align 3 .LC486: .string "Steel bars drop to your left and right, trapping you here in the hallway." .align 3 .LC487: .string "A spotlight beams from the computer console to brilliantly iiluminate you while" .align 3 .LC488: .string "the speaker above your head rapidly repeats \"Traitor, Traitor, Traitor.\"" .align 3 .LC489: .string "It doesn't take long for a few guards to notice your predicament and come to" .align 3 .LC490: .string "finish you off." .text .align 1 .globl page54 .type page54, @function page54: addi sp,sp,-16 lla a0,.LC483 sd ra,8(sp) sd s0,0(sp) call puts@plt lla a0,.LC484 call puts@plt lla a0,.LC485 call puts@plt lla a0,.LC486 call puts@plt lla a0,.LC487 call puts@plt lla a0,.LC488 call puts@plt lla a0,.LC489 call puts@plt lla a0,.LC490 call puts@plt lla s0,.LANCHOR0 lw a5,.LANCHOR1+20 lw a2,0(s0) lla a1,.LC0 li a0,1 bne a5,zero,.L343 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L344 .L346: lla a0,.LC1 call puts@plt ld ra,8(sp) ld s0,0(sp) li a0,0 addi sp,sp,16 jr ra .L343: call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) bgt a2,a4,.L346 lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,32 addi sp,sp,16 jr ra .L344: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) ld ra,8(sp) ld s0,0(sp) sw zero,.LANCHOR1+8,a5 li a0,45 addi sp,sp,16 jr ra .size page54, .-page54 .section .rodata.str1.8 .align 3 .LC491: .string "You and 300 other excited graduates are marched from the lecture hall and into" .align 3 .LC492: .string "a large auditorium for the graduation exercise. The auditorium is" .align 3 .LC493: .string "extravagantly decorated in the colours of the graduating class. Great red and" .align 3 .LC494: .string "green plasti-paper ribbons drape from the walls, while a huge sign reading" .align 3 .LC495: .string "\"Congratulations class of GDH7-beta-203.44/A\" hangs from the raised stage down" .align 3 .LC496: .string "front. Once everyone finds a seat the ceremony begins. Jung-I-PSY is the" .align 3 .LC497: .string "first to speak, \"Congratulations students, you have successfully survived the" .align 3 .LC498: .string "Troubleshooter Training Course. It always brings me great pride to address" .align 3 .LC499: .string "the graduating class, for I know, as I am sure you do too, that you are now" .align 3 .LC500: .string "qualified for the most perilous missions The Computer may select for you. The" .align 3 .LC501: .string "thanks is not owed to us of the teaching staff, but to all of you, who have" .align 3 .LC502: .string "persevered and graduated. Good luck and die trying.\" Then the instructor" .align 3 .LC503: .string "begins reading the names of the students who one by one walk to the front of" .align 3 .LC504: .string "the auditorium and receive their diplomas. Soon it is your turn," .align 3 .LC505: .string "\"Philo-R-DMD, graduating a master of mutant identification and secret society" .align 3 .LC506: .string "infiltration.\" You walk up and receive your diploma from Plato-B-PHI%d, then\n" .align 3 .LC507: .string "return to your seat. There is another speech after the diplomas are handed" .align 3 .LC508: .string "out, but it is cut short by by rapid fire laser bursts from the high spirited" .align 3 .LC509: .string "graduating class. You are free to return to your barracks to wait, trained" .align 3 .LC510: .string "and fully qualified, for your next mission. You also get that cherished" .align 3 .LC511: .string "promotion from the Illuminati secret society. In a week you receive a" .align 3 .LC512: .string "detailed Training Course bill totalling 1,523 credits." .text .align 1 .globl page55 .type page55, @function page55: addi sp,sp,-16 lla a0,.LC491 sd ra,8(sp) call puts@plt lla a0,.LC492 call puts@plt lla a0,.LC493 call puts@plt lla a0,.LC494 call puts@plt lla a0,.LC495 call puts@plt lla a0,.LC496 call puts@plt lla a0,.LC497 call puts@plt lla a0,.LC498 call puts@plt lla a0,.LC499 call puts@plt lla a0,.LC500 call puts@plt lla a0,.LC501 call puts@plt lla a0,.LC502 call puts@plt lla a0,.LC503 call puts@plt lla a0,.LC504 call puts@plt lla a0,.LC505 call puts@plt lw a2,.LANCHOR0+8 lla a1,.LC506 li a0,1 call __printf_chk@plt lla a0,.LC507 call puts@plt lla a0,.LC508 call puts@plt lla a0,.LC509 call puts@plt lla a0,.LC510 call puts@plt lla a0,.LC511 call puts@plt lla a0,.LC512 call puts@plt lla a0,.LC465 call puts@plt ld ra,8(sp) li a0,0 addi sp,sp,16 jr ra .size page55, .-page55 .section .rodata.str1.8 .align 3 .LC513: .string "That familiar strange feeling of deja'vu envelops you again. It is hard to" .align 3 .LC514: .string "say, but whatever is on the other side of the door does not seem to be intended" .align 3 .LC515: .string "for you." .align 3 .LC516: .string "You go looking for more information" .align 3 .LC517: .string "You open the door and step through" .text .align 1 .globl page56 .type page56, @function page56: addi sp,sp,-32 lla a0,.LC513 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC514 call puts@plt lla a0,.LC515 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC516 lla a2,.LC517 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L351 li s1,10 .L352: ld a0,0(s0) call getc@plt bne a0,s1,.L352 li a5,97 li a0,33 bne s2,a5,.L351 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L351: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,22 addi sp,sp,32 jr ra .size page56, .-page56 .section .rodata.str1.8 .align 3 .LC518: .string "In the centre of the room is a table and a single chair. There is an Orange" .align 3 .LC519: .string "folder on the table top, but you can't make out the lettering on it." .align 3 .LC520: .string "You leave the room" .align 3 .LC521: .string "You sit down and read the folder" .text .align 1 .globl page57 .type page57, @function page57: addi sp,sp,-32 lla a0,.LC518 sd ra,24(sp) sd s0,16(sp) sd s2,0(sp) sd s1,8(sp) call puts@plt lla a0,.LC519 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC520 lla a2,.LC521 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L358 li s1,10 .L359: ld a0,0(s0) call getc@plt bne a0,s1,.L359 li a5,97 li a0,11 bne s2,a5,.L358 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L358: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) li a0,12 addi sp,sp,32 jr ra .size page57, .-page57 .align 1 .globl next_page .type next_page, @function next_page: addi sp,sp,-32 sd s0,16(sp) mv s0,a0 li a0,10 sd ra,24(sp) sd s1,8(sp) sd s2,0(sp) call putchar@plt li a5,57 bgtu s0,a5,.L364 lla a4,.L367 slli a5,s0,2 add a5,a5,a4 lw a5,0(a5) add a5,a5,a4 jr a5 .section .rodata .align 2 .align 2 .L367: .word .L431-.L367 .word .L423-.L367 .word .L422-.L367 .word .L421-.L367 .word .L420-.L367 .word .L419-.L367 .word .L418-.L367 .word .L417-.L367 .word .L416-.L367 .word .L415-.L367 .word .L414-.L367 .word .L413-.L367 .word .L412-.L367 .word .L411-.L367 .word .L410-.L367 .word .L409-.L367 .word .L408-.L367 .word .L407-.L367 .word .L406-.L367 .word .L405-.L367 .word .L404-.L367 .word .L403-.L367 .word .L402-.L367 .word .L401-.L367 .word .L400-.L367 .word .L399-.L367 .word .L398-.L367 .word .L364-.L367 .word .L396-.L367 .word .L395-.L367 .word .L394-.L367 .word .L393-.L367 .word .L392-.L367 .word .L391-.L367 .word .L390-.L367 .word .L389-.L367 .word .L388-.L367 .word .L387-.L367 .word .L386-.L367 .word .L385-.L367 .word .L384-.L367 .word .L383-.L367 .word .L382-.L367 .word .L381-.L367 .word .L380-.L367 .word .L379-.L367 .word .L378-.L367 .word .L377-.L367 .word .L376-.L367 .word .L375-.L367 .word .L374-.L367 .word .L373-.L367 .word .L372-.L367 .word .L371-.L367 .word .L370-.L367 .word .L369-.L367 .word .L368-.L367 .word .L366-.L367 .text .L431: mv s1,s0 .L364: ld ra,24(sp) ld s0,16(sp) ld s2,0(sp) mv a0,s1 ld s1,8(sp) addi sp,sp,32 jr ra .L369: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page55 .L370: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page54 .L371: lla a0,.LC480 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC481 lla a2,.LC482 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L427 li s1,10 .L428: ld a0,0(s0) call getc@plt bne a0,s1,.L428 li a5,97 li s1,47 beq s2,a5,.L364 .L427: li s1,54 j .L364 .L372: lla a0,.LC478 call puts@plt lla a0,.LC479 call puts@plt li s1,2 j .L364 .L373: lla a0,.LC476 call puts@plt lla a0,.LC477 .L439: call puts@plt lla s0,.LANCHOR0 lw a2,0(s0) lla a1,.LC0 li a0,1 call __printf_chk@plt lw a5,0(s0) li a4,6 addiw a2,a5,1 sw a2,0(s0) ble a2,a4,.L438 lla a0,.LC1 call puts@plt li s1,0 j .L364 .L374: lla a0,.LC473 call puts@plt lla a0,.LC474 call puts@plt lla a0,.LC475 call puts@plt lla a4,.LANCHOR0 lw a5,8(a4) li s1,41 addiw a5,a5,1 sw a5,8(a4) j .L364 .L375: lla a0,.LC471 call puts@plt lla a0,.LC472 j .L439 .L376: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page48 .L377: lla a0,.LC459 call puts@plt lla a0,.LC460 call puts@plt lla a0,.LC461 call puts@plt lla a0,.LC462 call puts@plt lla a0,.LC463 call puts@plt lla a0,.LC464 call puts@plt lla a0,.LC465 call puts@plt li s1,0 j .L364 .L378: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page46 .L379: lla a0,.LC445 call puts@plt lla a0,.LC446 call puts@plt lla a0,.LC447 call puts@plt lla a0,.LC448 call puts@plt lla a0,.LC449 call puts@plt lla a0,.LC450 call puts@plt lla a0,.LC451 call puts@plt lla a0,.LC452 call puts@plt lla a0,.LC453 call puts@plt li s1,10 j .L364 .L380: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page44 .L381: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page43 .L382: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page42 .L383: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page41 .L384: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page40 .L385: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page39 .L386: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page38 .L387: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page37 .L388: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page36 .L389: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page35 .L390: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page34 .L391: li a5,1 lla s0,.LANCHOR1 lla a0,.LC300 sw a5,20(s0) call puts@plt lla a0,.LC301 call puts@plt lla a0,.LC302 call puts@plt lla a0,.LC303 call puts@plt lla a0,.LC304 call puts@plt lla a0,.LC305 call puts@plt lw s1,0(s0) addi s1,s1,-1 snez s1,s1 addi s1,s1,35 j .L364 .L392: lla a0,.LC295 call puts@plt lla a0,.LC296 call puts@plt lla a0,.LC297 call puts@plt lla a0,.LC298 call puts@plt lla a0,.LC299 call puts@plt li s1,22 j .L364 .L368: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page56 .L366: lla a0,.LC518 call puts@plt lla a0,.LC519 call puts@plt lla a0,.LC40 call puts@plt lla a3,.LC520 lla a2,.LC521 lla a1,.LC41 li a0,1 call __printf_chk@plt la a5,stdout ld a0,0(a5) la s0,stdin call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff li a5,10 beq s2,a5,.L429 li s1,10 .L430: ld a0,0(s0) call getc@plt bne a0,s1,.L430 li a5,97 li s1,11 beq s2,a5,.L364 .L429: li s1,12 j .L364 .L422: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page2 .L423: lla a0,.LC42 call puts@plt lla a0,.LC43 call puts@plt lla a0,.LC44 call puts@plt li s1,57 j .L364 .L393: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page31 .L394: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page30 .L395: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page29 .L396: lla a0,.LC263 call puts@plt li s1,26 j .L364 .L398: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page26 .L399: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page25 .L400: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page24 .L401: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page23 .L402: lla a0,.LC241 call puts@plt call rand@plt sraiw a4,a0,31 srliw a4,a4,30 addw a5,a4,a0 andi a5,a5,3 subw a5,a5,a4 sext.w a3,a5 li a4,3 bgtu a3,a4,.L364 slli a4,a5,32 srli a5,a4,30 lla a4,.LANCHOR2 add a5,a4,a5 lw s1,0(a5) j .L364 .L403: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page21 .L404: lla a0,.LC230 call puts@plt lla a0,.LC231 call puts@plt lla a0,.LC232 call puts@plt lla a0,.LC233 call puts@plt lla a0,.LC234 call puts@plt lla a0,.LC235 call puts@plt lla a0,.LC236 call puts@plt li s1,22 j .L364 .L405: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page19 .L406: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page18 .L407: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page17 .L408: lla a0,.LC196 call puts@plt lla a0,.LC197 call puts@plt lla a0,.LC198 call puts@plt lla a0,.LC199 call puts@plt lla a0,.LC200 call puts@plt li a5,1 sw a5,.LANCHOR1+4,a4 li s1,22 j .L364 .L409: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page15 .L410: lla a0,.LC174 call puts@plt lla a0,.LC175 call puts@plt lla a0,.LC176 call puts@plt lla a0,.LC177 call puts@plt lla a0,.LC178 call puts@plt lla a0,.LC179 call puts@plt lla a0,.LC180 call puts@plt lla a0,.LC181 call puts@plt lla a0,.LC182 call puts@plt li s1,22 j .L364 .L411: lla a0,.LC166 call puts@plt lla a0,.LC167 call puts@plt lla a0,.LC168 call puts@plt lla a0,.LC169 call puts@plt lla a0,.LC170 call puts@plt lla a0,.LC171 call puts@plt lla a0,.LC172 call puts@plt lla a0,.LC173 call puts@plt li s1,14 j .L364 .L412: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page12 .L413: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page11 .L414: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page10 .L415: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page9 .L416: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page8 .L417: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page7 .L418: lla a0,.LC73 call puts@plt lla a0,.LC74 call puts@plt lla a0,.LC75 call puts@plt lla a0,.LC76 call puts@plt lla a0,.LC77 call puts@plt lla a0,.LC78 call puts@plt li a5,1 sw a5,.LANCHOR1,a4 li s1,8 j .L364 .L419: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page5 .L420: lla a0,.LC62 call puts@plt lla a0,.LC63 call puts@plt lla a0,.LC64 call puts@plt li s1,9 j .L364 .L421: ld s0,16(sp) ld ra,24(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 tail page3 .L438: lla a1,.LC2 li a0,1 call __printf_chk@plt sw zero,.LANCHOR1,a5 sw zero,.LANCHOR1+4,a5 li a5,10 sw a5,4(s0) li s1,32 sw zero,.LANCHOR1+8,a5 j .L364 .size next_page, .-next_page .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-64 sd ra,56(sp) sd s1,40(sp) sd s3,24(sp) sd s4,16(sp) sd s5,8(sp) sd s6,0(sp) sd s0,48(sp) sd s2,32(sp) call instructions call more call character call more lla s3,.LANCHOR0 lla s5,.LC39 la s4,stdout li s1,10 li s6,112 .L441: la s0,stdin .L442: lw a0,12(s3) call next_page sw a0,12(s3) beq a0,zero,.L454 mv a1,s5 li a0,1 call __printf_chk@plt ld a0,0(s4) call fflush@plt ld a0,0(s0) call getc@plt andi s2,a0,0xff beq s2,s1,.L442 .L443: ld a0,0(s0) call getc@plt bne a0,s1,.L443 bne s2,s6,.L442 call character mv a1,s5 li a0,1 call __printf_chk@plt ld a0,0(s4) call fflush@plt ld a0,0(s0) call getc@plt andi a0,a0,0xff beq a0,s1,.L442 .L446: ld a0,0(s0) call getc@plt bne a0,s1,.L446 j .L441 .L454: ld ra,56(sp) ld s0,48(sp) ld s1,40(sp) ld s2,32(sp) ld s3,24(sp) ld s4,16(sp) ld s5,8(sp) ld s6,0(sp) addi sp,sp,64 jr ra .size main, .-main .globl killer_count .globl blast_door .globl plato_clone .globl read_letter .globl hit_points .globl action_doll .globl ultra_violet .globl computer_request .globl page .globl clone .data .align 2 .set .LANCHOR0,. + 0 .type clone, @object .size clone, 4 clone: .word 1 .type hit_points, @object .size hit_points, 4 hit_points: .word 10 .type plato_clone, @object .size plato_clone, 4 plato_clone: .word 3 .type page, @object .size page, 4 page: .word 1 .bss .align 2 .set .LANCHOR1,. + 0 .type ultra_violet, @object .size ultra_violet, 4 ultra_violet: .zero 4 .type action_doll, @object .size action_doll, 4 action_doll: .zero 4 .type killer_count, @object .size killer_count, 4 killer_count: .zero 4 .type computer_request, @object .size computer_request, 4 computer_request: .zero 4 .type read_letter, @object .size read_letter, 4 read_letter: .zero 4 .type blast_door, @object .size blast_door, 4 blast_door: .zero 4 .section .rodata .align 3 .set .LANCHOR2,. + 0 .type CSWTCH.56, @object .size CSWTCH.56, 16 CSWTCH.56: .word 18 .word 15 .word 18 .word 29 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "paranoia.c" .text .global clone .data .align 2 .type clone, %object .size clone, 4 clone: .word 1 .global page .align 2 .type page, %object .size page, 4 page: .word 1 .global computer_request .bss .align 2 .type computer_request, %object .size computer_request, 4 computer_request: .zero 4 .global ultra_violet .align 2 .type ultra_violet, %object .size ultra_violet, 4 ultra_violet: .zero 4 .global action_doll .align 2 .type action_doll, %object .size action_doll, 4 action_doll: .zero 4 .global hit_points .data .align 2 .type hit_points, %object .size hit_points, 4 hit_points: .word 10 .global read_letter .bss .align 2 .type read_letter, %object .size read_letter, 4 read_letter: .zero 4 .global plato_clone .data .align 2 .type plato_clone, %object .size plato_clone, 4 plato_clone: .word 3 .global blast_door .bss .align 2 .type blast_door, %object .size blast_door, 4 blast_door: .zero 4 .global killer_count .align 2 .type killer_count, %object .size killer_count, 4 killer_count: .zero 4 .text .align 2 .global get_char .type get_char, %function get_char: .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:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush bl getchar strb w0, [sp, 31] ldrb w0, [sp, 31] cmp w0, 10 beq .L2 nop .L3: bl getchar cmp w0, 10 bne .L3 .L2: ldrb w0, [sp, 31] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size get_char, .-get_char .section .rodata .align 3 .LC0: .string "---------- More ----------" .text .align 2 .global more .type more, %function more: .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, .LC0 add x0, x0, :lo12:.LC0 bl printf bl get_char and w0, w0, 255 cmp w0, 112 bne .L6 bl character adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf bl get_char .L6: nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size more, .-more .section .rodata .align 3 .LC1: .string "\nClone %d just died.\n" .align 3 .LC2: .string "\n*** You Lose ***\n\nAll your clones are dead. Your name has been stricken from the records.\n\n\t\t\tTHE END" .align 3 .LC3: .string "Clone %d now activated.\n" .text .align 2 .global new_clone .type new_clone, %function new_clone: .LFB2: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str w0, [sp, 28] adrp x0, clone add x0, x0, :lo12:clone ldr w0, [x0] mov w1, w0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl printf adrp x0, clone add x0, x0, :lo12:clone ldr w0, [x0] add w1, w0, 1 adrp x0, clone add x0, x0, :lo12:clone str w1, [x0] adrp x0, clone add x0, x0, :lo12:clone ldr w0, [x0] cmp w0, 6 ble .L8 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl puts mov w0, 0 b .L9 .L8: adrp x0, clone add x0, x0, :lo12:clone ldr w0, [x0] mov w1, w0 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl printf adrp x0, ultra_violet add x0, x0, :lo12:ultra_violet str wzr, [x0] adrp x0, action_doll add x0, x0, :lo12:action_doll str wzr, [x0] adrp x0, hit_points add x0, x0, :lo12:hit_points mov w1, 10 str w1, [x0] adrp x0, killer_count add x0, x0, :lo12:killer_count str wzr, [x0] ldr w0, [sp, 28] .L9: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size new_clone, .-new_clone .align 2 .global dice_roll .type dice_roll, %function dice_roll: .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 w1, [sp, 24] str wzr, [sp, 44] ldr w0, [sp, 28] str w0, [sp, 40] b .L11 .L12: bl rand ldr w1, [sp, 24] sdiv w2, w0, w1 ldr w1, [sp, 24] mul w1, w2, w1 sub w0, w0, w1 add w0, w0, 1 ldr w1, [sp, 44] add w0, w1, w0 str w0, [sp, 44] ldr w0, [sp, 40] sub w0, w0, #1 str w0, [sp, 40] .L11: ldr w0, [sp, 40] cmp w0, 0 bgt .L12 ldr w0, [sp, 44] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size dice_roll, .-dice_roll .section .rodata .align 3 .LC4: .string "\n\n\n\nWelcome to Paranoia!\n" .align 3 .LC5: .string "HOW TO PLAY:\n" .align 3 .LC6: .string " Just press <RETURN> until you are asked to make a choice." .align 3 .LC7: .string " Select 'a' or 'b' or whatever for your choice, then press <RETURN>." .align 3 .LC8: .string " You may select 'p' at any time to get a display of your statistics." .align 3 .LC9: .string " Always choose the least dangerous option. Continue doing this until you win." .align 3 .LC10: .string " At times you will use a skill or engage in combat and and will be informed of" .align 3 .LC11: .string " the outcome. These sections will be self explanatory.\n" .align 3 .LC12: .string "HOW TO DIE:\n" .align 3 .LC13: .string " As Philo-R-DMD you will die at times during the adventure." .align 3 .LC14: .string " When this happens you will be given an new clone at a particular location." .align 3 .LC15: .string " The new Philo-R will usually have to retrace some of the old Philo-R's path;" .align 3 .LC16: .string " hopefully he won't make the same mistake as his predecessor.\n" .align 3 .LC17: .string "HOW TO WIN:\n" .align 3 .LC18: .string " Simply complete the mission before you expend all six clones." .align 3 .LC19: .string " If you make it, congratulations." .align 3 .LC20: .string " If not, you can try again later." .text .align 2 .global instructions .type instructions, %function instructions: .LFB4: .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, .LC4 add x0, x0, :lo12:.LC4 bl puts adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts adrp x0, .LC10 add x0, x0, :lo12:.LC10 bl puts adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl puts adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl puts adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts adrp x0, .LC14 add x0, x0, :lo12:.LC14 bl puts adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl puts adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl puts adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl puts adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl puts adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl puts adrp x0, .LC20 add x0, x0, :lo12:.LC20 bl puts nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size instructions, .-instructions .section .rodata .align 3 .LC21: .string "===============================================================================" .align 3 .LC22: .string "The Character : Philo-R-DMD %d\n" .align 3 .LC23: .string "Primary Attributes Secondary Attributes" .align 3 .LC24: .string "Strength ..................... 13 Carrying Capacity ................. 30" .align 3 .LC25: .string "Endurance .................... 13 Damage Bonus ....................... 0" .align 3 .LC26: .string "Agility ...................... 15 Macho Bonus ....................... -1" .align 3 .LC27: .string "Manual Dexterity ............. 15 Melee Bonus ...................... +5%%\n" .align 3 .LC28: .string "Moxie ........................ 13 Aimed Weapon Bonus .............. +10%%\n" .align 3 .LC29: .string "Chutzpah ...................... 8 Comprehension Bonus .............. +4%%\n" .align 3 .LC30: .string "Mechanical Aptitude .......... 14 Believability Bonus .............. +5%%\n" .align 3 .LC31: .string "Power Index .................. 10 Repair Bonus ..................... +5%%\n" .align 3 .LC32: .string "Credits: 160 Secret Society: Illuminati Secret Society Rank: 1" .align 3 .LC33: .string "Service Group: Power Services Mutant Power: Precognition" .align 3 .LC34: .string "Weapon: laser pistol; to hit, 40%%; type, L; Range, 50m; Reload, 6r; Malfnt, 00\n" .align 3 .LC35: .string "Skills: Basics 1(20%%), Aimed Weapon Combat 2(35%%), Laser 3(40%%),\n Personal Development 1(20%%), Communications 2(29%%), Intimidation 3(34%%)\n" .align 3 .LC36: .string "Equipment: Red Reflec Armour, Laser Pistol, Laser Barrel (red)," .align 3 .LC37: .string " Notebook & Stylus, Knife, Com Unit 1, Jump suit," .align 3 .LC38: .string " Secret Illuminati Eye-In-The-Pyramid(tm) Decoder ring," .align 3 .LC39: .string " Utility Belt & Pouches" .text .align 2 .global character .type character, %function character: .LFB5: .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, .LC21 add x0, x0, :lo12:.LC21 bl puts adrp x0, clone add x0, x0, :lo12:clone ldr w0, [x0] mov w1, w0 adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl printf adrp x0, .LC23 add x0, x0, :lo12:.LC23 bl puts adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl puts adrp x0, .LC24 add x0, x0, :lo12:.LC24 bl puts adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl puts adrp x0, .LC26 add x0, x0, :lo12:.LC26 bl puts adrp x0, .LC27 add x0, x0, :lo12:.LC27 bl printf adrp x0, .LC28 add x0, x0, :lo12:.LC28 bl printf adrp x0, .LC29 add x0, x0, :lo12:.LC29 bl printf adrp x0, .LC30 add x0, x0, :lo12:.LC30 bl printf adrp x0, .LC31 add x0, x0, :lo12:.LC31 bl printf adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl puts adrp x0, .LC32 add x0, x0, :lo12:.LC32 bl puts adrp x0, .LC33 add x0, x0, :lo12:.LC33 bl puts adrp x0, .LC34 add x0, x0, :lo12:.LC34 bl printf adrp x0, .LC35 add x0, x0, :lo12:.LC35 bl printf adrp x0, .LC36 add x0, x0, :lo12:.LC36 bl puts adrp x0, .LC37 add x0, x0, :lo12:.LC37 bl puts adrp x0, .LC38 add x0, x0, :lo12:.LC38 bl puts adrp x0, .LC39 add x0, x0, :lo12:.LC39 bl puts adrp x0, .LC21 add x0, x0, :lo12:.LC21 bl puts nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE5: .size character, .-character .section .rodata .align 3 .LC40: .string "\nSelect 'a' or 'b' :" .align 3 .LC41: .string " a - %s.\n b - %s.\n" .text .align 2 .global choose .type choose, %function choose: .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, 44] str x1, [sp, 32] str w2, [sp, 40] str x3, [sp, 24] adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts ldr x2, [sp, 24] ldr x1, [sp, 32] adrp x0, .LC41 add x0, x0, :lo12:.LC41 bl printf bl get_char and w0, w0, 255 cmp w0, 97 bne .L17 ldr w0, [sp, 44] b .L18 .L17: ldr w0, [sp, 40] .L18: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size choose, .-choose .section .rodata .align 3 .LC42: .string " You wake up face down on the red and pink checked E-Z-Kleen linoleum floor." .align 3 .LC43: .string " You recognise the pattern, it's the type preferred in the internal security\nbriefing cells. When you finally look around you, you see that you are alone" .align 3 .LC44: .string "in a large mission briefing room." .text .align 2 .global page1 .type page1, %function page1: .LFB7: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC42 add x0, x0, :lo12:.LC42 bl puts adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl puts adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl puts mov w0, 57 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size page1, .-page1 .section .rodata .align 3 .LC45: .string "\"Greetings,\" says the kindly Internal Security self incrimination expert who" .align 3 .LC46: .string "meets you at the door, \"How are we doing today?\" He offers you a doughnut" .align 3 .LC47: .string "and coffee and asks what brings you here. This doesn't seem so bad, so you" .align 3 .LC48: .string "tell him that you have come to confess some possible security lapses. He" .align 3 .LC49: .string "smiles knowingly, deftly catching your coffee as you slump to the floor." .align 3 .LC50: .string "\"Nothing to be alarmed about; it's just the truth serum,\" he says," .align 3 .LC51: .string "dragging you back into a discussion room." .align 3 .LC52: .string "The next five hours are a dim haze, but you can recall snatches of conversation" .align 3 .LC53: .string "about your secret society, your mutant power, and your somewhat paranoid" .align 3 .LC54: .string "distrust of The Computer. This should explain why you are hogtied and moving" .align 3 .LC55: .string "slowly down the conveyer belt towards the meat processing unit in Food" .align 3 .LC56: .string "Services." .text .align 2 .global page2 .type page2, %function page2: .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, .LC45 add x0, x0, :lo12:.LC45 bl puts adrp x0, .LC46 add x0, x0, :lo12:.LC46 bl puts adrp x0, .LC47 add x0, x0, :lo12:.LC47 bl puts adrp x0, .LC48 add x0, x0, :lo12:.LC48 bl puts adrp x0, .LC49 add x0, x0, :lo12:.LC49 bl puts adrp x0, .LC50 add x0, x0, :lo12:.LC50 bl puts adrp x0, .LC51 add x0, x0, :lo12:.LC51 bl puts adrp x0, .LC52 add x0, x0, :lo12:.LC52 bl puts adrp x0, .LC53 add x0, x0, :lo12:.LC53 bl puts adrp x0, .LC54 add x0, x0, :lo12:.LC54 bl puts adrp x0, .LC55 add x0, x0, :lo12:.LC55 bl puts adrp x0, .LC56 add x0, x0, :lo12:.LC56 bl puts adrp x0, computer_request add x0, x0, :lo12:computer_request ldr w0, [x0] cmp w0, 1 bne .L22 mov w0, 45 bl new_clone b .L23 .L22: mov w0, 32 bl new_clone .L23: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size page2, .-page2 .section .rodata .align 3 .LC57: .string "You walk to the nearest Computer terminal and request more information about" .align 3 .LC58: .string "Christmas. The Computer says, \"That is an A-1 ULTRAVIOLET ONLY IMMEDIATE" .align 3 .LC59: .string "TERMINATION classified topic. What is your clearance please, Troubleshooter?\"" .align 3 .LC60: .string "You lie and claim Ultraviolet clearance" .align 3 .LC61: .string "You give your correct clearance" .text .align 2 .global page3 .type page3, %function page3: .LFB9: .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, .LC57 add x0, x0, :lo12:.LC57 bl puts adrp x0, .LC58 add x0, x0, :lo12:.LC58 bl puts adrp x0, .LC59 add x0, x0, :lo12:.LC59 bl puts adrp x0, .LC60 add x3, x0, :lo12:.LC60 mov w2, 5 adrp x0, .LC61 add x1, x0, :lo12:.LC61 mov w0, 4 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size page3, .-page3 .section .rodata .align 3 .LC62: .string "\"That is classified information, Troubleshooter, thank you for your inquiry." .align 3 .LC63: .string " Please report to an Internal Security self incrimination station as soon as" .align 3 .LC64: .string " possible.\"" .text .align 2 .global page4 .type page4, %function page4: .LFB10: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC62 add x0, x0, :lo12:.LC62 bl puts adrp x0, .LC63 add x0, x0, :lo12:.LC63 bl puts adrp x0, .LC64 add x0, x0, :lo12:.LC64 bl puts mov w0, 9 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size page4, .-page4 .section .rodata .align 3 .LC65: .string "The computer says, \"Troubleshooter, you are not wearing the correct colour" .align 3 .LC66: .string "uniform. You must put on an Ultraviolet uniform immediately. I have seen to" .align 3 .LC67: .string "your needs and ordered one already; it will be here shortly. Please wait with" .align 3 .LC68: .string "your back to the wall until it arrives.\" In less than a minute an infrared" .align 3 .LC69: .string "arrives carrying a white bundle. He asks you to sign for it, then hands it to" .align 3 .LC70: .string "you and stands back, well outside of a fragmentation grenade's blast radius." .align 3 .LC71: .string "You finally come to your senses and run for it" .align 3 .LC72: .string "You open the package and put on the uniform" .text .align 2 .global page5 .type page5, %function page5: .LFB11: .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, .LC65 add x0, x0, :lo12:.LC65 bl puts adrp x0, .LC66 add x0, x0, :lo12:.LC66 bl puts adrp x0, .LC67 add x0, x0, :lo12:.LC67 bl puts adrp x0, .LC68 add x0, x0, :lo12:.LC68 bl puts adrp x0, .LC69 add x0, x0, :lo12:.LC69 bl puts adrp x0, .LC70 add x0, x0, :lo12:.LC70 bl puts adrp x0, .LC71 add x3, x0, :lo12:.LC71 mov w2, 7 adrp x0, .LC72 add x1, x0, :lo12:.LC72 mov w0, 6 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size page5, .-page5 .section .rodata .align 3 .LC73: .string "The uniform definitely makes you look snappy and pert. It really looks" .align 3 .LC74: .string "impressive, and even has the new lopsided lapel fashion that you admire so" .align 3 .LC75: .string "much. What's more, citizens of all ranks come to obsequious attention as you" .align 3 .LC76: .string "walk past. This isn't so bad being an Ultraviolet. You could probably come" .align 3 .LC77: .string "to like it, given time." .align 3 .LC78: .string "The beeping computer terminal interrupts your musings." .text .align 2 .global page6 .type page6, %function page6: .LFB12: .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, .LC73 add x0, x0, :lo12:.LC73 bl puts adrp x0, .LC74 add x0, x0, :lo12:.LC74 bl puts adrp x0, .LC75 add x0, x0, :lo12:.LC75 bl puts adrp x0, .LC76 add x0, x0, :lo12:.LC76 bl puts adrp x0, .LC77 add x0, x0, :lo12:.LC77 bl puts adrp x0, .LC78 add x0, x0, :lo12:.LC78 bl puts adrp x0, ultra_violet add x0, x0, :lo12:ultra_violet mov w1, 1 str w1, [x0] mov w0, 8 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE12: .size page6, .-page6 .section .rodata .align 3 .LC79: .string "The corridor lights dim and are replaced by red battle lamps as the Security" .align 3 .LC80: .string "Breach alarms howl all around you. You run headlong down the corridor and" .align 3 .LC81: .string "desperately windmill around a corner, only to collide with a squad of 12 Blue" .align 3 .LC82: .string "clearance Vulture squadron soldiers. \"Stop, Slime Face,\" shouts the" .align 3 .LC83: .string "commander, \"or there won't be enough of you left for a tissue sample.\"" .align 3 .LC84: .string "\"All right, soldiers, stuff the greasy traitor into the uniform,\" he orders," .align 3 .LC85: .string "waving the business end of his blue laser scant inches from your nose." .align 3 .LC86: .string "With his other hand he shakes open a white bundle to reveal a pristine new" .align 3 .LC87: .string "Ultraviolet citizen's uniform." .align 3 .LC88: .string "One of the Vulture squadron Troubleshooters grabs you by the neck in the" .align 3 .LC89: .string "exotic and very painful Vulture Clamp(tm) death grip (you saw a special about" .align 3 .LC90: .string "it on the Teela O'Malley show), while the rest tear off your clothes and" .align 3 .LC91: .string "force you into the Ultraviolet uniform. The moment you are dressed they step" .align 3 .LC92: .string "clear and stand at attention." .align 3 .LC93: .string "\"Thank you for your cooperation, sir,\" says the steely eyed leader of the" .align 3 .LC94: .string "Vulture Squad. \"We will be going about our business now.\" With perfect" .align 3 .LC95: .string "timing the Vultures wheel smartly and goosestep down the corridor." .align 3 .LC96: .string "Special Note: don't make the mistake of assuming that your skills have" .align 3 .LC97: .string "improved any because of the uniform; you're only a Red Troubleshooter" .align 3 .LC98: .string "traitorously posing as an Ultraviolet, and don't you forget it!" .align 3 .LC99: .string "Suddenly, a computer terminal comes to life beside you." .text .align 2 .global page7 .type page7, %function page7: .LFB13: .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, .LC79 add x0, x0, :lo12:.LC79 bl puts adrp x0, .LC80 add x0, x0, :lo12:.LC80 bl puts adrp x0, .LC81 add x0, x0, :lo12:.LC81 bl puts adrp x0, .LC82 add x0, x0, :lo12:.LC82 bl puts adrp x0, .LC83 add x0, x0, :lo12:.LC83 bl puts adrp x0, .LC84 add x0, x0, :lo12:.LC84 bl puts adrp x0, .LC85 add x0, x0, :lo12:.LC85 bl puts adrp x0, .LC86 add x0, x0, :lo12:.LC86 bl puts adrp x0, .LC87 add x0, x0, :lo12:.LC87 bl puts adrp x0, .LC88 add x0, x0, :lo12:.LC88 bl puts adrp x0, .LC89 add x0, x0, :lo12:.LC89 bl puts adrp x0, .LC90 add x0, x0, :lo12:.LC90 bl puts adrp x0, .LC91 add x0, x0, :lo12:.LC91 bl puts adrp x0, .LC92 add x0, x0, :lo12:.LC92 bl puts adrp x0, .LC93 add x0, x0, :lo12:.LC93 bl puts adrp x0, .LC94 add x0, x0, :lo12:.LC94 bl puts adrp x0, .LC95 add x0, x0, :lo12:.LC95 bl puts adrp x0, .LC96 add x0, x0, :lo12:.LC96 bl puts adrp x0, .LC97 add x0, x0, :lo12:.LC97 bl puts adrp x0, .LC98 add x0, x0, :lo12:.LC98 bl puts adrp x0, .LC99 add x0, x0, :lo12:.LC99 bl puts adrp x0, ultra_violet add x0, x0, :lo12:ultra_violet mov w1, 1 str w1, [x0] mov w0, 8 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE13: .size page7, .-page7 .section .rodata .align 3 .LC100: .string "\"Now, about your question, citizen. Christmas was an old world marketing ploy" .align 3 .LC101: .string "to induce lower clearance citizens to purchase vast quantities of goods, thus" .align 3 .LC102: .string "accumulation a large amount of credit under the control of a single class of" .align 3 .LC103: .string "citizen known as Retailers. The strategy used is to imply that all good" .align 3 .LC104: .string "citizens give gifts during Christmas, thus if one wishes to be a valuable" .align 3 .LC105: .string "member of society one must also give gifts during Christmas. More valuable" .align 3 .LC106: .string "gifts make one a more valuable member, and thus did the Retailers come to" .align 3 .LC107: .string "control a disproportionate amount of the currency. In this way Christmas" .align 3 .LC108: .string "eventually caused the collapse of the old world. Understandably, Christmas" .align 3 .LC109: .string "has been declared a treasonable practice in Alpha Complex." .align 3 .LC110: .string "Thank you for your inquiry.\"" .align 3 .LC111: .string "You continue on your way to GDH7-beta." .text .align 2 .global page8 .type page8, %function page8: .LFB14: .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, .LC100 add x0, x0, :lo12:.LC100 bl puts adrp x0, .LC101 add x0, x0, :lo12:.LC101 bl puts adrp x0, .LC102 add x0, x0, :lo12:.LC102 bl puts adrp x0, .LC103 add x0, x0, :lo12:.LC103 bl puts adrp x0, .LC104 add x0, x0, :lo12:.LC104 bl puts adrp x0, .LC105 add x0, x0, :lo12:.LC105 bl puts adrp x0, .LC106 add x0, x0, :lo12:.LC106 bl puts adrp x0, .LC107 add x0, x0, :lo12:.LC107 bl puts adrp x0, .LC108 add x0, x0, :lo12:.LC108 bl puts adrp x0, .LC109 add x0, x0, :lo12:.LC109 bl puts adrp x0, .LC110 add x0, x0, :lo12:.LC110 bl puts adrp x0, .LC111 add x0, x0, :lo12:.LC111 bl puts mov w0, 10 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE14: .size page8, .-page8 .section .rodata .align 3 .LC112: .string "As you walk toward the tubecar that will take you to GDH7-beta, you pass one" .align 3 .LC113: .string "of the bright blue and orange Internal Security self incrimination stations." .align 3 .LC114: .string "Inside, you can see an IS agent cheerfully greet an infrared citizen and then" .align 3 .LC115: .string "lead him at gunpoint into one of the rubber lined discussion rooms." .align 3 .LC116: .string "You just continue blithely on past" .align 3 .LC117: .string "You decide to stop here and chat, as ordered by The Computer" .text .align 2 .global page9 .type page9, %function page9: .LFB15: .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, .LC112 add x0, x0, :lo12:.LC112 bl puts adrp x0, .LC113 add x0, x0, :lo12:.LC113 bl puts adrp x0, .LC114 add x0, x0, :lo12:.LC114 bl puts adrp x0, .LC115 add x0, x0, :lo12:.LC115 bl puts adrp x0, .LC116 add x3, x0, :lo12:.LC116 mov w2, 10 adrp x0, .LC117 add x1, x0, :lo12:.LC117 mov w0, 2 bl choose str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 2 bne .L37 adrp x0, computer_request add x0, x0, :lo12:computer_request mov w1, 1 str w1, [x0] b .L38 .L37: adrp x0, computer_request add x0, x0, :lo12:computer_request str wzr, [x0] .L38: ldr w0, [sp, 28] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE15: .size page9, .-page9 .section .rodata .align 3 .LC118: .string "You stroll briskly down the corridor, up a ladder, across an unrailed catwalk," .align 3 .LC119: .string "under a perilously swinging blast door in urgent need of repair, and into" .align 3 .LC120: .string "tubecar grand central. This is the bustling hub of Alpha Complex tubecar" .align 3 .LC121: .string "transportation. Before you spreads a spaghetti maze of magnalift tube tracks" .align 3 .LC122: .string "and linear accelerators. You bravely study the specially enhanced 3-D tube" .align 3 .LC123: .string "route map; you wouldn't be the first Troubleshooter to take a fast tube ride" .align 3 .LC124: .string "to nowhere." .align 3 .LC125: .string "You think you have the route worked out, so you'll board a tube train" .align 3 .LC126: .string "You decide to ask The Computer about Christmas using a nearby terminal" .align 3 .LC127: .string "You nervously select a tubecar and step aboard." .align 3 .LC128: .string "You just caught a purple line tubecar." .align 3 .LC129: .string "You just caught a brown line tubecar." .text .align 2 .global page10 .type page10, %function page10: .LFB16: .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, .LC118 add x0, x0, :lo12:.LC118 bl puts adrp x0, .LC119 add x0, x0, :lo12:.LC119 bl puts adrp x0, .LC120 add x0, x0, :lo12:.LC120 bl puts adrp x0, .LC121 add x0, x0, :lo12:.LC121 bl puts adrp x0, .LC122 add x0, x0, :lo12:.LC122 bl puts adrp x0, .LC123 add x0, x0, :lo12:.LC123 bl puts adrp x0, .LC124 add x0, x0, :lo12:.LC124 bl puts adrp x0, ultra_violet add x0, x0, :lo12:ultra_violet ldr w0, [x0] cmp w0, 0 bne .L41 adrp x0, .LC125 add x3, x0, :lo12:.LC125 mov w2, 10 adrp x0, .LC126 add x1, x0, :lo12:.LC126 mov w0, 3 bl choose str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 3 bne .L41 ldr w0, [sp, 28] b .L42 .L41: adrp x0, .LC127 add x0, x0, :lo12:.LC127 bl puts mov w1, 10 mov w0, 2 bl dice_roll cmp w0, 12 bgt .L43 adrp x0, .LC128 add x0, x0, :lo12:.LC128 bl puts mov w0, 13 b .L42 .L43: adrp x0, .LC129 add x0, x0, :lo12:.LC129 bl puts mov w0, 48 .L42: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE16: .size page10, .-page10 .section .rodata .align 3 .LC130: .string "The printing on the folder says \"Experimental Self Briefing.\"" .align 3 .LC131: .string "You open it and begin to read the following:" .align 3 .LC132: .string "Step 1: Compel the briefing subject to attend the briefing." .align 3 .LC133: .string " Note: See Experimental Briefing Sub Form Indigo-WY-2," .align 3 .LC134: .string " 'Experimental Self Briefing Subject Acquisition Through The Use Of" .align 3 .LC135: .string " Neurotoxin Room Foggers.'" .align 3 .LC136: .string "Step 2: Inform the briefing subject that the briefing has begun." .align 3 .LC137: .string " ATTENTION: THE BRIEFING HAS BEGUN." .align 3 .LC138: .string "Step 3: Present the briefing material to the briefing subject." .align 3 .LC139: .string " GREETINGS TROUBLESHOOTER." .align 3 .LC140: .string " YOU HAVE BEEN SPECIALLY SELECTED TO SINGLEHANDEDLY" .align 3 .LC141: .string " WIPE OUT A DEN OF TRAITOROUS CHRISTMAS ACTIVITY. YOUR MISSION IS TO" .align 3 .LC142: .string " GO TO GOODS DISTRIBUTION HALL 7-BETA AND ASSESS ANY CHRISTMAS ACTIVITY" .align 3 .LC143: .string " YOU FIND THERE. YOU ARE TO INFILTRATE THESE CHRISTMAS CELEBRANTS," .align 3 .LC144: .string " LOCATE THEIR RINGLEADER, AN UNKNOWN MASTER RETAILER, AND BRING HIM" .align 3 .LC145: .string " BACK FOR EXECUTION AND TRIAL. THANK YOU. THE COMPUTER IS YOUR FRIEND." .align 3 .LC146: .string "Step 4: Sign the briefing subject's briefing release form to indicate that" .align 3 .LC147: .string " the briefing subject has completed the briefing." .align 3 .LC148: .string " ATTENTION: PLEASE SIGN YOUR BRIEFING RELEASE FORM." .align 3 .LC149: .string "Step 5: Terminate the briefing" .align 3 .LC150: .string " ATTENTION: THE BRIEFING IS TERMINATED." .align 3 .LC151: .string "You walk to the door and hold your signed briefing release form up to the" .align 3 .LC152: .string "plexiglass window. A guard scrutinises it for a moment and then slides back" .align 3 .LC153: .string "the megabolts holding the door shut. You are now free to continue the" .align 3 .LC154: .string "mission." .align 3 .LC155: .string "You have decided to go directly to Goods Distribution Hall 7-beta" .align 3 .LC156: .string "You wish to ask The Computer for more information about Christmas" .text .align 2 .global page11 .type page11, %function page11: .LFB17: .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, .LC130 add x0, x0, :lo12:.LC130 bl puts adrp x0, .LC131 add x0, x0, :lo12:.LC131 bl puts adrp x0, .LC132 add x0, x0, :lo12:.LC132 bl puts adrp x0, .LC133 add x0, x0, :lo12:.LC133 bl puts adrp x0, .LC134 add x0, x0, :lo12:.LC134 bl puts adrp x0, .LC135 add x0, x0, :lo12:.LC135 bl puts adrp x0, .LC136 add x0, x0, :lo12:.LC136 bl puts adrp x0, .LC137 add x0, x0, :lo12:.LC137 bl puts adrp x0, .LC138 add x0, x0, :lo12:.LC138 bl puts adrp x0, .LC139 add x0, x0, :lo12:.LC139 bl puts adrp x0, .LC140 add x0, x0, :lo12:.LC140 bl puts adrp x0, .LC141 add x0, x0, :lo12:.LC141 bl puts adrp x0, .LC142 add x0, x0, :lo12:.LC142 bl puts adrp x0, .LC143 add x0, x0, :lo12:.LC143 bl puts adrp x0, .LC144 add x0, x0, :lo12:.LC144 bl puts adrp x0, .LC145 add x0, x0, :lo12:.LC145 bl puts adrp x0, .LC146 add x0, x0, :lo12:.LC146 bl puts adrp x0, .LC147 add x0, x0, :lo12:.LC147 bl puts adrp x0, .LC148 add x0, x0, :lo12:.LC148 bl puts adrp x0, .LC149 add x0, x0, :lo12:.LC149 bl puts adrp x0, .LC150 add x0, x0, :lo12:.LC150 bl puts bl more adrp x0, .LC151 add x0, x0, :lo12:.LC151 bl puts adrp x0, .LC152 add x0, x0, :lo12:.LC152 bl puts adrp x0, .LC153 add x0, x0, :lo12:.LC153 bl puts adrp x0, .LC154 add x0, x0, :lo12:.LC154 bl puts adrp x0, .LC155 add x3, x0, :lo12:.LC155 mov w2, 10 adrp x0, .LC156 add x1, x0, :lo12:.LC156 mov w0, 3 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE17: .size page11, .-page11 .section .rodata .align 3 .LC157: .string "You walk up to the door and push the button labelled \"push to exit.\"" .align 3 .LC158: .string "Within seconds a surly looking guard shoves his face into the small plexiglass" .align 3 .LC159: .string "window. You can see his mouth forming words but you can't hear any of them." .align 3 .LC160: .string "You just stare at him blankly for a few moments until he points down to a" .align 3 .LC161: .string "speaker on your side of the door. When you put your ear to it you can barely" .align 3 .LC162: .string "hear him say, \"Let's see your briefing release form, bud. You aren't" .align 3 .LC163: .string "getting out of here without it.\"" .align 3 .LC164: .string "You stare around the room some more" .align 3 .LC165: .string "You sit down at the table and read the Orange packet" .text .align 2 .global page12 .type page12, %function page12: .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, .LC157 add x0, x0, :lo12:.LC157 bl puts adrp x0, .LC158 add x0, x0, :lo12:.LC158 bl puts adrp x0, .LC159 add x0, x0, :lo12:.LC159 bl puts adrp x0, .LC160 add x0, x0, :lo12:.LC160 bl puts adrp x0, .LC161 add x0, x0, :lo12:.LC161 bl puts adrp x0, .LC162 add x0, x0, :lo12:.LC162 bl puts adrp x0, .LC163 add x0, x0, :lo12:.LC163 bl puts adrp x0, .LC164 add x3, x0, :lo12:.LC164 mov w2, 57 adrp x0, .LC165 add x1, x0, :lo12:.LC165 mov w0, 11 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE18: .size page12, .-page12 .section .rodata .align 3 .LC166: .string "You step into the shiny plasteel tubecar, wondering why the shape has always" .align 3 .LC167: .string "reminded you of bullets. The car shoots forward the instant your feet touch" .align 3 .LC168: .string "the slippery gray floor, pinning you immobile against the back wall as the" .align 3 .LC169: .string "tubecar careens toward GDH7-beta. Your only solace is the knowledge that it" .align 3 .LC170: .string "could be worse, much worse." .align 3 .LC171: .string "Before too long the car comes to a stop. You can see signs for GDH7-beta" .align 3 .LC172: .string "through the window. With a little practice you discover that you can crawl" .align 3 .LC173: .string "to the door and pull open the latch." .text .align 2 .global page13 .type page13, %function page13: .LFB19: .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, .LC166 add x0, x0, :lo12:.LC166 bl puts adrp x0, .LC167 add x0, x0, :lo12:.LC167 bl puts adrp x0, .LC168 add x0, x0, :lo12:.LC168 bl puts adrp x0, .LC169 add x0, x0, :lo12:.LC169 bl puts adrp x0, .LC170 add x0, x0, :lo12:.LC170 bl puts adrp x0, .LC171 add x0, x0, :lo12:.LC171 bl puts adrp x0, .LC172 add x0, x0, :lo12:.LC172 bl puts adrp x0, .LC173 add x0, x0, :lo12:.LC173 bl puts mov w0, 14 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE19: .size page13, .-page13 .section .rodata .align 3 .LC174: .string "You manage to pull yourself out of the tubecar and look around. Before you is" .align 3 .LC175: .string "one of the most confusing things you have ever seen, a hallway that is" .align 3 .LC176: .string "simultaneously both red and green clearance. If this is the result of" .align 3 .LC177: .string "Christmas then it's easy to see the evils inherent in its practice." .align 3 .LC178: .string "You are in the heart of a large goods distribution centre. You can see all" .align 3 .LC179: .string "about you evidence of traitorous secret society Christmas celebration; rubber" .align 3 .LC180: .string "faced robots whiz back and forth selling toys to holiday shoppers, simul-plast" .align 3 .LC181: .string "wreaths hang from every light fixture, while ahead in the shadows is a citizen" .align 3 .LC182: .string "wearing a huge red synthetic flower." .text .align 2 .global page14 .type page14, %function page14: .LFB20: .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, .LC174 add x0, x0, :lo12:.LC174 bl puts adrp x0, .LC175 add x0, x0, :lo12:.LC175 bl puts adrp x0, .LC176 add x0, x0, :lo12:.LC176 bl puts adrp x0, .LC177 add x0, x0, :lo12:.LC177 bl puts adrp x0, .LC178 add x0, x0, :lo12:.LC178 bl puts adrp x0, .LC179 add x0, x0, :lo12:.LC179 bl puts adrp x0, .LC180 add x0, x0, :lo12:.LC180 bl puts adrp x0, .LC181 add x0, x0, :lo12:.LC181 bl puts adrp x0, .LC182 add x0, x0, :lo12:.LC182 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE20: .size page14, .-page14 .section .rodata .align 3 .LC183: .string "You are set upon by a runty robot with a queer looking face and two pointy" .align 3 .LC184: .string "rubber ears poking from beneath a tattered cap. \"Hey mister,\" it says," .align 3 .LC185: .string "\"you done all your last minute Christmas shopping? I got some real neat junk" .align 3 .LC186: .string "here. You don't wanna miss the big day tommorrow, if you know what I mean.\"" .align 3 .LC187: .string "The robot opens its bag to show you a pile of shoddy Troubleshooter dolls. It" .align 3 .LC188: .string "reaches in and pulls out one of them. \"Look, these Action Troubleshooter(tm)" .align 3 .LC189: .string "dolls are the neatest thing. This one's got moveable arms and when you" .align 3 .LC190: .string "squeeze him, his little rifle squirts realistic looking napalm. It's only" .align 3 .LC191: .string "50 credits. Oh yeah, Merry Christmas.\"" .align 3 .LC192: .string "\nSelect 'a', 'b' or 'c' :" .align 3 .LC193: .string " a - You decide to buy the doll." .align 3 .LC194: .string " b - You shoot the robot." .align 3 .LC195: .string " c - You ignore the robot and keep searching the hall." .text .align 2 .global page15 .type page15, %function page15: .LFB21: .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, .LC183 add x0, x0, :lo12:.LC183 bl puts adrp x0, .LC184 add x0, x0, :lo12:.LC184 bl puts adrp x0, .LC185 add x0, x0, :lo12:.LC185 bl puts adrp x0, .LC186 add x0, x0, :lo12:.LC186 bl puts adrp x0, .LC187 add x0, x0, :lo12:.LC187 bl puts adrp x0, .LC188 add x0, x0, :lo12:.LC188 bl puts adrp x0, .LC189 add x0, x0, :lo12:.LC189 bl puts adrp x0, .LC190 add x0, x0, :lo12:.LC190 bl puts adrp x0, .LC191 add x0, x0, :lo12:.LC191 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC193 add x0, x0, :lo12:.LC193 bl puts adrp x0, .LC194 add x0, x0, :lo12:.LC194 bl puts adrp x0, .LC195 add x0, x0, :lo12:.LC195 bl puts bl get_char and w0, w0, 255 cmp w0, 97 beq .L53 cmp w0, 98 beq .L54 b .L57 .L53: mov w0, 16 b .L56 .L54: mov w0, 17 b .L56 .L57: mov w0, 22 .L56: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE21: .size page15, .-page15 .section .rodata .align 3 .LC196: .string "The doll is a good buy for fifty credits; it will make a fine Christmas present" .align 3 .LC197: .string "for one of your friends. After the sale the robot rolls away. You can use" .align 3 .LC198: .string "the doll later in combat. It works just like a cone rifle firing napalm," .align 3 .LC199: .string "except that occasionally it will explode and blow the user to smithereens." .align 3 .LC200: .string "But don't let that stop you." .text .align 2 .global page16 .type page16, %function page16: .LFB22: .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, .LC196 add x0, x0, :lo12:.LC196 bl puts adrp x0, .LC197 add x0, x0, :lo12:.LC197 bl puts adrp x0, .LC198 add x0, x0, :lo12:.LC198 bl puts adrp x0, .LC199 add x0, x0, :lo12:.LC199 bl puts adrp x0, .LC200 add x0, x0, :lo12:.LC200 bl puts adrp x0, action_doll add x0, x0, :lo12:action_doll mov w1, 1 str w1, [x0] mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE22: .size page16, .-page16 .section .rodata .align 3 .LC201: .string "You whip out your laser and shoot the robot, but not before it squeezes the" .align 3 .LC202: .string "toy at you. The squeeze toy has the same effect as a cone rifle firing napalm," .align 3 .LC203: .string "and the elfbot's armour has no effect against your laser." .align 3 .LC204: .string "You have been hit!" .align 3 .LC205: .string "It missed you, but not by much!" .align 3 .LC206: .string "You zapped the little bastard!" .align 3 .LC207: .string "You wasted it! Good shooting!" .align 3 .LC208: .string "You will need more evidence, so you search GDH7-beta further" .align 3 .LC209: .string "after the GDH medbot has patched you up." .align 3 .LC210: .string "Damn! You missed!" .align 3 .LC211: .string "It tried to fire again, but the toy exploded and demolished it." .text .align 2 .global page17 .type page17, %function page17: .LFB23: .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, 15 str w0, [sp, 28] adrp x0, .LC201 add x0, x0, :lo12:.LC201 bl puts adrp x0, .LC202 add x0, x0, :lo12:.LC202 bl puts adrp x0, .LC203 add x0, x0, :lo12:.LC203 bl puts str wzr, [sp, 24] b .L61 .L68: mov w1, 100 mov w0, 1 bl dice_roll cmp w0, 25 bgt .L62 adrp x0, .LC204 add x0, x0, :lo12:.LC204 bl puts mov w1, 10 mov w0, 1 bl dice_roll mov w1, w0 adrp x0, hit_points add x0, x0, :lo12:hit_points ldr w0, [x0] sub w1, w0, w1 adrp x0, hit_points add x0, x0, :lo12:hit_points str w1, [x0] adrp x0, hit_points add x0, x0, :lo12:hit_points ldr w0, [x0] cmp w0, 0 bgt .L63 mov w0, 45 bl new_clone b .L64 .L62: adrp x0, .LC205 add x0, x0, :lo12:.LC205 bl puts .L63: mov w1, 100 mov w0, 1 bl dice_roll cmp w0, 40 bgt .L65 adrp x0, .LC206 add x0, x0, :lo12:.LC206 bl puts mov w1, 10 mov w0, 2 bl dice_roll mov w1, w0 ldr w0, [sp, 28] sub w0, w0, w1 str w0, [sp, 28] ldr w0, [sp, 28] cmp w0, 0 bgt .L66 adrp x0, .LC207 add x0, x0, :lo12:.LC207 bl puts adrp x0, .LC208 add x0, x0, :lo12:.LC208 bl puts adrp x0, hit_points add x0, x0, :lo12:hit_points ldr w0, [x0] cmp w0, 9 bgt .L67 adrp x0, .LC209 add x0, x0, :lo12:.LC209 bl puts .L67: adrp x0, hit_points add x0, x0, :lo12:hit_points mov w1, 10 str w1, [x0] mov w0, 22 b .L64 .L65: adrp x0, .LC210 add x0, x0, :lo12:.LC210 bl puts .L66: ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L61: ldr w0, [sp, 24] cmp w0, 1 ble .L68 adrp x0, .LC211 add x0, x0, :lo12:.LC211 bl puts adrp x0, .LC208 add x0, x0, :lo12:.LC208 bl puts adrp x0, hit_points add x0, x0, :lo12:hit_points ldr w0, [x0] cmp w0, 9 bgt .L69 adrp x0, .LC209 add x0, x0, :lo12:.LC209 bl puts .L69: adrp x0, hit_points add x0, x0, :lo12:hit_points mov w1, 10 str w1, [x0] mov w0, 22 .L64: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size page17, .-page17 .section .rodata .align 3 .LC212: .string "You walk to the centre of the hall, ogling like an infrared fresh from the" .align 3 .LC213: .string "clone vats. Towering before you is the most unearthly thing you have ever" .align 3 .LC214: .string "seen, a green multi armed mutant horror hulking 15 feet above your head." .align 3 .LC215: .string "Its skeletal body is draped with hundreds of metallic strips (probably to" .align 3 .LC216: .string "negate the effects of some insidious mutant power), and the entire hideous" .align 3 .LC217: .string "creature is wrapped in a thousand blinking hazard lights. It's times like" .align 3 .LC218: .string "this when you wish you'd had some training for this job. Luckily the" .align 3 .LC219: .string "creature doesn't take notice of you but stands unmoving, as though waiting for" .align 3 .LC220: .string "a summons from its dark lord, the Master Retailer." .align 3 .LC221: .string "WHAM, suddenly you are struck from behind." .text .align 2 .global page18 .type page18, %function page18: .LFB24: .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, .LC212 add x0, x0, :lo12:.LC212 bl puts adrp x0, .LC213 add x0, x0, :lo12:.LC213 bl puts adrp x0, .LC214 add x0, x0, :lo12:.LC214 bl puts adrp x0, .LC215 add x0, x0, :lo12:.LC215 bl puts adrp x0, .LC216 add x0, x0, :lo12:.LC216 bl puts adrp x0, .LC217 add x0, x0, :lo12:.LC217 bl puts adrp x0, .LC218 add x0, x0, :lo12:.LC218 bl puts adrp x0, .LC219 add x0, x0, :lo12:.LC219 bl puts adrp x0, .LC220 add x0, x0, :lo12:.LC220 bl puts adrp x0, .LC221 add x0, x0, :lo12:.LC221 bl puts mov w1, 10 mov w0, 2 bl dice_roll cmp w0, 14 bgt .L71 mov w0, 19 b .L72 .L71: mov w0, 20 .L72: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE24: .size page18, .-page18 .section .rodata .align 3 .LC222: .string "Quickly you regain your balance, whirl and fire your laser into the Ultraviolet" .align 3 .LC223: .string "citizen behind you. For a moment your heart leaps to your throat, then you" .align 3 .LC224: .string "realise that he is indeed dead and you will be the only one filing a report on" .align 3 .LC225: .string "this incident. Besides, he was participating in this traitorous Christmas" .align 3 .LC226: .string "shopping, as is evident from the rain of shoddy toys falling all around you." .align 3 .LC227: .string "Another valorous deed done in the service of The Computer!" .align 3 .LC228: .string "You run away like the cowardly dog you are" .align 3 .LC229: .string "You search the body, keeping an eye open for Internal Security" .text .align 2 .global page19 .type page19, %function page19: .LFB25: .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, .LC222 add x0, x0, :lo12:.LC222 bl puts adrp x0, .LC223 add x0, x0, :lo12:.LC223 bl puts adrp x0, .LC224 add x0, x0, :lo12:.LC224 bl puts adrp x0, .LC225 add x0, x0, :lo12:.LC225 bl puts adrp x0, .LC226 add x0, x0, :lo12:.LC226 bl puts adrp x0, .LC227 add x0, x0, :lo12:.LC227 bl puts adrp x0, killer_count add x0, x0, :lo12:killer_count ldr w0, [x0] add w1, w0, 1 adrp x0, killer_count add x0, x0, :lo12:killer_count str w1, [x0] adrp x0, killer_count add x0, x0, :lo12:killer_count ldr w1, [x0] adrp x0, clone add x0, x0, :lo12:clone ldr w0, [x0] mov w2, 7 sub w0, w2, w0 cmp w1, w0 ble .L74 mov w0, 21 b .L75 .L74: adrp x0, read_letter add x0, x0, :lo12:read_letter ldr w0, [x0] cmp w0, 1 bne .L76 mov w0, 22 b .L75 .L76: adrp x0, .LC228 add x3, x0, :lo12:.LC228 mov w2, 22 adrp x0, .LC229 add x1, x0, :lo12:.LC229 mov w0, 34 bl choose .L75: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE25: .size page19, .-page19 .section .rodata .align 3 .LC230: .string "Oh no! you can't keep your balance. You're falling, falling head first into" .align 3 .LC231: .string "the Christmas beast's gaping maw. It's a valiant struggle; you think you are" .align 3 .LC232: .string "gone when its poisonous needles dig into your flesh, but with a heroic effort" .align 3 .LC233: .string "you jerk a string of lights free and jam the live wires into the creature's" .align 3 .LC234: .string "spine. The Christmas beast topples to the ground and begins to burn, filling" .align 3 .LC235: .string "the area with a thick acrid smoke. It takes only a moment to compose yourself," .align 3 .LC236: .string "and then you are ready to continue your search for the Master Retailer." .text .align 2 .global page20 .type page20, %function page20: .LFB26: .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, .LC230 add x0, x0, :lo12:.LC230 bl puts adrp x0, .LC231 add x0, x0, :lo12:.LC231 bl puts adrp x0, .LC232 add x0, x0, :lo12:.LC232 bl puts adrp x0, .LC233 add x0, x0, :lo12:.LC233 bl puts adrp x0, .LC234 add x0, x0, :lo12:.LC234 bl puts adrp x0, .LC235 add x0, x0, :lo12:.LC235 bl puts adrp x0, .LC236 add x0, x0, :lo12:.LC236 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE26: .size page20, .-page20 .section .rodata .align 3 .LC237: .string "You have been wasting the leading citizens of Alpha Complex at a prodigious" .align 3 .LC238: .string "rate. This has not gone unnoticed by the Internal Security squad at GDH7-beta." .align 3 .LC239: .string "Suddenly, a net of laser beams spear out of the gloomy corners of the hall," .align 3 .LC240: .string "chopping you into teeny, weeny bite size pieces." .text .align 2 .global page21 .type page21, %function page21: .LFB27: .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, .LC237 add x0, x0, :lo12:.LC237 bl puts adrp x0, .LC238 add x0, x0, :lo12:.LC238 bl puts adrp x0, .LC239 add x0, x0, :lo12:.LC239 bl puts adrp x0, .LC240 add x0, x0, :lo12:.LC240 bl puts mov w0, 45 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE27: .size page21, .-page21 .section .rodata .align 3 .LC241: .string "You are searching Goods Distribution Hall 7-beta." .text .align 2 .global page22 .type page22, %function page22: .LFB28: .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, .LC241 add x0, x0, :lo12:.LC241 bl puts mov w1, 4 mov w0, 1 bl dice_roll cmp w0, 4 beq .L82 cmp w0, 4 bgt .L83 cmp w0, 3 beq .L84 cmp w0, 3 bgt .L83 cmp w0, 1 beq .L85 cmp w0, 2 beq .L86 b .L83 .L85: mov w0, 18 b .L81 .L86: mov w0, 15 b .L81 .L84: mov w0, 18 b .L81 .L82: mov w0, 29 b .L81 .L83: .L81: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE28: .size page22, .-page22 .section .rodata .align 3 .LC242: .string "You go to the nearest computer terminal and declare yourself a mutant." .align 3 .LC243: .string "\"A mutant, he's a mutant,\" yells a previously unnoticed infrared who had" .align 3 .LC244: .string "been looking over your shoulder. You easily gun him down, but not before a" .align 3 .LC245: .string "dozen more citizens take notice and aim their weapons at you." .align 3 .LC246: .string "You want to fight it out, one against twelve" .align 3 .LC247: .string "You tell them that it was really only a bad joke" .text .align 2 .global page23 .type page23, %function page23: .LFB29: .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, .LC242 add x0, x0, :lo12:.LC242 bl puts adrp x0, .LC243 add x0, x0, :lo12:.LC243 bl puts adrp x0, .LC244 add x0, x0, :lo12:.LC244 bl puts adrp x0, .LC245 add x0, x0, :lo12:.LC245 bl puts adrp x0, .LC246 add x3, x0, :lo12:.LC246 mov w2, 24 adrp x0, .LC247 add x1, x0, :lo12:.LC247 mov w0, 28 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE29: .size page23, .-page23 .section .rodata .align 3 .LC248: .string "Golly, I never expected someone to pick this. I haven't even designed" .align 3 .LC249: .string "the 12 citizens who are going to make a sponge out of you. Tell you what," .align 3 .LC250: .string "I'll give you a second chance." .align 3 .LC251: .string "You REALLY want to shoot it out" .align 3 .LC252: .string "You change your mind and say it was only a bad joke" .text .align 2 .global page24 .type page24, %function page24: .LFB30: .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, .LC248 add x0, x0, :lo12:.LC248 bl puts adrp x0, .LC249 add x0, x0, :lo12:.LC249 bl puts adrp x0, .LC250 add x0, x0, :lo12:.LC250 bl puts adrp x0, .LC251 add x3, x0, :lo12:.LC251 mov w2, 25 adrp x0, .LC252 add x1, x0, :lo12:.LC252 mov w0, 28 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE30: .size page24, .-page24 .section .rodata .align 3 .LC253: .string "Boy, you really can't take a hint!" .align 3 .LC254: .string "They're closing in. Their trigger fingers are twitching, they're about to" .align 3 .LC255: .string "shoot. This is your last chance." .align 3 .LC256: .string "You are going to shoot" .align 3 .LC257: .string "You tell them it was all just a bad joke" .text .align 2 .global page25 .type page25, %function page25: .LFB31: .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, .LC253 add x0, x0, :lo12:.LC253 bl puts adrp x0, .LC254 add x0, x0, :lo12:.LC254 bl puts adrp x0, .LC255 add x0, x0, :lo12:.LC255 bl puts adrp x0, .LC256 add x3, x0, :lo12:.LC256 mov w2, 26 adrp x0, .LC257 add x1, x0, :lo12:.LC257 mov w0, 28 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE31: .size page25, .-page25 .section .rodata .align 3 .LC258: .string "You can read the cold, sober hatred in their eyes (They really didn't think" .align 3 .LC259: .string "it was funny), as they tighten the circle around you. One of them shoves a" .align 3 .LC260: .string "blaster up your nose, but that doesn't hurt as much as the multi-gigawatt" .align 3 .LC261: .string "carbonium tipped food drill in the small of your back." .align 3 .LC262: .string "You spend the remaining micro-seconds of your life wondering what you did wrong" .text .align 2 .global page26 .type page26, %function page26: .LFB32: .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, .LC258 add x0, x0, :lo12:.LC258 bl puts adrp x0, .LC259 add x0, x0, :lo12:.LC259 bl puts adrp x0, .LC260 add x0, x0, :lo12:.LC260 bl puts adrp x0, .LC261 add x0, x0, :lo12:.LC261 bl puts adrp x0, .LC262 add x0, x0, :lo12:.LC262 bl puts mov w0, 32 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE32: .size page26, .-page26 .align 2 .global page27 .type page27, %function page27: .LFB33: .cfi_startproc nop ret .cfi_endproc .LFE33: .size page27, .-page27 .section .rodata .align 3 .LC263: .string "They don't think it's funny." .text .align 2 .global page28 .type page28, %function page28: .LFB34: .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, .LC263 add x0, x0, :lo12:.LC263 bl puts mov w0, 26 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE34: .size page28, .-page28 .section .rodata .align 3 .LC264: .string "\"Psst, hey citizen, come here. Pssfft,\" you hear. When you peer around" .align 3 .LC265: .string "you can see someone's dim outline in the shadows. \"I got some information" .align 3 .LC266: .string "on the Master Retailer. It'll only cost you 30 psst credits.\"" .align 3 .LC267: .string " a - You pay the 30 credits for the info." .align 3 .LC268: .string " b - You would rather threaten him for the information." .align 3 .LC269: .string " c - You ignore him and walk away." .text .align 2 .global page29 .type page29, %function page29: .LFB35: .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, .LC264 add x0, x0, :lo12:.LC264 bl puts adrp x0, .LC265 add x0, x0, :lo12:.LC265 bl puts adrp x0, .LC266 add x0, x0, :lo12:.LC266 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC267 add x0, x0, :lo12:.LC267 bl puts adrp x0, .LC268 add x0, x0, :lo12:.LC268 bl puts adrp x0, .LC269 add x0, x0, :lo12:.LC269 bl puts bl get_char and w0, w0, 255 cmp w0, 97 beq .L100 cmp w0, 98 beq .L101 b .L104 .L100: mov w0, 30 b .L103 .L101: mov w0, 31 b .L103 .L104: mov w0, 22 .L103: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE35: .size page29, .-page29 .section .rodata .align 3 .LC270: .string "You step into the shadows and offer the man a thirty credit bill. \"Just drop" .align 3 .LC271: .string "it on the floor,\" he says. \"So you're looking for the Master Retailer, pssfft?" .align 3 .LC272: .string "I've seen him, he's a fat man in a fuzzy red and white jump suit. They say" .align 3 .LC273: .string "he's a high programmer with no respect for proper security. If you want to" .align 3 .LC274: .string "find him then pssfft step behind me and go through the door.\"" .align 3 .LC275: .string "Behind the man is a reinforced plasteel blast door. The centre of it has been" .align 3 .LC276: .string "buckled toward you in a manner you only saw once before when you were field" .align 3 .LC277: .string "testing the rocket assist plasma slingshot (you found it easily portable but" .align 3 .LC278: .string "prone to misfire). Luckily it isn't buckled too far for you to make out the" .align 3 .LC279: .string "warning sign. WARNING!! Don't open this door or the same thing will happen to" .align 3 .LC280: .string "you. Opening this door is a capital offense. Do not do it. Not at all. This" .align 3 .LC281: .string "is not a joke." .align 3 .LC282: .string " a - You use your Precognition mutant power on opening the door." .align 3 .LC283: .string " b - You just go through the door anyway." .align 3 .LC284: .string " c - You decide it's too dangerous and walk away." .text .align 2 .global page30 .type page30, %function page30: .LFB36: .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, .LC270 add x0, x0, :lo12:.LC270 bl puts adrp x0, .LC271 add x0, x0, :lo12:.LC271 bl puts adrp x0, .LC272 add x0, x0, :lo12:.LC272 bl puts adrp x0, .LC273 add x0, x0, :lo12:.LC273 bl puts adrp x0, .LC274 add x0, x0, :lo12:.LC274 bl puts adrp x0, .LC275 add x0, x0, :lo12:.LC275 bl puts adrp x0, .LC276 add x0, x0, :lo12:.LC276 bl puts adrp x0, .LC277 add x0, x0, :lo12:.LC277 bl puts adrp x0, .LC278 add x0, x0, :lo12:.LC278 bl puts adrp x0, .LC279 add x0, x0, :lo12:.LC279 bl puts adrp x0, .LC280 add x0, x0, :lo12:.LC280 bl puts adrp x0, .LC281 add x0, x0, :lo12:.LC281 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC282 add x0, x0, :lo12:.LC282 bl puts adrp x0, .LC283 add x0, x0, :lo12:.LC283 bl puts adrp x0, .LC284 add x0, x0, :lo12:.LC284 bl puts bl get_char and w0, w0, 255 cmp w0, 97 beq .L106 cmp w0, 98 beq .L107 b .L110 .L106: mov w0, 56 b .L109 .L107: mov w0, 33 b .L109 .L110: mov w0, 22 .L109: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE36: .size page30, .-page30 .section .rodata .align 3 .LC285: .string "Like any good troubleshooter you make the least expensive decision and threaten" .align 3 .LC286: .string "him for information. With lightning like reflexes you whip out your laser and" .align 3 .LC287: .string "stick it up his nose. \"Talk, you traitorous Christmas celebrator, or who nose" .align 3 .LC288: .string "what will happen to you, yuk yuk,\" you pun menacingly, and then you notice" .align 3 .LC289: .string "something is very wrong. He doesn't have a nose. As a matter of fact he's" .align 3 .LC290: .string "made of one eighth inch cardboard and your laser is sticking through the other" .align 3 .LC291: .string "side of his head. \"Are you going to pay?\" says his mouth speaker," .align 3 .LC292: .string "\"or are you going to pssfft go away stupid?\"" .align 3 .LC293: .string "You pssfft go away stupid" .align 3 .LC294: .string "You pay the 30 credits" .text .align 2 .global page31 .type page31, %function page31: .LFB37: .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, .LC285 add x0, x0, :lo12:.LC285 bl puts adrp x0, .LC286 add x0, x0, :lo12:.LC286 bl puts adrp x0, .LC287 add x0, x0, :lo12:.LC287 bl puts adrp x0, .LC288 add x0, x0, :lo12:.LC288 bl puts adrp x0, .LC289 add x0, x0, :lo12:.LC289 bl puts adrp x0, .LC290 add x0, x0, :lo12:.LC290 bl puts adrp x0, .LC291 add x0, x0, :lo12:.LC291 bl puts adrp x0, .LC292 add x0, x0, :lo12:.LC292 bl puts adrp x0, .LC293 add x3, x0, :lo12:.LC293 mov w2, 22 adrp x0, .LC294 add x1, x0, :lo12:.LC294 mov w0, 30 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE37: .size page31, .-page31 .section .rodata .align 3 .LC295: .string "Finally it's your big chance to prove that you're as good a troubleshooter" .align 3 .LC296: .string "as your previous clone. You walk briskly to mission briefing and pick up your" .align 3 .LC297: .string "previous clone's personal effects and notepad. After reviewing the notes you" .align 3 .LC298: .string "know what has to be done. You catch the purple line to Goods Distribution Hall" .align 3 .LC299: .string "7-beta and begin to search for the blast door." .text .align 2 .global page32 .type page32, %function page32: .LFB38: .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, .LC295 add x0, x0, :lo12:.LC295 bl puts adrp x0, .LC296 add x0, x0, :lo12:.LC296 bl puts adrp x0, .LC297 add x0, x0, :lo12:.LC297 bl puts adrp x0, .LC298 add x0, x0, :lo12:.LC298 bl puts adrp x0, .LC299 add x0, x0, :lo12:.LC299 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE38: .size page32, .-page32 .section .rodata .align 3 .LC300: .string "You release the megabolts on the blast door, then strain against it with your" .align 3 .LC301: .string "awesome strength. Slowly the door creaks open. You bravely leap through the" .align 3 .LC302: .string "opening and smack your head into the barrel of a 300 mm 'ultra shock' class" .align 3 .LC303: .string "plasma cannon. It's dark in the barrel now, but just before your head got" .align 3 .LC304: .string "stuck you can remember seeing a group of technicians anxiously watch you leap" .align 3 .LC305: .string "into the room." .text .align 2 .global page33 .type page33, %function page33: .LFB39: .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, blast_door add x0, x0, :lo12:blast_door mov w1, 1 str w1, [x0] adrp x0, .LC300 add x0, x0, :lo12:.LC300 bl puts adrp x0, .LC301 add x0, x0, :lo12:.LC301 bl puts adrp x0, .LC302 add x0, x0, :lo12:.LC302 bl puts adrp x0, .LC303 add x0, x0, :lo12:.LC303 bl puts adrp x0, .LC304 add x0, x0, :lo12:.LC304 bl puts adrp x0, .LC305 add x0, x0, :lo12:.LC305 bl puts adrp x0, ultra_violet add x0, x0, :lo12:ultra_violet ldr w0, [x0] cmp w0, 1 bne .L116 mov w0, 35 b .L117 .L116: mov w0, 36 .L117: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE39: .size page33, .-page33 .section .rodata .align 3 .LC306: .string "You have found a sealed envelope on the body. You open it and read:" .align 3 .LC307: .string "\"WARNING: Ultraviolet Clearance ONLY. DO NOT READ." .align 3 .LC308: .string "Memo from Chico-U-MRX4 to Harpo-U-MRX5." .align 3 .LC309: .string "The planned takeover of the Troubleshooter Training Course goes well, Comrade." .align 3 .LC310: .string "Once we have trained the unwitting bourgeois troubleshooters to work as" .align 3 .LC311: .string "communist dupes, the overthrow of Alpha Complex will be unstoppable. My survey" .align 3 .LC312: .string "of the complex has convinced me that no one suspects a thing; soon it will be" .align 3 .LC313: .string "too late for them to oppose the revolution. The only thing that could possibly" .align 3 .LC314: .string "impede the people's revolution would be someone alerting The Computer to our" .align 3 .LC315: .string "plans (for instance, some enterprising Troubleshooter could tell The Computer" .align 3 .LC316: .string "that the communists have liberated the Troubleshooter Training Course and plan" .align 3 .LC317: .string "to use it as a jumping off point from which to undermine the stability of all" .align 3 .LC318: .string "Alpha Complex), but as we both know, the capitalistic Troubleshooters would" .align 3 .LC319: .string "never serve the interests of the proletariat above their own bourgeois desires." .align 3 .LC320: .string "P.S. I'm doing some Christmas shopping later today. Would you like me to pick" .align 3 .LC321: .string "you up something?\"" .align 3 .LC322: .string "When you put down the memo you are overcome by that strange deja'vu again." .align 3 .LC323: .string "You see yourself talking privately with The Computer. You are telling it all" .align 3 .LC324: .string "about the communists' plan, and then the scene shifts and you see yourself" .align 3 .LC325: .string "showered with awards for foiling the insidious communist plot to take over the" .align 3 .LC326: .string "complex." .align 3 .LC327: .string "You wander off to look for more evidence" .align 3 .LC328: .string "You rush off to the nearest computer terminal to expose the commies" .text .align 2 .global page34 .type page34, %function page34: .LFB40: .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, .LC306 add x0, x0, :lo12:.LC306 bl puts adrp x0, .LC307 add x0, x0, :lo12:.LC307 bl puts adrp x0, .LC308 add x0, x0, :lo12:.LC308 bl puts adrp x0, .LC309 add x0, x0, :lo12:.LC309 bl puts adrp x0, .LC310 add x0, x0, :lo12:.LC310 bl puts adrp x0, .LC311 add x0, x0, :lo12:.LC311 bl puts adrp x0, .LC312 add x0, x0, :lo12:.LC312 bl puts adrp x0, .LC313 add x0, x0, :lo12:.LC313 bl puts adrp x0, .LC314 add x0, x0, :lo12:.LC314 bl puts adrp x0, .LC315 add x0, x0, :lo12:.LC315 bl puts adrp x0, .LC316 add x0, x0, :lo12:.LC316 bl puts adrp x0, .LC317 add x0, x0, :lo12:.LC317 bl puts adrp x0, .LC318 add x0, x0, :lo12:.LC318 bl puts adrp x0, .LC319 add x0, x0, :lo12:.LC319 bl puts adrp x0, .LC320 add x0, x0, :lo12:.LC320 bl puts adrp x0, .LC321 add x0, x0, :lo12:.LC321 bl puts bl more adrp x0, .LC322 add x0, x0, :lo12:.LC322 bl puts adrp x0, .LC323 add x0, x0, :lo12:.LC323 bl puts adrp x0, .LC324 add x0, x0, :lo12:.LC324 bl puts adrp x0, .LC325 add x0, x0, :lo12:.LC325 bl puts adrp x0, .LC326 add x0, x0, :lo12:.LC326 bl puts adrp x0, read_letter add x0, x0, :lo12:read_letter mov w1, 1 str w1, [x0] adrp x0, .LC327 add x3, x0, :lo12:.LC327 mov w2, 22 adrp x0, .LC328 add x1, x0, :lo12:.LC328 mov w0, 46 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE40: .size page34, .-page34 .section .rodata .align 3 .LC329: .string "\"Oh master,\" you hear through the gun barrel, \"where have you been? It is" .align 3 .LC330: .string "time for the great Christmas gifting ceremony. You had better hurry and get" .align 3 .LC331: .string "the costume on or the trainee may begin to suspect.\" For the second time" .align 3 .LC332: .string "today you are forced to wear attire not of your own choosing. They zip the" .align 3 .LC333: .string "suit to your chin just as you hear gunfire erupt behind you." .align 3 .LC334: .string "\"Oh no! Who left the door open? The commies will get in. Quick, fire the" .align 3 .LC335: .string "laser cannon or we're all doomed.\"" .align 3 .LC336: .string "\"Too late you capitalist swine, the people's revolutionary strike force claims" .align 3 .LC337: .string "this cannon for the proletariat's valiant struggle against oppression. Take" .align 3 .LC338: .string "that, you running dog imperialist lackey. ZAP, KAPOW\"" .align 3 .LC339: .string "Just when you think that things couldn't get worse, \"Aha, look what we have" .align 3 .LC340: .string "here, the Master Retailer himself with his head caught in his own cannon. His" .align 3 .LC341: .string "death will serve as a symbol of freedom for all Alpha Complex." .align 3 .LC342: .string "Fire the cannon.\"" .text .align 2 .global page35 .type page35, %function page35: .LFB41: .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, .LC329 add x0, x0, :lo12:.LC329 bl puts adrp x0, .LC330 add x0, x0, :lo12:.LC330 bl puts adrp x0, .LC331 add x0, x0, :lo12:.LC331 bl puts adrp x0, .LC332 add x0, x0, :lo12:.LC332 bl puts adrp x0, .LC333 add x0, x0, :lo12:.LC333 bl puts adrp x0, .LC334 add x0, x0, :lo12:.LC334 bl puts adrp x0, .LC335 add x0, x0, :lo12:.LC335 bl puts adrp x0, .LC336 add x0, x0, :lo12:.LC336 bl puts adrp x0, .LC337 add x0, x0, :lo12:.LC337 bl puts adrp x0, .LC338 add x0, x0, :lo12:.LC338 bl puts adrp x0, .LC339 add x0, x0, :lo12:.LC339 bl puts adrp x0, .LC340 add x0, x0, :lo12:.LC340 bl puts adrp x0, .LC341 add x0, x0, :lo12:.LC341 bl puts adrp x0, .LC342 add x0, x0, :lo12:.LC342 bl puts mov w0, 32 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size page35, .-page35 .section .rodata .align 3 .LC343: .string "\"Congratulations, troubleshooter, you have successfully found the lair of the" .align 3 .LC344: .string "Master Retailer and completed the Troubleshooter Training Course test mission,\"" .align 3 .LC345: .string "a muffled voice tells you through the barrel. \"Once we dislodge your head" .align 3 .LC346: .string "from the barrel of the 'Ultra Shock' plasma cannon you can begin with the" .align 3 .LC347: .string "training seminars, the first of which will concern the 100%% accurate\n" .align 3 .LC348: .string "identification and elimination of unregistered mutants. If you have any" .align 3 .LC349: .string "objections please voice them now.\"" .align 3 .LC350: .string " a - You appreciate his courtesy and voice an objection." .align 3 .LC351: .string " b - After your head is removed from the cannon, you register as a mutant." .align 3 .LC352: .string " c - After your head is removed from the cannon, you go to the unregistered" .align 3 .LC353: .string " mutant identification and elimination seminar." .text .align 2 .global page36 .type page36, %function page36: .LFB42: .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, .LC343 add x0, x0, :lo12:.LC343 bl puts adrp x0, .LC344 add x0, x0, :lo12:.LC344 bl puts adrp x0, .LC345 add x0, x0, :lo12:.LC345 bl puts adrp x0, .LC346 add x0, x0, :lo12:.LC346 bl puts adrp x0, .LC347 add x0, x0, :lo12:.LC347 bl printf adrp x0, .LC348 add x0, x0, :lo12:.LC348 bl puts adrp x0, .LC349 add x0, x0, :lo12:.LC349 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC350 add x0, x0, :lo12:.LC350 bl puts adrp x0, .LC351 add x0, x0, :lo12:.LC351 bl puts adrp x0, .LC352 add x0, x0, :lo12:.LC352 bl puts adrp x0, .LC353 add x0, x0, :lo12:.LC353 bl puts bl get_char and w0, w0, 255 cmp w0, 97 beq .L123 cmp w0, 98 beq .L124 b .L127 .L123: mov w0, 32 bl new_clone b .L126 .L124: mov w0, 23 b .L126 .L127: mov w0, 37 .L126: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE42: .size page36, .-page36 .section .rodata .align 3 .LC354: .string "\"Come with me please, Troubleshooter,\" says the Green clearance technician" .align 3 .LC355: .string "after he has dislodged your head from the cannon. \"You have been participating" .align 3 .LC356: .string "in the Troubleshooter Training Course since you got off the tube car in" .align 3 .LC357: .string "GDH7-beta,\" he explains as he leads you down a corridor. \"The entire" .align 3 .LC358: .string "Christmas assignment was a test mission to assess your current level of" .align 3 .LC359: .string "training. You didn't do so well. We're going to start at the beginning with" .align 3 .LC360: .string "the other student. Ah, here we are, the mutant identification and elimination" .align 3 .LC361: .string "lecture.\" He shows you into a vast lecture hall filled with empty seats." .align 3 .LC362: .string "There is only one other student here, a Troubleshooter near the front row" .align 3 .LC363: .string "playing with his Action Troubleshooter(tm) figure. \"Find a seat and I will" .align 3 .LC364: .string "begin,\" says the instructor." .text .align 2 .global page37 .type page37, %function page37: .LFB43: .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, .LC354 add x0, x0, :lo12:.LC354 bl puts adrp x0, .LC355 add x0, x0, :lo12:.LC355 bl puts adrp x0, .LC356 add x0, x0, :lo12:.LC356 bl puts adrp x0, .LC357 add x0, x0, :lo12:.LC357 bl puts adrp x0, .LC358 add x0, x0, :lo12:.LC358 bl puts adrp x0, .LC359 add x0, x0, :lo12:.LC359 bl puts adrp x0, .LC360 add x0, x0, :lo12:.LC360 bl puts adrp x0, .LC361 add x0, x0, :lo12:.LC361 bl puts adrp x0, .LC362 add x0, x0, :lo12:.LC362 bl puts adrp x0, .LC363 add x0, x0, :lo12:.LC363 bl puts adrp x0, .LC364 add x0, x0, :lo12:.LC364 bl puts mov w0, 38 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE43: .size page37, .-page37 .section .rodata .align 3 .LC365: .string "\"I am Plato-B-PHI%d, head of mutant propaganda here at the training course.\n" .align 3 .LC366: .string "If you have any questions about mutants please come to me. Today I will be" .align 3 .LC367: .string "talking about mutant detection. Detecting mutants is very easy. One simply" .align 3 .LC368: .string "watches for certain tell tale signs, such as the green scaly skin, the third" .align 3 .LC369: .string "arm growing from the forehead, or other similar disfigurements so common with" .align 3 .LC370: .string "their kind. There are, however, a few rare specimens that show no outward sign" .align 3 .LC371: .string "of their treason. This has been a significant problem, so our researchers have" .align 3 .LC372: .string "been working on a solution. I would like a volunteer to test this device,\"" .align 3 .LC373: .string "he says, holding up a ray gun looking thing. \"It is a mutant detection ray." .align 3 .LC374: .string "This little button detects for mutants, and this big button stuns them once" .align 3 .LC375: .string "they are discovered. Who would like to volunteer for a test?\"" .align 3 .LC376: .string "The Troubleshooter down the front squirms deeper into his chair." .align 3 .LC377: .string "You duck behind a chair and hope the instructor doesn't notice you" .align 3 .LC378: .string "You volunteer for the test" .text .align 2 .global page38 .type page38, %function page38: .LFB44: .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, plato_clone add x0, x0, :lo12:plato_clone ldr w0, [x0] mov w1, w0 adrp x0, .LC365 add x0, x0, :lo12:.LC365 bl printf adrp x0, .LC366 add x0, x0, :lo12:.LC366 bl puts adrp x0, .LC367 add x0, x0, :lo12:.LC367 bl puts adrp x0, .LC368 add x0, x0, :lo12:.LC368 bl puts adrp x0, .LC369 add x0, x0, :lo12:.LC369 bl puts adrp x0, .LC370 add x0, x0, :lo12:.LC370 bl puts adrp x0, .LC371 add x0, x0, :lo12:.LC371 bl puts adrp x0, .LC372 add x0, x0, :lo12:.LC372 bl puts adrp x0, .LC373 add x0, x0, :lo12:.LC373 bl puts adrp x0, .LC374 add x0, x0, :lo12:.LC374 bl puts adrp x0, .LC375 add x0, x0, :lo12:.LC375 bl puts adrp x0, .LC376 add x0, x0, :lo12:.LC376 bl puts adrp x0, .LC377 add x3, x0, :lo12:.LC377 mov w2, 40 adrp x0, .LC378 add x1, x0, :lo12:.LC378 mov w0, 39 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE44: .size page38, .-page38 .section .rodata .align 3 .LC379: .string "You bravely volunteer to test the mutant detection gun. You stand up and walk" .align 3 .LC380: .string "down the steps to the podium, passing a very relieved Troubleshooter along the" .align 3 .LC381: .string "way. When you reach the podium Plato-B-PHI hands you the mutant detection gun" .align 3 .LC382: .string "and says, \"Here, aim the gun at that Troubleshooter and push the small button." .align 3 .LC383: .string "If you see a purple light, stun him.\" Grasping the opportunity to prove your" .align 3 .LC384: .string "worth to The Computer, you fire the mutant detection ray at the Troubleshooter." .align 3 .LC385: .string "A brilliant purple nimbus instantly surrounds his body. You slip your finger" .align 3 .LC386: .string "to the large stun button and he falls writhing to the floor." .align 3 .LC387: .string "\"Good shot,\" says the instructor as you hand him the mutant detection gun," .align 3 .LC388: .string "\"I'll see that you get a commendation for this. It seems you have the hang" .align 3 .LC389: .string "of mutant detection and elimination. You can go on to the secret society" .align 3 .LC390: .string "infiltration class. I'll see that the little mutie gets packaged for" .align 3 .LC391: .string "tomorrow's mutant dissection class.\"" .text .align 2 .global page39 .type page39, %function page39: .LFB45: .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, .LC379 add x0, x0, :lo12:.LC379 bl puts adrp x0, .LC380 add x0, x0, :lo12:.LC380 bl puts adrp x0, .LC381 add x0, x0, :lo12:.LC381 bl puts adrp x0, .LC382 add x0, x0, :lo12:.LC382 bl puts adrp x0, .LC383 add x0, x0, :lo12:.LC383 bl puts adrp x0, .LC384 add x0, x0, :lo12:.LC384 bl puts adrp x0, .LC385 add x0, x0, :lo12:.LC385 bl puts adrp x0, .LC386 add x0, x0, :lo12:.LC386 bl puts adrp x0, .LC387 add x0, x0, :lo12:.LC387 bl puts adrp x0, .LC388 add x0, x0, :lo12:.LC388 bl puts adrp x0, .LC389 add x0, x0, :lo12:.LC389 bl puts adrp x0, .LC390 add x0, x0, :lo12:.LC390 bl puts adrp x0, .LC391 add x0, x0, :lo12:.LC391 bl puts mov w0, 41 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE45: .size page39, .-page39 .section .rodata .align 3 .LC392: .string "You breathe a sigh of relief as Plato-B-PHI picks on the other Troubleshooter." .align 3 .LC393: .string "\"You down here in the front,\" says the instructor pointing at the other" .align 3 .LC394: .string "Troubleshooter, \"you'll make a good volunteer. Please step forward.\"" .align 3 .LC395: .string "The Troubleshooter looks around with a `who me?' expression on his face, but" .align 3 .LC396: .string "since he is the only one visible in the audience he figures his number is up." .align 3 .LC397: .string "He walks down to the podium clutching his Action Troubleshooter(tm) doll before" .align 3 .LC398: .string "him like a weapon. \"Here,\" says Plato-B-PHI, \"take the mutant detection ray" .align 3 .LC399: .string "and point it at the audience. If there are any mutants out there we'll know" .align 3 .LC400: .string "soon enough.\" Suddenly your skin prickles with static electricity as a bright" .align 3 .LC401: .string "purple nimbus surrounds your body. \"Ha Ha, got one,\" says the instructor." .align 3 .LC402: .string "\"Stun him before he gets away.\"" .align 3 .LC403: .string "His shot hits you. You feel numb all over." .align 3 .LC404: .string "His shot just missed." .align 3 .LC405: .string "You just blew his head off. His lifeless hand drops the mutant detector ray." .align 3 .LC406: .string "You burnt a hole in the podium. He sights the mutant detector ray on you." .text .align 2 .global page40 .type page40, %function page40: .LFB46: .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, .LC392 add x0, x0, :lo12:.LC392 bl puts adrp x0, .LC393 add x0, x0, :lo12:.LC393 bl puts adrp x0, .LC394 add x0, x0, :lo12:.LC394 bl puts adrp x0, .LC395 add x0, x0, :lo12:.LC395 bl puts adrp x0, .LC396 add x0, x0, :lo12:.LC396 bl puts adrp x0, .LC397 add x0, x0, :lo12:.LC397 bl puts adrp x0, .LC398 add x0, x0, :lo12:.LC398 bl puts adrp x0, .LC399 add x0, x0, :lo12:.LC399 bl puts adrp x0, .LC400 add x0, x0, :lo12:.LC400 bl puts adrp x0, .LC401 add x0, x0, :lo12:.LC401 bl puts adrp x0, .LC402 add x0, x0, :lo12:.LC402 bl puts bl more .L138: mov w1, 100 mov w0, 1 bl dice_roll cmp w0, 30 bgt .L135 adrp x0, .LC403 add x0, x0, :lo12:.LC403 bl puts mov w0, 49 b .L136 .L135: adrp x0, .LC404 add x0, x0, :lo12:.LC404 bl puts mov w1, 100 mov w0, 1 bl dice_roll cmp w0, 40 bgt .L137 adrp x0, .LC405 add x0, x0, :lo12:.LC405 bl puts mov w0, 50 b .L136 .L137: adrp x0, .LC406 add x0, x0, :lo12:.LC406 bl puts b .L138 .L136: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE46: .size page40, .-page40 .section .rodata .align 3 .LC407: .string "You stumble down the hallway of the Troubleshooter Training Course looking for" .align 3 .LC408: .string "your next class. Up ahead you see one of the instructors waving to you. When" .align 3 .LC409: .string "you get there he shakes your hand and says, \"I am Jung-I-PSY. Welcome to the" .align 3 .LC410: .string "secret society infiltration seminar. I hope you ...\" You don't catch the" .align 3 .LC411: .string "rest of his greeting because you're paying too much attention to his handshake;" .align 3 .LC412: .string "it is the strangest thing that has ever been done to your hand, sort of how it" .align 3 .LC413: .string "would feel if you put a neuro whip in a high energy palm massage unit." .align 3 .LC414: .string "It doesn't take you long to learn what he is up to; you feel him briefly shake" .align 3 .LC415: .string "your hand with the secret Illuminati handshake." .align 3 .LC416: .string "You ignore this secret society contact" .align 3 .LC417: .string "You respond with the proper Illuminati code phrase, \"Ewige Blumenkraft\"" .text .align 2 .global page41 .type page41, %function page41: .LFB47: .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, .LC407 add x0, x0, :lo12:.LC407 bl puts adrp x0, .LC408 add x0, x0, :lo12:.LC408 bl puts adrp x0, .LC409 add x0, x0, :lo12:.LC409 bl puts adrp x0, .LC410 add x0, x0, :lo12:.LC410 bl puts adrp x0, .LC411 add x0, x0, :lo12:.LC411 bl puts adrp x0, .LC412 add x0, x0, :lo12:.LC412 bl puts adrp x0, .LC413 add x0, x0, :lo12:.LC413 bl puts adrp x0, .LC414 add x0, x0, :lo12:.LC414 bl puts adrp x0, .LC415 add x0, x0, :lo12:.LC415 bl puts adrp x0, .LC416 add x3, x0, :lo12:.LC416 mov w2, 43 adrp x0, .LC417 add x1, x0, :lo12:.LC417 mov w0, 42 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE47: .size page41, .-page41 .section .rodata .align 3 .LC418: .string "\"Aha, so you are a member of the elitist Illuminati secret society,\" he says" .align 3 .LC419: .string "loudly, \"that is most interesting.\" He turns to the large class already" .align 3 .LC420: .string "seated in the auditorium and says, \"You see, class, by simply using the correct" .align 3 .LC421: .string "hand shake you can identify the member of any secret society. Please keep your" .align 3 .LC422: .string "weapons trained on him while I call a guard." .align 3 .LC423: .string "You wait for the guard" .align 3 .LC424: .string "You run for it" .text .align 2 .global page42 .type page42, %function page42: .LFB48: .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, .LC418 add x0, x0, :lo12:.LC418 bl puts adrp x0, .LC419 add x0, x0, :lo12:.LC419 bl puts adrp x0, .LC420 add x0, x0, :lo12:.LC420 bl puts adrp x0, .LC421 add x0, x0, :lo12:.LC421 bl puts adrp x0, .LC422 add x0, x0, :lo12:.LC422 bl puts adrp x0, .LC423 add x3, x0, :lo12:.LC423 mov w2, 52 adrp x0, .LC424 add x1, x0, :lo12:.LC424 mov w0, 51 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE48: .size page42, .-page42 .section .rodata .align 3 .LC425: .string "You sit through a long lecture on how to recognise and infiltrate secret" .align 3 .LC426: .string "societies, with an emphasis on mimicking secret handshakes. The basic theory," .align 3 .LC427: .string "which you realise to be sound from your Iluminati training, is that with the" .align 3 .LC428: .string "proper handshake you can pass unnoticed in any secret society gathering." .align 3 .LC429: .string "What's more, the proper handshake will open doors faster than an 'ultra shock'" .align 3 .LC430: .string "plasma cannon. You are certain that with the information you learn here you" .align 3 .LC431: .string "will easily be promoted to the next level of your Illuminati secret society." .align 3 .LC432: .string "The lecture continues for three hours, during which you have the opportunity" .align 3 .LC433: .string "to practice many different handshakes. Afterwards everyone is directed to" .align 3 .LC434: .string "attend the graduation ceremony. Before you must go you have a little time to" .align 3 .LC435: .string "talk to The Computer about, you know, certain topics." .align 3 .LC436: .string "You go to the graduation ceremony immediately" .align 3 .LC437: .string "You go looking for a computer terminal" .text .align 2 .global page43 .type page43, %function page43: .LFB49: .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, .LC425 add x0, x0, :lo12:.LC425 bl puts adrp x0, .LC426 add x0, x0, :lo12:.LC426 bl puts adrp x0, .LC427 add x0, x0, :lo12:.LC427 bl puts adrp x0, .LC428 add x0, x0, :lo12:.LC428 bl puts adrp x0, .LC429 add x0, x0, :lo12:.LC429 bl puts adrp x0, .LC430 add x0, x0, :lo12:.LC430 bl puts adrp x0, .LC431 add x0, x0, :lo12:.LC431 bl puts adrp x0, .LC432 add x0, x0, :lo12:.LC432 bl puts adrp x0, .LC433 add x0, x0, :lo12:.LC433 bl puts adrp x0, .LC434 add x0, x0, :lo12:.LC434 bl puts adrp x0, .LC435 add x0, x0, :lo12:.LC435 bl puts adrp x0, .LC436 add x3, x0, :lo12:.LC436 mov w2, 55 adrp x0, .LC437 add x1, x0, :lo12:.LC437 mov w0, 44 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE49: .size page43, .-page43 .section .rodata .align 3 .LC438: .string "You walk down to a semi-secluded part of the training course complex and" .align 3 .LC439: .string "activate a computer terminal. \"AT YOUR SERVICE\" reads the computer screen." .align 3 .LC440: .string "You change your mind and go to the graduation ceremony" .align 3 .LC441: .string "You register yourself as a mutant" .align 3 .LC442: .string " a - You register yourself as a mutant." .align 3 .LC443: .string " b - You want to chat about the commies." .align 3 .LC444: .string " c - You change your mind and go to the graduation ceremony." .text .align 2 .global page44 .type page44, %function page44: .LFB50: .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, .LC438 add x0, x0, :lo12:.LC438 bl puts adrp x0, .LC439 add x0, x0, :lo12:.LC439 bl puts adrp x0, read_letter add x0, x0, :lo12:read_letter ldr w0, [x0] cmp w0, 0 bne .L146 adrp x0, .LC440 add x3, x0, :lo12:.LC440 mov w2, 55 adrp x0, .LC441 add x1, x0, :lo12:.LC441 mov w0, 23 bl choose b .L147 .L146: adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC442 add x0, x0, :lo12:.LC442 bl puts adrp x0, .LC443 add x0, x0, :lo12:.LC443 bl puts adrp x0, .LC444 add x0, x0, :lo12:.LC444 bl puts bl get_char and w0, w0, 255 cmp w0, 97 beq .L148 cmp w0, 98 beq .L149 b .L151 .L148: mov w0, 23 b .L147 .L149: mov w0, 46 b .L147 .L151: mov w0, 55 .L147: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE50: .size page44, .-page44 .section .rodata .align 3 .LC445: .string "\"Hrank Hrank,\" snorts the alarm in your living quarters. Something is up." .align 3 .LC446: .string "You look at the monitor above the bathroom mirror and see the message you have" .align 3 .LC447: .string "been waiting for all these years. \"ATTENTION TROUBLESHOOTER, YOU ARE BEING" .align 3 .LC448: .string "ACTIVATED. PLEASE REPORT IMMEDIATELY TO MISSION ASSIGNMENT ROOM A17/GAMMA/LB22." .align 3 .LC449: .string "THANK YOU. THE COMPUTER IS YOUR FRIEND.\" When you arrive at mission" .align 3 .LC450: .string "assignment room A17-gamma/LB22 you are given your previous clone's" .align 3 .LC451: .string "remaining possessions and notebook. You puzzle through your predecessor's" .align 3 .LC452: .string "cryptic notes, managing to decipher enough to lead you to the tube station and" .align 3 .LC453: .string "the tube car to GDH7-beta." .text .align 2 .global page45 .type page45, %function page45: .LFB51: .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, .LC445 add x0, x0, :lo12:.LC445 bl puts adrp x0, .LC446 add x0, x0, :lo12:.LC446 bl puts adrp x0, .LC447 add x0, x0, :lo12:.LC447 bl puts adrp x0, .LC448 add x0, x0, :lo12:.LC448 bl puts adrp x0, .LC449 add x0, x0, :lo12:.LC449 bl puts adrp x0, .LC450 add x0, x0, :lo12:.LC450 bl puts adrp x0, .LC451 add x0, x0, :lo12:.LC451 bl puts adrp x0, .LC452 add x0, x0, :lo12:.LC452 bl puts adrp x0, .LC453 add x0, x0, :lo12:.LC453 bl puts mov w0, 10 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE51: .size page45, .-page45 .section .rodata .align 3 .LC454: .string "\"Why do you ask about the communists, Troubleshooter? It is not in the" .align 3 .LC455: .string "interest of your continued survival to be asking about such topics,\" says" .align 3 .LC456: .string "The Computer." .align 3 .LC457: .string "You change the subject" .align 3 .LC458: .string "You insist on talking about the communists" .text .align 2 .global page46 .type page46, %function page46: .LFB52: .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, .LC454 add x0, x0, :lo12:.LC454 bl puts adrp x0, .LC455 add x0, x0, :lo12:.LC455 bl puts adrp x0, .LC456 add x0, x0, :lo12:.LC456 bl puts adrp x0, .LC457 add x3, x0, :lo12:.LC457 mov w2, 54 adrp x0, .LC458 add x1, x0, :lo12:.LC458 mov w0, 53 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE52: .size page46, .-page46 .section .rodata .align 3 .LC459: .string "The Computer orders the entire Vulture squadron to terminate the Troubleshooter" .align 3 .LC460: .string "Training Course. Unfortunately you too are terminated for possessing" .align 3 .LC461: .string "classified information.\n" .align 3 .LC462: .string "Don't act so innocent, we both know that you are an Illuminatus which is in" .align 3 .LC463: .string "itself an act of treason.\n" .align 3 .LC464: .string "Don't look to me for sympathy.\n" .align 3 .LC465: .string "\t\t\tTHE END" .text .align 2 .global page47 .type page47, %function page47: .LFB53: .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, .LC459 add x0, x0, :lo12:.LC459 bl puts adrp x0, .LC460 add x0, x0, :lo12:.LC460 bl puts adrp x0, .LC461 add x0, x0, :lo12:.LC461 bl puts adrp x0, .LC462 add x0, x0, :lo12:.LC462 bl puts adrp x0, .LC463 add x0, x0, :lo12:.LC463 bl puts adrp x0, .LC464 add x0, x0, :lo12:.LC464 bl puts adrp x0, .LC465 add x0, x0, :lo12:.LC465 bl puts mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE53: .size page47, .-page47 .section .rodata .align 3 .LC466: .string "The tubecar shoots forward as you enter, slamming you back into a pile of" .align 3 .LC467: .string "garbage. The front end rotates upward and you, the garbage and the garbage" .align 3 .LC468: .string "disposal car shoot straight up out of Alpha Complex. One of the last things" .align 3 .LC469: .string "you see is a small blue sphere slowly dwindling behind you. After you fail to" .align 3 .LC470: .string "report in, you will be assumed dead." .text .align 2 .global page48 .type page48, %function page48: .LFB54: .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, .LC466 add x0, x0, :lo12:.LC466 bl puts adrp x0, .LC467 add x0, x0, :lo12:.LC467 bl puts adrp x0, .LC468 add x0, x0, :lo12:.LC468 bl puts adrp x0, .LC469 add x0, x0, :lo12:.LC469 bl puts adrp x0, .LC470 add x0, x0, :lo12:.LC470 bl puts mov w0, 45 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE54: .size page48, .-page48 .section .rodata .align 3 .LC471: .string "The instructor drags your inert body into a specimen detainment cage." .align 3 .LC472: .string "\"He'll make a good subject for tomorrow's mutant dissection class,\" you hear." .text .align 2 .global page49 .type page49, %function page49: .LFB55: .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, .LC471 add x0, x0, :lo12:.LC471 bl puts adrp x0, .LC472 add x0, x0, :lo12:.LC472 bl puts mov w0, 32 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE55: .size page49, .-page49 .section .rodata .align 3 .LC473: .string "You put down the other Troubleshooter, and then wisely decide to drill a few" .align 3 .LC474: .string "holes in the instructor as well; the only good witness is a dead witness." .align 3 .LC475: .string "You continue with the training course." .text .align 2 .global page50 .type page50, %function page50: .LFB56: .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, .LC473 add x0, x0, :lo12:.LC473 bl puts adrp x0, .LC474 add x0, x0, :lo12:.LC474 bl puts adrp x0, .LC475 add x0, x0, :lo12:.LC475 bl puts adrp x0, plato_clone add x0, x0, :lo12:plato_clone ldr w0, [x0] add w1, w0, 1 adrp x0, plato_clone add x0, x0, :lo12:plato_clone str w1, [x0] mov w0, 41 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE56: .size page50, .-page50 .section .rodata .align 3 .LC476: .string "You run for it, but you don't run far. Three hundred strange and exotic" .align 3 .LC477: .string "weapons turn you into a freeze dried cloud of soot." .text .align 2 .global page51 .type page51, %function page51: .LFB57: .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, .LC476 add x0, x0, :lo12:.LC476 bl puts adrp x0, .LC477 add x0, x0, :lo12:.LC477 bl puts mov w0, 32 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE57: .size page51, .-page51 .section .rodata .align 3 .LC478: .string "You wisely wait until the instructor returns with a Blue Internal Security" .align 3 .LC479: .string "guard. The guard leads you to an Internal Security self incrimination station." .text .align 2 .global page52 .type page52, %function page52: .LFB58: .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, .LC478 add x0, x0, :lo12:.LC478 bl puts adrp x0, .LC479 add x0, x0, :lo12:.LC479 bl puts mov w0, 2 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE58: .size page52, .-page52 .section .rodata .align 3 .LC480: .string "You tell The Computer about:" .align 3 .LC481: .string "Something less dangerous" .align 3 .LC482: .string "The commies who have infiltrated the Troubleshooter Training Course\n and the impending People's Revolution" .text .align 2 .global page53 .type page53, %function page53: .LFB59: .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, .LC480 add x0, x0, :lo12:.LC480 bl puts adrp x0, .LC481 add x3, x0, :lo12:.LC481 mov w2, 54 adrp x0, .LC482 add x1, x0, :lo12:.LC482 mov w0, 47 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE59: .size page53, .-page53 .section .rodata .align 3 .LC483: .string "\"Do not try to change the subject, Troubleshooter,\" says The Computer." .align 3 .LC484: .string "\"It is a serious crime to ask about the communists. You will be terminated" .align 3 .LC485: .string "immediately. Thank you for your inquiry. The Computer is your friend.\"" .align 3 .LC486: .string "Steel bars drop to your left and right, trapping you here in the hallway." .align 3 .LC487: .string "A spotlight beams from the computer console to brilliantly iiluminate you while" .align 3 .LC488: .string "the speaker above your head rapidly repeats \"Traitor, Traitor, Traitor.\"" .align 3 .LC489: .string "It doesn't take long for a few guards to notice your predicament and come to" .align 3 .LC490: .string "finish you off." .text .align 2 .global page54 .type page54, %function page54: .LFB60: .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, .LC483 add x0, x0, :lo12:.LC483 bl puts adrp x0, .LC484 add x0, x0, :lo12:.LC484 bl puts adrp x0, .LC485 add x0, x0, :lo12:.LC485 bl puts adrp x0, .LC486 add x0, x0, :lo12:.LC486 bl puts adrp x0, .LC487 add x0, x0, :lo12:.LC487 bl puts adrp x0, .LC488 add x0, x0, :lo12:.LC488 bl puts adrp x0, .LC489 add x0, x0, :lo12:.LC489 bl puts adrp x0, .LC490 add x0, x0, :lo12:.LC490 bl puts adrp x0, blast_door add x0, x0, :lo12:blast_door ldr w0, [x0] cmp w0, 0 bne .L171 mov w0, 45 bl new_clone b .L172 .L171: mov w0, 32 bl new_clone .L172: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE60: .size page54, .-page54 .section .rodata .align 3 .LC491: .string "You and 300 other excited graduates are marched from the lecture hall and into" .align 3 .LC492: .string "a large auditorium for the graduation exercise. The auditorium is" .align 3 .LC493: .string "extravagantly decorated in the colours of the graduating class. Great red and" .align 3 .LC494: .string "green plasti-paper ribbons drape from the walls, while a huge sign reading" .align 3 .LC495: .string "\"Congratulations class of GDH7-beta-203.44/A\" hangs from the raised stage down" .align 3 .LC496: .string "front. Once everyone finds a seat the ceremony begins. Jung-I-PSY is the" .align 3 .LC497: .string "first to speak, \"Congratulations students, you have successfully survived the" .align 3 .LC498: .string "Troubleshooter Training Course. It always brings me great pride to address" .align 3 .LC499: .string "the graduating class, for I know, as I am sure you do too, that you are now" .align 3 .LC500: .string "qualified for the most perilous missions The Computer may select for you. The" .align 3 .LC501: .string "thanks is not owed to us of the teaching staff, but to all of you, who have" .align 3 .LC502: .string "persevered and graduated. Good luck and die trying.\" Then the instructor" .align 3 .LC503: .string "begins reading the names of the students who one by one walk to the front of" .align 3 .LC504: .string "the auditorium and receive their diplomas. Soon it is your turn," .align 3 .LC505: .string "\"Philo-R-DMD, graduating a master of mutant identification and secret society" .align 3 .LC506: .string "infiltration.\" You walk up and receive your diploma from Plato-B-PHI%d, then\n" .align 3 .LC507: .string "return to your seat. There is another speech after the diplomas are handed" .align 3 .LC508: .string "out, but it is cut short by by rapid fire laser bursts from the high spirited" .align 3 .LC509: .string "graduating class. You are free to return to your barracks to wait, trained" .align 3 .LC510: .string "and fully qualified, for your next mission. You also get that cherished" .align 3 .LC511: .string "promotion from the Illuminati secret society. In a week you receive a" .align 3 .LC512: .string "detailed Training Course bill totalling 1,523 credits." .text .align 2 .global page55 .type page55, %function page55: .LFB61: .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, .LC491 add x0, x0, :lo12:.LC491 bl puts adrp x0, .LC492 add x0, x0, :lo12:.LC492 bl puts adrp x0, .LC493 add x0, x0, :lo12:.LC493 bl puts adrp x0, .LC494 add x0, x0, :lo12:.LC494 bl puts adrp x0, .LC495 add x0, x0, :lo12:.LC495 bl puts adrp x0, .LC496 add x0, x0, :lo12:.LC496 bl puts adrp x0, .LC497 add x0, x0, :lo12:.LC497 bl puts adrp x0, .LC498 add x0, x0, :lo12:.LC498 bl puts adrp x0, .LC499 add x0, x0, :lo12:.LC499 bl puts adrp x0, .LC500 add x0, x0, :lo12:.LC500 bl puts adrp x0, .LC501 add x0, x0, :lo12:.LC501 bl puts adrp x0, .LC502 add x0, x0, :lo12:.LC502 bl puts adrp x0, .LC503 add x0, x0, :lo12:.LC503 bl puts adrp x0, .LC504 add x0, x0, :lo12:.LC504 bl puts adrp x0, .LC505 add x0, x0, :lo12:.LC505 bl puts adrp x0, plato_clone add x0, x0, :lo12:plato_clone ldr w0, [x0] mov w1, w0 adrp x0, .LC506 add x0, x0, :lo12:.LC506 bl printf adrp x0, .LC507 add x0, x0, :lo12:.LC507 bl puts adrp x0, .LC508 add x0, x0, :lo12:.LC508 bl puts adrp x0, .LC509 add x0, x0, :lo12:.LC509 bl puts adrp x0, .LC510 add x0, x0, :lo12:.LC510 bl puts adrp x0, .LC511 add x0, x0, :lo12:.LC511 bl puts adrp x0, .LC512 add x0, x0, :lo12:.LC512 bl puts adrp x0, .LC465 add x0, x0, :lo12:.LC465 bl puts mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE61: .size page55, .-page55 .section .rodata .align 3 .LC513: .string "That familiar strange feeling of deja'vu envelops you again. It is hard to" .align 3 .LC514: .string "say, but whatever is on the other side of the door does not seem to be intended" .align 3 .LC515: .string "for you." .align 3 .LC516: .string "You go looking for more information" .align 3 .LC517: .string "You open the door and step through" .text .align 2 .global page56 .type page56, %function page56: .LFB62: .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, .LC513 add x0, x0, :lo12:.LC513 bl puts adrp x0, .LC514 add x0, x0, :lo12:.LC514 bl puts adrp x0, .LC515 add x0, x0, :lo12:.LC515 bl puts adrp x0, .LC516 add x3, x0, :lo12:.LC516 mov w2, 22 adrp x0, .LC517 add x1, x0, :lo12:.LC517 mov w0, 33 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE62: .size page56, .-page56 .section .rodata .align 3 .LC518: .string "In the centre of the room is a table and a single chair. There is an Orange" .align 3 .LC519: .string "folder on the table top, but you can't make out the lettering on it." .align 3 .LC520: .string "You leave the room" .align 3 .LC521: .string "You sit down and read the folder" .text .align 2 .global page57 .type page57, %function page57: .LFB63: .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, .LC518 add x0, x0, :lo12:.LC518 bl puts adrp x0, .LC519 add x0, x0, :lo12:.LC519 bl puts adrp x0, .LC520 add x3, x0, :lo12:.LC520 mov w2, 12 adrp x0, .LC521 add x1, x0, :lo12:.LC521 mov w0, 11 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE63: .size page57, .-page57 .align 2 .global next_page .type next_page, %function next_page: .LFB64: .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 w0, 10 bl putchar ldr w0, [sp, 28] cmp w0, 57 bhi .L242 adrp x1, .L182 add x1, x1, :lo12:.L182 ldr w0, [x1,w0,uxtw #2] adr x1, .Lrtx182 add x0, x1, w0, sxtw #2 br x0 .Lrtx182: .section .rodata .align 0 .align 2 .L182: .word (.L239 - .Lrtx182) / 4 .word (.L238 - .Lrtx182) / 4 .word (.L237 - .Lrtx182) / 4 .word (.L236 - .Lrtx182) / 4 .word (.L235 - .Lrtx182) / 4 .word (.L234 - .Lrtx182) / 4 .word (.L233 - .Lrtx182) / 4 .word (.L232 - .Lrtx182) / 4 .word (.L231 - .Lrtx182) / 4 .word (.L230 - .Lrtx182) / 4 .word (.L229 - .Lrtx182) / 4 .word (.L228 - .Lrtx182) / 4 .word (.L227 - .Lrtx182) / 4 .word (.L226 - .Lrtx182) / 4 .word (.L225 - .Lrtx182) / 4 .word (.L224 - .Lrtx182) / 4 .word (.L223 - .Lrtx182) / 4 .word (.L222 - .Lrtx182) / 4 .word (.L221 - .Lrtx182) / 4 .word (.L220 - .Lrtx182) / 4 .word (.L219 - .Lrtx182) / 4 .word (.L218 - .Lrtx182) / 4 .word (.L217 - .Lrtx182) / 4 .word (.L216 - .Lrtx182) / 4 .word (.L215 - .Lrtx182) / 4 .word (.L214 - .Lrtx182) / 4 .word (.L213 - .Lrtx182) / 4 .word (.L212 - .Lrtx182) / 4 .word (.L211 - .Lrtx182) / 4 .word (.L210 - .Lrtx182) / 4 .word (.L209 - .Lrtx182) / 4 .word (.L208 - .Lrtx182) / 4 .word (.L207 - .Lrtx182) / 4 .word (.L206 - .Lrtx182) / 4 .word (.L205 - .Lrtx182) / 4 .word (.L204 - .Lrtx182) / 4 .word (.L203 - .Lrtx182) / 4 .word (.L202 - .Lrtx182) / 4 .word (.L201 - .Lrtx182) / 4 .word (.L200 - .Lrtx182) / 4 .word (.L199 - .Lrtx182) / 4 .word (.L198 - .Lrtx182) / 4 .word (.L197 - .Lrtx182) / 4 .word (.L196 - .Lrtx182) / 4 .word (.L195 - .Lrtx182) / 4 .word (.L194 - .Lrtx182) / 4 .word (.L193 - .Lrtx182) / 4 .word (.L192 - .Lrtx182) / 4 .word (.L191 - .Lrtx182) / 4 .word (.L190 - .Lrtx182) / 4 .word (.L189 - .Lrtx182) / 4 .word (.L188 - .Lrtx182) / 4 .word (.L187 - .Lrtx182) / 4 .word (.L186 - .Lrtx182) / 4 .word (.L185 - .Lrtx182) / 4 .word (.L184 - .Lrtx182) / 4 .word (.L183 - .Lrtx182) / 4 .word (.L181 - .Lrtx182) / 4 .text .L239: mov w0, 0 b .L179 .L238: bl page1 b .L179 .L237: bl page2 b .L179 .L236: bl page3 b .L179 .L235: bl page4 b .L179 .L234: bl page5 b .L179 .L233: bl page6 b .L179 .L232: bl page7 b .L179 .L231: bl page8 b .L179 .L230: bl page9 b .L179 .L229: bl page10 b .L179 .L228: bl page11 b .L179 .L227: bl page12 b .L179 .L226: bl page13 b .L179 .L225: bl page14 b .L179 .L224: bl page15 b .L179 .L223: bl page16 b .L179 .L222: bl page17 b .L179 .L221: bl page18 b .L179 .L220: bl page19 b .L179 .L219: bl page20 b .L179 .L218: bl page21 b .L179 .L217: bl page22 b .L179 .L216: bl page23 b .L179 .L215: bl page24 b .L179 .L214: bl page25 b .L179 .L213: bl page26 b .L179 .L212: bl page27 b .L179 .L211: bl page28 b .L179 .L210: bl page29 b .L179 .L209: bl page30 b .L179 .L208: bl page31 b .L179 .L207: bl page32 b .L179 .L206: bl page33 b .L179 .L205: bl page34 b .L179 .L204: bl page35 b .L179 .L203: bl page36 b .L179 .L202: bl page37 b .L179 .L201: bl page38 b .L179 .L200: bl page39 b .L179 .L199: bl page40 b .L179 .L198: bl page41 b .L179 .L197: bl page42 b .L179 .L196: bl page43 b .L179 .L195: bl page44 b .L179 .L194: bl page45 b .L179 .L193: bl page46 b .L179 .L192: bl page47 b .L179 .L191: bl page48 b .L179 .L190: bl page49 b .L179 .L189: bl page50 b .L179 .L188: bl page51 b .L179 .L187: bl page52 b .L179 .L186: bl page53 b .L179 .L185: bl page54 b .L179 .L184: bl page55 b .L179 .L183: bl page56 b .L179 .L181: bl page57 b .L179 .L242: nop .L179: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE64: .size next_page, .-next_page .align 2 .global main .type main, %function main: .LFB65: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp bl instructions bl more bl character bl more b .L244 .L245: bl more .L244: adrp x0, page add x0, x0, :lo12:page ldr w0, [x0] bl next_page mov w1, w0 adrp x0, page add x0, x0, :lo12:page str w1, [x0] adrp x0, page add x0, x0, :lo12:page ldr w0, [x0] cmp w0, 0 bne .L245 mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE65: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "paranoia.c" .text .align 2 .global get_char .type get_char, %function get_char: .LFB23: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush adrp x0, :got:stdin ldr x0, [x0, #:got_lo12:stdin] ldr x0, [x0] bl getc and w20, w0, 255 cmp w20, 10 beq .L2 adrp x19, :got:stdin ldr x19, [x19, #:got_lo12:stdin] .L3: ldr x0, [x19] bl getc cmp w0, 10 bne .L3 .L2: mov w0, w20 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size get_char, .-get_char .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nClone %d just died.\n" .align 3 .LC1: .string "\n*** You Lose ***\n\nAll your clones are dead. Your name has been stricken from the records.\n\n\t\t\tTHE END" .align 3 .LC2: .string "Clone %d now activated.\n" .text .align 2 .global new_clone .type new_clone, %function new_clone: .LFB25: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w20, w0 adrp x19, .LANCHOR0 ldr w2, [x19, #:lo12:.LANCHOR0] adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk ldr w2, [x19, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x19, #:lo12:.LANCHOR0] cmp w2, 6 ble .L7 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 .L6: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L7: .cfi_restore_state adrp x1, .LC2 add x1, x1, :lo12:.LC2 mov w0, 1 bl __printf_chk adrp x1, .LANCHOR1 add x0, x1, :lo12:.LANCHOR1 str wzr, [x1, #:lo12:.LANCHOR1] str wzr, [x0, 4] adrp x1, .LANCHOR0+4 mov w2, 10 str w2, [x1, #:lo12:.LANCHOR0+4] str wzr, [x0, 8] mov w0, w20 b .L6 .cfi_endproc .LFE25: .size new_clone, .-new_clone .align 2 .global dice_roll .type dice_roll, %function dice_roll: .LFB26: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x21, [sp, 32] .cfi_offset 21, -16 cmp w0, 0 ble .L13 stp x19, x20, [sp, 16] .cfi_offset 20, -24 .cfi_offset 19, -32 mov w19, w0 mov w20, w1 mov w21, 0 .L12: bl rand sdiv w2, w0, w20 msub w2, w2, w20, w0 add w2, w2, 1 add w21, w21, w2 subs w19, w19, #1 bne .L12 ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 .L10: mov w0, w21 ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_def_cfa_offset 0 ret .L13: .cfi_restore_state mov w21, 0 b .L10 .cfi_endproc .LFE26: .size dice_roll, .-dice_roll .section .rodata.str1.8 .align 3 .LC3: .string "\n\n\n\nWelcome to Paranoia!\n" .align 3 .LC4: .string "HOW TO PLAY:\n" .align 3 .LC5: .string " Just press <RETURN> until you are asked to make a choice." .align 3 .LC6: .string " Select 'a' or 'b' or whatever for your choice, then press <RETURN>." .align 3 .LC7: .string " You may select 'p' at any time to get a display of your statistics." .align 3 .LC8: .string " Always choose the least dangerous option. Continue doing this until you win." .align 3 .LC9: .string " At times you will use a skill or engage in combat and and will be informed of" .align 3 .LC10: .string " the outcome. These sections will be self explanatory.\n" .align 3 .LC11: .string "HOW TO DIE:\n" .align 3 .LC12: .string " As Philo-R-DMD you will die at times during the adventure." .align 3 .LC13: .string " When this happens you will be given an new clone at a particular location." .align 3 .LC14: .string " The new Philo-R will usually have to retrace some of the old Philo-R's path;" .align 3 .LC15: .string " hopefully he won't make the same mistake as his predecessor.\n" .align 3 .LC16: .string "HOW TO WIN:\n" .align 3 .LC17: .string " Simply complete the mission before you expend all six clones." .align 3 .LC18: .string " If you make it, congratulations." .align 3 .LC19: .string " If not, you can try again later." .text .align 2 .global instructions .type instructions, %function instructions: .LFB27: .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, .LC3 add x0, x0, :lo12:.LC3 bl puts adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts adrp x0, .LC10 add x0, x0, :lo12:.LC10 bl puts adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl puts adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl puts adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts adrp x0, .LC14 add x0, x0, :lo12:.LC14 bl puts adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl puts adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl puts adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl puts adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl puts adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE27: .size instructions, .-instructions .section .rodata.str1.8 .align 3 .LC20: .string "===============================================================================" .align 3 .LC21: .string "The Character : Philo-R-DMD %d\n" .align 3 .LC22: .string "Primary Attributes Secondary Attributes" .align 3 .LC23: .string "Strength ..................... 13 Carrying Capacity ................. 30" .align 3 .LC24: .string "Endurance .................... 13 Damage Bonus ....................... 0" .align 3 .LC25: .string "Agility ...................... 15 Macho Bonus ....................... -1" .align 3 .LC26: .string "Manual Dexterity ............. 15 Melee Bonus ...................... +5%%\n" .align 3 .LC27: .string "Moxie ........................ 13 Aimed Weapon Bonus .............. +10%%\n" .align 3 .LC28: .string "Chutzpah ...................... 8 Comprehension Bonus .............. +4%%\n" .align 3 .LC29: .string "Mechanical Aptitude .......... 14 Believability Bonus .............. +5%%\n" .align 3 .LC30: .string "Power Index .................. 10 Repair Bonus ..................... +5%%\n" .align 3 .LC31: .string "Credits: 160 Secret Society: Illuminati Secret Society Rank: 1" .align 3 .LC32: .string "Service Group: Power Services Mutant Power: Precognition" .align 3 .LC33: .string "Weapon: laser pistol; to hit, 40%%; type, L; Range, 50m; Reload, 6r; Malfnt, 00\n" .align 3 .LC34: .string "Skills: Basics 1(20%%), Aimed Weapon Combat 2(35%%), Laser 3(40%%),\n Personal Development 1(20%%), Communications 2(29%%), Intimidation 3(34%%)\n" .align 3 .LC35: .string "Equipment: Red Reflec Armour, Laser Pistol, Laser Barrel (red)," .align 3 .LC36: .string " Notebook & Stylus, Knife, Com Unit 1, Jump suit," .align 3 .LC37: .string " Secret Illuminati Eye-In-The-Pyramid(tm) Decoder ring," .align 3 .LC38: .string " Utility Belt & Pouches" .text .align 2 .global character .type character, %function character: .LFB28: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -16 adrp x19, .LC20 add x19, x19, :lo12:.LC20 mov x0, x19 bl puts adrp x0, .LANCHOR0 ldr w2, [x0, #:lo12:.LANCHOR0] adrp x1, .LC21 add x1, x1, :lo12:.LC21 mov w0, 1 bl __printf_chk adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl puts mov x0, x19 bl puts adrp x0, .LC23 add x0, x0, :lo12:.LC23 bl puts adrp x0, .LC24 add x0, x0, :lo12:.LC24 bl puts adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl puts adrp x1, .LC26 add x1, x1, :lo12:.LC26 mov w0, 1 bl __printf_chk adrp x1, .LC27 add x1, x1, :lo12:.LC27 mov w0, 1 bl __printf_chk adrp x1, .LC28 add x1, x1, :lo12:.LC28 mov w0, 1 bl __printf_chk adrp x1, .LC29 add x1, x1, :lo12:.LC29 mov w0, 1 bl __printf_chk adrp x1, .LC30 add x1, x1, :lo12:.LC30 mov w0, 1 bl __printf_chk mov x0, x19 bl puts adrp x0, .LC31 add x0, x0, :lo12:.LC31 bl puts adrp x0, .LC32 add x0, x0, :lo12:.LC32 bl puts adrp x1, .LC33 add x1, x1, :lo12:.LC33 mov w0, 1 bl __printf_chk adrp x1, .LC34 add x1, x1, :lo12:.LC34 mov w0, 1 bl __printf_chk adrp x0, .LC35 add x0, x0, :lo12:.LC35 bl puts adrp x0, .LC36 add x0, x0, :lo12:.LC36 bl puts adrp x0, .LC37 add x0, x0, :lo12:.LC37 bl puts adrp x0, .LC38 add x0, x0, :lo12:.LC38 bl puts mov x0, x19 bl puts 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 .LFE28: .size character, .-character .section .rodata.str1.8 .align 3 .LC39: .string "---------- More ----------" .text .align 2 .global more .type more, %function more: .LFB24: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x1, .LC39 add x1, x1, :lo12:.LC39 mov w0, 1 bl __printf_chk bl get_char and w0, w0, 255 cmp w0, 112 beq .L23 .L21: ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L23: .cfi_restore_state bl character adrp x1, .LC39 add x1, x1, :lo12:.LC39 mov w0, 1 bl __printf_chk bl get_char b .L21 .cfi_endproc .LFE24: .size more, .-more .section .rodata.str1.8 .align 3 .LC40: .string "\nSelect 'a' or 'b' :" .align 3 .LC41: .string " a - %s.\n b - %s.\n" .text .align 2 .global choose .type choose, %function choose: .LFB29: .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] stp x21, x22, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 mov w20, w0 mov x21, x1 mov w19, w2 mov x22, x3 adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov x3, x22 mov x2, x21 adrp x1, .LC41 add x1, x1, :lo12:.LC41 mov w0, 1 bl __printf_chk bl get_char and w0, w0, 255 cmp w0, 97 csel w0, w20, w19, eq ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE29: .size choose, .-choose .section .rodata.str1.8 .align 3 .LC42: .string " You wake up face down on the red and pink checked E-Z-Kleen linoleum floor." .align 3 .LC43: .string " You recognise the pattern, it's the type preferred in the internal security\nbriefing cells. When you finally look around you, you see that you are alone" .align 3 .LC44: .string "in a large mission briefing room." .text .align 2 .global page1 .type page1, %function page1: .LFB30: .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, .LC42 add x0, x0, :lo12:.LC42 bl puts adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl puts adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl puts mov w0, 57 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE30: .size page1, .-page1 .section .rodata.str1.8 .align 3 .LC45: .string "\"Greetings,\" says the kindly Internal Security self incrimination expert who" .align 3 .LC46: .string "meets you at the door, \"How are we doing today?\" He offers you a doughnut" .align 3 .LC47: .string "and coffee and asks what brings you here. This doesn't seem so bad, so you" .align 3 .LC48: .string "tell him that you have come to confess some possible security lapses. He" .align 3 .LC49: .string "smiles knowingly, deftly catching your coffee as you slump to the floor." .align 3 .LC50: .string "\"Nothing to be alarmed about; it's just the truth serum,\" he says," .align 3 .LC51: .string "dragging you back into a discussion room." .align 3 .LC52: .string "The next five hours are a dim haze, but you can recall snatches of conversation" .align 3 .LC53: .string "about your secret society, your mutant power, and your somewhat paranoid" .align 3 .LC54: .string "distrust of The Computer. This should explain why you are hogtied and moving" .align 3 .LC55: .string "slowly down the conveyer belt towards the meat processing unit in Food" .align 3 .LC56: .string "Services." .text .align 2 .global page2 .type page2, %function page2: .LFB31: .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, .LC45 add x0, x0, :lo12:.LC45 bl puts adrp x0, .LC46 add x0, x0, :lo12:.LC46 bl puts adrp x0, .LC47 add x0, x0, :lo12:.LC47 bl puts adrp x0, .LC48 add x0, x0, :lo12:.LC48 bl puts adrp x0, .LC49 add x0, x0, :lo12:.LC49 bl puts adrp x0, .LC50 add x0, x0, :lo12:.LC50 bl puts adrp x0, .LC51 add x0, x0, :lo12:.LC51 bl puts adrp x0, .LC52 add x0, x0, :lo12:.LC52 bl puts adrp x0, .LC53 add x0, x0, :lo12:.LC53 bl puts adrp x0, .LC54 add x0, x0, :lo12:.LC54 bl puts adrp x0, .LC55 add x0, x0, :lo12:.LC55 bl puts adrp x0, .LC56 add x0, x0, :lo12:.LC56 bl puts adrp x0, .LANCHOR1+12 ldr w0, [x0, #:lo12:.LANCHOR1+12] cmp w0, 1 beq .L34 mov w0, 32 bl new_clone .L30: ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L34: .cfi_restore_state mov w0, 45 bl new_clone b .L30 .cfi_endproc .LFE31: .size page2, .-page2 .section .rodata.str1.8 .align 3 .LC57: .string "You walk to the nearest Computer terminal and request more information about" .align 3 .LC58: .string "Christmas. The Computer says, \"That is an A-1 ULTRAVIOLET ONLY IMMEDIATE" .align 3 .LC59: .string "TERMINATION classified topic. What is your clearance please, Troubleshooter?\"" .align 3 .LC60: .string "You lie and claim Ultraviolet clearance" .align 3 .LC61: .string "You give your correct clearance" .text .align 2 .global page3 .type page3, %function page3: .LFB32: .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, .LC57 add x0, x0, :lo12:.LC57 bl puts adrp x0, .LC58 add x0, x0, :lo12:.LC58 bl puts adrp x0, .LC59 add x0, x0, :lo12:.LC59 bl puts adrp x3, .LC60 add x3, x3, :lo12:.LC60 mov w2, 5 adrp x1, .LC61 add x1, x1, :lo12:.LC61 mov w0, 4 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE32: .size page3, .-page3 .section .rodata.str1.8 .align 3 .LC62: .string "\"That is classified information, Troubleshooter, thank you for your inquiry." .align 3 .LC63: .string " Please report to an Internal Security self incrimination station as soon as" .align 3 .LC64: .string " possible.\"" .text .align 2 .global page4 .type page4, %function page4: .LFB33: .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, .LC62 add x0, x0, :lo12:.LC62 bl puts adrp x0, .LC63 add x0, x0, :lo12:.LC63 bl puts adrp x0, .LC64 add x0, x0, :lo12:.LC64 bl puts mov w0, 9 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE33: .size page4, .-page4 .section .rodata.str1.8 .align 3 .LC65: .string "The computer says, \"Troubleshooter, you are not wearing the correct colour" .align 3 .LC66: .string "uniform. You must put on an Ultraviolet uniform immediately. I have seen to" .align 3 .LC67: .string "your needs and ordered one already; it will be here shortly. Please wait with" .align 3 .LC68: .string "your back to the wall until it arrives.\" In less than a minute an infrared" .align 3 .LC69: .string "arrives carrying a white bundle. He asks you to sign for it, then hands it to" .align 3 .LC70: .string "you and stands back, well outside of a fragmentation grenade's blast radius." .align 3 .LC71: .string "You finally come to your senses and run for it" .align 3 .LC72: .string "You open the package and put on the uniform" .text .align 2 .global page5 .type page5, %function page5: .LFB34: .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, .LC65 add x0, x0, :lo12:.LC65 bl puts adrp x0, .LC66 add x0, x0, :lo12:.LC66 bl puts adrp x0, .LC67 add x0, x0, :lo12:.LC67 bl puts adrp x0, .LC68 add x0, x0, :lo12:.LC68 bl puts adrp x0, .LC69 add x0, x0, :lo12:.LC69 bl puts adrp x0, .LC70 add x0, x0, :lo12:.LC70 bl puts adrp x3, .LC71 add x3, x3, :lo12:.LC71 mov w2, 7 adrp x1, .LC72 add x1, x1, :lo12:.LC72 mov w0, 6 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE34: .size page5, .-page5 .section .rodata.str1.8 .align 3 .LC73: .string "The uniform definitely makes you look snappy and pert. It really looks" .align 3 .LC74: .string "impressive, and even has the new lopsided lapel fashion that you admire so" .align 3 .LC75: .string "much. What's more, citizens of all ranks come to obsequious attention as you" .align 3 .LC76: .string "walk past. This isn't so bad being an Ultraviolet. You could probably come" .align 3 .LC77: .string "to like it, given time." .align 3 .LC78: .string "The beeping computer terminal interrupts your musings." .text .align 2 .global page6 .type page6, %function page6: .LFB35: .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, .LC73 add x0, x0, :lo12:.LC73 bl puts adrp x0, .LC74 add x0, x0, :lo12:.LC74 bl puts adrp x0, .LC75 add x0, x0, :lo12:.LC75 bl puts adrp x0, .LC76 add x0, x0, :lo12:.LC76 bl puts adrp x0, .LC77 add x0, x0, :lo12:.LC77 bl puts adrp x0, .LC78 add x0, x0, :lo12:.LC78 bl puts adrp x0, .LANCHOR1 mov w1, 1 str w1, [x0, #:lo12:.LANCHOR1] mov w0, 8 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE35: .size page6, .-page6 .section .rodata.str1.8 .align 3 .LC79: .string "The corridor lights dim and are replaced by red battle lamps as the Security" .align 3 .LC80: .string "Breach alarms howl all around you. You run headlong down the corridor and" .align 3 .LC81: .string "desperately windmill around a corner, only to collide with a squad of 12 Blue" .align 3 .LC82: .string "clearance Vulture squadron soldiers. \"Stop, Slime Face,\" shouts the" .align 3 .LC83: .string "commander, \"or there won't be enough of you left for a tissue sample.\"" .align 3 .LC84: .string "\"All right, soldiers, stuff the greasy traitor into the uniform,\" he orders," .align 3 .LC85: .string "waving the business end of his blue laser scant inches from your nose." .align 3 .LC86: .string "With his other hand he shakes open a white bundle to reveal a pristine new" .align 3 .LC87: .string "Ultraviolet citizen's uniform." .align 3 .LC88: .string "One of the Vulture squadron Troubleshooters grabs you by the neck in the" .align 3 .LC89: .string "exotic and very painful Vulture Clamp(tm) death grip (you saw a special about" .align 3 .LC90: .string "it on the Teela O'Malley show), while the rest tear off your clothes and" .align 3 .LC91: .string "force you into the Ultraviolet uniform. The moment you are dressed they step" .align 3 .LC92: .string "clear and stand at attention." .align 3 .LC93: .string "\"Thank you for your cooperation, sir,\" says the steely eyed leader of the" .align 3 .LC94: .string "Vulture Squad. \"We will be going about our business now.\" With perfect" .align 3 .LC95: .string "timing the Vultures wheel smartly and goosestep down the corridor." .align 3 .LC96: .string "Special Note: don't make the mistake of assuming that your skills have" .align 3 .LC97: .string "improved any because of the uniform; you're only a Red Troubleshooter" .align 3 .LC98: .string "traitorously posing as an Ultraviolet, and don't you forget it!" .align 3 .LC99: .string "Suddenly, a computer terminal comes to life beside you." .text .align 2 .global page7 .type page7, %function page7: .LFB36: .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, .LC79 add x0, x0, :lo12:.LC79 bl puts adrp x0, .LC80 add x0, x0, :lo12:.LC80 bl puts adrp x0, .LC81 add x0, x0, :lo12:.LC81 bl puts adrp x0, .LC82 add x0, x0, :lo12:.LC82 bl puts adrp x0, .LC83 add x0, x0, :lo12:.LC83 bl puts adrp x0, .LC84 add x0, x0, :lo12:.LC84 bl puts adrp x0, .LC85 add x0, x0, :lo12:.LC85 bl puts adrp x0, .LC86 add x0, x0, :lo12:.LC86 bl puts adrp x0, .LC87 add x0, x0, :lo12:.LC87 bl puts adrp x0, .LC88 add x0, x0, :lo12:.LC88 bl puts adrp x0, .LC89 add x0, x0, :lo12:.LC89 bl puts adrp x0, .LC90 add x0, x0, :lo12:.LC90 bl puts adrp x0, .LC91 add x0, x0, :lo12:.LC91 bl puts adrp x0, .LC92 add x0, x0, :lo12:.LC92 bl puts adrp x0, .LC93 add x0, x0, :lo12:.LC93 bl puts adrp x0, .LC94 add x0, x0, :lo12:.LC94 bl puts adrp x0, .LC95 add x0, x0, :lo12:.LC95 bl puts adrp x0, .LC96 add x0, x0, :lo12:.LC96 bl puts adrp x0, .LC97 add x0, x0, :lo12:.LC97 bl puts adrp x0, .LC98 add x0, x0, :lo12:.LC98 bl puts adrp x0, .LC99 add x0, x0, :lo12:.LC99 bl puts adrp x0, .LANCHOR1 mov w1, 1 str w1, [x0, #:lo12:.LANCHOR1] mov w0, 8 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE36: .size page7, .-page7 .section .rodata.str1.8 .align 3 .LC100: .string "\"Now, about your question, citizen. Christmas was an old world marketing ploy" .align 3 .LC101: .string "to induce lower clearance citizens to purchase vast quantities of goods, thus" .align 3 .LC102: .string "accumulation a large amount of credit under the control of a single class of" .align 3 .LC103: .string "citizen known as Retailers. The strategy used is to imply that all good" .align 3 .LC104: .string "citizens give gifts during Christmas, thus if one wishes to be a valuable" .align 3 .LC105: .string "member of society one must also give gifts during Christmas. More valuable" .align 3 .LC106: .string "gifts make one a more valuable member, and thus did the Retailers come to" .align 3 .LC107: .string "control a disproportionate amount of the currency. In this way Christmas" .align 3 .LC108: .string "eventually caused the collapse of the old world. Understandably, Christmas" .align 3 .LC109: .string "has been declared a treasonable practice in Alpha Complex." .align 3 .LC110: .string "Thank you for your inquiry.\"" .align 3 .LC111: .string "You continue on your way to GDH7-beta." .text .align 2 .global page8 .type page8, %function page8: .LFB37: .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, .LC100 add x0, x0, :lo12:.LC100 bl puts adrp x0, .LC101 add x0, x0, :lo12:.LC101 bl puts adrp x0, .LC102 add x0, x0, :lo12:.LC102 bl puts adrp x0, .LC103 add x0, x0, :lo12:.LC103 bl puts adrp x0, .LC104 add x0, x0, :lo12:.LC104 bl puts adrp x0, .LC105 add x0, x0, :lo12:.LC105 bl puts adrp x0, .LC106 add x0, x0, :lo12:.LC106 bl puts adrp x0, .LC107 add x0, x0, :lo12:.LC107 bl puts adrp x0, .LC108 add x0, x0, :lo12:.LC108 bl puts adrp x0, .LC109 add x0, x0, :lo12:.LC109 bl puts adrp x0, .LC110 add x0, x0, :lo12:.LC110 bl puts adrp x0, .LC111 add x0, x0, :lo12:.LC111 bl puts mov w0, 10 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE37: .size page8, .-page8 .section .rodata.str1.8 .align 3 .LC112: .string "As you walk toward the tubecar that will take you to GDH7-beta, you pass one" .align 3 .LC113: .string "of the bright blue and orange Internal Security self incrimination stations." .align 3 .LC114: .string "Inside, you can see an IS agent cheerfully greet an infrared citizen and then" .align 3 .LC115: .string "lead him at gunpoint into one of the rubber lined discussion rooms." .align 3 .LC116: .string "You just continue blithely on past" .align 3 .LC117: .string "You decide to stop here and chat, as ordered by The Computer" .text .align 2 .global page9 .type page9, %function page9: .LFB38: .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, .LC112 add x0, x0, :lo12:.LC112 bl puts adrp x0, .LC113 add x0, x0, :lo12:.LC113 bl puts adrp x0, .LC114 add x0, x0, :lo12:.LC114 bl puts adrp x0, .LC115 add x0, x0, :lo12:.LC115 bl puts adrp x3, .LC116 add x3, x3, :lo12:.LC116 mov w2, 10 adrp x1, .LC117 add x1, x1, :lo12:.LC117 mov w0, 2 bl choose cmp w0, 2 cset w2, eq adrp x1, .LANCHOR1+12 str w2, [x1, #:lo12:.LANCHOR1+12] ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE38: .size page9, .-page9 .section .rodata.str1.8 .align 3 .LC118: .string "You stroll briskly down the corridor, up a ladder, across an unrailed catwalk," .align 3 .LC119: .string "under a perilously swinging blast door in urgent need of repair, and into" .align 3 .LC120: .string "tubecar grand central. This is the bustling hub of Alpha Complex tubecar" .align 3 .LC121: .string "transportation. Before you spreads a spaghetti maze of magnalift tube tracks" .align 3 .LC122: .string "and linear accelerators. You bravely study the specially enhanced 3-D tube" .align 3 .LC123: .string "route map; you wouldn't be the first Troubleshooter to take a fast tube ride" .align 3 .LC124: .string "to nowhere." .align 3 .LC125: .string "You think you have the route worked out, so you'll board a tube train" .align 3 .LC126: .string "You decide to ask The Computer about Christmas using a nearby terminal" .align 3 .LC127: .string "You nervously select a tubecar and step aboard." .align 3 .LC128: .string "You just caught a purple line tubecar." .align 3 .LC129: .string "You just caught a brown line tubecar." .text .align 2 .global page10 .type page10, %function page10: .LFB39: .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, .LC118 add x0, x0, :lo12:.LC118 bl puts adrp x0, .LC119 add x0, x0, :lo12:.LC119 bl puts adrp x0, .LC120 add x0, x0, :lo12:.LC120 bl puts adrp x0, .LC121 add x0, x0, :lo12:.LC121 bl puts adrp x0, .LC122 add x0, x0, :lo12:.LC122 bl puts adrp x0, .LC123 add x0, x0, :lo12:.LC123 bl puts adrp x0, .LC124 add x0, x0, :lo12:.LC124 bl puts adrp x0, .LANCHOR1 ldr w0, [x0, #:lo12:.LANCHOR1] cbnz w0, .L50 adrp x3, .LC125 add x3, x3, :lo12:.LC125 mov w2, 10 adrp x1, .LC126 add x1, x1, :lo12:.LC126 mov w0, 3 bl choose cmp w0, 3 beq .L49 .L50: adrp x0, .LC127 add x0, x0, :lo12:.LC127 bl puts mov w1, 10 mov w0, 2 bl dice_roll cmp w0, 12 bgt .L52 adrp x0, .LC128 add x0, x0, :lo12:.LC128 bl puts mov w0, 13 .L49: ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L52: .cfi_restore_state adrp x0, .LC129 add x0, x0, :lo12:.LC129 bl puts mov w0, 48 b .L49 .cfi_endproc .LFE39: .size page10, .-page10 .section .rodata.str1.8 .align 3 .LC130: .string "The printing on the folder says \"Experimental Self Briefing.\"" .align 3 .LC131: .string "You open it and begin to read the following:" .align 3 .LC132: .string "Step 1: Compel the briefing subject to attend the briefing." .align 3 .LC133: .string " Note: See Experimental Briefing Sub Form Indigo-WY-2," .align 3 .LC134: .string " 'Experimental Self Briefing Subject Acquisition Through The Use Of" .align 3 .LC135: .string " Neurotoxin Room Foggers.'" .align 3 .LC136: .string "Step 2: Inform the briefing subject that the briefing has begun." .align 3 .LC137: .string " ATTENTION: THE BRIEFING HAS BEGUN." .align 3 .LC138: .string "Step 3: Present the briefing material to the briefing subject." .align 3 .LC139: .string " GREETINGS TROUBLESHOOTER." .align 3 .LC140: .string " YOU HAVE BEEN SPECIALLY SELECTED TO SINGLEHANDEDLY" .align 3 .LC141: .string " WIPE OUT A DEN OF TRAITOROUS CHRISTMAS ACTIVITY. YOUR MISSION IS TO" .align 3 .LC142: .string " GO TO GOODS DISTRIBUTION HALL 7-BETA AND ASSESS ANY CHRISTMAS ACTIVITY" .align 3 .LC143: .string " YOU FIND THERE. YOU ARE TO INFILTRATE THESE CHRISTMAS CELEBRANTS," .align 3 .LC144: .string " LOCATE THEIR RINGLEADER, AN UNKNOWN MASTER RETAILER, AND BRING HIM" .align 3 .LC145: .string " BACK FOR EXECUTION AND TRIAL. THANK YOU. THE COMPUTER IS YOUR FRIEND." .align 3 .LC146: .string "Step 4: Sign the briefing subject's briefing release form to indicate that" .align 3 .LC147: .string " the briefing subject has completed the briefing." .align 3 .LC148: .string " ATTENTION: PLEASE SIGN YOUR BRIEFING RELEASE FORM." .align 3 .LC149: .string "Step 5: Terminate the briefing" .align 3 .LC150: .string " ATTENTION: THE BRIEFING IS TERMINATED." .align 3 .LC151: .string "You walk to the door and hold your signed briefing release form up to the" .align 3 .LC152: .string "plexiglass window. A guard scrutinises it for a moment and then slides back" .align 3 .LC153: .string "the megabolts holding the door shut. You are now free to continue the" .align 3 .LC154: .string "mission." .align 3 .LC155: .string "You have decided to go directly to Goods Distribution Hall 7-beta" .align 3 .LC156: .string "You wish to ask The Computer for more information about Christmas" .text .align 2 .global page11 .type page11, %function page11: .LFB40: .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, .LC130 add x0, x0, :lo12:.LC130 bl puts adrp x0, .LC131 add x0, x0, :lo12:.LC131 bl puts adrp x0, .LC132 add x0, x0, :lo12:.LC132 bl puts adrp x0, .LC133 add x0, x0, :lo12:.LC133 bl puts adrp x0, .LC134 add x0, x0, :lo12:.LC134 bl puts adrp x0, .LC135 add x0, x0, :lo12:.LC135 bl puts adrp x0, .LC136 add x0, x0, :lo12:.LC136 bl puts adrp x0, .LC137 add x0, x0, :lo12:.LC137 bl puts adrp x0, .LC138 add x0, x0, :lo12:.LC138 bl puts adrp x0, .LC139 add x0, x0, :lo12:.LC139 bl puts adrp x0, .LC140 add x0, x0, :lo12:.LC140 bl puts adrp x0, .LC141 add x0, x0, :lo12:.LC141 bl puts adrp x0, .LC142 add x0, x0, :lo12:.LC142 bl puts adrp x0, .LC143 add x0, x0, :lo12:.LC143 bl puts adrp x0, .LC144 add x0, x0, :lo12:.LC144 bl puts adrp x0, .LC145 add x0, x0, :lo12:.LC145 bl puts adrp x0, .LC146 add x0, x0, :lo12:.LC146 bl puts adrp x0, .LC147 add x0, x0, :lo12:.LC147 bl puts adrp x0, .LC148 add x0, x0, :lo12:.LC148 bl puts adrp x0, .LC149 add x0, x0, :lo12:.LC149 bl puts adrp x0, .LC150 add x0, x0, :lo12:.LC150 bl puts bl more adrp x0, .LC151 add x0, x0, :lo12:.LC151 bl puts adrp x0, .LC152 add x0, x0, :lo12:.LC152 bl puts adrp x0, .LC153 add x0, x0, :lo12:.LC153 bl puts adrp x0, .LC154 add x0, x0, :lo12:.LC154 bl puts adrp x3, .LC155 add x3, x3, :lo12:.LC155 mov w2, 10 adrp x1, .LC156 add x1, x1, :lo12:.LC156 mov w0, 3 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE40: .size page11, .-page11 .section .rodata.str1.8 .align 3 .LC157: .string "You walk up to the door and push the button labelled \"push to exit.\"" .align 3 .LC158: .string "Within seconds a surly looking guard shoves his face into the small plexiglass" .align 3 .LC159: .string "window. You can see his mouth forming words but you can't hear any of them." .align 3 .LC160: .string "You just stare at him blankly for a few moments until he points down to a" .align 3 .LC161: .string "speaker on your side of the door. When you put your ear to it you can barely" .align 3 .LC162: .string "hear him say, \"Let's see your briefing release form, bud. You aren't" .align 3 .LC163: .string "getting out of here without it.\"" .align 3 .LC164: .string "You stare around the room some more" .align 3 .LC165: .string "You sit down at the table and read the Orange packet" .text .align 2 .global page12 .type page12, %function page12: .LFB41: .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, .LC157 add x0, x0, :lo12:.LC157 bl puts adrp x0, .LC158 add x0, x0, :lo12:.LC158 bl puts adrp x0, .LC159 add x0, x0, :lo12:.LC159 bl puts adrp x0, .LC160 add x0, x0, :lo12:.LC160 bl puts adrp x0, .LC161 add x0, x0, :lo12:.LC161 bl puts adrp x0, .LC162 add x0, x0, :lo12:.LC162 bl puts adrp x0, .LC163 add x0, x0, :lo12:.LC163 bl puts adrp x3, .LC164 add x3, x3, :lo12:.LC164 mov w2, 57 adrp x1, .LC165 add x1, x1, :lo12:.LC165 mov w0, 11 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size page12, .-page12 .section .rodata.str1.8 .align 3 .LC166: .string "You step into the shiny plasteel tubecar, wondering why the shape has always" .align 3 .LC167: .string "reminded you of bullets. The car shoots forward the instant your feet touch" .align 3 .LC168: .string "the slippery gray floor, pinning you immobile against the back wall as the" .align 3 .LC169: .string "tubecar careens toward GDH7-beta. Your only solace is the knowledge that it" .align 3 .LC170: .string "could be worse, much worse." .align 3 .LC171: .string "Before too long the car comes to a stop. You can see signs for GDH7-beta" .align 3 .LC172: .string "through the window. With a little practice you discover that you can crawl" .align 3 .LC173: .string "to the door and pull open the latch." .text .align 2 .global page13 .type page13, %function page13: .LFB42: .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, .LC166 add x0, x0, :lo12:.LC166 bl puts adrp x0, .LC167 add x0, x0, :lo12:.LC167 bl puts adrp x0, .LC168 add x0, x0, :lo12:.LC168 bl puts adrp x0, .LC169 add x0, x0, :lo12:.LC169 bl puts adrp x0, .LC170 add x0, x0, :lo12:.LC170 bl puts adrp x0, .LC171 add x0, x0, :lo12:.LC171 bl puts adrp x0, .LC172 add x0, x0, :lo12:.LC172 bl puts adrp x0, .LC173 add x0, x0, :lo12:.LC173 bl puts mov w0, 14 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE42: .size page13, .-page13 .section .rodata.str1.8 .align 3 .LC174: .string "You manage to pull yourself out of the tubecar and look around. Before you is" .align 3 .LC175: .string "one of the most confusing things you have ever seen, a hallway that is" .align 3 .LC176: .string "simultaneously both red and green clearance. If this is the result of" .align 3 .LC177: .string "Christmas then it's easy to see the evils inherent in its practice." .align 3 .LC178: .string "You are in the heart of a large goods distribution centre. You can see all" .align 3 .LC179: .string "about you evidence of traitorous secret society Christmas celebration; rubber" .align 3 .LC180: .string "faced robots whiz back and forth selling toys to holiday shoppers, simul-plast" .align 3 .LC181: .string "wreaths hang from every light fixture, while ahead in the shadows is a citizen" .align 3 .LC182: .string "wearing a huge red synthetic flower." .text .align 2 .global page14 .type page14, %function page14: .LFB43: .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, .LC174 add x0, x0, :lo12:.LC174 bl puts adrp x0, .LC175 add x0, x0, :lo12:.LC175 bl puts adrp x0, .LC176 add x0, x0, :lo12:.LC176 bl puts adrp x0, .LC177 add x0, x0, :lo12:.LC177 bl puts adrp x0, .LC178 add x0, x0, :lo12:.LC178 bl puts adrp x0, .LC179 add x0, x0, :lo12:.LC179 bl puts adrp x0, .LC180 add x0, x0, :lo12:.LC180 bl puts adrp x0, .LC181 add x0, x0, :lo12:.LC181 bl puts adrp x0, .LC182 add x0, x0, :lo12:.LC182 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE43: .size page14, .-page14 .section .rodata.str1.8 .align 3 .LC183: .string "You are set upon by a runty robot with a queer looking face and two pointy" .align 3 .LC184: .string "rubber ears poking from beneath a tattered cap. \"Hey mister,\" it says," .align 3 .LC185: .string "\"you done all your last minute Christmas shopping? I got some real neat junk" .align 3 .LC186: .string "here. You don't wanna miss the big day tommorrow, if you know what I mean.\"" .align 3 .LC187: .string "The robot opens its bag to show you a pile of shoddy Troubleshooter dolls. It" .align 3 .LC188: .string "reaches in and pulls out one of them. \"Look, these Action Troubleshooter(tm)" .align 3 .LC189: .string "dolls are the neatest thing. This one's got moveable arms and when you" .align 3 .LC190: .string "squeeze him, his little rifle squirts realistic looking napalm. It's only" .align 3 .LC191: .string "50 credits. Oh yeah, Merry Christmas.\"" .align 3 .LC192: .string "\nSelect 'a', 'b' or 'c' :" .align 3 .LC193: .string " a - You decide to buy the doll." .align 3 .LC194: .string " b - You shoot the robot." .align 3 .LC195: .string " c - You ignore the robot and keep searching the hall." .text .align 2 .global page15 .type page15, %function page15: .LFB44: .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, .LC183 add x0, x0, :lo12:.LC183 bl puts adrp x0, .LC184 add x0, x0, :lo12:.LC184 bl puts adrp x0, .LC185 add x0, x0, :lo12:.LC185 bl puts adrp x0, .LC186 add x0, x0, :lo12:.LC186 bl puts adrp x0, .LC187 add x0, x0, :lo12:.LC187 bl puts adrp x0, .LC188 add x0, x0, :lo12:.LC188 bl puts adrp x0, .LC189 add x0, x0, :lo12:.LC189 bl puts adrp x0, .LC190 add x0, x0, :lo12:.LC190 bl puts adrp x0, .LC191 add x0, x0, :lo12:.LC191 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC193 add x0, x0, :lo12:.LC193 bl puts adrp x0, .LC194 add x0, x0, :lo12:.LC194 bl puts adrp x0, .LC195 add x0, x0, :lo12:.LC195 bl puts bl get_char and w1, w0, 255 mov w0, 16 cmp w1, 97 beq .L62 cmp w1, 98 mov w0, 22 mov w1, 17 csel w0, w0, w1, ne .L62: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE44: .size page15, .-page15 .section .rodata.str1.8 .align 3 .LC196: .string "The doll is a good buy for fifty credits; it will make a fine Christmas present" .align 3 .LC197: .string "for one of your friends. After the sale the robot rolls away. You can use" .align 3 .LC198: .string "the doll later in combat. It works just like a cone rifle firing napalm," .align 3 .LC199: .string "except that occasionally it will explode and blow the user to smithereens." .align 3 .LC200: .string "But don't let that stop you." .text .align 2 .global page16 .type page16, %function page16: .LFB45: .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, .LC196 add x0, x0, :lo12:.LC196 bl puts adrp x0, .LC197 add x0, x0, :lo12:.LC197 bl puts adrp x0, .LC198 add x0, x0, :lo12:.LC198 bl puts adrp x0, .LC199 add x0, x0, :lo12:.LC199 bl puts adrp x0, .LC200 add x0, x0, :lo12:.LC200 bl puts adrp x0, .LANCHOR1+4 mov w1, 1 str w1, [x0, #:lo12:.LANCHOR1+4] mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE45: .size page16, .-page16 .section .rodata.str1.8 .align 3 .LC201: .string "You whip out your laser and shoot the robot, but not before it squeezes the" .align 3 .LC202: .string "toy at you. The squeeze toy has the same effect as a cone rifle firing napalm," .align 3 .LC203: .string "and the elfbot's armour has no effect against your laser." .align 3 .LC204: .string "You have been hit!" .align 3 .LC205: .string "It missed you, but not by much!" .align 3 .LC206: .string "You zapped the little bastard!" .align 3 .LC207: .string "You wasted it! Good shooting!" .align 3 .LC208: .string "You will need more evidence, so you search GDH7-beta further" .align 3 .LC209: .string "after the GDH medbot has patched you up." .align 3 .LC210: .string "Damn! You missed!" .align 3 .LC211: .string "It tried to fire again, but the toy exploded and demolished it." .text .align 2 .global page17 .type page17, %function page17: .LFB46: .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] stp x21, x22, [sp, 32] str x23, [sp, 48] .cfi_offset 19, -48 .cfi_offset 20, -40 .cfi_offset 21, -32 .cfi_offset 22, -24 .cfi_offset 23, -16 adrp x0, .LC201 add x0, x0, :lo12:.LC201 bl puts adrp x0, .LC202 add x0, x0, :lo12:.LC202 bl puts adrp x0, .LC203 add x0, x0, :lo12:.LC203 bl puts mov w19, 2 mov w23, 15 mov w20, 100 adrp x22, .LC205 add x22, x22, :lo12:.LC205 adrp x21, .LC204 add x21, x21, :lo12:.LC204 b .L76 .L70: mov x0, x22 bl puts .L71: mov w1, w20 mov w0, 1 bl dice_roll cmp w0, 40 bgt .L73 adrp x0, .LC206 add x0, x0, :lo12:.LC206 bl puts mov w1, 10 mov w0, 2 bl dice_roll sub w23, w23, w0 cmp w23, 0 bgt .L74 adrp x0, .LC207 add x0, x0, :lo12:.LC207 bl puts adrp x0, .LC208 add x0, x0, :lo12:.LC208 bl puts adrp x0, .LANCHOR0+4 ldr w0, [x0, #:lo12:.LANCHOR0+4] cmp w0, 9 ble .L80 .L75: adrp x0, .LANCHOR0+4 mov w1, 10 str w1, [x0, #:lo12:.LANCHOR0+4] mov w0, 22 b .L69 .L80: adrp x0, .LC209 add x0, x0, :lo12:.LC209 bl puts b .L75 .L73: adrp x0, .LC210 add x0, x0, :lo12:.LC210 bl puts .L74: subs w19, w19, #1 beq .L81 .L76: mov w1, w20 mov w0, 1 bl dice_roll cmp w0, 25 bgt .L70 mov x0, x21 bl puts mov w1, 10 mov w0, 1 bl dice_roll adrp x2, .LANCHOR0 add x2, x2, :lo12:.LANCHOR0 ldr w1, [x2, 4] sub w0, w1, w0 str w0, [x2, 4] cmp w0, 0 bgt .L71 mov w0, 45 bl new_clone b .L69 .L81: adrp x0, .LC211 add x0, x0, :lo12:.LC211 bl puts adrp x0, .LC208 add x0, x0, :lo12:.LC208 bl puts adrp x0, .LANCHOR0+4 ldr w0, [x0, #:lo12:.LANCHOR0+4] cmp w0, 9 ble .L82 .L77: adrp x0, .LANCHOR0+4 mov w1, 10 str w1, [x0, #:lo12:.LANCHOR0+4] mov w0, 22 .L69: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L82: .cfi_restore_state adrp x0, .LC209 add x0, x0, :lo12:.LC209 bl puts b .L77 .cfi_endproc .LFE46: .size page17, .-page17 .section .rodata.str1.8 .align 3 .LC212: .string "You walk to the centre of the hall, ogling like an infrared fresh from the" .align 3 .LC213: .string "clone vats. Towering before you is the most unearthly thing you have ever" .align 3 .LC214: .string "seen, a green multi armed mutant horror hulking 15 feet above your head." .align 3 .LC215: .string "Its skeletal body is draped with hundreds of metallic strips (probably to" .align 3 .LC216: .string "negate the effects of some insidious mutant power), and the entire hideous" .align 3 .LC217: .string "creature is wrapped in a thousand blinking hazard lights. It's times like" .align 3 .LC218: .string "this when you wish you'd had some training for this job. Luckily the" .align 3 .LC219: .string "creature doesn't take notice of you but stands unmoving, as though waiting for" .align 3 .LC220: .string "a summons from its dark lord, the Master Retailer." .align 3 .LC221: .string "WHAM, suddenly you are struck from behind." .text .align 2 .global page18 .type page18, %function page18: .LFB47: .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, .LC212 add x0, x0, :lo12:.LC212 bl puts adrp x0, .LC213 add x0, x0, :lo12:.LC213 bl puts adrp x0, .LC214 add x0, x0, :lo12:.LC214 bl puts adrp x0, .LC215 add x0, x0, :lo12:.LC215 bl puts adrp x0, .LC216 add x0, x0, :lo12:.LC216 bl puts adrp x0, .LC217 add x0, x0, :lo12:.LC217 bl puts adrp x0, .LC218 add x0, x0, :lo12:.LC218 bl puts adrp x0, .LC219 add x0, x0, :lo12:.LC219 bl puts adrp x0, .LC220 add x0, x0, :lo12:.LC220 bl puts adrp x0, .LC221 add x0, x0, :lo12:.LC221 bl puts mov w1, 10 mov w0, 2 bl dice_roll cmp w0, 14 cset w0, gt add w0, w0, 19 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE47: .size page18, .-page18 .section .rodata.str1.8 .align 3 .LC222: .string "Quickly you regain your balance, whirl and fire your laser into the Ultraviolet" .align 3 .LC223: .string "citizen behind you. For a moment your heart leaps to your throat, then you" .align 3 .LC224: .string "realise that he is indeed dead and you will be the only one filing a report on" .align 3 .LC225: .string "this incident. Besides, he was participating in this traitorous Christmas" .align 3 .LC226: .string "shopping, as is evident from the rain of shoddy toys falling all around you." .align 3 .LC227: .string "Another valorous deed done in the service of The Computer!" .align 3 .LC228: .string "You run away like the cowardly dog you are" .align 3 .LC229: .string "You search the body, keeping an eye open for Internal Security" .text .align 2 .global page19 .type page19, %function page19: .LFB48: .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, .LC222 add x0, x0, :lo12:.LC222 bl puts adrp x0, .LC223 add x0, x0, :lo12:.LC223 bl puts adrp x0, .LC224 add x0, x0, :lo12:.LC224 bl puts adrp x0, .LC225 add x0, x0, :lo12:.LC225 bl puts adrp x0, .LC226 add x0, x0, :lo12:.LC226 bl puts adrp x0, .LC227 add x0, x0, :lo12:.LC227 bl puts adrp x0, .LANCHOR1 add x0, x0, :lo12:.LANCHOR1 ldr w1, [x0, 8] add w1, w1, 1 str w1, [x0, 8] adrp x0, .LANCHOR0 ldr w0, [x0, #:lo12:.LANCHOR0] mov w2, 7 sub w2, w2, w0 mov w0, 21 cmp w1, w2 bgt .L87 adrp x0, .LANCHOR1+16 ldr w1, [x0, #:lo12:.LANCHOR1+16] mov w0, 22 cmp w1, 1 beq .L87 adrp x3, .LC228 add x3, x3, :lo12:.LC228 mov w2, w0 adrp x1, .LC229 add x1, x1, :lo12:.LC229 mov w0, 34 bl choose .L87: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE48: .size page19, .-page19 .section .rodata.str1.8 .align 3 .LC230: .string "Oh no! you can't keep your balance. You're falling, falling head first into" .align 3 .LC231: .string "the Christmas beast's gaping maw. It's a valiant struggle; you think you are" .align 3 .LC232: .string "gone when its poisonous needles dig into your flesh, but with a heroic effort" .align 3 .LC233: .string "you jerk a string of lights free and jam the live wires into the creature's" .align 3 .LC234: .string "spine. The Christmas beast topples to the ground and begins to burn, filling" .align 3 .LC235: .string "the area with a thick acrid smoke. It takes only a moment to compose yourself," .align 3 .LC236: .string "and then you are ready to continue your search for the Master Retailer." .text .align 2 .global page20 .type page20, %function page20: .LFB49: .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, .LC230 add x0, x0, :lo12:.LC230 bl puts adrp x0, .LC231 add x0, x0, :lo12:.LC231 bl puts adrp x0, .LC232 add x0, x0, :lo12:.LC232 bl puts adrp x0, .LC233 add x0, x0, :lo12:.LC233 bl puts adrp x0, .LC234 add x0, x0, :lo12:.LC234 bl puts adrp x0, .LC235 add x0, x0, :lo12:.LC235 bl puts adrp x0, .LC236 add x0, x0, :lo12:.LC236 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE49: .size page20, .-page20 .section .rodata.str1.8 .align 3 .LC237: .string "You have been wasting the leading citizens of Alpha Complex at a prodigious" .align 3 .LC238: .string "rate. This has not gone unnoticed by the Internal Security squad at GDH7-beta." .align 3 .LC239: .string "Suddenly, a net of laser beams spear out of the gloomy corners of the hall," .align 3 .LC240: .string "chopping you into teeny, weeny bite size pieces." .text .align 2 .global page21 .type page21, %function page21: .LFB50: .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, .LC237 add x0, x0, :lo12:.LC237 bl puts adrp x0, .LC238 add x0, x0, :lo12:.LC238 bl puts adrp x0, .LC239 add x0, x0, :lo12:.LC239 bl puts adrp x0, .LC240 add x0, x0, :lo12:.LC240 bl puts mov w0, 45 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE50: .size page21, .-page21 .section .rodata.str1.8 .align 3 .LC241: .string "You are searching Goods Distribution Hall 7-beta." .text .align 2 .global page22 .type page22, %function page22: .LFB51: .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, .LC241 add x0, x0, :lo12:.LC241 bl puts mov w1, 4 mov w0, 1 bl dice_roll cmp w0, 3 beq .L100 mov w1, w0 bgt .L98 mov w0, 18 cmp w1, 1 beq .L96 mov w0, 15 cmp w1, 2 .L96: ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L98: .cfi_restore_state mov w0, 29 cmp w1, 4 b .L96 .L100: mov w0, 18 b .L96 .cfi_endproc .LFE51: .size page22, .-page22 .section .rodata.str1.8 .align 3 .LC242: .string "You go to the nearest computer terminal and declare yourself a mutant." .align 3 .LC243: .string "\"A mutant, he's a mutant,\" yells a previously unnoticed infrared who had" .align 3 .LC244: .string "been looking over your shoulder. You easily gun him down, but not before a" .align 3 .LC245: .string "dozen more citizens take notice and aim their weapons at you." .align 3 .LC246: .string "You want to fight it out, one against twelve" .align 3 .LC247: .string "You tell them that it was really only a bad joke" .text .align 2 .global page23 .type page23, %function page23: .LFB52: .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, .LC242 add x0, x0, :lo12:.LC242 bl puts adrp x0, .LC243 add x0, x0, :lo12:.LC243 bl puts adrp x0, .LC244 add x0, x0, :lo12:.LC244 bl puts adrp x0, .LC245 add x0, x0, :lo12:.LC245 bl puts adrp x3, .LC246 add x3, x3, :lo12:.LC246 mov w2, 24 adrp x1, .LC247 add x1, x1, :lo12:.LC247 mov w0, 28 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE52: .size page23, .-page23 .section .rodata.str1.8 .align 3 .LC248: .string "Golly, I never expected someone to pick this. I haven't even designed" .align 3 .LC249: .string "the 12 citizens who are going to make a sponge out of you. Tell you what," .align 3 .LC250: .string "I'll give you a second chance." .align 3 .LC251: .string "You REALLY want to shoot it out" .align 3 .LC252: .string "You change your mind and say it was only a bad joke" .text .align 2 .global page24 .type page24, %function page24: .LFB53: .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, .LC248 add x0, x0, :lo12:.LC248 bl puts adrp x0, .LC249 add x0, x0, :lo12:.LC249 bl puts adrp x0, .LC250 add x0, x0, :lo12:.LC250 bl puts adrp x3, .LC251 add x3, x3, :lo12:.LC251 mov w2, 25 adrp x1, .LC252 add x1, x1, :lo12:.LC252 mov w0, 28 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE53: .size page24, .-page24 .section .rodata.str1.8 .align 3 .LC253: .string "Boy, you really can't take a hint!" .align 3 .LC254: .string "They're closing in. Their trigger fingers are twitching, they're about to" .align 3 .LC255: .string "shoot. This is your last chance." .align 3 .LC256: .string "You are going to shoot" .align 3 .LC257: .string "You tell them it was all just a bad joke" .text .align 2 .global page25 .type page25, %function page25: .LFB54: .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, .LC253 add x0, x0, :lo12:.LC253 bl puts adrp x0, .LC254 add x0, x0, :lo12:.LC254 bl puts adrp x0, .LC255 add x0, x0, :lo12:.LC255 bl puts adrp x3, .LC256 add x3, x3, :lo12:.LC256 mov w2, 26 adrp x1, .LC257 add x1, x1, :lo12:.LC257 mov w0, 28 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE54: .size page25, .-page25 .section .rodata.str1.8 .align 3 .LC258: .string "You can read the cold, sober hatred in their eyes (They really didn't think" .align 3 .LC259: .string "it was funny), as they tighten the circle around you. One of them shoves a" .align 3 .LC260: .string "blaster up your nose, but that doesn't hurt as much as the multi-gigawatt" .align 3 .LC261: .string "carbonium tipped food drill in the small of your back." .align 3 .LC262: .string "You spend the remaining micro-seconds of your life wondering what you did wrong" .text .align 2 .global page26 .type page26, %function page26: .LFB55: .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, .LC258 add x0, x0, :lo12:.LC258 bl puts adrp x0, .LC259 add x0, x0, :lo12:.LC259 bl puts adrp x0, .LC260 add x0, x0, :lo12:.LC260 bl puts adrp x0, .LC261 add x0, x0, :lo12:.LC261 bl puts adrp x0, .LC262 add x0, x0, :lo12:.LC262 bl puts mov w0, 32 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE55: .size page26, .-page26 .align 2 .global page27 .type page27, %function page27: .LFB56: .cfi_startproc ret .cfi_endproc .LFE56: .size page27, .-page27 .section .rodata.str1.8 .align 3 .LC263: .string "They don't think it's funny." .text .align 2 .global page28 .type page28, %function page28: .LFB57: .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, .LC263 add x0, x0, :lo12:.LC263 bl puts mov w0, 26 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE57: .size page28, .-page28 .section .rodata.str1.8 .align 3 .LC264: .string "\"Psst, hey citizen, come here. Pssfft,\" you hear. When you peer around" .align 3 .LC265: .string "you can see someone's dim outline in the shadows. \"I got some information" .align 3 .LC266: .string "on the Master Retailer. It'll only cost you 30 psst credits.\"" .align 3 .LC267: .string " a - You pay the 30 credits for the info." .align 3 .LC268: .string " b - You would rather threaten him for the information." .align 3 .LC269: .string " c - You ignore him and walk away." .text .align 2 .global page29 .type page29, %function page29: .LFB58: .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, .LC264 add x0, x0, :lo12:.LC264 bl puts adrp x0, .LC265 add x0, x0, :lo12:.LC265 bl puts adrp x0, .LC266 add x0, x0, :lo12:.LC266 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC267 add x0, x0, :lo12:.LC267 bl puts adrp x0, .LC268 add x0, x0, :lo12:.LC268 bl puts adrp x0, .LC269 add x0, x0, :lo12:.LC269 bl puts bl get_char and w1, w0, 255 mov w0, 30 cmp w1, 97 beq .L116 cmp w1, 98 mov w0, 22 mov w1, 31 csel w0, w0, w1, ne .L116: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE58: .size page29, .-page29 .section .rodata.str1.8 .align 3 .LC270: .string "You step into the shadows and offer the man a thirty credit bill. \"Just drop" .align 3 .LC271: .string "it on the floor,\" he says. \"So you're looking for the Master Retailer, pssfft?" .align 3 .LC272: .string "I've seen him, he's a fat man in a fuzzy red and white jump suit. They say" .align 3 .LC273: .string "he's a high programmer with no respect for proper security. If you want to" .align 3 .LC274: .string "find him then pssfft step behind me and go through the door.\"" .align 3 .LC275: .string "Behind the man is a reinforced plasteel blast door. The centre of it has been" .align 3 .LC276: .string "buckled toward you in a manner you only saw once before when you were field" .align 3 .LC277: .string "testing the rocket assist plasma slingshot (you found it easily portable but" .align 3 .LC278: .string "prone to misfire). Luckily it isn't buckled too far for you to make out the" .align 3 .LC279: .string "warning sign. WARNING!! Don't open this door or the same thing will happen to" .align 3 .LC280: .string "you. Opening this door is a capital offense. Do not do it. Not at all. This" .align 3 .LC281: .string "is not a joke." .align 3 .LC282: .string " a - You use your Precognition mutant power on opening the door." .align 3 .LC283: .string " b - You just go through the door anyway." .align 3 .LC284: .string " c - You decide it's too dangerous and walk away." .text .align 2 .global page30 .type page30, %function page30: .LFB59: .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, .LC270 add x0, x0, :lo12:.LC270 bl puts adrp x0, .LC271 add x0, x0, :lo12:.LC271 bl puts adrp x0, .LC272 add x0, x0, :lo12:.LC272 bl puts adrp x0, .LC273 add x0, x0, :lo12:.LC273 bl puts adrp x0, .LC274 add x0, x0, :lo12:.LC274 bl puts adrp x0, .LC275 add x0, x0, :lo12:.LC275 bl puts adrp x0, .LC276 add x0, x0, :lo12:.LC276 bl puts adrp x0, .LC277 add x0, x0, :lo12:.LC277 bl puts adrp x0, .LC278 add x0, x0, :lo12:.LC278 bl puts adrp x0, .LC279 add x0, x0, :lo12:.LC279 bl puts adrp x0, .LC280 add x0, x0, :lo12:.LC280 bl puts adrp x0, .LC281 add x0, x0, :lo12:.LC281 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC282 add x0, x0, :lo12:.LC282 bl puts adrp x0, .LC283 add x0, x0, :lo12:.LC283 bl puts adrp x0, .LC284 add x0, x0, :lo12:.LC284 bl puts bl get_char and w1, w0, 255 mov w0, 56 cmp w1, 97 beq .L121 cmp w1, 98 mov w0, 22 mov w1, 33 csel w0, w0, w1, ne .L121: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE59: .size page30, .-page30 .section .rodata.str1.8 .align 3 .LC285: .string "Like any good troubleshooter you make the least expensive decision and threaten" .align 3 .LC286: .string "him for information. With lightning like reflexes you whip out your laser and" .align 3 .LC287: .string "stick it up his nose. \"Talk, you traitorous Christmas celebrator, or who nose" .align 3 .LC288: .string "what will happen to you, yuk yuk,\" you pun menacingly, and then you notice" .align 3 .LC289: .string "something is very wrong. He doesn't have a nose. As a matter of fact he's" .align 3 .LC290: .string "made of one eighth inch cardboard and your laser is sticking through the other" .align 3 .LC291: .string "side of his head. \"Are you going to pay?\" says his mouth speaker," .align 3 .LC292: .string "\"or are you going to pssfft go away stupid?\"" .align 3 .LC293: .string "You pssfft go away stupid" .align 3 .LC294: .string "You pay the 30 credits" .text .align 2 .global page31 .type page31, %function page31: .LFB60: .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, .LC285 add x0, x0, :lo12:.LC285 bl puts adrp x0, .LC286 add x0, x0, :lo12:.LC286 bl puts adrp x0, .LC287 add x0, x0, :lo12:.LC287 bl puts adrp x0, .LC288 add x0, x0, :lo12:.LC288 bl puts adrp x0, .LC289 add x0, x0, :lo12:.LC289 bl puts adrp x0, .LC290 add x0, x0, :lo12:.LC290 bl puts adrp x0, .LC291 add x0, x0, :lo12:.LC291 bl puts adrp x0, .LC292 add x0, x0, :lo12:.LC292 bl puts adrp x3, .LC293 add x3, x3, :lo12:.LC293 mov w2, 22 adrp x1, .LC294 add x1, x1, :lo12:.LC294 mov w0, 30 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE60: .size page31, .-page31 .section .rodata.str1.8 .align 3 .LC295: .string "Finally it's your big chance to prove that you're as good a troubleshooter" .align 3 .LC296: .string "as your previous clone. You walk briskly to mission briefing and pick up your" .align 3 .LC297: .string "previous clone's personal effects and notepad. After reviewing the notes you" .align 3 .LC298: .string "know what has to be done. You catch the purple line to Goods Distribution Hall" .align 3 .LC299: .string "7-beta and begin to search for the blast door." .text .align 2 .global page32 .type page32, %function page32: .LFB61: .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, .LC295 add x0, x0, :lo12:.LC295 bl puts adrp x0, .LC296 add x0, x0, :lo12:.LC296 bl puts adrp x0, .LC297 add x0, x0, :lo12:.LC297 bl puts adrp x0, .LC298 add x0, x0, :lo12:.LC298 bl puts adrp x0, .LC299 add x0, x0, :lo12:.LC299 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE61: .size page32, .-page32 .section .rodata.str1.8 .align 3 .LC300: .string "You release the megabolts on the blast door, then strain against it with your" .align 3 .LC301: .string "awesome strength. Slowly the door creaks open. You bravely leap through the" .align 3 .LC302: .string "opening and smack your head into the barrel of a 300 mm 'ultra shock' class" .align 3 .LC303: .string "plasma cannon. It's dark in the barrel now, but just before your head got" .align 3 .LC304: .string "stuck you can remember seeing a group of technicians anxiously watch you leap" .align 3 .LC305: .string "into the room." .text .align 2 .global page33 .type page33, %function page33: .LFB62: .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 adrp x19, .LANCHOR1 add x0, x19, :lo12:.LANCHOR1 mov w1, 1 str w1, [x0, 20] adrp x0, .LC300 add x0, x0, :lo12:.LC300 bl puts adrp x0, .LC301 add x0, x0, :lo12:.LC301 bl puts adrp x0, .LC302 add x0, x0, :lo12:.LC302 bl puts adrp x0, .LC303 add x0, x0, :lo12:.LC303 bl puts adrp x0, .LC304 add x0, x0, :lo12:.LC304 bl puts adrp x0, .LC305 add x0, x0, :lo12:.LC305 bl puts ldr w0, [x19, #:lo12:.LANCHOR1] cmp w0, 1 cset w0, ne add w0, w0, 35 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 .LFE62: .size page33, .-page33 .section .rodata.str1.8 .align 3 .LC306: .string "You have found a sealed envelope on the body. You open it and read:" .align 3 .LC307: .string "\"WARNING: Ultraviolet Clearance ONLY. DO NOT READ." .align 3 .LC308: .string "Memo from Chico-U-MRX4 to Harpo-U-MRX5." .align 3 .LC309: .string "The planned takeover of the Troubleshooter Training Course goes well, Comrade." .align 3 .LC310: .string "Once we have trained the unwitting bourgeois troubleshooters to work as" .align 3 .LC311: .string "communist dupes, the overthrow of Alpha Complex will be unstoppable. My survey" .align 3 .LC312: .string "of the complex has convinced me that no one suspects a thing; soon it will be" .align 3 .LC313: .string "too late for them to oppose the revolution. The only thing that could possibly" .align 3 .LC314: .string "impede the people's revolution would be someone alerting The Computer to our" .align 3 .LC315: .string "plans (for instance, some enterprising Troubleshooter could tell The Computer" .align 3 .LC316: .string "that the communists have liberated the Troubleshooter Training Course and plan" .align 3 .LC317: .string "to use it as a jumping off point from which to undermine the stability of all" .align 3 .LC318: .string "Alpha Complex), but as we both know, the capitalistic Troubleshooters would" .align 3 .LC319: .string "never serve the interests of the proletariat above their own bourgeois desires." .align 3 .LC320: .string "P.S. I'm doing some Christmas shopping later today. Would you like me to pick" .align 3 .LC321: .string "you up something?\"" .align 3 .LC322: .string "When you put down the memo you are overcome by that strange deja'vu again." .align 3 .LC323: .string "You see yourself talking privately with The Computer. You are telling it all" .align 3 .LC324: .string "about the communists' plan, and then the scene shifts and you see yourself" .align 3 .LC325: .string "showered with awards for foiling the insidious communist plot to take over the" .align 3 .LC326: .string "complex." .align 3 .LC327: .string "You wander off to look for more evidence" .align 3 .LC328: .string "You rush off to the nearest computer terminal to expose the commies" .text .align 2 .global page34 .type page34, %function page34: .LFB63: .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, .LC306 add x0, x0, :lo12:.LC306 bl puts adrp x0, .LC307 add x0, x0, :lo12:.LC307 bl puts adrp x0, .LC308 add x0, x0, :lo12:.LC308 bl puts adrp x0, .LC309 add x0, x0, :lo12:.LC309 bl puts adrp x0, .LC310 add x0, x0, :lo12:.LC310 bl puts adrp x0, .LC311 add x0, x0, :lo12:.LC311 bl puts adrp x0, .LC312 add x0, x0, :lo12:.LC312 bl puts adrp x0, .LC313 add x0, x0, :lo12:.LC313 bl puts adrp x0, .LC314 add x0, x0, :lo12:.LC314 bl puts adrp x0, .LC315 add x0, x0, :lo12:.LC315 bl puts adrp x0, .LC316 add x0, x0, :lo12:.LC316 bl puts adrp x0, .LC317 add x0, x0, :lo12:.LC317 bl puts adrp x0, .LC318 add x0, x0, :lo12:.LC318 bl puts adrp x0, .LC319 add x0, x0, :lo12:.LC319 bl puts adrp x0, .LC320 add x0, x0, :lo12:.LC320 bl puts adrp x0, .LC321 add x0, x0, :lo12:.LC321 bl puts bl more adrp x0, .LC322 add x0, x0, :lo12:.LC322 bl puts adrp x0, .LC323 add x0, x0, :lo12:.LC323 bl puts adrp x0, .LC324 add x0, x0, :lo12:.LC324 bl puts adrp x0, .LC325 add x0, x0, :lo12:.LC325 bl puts adrp x0, .LC326 add x0, x0, :lo12:.LC326 bl puts adrp x0, .LANCHOR1+16 mov w1, 1 str w1, [x0, #:lo12:.LANCHOR1+16] adrp x3, .LC327 add x3, x3, :lo12:.LC327 mov w2, 22 adrp x1, .LC328 add x1, x1, :lo12:.LC328 mov w0, 46 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE63: .size page34, .-page34 .section .rodata.str1.8 .align 3 .LC329: .string "\"Oh master,\" you hear through the gun barrel, \"where have you been? It is" .align 3 .LC330: .string "time for the great Christmas gifting ceremony. You had better hurry and get" .align 3 .LC331: .string "the costume on or the trainee may begin to suspect.\" For the second time" .align 3 .LC332: .string "today you are forced to wear attire not of your own choosing. They zip the" .align 3 .LC333: .string "suit to your chin just as you hear gunfire erupt behind you." .align 3 .LC334: .string "\"Oh no! Who left the door open? The commies will get in. Quick, fire the" .align 3 .LC335: .string "laser cannon or we're all doomed.\"" .align 3 .LC336: .string "\"Too late you capitalist swine, the people's revolutionary strike force claims" .align 3 .LC337: .string "this cannon for the proletariat's valiant struggle against oppression. Take" .align 3 .LC338: .string "that, you running dog imperialist lackey. ZAP, KAPOW\"" .align 3 .LC339: .string "Just when you think that things couldn't get worse, \"Aha, look what we have" .align 3 .LC340: .string "here, the Master Retailer himself with his head caught in his own cannon. His" .align 3 .LC341: .string "death will serve as a symbol of freedom for all Alpha Complex." .align 3 .LC342: .string "Fire the cannon.\"" .text .align 2 .global page35 .type page35, %function page35: .LFB64: .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, .LC329 add x0, x0, :lo12:.LC329 bl puts adrp x0, .LC330 add x0, x0, :lo12:.LC330 bl puts adrp x0, .LC331 add x0, x0, :lo12:.LC331 bl puts adrp x0, .LC332 add x0, x0, :lo12:.LC332 bl puts adrp x0, .LC333 add x0, x0, :lo12:.LC333 bl puts adrp x0, .LC334 add x0, x0, :lo12:.LC334 bl puts adrp x0, .LC335 add x0, x0, :lo12:.LC335 bl puts adrp x0, .LC336 add x0, x0, :lo12:.LC336 bl puts adrp x0, .LC337 add x0, x0, :lo12:.LC337 bl puts adrp x0, .LC338 add x0, x0, :lo12:.LC338 bl puts adrp x0, .LC339 add x0, x0, :lo12:.LC339 bl puts adrp x0, .LC340 add x0, x0, :lo12:.LC340 bl puts adrp x0, .LC341 add x0, x0, :lo12:.LC341 bl puts adrp x0, .LC342 add x0, x0, :lo12:.LC342 bl puts mov w0, 32 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE64: .size page35, .-page35 .section .rodata.str1.8 .align 3 .LC343: .string "\"Congratulations, troubleshooter, you have successfully found the lair of the" .align 3 .LC344: .string "Master Retailer and completed the Troubleshooter Training Course test mission,\"" .align 3 .LC345: .string "a muffled voice tells you through the barrel. \"Once we dislodge your head" .align 3 .LC346: .string "from the barrel of the 'Ultra Shock' plasma cannon you can begin with the" .align 3 .LC347: .string "training seminars, the first of which will concern the 100%% accurate\n" .align 3 .LC348: .string "identification and elimination of unregistered mutants. If you have any" .align 3 .LC349: .string "objections please voice them now.\"" .align 3 .LC350: .string " a - You appreciate his courtesy and voice an objection." .align 3 .LC351: .string " b - After your head is removed from the cannon, you register as a mutant." .align 3 .LC352: .string " c - After your head is removed from the cannon, you go to the unregistered" .align 3 .LC353: .string " mutant identification and elimination seminar." .text .align 2 .global page36 .type page36, %function page36: .LFB65: .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, .LC343 add x0, x0, :lo12:.LC343 bl puts adrp x0, .LC344 add x0, x0, :lo12:.LC344 bl puts adrp x0, .LC345 add x0, x0, :lo12:.LC345 bl puts adrp x0, .LC346 add x0, x0, :lo12:.LC346 bl puts adrp x1, .LC347 add x1, x1, :lo12:.LC347 mov w0, 1 bl __printf_chk adrp x0, .LC348 add x0, x0, :lo12:.LC348 bl puts adrp x0, .LC349 add x0, x0, :lo12:.LC349 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC350 add x0, x0, :lo12:.LC350 bl puts adrp x0, .LC351 add x0, x0, :lo12:.LC351 bl puts adrp x0, .LC352 add x0, x0, :lo12:.LC352 bl puts adrp x0, .LC353 add x0, x0, :lo12:.LC353 bl puts bl get_char and w0, w0, 255 cmp w0, 97 beq .L139 cmp w0, 98 mov w0, 37 mov w1, 23 csel w0, w0, w1, ne .L138: ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L139: .cfi_restore_state mov w0, 32 bl new_clone b .L138 .cfi_endproc .LFE65: .size page36, .-page36 .section .rodata.str1.8 .align 3 .LC354: .string "\"Come with me please, Troubleshooter,\" says the Green clearance technician" .align 3 .LC355: .string "after he has dislodged your head from the cannon. \"You have been participating" .align 3 .LC356: .string "in the Troubleshooter Training Course since you got off the tube car in" .align 3 .LC357: .string "GDH7-beta,\" he explains as he leads you down a corridor. \"The entire" .align 3 .LC358: .string "Christmas assignment was a test mission to assess your current level of" .align 3 .LC359: .string "training. You didn't do so well. We're going to start at the beginning with" .align 3 .LC360: .string "the other student. Ah, here we are, the mutant identification and elimination" .align 3 .LC361: .string "lecture.\" He shows you into a vast lecture hall filled with empty seats." .align 3 .LC362: .string "There is only one other student here, a Troubleshooter near the front row" .align 3 .LC363: .string "playing with his Action Troubleshooter(tm) figure. \"Find a seat and I will" .align 3 .LC364: .string "begin,\" says the instructor." .text .align 2 .global page37 .type page37, %function page37: .LFB66: .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, .LC354 add x0, x0, :lo12:.LC354 bl puts adrp x0, .LC355 add x0, x0, :lo12:.LC355 bl puts adrp x0, .LC356 add x0, x0, :lo12:.LC356 bl puts adrp x0, .LC357 add x0, x0, :lo12:.LC357 bl puts adrp x0, .LC358 add x0, x0, :lo12:.LC358 bl puts adrp x0, .LC359 add x0, x0, :lo12:.LC359 bl puts adrp x0, .LC360 add x0, x0, :lo12:.LC360 bl puts adrp x0, .LC361 add x0, x0, :lo12:.LC361 bl puts adrp x0, .LC362 add x0, x0, :lo12:.LC362 bl puts adrp x0, .LC363 add x0, x0, :lo12:.LC363 bl puts adrp x0, .LC364 add x0, x0, :lo12:.LC364 bl puts mov w0, 38 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE66: .size page37, .-page37 .section .rodata.str1.8 .align 3 .LC365: .string "\"I am Plato-B-PHI%d, head of mutant propaganda here at the training course.\n" .align 3 .LC366: .string "If you have any questions about mutants please come to me. Today I will be" .align 3 .LC367: .string "talking about mutant detection. Detecting mutants is very easy. One simply" .align 3 .LC368: .string "watches for certain tell tale signs, such as the green scaly skin, the third" .align 3 .LC369: .string "arm growing from the forehead, or other similar disfigurements so common with" .align 3 .LC370: .string "their kind. There are, however, a few rare specimens that show no outward sign" .align 3 .LC371: .string "of their treason. This has been a significant problem, so our researchers have" .align 3 .LC372: .string "been working on a solution. I would like a volunteer to test this device,\"" .align 3 .LC373: .string "he says, holding up a ray gun looking thing. \"It is a mutant detection ray." .align 3 .LC374: .string "This little button detects for mutants, and this big button stuns them once" .align 3 .LC375: .string "they are discovered. Who would like to volunteer for a test?\"" .align 3 .LC376: .string "The Troubleshooter down the front squirms deeper into his chair." .align 3 .LC377: .string "You duck behind a chair and hope the instructor doesn't notice you" .align 3 .LC378: .string "You volunteer for the test" .text .align 2 .global page38 .type page38, %function page38: .LFB67: .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, .LANCHOR0+8 ldr w2, [x0, #:lo12:.LANCHOR0+8] adrp x1, .LC365 add x1, x1, :lo12:.LC365 mov w0, 1 bl __printf_chk adrp x0, .LC366 add x0, x0, :lo12:.LC366 bl puts adrp x0, .LC367 add x0, x0, :lo12:.LC367 bl puts adrp x0, .LC368 add x0, x0, :lo12:.LC368 bl puts adrp x0, .LC369 add x0, x0, :lo12:.LC369 bl puts adrp x0, .LC370 add x0, x0, :lo12:.LC370 bl puts adrp x0, .LC371 add x0, x0, :lo12:.LC371 bl puts adrp x0, .LC372 add x0, x0, :lo12:.LC372 bl puts adrp x0, .LC373 add x0, x0, :lo12:.LC373 bl puts adrp x0, .LC374 add x0, x0, :lo12:.LC374 bl puts adrp x0, .LC375 add x0, x0, :lo12:.LC375 bl puts adrp x0, .LC376 add x0, x0, :lo12:.LC376 bl puts adrp x3, .LC377 add x3, x3, :lo12:.LC377 mov w2, 40 adrp x1, .LC378 add x1, x1, :lo12:.LC378 mov w0, 39 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE67: .size page38, .-page38 .section .rodata.str1.8 .align 3 .LC379: .string "You bravely volunteer to test the mutant detection gun. You stand up and walk" .align 3 .LC380: .string "down the steps to the podium, passing a very relieved Troubleshooter along the" .align 3 .LC381: .string "way. When you reach the podium Plato-B-PHI hands you the mutant detection gun" .align 3 .LC382: .string "and says, \"Here, aim the gun at that Troubleshooter and push the small button." .align 3 .LC383: .string "If you see a purple light, stun him.\" Grasping the opportunity to prove your" .align 3 .LC384: .string "worth to The Computer, you fire the mutant detection ray at the Troubleshooter." .align 3 .LC385: .string "A brilliant purple nimbus instantly surrounds his body. You slip your finger" .align 3 .LC386: .string "to the large stun button and he falls writhing to the floor." .align 3 .LC387: .string "\"Good shot,\" says the instructor as you hand him the mutant detection gun," .align 3 .LC388: .string "\"I'll see that you get a commendation for this. It seems you have the hang" .align 3 .LC389: .string "of mutant detection and elimination. You can go on to the secret society" .align 3 .LC390: .string "infiltration class. I'll see that the little mutie gets packaged for" .align 3 .LC391: .string "tomorrow's mutant dissection class.\"" .text .align 2 .global page39 .type page39, %function page39: .LFB68: .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, .LC379 add x0, x0, :lo12:.LC379 bl puts adrp x0, .LC380 add x0, x0, :lo12:.LC380 bl puts adrp x0, .LC381 add x0, x0, :lo12:.LC381 bl puts adrp x0, .LC382 add x0, x0, :lo12:.LC382 bl puts adrp x0, .LC383 add x0, x0, :lo12:.LC383 bl puts adrp x0, .LC384 add x0, x0, :lo12:.LC384 bl puts adrp x0, .LC385 add x0, x0, :lo12:.LC385 bl puts adrp x0, .LC386 add x0, x0, :lo12:.LC386 bl puts adrp x0, .LC387 add x0, x0, :lo12:.LC387 bl puts adrp x0, .LC388 add x0, x0, :lo12:.LC388 bl puts adrp x0, .LC389 add x0, x0, :lo12:.LC389 bl puts adrp x0, .LC390 add x0, x0, :lo12:.LC390 bl puts adrp x0, .LC391 add x0, x0, :lo12:.LC391 bl puts mov w0, 41 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE68: .size page39, .-page39 .section .rodata.str1.8 .align 3 .LC392: .string "You breathe a sigh of relief as Plato-B-PHI picks on the other Troubleshooter." .align 3 .LC393: .string "\"You down here in the front,\" says the instructor pointing at the other" .align 3 .LC394: .string "Troubleshooter, \"you'll make a good volunteer. Please step forward.\"" .align 3 .LC395: .string "The Troubleshooter looks around with a `who me?' expression on his face, but" .align 3 .LC396: .string "since he is the only one visible in the audience he figures his number is up." .align 3 .LC397: .string "He walks down to the podium clutching his Action Troubleshooter(tm) doll before" .align 3 .LC398: .string "him like a weapon. \"Here,\" says Plato-B-PHI, \"take the mutant detection ray" .align 3 .LC399: .string "and point it at the audience. If there are any mutants out there we'll know" .align 3 .LC400: .string "soon enough.\" Suddenly your skin prickles with static electricity as a bright" .align 3 .LC401: .string "purple nimbus surrounds your body. \"Ha Ha, got one,\" says the instructor." .align 3 .LC402: .string "\"Stun him before he gets away.\"" .align 3 .LC403: .string "His shot hits you. You feel numb all over." .align 3 .LC404: .string "His shot just missed." .align 3 .LC405: .string "You just blew his head off. His lifeless hand drops the mutant detector ray." .align 3 .LC406: .string "You burnt a hole in the podium. He sights the mutant detector ray on you." .text .align 2 .global page40 .type page40, %function page40: .LFB69: .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] str x21, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 adrp x0, .LC392 add x0, x0, :lo12:.LC392 bl puts adrp x0, .LC393 add x0, x0, :lo12:.LC393 bl puts adrp x0, .LC394 add x0, x0, :lo12:.LC394 bl puts adrp x0, .LC395 add x0, x0, :lo12:.LC395 bl puts adrp x0, .LC396 add x0, x0, :lo12:.LC396 bl puts adrp x0, .LC397 add x0, x0, :lo12:.LC397 bl puts adrp x0, .LC398 add x0, x0, :lo12:.LC398 bl puts adrp x0, .LC399 add x0, x0, :lo12:.LC399 bl puts adrp x0, .LC400 add x0, x0, :lo12:.LC400 bl puts adrp x0, .LC401 add x0, x0, :lo12:.LC401 bl puts adrp x0, .LC402 add x0, x0, :lo12:.LC402 bl puts bl more mov w19, 100 adrp x20, .LC404 add x20, x20, :lo12:.LC404 adrp x21, .LC406 add x21, x21, :lo12:.LC406 b .L153 .L155: adrp x0, .LC403 add x0, x0, :lo12:.LC403 bl puts mov w0, 49 .L149: ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L152: .cfi_restore_state mov x0, x21 bl puts .L153: mov w1, w19 mov w0, 1 bl dice_roll cmp w0, 30 ble .L155 mov x0, x20 bl puts mov w1, w19 mov w0, 1 bl dice_roll cmp w0, 40 bgt .L152 adrp x0, .LC405 add x0, x0, :lo12:.LC405 bl puts mov w0, 50 b .L149 .cfi_endproc .LFE69: .size page40, .-page40 .section .rodata.str1.8 .align 3 .LC407: .string "You stumble down the hallway of the Troubleshooter Training Course looking for" .align 3 .LC408: .string "your next class. Up ahead you see one of the instructors waving to you. When" .align 3 .LC409: .string "you get there he shakes your hand and says, \"I am Jung-I-PSY. Welcome to the" .align 3 .LC410: .string "secret society infiltration seminar. I hope you ...\" You don't catch the" .align 3 .LC411: .string "rest of his greeting because you're paying too much attention to his handshake;" .align 3 .LC412: .string "it is the strangest thing that has ever been done to your hand, sort of how it" .align 3 .LC413: .string "would feel if you put a neuro whip in a high energy palm massage unit." .align 3 .LC414: .string "It doesn't take you long to learn what he is up to; you feel him briefly shake" .align 3 .LC415: .string "your hand with the secret Illuminati handshake." .align 3 .LC416: .string "You ignore this secret society contact" .align 3 .LC417: .string "You respond with the proper Illuminati code phrase, \"Ewige Blumenkraft\"" .text .align 2 .global page41 .type page41, %function page41: .LFB70: .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, .LC407 add x0, x0, :lo12:.LC407 bl puts adrp x0, .LC408 add x0, x0, :lo12:.LC408 bl puts adrp x0, .LC409 add x0, x0, :lo12:.LC409 bl puts adrp x0, .LC410 add x0, x0, :lo12:.LC410 bl puts adrp x0, .LC411 add x0, x0, :lo12:.LC411 bl puts adrp x0, .LC412 add x0, x0, :lo12:.LC412 bl puts adrp x0, .LC413 add x0, x0, :lo12:.LC413 bl puts adrp x0, .LC414 add x0, x0, :lo12:.LC414 bl puts adrp x0, .LC415 add x0, x0, :lo12:.LC415 bl puts adrp x3, .LC416 add x3, x3, :lo12:.LC416 mov w2, 43 adrp x1, .LC417 add x1, x1, :lo12:.LC417 mov w0, 42 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE70: .size page41, .-page41 .section .rodata.str1.8 .align 3 .LC418: .string "\"Aha, so you are a member of the elitist Illuminati secret society,\" he says" .align 3 .LC419: .string "loudly, \"that is most interesting.\" He turns to the large class already" .align 3 .LC420: .string "seated in the auditorium and says, \"You see, class, by simply using the correct" .align 3 .LC421: .string "hand shake you can identify the member of any secret society. Please keep your" .align 3 .LC422: .string "weapons trained on him while I call a guard." .align 3 .LC423: .string "You wait for the guard" .align 3 .LC424: .string "You run for it" .text .align 2 .global page42 .type page42, %function page42: .LFB71: .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, .LC418 add x0, x0, :lo12:.LC418 bl puts adrp x0, .LC419 add x0, x0, :lo12:.LC419 bl puts adrp x0, .LC420 add x0, x0, :lo12:.LC420 bl puts adrp x0, .LC421 add x0, x0, :lo12:.LC421 bl puts adrp x0, .LC422 add x0, x0, :lo12:.LC422 bl puts adrp x3, .LC423 add x3, x3, :lo12:.LC423 mov w2, 52 adrp x1, .LC424 add x1, x1, :lo12:.LC424 mov w0, 51 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE71: .size page42, .-page42 .section .rodata.str1.8 .align 3 .LC425: .string "You sit through a long lecture on how to recognise and infiltrate secret" .align 3 .LC426: .string "societies, with an emphasis on mimicking secret handshakes. The basic theory," .align 3 .LC427: .string "which you realise to be sound from your Iluminati training, is that with the" .align 3 .LC428: .string "proper handshake you can pass unnoticed in any secret society gathering." .align 3 .LC429: .string "What's more, the proper handshake will open doors faster than an 'ultra shock'" .align 3 .LC430: .string "plasma cannon. You are certain that with the information you learn here you" .align 3 .LC431: .string "will easily be promoted to the next level of your Illuminati secret society." .align 3 .LC432: .string "The lecture continues for three hours, during which you have the opportunity" .align 3 .LC433: .string "to practice many different handshakes. Afterwards everyone is directed to" .align 3 .LC434: .string "attend the graduation ceremony. Before you must go you have a little time to" .align 3 .LC435: .string "talk to The Computer about, you know, certain topics." .align 3 .LC436: .string "You go to the graduation ceremony immediately" .align 3 .LC437: .string "You go looking for a computer terminal" .text .align 2 .global page43 .type page43, %function page43: .LFB72: .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, .LC425 add x0, x0, :lo12:.LC425 bl puts adrp x0, .LC426 add x0, x0, :lo12:.LC426 bl puts adrp x0, .LC427 add x0, x0, :lo12:.LC427 bl puts adrp x0, .LC428 add x0, x0, :lo12:.LC428 bl puts adrp x0, .LC429 add x0, x0, :lo12:.LC429 bl puts adrp x0, .LC430 add x0, x0, :lo12:.LC430 bl puts adrp x0, .LC431 add x0, x0, :lo12:.LC431 bl puts adrp x0, .LC432 add x0, x0, :lo12:.LC432 bl puts adrp x0, .LC433 add x0, x0, :lo12:.LC433 bl puts adrp x0, .LC434 add x0, x0, :lo12:.LC434 bl puts adrp x0, .LC435 add x0, x0, :lo12:.LC435 bl puts adrp x3, .LC436 add x3, x3, :lo12:.LC436 mov w2, 55 adrp x1, .LC437 add x1, x1, :lo12:.LC437 mov w0, 44 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE72: .size page43, .-page43 .section .rodata.str1.8 .align 3 .LC438: .string "You walk down to a semi-secluded part of the training course complex and" .align 3 .LC439: .string "activate a computer terminal. \"AT YOUR SERVICE\" reads the computer screen." .align 3 .LC440: .string "You change your mind and go to the graduation ceremony" .align 3 .LC441: .string "You register yourself as a mutant" .align 3 .LC442: .string " a - You register yourself as a mutant." .align 3 .LC443: .string " b - You want to chat about the commies." .align 3 .LC444: .string " c - You change your mind and go to the graduation ceremony." .text .align 2 .global page44 .type page44, %function page44: .LFB73: .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, .LC438 add x0, x0, :lo12:.LC438 bl puts adrp x0, .LC439 add x0, x0, :lo12:.LC439 bl puts adrp x0, .LANCHOR1+16 ldr w0, [x0, #:lo12:.LANCHOR1+16] cbz w0, .L168 adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC442 add x0, x0, :lo12:.LC442 bl puts adrp x0, .LC443 add x0, x0, :lo12:.LC443 bl puts adrp x0, .LC444 add x0, x0, :lo12:.LC444 bl puts bl get_char and w1, w0, 255 mov w0, 23 cmp w1, 97 beq .L162 cmp w1, 98 mov w0, 55 mov w1, 46 csel w0, w0, w1, ne .L162: ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L168: .cfi_restore_state adrp x3, .LC440 add x3, x3, :lo12:.LC440 mov w2, 55 adrp x1, .LC441 add x1, x1, :lo12:.LC441 mov w0, 23 bl choose b .L162 .cfi_endproc .LFE73: .size page44, .-page44 .section .rodata.str1.8 .align 3 .LC445: .string "\"Hrank Hrank,\" snorts the alarm in your living quarters. Something is up." .align 3 .LC446: .string "You look at the monitor above the bathroom mirror and see the message you have" .align 3 .LC447: .string "been waiting for all these years. \"ATTENTION TROUBLESHOOTER, YOU ARE BEING" .align 3 .LC448: .string "ACTIVATED. PLEASE REPORT IMMEDIATELY TO MISSION ASSIGNMENT ROOM A17/GAMMA/LB22." .align 3 .LC449: .string "THANK YOU. THE COMPUTER IS YOUR FRIEND.\" When you arrive at mission" .align 3 .LC450: .string "assignment room A17-gamma/LB22 you are given your previous clone's" .align 3 .LC451: .string "remaining possessions and notebook. You puzzle through your predecessor's" .align 3 .LC452: .string "cryptic notes, managing to decipher enough to lead you to the tube station and" .align 3 .LC453: .string "the tube car to GDH7-beta." .text .align 2 .global page45 .type page45, %function page45: .LFB74: .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, .LC445 add x0, x0, :lo12:.LC445 bl puts adrp x0, .LC446 add x0, x0, :lo12:.LC446 bl puts adrp x0, .LC447 add x0, x0, :lo12:.LC447 bl puts adrp x0, .LC448 add x0, x0, :lo12:.LC448 bl puts adrp x0, .LC449 add x0, x0, :lo12:.LC449 bl puts adrp x0, .LC450 add x0, x0, :lo12:.LC450 bl puts adrp x0, .LC451 add x0, x0, :lo12:.LC451 bl puts adrp x0, .LC452 add x0, x0, :lo12:.LC452 bl puts adrp x0, .LC453 add x0, x0, :lo12:.LC453 bl puts mov w0, 10 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE74: .size page45, .-page45 .section .rodata.str1.8 .align 3 .LC454: .string "\"Why do you ask about the communists, Troubleshooter? It is not in the" .align 3 .LC455: .string "interest of your continued survival to be asking about such topics,\" says" .align 3 .LC456: .string "The Computer." .align 3 .LC457: .string "You change the subject" .align 3 .LC458: .string "You insist on talking about the communists" .text .align 2 .global page46 .type page46, %function page46: .LFB75: .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, .LC454 add x0, x0, :lo12:.LC454 bl puts adrp x0, .LC455 add x0, x0, :lo12:.LC455 bl puts adrp x0, .LC456 add x0, x0, :lo12:.LC456 bl puts adrp x3, .LC457 add x3, x3, :lo12:.LC457 mov w2, 54 adrp x1, .LC458 add x1, x1, :lo12:.LC458 mov w0, 53 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE75: .size page46, .-page46 .section .rodata.str1.8 .align 3 .LC459: .string "The Computer orders the entire Vulture squadron to terminate the Troubleshooter" .align 3 .LC460: .string "Training Course. Unfortunately you too are terminated for possessing" .align 3 .LC461: .string "classified information.\n" .align 3 .LC462: .string "Don't act so innocent, we both know that you are an Illuminatus which is in" .align 3 .LC463: .string "itself an act of treason.\n" .align 3 .LC464: .string "Don't look to me for sympathy.\n" .align 3 .LC465: .string "\t\t\tTHE END" .text .align 2 .global page47 .type page47, %function page47: .LFB76: .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, .LC459 add x0, x0, :lo12:.LC459 bl puts adrp x0, .LC460 add x0, x0, :lo12:.LC460 bl puts adrp x0, .LC461 add x0, x0, :lo12:.LC461 bl puts adrp x0, .LC462 add x0, x0, :lo12:.LC462 bl puts adrp x0, .LC463 add x0, x0, :lo12:.LC463 bl puts adrp x0, .LC464 add x0, x0, :lo12:.LC464 bl puts adrp x0, .LC465 add x0, x0, :lo12:.LC465 bl puts mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE76: .size page47, .-page47 .section .rodata.str1.8 .align 3 .LC466: .string "The tubecar shoots forward as you enter, slamming you back into a pile of" .align 3 .LC467: .string "garbage. The front end rotates upward and you, the garbage and the garbage" .align 3 .LC468: .string "disposal car shoot straight up out of Alpha Complex. One of the last things" .align 3 .LC469: .string "you see is a small blue sphere slowly dwindling behind you. After you fail to" .align 3 .LC470: .string "report in, you will be assumed dead." .text .align 2 .global page48 .type page48, %function page48: .LFB77: .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, .LC466 add x0, x0, :lo12:.LC466 bl puts adrp x0, .LC467 add x0, x0, :lo12:.LC467 bl puts adrp x0, .LC468 add x0, x0, :lo12:.LC468 bl puts adrp x0, .LC469 add x0, x0, :lo12:.LC469 bl puts adrp x0, .LC470 add x0, x0, :lo12:.LC470 bl puts mov w0, 45 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE77: .size page48, .-page48 .section .rodata.str1.8 .align 3 .LC471: .string "The instructor drags your inert body into a specimen detainment cage." .align 3 .LC472: .string "\"He'll make a good subject for tomorrow's mutant dissection class,\" you hear." .text .align 2 .global page49 .type page49, %function page49: .LFB78: .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, .LC471 add x0, x0, :lo12:.LC471 bl puts adrp x0, .LC472 add x0, x0, :lo12:.LC472 bl puts mov w0, 32 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE78: .size page49, .-page49 .section .rodata.str1.8 .align 3 .LC473: .string "You put down the other Troubleshooter, and then wisely decide to drill a few" .align 3 .LC474: .string "holes in the instructor as well; the only good witness is a dead witness." .align 3 .LC475: .string "You continue with the training course." .text .align 2 .global page50 .type page50, %function page50: .LFB79: .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, .LC473 add x0, x0, :lo12:.LC473 bl puts adrp x0, .LC474 add x0, x0, :lo12:.LC474 bl puts adrp x0, .LC475 add x0, x0, :lo12:.LC475 bl puts adrp x0, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 ldr w1, [x0, 8] add w1, w1, 1 str w1, [x0, 8] mov w0, 41 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE79: .size page50, .-page50 .section .rodata.str1.8 .align 3 .LC476: .string "You run for it, but you don't run far. Three hundred strange and exotic" .align 3 .LC477: .string "weapons turn you into a freeze dried cloud of soot." .text .align 2 .global page51 .type page51, %function page51: .LFB80: .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, .LC476 add x0, x0, :lo12:.LC476 bl puts adrp x0, .LC477 add x0, x0, :lo12:.LC477 bl puts mov w0, 32 bl new_clone ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE80: .size page51, .-page51 .section .rodata.str1.8 .align 3 .LC478: .string "You wisely wait until the instructor returns with a Blue Internal Security" .align 3 .LC479: .string "guard. The guard leads you to an Internal Security self incrimination station." .text .align 2 .global page52 .type page52, %function page52: .LFB81: .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, .LC478 add x0, x0, :lo12:.LC478 bl puts adrp x0, .LC479 add x0, x0, :lo12:.LC479 bl puts mov w0, 2 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE81: .size page52, .-page52 .section .rodata.str1.8 .align 3 .LC480: .string "You tell The Computer about:" .align 3 .LC481: .string "Something less dangerous" .align 3 .LC482: .string "The commies who have infiltrated the Troubleshooter Training Course\n and the impending People's Revolution" .text .align 2 .global page53 .type page53, %function page53: .LFB82: .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, .LC480 add x0, x0, :lo12:.LC480 bl puts adrp x3, .LC481 add x3, x3, :lo12:.LC481 mov w2, 54 adrp x1, .LC482 add x1, x1, :lo12:.LC482 mov w0, 47 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE82: .size page53, .-page53 .section .rodata.str1.8 .align 3 .LC483: .string "\"Do not try to change the subject, Troubleshooter,\" says The Computer." .align 3 .LC484: .string "\"It is a serious crime to ask about the communists. You will be terminated" .align 3 .LC485: .string "immediately. Thank you for your inquiry. The Computer is your friend.\"" .align 3 .LC486: .string "Steel bars drop to your left and right, trapping you here in the hallway." .align 3 .LC487: .string "A spotlight beams from the computer console to brilliantly iiluminate you while" .align 3 .LC488: .string "the speaker above your head rapidly repeats \"Traitor, Traitor, Traitor.\"" .align 3 .LC489: .string "It doesn't take long for a few guards to notice your predicament and come to" .align 3 .LC490: .string "finish you off." .text .align 2 .global page54 .type page54, %function page54: .LFB83: .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, .LC483 add x0, x0, :lo12:.LC483 bl puts adrp x0, .LC484 add x0, x0, :lo12:.LC484 bl puts adrp x0, .LC485 add x0, x0, :lo12:.LC485 bl puts adrp x0, .LC486 add x0, x0, :lo12:.LC486 bl puts adrp x0, .LC487 add x0, x0, :lo12:.LC487 bl puts adrp x0, .LC488 add x0, x0, :lo12:.LC488 bl puts adrp x0, .LC489 add x0, x0, :lo12:.LC489 bl puts adrp x0, .LC490 add x0, x0, :lo12:.LC490 bl puts adrp x0, .LANCHOR1+20 ldr w0, [x0, #:lo12:.LANCHOR1+20] cbnz w0, .L188 mov w0, 45 bl new_clone .L187: ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L188: .cfi_restore_state mov w0, 32 bl new_clone b .L187 .cfi_endproc .LFE83: .size page54, .-page54 .section .rodata.str1.8 .align 3 .LC491: .string "You and 300 other excited graduates are marched from the lecture hall and into" .align 3 .LC492: .string "a large auditorium for the graduation exercise. The auditorium is" .align 3 .LC493: .string "extravagantly decorated in the colours of the graduating class. Great red and" .align 3 .LC494: .string "green plasti-paper ribbons drape from the walls, while a huge sign reading" .align 3 .LC495: .string "\"Congratulations class of GDH7-beta-203.44/A\" hangs from the raised stage down" .align 3 .LC496: .string "front. Once everyone finds a seat the ceremony begins. Jung-I-PSY is the" .align 3 .LC497: .string "first to speak, \"Congratulations students, you have successfully survived the" .align 3 .LC498: .string "Troubleshooter Training Course. It always brings me great pride to address" .align 3 .LC499: .string "the graduating class, for I know, as I am sure you do too, that you are now" .align 3 .LC500: .string "qualified for the most perilous missions The Computer may select for you. The" .align 3 .LC501: .string "thanks is not owed to us of the teaching staff, but to all of you, who have" .align 3 .LC502: .string "persevered and graduated. Good luck and die trying.\" Then the instructor" .align 3 .LC503: .string "begins reading the names of the students who one by one walk to the front of" .align 3 .LC504: .string "the auditorium and receive their diplomas. Soon it is your turn," .align 3 .LC505: .string "\"Philo-R-DMD, graduating a master of mutant identification and secret society" .align 3 .LC506: .string "infiltration.\" You walk up and receive your diploma from Plato-B-PHI%d, then\n" .align 3 .LC507: .string "return to your seat. There is another speech after the diplomas are handed" .align 3 .LC508: .string "out, but it is cut short by by rapid fire laser bursts from the high spirited" .align 3 .LC509: .string "graduating class. You are free to return to your barracks to wait, trained" .align 3 .LC510: .string "and fully qualified, for your next mission. You also get that cherished" .align 3 .LC511: .string "promotion from the Illuminati secret society. In a week you receive a" .align 3 .LC512: .string "detailed Training Course bill totalling 1,523 credits." .text .align 2 .global page55 .type page55, %function page55: .LFB84: .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, .LC491 add x0, x0, :lo12:.LC491 bl puts adrp x0, .LC492 add x0, x0, :lo12:.LC492 bl puts adrp x0, .LC493 add x0, x0, :lo12:.LC493 bl puts adrp x0, .LC494 add x0, x0, :lo12:.LC494 bl puts adrp x0, .LC495 add x0, x0, :lo12:.LC495 bl puts adrp x0, .LC496 add x0, x0, :lo12:.LC496 bl puts adrp x0, .LC497 add x0, x0, :lo12:.LC497 bl puts adrp x0, .LC498 add x0, x0, :lo12:.LC498 bl puts adrp x0, .LC499 add x0, x0, :lo12:.LC499 bl puts adrp x0, .LC500 add x0, x0, :lo12:.LC500 bl puts adrp x0, .LC501 add x0, x0, :lo12:.LC501 bl puts adrp x0, .LC502 add x0, x0, :lo12:.LC502 bl puts adrp x0, .LC503 add x0, x0, :lo12:.LC503 bl puts adrp x0, .LC504 add x0, x0, :lo12:.LC504 bl puts adrp x0, .LC505 add x0, x0, :lo12:.LC505 bl puts adrp x0, .LANCHOR0+8 ldr w2, [x0, #:lo12:.LANCHOR0+8] adrp x1, .LC506 add x1, x1, :lo12:.LC506 mov w0, 1 bl __printf_chk adrp x0, .LC507 add x0, x0, :lo12:.LC507 bl puts adrp x0, .LC508 add x0, x0, :lo12:.LC508 bl puts adrp x0, .LC509 add x0, x0, :lo12:.LC509 bl puts adrp x0, .LC510 add x0, x0, :lo12:.LC510 bl puts adrp x0, .LC511 add x0, x0, :lo12:.LC511 bl puts adrp x0, .LC512 add x0, x0, :lo12:.LC512 bl puts adrp x0, .LC465 add x0, x0, :lo12:.LC465 bl puts mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE84: .size page55, .-page55 .section .rodata.str1.8 .align 3 .LC513: .string "That familiar strange feeling of deja'vu envelops you again. It is hard to" .align 3 .LC514: .string "say, but whatever is on the other side of the door does not seem to be intended" .align 3 .LC515: .string "for you." .align 3 .LC516: .string "You go looking for more information" .align 3 .LC517: .string "You open the door and step through" .text .align 2 .global page56 .type page56, %function page56: .LFB85: .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, .LC513 add x0, x0, :lo12:.LC513 bl puts adrp x0, .LC514 add x0, x0, :lo12:.LC514 bl puts adrp x0, .LC515 add x0, x0, :lo12:.LC515 bl puts adrp x3, .LC516 add x3, x3, :lo12:.LC516 mov w2, 22 adrp x1, .LC517 add x1, x1, :lo12:.LC517 mov w0, 33 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE85: .size page56, .-page56 .section .rodata.str1.8 .align 3 .LC518: .string "In the centre of the room is a table and a single chair. There is an Orange" .align 3 .LC519: .string "folder on the table top, but you can't make out the lettering on it." .align 3 .LC520: .string "You leave the room" .align 3 .LC521: .string "You sit down and read the folder" .text .align 2 .global page57 .type page57, %function page57: .LFB86: .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, .LC518 add x0, x0, :lo12:.LC518 bl puts adrp x0, .LC519 add x0, x0, :lo12:.LC519 bl puts adrp x3, .LC520 add x3, x3, :lo12:.LC520 mov w2, 12 adrp x1, .LC521 add x1, x1, :lo12:.LC521 mov w0, 11 bl choose ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE86: .size page57, .-page57 .align 2 .global next_page .type next_page, %function next_page: .LFB87: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w19, w0 mov w0, 10 bl putchar cmp w19, 57 bhi .L197 adrp x0, .L200 add x0, x0, :lo12:.L200 ldrh w0, [x0,w19,uxtw #1] adr x1, .Lrtx200 add x0, x1, w0, sxth #2 br x0 .Lrtx200: .section .rodata .align 0 .align 2 .L200: .2byte (.L258 - .Lrtx200) / 4 .2byte (.L256 - .Lrtx200) / 4 .2byte (.L255 - .Lrtx200) / 4 .2byte (.L254 - .Lrtx200) / 4 .2byte (.L253 - .Lrtx200) / 4 .2byte (.L252 - .Lrtx200) / 4 .2byte (.L251 - .Lrtx200) / 4 .2byte (.L250 - .Lrtx200) / 4 .2byte (.L249 - .Lrtx200) / 4 .2byte (.L248 - .Lrtx200) / 4 .2byte (.L247 - .Lrtx200) / 4 .2byte (.L246 - .Lrtx200) / 4 .2byte (.L245 - .Lrtx200) / 4 .2byte (.L244 - .Lrtx200) / 4 .2byte (.L243 - .Lrtx200) / 4 .2byte (.L242 - .Lrtx200) / 4 .2byte (.L241 - .Lrtx200) / 4 .2byte (.L240 - .Lrtx200) / 4 .2byte (.L239 - .Lrtx200) / 4 .2byte (.L238 - .Lrtx200) / 4 .2byte (.L237 - .Lrtx200) / 4 .2byte (.L236 - .Lrtx200) / 4 .2byte (.L235 - .Lrtx200) / 4 .2byte (.L234 - .Lrtx200) / 4 .2byte (.L233 - .Lrtx200) / 4 .2byte (.L232 - .Lrtx200) / 4 .2byte (.L231 - .Lrtx200) / 4 .2byte (.L197 - .Lrtx200) / 4 .2byte (.L229 - .Lrtx200) / 4 .2byte (.L228 - .Lrtx200) / 4 .2byte (.L227 - .Lrtx200) / 4 .2byte (.L226 - .Lrtx200) / 4 .2byte (.L225 - .Lrtx200) / 4 .2byte (.L224 - .Lrtx200) / 4 .2byte (.L223 - .Lrtx200) / 4 .2byte (.L222 - .Lrtx200) / 4 .2byte (.L221 - .Lrtx200) / 4 .2byte (.L220 - .Lrtx200) / 4 .2byte (.L219 - .Lrtx200) / 4 .2byte (.L218 - .Lrtx200) / 4 .2byte (.L217 - .Lrtx200) / 4 .2byte (.L216 - .Lrtx200) / 4 .2byte (.L215 - .Lrtx200) / 4 .2byte (.L214 - .Lrtx200) / 4 .2byte (.L213 - .Lrtx200) / 4 .2byte (.L212 - .Lrtx200) / 4 .2byte (.L211 - .Lrtx200) / 4 .2byte (.L210 - .Lrtx200) / 4 .2byte (.L209 - .Lrtx200) / 4 .2byte (.L208 - .Lrtx200) / 4 .2byte (.L207 - .Lrtx200) / 4 .2byte (.L206 - .Lrtx200) / 4 .2byte (.L205 - .Lrtx200) / 4 .2byte (.L204 - .Lrtx200) / 4 .2byte (.L203 - .Lrtx200) / 4 .2byte (.L202 - .Lrtx200) / 4 .2byte (.L201 - .Lrtx200) / 4 .2byte (.L199 - .Lrtx200) / 4 .text .L256: bl page1 mov w20, w0 b .L197 .L255: bl page2 mov w20, w0 b .L197 .L254: bl page3 mov w20, w0 b .L197 .L253: bl page4 mov w20, w0 b .L197 .L252: bl page5 mov w20, w0 b .L197 .L251: bl page6 mov w20, w0 b .L197 .L250: bl page7 mov w20, w0 b .L197 .L249: bl page8 mov w20, w0 b .L197 .L248: bl page9 mov w20, w0 b .L197 .L247: bl page10 mov w20, w0 b .L197 .L246: bl page11 mov w20, w0 b .L197 .L245: bl page12 mov w20, w0 b .L197 .L244: bl page13 mov w20, w0 b .L197 .L243: bl page14 mov w20, w0 b .L197 .L242: bl page15 mov w20, w0 b .L197 .L241: bl page16 mov w20, w0 b .L197 .L240: bl page17 mov w20, w0 b .L197 .L239: bl page18 mov w20, w0 b .L197 .L238: bl page19 mov w20, w0 b .L197 .L237: bl page20 mov w20, w0 b .L197 .L236: bl page21 mov w20, w0 b .L197 .L235: bl page22 mov w20, w0 b .L197 .L234: bl page23 mov w20, w0 b .L197 .L233: bl page24 mov w20, w0 b .L197 .L232: bl page25 mov w20, w0 b .L197 .L231: bl page26 mov w20, w0 b .L197 .L229: bl page28 mov w20, w0 b .L197 .L228: bl page29 mov w20, w0 b .L197 .L227: bl page30 mov w20, w0 b .L197 .L226: bl page31 mov w20, w0 b .L197 .L225: bl page32 mov w20, w0 b .L197 .L224: bl page33 mov w20, w0 b .L197 .L223: bl page34 mov w20, w0 b .L197 .L222: bl page35 mov w20, w0 b .L197 .L221: bl page36 mov w20, w0 b .L197 .L220: bl page37 mov w20, w0 b .L197 .L219: bl page38 mov w20, w0 b .L197 .L218: bl page39 mov w20, w0 b .L197 .L217: bl page40 mov w20, w0 b .L197 .L216: bl page41 mov w20, w0 b .L197 .L215: bl page42 mov w20, w0 b .L197 .L214: bl page43 mov w20, w0 b .L197 .L213: bl page44 mov w20, w0 b .L197 .L212: bl page45 mov w20, w0 b .L197 .L211: bl page46 mov w20, w0 b .L197 .L210: bl page47 mov w20, w0 b .L197 .L209: bl page48 mov w20, w0 b .L197 .L208: bl page49 mov w20, w0 b .L197 .L207: bl page50 mov w20, w0 b .L197 .L206: bl page51 mov w20, w0 b .L197 .L205: bl page52 mov w20, w0 b .L197 .L204: bl page53 mov w20, w0 b .L197 .L203: bl page54 mov w20, w0 b .L197 .L202: bl page55 mov w20, w0 b .L197 .L201: bl page56 mov w20, w0 b .L197 .L199: bl page57 mov w20, w0 b .L197 .L258: mov w20, w19 .L197: mov w0, w20 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE87: .size next_page, .-next_page .align 2 .global main .type main, %function main: .LFB88: .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 bl instructions bl more bl character bl more adrp x19, .LANCHOR0 add x19, x19, :lo12:.LANCHOR0 b .L262 .L263: bl more .L262: ldr w0, [x19, 12] bl next_page str w0, [x19, 12] cbnz w0, .L263 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 .LFE88: .size main, .-main .global killer_count .global blast_door .global plato_clone .global read_letter .global hit_points .global action_doll .global ultra_violet .global computer_request .global page .global clone .data .align 2 .set .LANCHOR0,. + 0 .type clone, %object .size clone, 4 clone: .word 1 .type hit_points, %object .size hit_points, 4 hit_points: .word 10 .type plato_clone, %object .size plato_clone, 4 plato_clone: .word 3 .type page, %object .size page, 4 page: .word 1 .bss .align 2 .set .LANCHOR1,. + 0 .type ultra_violet, %object .size ultra_violet, 4 ultra_violet: .zero 4 .type action_doll, %object .size action_doll, 4 action_doll: .zero 4 .type killer_count, %object .size killer_count, 4 killer_count: .zero 4 .type computer_request, %object .size computer_request, 4 computer_request: .zero 4 .type read_letter, %object .size read_letter, 4 read_letter: .zero 4 .type blast_door, %object .size blast_door, 4 blast_door: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "paranoia.c" .text .align 2 .p2align 4,,11 .global get_char .type get_char, %function get_char: .LFB23: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, :got:stdout mov x29, sp ldr x0, [x0, #:got_lo12:stdout] stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x19, :got:stdin ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L2 .p2align 3,,7 .L3: ldr x0, [x19] bl getc cmp w0, 10 bne .L3 .L2: mov w0, w20 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size get_char, .-get_char .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nClone %d just died.\n" .align 3 .LC1: .string "\n*** You Lose ***\n\nAll your clones are dead. Your name has been stricken from the records.\n\n\t\t\tTHE END" .align 3 .LC2: .string "Clone %d now activated.\n" .text .align 2 .p2align 4,,11 .global new_clone .type new_clone, %function new_clone: .LFB25: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 adrp x20, .LANCHOR0 mov w19, w0 ldr w2, [x20, #:lo12:.LANCHOR0] mov w0, 1 bl __printf_chk ldr w2, [x20, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x20, #:lo12:.LANCHOR0] cmp w2, 6 ble .L11 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L11: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 str x21, [sp, 32] .cfi_offset 21, -16 bl __printf_chk add x21, x20, :lo12:.LANCHOR0 adrp x2, .LANCHOR1 add x1, x2, :lo12:.LANCHOR1 mov w0, w19 str wzr, [x2, #:lo12:.LANCHOR1] mov w2, 10 stp wzr, wzr, [x1, 4] str w2, [x21, 4] ldp x19, x20, [sp, 16] ldr x21, [sp, 32] .cfi_restore 21 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 .LFE25: .size new_clone, .-new_clone .align 2 .p2align 4,,11 .global dice_roll .type dice_roll, %function dice_roll: .LFB26: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x21, [sp, 32] cmp w0, 0 .cfi_offset 21, -16 ble .L17 stp x19, x20, [sp, 16] .cfi_offset 20, -24 .cfi_offset 19, -32 mov w19, w0 mov w20, w1 mov w21, 0 .p2align 3,,7 .L16: bl rand sdiv w2, w0, w20 subs w19, w19, #1 msub w2, w2, w20, w0 add w2, w2, 1 add w21, w21, w2 bne .L16 mov w0, w21 ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L17: .cfi_def_cfa_offset 48 .cfi_offset 21, -16 .cfi_offset 29, -48 .cfi_offset 30, -40 mov w21, 0 mov w0, w21 ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE26: .size dice_roll, .-dice_roll .section .rodata.str1.8 .align 3 .LC3: .string "\n\n\n\nWelcome to Paranoia!\n" .align 3 .LC4: .string "HOW TO PLAY:\n" .align 3 .LC5: .string " Just press <RETURN> until you are asked to make a choice." .align 3 .LC6: .string " Select 'a' or 'b' or whatever for your choice, then press <RETURN>." .align 3 .LC7: .string " You may select 'p' at any time to get a display of your statistics." .align 3 .LC8: .string " Always choose the least dangerous option. Continue doing this until you win." .align 3 .LC9: .string " At times you will use a skill or engage in combat and and will be informed of" .align 3 .LC10: .string " the outcome. These sections will be self explanatory.\n" .align 3 .LC11: .string "HOW TO DIE:\n" .align 3 .LC12: .string " As Philo-R-DMD you will die at times during the adventure." .align 3 .LC13: .string " When this happens you will be given an new clone at a particular location." .align 3 .LC14: .string " The new Philo-R will usually have to retrace some of the old Philo-R's path;" .align 3 .LC15: .string " hopefully he won't make the same mistake as his predecessor.\n" .align 3 .LC16: .string "HOW TO WIN:\n" .align 3 .LC17: .string " Simply complete the mission before you expend all six clones." .align 3 .LC18: .string " If you make it, congratulations." .align 3 .LC19: .string " If not, you can try again later." .text .align 2 .p2align 4,,11 .global instructions .type instructions, %function instructions: .LFB27: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC3 add x0, x0, :lo12:.LC3 mov x29, sp bl puts adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts adrp x0, .LC10 add x0, x0, :lo12:.LC10 bl puts adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl puts adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl puts adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts adrp x0, .LC14 add x0, x0, :lo12:.LC14 bl puts adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl puts adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl puts adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl puts adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x0, .LC19 add x0, x0, :lo12:.LC19 b puts .cfi_endproc .LFE27: .size instructions, .-instructions .section .rodata.str1.8 .align 3 .LC20: .string "===============================================================================" .align 3 .LC21: .string "The Character : Philo-R-DMD %d\n" .align 3 .LC22: .string "Primary Attributes Secondary Attributes" .align 3 .LC23: .string "Strength ..................... 13 Carrying Capacity ................. 30" .align 3 .LC24: .string "Endurance .................... 13 Damage Bonus ....................... 0" .align 3 .LC25: .string "Agility ...................... 15 Macho Bonus ....................... -1" .align 3 .LC26: .string "Manual Dexterity ............. 15 Melee Bonus ...................... +5%%\n" .align 3 .LC27: .string "Moxie ........................ 13 Aimed Weapon Bonus .............. +10%%\n" .align 3 .LC28: .string "Chutzpah ...................... 8 Comprehension Bonus .............. +4%%\n" .align 3 .LC29: .string "Mechanical Aptitude .......... 14 Believability Bonus .............. +5%%\n" .align 3 .LC30: .string "Power Index .................. 10 Repair Bonus ..................... +5%%\n" .align 3 .LC31: .string "Credits: 160 Secret Society: Illuminati Secret Society Rank: 1" .align 3 .LC32: .string "Service Group: Power Services Mutant Power: Precognition" .align 3 .LC33: .string "Weapon: laser pistol; to hit, 40%%; type, L; Range, 50m; Reload, 6r; Malfnt, 00\n" .align 3 .LC34: .string "Skills: Basics 1(20%%), Aimed Weapon Combat 2(35%%), Laser 3(40%%),\n Personal Development 1(20%%), Communications 2(29%%), Intimidation 3(34%%)\n" .align 3 .LC35: .string "Equipment: Red Reflec Armour, Laser Pistol, Laser Barrel (red)," .align 3 .LC36: .string " Notebook & Stylus, Knife, Com Unit 1, Jump suit," .align 3 .LC37: .string " Secret Illuminati Eye-In-The-Pyramid(tm) Decoder ring," .align 3 .LC38: .string " Utility Belt & Pouches" .text .align 2 .p2align 4,,11 .global character .type character, %function character: .LFB28: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -16 adrp x19, .LC20 add x19, x19, :lo12:.LC20 mov x0, x19 bl puts adrp x2, .LANCHOR0 adrp x1, .LC21 add x1, x1, :lo12:.LC21 mov w0, 1 ldr w2, [x2, #:lo12:.LANCHOR0] bl __printf_chk adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl puts mov x0, x19 bl puts adrp x0, .LC23 add x0, x0, :lo12:.LC23 bl puts adrp x0, .LC24 add x0, x0, :lo12:.LC24 bl puts adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl puts adrp x1, .LC26 mov w0, 1 add x1, x1, :lo12:.LC26 bl __printf_chk adrp x1, .LC27 mov w0, 1 add x1, x1, :lo12:.LC27 bl __printf_chk adrp x1, .LC28 mov w0, 1 add x1, x1, :lo12:.LC28 bl __printf_chk adrp x1, .LC29 mov w0, 1 add x1, x1, :lo12:.LC29 bl __printf_chk adrp x1, .LC30 add x1, x1, :lo12:.LC30 mov w0, 1 bl __printf_chk mov x0, x19 bl puts adrp x0, .LC31 add x0, x0, :lo12:.LC31 bl puts adrp x0, .LC32 add x0, x0, :lo12:.LC32 bl puts adrp x1, .LC33 mov w0, 1 add x1, x1, :lo12:.LC33 bl __printf_chk adrp x1, .LC34 add x1, x1, :lo12:.LC34 mov w0, 1 bl __printf_chk adrp x0, .LC35 add x0, x0, :lo12:.LC35 bl puts adrp x0, .LC36 add x0, x0, :lo12:.LC36 bl puts adrp x0, .LC37 add x0, x0, :lo12:.LC37 bl puts adrp x0, .LC38 add x0, x0, :lo12:.LC38 bl puts mov x0, x19 ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 b puts .cfi_endproc .LFE28: .size character, .-character .section .rodata.str1.8 .align 3 .LC39: .string "---------- More ----------" .text .align 2 .p2align 4,,11 .global more .type more, %function more: .LFB24: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov w0, 1 mov x29, sp stp x21, x22, [sp, 32] .cfi_offset 21, -32 .cfi_offset 22, -24 adrp x22, :got:stdout adrp x21, :got:stdin stp x19, x20, [sp, 16] str x23, [sp, 48] .cfi_offset 19, -48 .cfi_offset 20, -40 .cfi_offset 23, -16 adrp x23, .LC39 add x1, x23, :lo12:.LC39 bl __printf_chk ldr x0, [x22, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x21, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L25 .p2align 3,,7 .L26: ldr x0, [x19] bl getc cmp w0, 10 bne .L26 cmp w20, 112 beq .L37 .L25: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L37: .cfi_restore_state bl character add x1, x23, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x22, [x22, #:got_lo12:stdout] ldr x0, [x22] bl fflush ldr x0, [x19] bl getc and w0, w0, 255 cmp w0, 10 beq .L25 ldr x21, [x21, #:got_lo12:stdin] .p2align 3,,7 .L27: ldr x0, [x21] bl getc cmp w0, 10 bne .L27 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE24: .size more, .-more .section .rodata.str1.8 .align 3 .LC40: .string "\nSelect 'a' or 'b' :" .align 3 .LC41: .string " a - %s.\n b - %s.\n" .text .align 2 .p2align 4,,11 .global choose .type choose, %function choose: .LFB29: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x19, x1 mov w20, w0 adrp x0, .LC40 add x0, x0, :lo12:.LC40 stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 mov x21, x3 mov w22, w2 bl puts mov x3, x21 mov x2, x19 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout adrp x19, :got:stdin ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w21, w0, 255 cmp w21, 10 beq .L39 .p2align 3,,7 .L40: ldr x0, [x19] bl getc cmp w0, 10 bne .L40 mov w0, w20 cmp w21, 97 bne .L39 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L39: .cfi_restore_state mov w0, w22 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE29: .size choose, .-choose .section .rodata.str1.8 .align 3 .LC42: .string " You wake up face down on the red and pink checked E-Z-Kleen linoleum floor." .align 3 .LC43: .string " You recognise the pattern, it's the type preferred in the internal security\nbriefing cells. When you finally look around you, you see that you are alone" .align 3 .LC44: .string "in a large mission briefing room." .text .align 2 .p2align 4,,11 .global page1 .type page1, %function page1: .LFB30: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC42 add x0, x0, :lo12:.LC42 mov x29, sp bl puts adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl puts adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl puts mov w0, 57 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE30: .size page1, .-page1 .section .rodata.str1.8 .align 3 .LC45: .string "\"Greetings,\" says the kindly Internal Security self incrimination expert who" .align 3 .LC46: .string "meets you at the door, \"How are we doing today?\" He offers you a doughnut" .align 3 .LC47: .string "and coffee and asks what brings you here. This doesn't seem so bad, so you" .align 3 .LC48: .string "tell him that you have come to confess some possible security lapses. He" .align 3 .LC49: .string "smiles knowingly, deftly catching your coffee as you slump to the floor." .align 3 .LC50: .string "\"Nothing to be alarmed about; it's just the truth serum,\" he says," .align 3 .LC51: .string "dragging you back into a discussion room." .align 3 .LC52: .string "The next five hours are a dim haze, but you can recall snatches of conversation" .align 3 .LC53: .string "about your secret society, your mutant power, and your somewhat paranoid" .align 3 .LC54: .string "distrust of The Computer. This should explain why you are hogtied and moving" .align 3 .LC55: .string "slowly down the conveyer belt towards the meat processing unit in Food" .align 3 .LC56: .string "Services." .text .align 2 .p2align 4,,11 .global page2 .type page2, %function page2: .LFB31: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC45 add x0, x0, :lo12:.LC45 mov x29, sp bl puts adrp x0, .LC46 add x0, x0, :lo12:.LC46 bl puts adrp x0, .LC47 add x0, x0, :lo12:.LC47 bl puts adrp x0, .LC48 add x0, x0, :lo12:.LC48 bl puts adrp x0, .LC49 add x0, x0, :lo12:.LC49 bl puts adrp x0, .LC50 add x0, x0, :lo12:.LC50 bl puts adrp x0, .LC51 add x0, x0, :lo12:.LC51 bl puts adrp x0, .LC52 add x0, x0, :lo12:.LC52 bl puts adrp x0, .LC53 add x0, x0, :lo12:.LC53 bl puts adrp x0, .LC54 add x0, x0, :lo12:.LC54 bl puts adrp x0, .LC55 add x0, x0, :lo12:.LC55 bl puts adrp x0, .LC56 add x0, x0, :lo12:.LC56 bl puts adrp x0, .LANCHOR1+12 ldr w0, [x0, #:lo12:.LANCHOR1+12] cmp w0, 1 beq .L54 ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 32 b new_clone .p2align 2,,3 .L54: .cfi_restore_state ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 45 b new_clone .cfi_endproc .LFE31: .size page2, .-page2 .section .rodata.str1.8 .align 3 .LC57: .string "You walk to the nearest Computer terminal and request more information about" .align 3 .LC58: .string "Christmas. The Computer says, \"That is an A-1 ULTRAVIOLET ONLY IMMEDIATE" .align 3 .LC59: .string "TERMINATION classified topic. What is your clearance please, Troubleshooter?\"" .align 3 .LC60: .string "You lie and claim Ultraviolet clearance" .align 3 .LC61: .string "You give your correct clearance" .text .align 2 .p2align 4,,11 .global page3 .type page3, %function page3: .LFB32: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC57 add x0, x0, :lo12:.LC57 mov x29, sp bl puts adrp x0, .LC58 add x0, x0, :lo12:.LC58 bl puts adrp x0, .LC59 add x0, x0, :lo12:.LC59 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC60 adrp x1, .LC61 add x3, x3, :lo12:.LC60 add x1, x1, :lo12:.LC61 mov w2, 5 mov w0, 4 b choose .cfi_endproc .LFE32: .size page3, .-page3 .section .rodata.str1.8 .align 3 .LC62: .string "\"That is classified information, Troubleshooter, thank you for your inquiry." .align 3 .LC63: .string " Please report to an Internal Security self incrimination station as soon as" .align 3 .LC64: .string " possible.\"" .text .align 2 .p2align 4,,11 .global page4 .type page4, %function page4: .LFB33: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC62 add x0, x0, :lo12:.LC62 mov x29, sp bl puts adrp x0, .LC63 add x0, x0, :lo12:.LC63 bl puts adrp x0, .LC64 add x0, x0, :lo12:.LC64 bl puts mov w0, 9 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE33: .size page4, .-page4 .section .rodata.str1.8 .align 3 .LC65: .string "The computer says, \"Troubleshooter, you are not wearing the correct colour" .align 3 .LC66: .string "uniform. You must put on an Ultraviolet uniform immediately. I have seen to" .align 3 .LC67: .string "your needs and ordered one already; it will be here shortly. Please wait with" .align 3 .LC68: .string "your back to the wall until it arrives.\" In less than a minute an infrared" .align 3 .LC69: .string "arrives carrying a white bundle. He asks you to sign for it, then hands it to" .align 3 .LC70: .string "you and stands back, well outside of a fragmentation grenade's blast radius." .align 3 .LC71: .string "You finally come to your senses and run for it" .align 3 .LC72: .string "You open the package and put on the uniform" .text .align 2 .p2align 4,,11 .global page5 .type page5, %function page5: .LFB34: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC65 add x0, x0, :lo12:.LC65 mov x29, sp bl puts adrp x0, .LC66 add x0, x0, :lo12:.LC66 bl puts adrp x0, .LC67 add x0, x0, :lo12:.LC67 bl puts adrp x0, .LC68 add x0, x0, :lo12:.LC68 bl puts adrp x0, .LC69 add x0, x0, :lo12:.LC69 bl puts adrp x0, .LC70 add x0, x0, :lo12:.LC70 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w2, 7 adrp x3, .LC71 adrp x1, .LC72 add x3, x3, :lo12:.LC71 add x1, x1, :lo12:.LC72 mov w0, 6 b choose .cfi_endproc .LFE34: .size page5, .-page5 .section .rodata.str1.8 .align 3 .LC73: .string "The uniform definitely makes you look snappy and pert. It really looks" .align 3 .LC74: .string "impressive, and even has the new lopsided lapel fashion that you admire so" .align 3 .LC75: .string "much. What's more, citizens of all ranks come to obsequious attention as you" .align 3 .LC76: .string "walk past. This isn't so bad being an Ultraviolet. You could probably come" .align 3 .LC77: .string "to like it, given time." .align 3 .LC78: .string "The beeping computer terminal interrupts your musings." .text .align 2 .p2align 4,,11 .global page6 .type page6, %function page6: .LFB35: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC73 add x0, x0, :lo12:.LC73 mov x29, sp bl puts adrp x0, .LC74 add x0, x0, :lo12:.LC74 bl puts adrp x0, .LC75 add x0, x0, :lo12:.LC75 bl puts adrp x0, .LC76 add x0, x0, :lo12:.LC76 bl puts adrp x0, .LC77 add x0, x0, :lo12:.LC77 bl puts adrp x0, .LC78 add x0, x0, :lo12:.LC78 bl puts adrp x1, .LANCHOR1 mov w2, 1 mov w0, 8 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 str w2, [x1, #:lo12:.LANCHOR1] ret .cfi_endproc .LFE35: .size page6, .-page6 .section .rodata.str1.8 .align 3 .LC79: .string "The corridor lights dim and are replaced by red battle lamps as the Security" .align 3 .LC80: .string "Breach alarms howl all around you. You run headlong down the corridor and" .align 3 .LC81: .string "desperately windmill around a corner, only to collide with a squad of 12 Blue" .align 3 .LC82: .string "clearance Vulture squadron soldiers. \"Stop, Slime Face,\" shouts the" .align 3 .LC83: .string "commander, \"or there won't be enough of you left for a tissue sample.\"" .align 3 .LC84: .string "\"All right, soldiers, stuff the greasy traitor into the uniform,\" he orders," .align 3 .LC85: .string "waving the business end of his blue laser scant inches from your nose." .align 3 .LC86: .string "With his other hand he shakes open a white bundle to reveal a pristine new" .align 3 .LC87: .string "Ultraviolet citizen's uniform." .align 3 .LC88: .string "One of the Vulture squadron Troubleshooters grabs you by the neck in the" .align 3 .LC89: .string "exotic and very painful Vulture Clamp(tm) death grip (you saw a special about" .align 3 .LC90: .string "it on the Teela O'Malley show), while the rest tear off your clothes and" .align 3 .LC91: .string "force you into the Ultraviolet uniform. The moment you are dressed they step" .align 3 .LC92: .string "clear and stand at attention." .align 3 .LC93: .string "\"Thank you for your cooperation, sir,\" says the steely eyed leader of the" .align 3 .LC94: .string "Vulture Squad. \"We will be going about our business now.\" With perfect" .align 3 .LC95: .string "timing the Vultures wheel smartly and goosestep down the corridor." .align 3 .LC96: .string "Special Note: don't make the mistake of assuming that your skills have" .align 3 .LC97: .string "improved any because of the uniform; you're only a Red Troubleshooter" .align 3 .LC98: .string "traitorously posing as an Ultraviolet, and don't you forget it!" .align 3 .LC99: .string "Suddenly, a computer terminal comes to life beside you." .text .align 2 .p2align 4,,11 .global page7 .type page7, %function page7: .LFB36: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC79 add x0, x0, :lo12:.LC79 mov x29, sp bl puts adrp x0, .LC80 add x0, x0, :lo12:.LC80 bl puts adrp x0, .LC81 add x0, x0, :lo12:.LC81 bl puts adrp x0, .LC82 add x0, x0, :lo12:.LC82 bl puts adrp x0, .LC83 add x0, x0, :lo12:.LC83 bl puts adrp x0, .LC84 add x0, x0, :lo12:.LC84 bl puts adrp x0, .LC85 add x0, x0, :lo12:.LC85 bl puts adrp x0, .LC86 add x0, x0, :lo12:.LC86 bl puts adrp x0, .LC87 add x0, x0, :lo12:.LC87 bl puts adrp x0, .LC88 add x0, x0, :lo12:.LC88 bl puts adrp x0, .LC89 add x0, x0, :lo12:.LC89 bl puts adrp x0, .LC90 add x0, x0, :lo12:.LC90 bl puts adrp x0, .LC91 add x0, x0, :lo12:.LC91 bl puts adrp x0, .LC92 add x0, x0, :lo12:.LC92 bl puts adrp x0, .LC93 add x0, x0, :lo12:.LC93 bl puts adrp x0, .LC94 add x0, x0, :lo12:.LC94 bl puts adrp x0, .LC95 add x0, x0, :lo12:.LC95 bl puts adrp x0, .LC96 add x0, x0, :lo12:.LC96 bl puts adrp x0, .LC97 add x0, x0, :lo12:.LC97 bl puts adrp x0, .LC98 add x0, x0, :lo12:.LC98 bl puts adrp x0, .LC99 add x0, x0, :lo12:.LC99 bl puts adrp x1, .LANCHOR1 mov w2, 1 mov w0, 8 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 str w2, [x1, #:lo12:.LANCHOR1] ret .cfi_endproc .LFE36: .size page7, .-page7 .section .rodata.str1.8 .align 3 .LC100: .string "\"Now, about your question, citizen. Christmas was an old world marketing ploy" .align 3 .LC101: .string "to induce lower clearance citizens to purchase vast quantities of goods, thus" .align 3 .LC102: .string "accumulation a large amount of credit under the control of a single class of" .align 3 .LC103: .string "citizen known as Retailers. The strategy used is to imply that all good" .align 3 .LC104: .string "citizens give gifts during Christmas, thus if one wishes to be a valuable" .align 3 .LC105: .string "member of society one must also give gifts during Christmas. More valuable" .align 3 .LC106: .string "gifts make one a more valuable member, and thus did the Retailers come to" .align 3 .LC107: .string "control a disproportionate amount of the currency. In this way Christmas" .align 3 .LC108: .string "eventually caused the collapse of the old world. Understandably, Christmas" .align 3 .LC109: .string "has been declared a treasonable practice in Alpha Complex." .align 3 .LC110: .string "Thank you for your inquiry.\"" .align 3 .LC111: .string "You continue on your way to GDH7-beta." .text .align 2 .p2align 4,,11 .global page8 .type page8, %function page8: .LFB37: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC100 add x0, x0, :lo12:.LC100 mov x29, sp bl puts adrp x0, .LC101 add x0, x0, :lo12:.LC101 bl puts adrp x0, .LC102 add x0, x0, :lo12:.LC102 bl puts adrp x0, .LC103 add x0, x0, :lo12:.LC103 bl puts adrp x0, .LC104 add x0, x0, :lo12:.LC104 bl puts adrp x0, .LC105 add x0, x0, :lo12:.LC105 bl puts adrp x0, .LC106 add x0, x0, :lo12:.LC106 bl puts adrp x0, .LC107 add x0, x0, :lo12:.LC107 bl puts adrp x0, .LC108 add x0, x0, :lo12:.LC108 bl puts adrp x0, .LC109 add x0, x0, :lo12:.LC109 bl puts adrp x0, .LC110 add x0, x0, :lo12:.LC110 bl puts adrp x0, .LC111 add x0, x0, :lo12:.LC111 bl puts mov w0, 10 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE37: .size page8, .-page8 .section .rodata.str1.8 .align 3 .LC112: .string "As you walk toward the tubecar that will take you to GDH7-beta, you pass one" .align 3 .LC113: .string "of the bright blue and orange Internal Security self incrimination stations." .align 3 .LC114: .string "Inside, you can see an IS agent cheerfully greet an infrared citizen and then" .align 3 .LC115: .string "lead him at gunpoint into one of the rubber lined discussion rooms." .align 3 .LC116: .string "You just continue blithely on past" .align 3 .LC117: .string "You decide to stop here and chat, as ordered by The Computer" .text .align 2 .p2align 4,,11 .global page9 .type page9, %function page9: .LFB38: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC112 add x0, x0, :lo12:.LC112 mov x29, sp bl puts adrp x0, .LC113 add x0, x0, :lo12:.LC113 bl puts adrp x0, .LC114 add x0, x0, :lo12:.LC114 bl puts adrp x0, .LC115 add x0, x0, :lo12:.LC115 bl puts mov w2, 10 adrp x3, .LC116 adrp x1, .LC117 add x3, x3, :lo12:.LC116 add x1, x1, :lo12:.LC117 mov w0, 2 bl choose cmp w0, 2 adrp x1, .LANCHOR1+12 cset w2, eq ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 str w2, [x1, #:lo12:.LANCHOR1+12] ret .cfi_endproc .LFE38: .size page9, .-page9 .section .rodata.str1.8 .align 3 .LC118: .string "You stroll briskly down the corridor, up a ladder, across an unrailed catwalk," .align 3 .LC119: .string "under a perilously swinging blast door in urgent need of repair, and into" .align 3 .LC120: .string "tubecar grand central. This is the bustling hub of Alpha Complex tubecar" .align 3 .LC121: .string "transportation. Before you spreads a spaghetti maze of magnalift tube tracks" .align 3 .LC122: .string "and linear accelerators. You bravely study the specially enhanced 3-D tube" .align 3 .LC123: .string "route map; you wouldn't be the first Troubleshooter to take a fast tube ride" .align 3 .LC124: .string "to nowhere." .align 3 .LC125: .string "You nervously select a tubecar and step aboard." .align 3 .LC126: .string "You think you have the route worked out, so you'll board a tube train" .align 3 .LC127: .string "You decide to ask The Computer about Christmas using a nearby terminal" .align 3 .LC128: .string "You just caught a purple line tubecar." .align 3 .LC129: .string "You just caught a brown line tubecar." .text .align 2 .p2align 4,,11 .global page10 .type page10, %function page10: .LFB39: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC118 add x0, x0, :lo12:.LC118 mov x29, sp bl puts adrp x0, .LC119 add x0, x0, :lo12:.LC119 bl puts adrp x0, .LC120 add x0, x0, :lo12:.LC120 bl puts adrp x0, .LC121 add x0, x0, :lo12:.LC121 bl puts adrp x0, .LC122 add x0, x0, :lo12:.LC122 bl puts adrp x0, .LC123 add x0, x0, :lo12:.LC123 bl puts adrp x0, .LC124 add x0, x0, :lo12:.LC124 bl puts adrp x0, .LANCHOR1 ldr w0, [x0, #:lo12:.LANCHOR1] cbnz w0, .L74 adrp x3, .LC126 adrp x1, .LC127 add x3, x3, :lo12:.LC126 add x1, x1, :lo12:.LC127 mov w2, 10 mov w0, 3 bl choose cmp w0, 3 beq .L69 .L74: adrp x0, .LC125 add x0, x0, :lo12:.LC125 str x19, [sp, 16] .cfi_offset 19, -16 bl puts bl rand mov w19, w0 bl rand mov w2, 26215 movk w2, 0x6666, lsl 16 smull x1, w19, w2 smull x2, w0, w2 asr x1, x1, 34 asr x2, x2, 34 sub w1, w1, w19, asr 31 sub w2, w2, w0, asr 31 add w1, w1, w1, lsl 2 add w2, w2, w2, lsl 2 sub w1, w19, w1, lsl 1 sub w2, w0, w2, lsl 1 add w0, w1, w2 add w0, w0, 2 cmp w0, 12 bgt .L80 adrp x0, .LC128 add x0, x0, :lo12:.LC128 bl puts ldr x19, [sp, 16] .cfi_restore 19 mov w0, 13 .L69: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L80: .cfi_def_cfa_offset 32 .cfi_offset 19, -16 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC129 add x0, x0, :lo12:.LC129 bl puts mov w0, 48 ldr x19, [sp, 16] .cfi_restore 19 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE39: .size page10, .-page10 .section .rodata.str1.8 .align 3 .LC130: .string "The printing on the folder says \"Experimental Self Briefing.\"" .align 3 .LC131: .string "You open it and begin to read the following:" .align 3 .LC132: .string "Step 1: Compel the briefing subject to attend the briefing." .align 3 .LC133: .string " Note: See Experimental Briefing Sub Form Indigo-WY-2," .align 3 .LC134: .string " 'Experimental Self Briefing Subject Acquisition Through The Use Of" .align 3 .LC135: .string " Neurotoxin Room Foggers.'" .align 3 .LC136: .string "Step 2: Inform the briefing subject that the briefing has begun." .align 3 .LC137: .string " ATTENTION: THE BRIEFING HAS BEGUN." .align 3 .LC138: .string "Step 3: Present the briefing material to the briefing subject." .align 3 .LC139: .string " GREETINGS TROUBLESHOOTER." .align 3 .LC140: .string " YOU HAVE BEEN SPECIALLY SELECTED TO SINGLEHANDEDLY" .align 3 .LC141: .string " WIPE OUT A DEN OF TRAITOROUS CHRISTMAS ACTIVITY. YOUR MISSION IS TO" .align 3 .LC142: .string " GO TO GOODS DISTRIBUTION HALL 7-BETA AND ASSESS ANY CHRISTMAS ACTIVITY" .align 3 .LC143: .string " YOU FIND THERE. YOU ARE TO INFILTRATE THESE CHRISTMAS CELEBRANTS," .align 3 .LC144: .string " LOCATE THEIR RINGLEADER, AN UNKNOWN MASTER RETAILER, AND BRING HIM" .align 3 .LC145: .string " BACK FOR EXECUTION AND TRIAL. THANK YOU. THE COMPUTER IS YOUR FRIEND." .align 3 .LC146: .string "Step 4: Sign the briefing subject's briefing release form to indicate that" .align 3 .LC147: .string " the briefing subject has completed the briefing." .align 3 .LC148: .string " ATTENTION: PLEASE SIGN YOUR BRIEFING RELEASE FORM." .align 3 .LC149: .string "Step 5: Terminate the briefing" .align 3 .LC150: .string " ATTENTION: THE BRIEFING IS TERMINATED." .align 3 .LC151: .string "You walk to the door and hold your signed briefing release form up to the" .align 3 .LC152: .string "plexiglass window. A guard scrutinises it for a moment and then slides back" .align 3 .LC153: .string "the megabolts holding the door shut. You are now free to continue the" .align 3 .LC154: .string "mission." .align 3 .LC155: .string "You have decided to go directly to Goods Distribution Hall 7-beta" .align 3 .LC156: .string "You wish to ask The Computer for more information about Christmas" .text .align 2 .p2align 4,,11 .global page11 .type page11, %function page11: .LFB40: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC130 add x0, x0, :lo12:.LC130 mov x29, sp bl puts adrp x0, .LC131 add x0, x0, :lo12:.LC131 bl puts adrp x0, .LC132 add x0, x0, :lo12:.LC132 bl puts adrp x0, .LC133 add x0, x0, :lo12:.LC133 bl puts adrp x0, .LC134 add x0, x0, :lo12:.LC134 bl puts adrp x0, .LC135 add x0, x0, :lo12:.LC135 bl puts adrp x0, .LC136 add x0, x0, :lo12:.LC136 bl puts adrp x0, .LC137 add x0, x0, :lo12:.LC137 bl puts adrp x0, .LC138 add x0, x0, :lo12:.LC138 bl puts adrp x0, .LC139 add x0, x0, :lo12:.LC139 bl puts adrp x0, .LC140 add x0, x0, :lo12:.LC140 bl puts adrp x0, .LC141 add x0, x0, :lo12:.LC141 bl puts adrp x0, .LC142 add x0, x0, :lo12:.LC142 bl puts adrp x0, .LC143 add x0, x0, :lo12:.LC143 bl puts adrp x0, .LC144 add x0, x0, :lo12:.LC144 bl puts adrp x0, .LC145 add x0, x0, :lo12:.LC145 bl puts adrp x0, .LC146 add x0, x0, :lo12:.LC146 bl puts adrp x0, .LC147 add x0, x0, :lo12:.LC147 bl puts adrp x0, .LC148 add x0, x0, :lo12:.LC148 bl puts adrp x0, .LC149 add x0, x0, :lo12:.LC149 bl puts adrp x0, .LC150 add x0, x0, :lo12:.LC150 bl puts bl more adrp x0, .LC151 add x0, x0, :lo12:.LC151 bl puts adrp x0, .LC152 add x0, x0, :lo12:.LC152 bl puts adrp x0, .LC153 add x0, x0, :lo12:.LC153 bl puts adrp x0, .LC154 add x0, x0, :lo12:.LC154 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC155 adrp x1, .LC156 add x3, x3, :lo12:.LC155 add x1, x1, :lo12:.LC156 mov w2, 10 mov w0, 3 b choose .cfi_endproc .LFE40: .size page11, .-page11 .section .rodata.str1.8 .align 3 .LC157: .string "You walk up to the door and push the button labelled \"push to exit.\"" .align 3 .LC158: .string "Within seconds a surly looking guard shoves his face into the small plexiglass" .align 3 .LC159: .string "window. You can see his mouth forming words but you can't hear any of them." .align 3 .LC160: .string "You just stare at him blankly for a few moments until he points down to a" .align 3 .LC161: .string "speaker on your side of the door. When you put your ear to it you can barely" .align 3 .LC162: .string "hear him say, \"Let's see your briefing release form, bud. You aren't" .align 3 .LC163: .string "getting out of here without it.\"" .align 3 .LC164: .string "You stare around the room some more" .align 3 .LC165: .string "You sit down at the table and read the Orange packet" .text .align 2 .p2align 4,,11 .global page12 .type page12, %function page12: .LFB41: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC157 add x0, x0, :lo12:.LC157 mov x29, sp bl puts adrp x0, .LC158 add x0, x0, :lo12:.LC158 bl puts adrp x0, .LC159 add x0, x0, :lo12:.LC159 bl puts adrp x0, .LC160 add x0, x0, :lo12:.LC160 bl puts adrp x0, .LC161 add x0, x0, :lo12:.LC161 bl puts adrp x0, .LC162 add x0, x0, :lo12:.LC162 bl puts adrp x0, .LC163 add x0, x0, :lo12:.LC163 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC164 adrp x1, .LC165 add x3, x3, :lo12:.LC164 add x1, x1, :lo12:.LC165 mov w2, 57 mov w0, 11 b choose .cfi_endproc .LFE41: .size page12, .-page12 .section .rodata.str1.8 .align 3 .LC166: .string "You step into the shiny plasteel tubecar, wondering why the shape has always" .align 3 .LC167: .string "reminded you of bullets. The car shoots forward the instant your feet touch" .align 3 .LC168: .string "the slippery gray floor, pinning you immobile against the back wall as the" .align 3 .LC169: .string "tubecar careens toward GDH7-beta. Your only solace is the knowledge that it" .align 3 .LC170: .string "could be worse, much worse." .align 3 .LC171: .string "Before too long the car comes to a stop. You can see signs for GDH7-beta" .align 3 .LC172: .string "through the window. With a little practice you discover that you can crawl" .align 3 .LC173: .string "to the door and pull open the latch." .text .align 2 .p2align 4,,11 .global page13 .type page13, %function page13: .LFB42: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC166 add x0, x0, :lo12:.LC166 mov x29, sp bl puts adrp x0, .LC167 add x0, x0, :lo12:.LC167 bl puts adrp x0, .LC168 add x0, x0, :lo12:.LC168 bl puts adrp x0, .LC169 add x0, x0, :lo12:.LC169 bl puts adrp x0, .LC170 add x0, x0, :lo12:.LC170 bl puts adrp x0, .LC171 add x0, x0, :lo12:.LC171 bl puts adrp x0, .LC172 add x0, x0, :lo12:.LC172 bl puts adrp x0, .LC173 add x0, x0, :lo12:.LC173 bl puts mov w0, 14 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE42: .size page13, .-page13 .section .rodata.str1.8 .align 3 .LC174: .string "You manage to pull yourself out of the tubecar and look around. Before you is" .align 3 .LC175: .string "one of the most confusing things you have ever seen, a hallway that is" .align 3 .LC176: .string "simultaneously both red and green clearance. If this is the result of" .align 3 .LC177: .string "Christmas then it's easy to see the evils inherent in its practice." .align 3 .LC178: .string "You are in the heart of a large goods distribution centre. You can see all" .align 3 .LC179: .string "about you evidence of traitorous secret society Christmas celebration; rubber" .align 3 .LC180: .string "faced robots whiz back and forth selling toys to holiday shoppers, simul-plast" .align 3 .LC181: .string "wreaths hang from every light fixture, while ahead in the shadows is a citizen" .align 3 .LC182: .string "wearing a huge red synthetic flower." .text .align 2 .p2align 4,,11 .global page14 .type page14, %function page14: .LFB43: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC174 add x0, x0, :lo12:.LC174 mov x29, sp bl puts adrp x0, .LC175 add x0, x0, :lo12:.LC175 bl puts adrp x0, .LC176 add x0, x0, :lo12:.LC176 bl puts adrp x0, .LC177 add x0, x0, :lo12:.LC177 bl puts adrp x0, .LC178 add x0, x0, :lo12:.LC178 bl puts adrp x0, .LC179 add x0, x0, :lo12:.LC179 bl puts adrp x0, .LC180 add x0, x0, :lo12:.LC180 bl puts adrp x0, .LC181 add x0, x0, :lo12:.LC181 bl puts adrp x0, .LC182 add x0, x0, :lo12:.LC182 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE43: .size page14, .-page14 .section .rodata.str1.8 .align 3 .LC183: .string "You are set upon by a runty robot with a queer looking face and two pointy" .align 3 .LC184: .string "rubber ears poking from beneath a tattered cap. \"Hey mister,\" it says," .align 3 .LC185: .string "\"you done all your last minute Christmas shopping? I got some real neat junk" .align 3 .LC186: .string "here. You don't wanna miss the big day tommorrow, if you know what I mean.\"" .align 3 .LC187: .string "The robot opens its bag to show you a pile of shoddy Troubleshooter dolls. It" .align 3 .LC188: .string "reaches in and pulls out one of them. \"Look, these Action Troubleshooter(tm)" .align 3 .LC189: .string "dolls are the neatest thing. This one's got moveable arms and when you" .align 3 .LC190: .string "squeeze him, his little rifle squirts realistic looking napalm. It's only" .align 3 .LC191: .string "50 credits. Oh yeah, Merry Christmas.\"" .align 3 .LC192: .string "\nSelect 'a', 'b' or 'c' :" .align 3 .LC193: .string " a - You decide to buy the doll." .align 3 .LC194: .string " b - You shoot the robot." .align 3 .LC195: .string " c - You ignore the robot and keep searching the hall." .text .align 2 .p2align 4,,11 .global page15 .type page15, %function page15: .LFB44: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC183 add x0, x0, :lo12:.LC183 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC184 add x0, x0, :lo12:.LC184 bl puts adrp x0, .LC185 add x0, x0, :lo12:.LC185 bl puts adrp x19, :got:stdin adrp x0, .LC186 add x0, x0, :lo12:.LC186 bl puts adrp x0, .LC187 add x0, x0, :lo12:.LC187 bl puts adrp x0, .LC188 add x0, x0, :lo12:.LC188 bl puts adrp x0, .LC189 add x0, x0, :lo12:.LC189 bl puts adrp x0, .LC190 add x0, x0, :lo12:.LC190 bl puts adrp x0, .LC191 add x0, x0, :lo12:.LC191 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC193 add x0, x0, :lo12:.LC193 bl puts adrp x0, .LC194 add x0, x0, :lo12:.LC194 bl puts adrp x0, .LC195 add x0, x0, :lo12:.LC195 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 mov w0, 22 cmp w20, 10 beq .L89 .p2align 3,,7 .L91: ldr x0, [x19] bl getc cmp w0, 10 bne .L91 mov w0, 16 cmp w20, 97 bne .L99 .L89: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L99: .cfi_restore_state cmp w20, 98 mov w1, 17 mov w0, 22 csel w0, w0, w1, ne ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE44: .size page15, .-page15 .section .rodata.str1.8 .align 3 .LC196: .string "The doll is a good buy for fifty credits; it will make a fine Christmas present" .align 3 .LC197: .string "for one of your friends. After the sale the robot rolls away. You can use" .align 3 .LC198: .string "the doll later in combat. It works just like a cone rifle firing napalm," .align 3 .LC199: .string "except that occasionally it will explode and blow the user to smithereens." .align 3 .LC200: .string "But don't let that stop you." .text .align 2 .p2align 4,,11 .global page16 .type page16, %function page16: .LFB45: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC196 add x0, x0, :lo12:.LC196 mov x29, sp bl puts adrp x0, .LC197 add x0, x0, :lo12:.LC197 bl puts adrp x0, .LC198 add x0, x0, :lo12:.LC198 bl puts adrp x0, .LC199 add x0, x0, :lo12:.LC199 bl puts adrp x0, .LC200 add x0, x0, :lo12:.LC200 bl puts adrp x1, .LANCHOR1+4 mov w2, 1 mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 str w2, [x1, #:lo12:.LANCHOR1+4] ret .cfi_endproc .LFE45: .size page16, .-page16 .section .rodata.str1.8 .align 3 .LC201: .string "You whip out your laser and shoot the robot, but not before it squeezes the" .align 3 .LC202: .string "toy at you. The squeeze toy has the same effect as a cone rifle firing napalm," .align 3 .LC203: .string "and the elfbot's armour has no effect against your laser." .align 3 .LC204: .string "You have been hit!" .align 3 .LC205: .string "It missed you, but not by much!" .align 3 .LC206: .string "You zapped the little bastard!" .align 3 .LC207: .string "You wasted it! Good shooting!" .align 3 .LC208: .string "You will need more evidence, so you search GDH7-beta further" .align 3 .LC209: .string "after the GDH medbot has patched you up." .align 3 .LC210: .string "Damn! You missed!" .align 3 .LC211: .string "It tried to fire again, but the toy exploded and demolished it." .text .align 2 .p2align 4,,11 .global page17 .type page17, %function page17: .LFB46: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 adrp x0, .LC201 add x0, x0, :lo12:.LC201 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -64 .cfi_offset 20, -56 adrp x20, .LC204 add x20, x20, :lo12:.LC204 stp x21, x22, [sp, 32] .cfi_offset 21, -48 .cfi_offset 22, -40 mov w21, 34079 adrp x22, .LC205 add x22, x22, :lo12:.LC205 adrp x19, .LANCHOR0 movk w21, 0x51eb, lsl 16 stp x23, x24, [sp, 48] .cfi_offset 23, -32 .cfi_offset 24, -24 bl puts mov w24, 2 mov w23, 15 adrp x0, .LC202 add x0, x0, :lo12:.LC202 bl puts adrp x0, .LC203 add x0, x0, :lo12:.LC203 bl puts .L103: bl rand mov w2, w0 mov w3, 100 mov x0, x20 smull x1, w2, w21 asr x1, x1, 37 sub w1, w1, w2, asr 31 msub w1, w1, w3, w2 cmp w1, 24 bgt .L119 bl puts bl rand mov w1, 26215 add x3, x19, :lo12:.LANCHOR0 movk w1, 0x6666, lsl 16 smull x1, w0, w1 ldr w2, [x3, 4] asr x1, x1, 34 sub w1, w1, w0, asr 31 add w1, w1, w1, lsl 2 sub w0, w0, w1, lsl 1 add w0, w0, 1 sub w0, w2, w0 str w0, [x3, 4] cmp w0, 0 ble .L120 .L104: bl rand mov w2, w0 mov w3, 100 adrp x0, .LC206 adrp x4, .LC210 add x0, x0, :lo12:.LC206 smull x1, w2, w21 asr x1, x1, 37 sub w1, w1, w2, asr 31 msub w1, w1, w3, w2 cmp w1, 39 bgt .L105 str x25, [sp, 64] .cfi_offset 25, -16 bl puts bl rand mov w25, w0 bl rand mov w1, 26215 movk w1, 0x6666, lsl 16 smull x2, w25, w1 smull x1, w0, w1 asr x2, x2, 34 asr x1, x1, 34 sub w2, w2, w25, asr 31 sub w1, w1, w0, asr 31 add w2, w2, w2, lsl 2 add w1, w1, w1, lsl 2 sub w2, w25, w2, lsl 1 sub w0, w0, w1, lsl 1 add w0, w0, w2 add w0, w0, 2 sub w23, w23, w0 cmp w23, 0 ble .L121 ldr x25, [sp, 64] .cfi_restore 25 .L106: cmp w24, 1 beq .L110 mov w24, 1 b .L103 .p2align 2,,3 .L119: mov x0, x22 bl puts b .L104 .p2align 2,,3 .L110: adrp x0, .LC211 add x0, x0, :lo12:.LC211 bl puts adrp x0, .LC208 add x0, x0, :lo12:.LC208 bl puts add x0, x19, :lo12:.LANCHOR0 ldr w0, [x0, 4] cmp w0, 9 ble .L107 .L108: add x19, x19, :lo12:.LANCHOR0 mov w0, 10 ldp x21, x22, [sp, 32] str w0, [x19, 4] mov w0, 22 ldp x19, x20, [sp, 16] ldp x23, x24, [sp, 48] ldp x29, x30, [sp], 80 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L105: .cfi_restore_state add x0, x4, :lo12:.LC210 bl puts b .L106 .L121: .cfi_offset 25, -16 adrp x0, .LC207 add x0, x0, :lo12:.LC207 bl puts adrp x0, .LC208 add x0, x0, :lo12:.LC208 bl puts add x0, x19, :lo12:.LANCHOR0 ldr x25, [sp, 64] .cfi_restore 25 ldr w0, [x0, 4] cmp w0, 9 bgt .L108 .p2align 3,,7 .L107: adrp x0, .LC209 add x0, x0, :lo12:.LC209 bl puts b .L108 .L120: ldp x19, x20, [sp, 16] mov w0, 45 ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b new_clone .cfi_endproc .LFE46: .size page17, .-page17 .section .rodata.str1.8 .align 3 .LC212: .string "You walk to the centre of the hall, ogling like an infrared fresh from the" .align 3 .LC213: .string "clone vats. Towering before you is the most unearthly thing you have ever" .align 3 .LC214: .string "seen, a green multi armed mutant horror hulking 15 feet above your head." .align 3 .LC215: .string "Its skeletal body is draped with hundreds of metallic strips (probably to" .align 3 .LC216: .string "negate the effects of some insidious mutant power), and the entire hideous" .align 3 .LC217: .string "creature is wrapped in a thousand blinking hazard lights. It's times like" .align 3 .LC218: .string "this when you wish you'd had some training for this job. Luckily the" .align 3 .LC219: .string "creature doesn't take notice of you but stands unmoving, as though waiting for" .align 3 .LC220: .string "a summons from its dark lord, the Master Retailer." .align 3 .LC221: .string "WHAM, suddenly you are struck from behind." .text .align 2 .p2align 4,,11 .global page18 .type page18, %function page18: .LFB47: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC212 add x0, x0, :lo12:.LC212 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -16 bl puts adrp x0, .LC213 add x0, x0, :lo12:.LC213 bl puts adrp x0, .LC214 add x0, x0, :lo12:.LC214 bl puts adrp x0, .LC215 add x0, x0, :lo12:.LC215 bl puts adrp x0, .LC216 add x0, x0, :lo12:.LC216 bl puts adrp x0, .LC217 add x0, x0, :lo12:.LC217 bl puts adrp x0, .LC218 add x0, x0, :lo12:.LC218 bl puts adrp x0, .LC219 add x0, x0, :lo12:.LC219 bl puts adrp x0, .LC220 add x0, x0, :lo12:.LC220 bl puts adrp x0, .LC221 add x0, x0, :lo12:.LC221 bl puts bl rand mov w19, w0 bl rand mov w2, 26215 movk w2, 0x6666, lsl 16 smull x1, w19, w2 smull x2, w0, w2 asr x1, x1, 34 asr x2, x2, 34 sub w1, w1, w19, asr 31 sub w2, w2, w0, asr 31 add w1, w1, w1, lsl 2 add w2, w2, w2, lsl 2 sub w1, w19, w1, lsl 1 sub w2, w0, w2, lsl 1 add w0, w1, w2 add w0, w0, 2 cmp w0, 14 cset w0, gt add w0, w0, 19 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 .LFE47: .size page18, .-page18 .section .rodata.str1.8 .align 3 .LC222: .string "Quickly you regain your balance, whirl and fire your laser into the Ultraviolet" .align 3 .LC223: .string "citizen behind you. For a moment your heart leaps to your throat, then you" .align 3 .LC224: .string "realise that he is indeed dead and you will be the only one filing a report on" .align 3 .LC225: .string "this incident. Besides, he was participating in this traitorous Christmas" .align 3 .LC226: .string "shopping, as is evident from the rain of shoddy toys falling all around you." .align 3 .LC227: .string "Another valorous deed done in the service of The Computer!" .align 3 .LC228: .string "You run away like the cowardly dog you are" .align 3 .LC229: .string "You search the body, keeping an eye open for Internal Security" .text .align 2 .p2align 4,,11 .global page19 .type page19, %function page19: .LFB48: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC222 add x0, x0, :lo12:.LC222 mov x29, sp bl puts adrp x0, .LC223 add x0, x0, :lo12:.LC223 bl puts adrp x0, .LC224 add x0, x0, :lo12:.LC224 bl puts adrp x0, .LC225 add x0, x0, :lo12:.LC225 bl puts adrp x0, .LC226 add x0, x0, :lo12:.LC226 bl puts adrp x0, .LC227 add x0, x0, :lo12:.LC227 bl puts adrp x0, .LANCHOR1 add x0, x0, :lo12:.LANCHOR1 adrp x1, .LANCHOR0 mov w2, 7 ldr w3, [x1, #:lo12:.LANCHOR0] ldr w1, [x0, 8] sub w2, w2, w3 add w1, w1, 1 str w1, [x0, 8] cmp w1, w2 bgt .L128 ldr w0, [x0, 16] cmp w0, 1 beq .L129 ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC228 adrp x1, .LC229 add x3, x3, :lo12:.LC228 add x1, x1, :lo12:.LC229 mov w2, 22 mov w0, 34 b choose .p2align 2,,3 .L128: .cfi_restore_state mov w0, 21 ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L129: .cfi_restore_state mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE48: .size page19, .-page19 .section .rodata.str1.8 .align 3 .LC230: .string "Oh no! you can't keep your balance. You're falling, falling head first into" .align 3 .LC231: .string "the Christmas beast's gaping maw. It's a valiant struggle; you think you are" .align 3 .LC232: .string "gone when its poisonous needles dig into your flesh, but with a heroic effort" .align 3 .LC233: .string "you jerk a string of lights free and jam the live wires into the creature's" .align 3 .LC234: .string "spine. The Christmas beast topples to the ground and begins to burn, filling" .align 3 .LC235: .string "the area with a thick acrid smoke. It takes only a moment to compose yourself," .align 3 .LC236: .string "and then you are ready to continue your search for the Master Retailer." .text .align 2 .p2align 4,,11 .global page20 .type page20, %function page20: .LFB49: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC230 add x0, x0, :lo12:.LC230 mov x29, sp bl puts adrp x0, .LC231 add x0, x0, :lo12:.LC231 bl puts adrp x0, .LC232 add x0, x0, :lo12:.LC232 bl puts adrp x0, .LC233 add x0, x0, :lo12:.LC233 bl puts adrp x0, .LC234 add x0, x0, :lo12:.LC234 bl puts adrp x0, .LC235 add x0, x0, :lo12:.LC235 bl puts adrp x0, .LC236 add x0, x0, :lo12:.LC236 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE49: .size page20, .-page20 .section .rodata.str1.8 .align 3 .LC237: .string "You have been wasting the leading citizens of Alpha Complex at a prodigious" .align 3 .LC238: .string "rate. This has not gone unnoticed by the Internal Security squad at GDH7-beta." .align 3 .LC239: .string "Suddenly, a net of laser beams spear out of the gloomy corners of the hall," .align 3 .LC240: .string "chopping you into teeny, weeny bite size pieces." .text .align 2 .p2align 4,,11 .global page21 .type page21, %function page21: .LFB50: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC237 add x0, x0, :lo12:.LC237 mov x29, sp bl puts adrp x0, .LC238 add x0, x0, :lo12:.LC238 bl puts adrp x0, .LC239 add x0, x0, :lo12:.LC239 bl puts adrp x0, .LC240 add x0, x0, :lo12:.LC240 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 45 b new_clone .cfi_endproc .LFE50: .size page21, .-page21 .section .rodata.str1.8 .align 3 .LC241: .string "You are searching Goods Distribution Hall 7-beta." .text .align 2 .p2align 4,,11 .global page22 .type page22, %function page22: .LFB51: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC241 add x0, x0, :lo12:.LC241 mov x29, sp bl puts bl rand negs w1, w0 and w1, w1, 3 and w0, w0, 3 csneg w0, w0, w1, mi cmp w0, 3 bhi .L135 adrp x1, .LANCHOR2 add x1, x1, :lo12:.LANCHOR2 ldr w0, [x1, w0, uxtw 2] .L135: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE51: .size page22, .-page22 .section .rodata.str1.8 .align 3 .LC242: .string "You go to the nearest computer terminal and declare yourself a mutant." .align 3 .LC243: .string "\"A mutant, he's a mutant,\" yells a previously unnoticed infrared who had" .align 3 .LC244: .string "been looking over your shoulder. You easily gun him down, but not before a" .align 3 .LC245: .string "dozen more citizens take notice and aim their weapons at you." .align 3 .LC246: .string "You want to fight it out, one against twelve" .align 3 .LC247: .string "You tell them that it was really only a bad joke" .text .align 2 .p2align 4,,11 .global page23 .type page23, %function page23: .LFB52: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC242 add x0, x0, :lo12:.LC242 mov x29, sp bl puts adrp x0, .LC243 add x0, x0, :lo12:.LC243 bl puts adrp x0, .LC244 add x0, x0, :lo12:.LC244 bl puts adrp x0, .LC245 add x0, x0, :lo12:.LC245 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w2, 24 adrp x3, .LC246 adrp x1, .LC247 add x3, x3, :lo12:.LC246 add x1, x1, :lo12:.LC247 mov w0, 28 b choose .cfi_endproc .LFE52: .size page23, .-page23 .section .rodata.str1.8 .align 3 .LC248: .string "Golly, I never expected someone to pick this. I haven't even designed" .align 3 .LC249: .string "the 12 citizens who are going to make a sponge out of you. Tell you what," .align 3 .LC250: .string "I'll give you a second chance." .align 3 .LC251: .string "You REALLY want to shoot it out" .align 3 .LC252: .string "You change your mind and say it was only a bad joke" .text .align 2 .p2align 4,,11 .global page24 .type page24, %function page24: .LFB53: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC248 add x0, x0, :lo12:.LC248 mov x29, sp bl puts adrp x0, .LC249 add x0, x0, :lo12:.LC249 bl puts adrp x0, .LC250 add x0, x0, :lo12:.LC250 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC251 adrp x1, .LC252 add x3, x3, :lo12:.LC251 add x1, x1, :lo12:.LC252 mov w2, 25 mov w0, 28 b choose .cfi_endproc .LFE53: .size page24, .-page24 .section .rodata.str1.8 .align 3 .LC253: .string "Boy, you really can't take a hint!" .align 3 .LC254: .string "They're closing in. Their trigger fingers are twitching, they're about to" .align 3 .LC255: .string "shoot. This is your last chance." .align 3 .LC256: .string "You are going to shoot" .align 3 .LC257: .string "You tell them it was all just a bad joke" .text .align 2 .p2align 4,,11 .global page25 .type page25, %function page25: .LFB54: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC253 add x0, x0, :lo12:.LC253 mov x29, sp bl puts adrp x0, .LC254 add x0, x0, :lo12:.LC254 bl puts adrp x0, .LC255 add x0, x0, :lo12:.LC255 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC256 adrp x1, .LC257 add x3, x3, :lo12:.LC256 add x1, x1, :lo12:.LC257 mov w2, 26 mov w0, 28 b choose .cfi_endproc .LFE54: .size page25, .-page25 .section .rodata.str1.8 .align 3 .LC258: .string "You can read the cold, sober hatred in their eyes (They really didn't think" .align 3 .LC259: .string "it was funny), as they tighten the circle around you. One of them shoves a" .align 3 .LC260: .string "blaster up your nose, but that doesn't hurt as much as the multi-gigawatt" .align 3 .LC261: .string "carbonium tipped food drill in the small of your back." .align 3 .LC262: .string "You spend the remaining micro-seconds of your life wondering what you did wrong" .text .align 2 .p2align 4,,11 .global page26 .type page26, %function page26: .LFB55: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC258 add x0, x0, :lo12:.LC258 mov x29, sp bl puts adrp x0, .LC259 add x0, x0, :lo12:.LC259 bl puts adrp x0, .LC260 add x0, x0, :lo12:.LC260 bl puts adrp x0, .LC261 add x0, x0, :lo12:.LC261 bl puts adrp x0, .LC262 add x0, x0, :lo12:.LC262 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 32 b new_clone .cfi_endproc .LFE55: .size page26, .-page26 .align 2 .p2align 4,,11 .global page27 .type page27, %function page27: .LFB56: .cfi_startproc ret .cfi_endproc .LFE56: .size page27, .-page27 .section .rodata.str1.8 .align 3 .LC263: .string "They don't think it's funny." .text .align 2 .p2align 4,,11 .global page28 .type page28, %function page28: .LFB57: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC263 add x0, x0, :lo12:.LC263 mov x29, sp bl puts mov w0, 26 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE57: .size page28, .-page28 .section .rodata.str1.8 .align 3 .LC264: .string "\"Psst, hey citizen, come here. Pssfft,\" you hear. When you peer around" .align 3 .LC265: .string "you can see someone's dim outline in the shadows. \"I got some information" .align 3 .LC266: .string "on the Master Retailer. It'll only cost you 30 psst credits.\"" .align 3 .LC267: .string " a - You pay the 30 credits for the info." .align 3 .LC268: .string " b - You would rather threaten him for the information." .align 3 .LC269: .string " c - You ignore him and walk away." .text .align 2 .p2align 4,,11 .global page29 .type page29, %function page29: .LFB58: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC264 add x0, x0, :lo12:.LC264 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC265 add x0, x0, :lo12:.LC265 bl puts adrp x0, .LC266 add x0, x0, :lo12:.LC266 bl puts adrp x19, :got:stdin adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC267 add x0, x0, :lo12:.LC267 bl puts adrp x0, .LC268 add x0, x0, :lo12:.LC268 bl puts adrp x0, .LC269 add x0, x0, :lo12:.LC269 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 mov w0, 22 cmp w20, 10 beq .L149 .p2align 3,,7 .L151: ldr x0, [x19] bl getc cmp w0, 10 bne .L151 mov w0, 30 cmp w20, 97 bne .L159 .L149: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L159: .cfi_restore_state cmp w20, 98 mov w1, 31 mov w0, 22 csel w0, w0, w1, ne ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE58: .size page29, .-page29 .section .rodata.str1.8 .align 3 .LC270: .string "You step into the shadows and offer the man a thirty credit bill. \"Just drop" .align 3 .LC271: .string "it on the floor,\" he says. \"So you're looking for the Master Retailer, pssfft?" .align 3 .LC272: .string "I've seen him, he's a fat man in a fuzzy red and white jump suit. They say" .align 3 .LC273: .string "he's a high programmer with no respect for proper security. If you want to" .align 3 .LC274: .string "find him then pssfft step behind me and go through the door.\"" .align 3 .LC275: .string "Behind the man is a reinforced plasteel blast door. The centre of it has been" .align 3 .LC276: .string "buckled toward you in a manner you only saw once before when you were field" .align 3 .LC277: .string "testing the rocket assist plasma slingshot (you found it easily portable but" .align 3 .LC278: .string "prone to misfire). Luckily it isn't buckled too far for you to make out the" .align 3 .LC279: .string "warning sign. WARNING!! Don't open this door or the same thing will happen to" .align 3 .LC280: .string "you. Opening this door is a capital offense. Do not do it. Not at all. This" .align 3 .LC281: .string "is not a joke." .align 3 .LC282: .string " a - You use your Precognition mutant power on opening the door." .align 3 .LC283: .string " b - You just go through the door anyway." .align 3 .LC284: .string " c - You decide it's too dangerous and walk away." .text .align 2 .p2align 4,,11 .global page30 .type page30, %function page30: .LFB59: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC270 add x0, x0, :lo12:.LC270 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC271 add x0, x0, :lo12:.LC271 bl puts adrp x0, .LC272 add x0, x0, :lo12:.LC272 bl puts adrp x19, :got:stdin adrp x0, .LC273 add x0, x0, :lo12:.LC273 bl puts adrp x0, .LC274 add x0, x0, :lo12:.LC274 bl puts adrp x0, .LC275 add x0, x0, :lo12:.LC275 bl puts adrp x0, .LC276 add x0, x0, :lo12:.LC276 bl puts adrp x0, .LC277 add x0, x0, :lo12:.LC277 bl puts adrp x0, .LC278 add x0, x0, :lo12:.LC278 bl puts adrp x0, .LC279 add x0, x0, :lo12:.LC279 bl puts adrp x0, .LC280 add x0, x0, :lo12:.LC280 bl puts adrp x0, .LC281 add x0, x0, :lo12:.LC281 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC282 add x0, x0, :lo12:.LC282 bl puts adrp x0, .LC283 add x0, x0, :lo12:.LC283 bl puts adrp x0, .LC284 add x0, x0, :lo12:.LC284 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 mov w0, 22 cmp w20, 10 beq .L160 .p2align 3,,7 .L162: ldr x0, [x19] bl getc cmp w0, 10 bne .L162 mov w0, 56 cmp w20, 97 bne .L170 .L160: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L170: .cfi_restore_state cmp w20, 98 mov w1, 33 mov w0, 22 csel w0, w0, w1, ne ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE59: .size page30, .-page30 .section .rodata.str1.8 .align 3 .LC285: .string "Like any good troubleshooter you make the least expensive decision and threaten" .align 3 .LC286: .string "him for information. With lightning like reflexes you whip out your laser and" .align 3 .LC287: .string "stick it up his nose. \"Talk, you traitorous Christmas celebrator, or who nose" .align 3 .LC288: .string "what will happen to you, yuk yuk,\" you pun menacingly, and then you notice" .align 3 .LC289: .string "something is very wrong. He doesn't have a nose. As a matter of fact he's" .align 3 .LC290: .string "made of one eighth inch cardboard and your laser is sticking through the other" .align 3 .LC291: .string "side of his head. \"Are you going to pay?\" says his mouth speaker," .align 3 .LC292: .string "\"or are you going to pssfft go away stupid?\"" .align 3 .LC293: .string "You pssfft go away stupid" .align 3 .LC294: .string "You pay the 30 credits" .text .align 2 .p2align 4,,11 .global page31 .type page31, %function page31: .LFB60: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC285 add x0, x0, :lo12:.LC285 mov x29, sp bl puts adrp x0, .LC286 add x0, x0, :lo12:.LC286 bl puts adrp x0, .LC287 add x0, x0, :lo12:.LC287 bl puts adrp x0, .LC288 add x0, x0, :lo12:.LC288 bl puts adrp x0, .LC289 add x0, x0, :lo12:.LC289 bl puts adrp x0, .LC290 add x0, x0, :lo12:.LC290 bl puts adrp x0, .LC291 add x0, x0, :lo12:.LC291 bl puts adrp x0, .LC292 add x0, x0, :lo12:.LC292 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w2, 22 adrp x3, .LC293 adrp x1, .LC294 add x3, x3, :lo12:.LC293 add x1, x1, :lo12:.LC294 mov w0, 30 b choose .cfi_endproc .LFE60: .size page31, .-page31 .section .rodata.str1.8 .align 3 .LC295: .string "Finally it's your big chance to prove that you're as good a troubleshooter" .align 3 .LC296: .string "as your previous clone. You walk briskly to mission briefing and pick up your" .align 3 .LC297: .string "previous clone's personal effects and notepad. After reviewing the notes you" .align 3 .LC298: .string "know what has to be done. You catch the purple line to Goods Distribution Hall" .align 3 .LC299: .string "7-beta and begin to search for the blast door." .text .align 2 .p2align 4,,11 .global page32 .type page32, %function page32: .LFB61: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC295 add x0, x0, :lo12:.LC295 mov x29, sp bl puts adrp x0, .LC296 add x0, x0, :lo12:.LC296 bl puts adrp x0, .LC297 add x0, x0, :lo12:.LC297 bl puts adrp x0, .LC298 add x0, x0, :lo12:.LC298 bl puts adrp x0, .LC299 add x0, x0, :lo12:.LC299 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE61: .size page32, .-page32 .section .rodata.str1.8 .align 3 .LC300: .string "You release the megabolts on the blast door, then strain against it with your" .align 3 .LC301: .string "awesome strength. Slowly the door creaks open. You bravely leap through the" .align 3 .LC302: .string "opening and smack your head into the barrel of a 300 mm 'ultra shock' class" .align 3 .LC303: .string "plasma cannon. It's dark in the barrel now, but just before your head got" .align 3 .LC304: .string "stuck you can remember seeing a group of technicians anxiously watch you leap" .align 3 .LC305: .string "into the room." .text .align 2 .p2align 4,,11 .global page33 .type page33, %function page33: .LFB62: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov w2, 1 adrp x0, .LC300 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -16 adrp x19, .LANCHOR1 add x1, x19, :lo12:.LANCHOR1 add x0, x0, :lo12:.LC300 str w2, [x1, 20] bl puts adrp x0, .LC301 add x0, x0, :lo12:.LC301 bl puts adrp x0, .LC302 add x0, x0, :lo12:.LC302 bl puts adrp x0, .LC303 add x0, x0, :lo12:.LC303 bl puts adrp x0, .LC304 add x0, x0, :lo12:.LC304 bl puts adrp x0, .LC305 add x0, x0, :lo12:.LC305 bl puts ldr w0, [x19, #:lo12:.LANCHOR1] ldr x19, [sp, 16] cmp w0, 1 cset w0, ne add w0, w0, 35 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE62: .size page33, .-page33 .section .rodata.str1.8 .align 3 .LC306: .string "You have found a sealed envelope on the body. You open it and read:" .align 3 .LC307: .string "\"WARNING: Ultraviolet Clearance ONLY. DO NOT READ." .align 3 .LC308: .string "Memo from Chico-U-MRX4 to Harpo-U-MRX5." .align 3 .LC309: .string "The planned takeover of the Troubleshooter Training Course goes well, Comrade." .align 3 .LC310: .string "Once we have trained the unwitting bourgeois troubleshooters to work as" .align 3 .LC311: .string "communist dupes, the overthrow of Alpha Complex will be unstoppable. My survey" .align 3 .LC312: .string "of the complex has convinced me that no one suspects a thing; soon it will be" .align 3 .LC313: .string "too late for them to oppose the revolution. The only thing that could possibly" .align 3 .LC314: .string "impede the people's revolution would be someone alerting The Computer to our" .align 3 .LC315: .string "plans (for instance, some enterprising Troubleshooter could tell The Computer" .align 3 .LC316: .string "that the communists have liberated the Troubleshooter Training Course and plan" .align 3 .LC317: .string "to use it as a jumping off point from which to undermine the stability of all" .align 3 .LC318: .string "Alpha Complex), but as we both know, the capitalistic Troubleshooters would" .align 3 .LC319: .string "never serve the interests of the proletariat above their own bourgeois desires." .align 3 .LC320: .string "P.S. I'm doing some Christmas shopping later today. Would you like me to pick" .align 3 .LC321: .string "you up something?\"" .align 3 .LC322: .string "When you put down the memo you are overcome by that strange deja'vu again." .align 3 .LC323: .string "You see yourself talking privately with The Computer. You are telling it all" .align 3 .LC324: .string "about the communists' plan, and then the scene shifts and you see yourself" .align 3 .LC325: .string "showered with awards for foiling the insidious communist plot to take over the" .align 3 .LC326: .string "complex." .align 3 .LC327: .string "You wander off to look for more evidence" .align 3 .LC328: .string "You rush off to the nearest computer terminal to expose the commies" .text .align 2 .p2align 4,,11 .global page34 .type page34, %function page34: .LFB63: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC306 add x0, x0, :lo12:.LC306 mov x29, sp bl puts adrp x0, .LC307 add x0, x0, :lo12:.LC307 bl puts adrp x0, .LC308 add x0, x0, :lo12:.LC308 bl puts adrp x0, .LC309 add x0, x0, :lo12:.LC309 bl puts adrp x0, .LC310 add x0, x0, :lo12:.LC310 bl puts adrp x0, .LC311 add x0, x0, :lo12:.LC311 bl puts adrp x0, .LC312 add x0, x0, :lo12:.LC312 bl puts adrp x0, .LC313 add x0, x0, :lo12:.LC313 bl puts adrp x0, .LC314 add x0, x0, :lo12:.LC314 bl puts adrp x0, .LC315 add x0, x0, :lo12:.LC315 bl puts adrp x0, .LC316 add x0, x0, :lo12:.LC316 bl puts adrp x0, .LC317 add x0, x0, :lo12:.LC317 bl puts adrp x0, .LC318 add x0, x0, :lo12:.LC318 bl puts adrp x0, .LC319 add x0, x0, :lo12:.LC319 bl puts adrp x0, .LC320 add x0, x0, :lo12:.LC320 bl puts adrp x0, .LC321 add x0, x0, :lo12:.LC321 bl puts bl more adrp x0, .LC322 add x0, x0, :lo12:.LC322 bl puts adrp x0, .LC323 add x0, x0, :lo12:.LC323 bl puts adrp x0, .LC324 add x0, x0, :lo12:.LC324 bl puts adrp x0, .LC325 add x0, x0, :lo12:.LC325 bl puts adrp x0, .LC326 add x0, x0, :lo12:.LC326 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x0, .LANCHOR1+16 mov w2, 1 adrp x3, .LC327 str w2, [x0, #:lo12:.LANCHOR1+16] add x3, x3, :lo12:.LC327 adrp x1, .LC328 mov w2, 22 add x1, x1, :lo12:.LC328 mov w0, 46 b choose .cfi_endproc .LFE63: .size page34, .-page34 .section .rodata.str1.8 .align 3 .LC329: .string "\"Oh master,\" you hear through the gun barrel, \"where have you been? It is" .align 3 .LC330: .string "time for the great Christmas gifting ceremony. You had better hurry and get" .align 3 .LC331: .string "the costume on or the trainee may begin to suspect.\" For the second time" .align 3 .LC332: .string "today you are forced to wear attire not of your own choosing. They zip the" .align 3 .LC333: .string "suit to your chin just as you hear gunfire erupt behind you." .align 3 .LC334: .string "\"Oh no! Who left the door open? The commies will get in. Quick, fire the" .align 3 .LC335: .string "laser cannon or we're all doomed.\"" .align 3 .LC336: .string "\"Too late you capitalist swine, the people's revolutionary strike force claims" .align 3 .LC337: .string "this cannon for the proletariat's valiant struggle against oppression. Take" .align 3 .LC338: .string "that, you running dog imperialist lackey. ZAP, KAPOW\"" .align 3 .LC339: .string "Just when you think that things couldn't get worse, \"Aha, look what we have" .align 3 .LC340: .string "here, the Master Retailer himself with his head caught in his own cannon. His" .align 3 .LC341: .string "death will serve as a symbol of freedom for all Alpha Complex." .align 3 .LC342: .string "Fire the cannon.\"" .text .align 2 .p2align 4,,11 .global page35 .type page35, %function page35: .LFB64: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC329 add x0, x0, :lo12:.LC329 mov x29, sp bl puts adrp x0, .LC330 add x0, x0, :lo12:.LC330 bl puts adrp x0, .LC331 add x0, x0, :lo12:.LC331 bl puts adrp x0, .LC332 add x0, x0, :lo12:.LC332 bl puts adrp x0, .LC333 add x0, x0, :lo12:.LC333 bl puts adrp x0, .LC334 add x0, x0, :lo12:.LC334 bl puts adrp x0, .LC335 add x0, x0, :lo12:.LC335 bl puts adrp x0, .LC336 add x0, x0, :lo12:.LC336 bl puts adrp x0, .LC337 add x0, x0, :lo12:.LC337 bl puts adrp x0, .LC338 add x0, x0, :lo12:.LC338 bl puts adrp x0, .LC339 add x0, x0, :lo12:.LC339 bl puts adrp x0, .LC340 add x0, x0, :lo12:.LC340 bl puts adrp x0, .LC341 add x0, x0, :lo12:.LC341 bl puts adrp x0, .LC342 add x0, x0, :lo12:.LC342 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 32 b new_clone .cfi_endproc .LFE64: .size page35, .-page35 .section .rodata.str1.8 .align 3 .LC343: .string "\"Congratulations, troubleshooter, you have successfully found the lair of the" .align 3 .LC344: .string "Master Retailer and completed the Troubleshooter Training Course test mission,\"" .align 3 .LC345: .string "a muffled voice tells you through the barrel. \"Once we dislodge your head" .align 3 .LC346: .string "from the barrel of the 'Ultra Shock' plasma cannon you can begin with the" .align 3 .LC347: .string "training seminars, the first of which will concern the 100%% accurate\n" .align 3 .LC348: .string "identification and elimination of unregistered mutants. If you have any" .align 3 .LC349: .string "objections please voice them now.\"" .align 3 .LC350: .string " a - You appreciate his courtesy and voice an objection." .align 3 .LC351: .string " b - After your head is removed from the cannon, you register as a mutant." .align 3 .LC352: .string " c - After your head is removed from the cannon, you go to the unregistered" .align 3 .LC353: .string " mutant identification and elimination seminar." .text .align 2 .p2align 4,,11 .global page36 .type page36, %function page36: .LFB65: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC343 add x0, x0, :lo12:.LC343 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC344 add x0, x0, :lo12:.LC344 bl puts adrp x0, .LC345 add x0, x0, :lo12:.LC345 bl puts adrp x19, :got:stdin adrp x0, .LC346 add x0, x0, :lo12:.LC346 bl puts adrp x1, .LC347 add x1, x1, :lo12:.LC347 mov w0, 1 bl __printf_chk adrp x0, .LC348 add x0, x0, :lo12:.LC348 bl puts adrp x0, .LC349 add x0, x0, :lo12:.LC349 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC350 add x0, x0, :lo12:.LC350 bl puts adrp x0, .LC351 add x0, x0, :lo12:.LC351 bl puts adrp x0, .LC352 add x0, x0, :lo12:.LC352 bl puts adrp x0, .LC353 add x0, x0, :lo12:.LC353 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L187 .p2align 3,,7 .L185: ldr x0, [x19] bl getc cmp w0, 10 bne .L185 cmp w20, 97 bne .L191 ldp x19, x20, [sp, 16] mov w0, 32 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b new_clone .p2align 2,,3 .L191: .cfi_restore_state cmp w20, 98 mov w1, 23 mov w0, 37 csel w0, w0, w1, ne ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L187: .cfi_restore_state mov w0, 37 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE65: .size page36, .-page36 .section .rodata.str1.8 .align 3 .LC354: .string "\"Come with me please, Troubleshooter,\" says the Green clearance technician" .align 3 .LC355: .string "after he has dislodged your head from the cannon. \"You have been participating" .align 3 .LC356: .string "in the Troubleshooter Training Course since you got off the tube car in" .align 3 .LC357: .string "GDH7-beta,\" he explains as he leads you down a corridor. \"The entire" .align 3 .LC358: .string "Christmas assignment was a test mission to assess your current level of" .align 3 .LC359: .string "training. You didn't do so well. We're going to start at the beginning with" .align 3 .LC360: .string "the other student. Ah, here we are, the mutant identification and elimination" .align 3 .LC361: .string "lecture.\" He shows you into a vast lecture hall filled with empty seats." .align 3 .LC362: .string "There is only one other student here, a Troubleshooter near the front row" .align 3 .LC363: .string "playing with his Action Troubleshooter(tm) figure. \"Find a seat and I will" .align 3 .LC364: .string "begin,\" says the instructor." .text .align 2 .p2align 4,,11 .global page37 .type page37, %function page37: .LFB66: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC354 add x0, x0, :lo12:.LC354 mov x29, sp bl puts adrp x0, .LC355 add x0, x0, :lo12:.LC355 bl puts adrp x0, .LC356 add x0, x0, :lo12:.LC356 bl puts adrp x0, .LC357 add x0, x0, :lo12:.LC357 bl puts adrp x0, .LC358 add x0, x0, :lo12:.LC358 bl puts adrp x0, .LC359 add x0, x0, :lo12:.LC359 bl puts adrp x0, .LC360 add x0, x0, :lo12:.LC360 bl puts adrp x0, .LC361 add x0, x0, :lo12:.LC361 bl puts adrp x0, .LC362 add x0, x0, :lo12:.LC362 bl puts adrp x0, .LC363 add x0, x0, :lo12:.LC363 bl puts adrp x0, .LC364 add x0, x0, :lo12:.LC364 bl puts mov w0, 38 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE66: .size page37, .-page37 .section .rodata.str1.8 .align 3 .LC365: .string "\"I am Plato-B-PHI%d, head of mutant propaganda here at the training course.\n" .align 3 .LC366: .string "If you have any questions about mutants please come to me. Today I will be" .align 3 .LC367: .string "talking about mutant detection. Detecting mutants is very easy. One simply" .align 3 .LC368: .string "watches for certain tell tale signs, such as the green scaly skin, the third" .align 3 .LC369: .string "arm growing from the forehead, or other similar disfigurements so common with" .align 3 .LC370: .string "their kind. There are, however, a few rare specimens that show no outward sign" .align 3 .LC371: .string "of their treason. This has been a significant problem, so our researchers have" .align 3 .LC372: .string "been working on a solution. I would like a volunteer to test this device,\"" .align 3 .LC373: .string "he says, holding up a ray gun looking thing. \"It is a mutant detection ray." .align 3 .LC374: .string "This little button detects for mutants, and this big button stuns them once" .align 3 .LC375: .string "they are discovered. Who would like to volunteer for a test?\"" .align 3 .LC376: .string "The Troubleshooter down the front squirms deeper into his chair." .align 3 .LC377: .string "You duck behind a chair and hope the instructor doesn't notice you" .align 3 .LC378: .string "You volunteer for the test" .text .align 2 .p2align 4,,11 .global page38 .type page38, %function page38: .LFB67: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x2, .LANCHOR0+8 adrp x1, .LC365 mov x29, sp ldr w2, [x2, #:lo12:.LANCHOR0+8] add x1, x1, :lo12:.LC365 mov w0, 1 bl __printf_chk adrp x0, .LC366 add x0, x0, :lo12:.LC366 bl puts adrp x0, .LC367 add x0, x0, :lo12:.LC367 bl puts adrp x0, .LC368 add x0, x0, :lo12:.LC368 bl puts adrp x0, .LC369 add x0, x0, :lo12:.LC369 bl puts adrp x0, .LC370 add x0, x0, :lo12:.LC370 bl puts adrp x0, .LC371 add x0, x0, :lo12:.LC371 bl puts adrp x0, .LC372 add x0, x0, :lo12:.LC372 bl puts adrp x0, .LC373 add x0, x0, :lo12:.LC373 bl puts adrp x0, .LC374 add x0, x0, :lo12:.LC374 bl puts adrp x0, .LC375 add x0, x0, :lo12:.LC375 bl puts adrp x0, .LC376 add x0, x0, :lo12:.LC376 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w2, 40 adrp x3, .LC377 adrp x1, .LC378 add x3, x3, :lo12:.LC377 add x1, x1, :lo12:.LC378 mov w0, 39 b choose .cfi_endproc .LFE67: .size page38, .-page38 .section .rodata.str1.8 .align 3 .LC379: .string "You bravely volunteer to test the mutant detection gun. You stand up and walk" .align 3 .LC380: .string "down the steps to the podium, passing a very relieved Troubleshooter along the" .align 3 .LC381: .string "way. When you reach the podium Plato-B-PHI hands you the mutant detection gun" .align 3 .LC382: .string "and says, \"Here, aim the gun at that Troubleshooter and push the small button." .align 3 .LC383: .string "If you see a purple light, stun him.\" Grasping the opportunity to prove your" .align 3 .LC384: .string "worth to The Computer, you fire the mutant detection ray at the Troubleshooter." .align 3 .LC385: .string "A brilliant purple nimbus instantly surrounds his body. You slip your finger" .align 3 .LC386: .string "to the large stun button and he falls writhing to the floor." .align 3 .LC387: .string "\"Good shot,\" says the instructor as you hand him the mutant detection gun," .align 3 .LC388: .string "\"I'll see that you get a commendation for this. It seems you have the hang" .align 3 .LC389: .string "of mutant detection and elimination. You can go on to the secret society" .align 3 .LC390: .string "infiltration class. I'll see that the little mutie gets packaged for" .align 3 .LC391: .string "tomorrow's mutant dissection class.\"" .text .align 2 .p2align 4,,11 .global page39 .type page39, %function page39: .LFB68: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC379 add x0, x0, :lo12:.LC379 mov x29, sp bl puts adrp x0, .LC380 add x0, x0, :lo12:.LC380 bl puts adrp x0, .LC381 add x0, x0, :lo12:.LC381 bl puts adrp x0, .LC382 add x0, x0, :lo12:.LC382 bl puts adrp x0, .LC383 add x0, x0, :lo12:.LC383 bl puts adrp x0, .LC384 add x0, x0, :lo12:.LC384 bl puts adrp x0, .LC385 add x0, x0, :lo12:.LC385 bl puts adrp x0, .LC386 add x0, x0, :lo12:.LC386 bl puts adrp x0, .LC387 add x0, x0, :lo12:.LC387 bl puts adrp x0, .LC388 add x0, x0, :lo12:.LC388 bl puts adrp x0, .LC389 add x0, x0, :lo12:.LC389 bl puts adrp x0, .LC390 add x0, x0, :lo12:.LC390 bl puts adrp x0, .LC391 add x0, x0, :lo12:.LC391 bl puts mov w0, 41 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE68: .size page39, .-page39 .section .rodata.str1.8 .align 3 .LC392: .string "You breathe a sigh of relief as Plato-B-PHI picks on the other Troubleshooter." .align 3 .LC393: .string "\"You down here in the front,\" says the instructor pointing at the other" .align 3 .LC394: .string "Troubleshooter, \"you'll make a good volunteer. Please step forward.\"" .align 3 .LC395: .string "The Troubleshooter looks around with a `who me?' expression on his face, but" .align 3 .LC396: .string "since he is the only one visible in the audience he figures his number is up." .align 3 .LC397: .string "He walks down to the podium clutching his Action Troubleshooter(tm) doll before" .align 3 .LC398: .string "him like a weapon. \"Here,\" says Plato-B-PHI, \"take the mutant detection ray" .align 3 .LC399: .string "and point it at the audience. If there are any mutants out there we'll know" .align 3 .LC400: .string "soon enough.\" Suddenly your skin prickles with static electricity as a bright" .align 3 .LC401: .string "purple nimbus surrounds your body. \"Ha Ha, got one,\" says the instructor." .align 3 .LC402: .string "\"Stun him before he gets away.\"" .align 3 .LC403: .string "His shot hits you. You feel numb all over." .align 3 .LC404: .string "His shot just missed." .align 3 .LC405: .string "You just blew his head off. His lifeless hand drops the mutant detector ray." .align 3 .LC406: .string "You burnt a hole in the podium. He sights the mutant detector ray on you." .text .align 2 .p2align 4,,11 .global page40 .type page40, %function page40: .LFB69: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x0, .LC392 add x0, x0, :lo12:.LC392 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov w19, 34079 adrp x20, .LC404 stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 bl puts adrp x0, .LC393 add x0, x0, :lo12:.LC393 bl puts adrp x0, .LC394 add x0, x0, :lo12:.LC394 bl puts adrp x21, .LC406 adrp x0, .LC395 add x0, x0, :lo12:.LC395 bl puts add x20, x20, :lo12:.LC404 adrp x0, .LC396 add x0, x0, :lo12:.LC396 bl puts add x21, x21, :lo12:.LC406 adrp x0, .LC397 add x0, x0, :lo12:.LC397 bl puts movk w19, 0x51eb, lsl 16 adrp x0, .LC398 add x0, x0, :lo12:.LC398 bl puts adrp x0, .LC399 add x0, x0, :lo12:.LC399 bl puts adrp x0, .LC400 add x0, x0, :lo12:.LC400 bl puts adrp x0, .LC401 add x0, x0, :lo12:.LC401 bl puts adrp x0, .LC402 add x0, x0, :lo12:.LC402 bl puts bl more b .L202 .p2align 2,,3 .L199: bl puts bl rand mov w2, w0 mov x0, x21 smull x1, w2, w19 asr x1, x1, 37 sub w1, w1, w2, asr 31 msub w1, w1, w22, w2 cmp w1, 39 ble .L204 bl puts .L202: bl rand mov w2, w0 mov w22, 100 mov x0, x20 smull x1, w2, w19 asr x1, x1, 37 sub w1, w1, w2, asr 31 msub w1, w1, w22, w2 cmp w1, 29 bgt .L199 adrp x0, .LC403 add x0, x0, :lo12:.LC403 bl puts mov w0, 49 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L204: .cfi_restore_state adrp x0, .LC405 add x0, x0, :lo12:.LC405 bl puts mov w0, 50 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE69: .size page40, .-page40 .section .rodata.str1.8 .align 3 .LC407: .string "You stumble down the hallway of the Troubleshooter Training Course looking for" .align 3 .LC408: .string "your next class. Up ahead you see one of the instructors waving to you. When" .align 3 .LC409: .string "you get there he shakes your hand and says, \"I am Jung-I-PSY. Welcome to the" .align 3 .LC410: .string "secret society infiltration seminar. I hope you ...\" You don't catch the" .align 3 .LC411: .string "rest of his greeting because you're paying too much attention to his handshake;" .align 3 .LC412: .string "it is the strangest thing that has ever been done to your hand, sort of how it" .align 3 .LC413: .string "would feel if you put a neuro whip in a high energy palm massage unit." .align 3 .LC414: .string "It doesn't take you long to learn what he is up to; you feel him briefly shake" .align 3 .LC415: .string "your hand with the secret Illuminati handshake." .align 3 .LC416: .string "You ignore this secret society contact" .align 3 .LC417: .string "You respond with the proper Illuminati code phrase, \"Ewige Blumenkraft\"" .text .align 2 .p2align 4,,11 .global page41 .type page41, %function page41: .LFB70: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC407 add x0, x0, :lo12:.LC407 mov x29, sp bl puts adrp x0, .LC408 add x0, x0, :lo12:.LC408 bl puts adrp x0, .LC409 add x0, x0, :lo12:.LC409 bl puts adrp x0, .LC410 add x0, x0, :lo12:.LC410 bl puts adrp x0, .LC411 add x0, x0, :lo12:.LC411 bl puts adrp x0, .LC412 add x0, x0, :lo12:.LC412 bl puts adrp x0, .LC413 add x0, x0, :lo12:.LC413 bl puts adrp x0, .LC414 add x0, x0, :lo12:.LC414 bl puts adrp x0, .LC415 add x0, x0, :lo12:.LC415 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC416 adrp x1, .LC417 add x3, x3, :lo12:.LC416 add x1, x1, :lo12:.LC417 mov w2, 43 mov w0, 42 b choose .cfi_endproc .LFE70: .size page41, .-page41 .section .rodata.str1.8 .align 3 .LC418: .string "\"Aha, so you are a member of the elitist Illuminati secret society,\" he says" .align 3 .LC419: .string "loudly, \"that is most interesting.\" He turns to the large class already" .align 3 .LC420: .string "seated in the auditorium and says, \"You see, class, by simply using the correct" .align 3 .LC421: .string "hand shake you can identify the member of any secret society. Please keep your" .align 3 .LC422: .string "weapons trained on him while I call a guard." .align 3 .LC423: .string "You wait for the guard" .align 3 .LC424: .string "You run for it" .text .align 2 .p2align 4,,11 .global page42 .type page42, %function page42: .LFB71: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC418 add x0, x0, :lo12:.LC418 mov x29, sp bl puts adrp x0, .LC419 add x0, x0, :lo12:.LC419 bl puts adrp x0, .LC420 add x0, x0, :lo12:.LC420 bl puts adrp x0, .LC421 add x0, x0, :lo12:.LC421 bl puts adrp x0, .LC422 add x0, x0, :lo12:.LC422 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC423 adrp x1, .LC424 add x3, x3, :lo12:.LC423 add x1, x1, :lo12:.LC424 mov w2, 52 mov w0, 51 b choose .cfi_endproc .LFE71: .size page42, .-page42 .section .rodata.str1.8 .align 3 .LC425: .string "You sit through a long lecture on how to recognise and infiltrate secret" .align 3 .LC426: .string "societies, with an emphasis on mimicking secret handshakes. The basic theory," .align 3 .LC427: .string "which you realise to be sound from your Iluminati training, is that with the" .align 3 .LC428: .string "proper handshake you can pass unnoticed in any secret society gathering." .align 3 .LC429: .string "What's more, the proper handshake will open doors faster than an 'ultra shock'" .align 3 .LC430: .string "plasma cannon. You are certain that with the information you learn here you" .align 3 .LC431: .string "will easily be promoted to the next level of your Illuminati secret society." .align 3 .LC432: .string "The lecture continues for three hours, during which you have the opportunity" .align 3 .LC433: .string "to practice many different handshakes. Afterwards everyone is directed to" .align 3 .LC434: .string "attend the graduation ceremony. Before you must go you have a little time to" .align 3 .LC435: .string "talk to The Computer about, you know, certain topics." .align 3 .LC436: .string "You go to the graduation ceremony immediately" .align 3 .LC437: .string "You go looking for a computer terminal" .text .align 2 .p2align 4,,11 .global page43 .type page43, %function page43: .LFB72: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC425 add x0, x0, :lo12:.LC425 mov x29, sp bl puts adrp x0, .LC426 add x0, x0, :lo12:.LC426 bl puts adrp x0, .LC427 add x0, x0, :lo12:.LC427 bl puts adrp x0, .LC428 add x0, x0, :lo12:.LC428 bl puts adrp x0, .LC429 add x0, x0, :lo12:.LC429 bl puts adrp x0, .LC430 add x0, x0, :lo12:.LC430 bl puts adrp x0, .LC431 add x0, x0, :lo12:.LC431 bl puts adrp x0, .LC432 add x0, x0, :lo12:.LC432 bl puts adrp x0, .LC433 add x0, x0, :lo12:.LC433 bl puts adrp x0, .LC434 add x0, x0, :lo12:.LC434 bl puts adrp x0, .LC435 add x0, x0, :lo12:.LC435 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC436 adrp x1, .LC437 add x3, x3, :lo12:.LC436 add x1, x1, :lo12:.LC437 mov w2, 55 mov w0, 44 b choose .cfi_endproc .LFE72: .size page43, .-page43 .section .rodata.str1.8 .align 3 .LC438: .string "You walk down to a semi-secluded part of the training course complex and" .align 3 .LC439: .string "activate a computer terminal. \"AT YOUR SERVICE\" reads the computer screen." .align 3 .LC440: .string "You change your mind and go to the graduation ceremony" .align 3 .LC441: .string "You register yourself as a mutant" .align 3 .LC442: .string " a - You register yourself as a mutant." .align 3 .LC443: .string " b - You want to chat about the commies." .align 3 .LC444: .string " c - You change your mind and go to the graduation ceremony." .text .align 2 .p2align 4,,11 .global page44 .type page44, %function page44: .LFB73: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC438 add x0, x0, :lo12:.LC438 mov x29, sp bl puts adrp x0, .LC439 add x0, x0, :lo12:.LC439 bl puts adrp x0, .LANCHOR1+16 ldr w0, [x0, #:lo12:.LANCHOR1+16] cbz w0, .L222 adrp x0, .LC192 add x0, x0, :lo12:.LC192 stp x19, x20, [sp, 16] .cfi_offset 20, -8 .cfi_offset 19, -16 bl puts adrp x0, .LC442 add x0, x0, :lo12:.LC442 bl puts adrp x0, .LC443 add x0, x0, :lo12:.LC443 bl puts adrp x19, :got:stdin adrp x0, .LC444 add x0, x0, :lo12:.LC444 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 mov w0, 55 cmp w20, 10 beq .L211 .p2align 3,,7 .L214: ldr x0, [x19] bl getc cmp w0, 10 bne .L214 mov w0, 23 cmp w20, 97 beq .L211 cmp w20, 98 mov w0, 55 mov w1, 46 csel w0, w0, w1, ne .L211: ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L222: .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC440 adrp x1, .LC441 add x3, x3, :lo12:.LC440 add x1, x1, :lo12:.LC441 mov w2, 55 mov w0, 23 b choose .cfi_endproc .LFE73: .size page44, .-page44 .section .rodata.str1.8 .align 3 .LC445: .string "\"Hrank Hrank,\" snorts the alarm in your living quarters. Something is up." .align 3 .LC446: .string "You look at the monitor above the bathroom mirror and see the message you have" .align 3 .LC447: .string "been waiting for all these years. \"ATTENTION TROUBLESHOOTER, YOU ARE BEING" .align 3 .LC448: .string "ACTIVATED. PLEASE REPORT IMMEDIATELY TO MISSION ASSIGNMENT ROOM A17/GAMMA/LB22." .align 3 .LC449: .string "THANK YOU. THE COMPUTER IS YOUR FRIEND.\" When you arrive at mission" .align 3 .LC450: .string "assignment room A17-gamma/LB22 you are given your previous clone's" .align 3 .LC451: .string "remaining possessions and notebook. You puzzle through your predecessor's" .align 3 .LC452: .string "cryptic notes, managing to decipher enough to lead you to the tube station and" .align 3 .LC453: .string "the tube car to GDH7-beta." .text .align 2 .p2align 4,,11 .global page45 .type page45, %function page45: .LFB74: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC445 add x0, x0, :lo12:.LC445 mov x29, sp bl puts adrp x0, .LC446 add x0, x0, :lo12:.LC446 bl puts adrp x0, .LC447 add x0, x0, :lo12:.LC447 bl puts adrp x0, .LC448 add x0, x0, :lo12:.LC448 bl puts adrp x0, .LC449 add x0, x0, :lo12:.LC449 bl puts adrp x0, .LC450 add x0, x0, :lo12:.LC450 bl puts adrp x0, .LC451 add x0, x0, :lo12:.LC451 bl puts adrp x0, .LC452 add x0, x0, :lo12:.LC452 bl puts adrp x0, .LC453 add x0, x0, :lo12:.LC453 bl puts mov w0, 10 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE74: .size page45, .-page45 .section .rodata.str1.8 .align 3 .LC454: .string "\"Why do you ask about the communists, Troubleshooter? It is not in the" .align 3 .LC455: .string "interest of your continued survival to be asking about such topics,\" says" .align 3 .LC456: .string "The Computer." .align 3 .LC457: .string "You change the subject" .align 3 .LC458: .string "You insist on talking about the communists" .text .align 2 .p2align 4,,11 .global page46 .type page46, %function page46: .LFB75: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC454 add x0, x0, :lo12:.LC454 mov x29, sp bl puts adrp x0, .LC455 add x0, x0, :lo12:.LC455 bl puts adrp x0, .LC456 add x0, x0, :lo12:.LC456 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC457 adrp x1, .LC458 add x3, x3, :lo12:.LC457 add x1, x1, :lo12:.LC458 mov w2, 54 mov w0, 53 b choose .cfi_endproc .LFE75: .size page46, .-page46 .section .rodata.str1.8 .align 3 .LC459: .string "The Computer orders the entire Vulture squadron to terminate the Troubleshooter" .align 3 .LC460: .string "Training Course. Unfortunately you too are terminated for possessing" .align 3 .LC461: .string "classified information.\n" .align 3 .LC462: .string "Don't act so innocent, we both know that you are an Illuminatus which is in" .align 3 .LC463: .string "itself an act of treason.\n" .align 3 .LC464: .string "Don't look to me for sympathy.\n" .align 3 .LC465: .string "\t\t\tTHE END" .text .align 2 .p2align 4,,11 .global page47 .type page47, %function page47: .LFB76: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC459 add x0, x0, :lo12:.LC459 mov x29, sp bl puts adrp x0, .LC460 add x0, x0, :lo12:.LC460 bl puts adrp x0, .LC461 add x0, x0, :lo12:.LC461 bl puts adrp x0, .LC462 add x0, x0, :lo12:.LC462 bl puts adrp x0, .LC463 add x0, x0, :lo12:.LC463 bl puts adrp x0, .LC464 add x0, x0, :lo12:.LC464 bl puts adrp x0, .LC465 add x0, x0, :lo12:.LC465 bl puts mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE76: .size page47, .-page47 .section .rodata.str1.8 .align 3 .LC466: .string "The tubecar shoots forward as you enter, slamming you back into a pile of" .align 3 .LC467: .string "garbage. The front end rotates upward and you, the garbage and the garbage" .align 3 .LC468: .string "disposal car shoot straight up out of Alpha Complex. One of the last things" .align 3 .LC469: .string "you see is a small blue sphere slowly dwindling behind you. After you fail to" .align 3 .LC470: .string "report in, you will be assumed dead." .text .align 2 .p2align 4,,11 .global page48 .type page48, %function page48: .LFB77: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC466 add x0, x0, :lo12:.LC466 mov x29, sp bl puts adrp x0, .LC467 add x0, x0, :lo12:.LC467 bl puts adrp x0, .LC468 add x0, x0, :lo12:.LC468 bl puts adrp x0, .LC469 add x0, x0, :lo12:.LC469 bl puts adrp x0, .LC470 add x0, x0, :lo12:.LC470 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 45 b new_clone .cfi_endproc .LFE77: .size page48, .-page48 .section .rodata.str1.8 .align 3 .LC471: .string "The instructor drags your inert body into a specimen detainment cage." .align 3 .LC472: .string "\"He'll make a good subject for tomorrow's mutant dissection class,\" you hear." .text .align 2 .p2align 4,,11 .global page49 .type page49, %function page49: .LFB78: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC471 add x0, x0, :lo12:.LC471 mov x29, sp bl puts adrp x0, .LC472 add x0, x0, :lo12:.LC472 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 32 b new_clone .cfi_endproc .LFE78: .size page49, .-page49 .section .rodata.str1.8 .align 3 .LC473: .string "You put down the other Troubleshooter, and then wisely decide to drill a few" .align 3 .LC474: .string "holes in the instructor as well; the only good witness is a dead witness." .align 3 .LC475: .string "You continue with the training course." .text .align 2 .p2align 4,,11 .global page50 .type page50, %function page50: .LFB79: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC473 add x0, x0, :lo12:.LC473 mov x29, sp bl puts adrp x0, .LC474 add x0, x0, :lo12:.LC474 bl puts adrp x0, .LC475 add x0, x0, :lo12:.LC475 bl puts adrp x1, .LANCHOR0 add x1, x1, :lo12:.LANCHOR0 mov w0, 41 ldr w2, [x1, 8] add w2, w2, 1 str w2, [x1, 8] ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE79: .size page50, .-page50 .section .rodata.str1.8 .align 3 .LC476: .string "You run for it, but you don't run far. Three hundred strange and exotic" .align 3 .LC477: .string "weapons turn you into a freeze dried cloud of soot." .text .align 2 .p2align 4,,11 .global page51 .type page51, %function page51: .LFB80: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC476 add x0, x0, :lo12:.LC476 mov x29, sp bl puts adrp x0, .LC477 add x0, x0, :lo12:.LC477 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 32 b new_clone .cfi_endproc .LFE80: .size page51, .-page51 .section .rodata.str1.8 .align 3 .LC478: .string "You wisely wait until the instructor returns with a Blue Internal Security" .align 3 .LC479: .string "guard. The guard leads you to an Internal Security self incrimination station." .text .align 2 .p2align 4,,11 .global page52 .type page52, %function page52: .LFB81: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC478 add x0, x0, :lo12:.LC478 mov x29, sp bl puts adrp x0, .LC479 add x0, x0, :lo12:.LC479 bl puts mov w0, 2 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE81: .size page52, .-page52 .section .rodata.str1.8 .align 3 .LC480: .string "You tell The Computer about:" .align 3 .LC481: .string "Something less dangerous" .align 3 .LC482: .string "The commies who have infiltrated the Troubleshooter Training Course\n and the impending People's Revolution" .text .align 2 .p2align 4,,11 .global page53 .type page53, %function page53: .LFB82: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC480 add x0, x0, :lo12:.LC480 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC481 adrp x2, .LC482 add x3, x3, :lo12:.LC481 add x2, x2, :lo12:.LC482 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout adrp x19, :got:stdin ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L240 .p2align 3,,7 .L241: ldr x0, [x19] bl getc cmp w0, 10 bne .L241 mov w0, 47 cmp w20, 97 bne .L240 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L240: .cfi_restore_state mov w0, 54 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE82: .size page53, .-page53 .section .rodata.str1.8 .align 3 .LC483: .string "\"Do not try to change the subject, Troubleshooter,\" says The Computer." .align 3 .LC484: .string "\"It is a serious crime to ask about the communists. You will be terminated" .align 3 .LC485: .string "immediately. Thank you for your inquiry. The Computer is your friend.\"" .align 3 .LC486: .string "Steel bars drop to your left and right, trapping you here in the hallway." .align 3 .LC487: .string "A spotlight beams from the computer console to brilliantly iiluminate you while" .align 3 .LC488: .string "the speaker above your head rapidly repeats \"Traitor, Traitor, Traitor.\"" .align 3 .LC489: .string "It doesn't take long for a few guards to notice your predicament and come to" .align 3 .LC490: .string "finish you off." .text .align 2 .p2align 4,,11 .global page54 .type page54, %function page54: .LFB83: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC483 add x0, x0, :lo12:.LC483 mov x29, sp bl puts adrp x0, .LC484 add x0, x0, :lo12:.LC484 bl puts adrp x0, .LC485 add x0, x0, :lo12:.LC485 bl puts adrp x0, .LC486 add x0, x0, :lo12:.LC486 bl puts adrp x0, .LC487 add x0, x0, :lo12:.LC487 bl puts adrp x0, .LC488 add x0, x0, :lo12:.LC488 bl puts adrp x0, .LC489 add x0, x0, :lo12:.LC489 bl puts adrp x0, .LC490 add x0, x0, :lo12:.LC490 bl puts adrp x0, .LANCHOR1+20 ldr w0, [x0, #:lo12:.LANCHOR1+20] cbnz w0, .L251 ldp x29, x30, [sp], 16 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 45 b new_clone .p2align 2,,3 .L251: .cfi_restore_state ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 mov w0, 32 b new_clone .cfi_endproc .LFE83: .size page54, .-page54 .section .rodata.str1.8 .align 3 .LC491: .string "You and 300 other excited graduates are marched from the lecture hall and into" .align 3 .LC492: .string "a large auditorium for the graduation exercise. The auditorium is" .align 3 .LC493: .string "extravagantly decorated in the colours of the graduating class. Great red and" .align 3 .LC494: .string "green plasti-paper ribbons drape from the walls, while a huge sign reading" .align 3 .LC495: .string "\"Congratulations class of GDH7-beta-203.44/A\" hangs from the raised stage down" .align 3 .LC496: .string "front. Once everyone finds a seat the ceremony begins. Jung-I-PSY is the" .align 3 .LC497: .string "first to speak, \"Congratulations students, you have successfully survived the" .align 3 .LC498: .string "Troubleshooter Training Course. It always brings me great pride to address" .align 3 .LC499: .string "the graduating class, for I know, as I am sure you do too, that you are now" .align 3 .LC500: .string "qualified for the most perilous missions The Computer may select for you. The" .align 3 .LC501: .string "thanks is not owed to us of the teaching staff, but to all of you, who have" .align 3 .LC502: .string "persevered and graduated. Good luck and die trying.\" Then the instructor" .align 3 .LC503: .string "begins reading the names of the students who one by one walk to the front of" .align 3 .LC504: .string "the auditorium and receive their diplomas. Soon it is your turn," .align 3 .LC505: .string "\"Philo-R-DMD, graduating a master of mutant identification and secret society" .align 3 .LC506: .string "infiltration.\" You walk up and receive your diploma from Plato-B-PHI%d, then\n" .align 3 .LC507: .string "return to your seat. There is another speech after the diplomas are handed" .align 3 .LC508: .string "out, but it is cut short by by rapid fire laser bursts from the high spirited" .align 3 .LC509: .string "graduating class. You are free to return to your barracks to wait, trained" .align 3 .LC510: .string "and fully qualified, for your next mission. You also get that cherished" .align 3 .LC511: .string "promotion from the Illuminati secret society. In a week you receive a" .align 3 .LC512: .string "detailed Training Course bill totalling 1,523 credits." .text .align 2 .p2align 4,,11 .global page55 .type page55, %function page55: .LFB84: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC491 add x0, x0, :lo12:.LC491 mov x29, sp bl puts adrp x0, .LC492 add x0, x0, :lo12:.LC492 bl puts adrp x0, .LC493 add x0, x0, :lo12:.LC493 bl puts adrp x0, .LC494 add x0, x0, :lo12:.LC494 bl puts adrp x0, .LC495 add x0, x0, :lo12:.LC495 bl puts adrp x0, .LC496 add x0, x0, :lo12:.LC496 bl puts adrp x0, .LC497 add x0, x0, :lo12:.LC497 bl puts adrp x0, .LC498 add x0, x0, :lo12:.LC498 bl puts adrp x0, .LC499 add x0, x0, :lo12:.LC499 bl puts adrp x0, .LC500 add x0, x0, :lo12:.LC500 bl puts adrp x0, .LC501 add x0, x0, :lo12:.LC501 bl puts adrp x0, .LC502 add x0, x0, :lo12:.LC502 bl puts adrp x0, .LC503 add x0, x0, :lo12:.LC503 bl puts adrp x0, .LC504 add x0, x0, :lo12:.LC504 bl puts adrp x0, .LC505 add x0, x0, :lo12:.LC505 bl puts adrp x0, .LANCHOR0+8 adrp x1, .LC506 add x1, x1, :lo12:.LC506 ldr w2, [x0, #:lo12:.LANCHOR0+8] mov w0, 1 bl __printf_chk adrp x0, .LC507 add x0, x0, :lo12:.LC507 bl puts adrp x0, .LC508 add x0, x0, :lo12:.LC508 bl puts adrp x0, .LC509 add x0, x0, :lo12:.LC509 bl puts adrp x0, .LC510 add x0, x0, :lo12:.LC510 bl puts adrp x0, .LC511 add x0, x0, :lo12:.LC511 bl puts adrp x0, .LC512 add x0, x0, :lo12:.LC512 bl puts adrp x0, .LC465 add x0, x0, :lo12:.LC465 bl puts mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE84: .size page55, .-page55 .section .rodata.str1.8 .align 3 .LC513: .string "That familiar strange feeling of deja'vu envelops you again. It is hard to" .align 3 .LC514: .string "say, but whatever is on the other side of the door does not seem to be intended" .align 3 .LC515: .string "for you." .align 3 .LC516: .string "You go looking for more information" .align 3 .LC517: .string "You open the door and step through" .text .align 2 .p2align 4,,11 .global page56 .type page56, %function page56: .LFB85: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC513 add x0, x0, :lo12:.LC513 mov x29, sp bl puts adrp x0, .LC514 add x0, x0, :lo12:.LC514 bl puts adrp x0, .LC515 add x0, x0, :lo12:.LC515 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x3, .LC516 adrp x1, .LC517 add x3, x3, :lo12:.LC516 add x1, x1, :lo12:.LC517 mov w2, 22 mov w0, 33 b choose .cfi_endproc .LFE85: .size page56, .-page56 .section .rodata.str1.8 .align 3 .LC518: .string "In the centre of the room is a table and a single chair. There is an Orange" .align 3 .LC519: .string "folder on the table top, but you can't make out the lettering on it." .align 3 .LC520: .string "You leave the room" .align 3 .LC521: .string "You sit down and read the folder" .text .align 2 .p2align 4,,11 .global page57 .type page57, %function page57: .LFB86: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC518 add x0, x0, :lo12:.LC518 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC519 add x0, x0, :lo12:.LC519 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x19, :got:stdin adrp x3, .LC520 adrp x2, .LC521 add x3, x3, :lo12:.LC520 add x2, x2, :lo12:.LC521 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L258 .p2align 3,,7 .L259: ldr x0, [x19] bl getc cmp w0, 10 bne .L259 mov w0, 11 cmp w20, 97 bne .L258 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L258: .cfi_restore_state mov w0, 12 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE86: .size page57, .-page57 .align 2 .p2align 4,,11 .global next_page .type next_page, %function next_page: .LFB87: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w19, w0 mov w0, 10 bl putchar cmp w19, 57 bls .L333 .L268: mov w0, w20 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L333: .cfi_restore_state adrp x0, .L271 add x0, x0, :lo12:.L271 ldrh w0, [x0,w19,uxtw #1] adr x1, .Lrtx271 add x0, x1, w0, sxth #2 br x0 .Lrtx271: .section .rodata .align 0 .align 2 .L271: .2byte (.L329 - .Lrtx271) / 4 .2byte (.L327 - .Lrtx271) / 4 .2byte (.L326 - .Lrtx271) / 4 .2byte (.L325 - .Lrtx271) / 4 .2byte (.L324 - .Lrtx271) / 4 .2byte (.L323 - .Lrtx271) / 4 .2byte (.L322 - .Lrtx271) / 4 .2byte (.L321 - .Lrtx271) / 4 .2byte (.L320 - .Lrtx271) / 4 .2byte (.L319 - .Lrtx271) / 4 .2byte (.L318 - .Lrtx271) / 4 .2byte (.L317 - .Lrtx271) / 4 .2byte (.L316 - .Lrtx271) / 4 .2byte (.L315 - .Lrtx271) / 4 .2byte (.L314 - .Lrtx271) / 4 .2byte (.L313 - .Lrtx271) / 4 .2byte (.L312 - .Lrtx271) / 4 .2byte (.L311 - .Lrtx271) / 4 .2byte (.L310 - .Lrtx271) / 4 .2byte (.L309 - .Lrtx271) / 4 .2byte (.L308 - .Lrtx271) / 4 .2byte (.L307 - .Lrtx271) / 4 .2byte (.L306 - .Lrtx271) / 4 .2byte (.L305 - .Lrtx271) / 4 .2byte (.L304 - .Lrtx271) / 4 .2byte (.L303 - .Lrtx271) / 4 .2byte (.L302 - .Lrtx271) / 4 .2byte (.L268 - .Lrtx271) / 4 .2byte (.L300 - .Lrtx271) / 4 .2byte (.L299 - .Lrtx271) / 4 .2byte (.L298 - .Lrtx271) / 4 .2byte (.L297 - .Lrtx271) / 4 .2byte (.L296 - .Lrtx271) / 4 .2byte (.L295 - .Lrtx271) / 4 .2byte (.L294 - .Lrtx271) / 4 .2byte (.L293 - .Lrtx271) / 4 .2byte (.L292 - .Lrtx271) / 4 .2byte (.L291 - .Lrtx271) / 4 .2byte (.L290 - .Lrtx271) / 4 .2byte (.L289 - .Lrtx271) / 4 .2byte (.L288 - .Lrtx271) / 4 .2byte (.L287 - .Lrtx271) / 4 .2byte (.L286 - .Lrtx271) / 4 .2byte (.L285 - .Lrtx271) / 4 .2byte (.L284 - .Lrtx271) / 4 .2byte (.L283 - .Lrtx271) / 4 .2byte (.L282 - .Lrtx271) / 4 .2byte (.L281 - .Lrtx271) / 4 .2byte (.L280 - .Lrtx271) / 4 .2byte (.L279 - .Lrtx271) / 4 .2byte (.L278 - .Lrtx271) / 4 .2byte (.L277 - .Lrtx271) / 4 .2byte (.L276 - .Lrtx271) / 4 .2byte (.L275 - .Lrtx271) / 4 .2byte (.L274 - .Lrtx271) / 4 .2byte (.L273 - .Lrtx271) / 4 .2byte (.L272 - .Lrtx271) / 4 .2byte (.L270 - .Lrtx271) / 4 .text .L329: mov w20, w19 b .L268 .L270: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page57 .L272: .cfi_restore_state adrp x0, .LC513 add x0, x0, :lo12:.LC513 bl puts adrp x0, .LC514 add x0, x0, :lo12:.LC514 bl puts adrp x0, .LC515 add x0, x0, :lo12:.LC515 bl puts ldp x19, x20, [sp, 16] adrp x3, .LC516 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 add x3, x3, :lo12:.LC516 adrp x1, .LC517 mov w2, 22 add x1, x1, :lo12:.LC517 mov w0, 33 b choose .L273: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page55 .L274: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page54 .L275: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page53 .L276: .cfi_restore_state adrp x0, .LC478 add x0, x0, :lo12:.LC478 bl puts mov w20, 2 adrp x0, .LC479 add x0, x0, :lo12:.LC479 bl puts b .L268 .L277: adrp x0, .LC476 add x0, x0, :lo12:.LC476 bl puts adrp x0, .LC477 add x0, x0, :lo12:.LC477 .L332: bl puts ldp x19, x20, [sp, 16] mov w0, 32 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b new_clone .L278: .cfi_restore_state adrp x0, .LC473 add x0, x0, :lo12:.LC473 bl puts mov w20, 41 adrp x0, .LC474 add x0, x0, :lo12:.LC474 bl puts adrp x0, .LC475 add x0, x0, :lo12:.LC475 bl puts adrp x0, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 ldr w1, [x0, 8] add w1, w1, 1 str w1, [x0, 8] b .L268 .L279: adrp x0, .LC471 add x0, x0, :lo12:.LC471 bl puts adrp x0, .LC472 add x0, x0, :lo12:.LC472 b .L332 .L280: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page48 .L281: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page47 .L282: .cfi_restore_state adrp x0, .LC454 add x0, x0, :lo12:.LC454 bl puts adrp x0, .LC455 add x0, x0, :lo12:.LC455 bl puts adrp x0, .LC456 add x0, x0, :lo12:.LC456 bl puts ldp x19, x20, [sp, 16] adrp x3, .LC457 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 add x3, x3, :lo12:.LC457 adrp x1, .LC458 mov w2, 54 add x1, x1, :lo12:.LC458 mov w0, 53 b choose .L283: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page45 .L284: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page44 .L285: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page43 .L286: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page42 .L287: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page41 .L288: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page40 .L289: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page39 .L290: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page38 .L291: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page37 .L292: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page36 .L293: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page35 .L294: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page34 .L295: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page33 .L296: .cfi_restore_state adrp x0, .LC295 add x0, x0, :lo12:.LC295 bl puts mov w20, 22 adrp x0, .LC296 add x0, x0, :lo12:.LC296 bl puts adrp x0, .LC297 add x0, x0, :lo12:.LC297 bl puts adrp x0, .LC298 add x0, x0, :lo12:.LC298 bl puts adrp x0, .LC299 add x0, x0, :lo12:.LC299 bl puts b .L268 .L297: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page31 .L298: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page30 .L299: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page29 .L300: .cfi_restore_state adrp x0, .LC263 mov w20, 26 add x0, x0, :lo12:.LC263 bl puts b .L268 .L302: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page26 .L303: .cfi_restore_state adrp x0, .LC253 add x0, x0, :lo12:.LC253 bl puts adrp x0, .LC254 add x0, x0, :lo12:.LC254 bl puts adrp x0, .LC255 add x0, x0, :lo12:.LC255 bl puts ldp x19, x20, [sp, 16] adrp x3, .LC256 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 add x3, x3, :lo12:.LC256 adrp x1, .LC257 mov w2, 26 add x1, x1, :lo12:.LC257 mov w0, 28 b choose .L304: .cfi_restore_state adrp x0, .LC248 add x0, x0, :lo12:.LC248 bl puts adrp x0, .LC249 add x0, x0, :lo12:.LC249 bl puts adrp x0, .LC250 add x0, x0, :lo12:.LC250 bl puts ldp x19, x20, [sp, 16] adrp x3, .LC251 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 add x3, x3, :lo12:.LC251 adrp x1, .LC252 mov w2, 25 add x1, x1, :lo12:.LC252 mov w0, 28 b choose .L305: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page23 .L306: .cfi_restore_state adrp x0, .LC241 add x0, x0, :lo12:.LC241 bl puts bl rand negs w1, w0 and w1, w1, 3 and w0, w0, 3 csneg w0, w0, w1, mi cmp w0, 3 bhi .L268 adrp x1, .LANCHOR2 add x1, x1, :lo12:.LANCHOR2 ldr w20, [x1, w0, uxtw 2] b .L268 .L307: adrp x0, .LC237 add x0, x0, :lo12:.LC237 bl puts adrp x0, .LC238 add x0, x0, :lo12:.LC238 bl puts adrp x0, .LC239 add x0, x0, :lo12:.LC239 bl puts adrp x0, .LC240 add x0, x0, :lo12:.LC240 bl puts ldp x19, x20, [sp, 16] mov w0, 45 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b new_clone .L308: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page20 .L309: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page19 .L310: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page18 .L311: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page17 .L312: .cfi_restore_state adrp x0, .LC196 add x0, x0, :lo12:.LC196 bl puts mov w20, 22 adrp x0, .LC197 add x0, x0, :lo12:.LC197 bl puts adrp x0, .LC198 add x0, x0, :lo12:.LC198 bl puts adrp x0, .LC199 add x0, x0, :lo12:.LC199 bl puts adrp x0, .LC200 add x0, x0, :lo12:.LC200 bl puts adrp x0, .LANCHOR1+4 mov w1, 1 str w1, [x0, #:lo12:.LANCHOR1+4] b .L268 .L313: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page15 .L314: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page14 .L315: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page13 .L316: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page12 .L317: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page11 .L318: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page10 .L319: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page9 .L320: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page8 .L321: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page7 .L322: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page6 .L323: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page5 .L324: .cfi_restore_state adrp x0, .LC62 add x0, x0, :lo12:.LC62 bl puts mov w20, 9 adrp x0, .LC63 add x0, x0, :lo12:.LC63 bl puts adrp x0, .LC64 add x0, x0, :lo12:.LC64 bl puts b .L268 .L325: adrp x0, .LC57 add x0, x0, :lo12:.LC57 bl puts adrp x0, .LC58 add x0, x0, :lo12:.LC58 bl puts adrp x0, .LC59 add x0, x0, :lo12:.LC59 bl puts ldp x19, x20, [sp, 16] adrp x3, .LC60 ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 add x3, x3, :lo12:.LC60 adrp x1, .LC61 mov w2, 5 add x1, x1, :lo12:.LC61 mov w0, 4 b choose .L326: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page2 .L327: .cfi_restore_state adrp x0, .LC42 add x0, x0, :lo12:.LC42 bl puts mov w20, 57 adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl puts adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl puts b .L268 .cfi_endproc .LFE87: .size next_page, .-next_page .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB88: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] .cfi_offset 19, -80 .cfi_offset 20, -72 .cfi_offset 21, -64 .cfi_offset 22, -56 .cfi_offset 23, -48 .cfi_offset 24, -40 adrp x24, :got:stdout adrp x23, .LANCHOR0 stp x25, x26, [sp, 64] .cfi_offset 25, -32 .cfi_offset 26, -24 adrp x25, .LC39 add x21, x25, :lo12:.LC39 str x27, [sp, 80] .cfi_offset 27, -16 bl instructions bl more bl character bl more ldr x22, [x24, #:got_lo12:stdout] .p2align 3,,7 .L338: add x26, x23, :lo12:.LANCHOR0 .L336: ldr w0, [x26, 12] adrp x20, :got:stdin bl next_page str w0, [x26, 12] mov x1, x21 cbz w0, .L350 mov w0, 1 bl __printf_chk ldr x0, [x22] bl fflush ldr x19, [x20, #:got_lo12:stdin] ldr x0, [x19] bl getc and w27, w0, 255 cmp w27, 10 beq .L336 .p2align 3,,7 .L337: ldr x0, [x19] bl getc cmp w0, 10 bne .L337 cmp w27, 112 bne .L338 bl character add x1, x25, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x0, [x24, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x0, [x19] bl getc and w0, w0, 255 cmp w0, 10 beq .L338 ldr x20, [x20, #:got_lo12:stdin] .p2align 3,,7 .L340: ldr x0, [x20] bl getc cmp w0, 10 bne .L340 b .L338 .p2align 2,,3 .L350: 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], 96 .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_offset 0 ret .cfi_endproc .LFE88: .size main, .-main .global killer_count .global blast_door .global plato_clone .global read_letter .global hit_points .global action_doll .global ultra_violet .global computer_request .global page .global clone .data .align 2 .set .LANCHOR0,. + 0 .type clone, %object .size clone, 4 clone: .word 1 .type hit_points, %object .size hit_points, 4 hit_points: .word 10 .type plato_clone, %object .size plato_clone, 4 plato_clone: .word 3 .type page, %object .size page, 4 page: .word 1 .bss .align 2 .set .LANCHOR1,. + 0 .type ultra_violet, %object .size ultra_violet, 4 ultra_violet: .zero 4 .type action_doll, %object .size action_doll, 4 action_doll: .zero 4 .type killer_count, %object .size killer_count, 4 killer_count: .zero 4 .type computer_request, %object .size computer_request, 4 computer_request: .zero 4 .type read_letter, %object .size read_letter, 4 read_letter: .zero 4 .type blast_door, %object .size blast_door, 4 blast_door: .zero 4 .section .rodata .align 3 .set .LANCHOR2,. + 0 .type CSWTCH.56, %object .size CSWTCH.56, 16 CSWTCH.56: .word 18 .word 15 .word 18 .word 29 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "paranoia.c" .text .align 2 .p2align 4,,11 .global get_char .type get_char, %function get_char: .LFB23: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, :got:stdout mov x29, sp ldr x0, [x0, #:got_lo12:stdout] stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x19, :got:stdin ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L2 .p2align 3,,7 .L3: ldr x0, [x19] bl getc cmp w0, 10 bne .L3 .L2: mov w0, w20 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE23: .size get_char, .-get_char .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "\nClone %d just died.\n" .align 3 .LC1: .string "\n*** You Lose ***\n\nAll your clones are dead. Your name has been stricken from the records.\n\n\t\t\tTHE END" .align 3 .LC2: .string "Clone %d now activated.\n" .text .align 2 .p2align 4,,11 .global new_clone .type new_clone, %function new_clone: .LFB25: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 adrp x20, .LANCHOR0 mov w19, w0 ldr w2, [x20, #:lo12:.LANCHOR0] mov w0, 1 bl __printf_chk ldr w2, [x20, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x20, #:lo12:.LANCHOR0] cmp w2, 6 ble .L11 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L11: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 str x21, [sp, 32] .cfi_offset 21, -16 bl __printf_chk add x21, x20, :lo12:.LANCHOR0 adrp x2, .LANCHOR1 add x1, x2, :lo12:.LANCHOR1 mov w0, w19 str wzr, [x2, #:lo12:.LANCHOR1] mov w2, 10 stp wzr, wzr, [x1, 4] str w2, [x21, 4] ldp x19, x20, [sp, 16] ldr x21, [sp, 32] .cfi_restore 21 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 .LFE25: .size new_clone, .-new_clone .align 2 .p2align 4,,11 .global dice_roll .type dice_roll, %function dice_roll: .LFB26: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x21, [sp, 32] cmp w0, 0 .cfi_offset 21, -16 ble .L17 stp x19, x20, [sp, 16] .cfi_offset 20, -24 .cfi_offset 19, -32 mov w19, w0 mov w20, w1 mov w21, 0 .p2align 3,,7 .L16: bl rand sdiv w2, w0, w20 subs w19, w19, #1 msub w2, w2, w20, w0 add w2, w2, 1 add w21, w21, w2 bne .L16 mov w0, w21 ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L17: .cfi_def_cfa_offset 48 .cfi_offset 21, -16 .cfi_offset 29, -48 .cfi_offset 30, -40 mov w21, 0 mov w0, w21 ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE26: .size dice_roll, .-dice_roll .section .rodata.str1.8 .align 3 .LC3: .string "\n\n\n\nWelcome to Paranoia!\n" .align 3 .LC4: .string "HOW TO PLAY:\n" .align 3 .LC5: .string " Just press <RETURN> until you are asked to make a choice." .align 3 .LC6: .string " Select 'a' or 'b' or whatever for your choice, then press <RETURN>." .align 3 .LC7: .string " You may select 'p' at any time to get a display of your statistics." .align 3 .LC8: .string " Always choose the least dangerous option. Continue doing this until you win." .align 3 .LC9: .string " At times you will use a skill or engage in combat and and will be informed of" .align 3 .LC10: .string " the outcome. These sections will be self explanatory.\n" .align 3 .LC11: .string "HOW TO DIE:\n" .align 3 .LC12: .string " As Philo-R-DMD you will die at times during the adventure." .align 3 .LC13: .string " When this happens you will be given an new clone at a particular location." .align 3 .LC14: .string " The new Philo-R will usually have to retrace some of the old Philo-R's path;" .align 3 .LC15: .string " hopefully he won't make the same mistake as his predecessor.\n" .align 3 .LC16: .string "HOW TO WIN:\n" .align 3 .LC17: .string " Simply complete the mission before you expend all six clones." .align 3 .LC18: .string " If you make it, congratulations." .align 3 .LC19: .string " If not, you can try again later." .text .align 2 .p2align 4,,11 .global instructions .type instructions, %function instructions: .LFB27: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC3 add x0, x0, :lo12:.LC3 mov x29, sp bl puts adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl puts adrp x0, .LC5 add x0, x0, :lo12:.LC5 bl puts adrp x0, .LC6 add x0, x0, :lo12:.LC6 bl puts adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl puts adrp x0, .LC8 add x0, x0, :lo12:.LC8 bl puts adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl puts adrp x0, .LC10 add x0, x0, :lo12:.LC10 bl puts adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl puts adrp x0, .LC12 add x0, x0, :lo12:.LC12 bl puts adrp x0, .LC13 add x0, x0, :lo12:.LC13 bl puts adrp x0, .LC14 add x0, x0, :lo12:.LC14 bl puts adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl puts adrp x0, .LC16 add x0, x0, :lo12:.LC16 bl puts adrp x0, .LC17 add x0, x0, :lo12:.LC17 bl puts adrp x0, .LC18 add x0, x0, :lo12:.LC18 bl puts ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x0, .LC19 add x0, x0, :lo12:.LC19 b puts .cfi_endproc .LFE27: .size instructions, .-instructions .section .rodata.str1.8 .align 3 .LC20: .string "===============================================================================" .align 3 .LC21: .string "The Character : Philo-R-DMD %d\n" .align 3 .LC22: .string "Primary Attributes Secondary Attributes" .align 3 .LC23: .string "Strength ..................... 13 Carrying Capacity ................. 30" .align 3 .LC24: .string "Endurance .................... 13 Damage Bonus ....................... 0" .align 3 .LC25: .string "Agility ...................... 15 Macho Bonus ....................... -1" .align 3 .LC26: .string "Manual Dexterity ............. 15 Melee Bonus ...................... +5%%\n" .align 3 .LC27: .string "Moxie ........................ 13 Aimed Weapon Bonus .............. +10%%\n" .align 3 .LC28: .string "Chutzpah ...................... 8 Comprehension Bonus .............. +4%%\n" .align 3 .LC29: .string "Mechanical Aptitude .......... 14 Believability Bonus .............. +5%%\n" .align 3 .LC30: .string "Power Index .................. 10 Repair Bonus ..................... +5%%\n" .align 3 .LC31: .string "Credits: 160 Secret Society: Illuminati Secret Society Rank: 1" .align 3 .LC32: .string "Service Group: Power Services Mutant Power: Precognition" .align 3 .LC33: .string "Weapon: laser pistol; to hit, 40%%; type, L; Range, 50m; Reload, 6r; Malfnt, 00\n" .align 3 .LC34: .string "Skills: Basics 1(20%%), Aimed Weapon Combat 2(35%%), Laser 3(40%%),\n Personal Development 1(20%%), Communications 2(29%%), Intimidation 3(34%%)\n" .align 3 .LC35: .string "Equipment: Red Reflec Armour, Laser Pistol, Laser Barrel (red)," .align 3 .LC36: .string " Notebook & Stylus, Knife, Com Unit 1, Jump suit," .align 3 .LC37: .string " Secret Illuminati Eye-In-The-Pyramid(tm) Decoder ring," .align 3 .LC38: .string " Utility Belt & Pouches" .text .align 2 .p2align 4,,11 .global character .type character, %function character: .LFB28: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -16 adrp x19, .LC20 add x19, x19, :lo12:.LC20 mov x0, x19 bl puts adrp x2, .LANCHOR0 adrp x1, .LC21 add x1, x1, :lo12:.LC21 mov w0, 1 ldr w2, [x2, #:lo12:.LANCHOR0] bl __printf_chk adrp x0, .LC22 add x0, x0, :lo12:.LC22 bl puts mov x0, x19 bl puts adrp x0, .LC23 add x0, x0, :lo12:.LC23 bl puts adrp x0, .LC24 add x0, x0, :lo12:.LC24 bl puts adrp x0, .LC25 add x0, x0, :lo12:.LC25 bl puts adrp x1, .LC26 mov w0, 1 add x1, x1, :lo12:.LC26 bl __printf_chk adrp x1, .LC27 mov w0, 1 add x1, x1, :lo12:.LC27 bl __printf_chk adrp x1, .LC28 mov w0, 1 add x1, x1, :lo12:.LC28 bl __printf_chk adrp x1, .LC29 mov w0, 1 add x1, x1, :lo12:.LC29 bl __printf_chk adrp x1, .LC30 add x1, x1, :lo12:.LC30 mov w0, 1 bl __printf_chk mov x0, x19 bl puts adrp x0, .LC31 add x0, x0, :lo12:.LC31 bl puts adrp x0, .LC32 add x0, x0, :lo12:.LC32 bl puts adrp x1, .LC33 mov w0, 1 add x1, x1, :lo12:.LC33 bl __printf_chk adrp x1, .LC34 add x1, x1, :lo12:.LC34 mov w0, 1 bl __printf_chk adrp x0, .LC35 add x0, x0, :lo12:.LC35 bl puts adrp x0, .LC36 add x0, x0, :lo12:.LC36 bl puts adrp x0, .LC37 add x0, x0, :lo12:.LC37 bl puts adrp x0, .LC38 add x0, x0, :lo12:.LC38 bl puts mov x0, x19 ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 b puts .cfi_endproc .LFE28: .size character, .-character .section .rodata.str1.8 .align 3 .LC39: .string "---------- More ----------" .text .align 2 .p2align 4,,11 .global more .type more, %function more: .LFB24: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 mov w0, 1 mov x29, sp stp x21, x22, [sp, 32] .cfi_offset 21, -32 .cfi_offset 22, -24 adrp x22, :got:stdout adrp x21, :got:stdin stp x19, x20, [sp, 16] str x23, [sp, 48] .cfi_offset 19, -48 .cfi_offset 20, -40 .cfi_offset 23, -16 adrp x23, .LC39 add x1, x23, :lo12:.LC39 bl __printf_chk ldr x0, [x22, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x21, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L25 .p2align 3,,7 .L26: ldr x0, [x19] bl getc cmp w0, 10 bne .L26 cmp w20, 112 beq .L37 .L25: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L37: .cfi_restore_state bl character add x1, x23, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x22, [x22, #:got_lo12:stdout] ldr x0, [x22] bl fflush ldr x0, [x19] bl getc and w0, w0, 255 cmp w0, 10 beq .L25 ldr x21, [x21, #:got_lo12:stdin] .p2align 3,,7 .L27: ldr x0, [x21] bl getc cmp w0, 10 bne .L27 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE24: .size more, .-more .section .rodata.str1.8 .align 3 .LC40: .string "\nSelect 'a' or 'b' :" .align 3 .LC41: .string " a - %s.\n b - %s.\n" .text .align 2 .p2align 4,,11 .global choose .type choose, %function choose: .LFB29: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x19, x1 mov w20, w0 adrp x0, .LC40 add x0, x0, :lo12:.LC40 stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 mov x21, x3 mov w22, w2 bl puts mov x3, x21 mov x2, x19 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout adrp x19, :got:stdin ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w21, w0, 255 cmp w21, 10 beq .L39 .p2align 3,,7 .L40: ldr x0, [x19] bl getc cmp w0, 10 bne .L40 mov w0, w20 cmp w21, 97 bne .L39 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L39: .cfi_restore_state mov w0, w22 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE29: .size choose, .-choose .section .rodata.str1.8 .align 3 .LC42: .string " You wake up face down on the red and pink checked E-Z-Kleen linoleum floor." .align 3 .LC43: .string " You recognise the pattern, it's the type preferred in the internal security\nbriefing cells. When you finally look around you, you see that you are alone" .align 3 .LC44: .string "in a large mission briefing room." .text .align 2 .p2align 4,,11 .global page1 .type page1, %function page1: .LFB30: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC42 add x0, x0, :lo12:.LC42 mov x29, sp bl puts adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl puts adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl puts mov w0, 57 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE30: .size page1, .-page1 .section .rodata.str1.8 .align 3 .LC45: .string "\"Greetings,\" says the kindly Internal Security self incrimination expert who" .align 3 .LC46: .string "meets you at the door, \"How are we doing today?\" He offers you a doughnut" .align 3 .LC47: .string "and coffee and asks what brings you here. This doesn't seem so bad, so you" .align 3 .LC48: .string "tell him that you have come to confess some possible security lapses. He" .align 3 .LC49: .string "smiles knowingly, deftly catching your coffee as you slump to the floor." .align 3 .LC50: .string "\"Nothing to be alarmed about; it's just the truth serum,\" he says," .align 3 .LC51: .string "dragging you back into a discussion room." .align 3 .LC52: .string "The next five hours are a dim haze, but you can recall snatches of conversation" .align 3 .LC53: .string "about your secret society, your mutant power, and your somewhat paranoid" .align 3 .LC54: .string "distrust of The Computer. This should explain why you are hogtied and moving" .align 3 .LC55: .string "slowly down the conveyer belt towards the meat processing unit in Food" .align 3 .LC56: .string "Services." .text .align 2 .p2align 4,,11 .global page2 .type page2, %function page2: .LFB31: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 adrp x0, .LC45 add x0, x0, :lo12:.LC45 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -48 .cfi_offset 20, -40 .cfi_offset 21, -32 .cfi_offset 22, -24 bl puts adrp x0, .LC46 add x0, x0, :lo12:.LC46 bl puts adrp x0, .LC47 add x0, x0, :lo12:.LC47 bl puts adrp x21, .LANCHOR1 adrp x0, .LC48 add x0, x0, :lo12:.LC48 bl puts add x20, x21, :lo12:.LANCHOR1 adrp x0, .LC49 add x0, x0, :lo12:.LC49 bl puts adrp x0, .LC50 add x0, x0, :lo12:.LC50 bl puts adrp x0, .LC51 add x0, x0, :lo12:.LC51 bl puts adrp x0, .LC52 add x0, x0, :lo12:.LC52 bl puts adrp x0, .LC53 add x0, x0, :lo12:.LC53 bl puts adrp x0, .LC54 add x0, x0, :lo12:.LC54 bl puts adrp x0, .LC55 add x0, x0, :lo12:.LC55 bl puts adrp x0, .LC56 add x0, x0, :lo12:.LC56 bl puts ldr w19, [x20, 12] cmp w19, 1 beq .L57 adrp x19, .LANCHOR0 adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 ldr w2, [x19, #:lo12:.LANCHOR0] add x22, x19, :lo12:.LANCHOR0 bl __printf_chk ldr w2, [x19, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x19, #:lo12:.LANCHOR0] cmp w2, 6 ble .L58 .L55: adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L58: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk mov w1, 10 str wzr, [x21, #:lo12:.LANCHOR1] mov w0, 32 stp wzr, wzr, [x20, 4] str w1, [x22, 4] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L57: .cfi_restore_state adrp x22, .LANCHOR0 mov w0, w19 adrp x1, .LC0 add x1, x1, :lo12:.LC0 ldr w2, [x22, #:lo12:.LANCHOR0] str x23, [sp, 48] .cfi_offset 23, -16 add x23, x22, :lo12:.LANCHOR0 bl __printf_chk ldr w2, [x22, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x22, #:lo12:.LANCHOR0] cmp w2, 6 ble .L53 ldr x23, [sp, 48] .cfi_remember_state .cfi_restore 23 b .L55 .p2align 2,,3 .L53: .cfi_restore_state mov w0, w19 adrp x1, .LC2 add x1, x1, :lo12:.LC2 bl __printf_chk mov w1, 10 str wzr, [x21, #:lo12:.LANCHOR1] mov w0, 45 stp wzr, wzr, [x20, 4] str w1, [x23, 4] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] .cfi_restore 23 ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE31: .size page2, .-page2 .section .rodata.str1.8 .align 3 .LC57: .string "You walk to the nearest Computer terminal and request more information about" .align 3 .LC58: .string "Christmas. The Computer says, \"That is an A-1 ULTRAVIOLET ONLY IMMEDIATE" .align 3 .LC59: .string "TERMINATION classified topic. What is your clearance please, Troubleshooter?\"" .align 3 .LC60: .string "You lie and claim Ultraviolet clearance" .align 3 .LC61: .string "You give your correct clearance" .text .align 2 .p2align 4,,11 .global page3 .type page3, %function page3: .LFB32: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC57 add x0, x0, :lo12:.LC57 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC58 add x0, x0, :lo12:.LC58 bl puts adrp x0, .LC59 add x0, x0, :lo12:.LC59 bl puts adrp x19, :got:stdin adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC60 adrp x2, .LC61 add x3, x3, :lo12:.LC60 add x2, x2, :lo12:.LC61 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L60 .p2align 3,,7 .L61: ldr x0, [x19] bl getc cmp w0, 10 bne .L61 mov w0, 4 cmp w20, 97 bne .L60 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L60: .cfi_restore_state mov w0, 5 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE32: .size page3, .-page3 .section .rodata.str1.8 .align 3 .LC62: .string "\"That is classified information, Troubleshooter, thank you for your inquiry." .align 3 .LC63: .string " Please report to an Internal Security self incrimination station as soon as" .align 3 .LC64: .string " possible.\"" .text .align 2 .p2align 4,,11 .global page4 .type page4, %function page4: .LFB33: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC62 add x0, x0, :lo12:.LC62 mov x29, sp bl puts adrp x0, .LC63 add x0, x0, :lo12:.LC63 bl puts adrp x0, .LC64 add x0, x0, :lo12:.LC64 bl puts mov w0, 9 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE33: .size page4, .-page4 .section .rodata.str1.8 .align 3 .LC65: .string "The computer says, \"Troubleshooter, you are not wearing the correct colour" .align 3 .LC66: .string "uniform. You must put on an Ultraviolet uniform immediately. I have seen to" .align 3 .LC67: .string "your needs and ordered one already; it will be here shortly. Please wait with" .align 3 .LC68: .string "your back to the wall until it arrives.\" In less than a minute an infrared" .align 3 .LC69: .string "arrives carrying a white bundle. He asks you to sign for it, then hands it to" .align 3 .LC70: .string "you and stands back, well outside of a fragmentation grenade's blast radius." .align 3 .LC71: .string "You finally come to your senses and run for it" .align 3 .LC72: .string "You open the package and put on the uniform" .text .align 2 .p2align 4,,11 .global page5 .type page5, %function page5: .LFB34: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC65 add x0, x0, :lo12:.LC65 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC66 add x0, x0, :lo12:.LC66 bl puts adrp x0, .LC67 add x0, x0, :lo12:.LC67 bl puts adrp x19, :got:stdin adrp x0, .LC68 add x0, x0, :lo12:.LC68 bl puts adrp x0, .LC69 add x0, x0, :lo12:.LC69 bl puts adrp x0, .LC70 add x0, x0, :lo12:.LC70 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x3, .LC71 adrp x2, .LC72 add x3, x3, :lo12:.LC71 add x2, x2, :lo12:.LC72 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L73 .p2align 3,,7 .L74: ldr x0, [x19] bl getc cmp w0, 10 bne .L74 mov w0, 6 cmp w20, 97 bne .L73 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L73: .cfi_restore_state mov w0, 7 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE34: .size page5, .-page5 .section .rodata.str1.8 .align 3 .LC73: .string "The uniform definitely makes you look snappy and pert. It really looks" .align 3 .LC74: .string "impressive, and even has the new lopsided lapel fashion that you admire so" .align 3 .LC75: .string "much. What's more, citizens of all ranks come to obsequious attention as you" .align 3 .LC76: .string "walk past. This isn't so bad being an Ultraviolet. You could probably come" .align 3 .LC77: .string "to like it, given time." .align 3 .LC78: .string "The beeping computer terminal interrupts your musings." .text .align 2 .p2align 4,,11 .global page6 .type page6, %function page6: .LFB35: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC73 add x0, x0, :lo12:.LC73 mov x29, sp bl puts adrp x0, .LC74 add x0, x0, :lo12:.LC74 bl puts adrp x0, .LC75 add x0, x0, :lo12:.LC75 bl puts adrp x0, .LC76 add x0, x0, :lo12:.LC76 bl puts adrp x0, .LC77 add x0, x0, :lo12:.LC77 bl puts adrp x0, .LC78 add x0, x0, :lo12:.LC78 bl puts adrp x1, .LANCHOR1 mov w2, 1 mov w0, 8 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 str w2, [x1, #:lo12:.LANCHOR1] ret .cfi_endproc .LFE35: .size page6, .-page6 .section .rodata.str1.8 .align 3 .LC79: .string "The corridor lights dim and are replaced by red battle lamps as the Security" .align 3 .LC80: .string "Breach alarms howl all around you. You run headlong down the corridor and" .align 3 .LC81: .string "desperately windmill around a corner, only to collide with a squad of 12 Blue" .align 3 .LC82: .string "clearance Vulture squadron soldiers. \"Stop, Slime Face,\" shouts the" .align 3 .LC83: .string "commander, \"or there won't be enough of you left for a tissue sample.\"" .align 3 .LC84: .string "\"All right, soldiers, stuff the greasy traitor into the uniform,\" he orders," .align 3 .LC85: .string "waving the business end of his blue laser scant inches from your nose." .align 3 .LC86: .string "With his other hand he shakes open a white bundle to reveal a pristine new" .align 3 .LC87: .string "Ultraviolet citizen's uniform." .align 3 .LC88: .string "One of the Vulture squadron Troubleshooters grabs you by the neck in the" .align 3 .LC89: .string "exotic and very painful Vulture Clamp(tm) death grip (you saw a special about" .align 3 .LC90: .string "it on the Teela O'Malley show), while the rest tear off your clothes and" .align 3 .LC91: .string "force you into the Ultraviolet uniform. The moment you are dressed they step" .align 3 .LC92: .string "clear and stand at attention." .align 3 .LC93: .string "\"Thank you for your cooperation, sir,\" says the steely eyed leader of the" .align 3 .LC94: .string "Vulture Squad. \"We will be going about our business now.\" With perfect" .align 3 .LC95: .string "timing the Vultures wheel smartly and goosestep down the corridor." .align 3 .LC96: .string "Special Note: don't make the mistake of assuming that your skills have" .align 3 .LC97: .string "improved any because of the uniform; you're only a Red Troubleshooter" .align 3 .LC98: .string "traitorously posing as an Ultraviolet, and don't you forget it!" .align 3 .LC99: .string "Suddenly, a computer terminal comes to life beside you." .text .align 2 .p2align 4,,11 .global page7 .type page7, %function page7: .LFB36: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC79 add x0, x0, :lo12:.LC79 mov x29, sp bl puts adrp x0, .LC80 add x0, x0, :lo12:.LC80 bl puts adrp x0, .LC81 add x0, x0, :lo12:.LC81 bl puts adrp x0, .LC82 add x0, x0, :lo12:.LC82 bl puts adrp x0, .LC83 add x0, x0, :lo12:.LC83 bl puts adrp x0, .LC84 add x0, x0, :lo12:.LC84 bl puts adrp x0, .LC85 add x0, x0, :lo12:.LC85 bl puts adrp x0, .LC86 add x0, x0, :lo12:.LC86 bl puts adrp x0, .LC87 add x0, x0, :lo12:.LC87 bl puts adrp x0, .LC88 add x0, x0, :lo12:.LC88 bl puts adrp x0, .LC89 add x0, x0, :lo12:.LC89 bl puts adrp x0, .LC90 add x0, x0, :lo12:.LC90 bl puts adrp x0, .LC91 add x0, x0, :lo12:.LC91 bl puts adrp x0, .LC92 add x0, x0, :lo12:.LC92 bl puts adrp x0, .LC93 add x0, x0, :lo12:.LC93 bl puts adrp x0, .LC94 add x0, x0, :lo12:.LC94 bl puts adrp x0, .LC95 add x0, x0, :lo12:.LC95 bl puts adrp x0, .LC96 add x0, x0, :lo12:.LC96 bl puts adrp x0, .LC97 add x0, x0, :lo12:.LC97 bl puts adrp x0, .LC98 add x0, x0, :lo12:.LC98 bl puts adrp x0, .LC99 add x0, x0, :lo12:.LC99 bl puts adrp x1, .LANCHOR1 mov w2, 1 mov w0, 8 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 str w2, [x1, #:lo12:.LANCHOR1] ret .cfi_endproc .LFE36: .size page7, .-page7 .section .rodata.str1.8 .align 3 .LC100: .string "\"Now, about your question, citizen. Christmas was an old world marketing ploy" .align 3 .LC101: .string "to induce lower clearance citizens to purchase vast quantities of goods, thus" .align 3 .LC102: .string "accumulation a large amount of credit under the control of a single class of" .align 3 .LC103: .string "citizen known as Retailers. The strategy used is to imply that all good" .align 3 .LC104: .string "citizens give gifts during Christmas, thus if one wishes to be a valuable" .align 3 .LC105: .string "member of society one must also give gifts during Christmas. More valuable" .align 3 .LC106: .string "gifts make one a more valuable member, and thus did the Retailers come to" .align 3 .LC107: .string "control a disproportionate amount of the currency. In this way Christmas" .align 3 .LC108: .string "eventually caused the collapse of the old world. Understandably, Christmas" .align 3 .LC109: .string "has been declared a treasonable practice in Alpha Complex." .align 3 .LC110: .string "Thank you for your inquiry.\"" .align 3 .LC111: .string "You continue on your way to GDH7-beta." .text .align 2 .p2align 4,,11 .global page8 .type page8, %function page8: .LFB37: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC100 add x0, x0, :lo12:.LC100 mov x29, sp bl puts adrp x0, .LC101 add x0, x0, :lo12:.LC101 bl puts adrp x0, .LC102 add x0, x0, :lo12:.LC102 bl puts adrp x0, .LC103 add x0, x0, :lo12:.LC103 bl puts adrp x0, .LC104 add x0, x0, :lo12:.LC104 bl puts adrp x0, .LC105 add x0, x0, :lo12:.LC105 bl puts adrp x0, .LC106 add x0, x0, :lo12:.LC106 bl puts adrp x0, .LC107 add x0, x0, :lo12:.LC107 bl puts adrp x0, .LC108 add x0, x0, :lo12:.LC108 bl puts adrp x0, .LC109 add x0, x0, :lo12:.LC109 bl puts adrp x0, .LC110 add x0, x0, :lo12:.LC110 bl puts adrp x0, .LC111 add x0, x0, :lo12:.LC111 bl puts mov w0, 10 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE37: .size page8, .-page8 .section .rodata.str1.8 .align 3 .LC112: .string "As you walk toward the tubecar that will take you to GDH7-beta, you pass one" .align 3 .LC113: .string "of the bright blue and orange Internal Security self incrimination stations." .align 3 .LC114: .string "Inside, you can see an IS agent cheerfully greet an infrared citizen and then" .align 3 .LC115: .string "lead him at gunpoint into one of the rubber lined discussion rooms." .align 3 .LC116: .string "You just continue blithely on past" .align 3 .LC117: .string "You decide to stop here and chat, as ordered by The Computer" .text .align 2 .p2align 4,,11 .global page9 .type page9, %function page9: .LFB38: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC112 add x0, x0, :lo12:.LC112 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC113 add x0, x0, :lo12:.LC113 bl puts adrp x0, .LC114 add x0, x0, :lo12:.LC114 bl puts adrp x19, :got:stdin adrp x0, .LC115 add x0, x0, :lo12:.LC115 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x3, .LC116 adrp x2, .LC117 add x3, x3, :lo12:.LC116 add x2, x2, :lo12:.LC117 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L90 .p2align 3,,7 .L91: ldr x0, [x19] bl getc cmp w0, 10 bne .L91 cmp w20, 97 bne .L90 adrp x1, .LANCHOR1+12 mov w2, 1 mov w0, 2 str w2, [x1, #:lo12:.LANCHOR1+12] ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L90: .cfi_restore_state adrp x1, .LANCHOR1+12 mov w2, 0 mov w0, 10 str w2, [x1, #:lo12:.LANCHOR1+12] ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE38: .size page9, .-page9 .section .rodata.str1.8 .align 3 .LC118: .string "You stroll briskly down the corridor, up a ladder, across an unrailed catwalk," .align 3 .LC119: .string "under a perilously swinging blast door in urgent need of repair, and into" .align 3 .LC120: .string "tubecar grand central. This is the bustling hub of Alpha Complex tubecar" .align 3 .LC121: .string "transportation. Before you spreads a spaghetti maze of magnalift tube tracks" .align 3 .LC122: .string "and linear accelerators. You bravely study the specially enhanced 3-D tube" .align 3 .LC123: .string "route map; you wouldn't be the first Troubleshooter to take a fast tube ride" .align 3 .LC124: .string "to nowhere." .align 3 .LC125: .string "You nervously select a tubecar and step aboard." .align 3 .LC126: .string "You think you have the route worked out, so you'll board a tube train" .align 3 .LC127: .string "You decide to ask The Computer about Christmas using a nearby terminal" .align 3 .LC128: .string "You just caught a purple line tubecar." .align 3 .LC129: .string "You just caught a brown line tubecar." .text .align 2 .p2align 4,,11 .global page10 .type page10, %function page10: .LFB39: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC118 add x0, x0, :lo12:.LC118 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC119 add x0, x0, :lo12:.LC119 bl puts adrp x0, .LC120 add x0, x0, :lo12:.LC120 bl puts adrp x0, .LC121 add x0, x0, :lo12:.LC121 bl puts adrp x0, .LC122 add x0, x0, :lo12:.LC122 bl puts adrp x0, .LC123 add x0, x0, :lo12:.LC123 bl puts adrp x0, .LC124 add x0, x0, :lo12:.LC124 bl puts adrp x0, .LANCHOR1 ldr w0, [x0, #:lo12:.LANCHOR1] cbnz w0, .L103 adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x19, :got:stdin adrp x3, .LC126 adrp x2, .LC127 add x3, x3, :lo12:.LC126 add x2, x2, :lo12:.LC127 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L103 .p2align 3,,7 .L104: ldr x0, [x19] bl getc cmp w0, 10 bne .L104 mov w0, 3 cmp w20, 97 beq .L99 .p2align 3,,7 .L103: adrp x0, .LC125 add x0, x0, :lo12:.LC125 bl puts bl rand mov w19, w0 bl rand mov w2, 26215 movk w2, 0x6666, lsl 16 smull x1, w19, w2 smull x2, w0, w2 asr x1, x1, 34 asr x2, x2, 34 sub w1, w1, w19, asr 31 sub w2, w2, w0, asr 31 add w1, w1, w1, lsl 2 add w2, w2, w2, lsl 2 sub w1, w19, w1, lsl 1 sub w2, w0, w2, lsl 1 add w0, w1, w2 add w0, w0, 2 cmp w0, 12 ble .L101 adrp x0, .LC129 add x0, x0, :lo12:.LC129 bl puts mov w0, 48 .L99: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L101: .cfi_restore_state adrp x0, .LC128 add x0, x0, :lo12:.LC128 bl puts mov w0, 13 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE39: .size page10, .-page10 .section .rodata.str1.8 .align 3 .LC130: .string "The printing on the folder says \"Experimental Self Briefing.\"" .align 3 .LC131: .string "You open it and begin to read the following:" .align 3 .LC132: .string "Step 1: Compel the briefing subject to attend the briefing." .align 3 .LC133: .string " Note: See Experimental Briefing Sub Form Indigo-WY-2," .align 3 .LC134: .string " 'Experimental Self Briefing Subject Acquisition Through The Use Of" .align 3 .LC135: .string " Neurotoxin Room Foggers.'" .align 3 .LC136: .string "Step 2: Inform the briefing subject that the briefing has begun." .align 3 .LC137: .string " ATTENTION: THE BRIEFING HAS BEGUN." .align 3 .LC138: .string "Step 3: Present the briefing material to the briefing subject." .align 3 .LC139: .string " GREETINGS TROUBLESHOOTER." .align 3 .LC140: .string " YOU HAVE BEEN SPECIALLY SELECTED TO SINGLEHANDEDLY" .align 3 .LC141: .string " WIPE OUT A DEN OF TRAITOROUS CHRISTMAS ACTIVITY. YOUR MISSION IS TO" .align 3 .LC142: .string " GO TO GOODS DISTRIBUTION HALL 7-BETA AND ASSESS ANY CHRISTMAS ACTIVITY" .align 3 .LC143: .string " YOU FIND THERE. YOU ARE TO INFILTRATE THESE CHRISTMAS CELEBRANTS," .align 3 .LC144: .string " LOCATE THEIR RINGLEADER, AN UNKNOWN MASTER RETAILER, AND BRING HIM" .align 3 .LC145: .string " BACK FOR EXECUTION AND TRIAL. THANK YOU. THE COMPUTER IS YOUR FRIEND." .align 3 .LC146: .string "Step 4: Sign the briefing subject's briefing release form to indicate that" .align 3 .LC147: .string " the briefing subject has completed the briefing." .align 3 .LC148: .string " ATTENTION: PLEASE SIGN YOUR BRIEFING RELEASE FORM." .align 3 .LC149: .string "Step 5: Terminate the briefing" .align 3 .LC150: .string " ATTENTION: THE BRIEFING IS TERMINATED." .align 3 .LC151: .string "You walk to the door and hold your signed briefing release form up to the" .align 3 .LC152: .string "plexiglass window. A guard scrutinises it for a moment and then slides back" .align 3 .LC153: .string "the megabolts holding the door shut. You are now free to continue the" .align 3 .LC154: .string "mission." .align 3 .LC155: .string "You have decided to go directly to Goods Distribution Hall 7-beta" .align 3 .LC156: .string "You wish to ask The Computer for more information about Christmas" .text .align 2 .p2align 4,,11 .global page11 .type page11, %function page11: .LFB40: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 adrp x0, .LC130 add x0, x0, :lo12:.LC130 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -48 .cfi_offset 20, -40 adrp x19, :got:stdin stp x21, x22, [sp, 32] .cfi_offset 21, -32 .cfi_offset 22, -24 adrp x21, :got:stdout str x23, [sp, 48] .cfi_offset 23, -16 bl puts adrp x0, .LC131 add x0, x0, :lo12:.LC131 bl puts adrp x23, .LC39 adrp x0, .LC132 add x0, x0, :lo12:.LC132 bl puts adrp x0, .LC133 add x0, x0, :lo12:.LC133 bl puts adrp x0, .LC134 add x0, x0, :lo12:.LC134 bl puts adrp x0, .LC135 add x0, x0, :lo12:.LC135 bl puts adrp x0, .LC136 add x0, x0, :lo12:.LC136 bl puts adrp x0, .LC137 add x0, x0, :lo12:.LC137 bl puts adrp x0, .LC138 add x0, x0, :lo12:.LC138 bl puts adrp x0, .LC139 add x0, x0, :lo12:.LC139 bl puts adrp x0, .LC140 add x0, x0, :lo12:.LC140 bl puts adrp x0, .LC141 add x0, x0, :lo12:.LC141 bl puts adrp x0, .LC142 add x0, x0, :lo12:.LC142 bl puts adrp x0, .LC143 add x0, x0, :lo12:.LC143 bl puts adrp x0, .LC144 add x0, x0, :lo12:.LC144 bl puts adrp x0, .LC145 add x0, x0, :lo12:.LC145 bl puts adrp x0, .LC146 add x0, x0, :lo12:.LC146 bl puts adrp x0, .LC147 add x0, x0, :lo12:.LC147 bl puts adrp x0, .LC148 add x0, x0, :lo12:.LC148 bl puts adrp x0, .LC149 add x0, x0, :lo12:.LC149 bl puts adrp x0, .LC150 add x0, x0, :lo12:.LC150 bl puts add x1, x23, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x0, [x21, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x20, [x19, #:got_lo12:stdin] ldr x0, [x20] bl getc and w22, w0, 255 cmp w22, 10 beq .L115 .p2align 3,,7 .L116: ldr x0, [x20] bl getc cmp w0, 10 bne .L116 cmp w22, 112 beq .L136 .L115: adrp x0, .LC151 add x0, x0, :lo12:.LC151 bl puts adrp x0, .LC152 add x0, x0, :lo12:.LC152 bl puts adrp x0, .LC153 add x0, x0, :lo12:.LC153 bl puts adrp x0, .LC154 add x0, x0, :lo12:.LC154 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x3, .LC155 adrp x2, .LC156 add x3, x3, :lo12:.LC155 add x2, x2, :lo12:.LC156 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk ldr x21, [x21, #:got_lo12:stdout] ldr x0, [x21] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L118 .p2align 3,,7 .L119: ldr x0, [x19] bl getc cmp w0, 10 bne .L119 mov w0, 3 cmp w20, 97 bne .L118 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L118: .cfi_restore_state mov w0, 10 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L136: .cfi_restore_state bl character add x1, x23, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x0, [x21, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x0, [x20] bl getc and w0, w0, 255 cmp w0, 10 beq .L115 ldr x20, [x19, #:got_lo12:stdin] .p2align 3,,7 .L117: ldr x0, [x20] bl getc cmp w0, 10 bne .L117 b .L115 .cfi_endproc .LFE40: .size page11, .-page11 .section .rodata.str1.8 .align 3 .LC157: .string "You walk up to the door and push the button labelled \"push to exit.\"" .align 3 .LC158: .string "Within seconds a surly looking guard shoves his face into the small plexiglass" .align 3 .LC159: .string "window. You can see his mouth forming words but you can't hear any of them." .align 3 .LC160: .string "You just stare at him blankly for a few moments until he points down to a" .align 3 .LC161: .string "speaker on your side of the door. When you put your ear to it you can barely" .align 3 .LC162: .string "hear him say, \"Let's see your briefing release form, bud. You aren't" .align 3 .LC163: .string "getting out of here without it.\"" .align 3 .LC164: .string "You stare around the room some more" .align 3 .LC165: .string "You sit down at the table and read the Orange packet" .text .align 2 .p2align 4,,11 .global page12 .type page12, %function page12: .LFB41: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC157 add x0, x0, :lo12:.LC157 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC158 add x0, x0, :lo12:.LC158 bl puts adrp x0, .LC159 add x0, x0, :lo12:.LC159 bl puts adrp x19, :got:stdin adrp x0, .LC160 add x0, x0, :lo12:.LC160 bl puts adrp x0, .LC161 add x0, x0, :lo12:.LC161 bl puts adrp x0, .LC162 add x0, x0, :lo12:.LC162 bl puts adrp x0, .LC163 add x0, x0, :lo12:.LC163 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC164 adrp x2, .LC165 add x3, x3, :lo12:.LC164 add x2, x2, :lo12:.LC165 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L138 .p2align 3,,7 .L139: ldr x0, [x19] bl getc cmp w0, 10 bne .L139 mov w0, 11 cmp w20, 97 bne .L138 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L138: .cfi_restore_state mov w0, 57 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size page12, .-page12 .section .rodata.str1.8 .align 3 .LC166: .string "You step into the shiny plasteel tubecar, wondering why the shape has always" .align 3 .LC167: .string "reminded you of bullets. The car shoots forward the instant your feet touch" .align 3 .LC168: .string "the slippery gray floor, pinning you immobile against the back wall as the" .align 3 .LC169: .string "tubecar careens toward GDH7-beta. Your only solace is the knowledge that it" .align 3 .LC170: .string "could be worse, much worse." .align 3 .LC171: .string "Before too long the car comes to a stop. You can see signs for GDH7-beta" .align 3 .LC172: .string "through the window. With a little practice you discover that you can crawl" .align 3 .LC173: .string "to the door and pull open the latch." .text .align 2 .p2align 4,,11 .global page13 .type page13, %function page13: .LFB42: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC166 add x0, x0, :lo12:.LC166 mov x29, sp bl puts adrp x0, .LC167 add x0, x0, :lo12:.LC167 bl puts adrp x0, .LC168 add x0, x0, :lo12:.LC168 bl puts adrp x0, .LC169 add x0, x0, :lo12:.LC169 bl puts adrp x0, .LC170 add x0, x0, :lo12:.LC170 bl puts adrp x0, .LC171 add x0, x0, :lo12:.LC171 bl puts adrp x0, .LC172 add x0, x0, :lo12:.LC172 bl puts adrp x0, .LC173 add x0, x0, :lo12:.LC173 bl puts mov w0, 14 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE42: .size page13, .-page13 .section .rodata.str1.8 .align 3 .LC174: .string "You manage to pull yourself out of the tubecar and look around. Before you is" .align 3 .LC175: .string "one of the most confusing things you have ever seen, a hallway that is" .align 3 .LC176: .string "simultaneously both red and green clearance. If this is the result of" .align 3 .LC177: .string "Christmas then it's easy to see the evils inherent in its practice." .align 3 .LC178: .string "You are in the heart of a large goods distribution centre. You can see all" .align 3 .LC179: .string "about you evidence of traitorous secret society Christmas celebration; rubber" .align 3 .LC180: .string "faced robots whiz back and forth selling toys to holiday shoppers, simul-plast" .align 3 .LC181: .string "wreaths hang from every light fixture, while ahead in the shadows is a citizen" .align 3 .LC182: .string "wearing a huge red synthetic flower." .text .align 2 .p2align 4,,11 .global page14 .type page14, %function page14: .LFB43: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC174 add x0, x0, :lo12:.LC174 mov x29, sp bl puts adrp x0, .LC175 add x0, x0, :lo12:.LC175 bl puts adrp x0, .LC176 add x0, x0, :lo12:.LC176 bl puts adrp x0, .LC177 add x0, x0, :lo12:.LC177 bl puts adrp x0, .LC178 add x0, x0, :lo12:.LC178 bl puts adrp x0, .LC179 add x0, x0, :lo12:.LC179 bl puts adrp x0, .LC180 add x0, x0, :lo12:.LC180 bl puts adrp x0, .LC181 add x0, x0, :lo12:.LC181 bl puts adrp x0, .LC182 add x0, x0, :lo12:.LC182 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE43: .size page14, .-page14 .section .rodata.str1.8 .align 3 .LC183: .string "You are set upon by a runty robot with a queer looking face and two pointy" .align 3 .LC184: .string "rubber ears poking from beneath a tattered cap. \"Hey mister,\" it says," .align 3 .LC185: .string "\"you done all your last minute Christmas shopping? I got some real neat junk" .align 3 .LC186: .string "here. You don't wanna miss the big day tommorrow, if you know what I mean.\"" .align 3 .LC187: .string "The robot opens its bag to show you a pile of shoddy Troubleshooter dolls. It" .align 3 .LC188: .string "reaches in and pulls out one of them. \"Look, these Action Troubleshooter(tm)" .align 3 .LC189: .string "dolls are the neatest thing. This one's got moveable arms and when you" .align 3 .LC190: .string "squeeze him, his little rifle squirts realistic looking napalm. It's only" .align 3 .LC191: .string "50 credits. Oh yeah, Merry Christmas.\"" .align 3 .LC192: .string "\nSelect 'a', 'b' or 'c' :" .align 3 .LC193: .string " a - You decide to buy the doll." .align 3 .LC194: .string " b - You shoot the robot." .align 3 .LC195: .string " c - You ignore the robot and keep searching the hall." .text .align 2 .p2align 4,,11 .global page15 .type page15, %function page15: .LFB44: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC183 add x0, x0, :lo12:.LC183 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC184 add x0, x0, :lo12:.LC184 bl puts adrp x0, .LC185 add x0, x0, :lo12:.LC185 bl puts adrp x19, :got:stdin adrp x0, .LC186 add x0, x0, :lo12:.LC186 bl puts adrp x0, .LC187 add x0, x0, :lo12:.LC187 bl puts adrp x0, .LC188 add x0, x0, :lo12:.LC188 bl puts adrp x0, .LC189 add x0, x0, :lo12:.LC189 bl puts adrp x0, .LC190 add x0, x0, :lo12:.LC190 bl puts adrp x0, .LC191 add x0, x0, :lo12:.LC191 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC193 add x0, x0, :lo12:.LC193 bl puts adrp x0, .LC194 add x0, x0, :lo12:.LC194 bl puts adrp x0, .LC195 add x0, x0, :lo12:.LC195 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 mov w0, 22 cmp w20, 10 beq .L152 .p2align 3,,7 .L154: ldr x0, [x19] bl getc cmp w0, 10 bne .L154 mov w0, 16 cmp w20, 97 bne .L162 .L152: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L162: .cfi_restore_state cmp w20, 98 mov w1, 17 mov w0, 22 csel w0, w0, w1, ne ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE44: .size page15, .-page15 .section .rodata.str1.8 .align 3 .LC196: .string "The doll is a good buy for fifty credits; it will make a fine Christmas present" .align 3 .LC197: .string "for one of your friends. After the sale the robot rolls away. You can use" .align 3 .LC198: .string "the doll later in combat. It works just like a cone rifle firing napalm," .align 3 .LC199: .string "except that occasionally it will explode and blow the user to smithereens." .align 3 .LC200: .string "But don't let that stop you." .text .align 2 .p2align 4,,11 .global page16 .type page16, %function page16: .LFB45: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC196 add x0, x0, :lo12:.LC196 mov x29, sp bl puts adrp x0, .LC197 add x0, x0, :lo12:.LC197 bl puts adrp x0, .LC198 add x0, x0, :lo12:.LC198 bl puts adrp x0, .LC199 add x0, x0, :lo12:.LC199 bl puts adrp x0, .LC200 add x0, x0, :lo12:.LC200 bl puts adrp x1, .LANCHOR1+4 mov w2, 1 mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 str w2, [x1, #:lo12:.LANCHOR1+4] ret .cfi_endproc .LFE45: .size page16, .-page16 .section .rodata.str1.8 .align 3 .LC201: .string "You whip out your laser and shoot the robot, but not before it squeezes the" .align 3 .LC202: .string "toy at you. The squeeze toy has the same effect as a cone rifle firing napalm," .align 3 .LC203: .string "and the elfbot's armour has no effect against your laser." .align 3 .LC204: .string "You have been hit!" .align 3 .LC205: .string "It missed you, but not by much!" .align 3 .LC206: .string "You zapped the little bastard!" .align 3 .LC207: .string "You wasted it! Good shooting!" .align 3 .LC208: .string "You will need more evidence, so you search GDH7-beta further" .align 3 .LC209: .string "after the GDH medbot has patched you up." .align 3 .LC210: .string "Damn! You missed!" .align 3 .LC211: .string "It tried to fire again, but the toy exploded and demolished it." .text .align 2 .p2align 4,,11 .global page17 .type page17, %function page17: .LFB46: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 adrp x0, .LC201 add x0, x0, :lo12:.LC201 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -64 .cfi_offset 20, -56 mov w19, 34079 adrp x20, .LC205 add x20, x20, :lo12:.LC205 stp x21, x22, [sp, 32] .cfi_offset 21, -48 .cfi_offset 22, -40 adrp x22, .LC204 add x22, x22, :lo12:.LC204 adrp x21, .LANCHOR0 movk w19, 0x51eb, lsl 16 stp x23, x24, [sp, 48] .cfi_offset 23, -32 .cfi_offset 24, -24 bl puts mov w23, 2 mov w24, 15 adrp x0, .LC202 add x0, x0, :lo12:.LC202 bl puts adrp x0, .LC203 add x0, x0, :lo12:.LC203 bl puts .L173: bl rand mov w2, w0 mov w3, 100 mov x0, x20 smull x1, w2, w19 asr x1, x1, 37 sub w1, w1, w2, asr 31 msub w1, w1, w3, w2 cmp w1, 24 ble .L184 bl puts .L167: bl rand mov w2, w0 mov w3, 100 adrp x0, .LC210 add x0, x0, :lo12:.LC210 smull x1, w2, w19 asr x1, x1, 37 sub w1, w1, w2, asr 31 msub w1, w1, w3, w2 cmp w1, 39 ble .L185 bl puts .L170: cmp w23, 1 bne .L177 adrp x0, .LC211 add x0, x0, :lo12:.LC211 bl puts adrp x0, .LC208 add x0, x0, :lo12:.LC208 bl puts add x0, x21, :lo12:.LANCHOR0 ldr w0, [x0, 4] cmp w0, 9 ble .L171 .L172: add x21, x21, :lo12:.LANCHOR0 mov w1, 10 mov w0, 22 str w1, [x21, 4] .L165: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldp x29, x30, [sp], 80 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L185: .cfi_restore_state adrp x0, .LC206 add x0, x0, :lo12:.LC206 str x25, [sp, 64] .cfi_offset 25, -16 bl puts bl rand mov w25, w0 bl rand mov w2, 26215 movk w2, 0x6666, lsl 16 smull x1, w25, w2 smull x2, w0, w2 asr x1, x1, 34 asr x2, x2, 34 sub w1, w1, w25, asr 31 sub w2, w2, w0, asr 31 add w1, w1, w1, lsl 2 add w2, w2, w2, lsl 2 sub w1, w25, w1, lsl 1 sub w0, w0, w2, lsl 1 add w0, w1, w0 add w0, w0, 2 sub w24, w24, w0 cmp w24, 0 ble .L186 ldr x25, [sp, 64] .cfi_restore 25 b .L170 .L186: .cfi_offset 25, -16 adrp x0, .LC207 add x0, x0, :lo12:.LC207 bl puts adrp x0, .LC208 add x0, x0, :lo12:.LC208 bl puts add x0, x21, :lo12:.LANCHOR0 ldr x25, [sp, 64] .cfi_restore 25 ldr w0, [x0, 4] cmp w0, 9 bgt .L172 .p2align 3,,7 .L171: adrp x0, .LC209 add x0, x0, :lo12:.LC209 bl puts b .L172 .p2align 2,,3 .L184: mov x0, x22 str x25, [sp, 64] .cfi_offset 25, -16 bl puts add x25, x21, :lo12:.LANCHOR0 bl rand mov w1, 26215 movk w1, 0x6666, lsl 16 ldr w2, [x25, 4] smull x1, w0, w1 asr x1, x1, 34 sub w1, w1, w0, asr 31 add w1, w1, w1, lsl 2 sub w0, w0, w1, lsl 1 add w0, w0, 1 sub w0, w2, w0 str w0, [x25, 4] cmp w0, 0 bgt .L180 ldr w2, [x25] adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldr w2, [x25] add w2, w2, 1 str w2, [x25] cmp w2, 6 ble .L168 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldr x25, [sp, 64] .cfi_remember_state .cfi_restore 25 b .L165 .L168: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk adrp x0, .LANCHOR1 add x1, x0, :lo12:.LANCHOR1 mov w2, 10 str w2, [x25, 4] str wzr, [x0, #:lo12:.LANCHOR1] mov w0, 45 stp wzr, wzr, [x1, 4] ldr x25, [sp, 64] .cfi_remember_state .cfi_restore 25 b .L165 .L180: .cfi_restore_state ldr x25, [sp, 64] .cfi_restore 25 b .L167 .L177: mov w23, 1 b .L173 .cfi_endproc .LFE46: .size page17, .-page17 .section .rodata.str1.8 .align 3 .LC212: .string "You walk to the centre of the hall, ogling like an infrared fresh from the" .align 3 .LC213: .string "clone vats. Towering before you is the most unearthly thing you have ever" .align 3 .LC214: .string "seen, a green multi armed mutant horror hulking 15 feet above your head." .align 3 .LC215: .string "Its skeletal body is draped with hundreds of metallic strips (probably to" .align 3 .LC216: .string "negate the effects of some insidious mutant power), and the entire hideous" .align 3 .LC217: .string "creature is wrapped in a thousand blinking hazard lights. It's times like" .align 3 .LC218: .string "this when you wish you'd had some training for this job. Luckily the" .align 3 .LC219: .string "creature doesn't take notice of you but stands unmoving, as though waiting for" .align 3 .LC220: .string "a summons from its dark lord, the Master Retailer." .align 3 .LC221: .string "WHAM, suddenly you are struck from behind." .text .align 2 .p2align 4,,11 .global page18 .type page18, %function page18: .LFB47: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC212 add x0, x0, :lo12:.LC212 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -16 bl puts adrp x0, .LC213 add x0, x0, :lo12:.LC213 bl puts adrp x0, .LC214 add x0, x0, :lo12:.LC214 bl puts adrp x0, .LC215 add x0, x0, :lo12:.LC215 bl puts adrp x0, .LC216 add x0, x0, :lo12:.LC216 bl puts adrp x0, .LC217 add x0, x0, :lo12:.LC217 bl puts adrp x0, .LC218 add x0, x0, :lo12:.LC218 bl puts adrp x0, .LC219 add x0, x0, :lo12:.LC219 bl puts adrp x0, .LC220 add x0, x0, :lo12:.LC220 bl puts adrp x0, .LC221 add x0, x0, :lo12:.LC221 bl puts bl rand mov w19, w0 bl rand mov w2, 26215 movk w2, 0x6666, lsl 16 smull x1, w19, w2 smull x2, w0, w2 asr x1, x1, 34 asr x2, x2, 34 sub w1, w1, w19, asr 31 sub w2, w2, w0, asr 31 add w1, w1, w1, lsl 2 add w2, w2, w2, lsl 2 sub w1, w19, w1, lsl 1 sub w2, w0, w2, lsl 1 add w0, w1, w2 add w0, w0, 2 cmp w0, 14 cset w0, gt add w0, w0, 19 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 .LFE47: .size page18, .-page18 .section .rodata.str1.8 .align 3 .LC222: .string "Quickly you regain your balance, whirl and fire your laser into the Ultraviolet" .align 3 .LC223: .string "citizen behind you. For a moment your heart leaps to your throat, then you" .align 3 .LC224: .string "realise that he is indeed dead and you will be the only one filing a report on" .align 3 .LC225: .string "this incident. Besides, he was participating in this traitorous Christmas" .align 3 .LC226: .string "shopping, as is evident from the rain of shoddy toys falling all around you." .align 3 .LC227: .string "Another valorous deed done in the service of The Computer!" .align 3 .LC228: .string "You run away like the cowardly dog you are" .align 3 .LC229: .string "You search the body, keeping an eye open for Internal Security" .text .align 2 .p2align 4,,11 .global page19 .type page19, %function page19: .LFB48: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC222 add x0, x0, :lo12:.LC222 mov x29, sp bl puts adrp x0, .LC223 add x0, x0, :lo12:.LC223 bl puts adrp x0, .LC224 add x0, x0, :lo12:.LC224 bl puts adrp x0, .LC225 add x0, x0, :lo12:.LC225 bl puts adrp x0, .LC226 add x0, x0, :lo12:.LC226 bl puts adrp x0, .LC227 add x0, x0, :lo12:.LC227 bl puts adrp x1, .LANCHOR1 add x1, x1, :lo12:.LANCHOR1 adrp x2, .LANCHOR0 mov w3, 7 mov w0, 21 ldr w4, [x2, #:lo12:.LANCHOR0] ldr w2, [x1, 8] sub w3, w3, w4 add w2, w2, 1 str w2, [x1, 8] cmp w2, w3 bgt .L191 ldr w0, [x1, 16] cmp w0, 1 beq .L193 adrp x0, .LC40 add x0, x0, :lo12:.LC40 stp x19, x20, [sp, 16] .cfi_offset 20, -8 .cfi_offset 19, -16 bl puts adrp x3, .LC228 adrp x2, .LC229 add x3, x3, :lo12:.LC228 add x2, x2, :lo12:.LC229 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x19, :got:stdin adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L206 .p2align 3,,7 .L194: ldr x0, [x19] bl getc cmp w0, 10 bne .L194 cmp w20, 97 mov w0, 34 ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 bne .L193 .L191: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L206: .cfi_def_cfa_offset 32 .cfi_offset 19, -16 .cfi_offset 20, -8 .cfi_offset 29, -32 .cfi_offset 30, -24 ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 .L193: mov w0, 22 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE48: .size page19, .-page19 .section .rodata.str1.8 .align 3 .LC230: .string "Oh no! you can't keep your balance. You're falling, falling head first into" .align 3 .LC231: .string "the Christmas beast's gaping maw. It's a valiant struggle; you think you are" .align 3 .LC232: .string "gone when its poisonous needles dig into your flesh, but with a heroic effort" .align 3 .LC233: .string "you jerk a string of lights free and jam the live wires into the creature's" .align 3 .LC234: .string "spine. The Christmas beast topples to the ground and begins to burn, filling" .align 3 .LC235: .string "the area with a thick acrid smoke. It takes only a moment to compose yourself," .align 3 .LC236: .string "and then you are ready to continue your search for the Master Retailer." .text .align 2 .p2align 4,,11 .global page20 .type page20, %function page20: .LFB49: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC230 add x0, x0, :lo12:.LC230 mov x29, sp bl puts adrp x0, .LC231 add x0, x0, :lo12:.LC231 bl puts adrp x0, .LC232 add x0, x0, :lo12:.LC232 bl puts adrp x0, .LC233 add x0, x0, :lo12:.LC233 bl puts adrp x0, .LC234 add x0, x0, :lo12:.LC234 bl puts adrp x0, .LC235 add x0, x0, :lo12:.LC235 bl puts adrp x0, .LC236 add x0, x0, :lo12:.LC236 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE49: .size page20, .-page20 .section .rodata.str1.8 .align 3 .LC237: .string "You have been wasting the leading citizens of Alpha Complex at a prodigious" .align 3 .LC238: .string "rate. This has not gone unnoticed by the Internal Security squad at GDH7-beta." .align 3 .LC239: .string "Suddenly, a net of laser beams spear out of the gloomy corners of the hall," .align 3 .LC240: .string "chopping you into teeny, weeny bite size pieces." .text .align 2 .p2align 4,,11 .global page21 .type page21, %function page21: .LFB50: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC237 add x0, x0, :lo12:.LC237 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC238 add x0, x0, :lo12:.LC238 bl puts adrp x19, .LANCHOR0 adrp x0, .LC239 add x0, x0, :lo12:.LC239 bl puts adrp x0, .LC240 add x0, x0, :lo12:.LC240 bl puts ldr w2, [x19, #:lo12:.LANCHOR0] adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldr w2, [x19, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x19, #:lo12:.LANCHOR0] cmp w2, 6 ble .L211 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L211: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk adrp x0, .LANCHOR1 add x1, x0, :lo12:.LANCHOR1 add x20, x19, :lo12:.LANCHOR0 mov w2, 10 str wzr, [x0, #:lo12:.LANCHOR1] mov w0, 45 stp wzr, wzr, [x1, 4] str w2, [x20, 4] ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE50: .size page21, .-page21 .section .rodata.str1.8 .align 3 .LC241: .string "You are searching Goods Distribution Hall 7-beta." .text .align 2 .p2align 4,,11 .global page22 .type page22, %function page22: .LFB51: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC241 add x0, x0, :lo12:.LC241 mov x29, sp bl puts bl rand negs w1, w0 and w1, w1, 3 and w0, w0, 3 csneg w0, w0, w1, mi cmp w0, 3 bhi .L214 adrp x1, .LANCHOR2 add x1, x1, :lo12:.LANCHOR2 ldr w0, [x1, w0, uxtw 2] .L214: ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE51: .size page22, .-page22 .section .rodata.str1.8 .align 3 .LC242: .string "You go to the nearest computer terminal and declare yourself a mutant." .align 3 .LC243: .string "\"A mutant, he's a mutant,\" yells a previously unnoticed infrared who had" .align 3 .LC244: .string "been looking over your shoulder. You easily gun him down, but not before a" .align 3 .LC245: .string "dozen more citizens take notice and aim their weapons at you." .align 3 .LC246: .string "You want to fight it out, one against twelve" .align 3 .LC247: .string "You tell them that it was really only a bad joke" .text .align 2 .p2align 4,,11 .global page23 .type page23, %function page23: .LFB52: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC242 add x0, x0, :lo12:.LC242 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC243 add x0, x0, :lo12:.LC243 bl puts adrp x0, .LC244 add x0, x0, :lo12:.LC244 bl puts adrp x19, :got:stdin adrp x0, .LC245 add x0, x0, :lo12:.LC245 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x3, .LC246 adrp x2, .LC247 add x3, x3, :lo12:.LC246 add x2, x2, :lo12:.LC247 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L218 .p2align 3,,7 .L219: ldr x0, [x19] bl getc cmp w0, 10 bne .L219 mov w0, 28 cmp w20, 97 bne .L218 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L218: .cfi_restore_state mov w0, 24 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE52: .size page23, .-page23 .section .rodata.str1.8 .align 3 .LC248: .string "Golly, I never expected someone to pick this. I haven't even designed" .align 3 .LC249: .string "the 12 citizens who are going to make a sponge out of you. Tell you what," .align 3 .LC250: .string "I'll give you a second chance." .align 3 .LC251: .string "You REALLY want to shoot it out" .align 3 .LC252: .string "You change your mind and say it was only a bad joke" .text .align 2 .p2align 4,,11 .global page24 .type page24, %function page24: .LFB53: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC248 add x0, x0, :lo12:.LC248 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC249 add x0, x0, :lo12:.LC249 bl puts adrp x0, .LC250 add x0, x0, :lo12:.LC250 bl puts adrp x19, :got:stdin adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC251 adrp x2, .LC252 add x3, x3, :lo12:.LC251 add x2, x2, :lo12:.LC252 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L229 .p2align 3,,7 .L230: ldr x0, [x19] bl getc cmp w0, 10 bne .L230 mov w0, 28 cmp w20, 97 bne .L229 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L229: .cfi_restore_state mov w0, 25 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE53: .size page24, .-page24 .section .rodata.str1.8 .align 3 .LC253: .string "Boy, you really can't take a hint!" .align 3 .LC254: .string "They're closing in. Their trigger fingers are twitching, they're about to" .align 3 .LC255: .string "shoot. This is your last chance." .align 3 .LC256: .string "You are going to shoot" .align 3 .LC257: .string "You tell them it was all just a bad joke" .text .align 2 .p2align 4,,11 .global page25 .type page25, %function page25: .LFB54: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC253 add x0, x0, :lo12:.LC253 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC254 add x0, x0, :lo12:.LC254 bl puts adrp x0, .LC255 add x0, x0, :lo12:.LC255 bl puts adrp x19, :got:stdin adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC256 adrp x2, .LC257 add x3, x3, :lo12:.LC256 add x2, x2, :lo12:.LC257 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L240 .p2align 3,,7 .L241: ldr x0, [x19] bl getc cmp w0, 10 bne .L241 mov w0, 28 cmp w20, 97 bne .L240 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L240: .cfi_restore_state mov w0, 26 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE54: .size page25, .-page25 .section .rodata.str1.8 .align 3 .LC258: .string "You can read the cold, sober hatred in their eyes (They really didn't think" .align 3 .LC259: .string "it was funny), as they tighten the circle around you. One of them shoves a" .align 3 .LC260: .string "blaster up your nose, but that doesn't hurt as much as the multi-gigawatt" .align 3 .LC261: .string "carbonium tipped food drill in the small of your back." .align 3 .LC262: .string "You spend the remaining micro-seconds of your life wondering what you did wrong" .text .align 2 .p2align 4,,11 .global page26 .type page26, %function page26: .LFB55: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC258 add x0, x0, :lo12:.LC258 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC259 add x0, x0, :lo12:.LC259 bl puts adrp x0, .LC260 add x0, x0, :lo12:.LC260 bl puts adrp x19, .LANCHOR0 adrp x0, .LC261 add x0, x0, :lo12:.LC261 bl puts adrp x0, .LC262 add x0, x0, :lo12:.LC262 bl puts ldr w2, [x19, #:lo12:.LANCHOR0] adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldr w2, [x19, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x19, #:lo12:.LANCHOR0] cmp w2, 6 ble .L251 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L251: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk adrp x0, .LANCHOR1 add x1, x0, :lo12:.LANCHOR1 add x20, x19, :lo12:.LANCHOR0 mov w2, 10 str wzr, [x0, #:lo12:.LANCHOR1] mov w0, 32 stp wzr, wzr, [x1, 4] str w2, [x20, 4] ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE55: .size page26, .-page26 .align 2 .p2align 4,,11 .global page27 .type page27, %function page27: .LFB56: .cfi_startproc ret .cfi_endproc .LFE56: .size page27, .-page27 .section .rodata.str1.8 .align 3 .LC263: .string "They don't think it's funny." .text .align 2 .p2align 4,,11 .global page28 .type page28, %function page28: .LFB57: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC263 add x0, x0, :lo12:.LC263 mov x29, sp bl puts mov w0, 26 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE57: .size page28, .-page28 .section .rodata.str1.8 .align 3 .LC264: .string "\"Psst, hey citizen, come here. Pssfft,\" you hear. When you peer around" .align 3 .LC265: .string "you can see someone's dim outline in the shadows. \"I got some information" .align 3 .LC266: .string "on the Master Retailer. It'll only cost you 30 psst credits.\"" .align 3 .LC267: .string " a - You pay the 30 credits for the info." .align 3 .LC268: .string " b - You would rather threaten him for the information." .align 3 .LC269: .string " c - You ignore him and walk away." .text .align 2 .p2align 4,,11 .global page29 .type page29, %function page29: .LFB58: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC264 add x0, x0, :lo12:.LC264 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC265 add x0, x0, :lo12:.LC265 bl puts adrp x0, .LC266 add x0, x0, :lo12:.LC266 bl puts adrp x19, :got:stdin adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC267 add x0, x0, :lo12:.LC267 bl puts adrp x0, .LC268 add x0, x0, :lo12:.LC268 bl puts adrp x0, .LC269 add x0, x0, :lo12:.LC269 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 mov w0, 22 cmp w20, 10 beq .L257 .p2align 3,,7 .L259: ldr x0, [x19] bl getc cmp w0, 10 bne .L259 mov w0, 30 cmp w20, 97 bne .L267 .L257: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L267: .cfi_restore_state cmp w20, 98 mov w1, 31 mov w0, 22 csel w0, w0, w1, ne ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE58: .size page29, .-page29 .section .rodata.str1.8 .align 3 .LC270: .string "You step into the shadows and offer the man a thirty credit bill. \"Just drop" .align 3 .LC271: .string "it on the floor,\" he says. \"So you're looking for the Master Retailer, pssfft?" .align 3 .LC272: .string "I've seen him, he's a fat man in a fuzzy red and white jump suit. They say" .align 3 .LC273: .string "he's a high programmer with no respect for proper security. If you want to" .align 3 .LC274: .string "find him then pssfft step behind me and go through the door.\"" .align 3 .LC275: .string "Behind the man is a reinforced plasteel blast door. The centre of it has been" .align 3 .LC276: .string "buckled toward you in a manner you only saw once before when you were field" .align 3 .LC277: .string "testing the rocket assist plasma slingshot (you found it easily portable but" .align 3 .LC278: .string "prone to misfire). Luckily it isn't buckled too far for you to make out the" .align 3 .LC279: .string "warning sign. WARNING!! Don't open this door or the same thing will happen to" .align 3 .LC280: .string "you. Opening this door is a capital offense. Do not do it. Not at all. This" .align 3 .LC281: .string "is not a joke." .align 3 .LC282: .string " a - You use your Precognition mutant power on opening the door." .align 3 .LC283: .string " b - You just go through the door anyway." .align 3 .LC284: .string " c - You decide it's too dangerous and walk away." .text .align 2 .p2align 4,,11 .global page30 .type page30, %function page30: .LFB59: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC270 add x0, x0, :lo12:.LC270 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC271 add x0, x0, :lo12:.LC271 bl puts adrp x0, .LC272 add x0, x0, :lo12:.LC272 bl puts adrp x19, :got:stdin adrp x0, .LC273 add x0, x0, :lo12:.LC273 bl puts adrp x0, .LC274 add x0, x0, :lo12:.LC274 bl puts adrp x0, .LC275 add x0, x0, :lo12:.LC275 bl puts adrp x0, .LC276 add x0, x0, :lo12:.LC276 bl puts adrp x0, .LC277 add x0, x0, :lo12:.LC277 bl puts adrp x0, .LC278 add x0, x0, :lo12:.LC278 bl puts adrp x0, .LC279 add x0, x0, :lo12:.LC279 bl puts adrp x0, .LC280 add x0, x0, :lo12:.LC280 bl puts adrp x0, .LC281 add x0, x0, :lo12:.LC281 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC282 add x0, x0, :lo12:.LC282 bl puts adrp x0, .LC283 add x0, x0, :lo12:.LC283 bl puts adrp x0, .LC284 add x0, x0, :lo12:.LC284 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 mov w0, 22 cmp w20, 10 beq .L268 .p2align 3,,7 .L270: ldr x0, [x19] bl getc cmp w0, 10 bne .L270 mov w0, 56 cmp w20, 97 bne .L278 .L268: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L278: .cfi_restore_state cmp w20, 98 mov w1, 33 mov w0, 22 csel w0, w0, w1, ne ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE59: .size page30, .-page30 .section .rodata.str1.8 .align 3 .LC285: .string "Like any good troubleshooter you make the least expensive decision and threaten" .align 3 .LC286: .string "him for information. With lightning like reflexes you whip out your laser and" .align 3 .LC287: .string "stick it up his nose. \"Talk, you traitorous Christmas celebrator, or who nose" .align 3 .LC288: .string "what will happen to you, yuk yuk,\" you pun menacingly, and then you notice" .align 3 .LC289: .string "something is very wrong. He doesn't have a nose. As a matter of fact he's" .align 3 .LC290: .string "made of one eighth inch cardboard and your laser is sticking through the other" .align 3 .LC291: .string "side of his head. \"Are you going to pay?\" says his mouth speaker," .align 3 .LC292: .string "\"or are you going to pssfft go away stupid?\"" .align 3 .LC293: .string "You pssfft go away stupid" .align 3 .LC294: .string "You pay the 30 credits" .text .align 2 .p2align 4,,11 .global page31 .type page31, %function page31: .LFB60: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC285 add x0, x0, :lo12:.LC285 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC286 add x0, x0, :lo12:.LC286 bl puts adrp x0, .LC287 add x0, x0, :lo12:.LC287 bl puts adrp x19, :got:stdin adrp x0, .LC288 add x0, x0, :lo12:.LC288 bl puts adrp x0, .LC289 add x0, x0, :lo12:.LC289 bl puts adrp x0, .LC290 add x0, x0, :lo12:.LC290 bl puts adrp x0, .LC291 add x0, x0, :lo12:.LC291 bl puts adrp x0, .LC292 add x0, x0, :lo12:.LC292 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x3, .LC293 adrp x2, .LC294 add x3, x3, :lo12:.LC293 add x2, x2, :lo12:.LC294 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L280 .p2align 3,,7 .L281: ldr x0, [x19] bl getc cmp w0, 10 bne .L281 mov w0, 30 cmp w20, 97 bne .L280 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L280: .cfi_restore_state mov w0, 22 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE60: .size page31, .-page31 .section .rodata.str1.8 .align 3 .LC295: .string "Finally it's your big chance to prove that you're as good a troubleshooter" .align 3 .LC296: .string "as your previous clone. You walk briskly to mission briefing and pick up your" .align 3 .LC297: .string "previous clone's personal effects and notepad. After reviewing the notes you" .align 3 .LC298: .string "know what has to be done. You catch the purple line to Goods Distribution Hall" .align 3 .LC299: .string "7-beta and begin to search for the blast door." .text .align 2 .p2align 4,,11 .global page32 .type page32, %function page32: .LFB61: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC295 add x0, x0, :lo12:.LC295 mov x29, sp bl puts adrp x0, .LC296 add x0, x0, :lo12:.LC296 bl puts adrp x0, .LC297 add x0, x0, :lo12:.LC297 bl puts adrp x0, .LC298 add x0, x0, :lo12:.LC298 bl puts adrp x0, .LC299 add x0, x0, :lo12:.LC299 bl puts mov w0, 22 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE61: .size page32, .-page32 .section .rodata.str1.8 .align 3 .LC300: .string "You release the megabolts on the blast door, then strain against it with your" .align 3 .LC301: .string "awesome strength. Slowly the door creaks open. You bravely leap through the" .align 3 .LC302: .string "opening and smack your head into the barrel of a 300 mm 'ultra shock' class" .align 3 .LC303: .string "plasma cannon. It's dark in the barrel now, but just before your head got" .align 3 .LC304: .string "stuck you can remember seeing a group of technicians anxiously watch you leap" .align 3 .LC305: .string "into the room." .text .align 2 .p2align 4,,11 .global page33 .type page33, %function page33: .LFB62: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov w2, 1 adrp x0, .LC300 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -16 adrp x19, .LANCHOR1 add x1, x19, :lo12:.LANCHOR1 add x0, x0, :lo12:.LC300 str w2, [x1, 20] bl puts adrp x0, .LC301 add x0, x0, :lo12:.LC301 bl puts adrp x0, .LC302 add x0, x0, :lo12:.LC302 bl puts adrp x0, .LC303 add x0, x0, :lo12:.LC303 bl puts adrp x0, .LC304 add x0, x0, :lo12:.LC304 bl puts adrp x0, .LC305 add x0, x0, :lo12:.LC305 bl puts ldr w0, [x19, #:lo12:.LANCHOR1] ldr x19, [sp, 16] cmp w0, 1 cset w0, ne add w0, w0, 35 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE62: .size page33, .-page33 .section .rodata.str1.8 .align 3 .LC306: .string "You have found a sealed envelope on the body. You open it and read:" .align 3 .LC307: .string "\"WARNING: Ultraviolet Clearance ONLY. DO NOT READ." .align 3 .LC308: .string "Memo from Chico-U-MRX4 to Harpo-U-MRX5." .align 3 .LC309: .string "The planned takeover of the Troubleshooter Training Course goes well, Comrade." .align 3 .LC310: .string "Once we have trained the unwitting bourgeois troubleshooters to work as" .align 3 .LC311: .string "communist dupes, the overthrow of Alpha Complex will be unstoppable. My survey" .align 3 .LC312: .string "of the complex has convinced me that no one suspects a thing; soon it will be" .align 3 .LC313: .string "too late for them to oppose the revolution. The only thing that could possibly" .align 3 .LC314: .string "impede the people's revolution would be someone alerting The Computer to our" .align 3 .LC315: .string "plans (for instance, some enterprising Troubleshooter could tell The Computer" .align 3 .LC316: .string "that the communists have liberated the Troubleshooter Training Course and plan" .align 3 .LC317: .string "to use it as a jumping off point from which to undermine the stability of all" .align 3 .LC318: .string "Alpha Complex), but as we both know, the capitalistic Troubleshooters would" .align 3 .LC319: .string "never serve the interests of the proletariat above their own bourgeois desires." .align 3 .LC320: .string "P.S. I'm doing some Christmas shopping later today. Would you like me to pick" .align 3 .LC321: .string "you up something?\"" .align 3 .LC322: .string "When you put down the memo you are overcome by that strange deja'vu again." .align 3 .LC323: .string "You see yourself talking privately with The Computer. You are telling it all" .align 3 .LC324: .string "about the communists' plan, and then the scene shifts and you see yourself" .align 3 .LC325: .string "showered with awards for foiling the insidious communist plot to take over the" .align 3 .LC326: .string "complex." .align 3 .LC327: .string "You wander off to look for more evidence" .align 3 .LC328: .string "You rush off to the nearest computer terminal to expose the commies" .text .align 2 .p2align 4,,11 .global page34 .type page34, %function page34: .LFB63: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 adrp x0, .LC306 add x0, x0, :lo12:.LC306 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -48 .cfi_offset 20, -40 adrp x19, :got:stdin stp x21, x22, [sp, 32] .cfi_offset 21, -32 .cfi_offset 22, -24 adrp x21, :got:stdout str x23, [sp, 48] .cfi_offset 23, -16 bl puts adrp x0, .LC307 add x0, x0, :lo12:.LC307 bl puts adrp x23, .LC39 adrp x0, .LC308 add x0, x0, :lo12:.LC308 bl puts adrp x0, .LC309 add x0, x0, :lo12:.LC309 bl puts adrp x0, .LC310 add x0, x0, :lo12:.LC310 bl puts adrp x0, .LC311 add x0, x0, :lo12:.LC311 bl puts adrp x0, .LC312 add x0, x0, :lo12:.LC312 bl puts adrp x0, .LC313 add x0, x0, :lo12:.LC313 bl puts adrp x0, .LC314 add x0, x0, :lo12:.LC314 bl puts adrp x0, .LC315 add x0, x0, :lo12:.LC315 bl puts adrp x0, .LC316 add x0, x0, :lo12:.LC316 bl puts adrp x0, .LC317 add x0, x0, :lo12:.LC317 bl puts adrp x0, .LC318 add x0, x0, :lo12:.LC318 bl puts adrp x0, .LC319 add x0, x0, :lo12:.LC319 bl puts adrp x0, .LC320 add x0, x0, :lo12:.LC320 bl puts adrp x0, .LC321 add x0, x0, :lo12:.LC321 bl puts add x1, x23, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x0, [x21, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x20, [x19, #:got_lo12:stdin] ldr x0, [x20] bl getc and w22, w0, 255 cmp w22, 10 beq .L297 .p2align 3,,7 .L298: ldr x0, [x20] bl getc cmp w0, 10 bne .L298 cmp w22, 112 beq .L318 .L297: adrp x0, .LC322 add x0, x0, :lo12:.LC322 bl puts mov w20, 1 adrp x0, .LC323 add x0, x0, :lo12:.LC323 bl puts adrp x0, .LC324 add x0, x0, :lo12:.LC324 bl puts adrp x0, .LC325 add x0, x0, :lo12:.LC325 bl puts adrp x0, .LC326 add x0, x0, :lo12:.LC326 bl puts adrp x1, .LANCHOR1+16 adrp x0, .LC40 add x0, x0, :lo12:.LC40 str w20, [x1, #:lo12:.LANCHOR1+16] bl puts mov w0, w20 adrp x3, .LC327 adrp x2, .LC328 add x3, x3, :lo12:.LC327 add x2, x2, :lo12:.LC328 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk ldr x21, [x21, #:got_lo12:stdout] ldr x0, [x21] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L300 .p2align 3,,7 .L301: ldr x0, [x19] bl getc cmp w0, 10 bne .L301 mov w0, 46 cmp w20, 97 bne .L300 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L300: .cfi_restore_state mov w0, 22 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L318: .cfi_restore_state bl character add x1, x23, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x0, [x21, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x0, [x20] bl getc and w0, w0, 255 cmp w0, 10 beq .L297 ldr x20, [x19, #:got_lo12:stdin] .p2align 3,,7 .L299: ldr x0, [x20] bl getc cmp w0, 10 bne .L299 b .L297 .cfi_endproc .LFE63: .size page34, .-page34 .section .rodata.str1.8 .align 3 .LC329: .string "\"Oh master,\" you hear through the gun barrel, \"where have you been? It is" .align 3 .LC330: .string "time for the great Christmas gifting ceremony. You had better hurry and get" .align 3 .LC331: .string "the costume on or the trainee may begin to suspect.\" For the second time" .align 3 .LC332: .string "today you are forced to wear attire not of your own choosing. They zip the" .align 3 .LC333: .string "suit to your chin just as you hear gunfire erupt behind you." .align 3 .LC334: .string "\"Oh no! Who left the door open? The commies will get in. Quick, fire the" .align 3 .LC335: .string "laser cannon or we're all doomed.\"" .align 3 .LC336: .string "\"Too late you capitalist swine, the people's revolutionary strike force claims" .align 3 .LC337: .string "this cannon for the proletariat's valiant struggle against oppression. Take" .align 3 .LC338: .string "that, you running dog imperialist lackey. ZAP, KAPOW\"" .align 3 .LC339: .string "Just when you think that things couldn't get worse, \"Aha, look what we have" .align 3 .LC340: .string "here, the Master Retailer himself with his head caught in his own cannon. His" .align 3 .LC341: .string "death will serve as a symbol of freedom for all Alpha Complex." .align 3 .LC342: .string "Fire the cannon.\"" .text .align 2 .p2align 4,,11 .global page35 .type page35, %function page35: .LFB64: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC329 add x0, x0, :lo12:.LC329 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC330 add x0, x0, :lo12:.LC330 bl puts adrp x0, .LC331 add x0, x0, :lo12:.LC331 bl puts adrp x19, .LANCHOR0 adrp x0, .LC332 add x0, x0, :lo12:.LC332 bl puts adrp x0, .LC333 add x0, x0, :lo12:.LC333 bl puts adrp x0, .LC334 add x0, x0, :lo12:.LC334 bl puts adrp x0, .LC335 add x0, x0, :lo12:.LC335 bl puts adrp x0, .LC336 add x0, x0, :lo12:.LC336 bl puts adrp x0, .LC337 add x0, x0, :lo12:.LC337 bl puts adrp x0, .LC338 add x0, x0, :lo12:.LC338 bl puts adrp x0, .LC339 add x0, x0, :lo12:.LC339 bl puts adrp x0, .LC340 add x0, x0, :lo12:.LC340 bl puts adrp x0, .LC341 add x0, x0, :lo12:.LC341 bl puts adrp x0, .LC342 add x0, x0, :lo12:.LC342 bl puts ldr w2, [x19, #:lo12:.LANCHOR0] adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldr w2, [x19, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x19, #:lo12:.LANCHOR0] cmp w2, 6 ble .L320 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L320: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk adrp x0, .LANCHOR1 add x1, x0, :lo12:.LANCHOR1 add x20, x19, :lo12:.LANCHOR0 mov w2, 10 str wzr, [x0, #:lo12:.LANCHOR1] mov w0, 32 stp wzr, wzr, [x1, 4] str w2, [x20, 4] ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE64: .size page35, .-page35 .section .rodata.str1.8 .align 3 .LC343: .string "\"Congratulations, troubleshooter, you have successfully found the lair of the" .align 3 .LC344: .string "Master Retailer and completed the Troubleshooter Training Course test mission,\"" .align 3 .LC345: .string "a muffled voice tells you through the barrel. \"Once we dislodge your head" .align 3 .LC346: .string "from the barrel of the 'Ultra Shock' plasma cannon you can begin with the" .align 3 .LC347: .string "training seminars, the first of which will concern the 100%% accurate\n" .align 3 .LC348: .string "identification and elimination of unregistered mutants. If you have any" .align 3 .LC349: .string "objections please voice them now.\"" .align 3 .LC350: .string " a - You appreciate his courtesy and voice an objection." .align 3 .LC351: .string " b - After your head is removed from the cannon, you register as a mutant." .align 3 .LC352: .string " c - After your head is removed from the cannon, you go to the unregistered" .align 3 .LC353: .string " mutant identification and elimination seminar." .text .align 2 .p2align 4,,11 .global page36 .type page36, %function page36: .LFB65: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x0, .LC343 add x0, x0, :lo12:.LC343 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 adrp x20, :got:stdin str x21, [sp, 32] .cfi_offset 21, -16 bl puts adrp x0, .LC344 add x0, x0, :lo12:.LC344 bl puts adrp x0, .LC345 add x0, x0, :lo12:.LC345 bl puts adrp x0, .LC346 add x0, x0, :lo12:.LC346 bl puts adrp x1, .LC347 add x1, x1, :lo12:.LC347 mov w0, 1 bl __printf_chk adrp x0, .LC348 add x0, x0, :lo12:.LC348 bl puts adrp x0, .LC349 add x0, x0, :lo12:.LC349 bl puts adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x0, .LC350 add x0, x0, :lo12:.LC350 bl puts adrp x0, .LC351 add x0, x0, :lo12:.LC351 bl puts adrp x0, .LC352 add x0, x0, :lo12:.LC352 bl puts adrp x0, .LC353 add x0, x0, :lo12:.LC353 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x20, [x20, #:got_lo12:stdin] ldr x0, [x20] bl getc and w21, w0, 255 mov w0, 37 cmp w21, 10 beq .L323 .p2align 3,,7 .L325: ldr x0, [x20] bl getc mov w19, w0 cmp w0, 10 bne .L325 cmp w21, 97 bne .L333 adrp x20, .LANCHOR0 adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 ldr w2, [x20, #:lo12:.LANCHOR0] add x21, x20, :lo12:.LANCHOR0 bl __printf_chk ldr w2, [x20, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x20, #:lo12:.LANCHOR0] cmp w2, 6 ble .L327 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L333: .cfi_restore_state cmp w21, 98 mov w0, 37 mov w1, 23 csel w0, w0, w1, ne .L323: ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L327: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk adrp x2, .LANCHOR1 add x1, x2, :lo12:.LANCHOR1 str w19, [x21, 4] mov w0, 32 str wzr, [x2, #:lo12:.LANCHOR1] stp wzr, wzr, [x1, 4] ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE65: .size page36, .-page36 .section .rodata.str1.8 .align 3 .LC354: .string "\"Come with me please, Troubleshooter,\" says the Green clearance technician" .align 3 .LC355: .string "after he has dislodged your head from the cannon. \"You have been participating" .align 3 .LC356: .string "in the Troubleshooter Training Course since you got off the tube car in" .align 3 .LC357: .string "GDH7-beta,\" he explains as he leads you down a corridor. \"The entire" .align 3 .LC358: .string "Christmas assignment was a test mission to assess your current level of" .align 3 .LC359: .string "training. You didn't do so well. We're going to start at the beginning with" .align 3 .LC360: .string "the other student. Ah, here we are, the mutant identification and elimination" .align 3 .LC361: .string "lecture.\" He shows you into a vast lecture hall filled with empty seats." .align 3 .LC362: .string "There is only one other student here, a Troubleshooter near the front row" .align 3 .LC363: .string "playing with his Action Troubleshooter(tm) figure. \"Find a seat and I will" .align 3 .LC364: .string "begin,\" says the instructor." .text .align 2 .p2align 4,,11 .global page37 .type page37, %function page37: .LFB66: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC354 add x0, x0, :lo12:.LC354 mov x29, sp bl puts adrp x0, .LC355 add x0, x0, :lo12:.LC355 bl puts adrp x0, .LC356 add x0, x0, :lo12:.LC356 bl puts adrp x0, .LC357 add x0, x0, :lo12:.LC357 bl puts adrp x0, .LC358 add x0, x0, :lo12:.LC358 bl puts adrp x0, .LC359 add x0, x0, :lo12:.LC359 bl puts adrp x0, .LC360 add x0, x0, :lo12:.LC360 bl puts adrp x0, .LC361 add x0, x0, :lo12:.LC361 bl puts adrp x0, .LC362 add x0, x0, :lo12:.LC362 bl puts adrp x0, .LC363 add x0, x0, :lo12:.LC363 bl puts adrp x0, .LC364 add x0, x0, :lo12:.LC364 bl puts mov w0, 38 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE66: .size page37, .-page37 .section .rodata.str1.8 .align 3 .LC365: .string "\"I am Plato-B-PHI%d, head of mutant propaganda here at the training course.\n" .align 3 .LC366: .string "If you have any questions about mutants please come to me. Today I will be" .align 3 .LC367: .string "talking about mutant detection. Detecting mutants is very easy. One simply" .align 3 .LC368: .string "watches for certain tell tale signs, such as the green scaly skin, the third" .align 3 .LC369: .string "arm growing from the forehead, or other similar disfigurements so common with" .align 3 .LC370: .string "their kind. There are, however, a few rare specimens that show no outward sign" .align 3 .LC371: .string "of their treason. This has been a significant problem, so our researchers have" .align 3 .LC372: .string "been working on a solution. I would like a volunteer to test this device,\"" .align 3 .LC373: .string "he says, holding up a ray gun looking thing. \"It is a mutant detection ray." .align 3 .LC374: .string "This little button detects for mutants, and this big button stuns them once" .align 3 .LC375: .string "they are discovered. Who would like to volunteer for a test?\"" .align 3 .LC376: .string "The Troubleshooter down the front squirms deeper into his chair." .align 3 .LC377: .string "You duck behind a chair and hope the instructor doesn't notice you" .align 3 .LC378: .string "You volunteer for the test" .text .align 2 .p2align 4,,11 .global page38 .type page38, %function page38: .LFB67: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x2, .LANCHOR0+8 adrp x1, .LC365 mov x29, sp ldr w2, [x2, #:lo12:.LANCHOR0+8] add x1, x1, :lo12:.LC365 mov w0, 1 stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 adrp x19, :got:stdin bl __printf_chk adrp x0, .LC366 add x0, x0, :lo12:.LC366 bl puts adrp x0, .LC367 add x0, x0, :lo12:.LC367 bl puts adrp x0, .LC368 add x0, x0, :lo12:.LC368 bl puts adrp x0, .LC369 add x0, x0, :lo12:.LC369 bl puts adrp x0, .LC370 add x0, x0, :lo12:.LC370 bl puts adrp x0, .LC371 add x0, x0, :lo12:.LC371 bl puts adrp x0, .LC372 add x0, x0, :lo12:.LC372 bl puts adrp x0, .LC373 add x0, x0, :lo12:.LC373 bl puts adrp x0, .LC374 add x0, x0, :lo12:.LC374 bl puts adrp x0, .LC375 add x0, x0, :lo12:.LC375 bl puts adrp x0, .LC376 add x0, x0, :lo12:.LC376 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x3, .LC377 adrp x2, .LC378 add x3, x3, :lo12:.LC377 add x2, x2, :lo12:.LC378 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L337 .p2align 3,,7 .L338: ldr x0, [x19] bl getc cmp w0, 10 bne .L338 mov w0, 39 cmp w20, 97 bne .L337 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L337: .cfi_restore_state mov w0, 40 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE67: .size page38, .-page38 .section .rodata.str1.8 .align 3 .LC379: .string "You bravely volunteer to test the mutant detection gun. You stand up and walk" .align 3 .LC380: .string "down the steps to the podium, passing a very relieved Troubleshooter along the" .align 3 .LC381: .string "way. When you reach the podium Plato-B-PHI hands you the mutant detection gun" .align 3 .LC382: .string "and says, \"Here, aim the gun at that Troubleshooter and push the small button." .align 3 .LC383: .string "If you see a purple light, stun him.\" Grasping the opportunity to prove your" .align 3 .LC384: .string "worth to The Computer, you fire the mutant detection ray at the Troubleshooter." .align 3 .LC385: .string "A brilliant purple nimbus instantly surrounds his body. You slip your finger" .align 3 .LC386: .string "to the large stun button and he falls writhing to the floor." .align 3 .LC387: .string "\"Good shot,\" says the instructor as you hand him the mutant detection gun," .align 3 .LC388: .string "\"I'll see that you get a commendation for this. It seems you have the hang" .align 3 .LC389: .string "of mutant detection and elimination. You can go on to the secret society" .align 3 .LC390: .string "infiltration class. I'll see that the little mutie gets packaged for" .align 3 .LC391: .string "tomorrow's mutant dissection class.\"" .text .align 2 .p2align 4,,11 .global page39 .type page39, %function page39: .LFB68: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC379 add x0, x0, :lo12:.LC379 mov x29, sp bl puts adrp x0, .LC380 add x0, x0, :lo12:.LC380 bl puts adrp x0, .LC381 add x0, x0, :lo12:.LC381 bl puts adrp x0, .LC382 add x0, x0, :lo12:.LC382 bl puts adrp x0, .LC383 add x0, x0, :lo12:.LC383 bl puts adrp x0, .LC384 add x0, x0, :lo12:.LC384 bl puts adrp x0, .LC385 add x0, x0, :lo12:.LC385 bl puts adrp x0, .LC386 add x0, x0, :lo12:.LC386 bl puts adrp x0, .LC387 add x0, x0, :lo12:.LC387 bl puts adrp x0, .LC388 add x0, x0, :lo12:.LC388 bl puts adrp x0, .LC389 add x0, x0, :lo12:.LC389 bl puts adrp x0, .LC390 add x0, x0, :lo12:.LC390 bl puts adrp x0, .LC391 add x0, x0, :lo12:.LC391 bl puts mov w0, 41 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE68: .size page39, .-page39 .section .rodata.str1.8 .align 3 .LC392: .string "You breathe a sigh of relief as Plato-B-PHI picks on the other Troubleshooter." .align 3 .LC393: .string "\"You down here in the front,\" says the instructor pointing at the other" .align 3 .LC394: .string "Troubleshooter, \"you'll make a good volunteer. Please step forward.\"" .align 3 .LC395: .string "The Troubleshooter looks around with a `who me?' expression on his face, but" .align 3 .LC396: .string "since he is the only one visible in the audience he figures his number is up." .align 3 .LC397: .string "He walks down to the podium clutching his Action Troubleshooter(tm) doll before" .align 3 .LC398: .string "him like a weapon. \"Here,\" says Plato-B-PHI, \"take the mutant detection ray" .align 3 .LC399: .string "and point it at the audience. If there are any mutants out there we'll know" .align 3 .LC400: .string "soon enough.\" Suddenly your skin prickles with static electricity as a bright" .align 3 .LC401: .string "purple nimbus surrounds your body. \"Ha Ha, got one,\" says the instructor." .align 3 .LC402: .string "\"Stun him before he gets away.\"" .align 3 .LC403: .string "His shot hits you. You feel numb all over." .align 3 .LC404: .string "His shot just missed." .align 3 .LC405: .string "You just blew his head off. His lifeless hand drops the mutant detector ray." .align 3 .LC406: .string "You burnt a hole in the podium. He sights the mutant detector ray on you." .text .align 2 .p2align 4,,11 .global page40 .type page40, %function page40: .LFB69: .cfi_startproc stp x29, x30, [sp, -64]! .cfi_def_cfa_offset 64 .cfi_offset 29, -64 .cfi_offset 30, -56 adrp x0, .LC392 add x0, x0, :lo12:.LC392 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -48 .cfi_offset 20, -40 .cfi_offset 21, -32 .cfi_offset 22, -24 adrp x22, :got:stdout adrp x21, :got:stdin str x23, [sp, 48] .cfi_offset 23, -16 bl puts adrp x0, .LC393 add x0, x0, :lo12:.LC393 bl puts adrp x23, .LC39 adrp x0, .LC394 add x0, x0, :lo12:.LC394 bl puts adrp x0, .LC395 add x0, x0, :lo12:.LC395 bl puts adrp x0, .LC396 add x0, x0, :lo12:.LC396 bl puts adrp x0, .LC397 add x0, x0, :lo12:.LC397 bl puts adrp x0, .LC398 add x0, x0, :lo12:.LC398 bl puts adrp x0, .LC399 add x0, x0, :lo12:.LC399 bl puts adrp x0, .LC400 add x0, x0, :lo12:.LC400 bl puts adrp x0, .LC401 add x0, x0, :lo12:.LC401 bl puts adrp x0, .LC402 add x0, x0, :lo12:.LC402 bl puts add x1, x23, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x0, [x22, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x21, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L352 .p2align 3,,7 .L350: ldr x0, [x19] bl getc cmp w0, 10 bne .L350 cmp w20, 112 beq .L364 .L352: adrp x19, .LC404 adrp x20, .LC406 mov w21, 34079 add x19, x19, :lo12:.LC404 add x20, x20, :lo12:.LC406 movk w21, 0x51eb, lsl 16 .L351: bl rand smull x1, w0, w21 mov w22, 100 asr x1, x1, 37 sub w1, w1, w0, asr 31 msub w0, w1, w22, w0 cmp w0, 29 bgt .L354 adrp x0, .LC403 add x0, x0, :lo12:.LC403 bl puts mov w0, 49 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L364: .cfi_restore_state bl character add x1, x23, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x22, [x22, #:got_lo12:stdout] ldr x0, [x22] bl fflush ldr x0, [x19] bl getc and w0, w0, 255 cmp w0, 10 beq .L352 ldr x21, [x21, #:got_lo12:stdin] .p2align 3,,7 .L353: ldr x0, [x21] bl getc cmp w0, 10 bne .L353 b .L352 .p2align 2,,3 .L354: mov x0, x19 bl puts bl rand smull x1, w0, w21 asr x1, x1, 37 sub w1, w1, w0, asr 31 msub w0, w1, w22, w0 cmp w0, 39 bgt .L356 adrp x0, .LC405 add x0, x0, :lo12:.LC405 bl puts mov w0, 50 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L356: .cfi_restore_state mov x0, x20 bl puts b .L351 .cfi_endproc .LFE69: .size page40, .-page40 .section .rodata.str1.8 .align 3 .LC407: .string "You stumble down the hallway of the Troubleshooter Training Course looking for" .align 3 .LC408: .string "your next class. Up ahead you see one of the instructors waving to you. When" .align 3 .LC409: .string "you get there he shakes your hand and says, \"I am Jung-I-PSY. Welcome to the" .align 3 .LC410: .string "secret society infiltration seminar. I hope you ...\" You don't catch the" .align 3 .LC411: .string "rest of his greeting because you're paying too much attention to his handshake;" .align 3 .LC412: .string "it is the strangest thing that has ever been done to your hand, sort of how it" .align 3 .LC413: .string "would feel if you put a neuro whip in a high energy palm massage unit." .align 3 .LC414: .string "It doesn't take you long to learn what he is up to; you feel him briefly shake" .align 3 .LC415: .string "your hand with the secret Illuminati handshake." .align 3 .LC416: .string "You ignore this secret society contact" .align 3 .LC417: .string "You respond with the proper Illuminati code phrase, \"Ewige Blumenkraft\"" .text .align 2 .p2align 4,,11 .global page41 .type page41, %function page41: .LFB70: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC407 add x0, x0, :lo12:.LC407 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC408 add x0, x0, :lo12:.LC408 bl puts adrp x0, .LC409 add x0, x0, :lo12:.LC409 bl puts adrp x19, :got:stdin adrp x0, .LC410 add x0, x0, :lo12:.LC410 bl puts adrp x0, .LC411 add x0, x0, :lo12:.LC411 bl puts adrp x0, .LC412 add x0, x0, :lo12:.LC412 bl puts adrp x0, .LC413 add x0, x0, :lo12:.LC413 bl puts adrp x0, .LC414 add x0, x0, :lo12:.LC414 bl puts adrp x0, .LC415 add x0, x0, :lo12:.LC415 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC416 adrp x2, .LC417 add x3, x3, :lo12:.LC416 add x2, x2, :lo12:.LC417 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L366 .p2align 3,,7 .L367: ldr x0, [x19] bl getc cmp w0, 10 bne .L367 mov w0, 42 cmp w20, 97 bne .L366 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L366: .cfi_restore_state mov w0, 43 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE70: .size page41, .-page41 .section .rodata.str1.8 .align 3 .LC418: .string "\"Aha, so you are a member of the elitist Illuminati secret society,\" he says" .align 3 .LC419: .string "loudly, \"that is most interesting.\" He turns to the large class already" .align 3 .LC420: .string "seated in the auditorium and says, \"You see, class, by simply using the correct" .align 3 .LC421: .string "hand shake you can identify the member of any secret society. Please keep your" .align 3 .LC422: .string "weapons trained on him while I call a guard." .align 3 .LC423: .string "You wait for the guard" .align 3 .LC424: .string "You run for it" .text .align 2 .p2align 4,,11 .global page42 .type page42, %function page42: .LFB71: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC418 add x0, x0, :lo12:.LC418 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC419 add x0, x0, :lo12:.LC419 bl puts adrp x0, .LC420 add x0, x0, :lo12:.LC420 bl puts adrp x19, :got:stdin adrp x0, .LC421 add x0, x0, :lo12:.LC421 bl puts adrp x0, .LC422 add x0, x0, :lo12:.LC422 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC423 adrp x2, .LC424 add x3, x3, :lo12:.LC423 add x2, x2, :lo12:.LC424 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L377 .p2align 3,,7 .L378: ldr x0, [x19] bl getc cmp w0, 10 bne .L378 mov w0, 51 cmp w20, 97 bne .L377 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L377: .cfi_restore_state mov w0, 52 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE71: .size page42, .-page42 .section .rodata.str1.8 .align 3 .LC425: .string "You sit through a long lecture on how to recognise and infiltrate secret" .align 3 .LC426: .string "societies, with an emphasis on mimicking secret handshakes. The basic theory," .align 3 .LC427: .string "which you realise to be sound from your Iluminati training, is that with the" .align 3 .LC428: .string "proper handshake you can pass unnoticed in any secret society gathering." .align 3 .LC429: .string "What's more, the proper handshake will open doors faster than an 'ultra shock'" .align 3 .LC430: .string "plasma cannon. You are certain that with the information you learn here you" .align 3 .LC431: .string "will easily be promoted to the next level of your Illuminati secret society." .align 3 .LC432: .string "The lecture continues for three hours, during which you have the opportunity" .align 3 .LC433: .string "to practice many different handshakes. Afterwards everyone is directed to" .align 3 .LC434: .string "attend the graduation ceremony. Before you must go you have a little time to" .align 3 .LC435: .string "talk to The Computer about, you know, certain topics." .align 3 .LC436: .string "You go to the graduation ceremony immediately" .align 3 .LC437: .string "You go looking for a computer terminal" .text .align 2 .p2align 4,,11 .global page43 .type page43, %function page43: .LFB72: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC425 add x0, x0, :lo12:.LC425 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC426 add x0, x0, :lo12:.LC426 bl puts adrp x0, .LC427 add x0, x0, :lo12:.LC427 bl puts adrp x19, :got:stdin adrp x0, .LC428 add x0, x0, :lo12:.LC428 bl puts adrp x0, .LC429 add x0, x0, :lo12:.LC429 bl puts adrp x0, .LC430 add x0, x0, :lo12:.LC430 bl puts adrp x0, .LC431 add x0, x0, :lo12:.LC431 bl puts adrp x0, .LC432 add x0, x0, :lo12:.LC432 bl puts adrp x0, .LC433 add x0, x0, :lo12:.LC433 bl puts adrp x0, .LC434 add x0, x0, :lo12:.LC434 bl puts adrp x0, .LC435 add x0, x0, :lo12:.LC435 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC436 adrp x2, .LC437 add x3, x3, :lo12:.LC436 add x2, x2, :lo12:.LC437 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L388 .p2align 3,,7 .L389: ldr x0, [x19] bl getc cmp w0, 10 bne .L389 mov w0, 44 cmp w20, 97 bne .L388 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L388: .cfi_restore_state mov w0, 55 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE72: .size page43, .-page43 .section .rodata.str1.8 .align 3 .LC438: .string "You walk down to a semi-secluded part of the training course complex and" .align 3 .LC439: .string "activate a computer terminal. \"AT YOUR SERVICE\" reads the computer screen." .align 3 .LC440: .string "You change your mind and go to the graduation ceremony" .align 3 .LC441: .string "You register yourself as a mutant" .align 3 .LC442: .string " a - You register yourself as a mutant." .align 3 .LC443: .string " b - You want to chat about the commies." .align 3 .LC444: .string " c - You change your mind and go to the graduation ceremony." .text .align 2 .p2align 4,,11 .global page44 .type page44, %function page44: .LFB73: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC438 add x0, x0, :lo12:.LC438 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC439 add x0, x0, :lo12:.LC439 bl puts adrp x0, .LANCHOR1+16 ldr w0, [x0, #:lo12:.LANCHOR1+16] cbz w0, .L418 adrp x0, .LC192 add x0, x0, :lo12:.LC192 bl puts adrp x19, :got:stdin adrp x0, .LC442 add x0, x0, :lo12:.LC442 bl puts adrp x0, .LC443 add x0, x0, :lo12:.LC443 bl puts adrp x0, .LC444 add x0, x0, :lo12:.LC444 bl puts adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L400 .p2align 3,,7 .L403: ldr x0, [x19] bl getc cmp w0, 10 bne .L403 mov w0, 23 cmp w20, 97 beq .L398 cmp w20, 98 mov w0, 55 mov w1, 46 csel w0, w0, w1, ne .L398: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L418: .cfi_restore_state adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x19, :got:stdin adrp x3, .LC440 adrp x2, .LC441 add x3, x3, :lo12:.LC440 add x2, x2, :lo12:.LC441 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L400 .p2align 3,,7 .L401: ldr x0, [x19] bl getc cmp w0, 10 bne .L401 mov w0, 23 cmp w20, 97 beq .L398 .L400: mov w0, 55 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE73: .size page44, .-page44 .section .rodata.str1.8 .align 3 .LC445: .string "\"Hrank Hrank,\" snorts the alarm in your living quarters. Something is up." .align 3 .LC446: .string "You look at the monitor above the bathroom mirror and see the message you have" .align 3 .LC447: .string "been waiting for all these years. \"ATTENTION TROUBLESHOOTER, YOU ARE BEING" .align 3 .LC448: .string "ACTIVATED. PLEASE REPORT IMMEDIATELY TO MISSION ASSIGNMENT ROOM A17/GAMMA/LB22." .align 3 .LC449: .string "THANK YOU. THE COMPUTER IS YOUR FRIEND.\" When you arrive at mission" .align 3 .LC450: .string "assignment room A17-gamma/LB22 you are given your previous clone's" .align 3 .LC451: .string "remaining possessions and notebook. You puzzle through your predecessor's" .align 3 .LC452: .string "cryptic notes, managing to decipher enough to lead you to the tube station and" .align 3 .LC453: .string "the tube car to GDH7-beta." .text .align 2 .p2align 4,,11 .global page45 .type page45, %function page45: .LFB74: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC445 add x0, x0, :lo12:.LC445 mov x29, sp bl puts adrp x0, .LC446 add x0, x0, :lo12:.LC446 bl puts adrp x0, .LC447 add x0, x0, :lo12:.LC447 bl puts adrp x0, .LC448 add x0, x0, :lo12:.LC448 bl puts adrp x0, .LC449 add x0, x0, :lo12:.LC449 bl puts adrp x0, .LC450 add x0, x0, :lo12:.LC450 bl puts adrp x0, .LC451 add x0, x0, :lo12:.LC451 bl puts adrp x0, .LC452 add x0, x0, :lo12:.LC452 bl puts adrp x0, .LC453 add x0, x0, :lo12:.LC453 bl puts mov w0, 10 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE74: .size page45, .-page45 .section .rodata.str1.8 .align 3 .LC454: .string "\"Why do you ask about the communists, Troubleshooter? It is not in the" .align 3 .LC455: .string "interest of your continued survival to be asking about such topics,\" says" .align 3 .LC456: .string "The Computer." .align 3 .LC457: .string "You change the subject" .align 3 .LC458: .string "You insist on talking about the communists" .text .align 2 .p2align 4,,11 .global page46 .type page46, %function page46: .LFB75: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC454 add x0, x0, :lo12:.LC454 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC455 add x0, x0, :lo12:.LC455 bl puts adrp x0, .LC456 add x0, x0, :lo12:.LC456 bl puts adrp x19, :got:stdin adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC457 adrp x2, .LC458 add x3, x3, :lo12:.LC457 add x2, x2, :lo12:.LC458 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L422 .p2align 3,,7 .L423: ldr x0, [x19] bl getc cmp w0, 10 bne .L423 mov w0, 53 cmp w20, 97 bne .L422 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L422: .cfi_restore_state mov w0, 54 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE75: .size page46, .-page46 .section .rodata.str1.8 .align 3 .LC459: .string "The Computer orders the entire Vulture squadron to terminate the Troubleshooter" .align 3 .LC460: .string "Training Course. Unfortunately you too are terminated for possessing" .align 3 .LC461: .string "classified information.\n" .align 3 .LC462: .string "Don't act so innocent, we both know that you are an Illuminatus which is in" .align 3 .LC463: .string "itself an act of treason.\n" .align 3 .LC464: .string "Don't look to me for sympathy.\n" .align 3 .LC465: .string "\t\t\tTHE END" .text .align 2 .p2align 4,,11 .global page47 .type page47, %function page47: .LFB76: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC459 add x0, x0, :lo12:.LC459 mov x29, sp bl puts adrp x0, .LC460 add x0, x0, :lo12:.LC460 bl puts adrp x0, .LC461 add x0, x0, :lo12:.LC461 bl puts adrp x0, .LC462 add x0, x0, :lo12:.LC462 bl puts adrp x0, .LC463 add x0, x0, :lo12:.LC463 bl puts adrp x0, .LC464 add x0, x0, :lo12:.LC464 bl puts adrp x0, .LC465 add x0, x0, :lo12:.LC465 bl puts mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE76: .size page47, .-page47 .section .rodata.str1.8 .align 3 .LC466: .string "The tubecar shoots forward as you enter, slamming you back into a pile of" .align 3 .LC467: .string "garbage. The front end rotates upward and you, the garbage and the garbage" .align 3 .LC468: .string "disposal car shoot straight up out of Alpha Complex. One of the last things" .align 3 .LC469: .string "you see is a small blue sphere slowly dwindling behind you. After you fail to" .align 3 .LC470: .string "report in, you will be assumed dead." .text .align 2 .p2align 4,,11 .global page48 .type page48, %function page48: .LFB77: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC466 add x0, x0, :lo12:.LC466 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC467 add x0, x0, :lo12:.LC467 bl puts adrp x0, .LC468 add x0, x0, :lo12:.LC468 bl puts adrp x19, .LANCHOR0 adrp x0, .LC469 add x0, x0, :lo12:.LC469 bl puts adrp x0, .LC470 add x0, x0, :lo12:.LC470 bl puts ldr w2, [x19, #:lo12:.LANCHOR0] adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldr w2, [x19, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x19, #:lo12:.LANCHOR0] cmp w2, 6 ble .L435 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L435: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk adrp x0, .LANCHOR1 add x1, x0, :lo12:.LANCHOR1 add x20, x19, :lo12:.LANCHOR0 mov w2, 10 str wzr, [x0, #:lo12:.LANCHOR1] mov w0, 45 stp wzr, wzr, [x1, 4] str w2, [x20, 4] ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE77: .size page48, .-page48 .section .rodata.str1.8 .align 3 .LC471: .string "The instructor drags your inert body into a specimen detainment cage." .align 3 .LC472: .string "\"He'll make a good subject for tomorrow's mutant dissection class,\" you hear." .text .align 2 .p2align 4,,11 .global page49 .type page49, %function page49: .LFB78: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC471 add x0, x0, :lo12:.LC471 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x19, .LANCHOR0 adrp x0, .LC472 add x0, x0, :lo12:.LC472 bl puts ldr w2, [x19, #:lo12:.LANCHOR0] adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldr w2, [x19, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x19, #:lo12:.LANCHOR0] cmp w2, 6 ble .L439 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L439: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk adrp x0, .LANCHOR1 add x1, x0, :lo12:.LANCHOR1 add x20, x19, :lo12:.LANCHOR0 mov w2, 10 str wzr, [x0, #:lo12:.LANCHOR1] mov w0, 32 stp wzr, wzr, [x1, 4] str w2, [x20, 4] ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE78: .size page49, .-page49 .section .rodata.str1.8 .align 3 .LC473: .string "You put down the other Troubleshooter, and then wisely decide to drill a few" .align 3 .LC474: .string "holes in the instructor as well; the only good witness is a dead witness." .align 3 .LC475: .string "You continue with the training course." .text .align 2 .p2align 4,,11 .global page50 .type page50, %function page50: .LFB79: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC473 add x0, x0, :lo12:.LC473 mov x29, sp bl puts adrp x0, .LC474 add x0, x0, :lo12:.LC474 bl puts adrp x0, .LC475 add x0, x0, :lo12:.LC475 bl puts adrp x1, .LANCHOR0 add x1, x1, :lo12:.LANCHOR0 mov w0, 41 ldr w2, [x1, 8] add w2, w2, 1 str w2, [x1, 8] ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE79: .size page50, .-page50 .section .rodata.str1.8 .align 3 .LC476: .string "You run for it, but you don't run far. Three hundred strange and exotic" .align 3 .LC477: .string "weapons turn you into a freeze dried cloud of soot." .text .align 2 .p2align 4,,11 .global page51 .type page51, %function page51: .LFB80: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC476 add x0, x0, :lo12:.LC476 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x19, .LANCHOR0 adrp x0, .LC477 add x0, x0, :lo12:.LC477 bl puts ldr w2, [x19, #:lo12:.LANCHOR0] adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldr w2, [x19, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x19, #:lo12:.LANCHOR0] cmp w2, 6 ble .L445 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L445: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk adrp x0, .LANCHOR1 add x1, x0, :lo12:.LANCHOR1 add x20, x19, :lo12:.LANCHOR0 mov w2, 10 str wzr, [x0, #:lo12:.LANCHOR1] mov w0, 32 stp wzr, wzr, [x1, 4] str w2, [x20, 4] ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE80: .size page51, .-page51 .section .rodata.str1.8 .align 3 .LC478: .string "You wisely wait until the instructor returns with a Blue Internal Security" .align 3 .LC479: .string "guard. The guard leads you to an Internal Security self incrimination station." .text .align 2 .p2align 4,,11 .global page52 .type page52, %function page52: .LFB81: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC478 add x0, x0, :lo12:.LC478 mov x29, sp bl puts adrp x0, .LC479 add x0, x0, :lo12:.LC479 bl puts mov w0, 2 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE81: .size page52, .-page52 .section .rodata.str1.8 .align 3 .LC480: .string "You tell The Computer about:" .align 3 .LC481: .string "Something less dangerous" .align 3 .LC482: .string "The commies who have infiltrated the Troubleshooter Training Course\n and the impending People's Revolution" .text .align 2 .p2align 4,,11 .global page53 .type page53, %function page53: .LFB82: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC480 add x0, x0, :lo12:.LC480 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC481 adrp x2, .LC482 add x3, x3, :lo12:.LC481 add x2, x2, :lo12:.LC482 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout adrp x19, :got:stdin ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L451 .p2align 3,,7 .L452: ldr x0, [x19] bl getc cmp w0, 10 bne .L452 mov w0, 47 cmp w20, 97 bne .L451 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L451: .cfi_restore_state mov w0, 54 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE82: .size page53, .-page53 .section .rodata.str1.8 .align 3 .LC483: .string "\"Do not try to change the subject, Troubleshooter,\" says The Computer." .align 3 .LC484: .string "\"It is a serious crime to ask about the communists. You will be terminated" .align 3 .LC485: .string "immediately. Thank you for your inquiry. The Computer is your friend.\"" .align 3 .LC486: .string "Steel bars drop to your left and right, trapping you here in the hallway." .align 3 .LC487: .string "A spotlight beams from the computer console to brilliantly iiluminate you while" .align 3 .LC488: .string "the speaker above your head rapidly repeats \"Traitor, Traitor, Traitor.\"" .align 3 .LC489: .string "It doesn't take long for a few guards to notice your predicament and come to" .align 3 .LC490: .string "finish you off." .text .align 2 .p2align 4,,11 .global page54 .type page54, %function page54: .LFB83: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x0, .LC483 add x0, x0, :lo12:.LC483 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 adrp x20, .LANCHOR1 add x19, x20, :lo12:.LANCHOR1 stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 bl puts adrp x0, .LC484 add x0, x0, :lo12:.LC484 bl puts adrp x0, .LC485 add x0, x0, :lo12:.LC485 bl puts adrp x21, .LANCHOR0 adrp x0, .LC486 add x0, x0, :lo12:.LC486 bl puts adrp x0, .LC487 add x0, x0, :lo12:.LC487 bl puts adrp x0, .LC488 add x0, x0, :lo12:.LC488 bl puts adrp x0, .LC489 add x0, x0, :lo12:.LC489 bl puts adrp x0, .LC490 add x0, x0, :lo12:.LC490 bl puts ldr w0, [x19, 20] adrp x1, .LC0 cbnz w0, .L462 ldr w2, [x21, #:lo12:.LANCHOR0] add x1, x1, :lo12:.LC0 mov w0, 1 add x22, x21, :lo12:.LANCHOR0 bl __printf_chk ldr w2, [x21, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x21, #:lo12:.LANCHOR0] cmp w2, 6 ble .L463 .L465: adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl puts mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L462: .cfi_restore_state ldr w2, [x21, #:lo12:.LANCHOR0] add x1, x1, :lo12:.LC0 mov w0, 1 add x22, x21, :lo12:.LANCHOR0 bl __printf_chk ldr w2, [x21, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x21, #:lo12:.LANCHOR0] cmp w2, 6 bgt .L465 adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk mov w1, 10 str wzr, [x20, #:lo12:.LANCHOR1] mov w0, 32 stp wzr, wzr, [x19, 4] str w1, [x22, 4] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L463: .cfi_restore_state adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk mov w1, 10 str wzr, [x20, #:lo12:.LANCHOR1] mov w0, 45 stp wzr, wzr, [x19, 4] str w1, [x22, 4] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE83: .size page54, .-page54 .section .rodata.str1.8 .align 3 .LC491: .string "You and 300 other excited graduates are marched from the lecture hall and into" .align 3 .LC492: .string "a large auditorium for the graduation exercise. The auditorium is" .align 3 .LC493: .string "extravagantly decorated in the colours of the graduating class. Great red and" .align 3 .LC494: .string "green plasti-paper ribbons drape from the walls, while a huge sign reading" .align 3 .LC495: .string "\"Congratulations class of GDH7-beta-203.44/A\" hangs from the raised stage down" .align 3 .LC496: .string "front. Once everyone finds a seat the ceremony begins. Jung-I-PSY is the" .align 3 .LC497: .string "first to speak, \"Congratulations students, you have successfully survived the" .align 3 .LC498: .string "Troubleshooter Training Course. It always brings me great pride to address" .align 3 .LC499: .string "the graduating class, for I know, as I am sure you do too, that you are now" .align 3 .LC500: .string "qualified for the most perilous missions The Computer may select for you. The" .align 3 .LC501: .string "thanks is not owed to us of the teaching staff, but to all of you, who have" .align 3 .LC502: .string "persevered and graduated. Good luck and die trying.\" Then the instructor" .align 3 .LC503: .string "begins reading the names of the students who one by one walk to the front of" .align 3 .LC504: .string "the auditorium and receive their diplomas. Soon it is your turn," .align 3 .LC505: .string "\"Philo-R-DMD, graduating a master of mutant identification and secret society" .align 3 .LC506: .string "infiltration.\" You walk up and receive your diploma from Plato-B-PHI%d, then\n" .align 3 .LC507: .string "return to your seat. There is another speech after the diplomas are handed" .align 3 .LC508: .string "out, but it is cut short by by rapid fire laser bursts from the high spirited" .align 3 .LC509: .string "graduating class. You are free to return to your barracks to wait, trained" .align 3 .LC510: .string "and fully qualified, for your next mission. You also get that cherished" .align 3 .LC511: .string "promotion from the Illuminati secret society. In a week you receive a" .align 3 .LC512: .string "detailed Training Course bill totalling 1,523 credits." .text .align 2 .p2align 4,,11 .global page55 .type page55, %function page55: .LFB84: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC491 add x0, x0, :lo12:.LC491 mov x29, sp bl puts adrp x0, .LC492 add x0, x0, :lo12:.LC492 bl puts adrp x0, .LC493 add x0, x0, :lo12:.LC493 bl puts adrp x0, .LC494 add x0, x0, :lo12:.LC494 bl puts adrp x0, .LC495 add x0, x0, :lo12:.LC495 bl puts adrp x0, .LC496 add x0, x0, :lo12:.LC496 bl puts adrp x0, .LC497 add x0, x0, :lo12:.LC497 bl puts adrp x0, .LC498 add x0, x0, :lo12:.LC498 bl puts adrp x0, .LC499 add x0, x0, :lo12:.LC499 bl puts adrp x0, .LC500 add x0, x0, :lo12:.LC500 bl puts adrp x0, .LC501 add x0, x0, :lo12:.LC501 bl puts adrp x0, .LC502 add x0, x0, :lo12:.LC502 bl puts adrp x0, .LC503 add x0, x0, :lo12:.LC503 bl puts adrp x0, .LC504 add x0, x0, :lo12:.LC504 bl puts adrp x0, .LC505 add x0, x0, :lo12:.LC505 bl puts adrp x0, .LANCHOR0+8 adrp x1, .LC506 add x1, x1, :lo12:.LC506 ldr w2, [x0, #:lo12:.LANCHOR0+8] mov w0, 1 bl __printf_chk adrp x0, .LC507 add x0, x0, :lo12:.LC507 bl puts adrp x0, .LC508 add x0, x0, :lo12:.LC508 bl puts adrp x0, .LC509 add x0, x0, :lo12:.LC509 bl puts adrp x0, .LC510 add x0, x0, :lo12:.LC510 bl puts adrp x0, .LC511 add x0, x0, :lo12:.LC511 bl puts adrp x0, .LC512 add x0, x0, :lo12:.LC512 bl puts adrp x0, .LC465 add x0, x0, :lo12:.LC465 bl puts mov w0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE84: .size page55, .-page55 .section .rodata.str1.8 .align 3 .LC513: .string "That familiar strange feeling of deja'vu envelops you again. It is hard to" .align 3 .LC514: .string "say, but whatever is on the other side of the door does not seem to be intended" .align 3 .LC515: .string "for you." .align 3 .LC516: .string "You go looking for more information" .align 3 .LC517: .string "You open the door and step through" .text .align 2 .p2align 4,,11 .global page56 .type page56, %function page56: .LFB85: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC513 add x0, x0, :lo12:.LC513 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC514 add x0, x0, :lo12:.LC514 bl puts adrp x0, .LC515 add x0, x0, :lo12:.LC515 bl puts adrp x19, :got:stdin adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts mov w0, 1 adrp x3, .LC516 adrp x2, .LC517 add x3, x3, :lo12:.LC516 add x2, x2, :lo12:.LC517 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L470 .p2align 3,,7 .L471: ldr x0, [x19] bl getc cmp w0, 10 bne .L471 mov w0, 33 cmp w20, 97 bne .L470 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L470: .cfi_restore_state mov w0, 22 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE85: .size page56, .-page56 .section .rodata.str1.8 .align 3 .LC518: .string "In the centre of the room is a table and a single chair. There is an Orange" .align 3 .LC519: .string "folder on the table top, but you can't make out the lettering on it." .align 3 .LC520: .string "You leave the room" .align 3 .LC521: .string "You sit down and read the folder" .text .align 2 .p2align 4,,11 .global page57 .type page57, %function page57: .LFB86: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 adrp x0, .LC518 add x0, x0, :lo12:.LC518 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 bl puts adrp x0, .LC519 add x0, x0, :lo12:.LC519 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x19, :got:stdin adrp x3, .LC520 adrp x2, .LC521 add x3, x3, :lo12:.LC520 add x2, x2, :lo12:.LC521 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w20, w0, 255 cmp w20, 10 beq .L481 .p2align 3,,7 .L482: ldr x0, [x19] bl getc cmp w0, 10 bne .L482 mov w0, 11 cmp w20, 97 bne .L481 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L481: .cfi_restore_state mov w0, 12 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE86: .size page57, .-page57 .align 2 .p2align 4,,11 .global next_page .type next_page, %function next_page: .LFB87: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov w19, w0 mov w0, 10 bl putchar cmp w19, 57 bls .L578 .L491: mov w0, w20 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L578: .cfi_restore_state adrp x0, .L494 add x0, x0, :lo12:.L494 ldrh w0, [x0,w19,uxtw #1] adr x1, .Lrtx494 add x0, x1, w0, sxth #2 br x0 .Lrtx494: .section .rodata .align 0 .align 2 .L494: .2byte (.L558 - .Lrtx494) / 4 .2byte (.L550 - .Lrtx494) / 4 .2byte (.L549 - .Lrtx494) / 4 .2byte (.L548 - .Lrtx494) / 4 .2byte (.L547 - .Lrtx494) / 4 .2byte (.L546 - .Lrtx494) / 4 .2byte (.L545 - .Lrtx494) / 4 .2byte (.L544 - .Lrtx494) / 4 .2byte (.L543 - .Lrtx494) / 4 .2byte (.L542 - .Lrtx494) / 4 .2byte (.L541 - .Lrtx494) / 4 .2byte (.L540 - .Lrtx494) / 4 .2byte (.L539 - .Lrtx494) / 4 .2byte (.L538 - .Lrtx494) / 4 .2byte (.L537 - .Lrtx494) / 4 .2byte (.L536 - .Lrtx494) / 4 .2byte (.L535 - .Lrtx494) / 4 .2byte (.L534 - .Lrtx494) / 4 .2byte (.L533 - .Lrtx494) / 4 .2byte (.L532 - .Lrtx494) / 4 .2byte (.L531 - .Lrtx494) / 4 .2byte (.L530 - .Lrtx494) / 4 .2byte (.L529 - .Lrtx494) / 4 .2byte (.L528 - .Lrtx494) / 4 .2byte (.L527 - .Lrtx494) / 4 .2byte (.L526 - .Lrtx494) / 4 .2byte (.L525 - .Lrtx494) / 4 .2byte (.L491 - .Lrtx494) / 4 .2byte (.L523 - .Lrtx494) / 4 .2byte (.L522 - .Lrtx494) / 4 .2byte (.L521 - .Lrtx494) / 4 .2byte (.L520 - .Lrtx494) / 4 .2byte (.L519 - .Lrtx494) / 4 .2byte (.L518 - .Lrtx494) / 4 .2byte (.L517 - .Lrtx494) / 4 .2byte (.L516 - .Lrtx494) / 4 .2byte (.L515 - .Lrtx494) / 4 .2byte (.L514 - .Lrtx494) / 4 .2byte (.L513 - .Lrtx494) / 4 .2byte (.L512 - .Lrtx494) / 4 .2byte (.L511 - .Lrtx494) / 4 .2byte (.L510 - .Lrtx494) / 4 .2byte (.L509 - .Lrtx494) / 4 .2byte (.L508 - .Lrtx494) / 4 .2byte (.L507 - .Lrtx494) / 4 .2byte (.L506 - .Lrtx494) / 4 .2byte (.L505 - .Lrtx494) / 4 .2byte (.L504 - .Lrtx494) / 4 .2byte (.L503 - .Lrtx494) / 4 .2byte (.L502 - .Lrtx494) / 4 .2byte (.L501 - .Lrtx494) / 4 .2byte (.L500 - .Lrtx494) / 4 .2byte (.L499 - .Lrtx494) / 4 .2byte (.L498 - .Lrtx494) / 4 .2byte (.L497 - .Lrtx494) / 4 .2byte (.L496 - .Lrtx494) / 4 .2byte (.L495 - .Lrtx494) / 4 .2byte (.L493 - .Lrtx494) / 4 .text .L558: mov w20, w19 b .L491 .L493: adrp x0, .LC518 add x0, x0, :lo12:.LC518 str x21, [sp, 32] .cfi_offset 21, -16 bl puts adrp x0, .LC519 add x0, x0, :lo12:.LC519 bl puts adrp x19, :got:stdin adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x3, .LC520 adrp x2, .LC521 add x3, x3, :lo12:.LC520 add x2, x2, :lo12:.LC521 adrp x1, .LC41 mov w0, 1 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w21, w0, 255 cmp w21, 10 beq .L556 .p2align 3,,7 .L557: ldr x0, [x19] bl getc cmp w0, 10 bne .L557 mov w20, 11 cmp w21, 97 beq .L575 .L556: mov w20, 12 ldr x21, [sp, 32] .cfi_restore 21 b .L491 .L495: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page56 .L496: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page55 .L497: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page54 .L498: .cfi_restore_state adrp x0, .LC480 add x0, x0, :lo12:.LC480 str x21, [sp, 32] .cfi_offset 21, -16 bl puts adrp x0, .LC40 add x0, x0, :lo12:.LC40 bl puts adrp x19, :got:stdin mov w0, 1 adrp x3, .LC481 adrp x2, .LC482 add x3, x3, :lo12:.LC481 add x2, x2, :lo12:.LC482 adrp x1, .LC41 add x1, x1, :lo12:.LC41 bl __printf_chk adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x19, [x19, #:got_lo12:stdin] ldr x0, [x19] bl getc and w21, w0, 255 cmp w21, 10 beq .L554 .p2align 3,,7 .L555: ldr x0, [x19] bl getc cmp w0, 10 bne .L555 mov w20, 47 cmp w21, 97 beq .L575 .L554: mov w20, 54 ldr x21, [sp, 32] .cfi_restore 21 b .L491 .L499: adrp x0, .LC478 add x0, x0, :lo12:.LC478 bl puts mov w20, 2 adrp x0, .LC479 add x0, x0, :lo12:.LC479 bl puts b .L491 .L500: adrp x0, .LC476 add x0, x0, :lo12:.LC476 str x21, [sp, 32] .cfi_offset 21, -16 bl puts adrp x0, .LC477 add x0, x0, :lo12:.LC477 adrp x19, .LANCHOR0 .L577: bl puts add x21, x19, :lo12:.LANCHOR0 ldr w2, [x19, #:lo12:.LANCHOR0] adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldr w2, [x19, #:lo12:.LANCHOR0] add w2, w2, 1 str w2, [x19, #:lo12:.LANCHOR0] cmp w2, 6 ble .L576 adrp x0, .LC1 mov w20, 0 add x0, x0, :lo12:.LC1 bl puts ldr x21, [sp, 32] .cfi_restore 21 b .L491 .L501: adrp x0, .LC473 add x0, x0, :lo12:.LC473 bl puts mov w20, 41 adrp x0, .LC474 add x0, x0, :lo12:.LC474 bl puts adrp x0, .LC475 add x0, x0, :lo12:.LC475 bl puts adrp x0, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 ldr w1, [x0, 8] add w1, w1, 1 str w1, [x0, 8] b .L491 .L502: adrp x0, .LC471 add x0, x0, :lo12:.LC471 str x21, [sp, 32] .cfi_offset 21, -16 bl puts adrp x0, .LC472 adrp x19, .LANCHOR0 add x0, x0, :lo12:.LC472 b .L577 .L503: .cfi_restore 21 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page48 .L504: .cfi_restore_state adrp x0, .LC459 add x0, x0, :lo12:.LC459 bl puts mov w20, 0 adrp x0, .LC460 add x0, x0, :lo12:.LC460 bl puts adrp x0, .LC461 add x0, x0, :lo12:.LC461 bl puts adrp x0, .LC462 add x0, x0, :lo12:.LC462 bl puts adrp x0, .LC463 add x0, x0, :lo12:.LC463 bl puts adrp x0, .LC464 add x0, x0, :lo12:.LC464 bl puts adrp x0, .LC465 add x0, x0, :lo12:.LC465 bl puts b .L491 .L505: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page46 .L506: .cfi_restore_state adrp x0, .LC445 add x0, x0, :lo12:.LC445 bl puts mov w20, 10 adrp x0, .LC446 add x0, x0, :lo12:.LC446 bl puts adrp x0, .LC447 add x0, x0, :lo12:.LC447 bl puts adrp x0, .LC448 add x0, x0, :lo12:.LC448 bl puts adrp x0, .LC449 add x0, x0, :lo12:.LC449 bl puts adrp x0, .LC450 add x0, x0, :lo12:.LC450 bl puts adrp x0, .LC451 add x0, x0, :lo12:.LC451 bl puts adrp x0, .LC452 add x0, x0, :lo12:.LC452 bl puts adrp x0, .LC453 add x0, x0, :lo12:.LC453 bl puts b .L491 .L507: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page44 .L508: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page43 .L509: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page42 .L510: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page41 .L511: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page40 .L512: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page39 .L513: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page38 .L514: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page37 .L515: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page36 .L516: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page35 .L517: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page34 .L518: .cfi_restore_state adrp x19, .LANCHOR1 add x1, x19, :lo12:.LANCHOR1 mov w2, 1 adrp x0, .LC300 add x0, x0, :lo12:.LC300 str w2, [x1, 20] bl puts adrp x0, .LC301 add x0, x0, :lo12:.LC301 bl puts adrp x0, .LC302 add x0, x0, :lo12:.LC302 bl puts adrp x0, .LC303 add x0, x0, :lo12:.LC303 bl puts adrp x0, .LC304 add x0, x0, :lo12:.LC304 bl puts adrp x0, .LC305 add x0, x0, :lo12:.LC305 bl puts ldr w0, [x19, #:lo12:.LANCHOR1] cmp w0, 1 cset w20, ne add w20, w20, 35 b .L491 .L519: adrp x0, .LC295 add x0, x0, :lo12:.LC295 bl puts mov w20, 22 adrp x0, .LC296 add x0, x0, :lo12:.LC296 bl puts adrp x0, .LC297 add x0, x0, :lo12:.LC297 bl puts adrp x0, .LC298 add x0, x0, :lo12:.LC298 bl puts adrp x0, .LC299 add x0, x0, :lo12:.LC299 bl puts b .L491 .L520: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page31 .L521: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page30 .L522: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page29 .L523: .cfi_restore_state adrp x0, .LC263 mov w20, 26 add x0, x0, :lo12:.LC263 bl puts b .L491 .L525: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page26 .L526: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page25 .L527: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page24 .L528: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page23 .L529: .cfi_restore_state adrp x0, .LC241 add x0, x0, :lo12:.LC241 bl puts bl rand negs w1, w0 and w1, w1, 3 and w0, w0, 3 csneg w0, w0, w1, mi cmp w0, 3 bhi .L491 adrp x1, .LANCHOR2 add x1, x1, :lo12:.LANCHOR2 ldr w20, [x1, w0, uxtw 2] b .L491 .L530: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page21 .L531: .cfi_restore_state adrp x0, .LC230 add x0, x0, :lo12:.LC230 bl puts mov w20, 22 adrp x0, .LC231 add x0, x0, :lo12:.LC231 bl puts adrp x0, .LC232 add x0, x0, :lo12:.LC232 bl puts adrp x0, .LC233 add x0, x0, :lo12:.LC233 bl puts adrp x0, .LC234 add x0, x0, :lo12:.LC234 bl puts adrp x0, .LC235 add x0, x0, :lo12:.LC235 bl puts adrp x0, .LC236 add x0, x0, :lo12:.LC236 bl puts b .L491 .L532: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page19 .L533: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page18 .L534: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page17 .L535: .cfi_restore_state adrp x0, .LC196 add x0, x0, :lo12:.LC196 bl puts mov w20, 22 adrp x0, .LC197 add x0, x0, :lo12:.LC197 bl puts adrp x0, .LC198 add x0, x0, :lo12:.LC198 bl puts adrp x0, .LC199 add x0, x0, :lo12:.LC199 bl puts adrp x0, .LC200 add x0, x0, :lo12:.LC200 bl puts adrp x0, .LANCHOR1+4 mov w1, 1 str w1, [x0, #:lo12:.LANCHOR1+4] b .L491 .L536: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page15 .L537: .cfi_restore_state adrp x0, .LC174 add x0, x0, :lo12:.LC174 bl puts mov w20, 22 adrp x0, .LC175 add x0, x0, :lo12:.LC175 bl puts adrp x0, .LC176 add x0, x0, :lo12:.LC176 bl puts adrp x0, .LC177 add x0, x0, :lo12:.LC177 bl puts adrp x0, .LC178 add x0, x0, :lo12:.LC178 bl puts adrp x0, .LC179 add x0, x0, :lo12:.LC179 bl puts adrp x0, .LC180 add x0, x0, :lo12:.LC180 bl puts adrp x0, .LC181 add x0, x0, :lo12:.LC181 bl puts adrp x0, .LC182 add x0, x0, :lo12:.LC182 bl puts b .L491 .L538: adrp x0, .LC166 add x0, x0, :lo12:.LC166 bl puts mov w20, 14 adrp x0, .LC167 add x0, x0, :lo12:.LC167 bl puts adrp x0, .LC168 add x0, x0, :lo12:.LC168 bl puts adrp x0, .LC169 add x0, x0, :lo12:.LC169 bl puts adrp x0, .LC170 add x0, x0, :lo12:.LC170 bl puts adrp x0, .LC171 add x0, x0, :lo12:.LC171 bl puts adrp x0, .LC172 add x0, x0, :lo12:.LC172 bl puts adrp x0, .LC173 add x0, x0, :lo12:.LC173 bl puts b .L491 .L539: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page12 .L540: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page11 .L541: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page10 .L542: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page9 .L543: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page8 .L544: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page7 .L545: .cfi_restore_state adrp x0, .LC73 add x0, x0, :lo12:.LC73 bl puts mov w20, 8 adrp x0, .LC74 add x0, x0, :lo12:.LC74 bl puts adrp x0, .LC75 add x0, x0, :lo12:.LC75 bl puts adrp x0, .LC76 add x0, x0, :lo12:.LC76 bl puts adrp x0, .LC77 add x0, x0, :lo12:.LC77 bl puts adrp x0, .LC78 add x0, x0, :lo12:.LC78 bl puts adrp x0, .LANCHOR1 mov w1, 1 str w1, [x0, #:lo12:.LANCHOR1] b .L491 .L546: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page5 .L547: .cfi_restore_state adrp x0, .LC62 add x0, x0, :lo12:.LC62 bl puts mov w20, 9 adrp x0, .LC63 add x0, x0, :lo12:.LC63 bl puts adrp x0, .LC64 add x0, x0, :lo12:.LC64 bl puts b .L491 .L548: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page3 .L549: .cfi_restore_state ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b page2 .L550: .cfi_restore_state adrp x0, .LC42 add x0, x0, :lo12:.LC42 bl puts mov w20, 57 adrp x0, .LC43 add x0, x0, :lo12:.LC43 bl puts adrp x0, .LC44 add x0, x0, :lo12:.LC44 bl puts b .L491 .p2align 2,,3 .L576: .cfi_offset 21, -16 adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk adrp x1, .LANCHOR1 add x0, x1, :lo12:.LANCHOR1 mov w2, 10 mov w20, 32 str wzr, [x1, #:lo12:.LANCHOR1] str w2, [x21, 4] stp wzr, wzr, [x0, 4] ldr x21, [sp, 32] .cfi_remember_state .cfi_restore 21 b .L491 .p2align 2,,3 .L575: .cfi_restore_state ldr x21, [sp, 32] .cfi_restore 21 b .L491 .cfi_endproc .LFE87: .size next_page, .-next_page .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB88: .cfi_startproc stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] .cfi_offset 19, -80 .cfi_offset 20, -72 .cfi_offset 21, -64 .cfi_offset 22, -56 .cfi_offset 23, -48 .cfi_offset 24, -40 adrp x24, :got:stdout adrp x23, .LANCHOR0 stp x25, x26, [sp, 64] .cfi_offset 25, -32 .cfi_offset 26, -24 adrp x25, .LC39 add x21, x25, :lo12:.LC39 str x27, [sp, 80] .cfi_offset 27, -16 bl instructions bl more bl character bl more ldr x22, [x24, #:got_lo12:stdout] .p2align 3,,7 .L583: add x26, x23, :lo12:.LANCHOR0 .L581: ldr w0, [x26, 12] adrp x20, :got:stdin bl next_page str w0, [x26, 12] mov x1, x21 cbz w0, .L595 mov w0, 1 bl __printf_chk ldr x0, [x22] bl fflush ldr x19, [x20, #:got_lo12:stdin] ldr x0, [x19] bl getc and w27, w0, 255 cmp w27, 10 beq .L581 .p2align 3,,7 .L582: ldr x0, [x19] bl getc cmp w0, 10 bne .L582 cmp w27, 112 bne .L583 bl character add x1, x25, :lo12:.LC39 mov w0, 1 bl __printf_chk ldr x0, [x24, #:got_lo12:stdout] ldr x0, [x0] bl fflush ldr x0, [x19] bl getc and w0, w0, 255 cmp w0, 10 beq .L583 ldr x20, [x20, #:got_lo12:stdin] .p2align 3,,7 .L585: ldr x0, [x20] bl getc cmp w0, 10 bne .L585 b .L583 .p2align 2,,3 .L595: 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], 96 .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_offset 0 ret .cfi_endproc .LFE88: .size main, .-main .global killer_count .global blast_door .global plato_clone .global read_letter .global hit_points .global action_doll .global ultra_violet .global computer_request .global page .global clone .data .align 2 .set .LANCHOR0,. + 0 .type clone, %object .size clone, 4 clone: .word 1 .type hit_points, %object .size hit_points, 4 hit_points: .word 10 .type plato_clone, %object .size plato_clone, 4 plato_clone: .word 3 .type page, %object .size page, 4 page: .word 1 .bss .align 2 .set .LANCHOR1,. + 0 .type ultra_violet, %object .size ultra_violet, 4 ultra_violet: .zero 4 .type action_doll, %object .size action_doll, 4 action_doll: .zero 4 .type killer_count, %object .size killer_count, 4 killer_count: .zero 4 .type computer_request, %object .size computer_request, 4 computer_request: .zero 4 .type read_letter, %object .size read_letter, 4 read_letter: .zero 4 .type blast_door, %object .size blast_door, 4 blast_door: .zero 4 .section .rodata .align 3 .set .LANCHOR2,. + 0 .type CSWTCH.56, %object .size CSWTCH.56, 16 CSWTCH.56: .word 18 .word 15 .word 18 .word 29 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
mips-features.c
// Check handling MIPS specific features options. // // -mabicalls // RUN: %clang -target mips-linux-gnu -### -c %s -mno-abicalls -mabicalls 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MABICALLS %s // CHECK-MABICALLS: "-target-feature" "-noabicalls" // // -mno-abicalls // RUN: %clang -target mips-linux-gnu -### -c %s -mabicalls -mno-abicalls 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MNOABICALLS %s // CHECK-MNOABICALLS: "-target-feature" "+noabicalls" // // -mips16 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mno-mips16 -mips16 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MIPS16 %s // CHECK-MIPS16: "-target-feature" "+mips16" // // -mno-mips16 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mips16 -mno-mips16 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOMIPS16 %s // CHECK-NOMIPS16: "-target-feature" "-mips16" // // -mmicromips // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mno-micromips -mmicromips 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MICROMIPS %s // CHECK-MICROMIPS: "-target-feature" "+micromips" // // -mno-micromips // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mmicromips -mno-micromips 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOMICROMIPS %s // CHECK-NOMICROMIPS: "-target-feature" "-micromips" // // -mdsp // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mno-dsp -mdsp 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MDSP %s // CHECK-MDSP: "-target-feature" "+dsp" // // -mno-dsp // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mdsp -mno-dsp 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOMDSP %s // CHECK-NOMDSP: "-target-feature" "-dsp" // // -mdspr2 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mno-dspr2 -mdspr2 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MDSPR2 %s // CHECK-MDSPR2: "-target-feature" "+dspr2" // // -mno-dspr2 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mdspr2 -mno-dspr2 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOMDSPR2 %s // CHECK-NOMDSPR2: "-target-feature" "-dspr2" // // -mmsa // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mno-msa -mmsa 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MMSA %s // CHECK-MMSA: "-target-feature" "+msa" // // -mno-msa // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mmsa -mno-msa 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOMMSA %s // CHECK-NOMMSA: "-target-feature" "-msa" // // -modd-spreg // RUN: %clang -target mips-linux-gnu -### -c %s -mno-odd-spreg -modd-spreg 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MODDSPREG %s // CHECK-MODDSPREG: "-target-feature" "-nooddspreg" // // -mno-odd-spreg // RUN: %clang -target mips-linux-gnu -### -c %s -modd-spreg -mno-odd-spreg 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOMODDSPREG %s // CHECK-NOMODDSPREG: "-target-feature" "+nooddspreg" // // -mfpxx // RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MFPXX %s // CHECK-MFPXX: "-target-feature" "+fpxx" // CHECK-MFPXX: "-target-feature" "+nooddspreg" // // -mfpxx -modd-spreg // RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx -modd-spreg 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MFPXX-ODDSPREG %s // CHECK-MFPXX-ODDSPREG: "-target-feature" "+fpxx" // CHECK-MFPXX-ODDSPREG: "-target-feature" "-nooddspreg" // // -mfp64 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mfp32 -mfp64 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MFP64 %s // CHECK-MFP64: "-target-feature" "+fp64" // // -mfp32 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mfp64 -mfp32 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOMFP64 %s // CHECK-NOMFP64: "-target-feature" "-fp64" // // -mnan=2008 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mnan=legacy -mnan=2008 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NAN2008 %s // CHECK-NAN2008: "-target-feature" "+nan2008" // // -mnan=legacy // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mnan=2008 -mnan=legacy 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NANLEGACY %s // CHECK-NANLEGACY: "-target-feature" "-nan2008" // // -mxgot // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mno-xgot -mxgot 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-XGOT %s // CHECK-XGOT: "-mllvm" "-mxgot" // // -mno-xgot // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mxgot -mno-xgot 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOXGOT %s // CHECK-NOXGOT-NOT: "-mllvm" "-mxgot" // // -mldc1-sdc1 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mno-ldc1-sdc1 -mldc1-sdc1 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-LDC1SDC1 %s // CHECK-LDC1SDC1-NOT: "-mllvm" "-mno-ldc1-sdc1" // // -mno-ldc1-sdc1 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mldc1-sdc1 -mno-ldc1-sdc1 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOLDC1SDC1 %s // CHECK-NOLDC1SDC1: "-mllvm" "-mno-ldc1-sdc1" // // -mcheck-zero-division // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mno-check-zero-division -mcheck-zero-division 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-ZERODIV %s // CHECK-ZERODIV-NOT: "-mllvm" "-mno-check-zero-division" // // -mno-check-zero-division // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mcheck-zero-division -mno-check-zero-division 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NOZERODIV %s // CHECK-NOZERODIV: "-mllvm" "-mno-check-zero-division" // // -G // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -G 16 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MIPS-G %s // CHECK-MIPS-G: "-mllvm" "-mips-ssection-threshold=16"
.file "mips-features.c" .option pic .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "mips-features.c" .option pic .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "mips-features.c" .option pic .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "mips-features.c" .option pic .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "mips-features.c" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "mips-features.c" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "mips-features.c" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "mips-features.c" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
PatternX.c
#include<stdio.h> #include<string.h> int main() { char str[1000]; int i,j; scanf("%s",&str); //printf("%s",str); for(i=0;i<strlen(str);i++) { for(j=0;j<strlen(str);j++) { if((i==j) || i+j==strlen(str)-1) printf("%c",str[j]); else printf(" "); } printf("\n"); } return 0; }
.file "PatternX.c" .option pic .text .section .rodata .align 3 .LC0: .string "%s" .text .align 1 .globl main .type main, @function main: addi sp,sp,-1056 sd ra,1048(sp) sd s0,1040(sp) sd s1,1032(sp) addi s0,sp,1056 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -40(s0) li a4, 0 addi a5,s0,-1040 mv a1,a5 lla a0,.LC0 call __isoc99_scanf@plt sw zero,-1048(s0) j .L2 .L8: sw zero,-1044(s0) j .L3 .L7: lw a5,-1048(s0) mv a4,a5 lw a5,-1044(s0) sext.w a4,a4 sext.w a5,a5 beq a4,a5,.L4 lw a5,-1048(s0) mv a4,a5 lw a5,-1044(s0) addw a5,a4,a5 sext.w a5,a5 mv s1,a5 addi a5,s0,-1040 mv a0,a5 call strlen@plt mv a5,a0 addi a5,a5,-1 bne s1,a5,.L5 .L4: lw a5,-1044(s0) addi a5,a5,-32 add a5,a5,s0 lbu a5,-1008(a5) sext.w a5,a5 mv a0,a5 call putchar@plt j .L6 .L5: li a0,32 call putchar@plt .L6: lw a5,-1044(s0) addiw a5,a5,1 sw a5,-1044(s0) .L3: lw s1,-1044(s0) addi a5,s0,-1040 mv a0,a5 call strlen@plt mv a5,a0 bltu s1,a5,.L7 li a0,10 call putchar@plt lw a5,-1048(s0) addiw a5,a5,1 sw a5,-1048(s0) .L2: lw s1,-1048(s0) addi a5,s0,-1040 mv a0,a5 call strlen@plt mv a5,a0 bltu s1,a5,.L8 li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -40(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L10 call __stack_chk_fail@plt .L10: mv a0,a4 ld ra,1048(sp) ld s0,1040(sp) ld s1,1032(sp) addi sp,sp,1056 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "PatternX.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%s" .text .align 1 .globl main .type main, @function main: addi sp,sp,-1056 sd ra,1048(sp) sd s0,1040(sp) sd s1,1032(sp) sd s2,1024(sp) sd s3,1016(sp) sd s4,1008(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 1000(sp) li a4, 0 mv a1,sp lla a0,.LC0 call __isoc99_scanf@plt li s2,0 mv s3,sp j .L2 .L3: lbu a0,0(s1) call putchar@plt .L5: addi s0,s0,1 addi s1,s1,1 .L8: mv a0,s3 call strlen@plt bleu a0,s0,.L11 sext.w a5,s0 beq a5,s4,.L3 addw a5,s0,s2 addi a0,a0,-1 beq a5,a0,.L3 li a0,32 call putchar@plt j .L5 .L11: li a0,10 call putchar@plt addi s2,s2,1 .L2: mv a0,s3 call strlen@plt bleu a0,s2,.L7 mv s1,sp li s0,0 sext.w s4,s2 j .L8 .L7: la a5,__stack_chk_guard ld a4, 1000(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L12 li a0,0 ld ra,1048(sp) ld s0,1040(sp) ld s1,1032(sp) ld s2,1024(sp) ld s3,1016(sp) ld s4,1008(sp) addi sp,sp,1056 jr ra .L12: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "PatternX.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%s" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-1072 sd s3,1032(sp) sd s4,1024(sp) mv s3,sp la s4,__stack_chk_guard mv a1,s3 lla a0,.LC0 ld a5, 0(s4) sd a5, 1000(sp) li a5, 0 sd s2,1040(sp) sd ra,1064(sp) sd s0,1056(sp) sd s1,1048(sp) sd s5,1016(sp) call __isoc99_scanf@plt mv a0,s3 li s2,0 call strlen@plt bleu a0,s2,.L12 .L7: mv s1,s3 li s0,0 sext.w s5,s2 j .L6 .L4: li a0,32 call putchar@plt mv a0,s3 call strlen@plt addi s0,s0,1 addi s1,s1,1 bleu a0,s0,.L13 .L6: sext.w a5,s0 beq a5,s5,.L3 addw a5,s0,s2 addi a0,a0,-1 bne a5,a0,.L4 .L3: lbu a0,0(s1) addi s0,s0,1 addi s1,s1,1 call putchar@plt mv a0,s3 call strlen@plt bgtu a0,s0,.L6 .L13: li a0,10 call putchar@plt mv a0,s3 addi s2,s2,1 call strlen@plt bgtu a0,s2,.L7 .L12: ld a4, 1000(sp) ld a5, 0(s4) xor a5, a4, a5 li a4, 0 bne a5,zero,.L14 ld ra,1064(sp) ld s0,1056(sp) ld s1,1048(sp) ld s2,1040(sp) ld s3,1032(sp) ld s4,1024(sp) ld s5,1016(sp) li a0,0 addi sp,sp,1072 jr ra .L14: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "PatternX.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%s" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-1072 sd s3,1032(sp) sd s4,1024(sp) mv s3,sp la s4,__stack_chk_guard mv a1,s3 lla a0,.LC0 ld a5, 0(s4) sd a5, 1000(sp) li a5, 0 sd s2,1040(sp) sd ra,1064(sp) sd s0,1056(sp) sd s1,1048(sp) sd s5,1016(sp) call __isoc99_scanf@plt mv a0,s3 li s2,0 call strlen@plt bleu a0,s2,.L12 .L7: mv s1,s3 li s0,0 sext.w s5,s2 j .L6 .L4: li a0,32 call putchar@plt mv a0,s3 call strlen@plt addi s0,s0,1 addi s1,s1,1 bleu a0,s0,.L13 .L6: sext.w a5,s0 beq a5,s5,.L3 addw a5,s0,s2 addi a0,a0,-1 bne a5,a0,.L4 .L3: lbu a0,0(s1) addi s0,s0,1 addi s1,s1,1 call putchar@plt mv a0,s3 call strlen@plt bgtu a0,s0,.L6 .L13: li a0,10 call putchar@plt mv a0,s3 addi s2,s2,1 call strlen@plt bgtu a0,s2,.L7 .L12: ld a4, 1000(sp) ld a5, 0(s4) xor a5, a4, a5 li a4, 0 bne a5,zero,.L14 ld ra,1064(sp) ld s0,1056(sp) ld s1,1048(sp) ld s2,1040(sp) ld s3,1032(sp) ld s4,1024(sp) ld s5,1016(sp) li a0,0 addi sp,sp,1072 jr ra .L14: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "PatternX.c" .text .section .rodata .align 3 .LC0: .string "%s" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc sub sp, sp, #1056 .cfi_def_cfa_offset 1056 stp x29, x30, [sp] .cfi_offset 29, -1056 .cfi_offset 30, -1048 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -1040 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1048] mov x1, 0 add x0, sp, 48 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf str wzr, [sp, 40] b .L2 .L8: str wzr, [sp, 44] b .L3 .L7: ldr w1, [sp, 40] ldr w0, [sp, 44] cmp w1, w0 beq .L4 ldr w1, [sp, 40] ldr w0, [sp, 44] add w0, w1, w0 sxtw x19, w0 add x0, sp, 48 bl strlen sub x0, x0, #1 cmp x19, x0 bne .L5 .L4: ldrsw x0, [sp, 44] add x1, sp, 48 ldrb w0, [x1, x0] bl putchar b .L6 .L5: mov w0, 32 bl putchar .L6: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L3: ldrsw x19, [sp, 44] add x0, sp, 48 bl strlen cmp x19, x0 bcc .L7 mov w0, 10 bl putchar ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L2: ldrsw x19, [sp, 40] add x0, sp, 48 bl strlen cmp x19, x0 bcc .L8 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 1048] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L10 bl __stack_chk_fail .L10: mov w0, w1 ldr x19, [sp, 16] ldp x29, x30, [sp] add sp, sp, 1056 .cfi_restore 29 .cfi_restore 30 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "PatternX.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%s" .text .align 2 .global main .type main, %function main: .LFB35: .cfi_startproc sub sp, sp, #1072 .cfi_def_cfa_offset 1072 stp x29, x30, [sp] .cfi_offset 29, -1072 .cfi_offset 30, -1064 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] .cfi_offset 19, -1056 .cfi_offset 20, -1048 .cfi_offset 21, -1040 .cfi_offset 22, -1032 .cfi_offset 23, -1024 .cfi_offset 24, -1016 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1064] mov x1, 0 add x1, sp, 64 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf mov x21, 0 add x22, sp, 64 mov w23, 32 mov w24, 10 b .L2 .L3: ldrb w0, [x20] bl putchar .L5: add x19, x19, 1 add x20, x20, 1 .L8: mov x0, x22 bl strlen cmp x0, x19 bls .L11 cmp w19, w21 beq .L3 add w1, w19, w21 sub x0, x0, #1 cmp x0, w1, sxtw beq .L3 mov w0, w23 bl putchar b .L5 .L11: mov w0, w24 bl putchar add x21, x21, 1 .L2: mov x0, x22 bl strlen cmp x0, x21 bls .L7 add x20, sp, 64 mov x19, 0 b .L8 .L7: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1064] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L12 mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldp x29, x30, [sp] add sp, sp, 1072 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L12: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE35: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "PatternX.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%s" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB35: .cfi_startproc sub sp, sp, #1056 .cfi_def_cfa_offset 1056 adrp x2, :got:__stack_chk_guard adrp x0, .LC0 add x0, x0, :lo12:.LC0 stp x29, x30, [sp] .cfi_offset 29, -1056 .cfi_offset 30, -1048 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -1040 .cfi_offset 20, -1032 .cfi_offset 21, -1024 .cfi_offset 22, -1016 add x22, sp, 48 mov x1, x22 ldr x3, [x2] str x3, [sp, 1048] mov x3, 0 mov x21, 0 bl __isoc99_scanf mov x0, x22 bl strlen cmp x0, x21 bls .L12 .p2align 3,,7 .L7: mov x20, x22 mov x19, 0 b .L6 .p2align 2,,3 .L4: mov w0, 32 add x19, x19, 1 bl putchar add x20, x20, 1 mov x0, x22 bl strlen cmp x0, x19 bls .L13 .L6: cmp w19, w21 beq .L3 add w1, w19, w21 sub x0, x0, #1 cmp x0, w1, sxtw bne .L4 .L3: ldrb w0, [x20] add x19, x19, 1 add x20, x20, 1 bl putchar mov x0, x22 bl strlen cmp x0, x19 bhi .L6 .L13: add x21, x21, 1 mov w0, 10 bl putchar mov x0, x22 bl strlen cmp x0, x21 bhi .L7 .L12: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1048] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L14 mov w0, 0 ldp x29, x30, [sp] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] add sp, sp, 1056 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L14: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE35: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "PatternX.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%s" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB35: .cfi_startproc sub sp, sp, #1056 .cfi_def_cfa_offset 1056 adrp x2, :got:__stack_chk_guard adrp x0, .LC0 add x0, x0, :lo12:.LC0 stp x29, x30, [sp] .cfi_offset 29, -1056 .cfi_offset 30, -1048 mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -1040 .cfi_offset 20, -1032 .cfi_offset 21, -1024 .cfi_offset 22, -1016 add x22, sp, 48 mov x1, x22 ldr x3, [x2] str x3, [sp, 1048] mov x3, 0 mov x21, 0 bl __isoc99_scanf mov x0, x22 bl strlen cmp x0, x21 bls .L12 .p2align 3,,7 .L7: mov x20, x22 mov x19, 0 b .L6 .p2align 2,,3 .L4: mov w0, 32 add x19, x19, 1 bl putchar add x20, x20, 1 mov x0, x22 bl strlen cmp x0, x19 bls .L13 .L6: cmp w19, w21 beq .L3 add w1, w19, w21 sub x0, x0, #1 cmp x0, w1, sxtw bne .L4 .L3: ldrb w0, [x20] add x19, x19, 1 add x20, x20, 1 bl putchar mov x0, x22 bl strlen cmp x0, x19 bhi .L6 .L13: add x21, x21, 1 mov w0, 10 bl putchar mov x0, x22 bl strlen cmp x0, x21 bhi .L7 .L12: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 1048] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L14 mov w0, 0 ldp x29, x30, [sp] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] add sp, sp, 1056 .cfi_remember_state .cfi_restore 29 .cfi_restore 30 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L14: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE35: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
HelloWorld-loop-nice-5.c
#include <stdio.h> int main() { int k; printf("HelloWorld!\n"); nice(-5); while(1); k=k+1; return 0; }
.file "HelloWorld-loop-nice-5.c" .option pic .text .section .rodata .align 3 .LC0: .string "HelloWorld!" .text .align 1 .globl main .type main, @function main: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a0,.LC0 call puts@plt li a0,-5 call nice@plt .L2: j .L2 .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "HelloWorld-loop-nice-5.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "HelloWorld!" .text .align 1 .globl main .type main, @function main: addi sp,sp,-16 sd ra,8(sp) lla a0,.LC0 call puts@plt li a0,-5 call nice@plt .L2: j .L2 .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "HelloWorld-loop-nice-5.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "HelloWorld!" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-16 lla a0,.LC0 sd ra,8(sp) call puts@plt li a0,-5 call nice@plt .L2: j .L2 .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "HelloWorld-loop-nice-5.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "HelloWorld!" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-16 lla a0,.LC0 sd ra,8(sp) call puts@plt li a0,-5 call nice@plt .L2: j .L2 .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "HelloWorld-loop-nice-5.c" .text .section .rodata .align 3 .LC0: .string "HelloWorld!" .text .align 2 .global main .type main, %function main: .LFB0: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts mov w0, -5 bl nice .L2: b .L2 .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "HelloWorld-loop-nice-5.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "HelloWorld!" .text .align 2 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl puts mov w0, -5 bl nice .L2: b .L2 .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "HelloWorld-loop-nice-5.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "HelloWorld!" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC0 add x0, x0, :lo12:.LC0 mov x29, sp bl puts mov w0, -5 bl nice .L2: b .L2 .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "HelloWorld-loop-nice-5.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "HelloWorld!" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LC0 add x0, x0, :lo12:.LC0 mov x29, sp bl puts mov w0, -5 bl nice .L2: b .L2 .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
test_21.c
//quartz2963_6801/_tests/_group_1/_test_7.c //+1.0017E305 5 +1.2159E306 +1.6163E305 +1.7957E41 5 -1.6196E-307 +1.4187E-307 +1.8598E306 +1.7620E-307 +0.0 +0.0 -1.7235E-313 -1.6086E305 -1.9217E131 // /* This is a automatically generated test. Do not modify */ #include <stdio.h> #include <stdlib.h> #include <math.h> void compute(double comp, int var_1,double var_2,double var_3,double var_4,int var_5,double var_6,double var_7,double var_8,double var_9,double var_10,double var_11,double var_12,double var_13,double var_14) { if (comp > atan((+1.3559E305 - (var_2 + +1.6203E-306 * (var_3 * -1.5065E306 + var_4))))) { for (int i=0; i < var_1; ++i) { comp += +1.4047E305 + -1.8643E305 - -1.1787E-320 - (-0.0 / (-0.0 - var_6)); double tmp_1 = -1.4206E305; comp = tmp_1 + (var_7 - (var_8 / -1.2937E306)); for (int i=0; i < var_5; ++i) { comp = (var_9 - var_10 + var_11 + (-0.0 - var_12)); comp += -0.0 / fmod((var_13 - (+1.1617E-313 + -1.4168E-65 * (-1.0486E-320 + +1.6037E305))), (-1.5038E306 * var_14)); } } } printf("%.17g\n", comp); } double* initPointer(double v) { double *ret = (double*) malloc(sizeof(double)*10); for(int i=0; i < 10; ++i) ret[i] = v; return ret; } int main(int argc, char** argv) { /* Program variables */ double tmp_1 = atof(argv[1]); int tmp_2 = atoi(argv[2]); double tmp_3 = atof(argv[3]); double tmp_4 = atof(argv[4]); double tmp_5 = atof(argv[5]); int tmp_6 = atoi(argv[6]); double tmp_7 = atof(argv[7]); double tmp_8 = atof(argv[8]); double tmp_9 = atof(argv[9]); double tmp_10 = atof(argv[10]); double tmp_11 = atof(argv[11]); double tmp_12 = atof(argv[12]); double tmp_13 = atof(argv[13]); double tmp_14 = atof(argv[14]); double tmp_15 = atof(argv[15]); compute(tmp_1,tmp_2,tmp_3,tmp_4,tmp_5,tmp_6,tmp_7,tmp_8,tmp_9,tmp_10,tmp_11,tmp_12,tmp_13,tmp_14,tmp_15); return 0; }
.file "test_21.c" .option pic .text .section .rodata .align 3 .LC9: .string "%.17g\n" .text .align 1 .globl compute .type compute, @function compute: addi sp,sp,-144 sd ra,136(sp) sd s0,128(sp) addi s0,sp,144 fsd fa0,-40(s0) fsd fa1,-56(s0) fsd fa2,-64(s0) fsd fa3,-72(s0) fsd fa4,-80(s0) fsd fa5,-88(s0) fsd fa6,-96(s0) fsd fa7,-104(s0) sd a2,-112(s0) sd a3,-120(s0) sd a4,-128(s0) sd a5,-136(s0) sd a6,-144(s0) mv a5,a0 sw a5,-44(s0) mv a5,a1 sw a5,-48(s0) fld fa4,-64(s0) lla a5,.LC0 fld fa5,0(a5) fmul.d fa4,fa4,fa5 fld fa5,-72(s0) fadd.d fa4,fa4,fa5 lla a5,.LC1 fld fa5,0(a5) fmul.d fa4,fa4,fa5 fld fa5,-56(s0) fadd.d fa5,fa4,fa5 lla a5,.LC2 fld fa4,0(a5) fsub.d fa5,fa4,fa5 fmv.d fa0,fa5 call atan@plt fmv.d fa4,fa0 fld fa5,-40(s0) fgt.d a5,fa5,fa4 beq a5,zero,.L2 sw zero,-32(s0) j .L4 .L7: fmv.d.x fa4,zero fld fa5,-80(s0) fdiv.d fa5,fa4,fa5 lla a5,.LC3 fld fa4,0(a5) fsub.d fa5,fa4,fa5 fld fa4,-40(s0) fadd.d fa5,fa4,fa5 fsd fa5,-40(s0) lla a5,.LC4 fld fa5,0(a5) fsd fa5,-24(s0) fld fa4,-96(s0) lla a5,.LC5 fld fa5,0(a5) fdiv.d fa4,fa4,fa5 fld fa5,-88(s0) fadd.d fa5,fa4,fa5 fld fa4,-24(s0) fadd.d fa5,fa4,fa5 fsd fa5,-40(s0) sw zero,-28(s0) j .L5 .L6: fld fa4,-104(s0) fld fa5,-112(s0) fsub.d fa4,fa4,fa5 fld fa5,-120(s0) fadd.d fa4,fa4,fa5 fld fa5,-128(s0) fsub.d fa5,fa4,fa5 fsd fa5,-40(s0) fld fa4,-136(s0) lla a5,.LC6 fld fa5,0(a5) fadd.d fa3,fa4,fa5 fld fa4,-144(s0) lla a5,.LC7 fld fa5,0(a5) fmul.d fa5,fa4,fa5 fmv.d fa1,fa5 fmv.d fa0,fa3 call fmod@plt fmv.d fa4,fa0 lla a5,.LC8 fld fa5,0(a5) fdiv.d fa5,fa5,fa4 fld fa4,-40(s0) fadd.d fa5,fa4,fa5 fsd fa5,-40(s0) lw a5,-28(s0) addiw a5,a5,1 sw a5,-28(s0) .L5: lw a5,-28(s0) mv a4,a5 lw a5,-48(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L6 lw a5,-32(s0) addiw a5,a5,1 sw a5,-32(s0) .L4: lw a5,-32(s0) mv a4,a5 lw a5,-44(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L7 .L2: ld a1,-40(s0) lla a0,.LC9 call printf@plt nop ld ra,136(sp) ld s0,128(sp) addi sp,sp,144 jr ra .size compute, .-compute .align 1 .globl initPointer .type initPointer, @function initPointer: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 fsd fa0,-40(s0) li a0,80 call malloc@plt mv a5,a0 sd a5,-24(s0) sw zero,-28(s0) j .L10 .L11: lw a5,-28(s0) slli a5,a5,3 ld a4,-24(s0) add a5,a4,a5 fld fa5,-40(s0) fsd fa5,0(a5) lw a5,-28(s0) addiw a5,a5,1 sw a5,-28(s0) .L10: lw a5,-28(s0) sext.w a4,a5 li a5,9 ble a4,a5,.L11 ld a5,-24(s0) mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size initPointer, .-initPointer .align 1 .globl main .type main, @function main: addi sp,sp,-144 sd ra,136(sp) sd s0,128(sp) addi s0,sp,144 mv a5,a0 sd a1,-144(s0) sw a5,-132(s0) ld a5,-144(s0) addi a5,a5,8 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-120(s0) ld a5,-144(s0) addi a5,a5,16 ld a5,0(a5) mv a0,a5 call atoi@plt mv a5,a0 sw a5,-128(s0) ld a5,-144(s0) addi a5,a5,24 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-112(s0) ld a5,-144(s0) addi a5,a5,32 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-104(s0) ld a5,-144(s0) addi a5,a5,40 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-96(s0) ld a5,-144(s0) addi a5,a5,48 ld a5,0(a5) mv a0,a5 call atoi@plt mv a5,a0 sw a5,-124(s0) ld a5,-144(s0) addi a5,a5,56 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-88(s0) ld a5,-144(s0) addi a5,a5,64 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-80(s0) ld a5,-144(s0) addi a5,a5,72 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-72(s0) ld a5,-144(s0) addi a5,a5,80 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-64(s0) ld a5,-144(s0) addi a5,a5,88 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-56(s0) ld a5,-144(s0) addi a5,a5,96 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-48(s0) ld a5,-144(s0) addi a5,a5,104 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-40(s0) ld a5,-144(s0) addi a5,a5,112 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-32(s0) ld a5,-144(s0) addi a5,a5,120 ld a5,0(a5) mv a0,a5 call atof@plt fsd fa0,-24(s0) lw a1,-124(s0) lw a0,-128(s0) ld a6,-24(s0) ld a5,-32(s0) ld a4,-40(s0) ld a3,-48(s0) ld a2,-56(s0) fld fa7,-64(s0) fld fa6,-72(s0) fld fa5,-80(s0) fld fa4,-88(s0) fld fa3,-96(s0) fld fa2,-104(s0) fld fa1,-112(s0) fld fa0,-120(s0) call compute li a5,0 mv a0,a5 ld ra,136(sp) ld s0,128(sp) addi sp,sp,144 jr ra .size main, .-main .section .rodata .align 3 .LC0: .word 1344411004 .word -8312415 .align 3 .LC1: .word -963977186 .word 7484539 .align 3 .LC2: .word -1977314903 .word 2135471887 .align 3 .LC3: .word -1824484740 .word -13582009 .align 3 .LC4: .word -1290850440 .word -11934472 .align 3 .LC5: .word 125465370 .word 2138929669 .align 3 .LC6: .word -1184782507 .word 1909837526 .align 3 .LC7: .word 1991164501 .word -8314431 .align 3 .LC8: .word 0 .word -2147483648 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "test_21.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC8: .string "%.17g\n" .text .align 1 .globl compute .type compute, @function compute: addi sp,sp,-160 sd ra,152(sp) sd s0,144(sp) sd s1,136(sp) sd s2,128(sp) sd s3,120(sp) sd s4,112(sp) sd s5,104(sp) sd s6,96(sp) sd s7,88(sp) fsd fs0,72(sp) fsd fs1,64(sp) fsd fs2,56(sp) fsd fs3,48(sp) fsd fs4,40(sp) fsd fs5,32(sp) fsd fs6,24(sp) fsd fs7,16(sp) fsd fs8,8(sp) fsd fs9,0(sp) fmv.d fs0,fa0 mv s3,a0 mv s1,a1 fmv.d fs9,fa5 fmv.d fs1,fa6 fmv.d fs2,fa7 fmv.d.x fs3,a2 fmv.d.x fs4,a3 fmv.d.x fs5,a4 fmv.d.x fs6,a5 fmv.d.x fs7,a6 fld fa5,.LC0,a5 fmul.d fa2,fa2,fa5 fadd.d fa2,fa2,fa3 fld fa5,.LC1,a5 fmul.d fa2,fa2,fa5 fadd.d fa2,fa2,fa1 fld fa0,.LC2,a5 fsub.d fa0,fa0,fa2 call atan@plt flt.d a5,fa0,fs0 beq a5,zero,.L2 ble s3,zero,.L2 fld fs8,.LC3,a5 fdiv.d fs8,fs1,fs8 fadd.d fs8,fs8,fs9 fld fa5,.LC4,a5 fsub.d fs8,fs8,fa5 li s2,0 lla s7,.LC5 li s6,0 lla s5,.LC6 lla s4,.LC7 .L6: ble s1,zero,.L7 fld fs1,0(s7) fmul.d fs1,fs7,fs1 mv s0,s6 fld fs0,0(s5) fadd.d fs0,fs6,fs0 .L5: fmv.d fa1,fs1 fmv.d fa0,fs0 call fmod@plt addiw s0,s0,1 bne s1,s0,.L5 fsub.d fa4,fs2,fs3 fadd.d fa4,fa4,fs4 fsub.d fa4,fa4,fs5 fld fa5,0(s4) fdiv.d fa0,fa5,fa0 fadd.d fs0,fa0,fa4 .L4: addiw s2,s2,1 bne s3,s2,.L6 .L2: fmv.x.d a2,fs0 lla a1,.LC8 li a0,1 call __printf_chk@plt ld ra,152(sp) ld s0,144(sp) ld s1,136(sp) ld s2,128(sp) ld s3,120(sp) ld s4,112(sp) ld s5,104(sp) ld s6,96(sp) ld s7,88(sp) fld fs0,72(sp) fld fs1,64(sp) fld fs2,56(sp) fld fs3,48(sp) fld fs4,40(sp) fld fs5,32(sp) fld fs6,24(sp) fld fs7,16(sp) fld fs8,8(sp) fld fs9,0(sp) addi sp,sp,160 jr ra .L7: fmv.d fs0,fs8 j .L4 .size compute, .-compute .align 1 .globl initPointer .type initPointer, @function initPointer: addi sp,sp,-32 sd ra,24(sp) fsd fs0,8(sp) fmv.d fs0,fa0 li a0,80 call malloc@plt mv a5,a0 addi a4,a0,80 .L13: fsd fs0,0(a5) addi a5,a5,8 bne a5,a4,.L13 ld ra,24(sp) fld fs0,8(sp) addi sp,sp,32 jr ra .size initPointer, .-initPointer .align 1 .globl main .type main, @function main: addi sp,sp,-128 sd ra,120(sp) sd s0,112(sp) sd s1,104(sp) sd s2,96(sp) fsd fs0,88(sp) fsd fs1,80(sp) fsd fs2,72(sp) fsd fs3,64(sp) fsd fs4,56(sp) fsd fs5,48(sp) fsd fs6,40(sp) fsd fs7,32(sp) fsd fs8,24(sp) fsd fs9,16(sp) fsd fs10,8(sp) fsd fs11,0(sp) mv s0,a1 li a1,0 ld a0,8(s0) call strtod@plt fmv.d fs0,fa0 li a2,10 li a1,0 ld a0,16(s0) call strtol@plt mv s1,a0 li a1,0 ld a0,24(s0) call strtod@plt fmv.d fs1,fa0 li a1,0 ld a0,32(s0) call strtod@plt fmv.d fs2,fa0 li a1,0 ld a0,40(s0) call strtod@plt fmv.d fs3,fa0 li a2,10 li a1,0 ld a0,48(s0) call strtol@plt mv s2,a0 li a1,0 ld a0,56(s0) call strtod@plt fmv.d fs4,fa0 li a1,0 ld a0,64(s0) call strtod@plt fmv.d fs5,fa0 li a1,0 ld a0,72(s0) call strtod@plt fmv.d fs6,fa0 li a1,0 ld a0,80(s0) call strtod@plt fmv.d fs7,fa0 li a1,0 ld a0,88(s0) call strtod@plt fmv.d fs8,fa0 li a1,0 ld a0,96(s0) call strtod@plt fmv.d fs9,fa0 li a1,0 ld a0,104(s0) call strtod@plt fmv.d fs10,fa0 li a1,0 ld a0,112(s0) call strtod@plt fmv.d fs11,fa0 li a1,0 ld a0,120(s0) call strtod@plt fmv.x.d a6,fa0 fmv.x.d a5,fs11 fmv.x.d a4,fs10 fmv.x.d a3,fs9 fmv.x.d a2,fs8 fmv.d fa7,fs7 fmv.d fa6,fs6 fmv.d fa5,fs5 fmv.d fa4,fs4 sext.w a1,s2 fmv.d fa3,fs3 fmv.d fa2,fs2 fmv.d fa1,fs1 sext.w a0,s1 fmv.d fa0,fs0 call compute li a0,0 ld ra,120(sp) ld s0,112(sp) ld s1,104(sp) ld s2,96(sp) fld fs0,88(sp) fld fs1,80(sp) fld fs2,72(sp) fld fs3,64(sp) fld fs4,56(sp) fld fs5,48(sp) fld fs6,40(sp) fld fs7,32(sp) fld fs8,24(sp) fld fs9,16(sp) fld fs10,8(sp) fld fs11,0(sp) addi sp,sp,128 jr ra .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 1344411004 .word -8312415 .align 3 .LC1: .word -963977186 .word 7484539 .align 3 .LC2: .word -1977314903 .word 2135471887 .align 3 .LC3: .word 125465370 .word 2138929669 .align 3 .LC4: .word -1290850440 .word 2135549176 .align 3 .LC5: .word 1991164501 .word -8314431 .align 3 .LC6: .word -1184782507 .word 1909837526 .align 3 .LC7: .word 0 .word -2147483648 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "test_21.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC8: .string "%.17g\n" .text .align 1 .globl compute .type compute, @function compute: addi sp,sp,-144 sd s0,128(sp) fld fa4,.LC0,s0 fmadd.d fa2,fa2,fa4,fa3 fld fa3,.LC1,s0 fld fa4,.LC2,s0 fsd fs0,88(sp) fmv.d fs0,fa0 sd s1,120(sp) sd s3,104(sp) fmadd.d fa2,fa2,fa3,fa1 fsd fs1,80(sp) fsd fs2,72(sp) fsd fs3,64(sp) fsd fs4,56(sp) fsd fs5,48(sp) fsd fs6,40(sp) fsub.d fa0,fa4,fa2 fsd fs7,32(sp) fsd fs8,24(sp) fmv.d.x fs7,a5 fmv.d.x fs4,a2 fmv.d.x fs5,a3 fmv.d.x fs6,a4 fmv.d.x fs8,a6 fmv.d fs2,fa5 fmv.d fs1,fa6 fmv.d fs3,fa7 sd ra,136(sp) sd s2,112(sp) sd s4,96(sp) fsd fs9,16(sp) fsd fs10,8(sp) fsd fs11,0(sp) mv s3,a0 mv s1,a1 call atan@plt flt.d a5,fa0,fs0 beq a5,zero,.L2 ble s3,zero,.L2 fld fs9,.LC3,a5 fdiv.d fs9,fs1,fs9 fld fa5,.LC4,a5 li s2,0 ld s4,.LC5 fld fs11,.LC6,a5 fld fs10,.LC7,a5 fadd.d fs9,fs9,fs2 fsub.d fs9,fs9,fa5 .L6: ble s1,zero,.L7 fsub.d fa5,fs3,fs4 fmv.d.x fa4,s4 fadd.d fs0,fs7,fs11 li s0,0 fmul.d fs1,fs8,fa4 fadd.d fs2,fa5,fs5 fsub.d fs2,fs2,fs6 .L5: fmv.d fa1,fs1 fmv.d fa0,fs0 addiw s0,s0,1 call fmod@plt bne s1,s0,.L5 fdiv.d fa0,fs10,fa0 fadd.d fs0,fa0,fs2 .L4: addiw s2,s2,1 bne s3,s2,.L6 .L2: ld s0,128(sp) ld ra,136(sp) ld s1,120(sp) ld s2,112(sp) ld s3,104(sp) ld s4,96(sp) fld fs1,80(sp) fld fs2,72(sp) fld fs3,64(sp) fld fs4,56(sp) fld fs5,48(sp) fld fs6,40(sp) fld fs7,32(sp) fld fs8,24(sp) fld fs9,16(sp) fld fs10,8(sp) fld fs11,0(sp) fmv.x.d a2,fs0 fld fs0,88(sp) lla a1,.LC8 li a0,1 addi sp,sp,144 tail __printf_chk@plt .L7: fmv.d fs0,fs9 j .L4 .size compute, .-compute .align 1 .globl initPointer .type initPointer, @function initPointer: addi sp,sp,-32 li a0,80 fsd fs0,8(sp) sd ra,24(sp) fmv.d fs0,fa0 call malloc@plt mv a5,a0 addi a4,a0,80 .L14: fsd fs0,0(a5) addi a5,a5,8 bne a5,a4,.L14 ld ra,24(sp) fld fs0,8(sp) addi sp,sp,32 jr ra .size initPointer, .-initPointer .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: ld a0,8(a1) addi sp,sp,-128 sd s0,112(sp) mv s0,a1 li a1,0 sd ra,120(sp) sd s1,104(sp) sd s2,96(sp) fsd fs0,88(sp) fsd fs1,80(sp) fsd fs2,72(sp) fsd fs3,64(sp) fsd fs4,56(sp) fsd fs5,48(sp) fsd fs6,40(sp) fsd fs7,32(sp) fsd fs8,24(sp) fsd fs9,16(sp) fsd fs10,8(sp) fsd fs11,0(sp) call strtod@plt ld a0,16(s0) li a2,10 li a1,0 fmv.d fs0,fa0 call strtol@plt mv s2,a0 ld a0,24(s0) li a1,0 call strtod@plt ld a0,32(s0) li a1,0 fmv.d fs1,fa0 call strtod@plt ld a0,40(s0) li a1,0 fmv.d fs2,fa0 call strtod@plt ld a0,48(s0) li a2,10 li a1,0 fmv.d fs3,fa0 call strtol@plt mv s1,a0 ld a0,56(s0) li a1,0 call strtod@plt ld a0,64(s0) li a1,0 fmv.d fs4,fa0 call strtod@plt ld a0,72(s0) li a1,0 fmv.d fs5,fa0 call strtod@plt ld a0,80(s0) li a1,0 fmv.d fs6,fa0 call strtod@plt ld a0,88(s0) li a1,0 fmv.d fs7,fa0 call strtod@plt ld a0,96(s0) li a1,0 fmv.d fs8,fa0 call strtod@plt ld a0,104(s0) li a1,0 fmv.d fs9,fa0 call strtod@plt ld a0,112(s0) li a1,0 fmv.d fs10,fa0 call strtod@plt ld a0,120(s0) fmv.d fs11,fa0 li a1,0 call strtod@plt fmv.x.d a6,fa0 fmv.x.d a5,fs11 fmv.x.d a4,fs10 fmv.x.d a3,fs9 fmv.x.d a2,fs8 fmv.d fa7,fs7 fmv.d fa6,fs6 fmv.d fa5,fs5 fmv.d fa4,fs4 fmv.d fa3,fs3 fmv.d fa2,fs2 fmv.d fa1,fs1 fmv.d fa0,fs0 sext.w a0,s2 sext.w a1,s1 call compute ld ra,120(sp) ld s0,112(sp) ld s1,104(sp) ld s2,96(sp) fld fs0,88(sp) fld fs1,80(sp) fld fs2,72(sp) fld fs3,64(sp) fld fs4,56(sp) fld fs5,48(sp) fld fs6,40(sp) fld fs7,32(sp) fld fs8,24(sp) fld fs9,16(sp) fld fs10,8(sp) fld fs11,0(sp) li a0,0 addi sp,sp,128 jr ra .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 1344411004 .word -8312415 .align 3 .LC1: .word -963977186 .word 7484539 .align 3 .LC2: .word -1977314903 .word 2135471887 .align 3 .LC3: .word 125465370 .word 2138929669 .align 3 .LC4: .word -1290850440 .word 2135549176 .align 3 .LC5: .word 1991164501 .word -8314431 .align 3 .LC6: .word -1184782507 .word 1909837526 .align 3 .LC7: .word 0 .word -2147483648 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "test_21.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC8: .string "%.17g\n" .text .align 1 .globl compute .type compute, @function compute: addi sp,sp,-144 sd s0,128(sp) fld fa4,.LC0,s0 fmadd.d fa2,fa2,fa4,fa3 fld fa3,.LC1,s0 fld fa4,.LC2,s0 fsd fs0,88(sp) fmv.d fs0,fa0 sd s1,120(sp) sd s3,104(sp) fmadd.d fa2,fa2,fa3,fa1 fsd fs1,80(sp) fsd fs2,72(sp) fsd fs3,64(sp) fsd fs4,56(sp) fsd fs5,48(sp) fsd fs6,40(sp) fsub.d fa0,fa4,fa2 fsd fs7,32(sp) fsd fs8,24(sp) fmv.d.x fs7,a5 fmv.d.x fs4,a2 fmv.d.x fs5,a3 fmv.d.x fs6,a4 fmv.d.x fs8,a6 fmv.d fs2,fa5 fmv.d fs1,fa6 fmv.d fs3,fa7 sd ra,136(sp) sd s2,112(sp) sd s4,96(sp) fsd fs9,16(sp) fsd fs10,8(sp) fsd fs11,0(sp) mv s3,a0 mv s1,a1 call atan@plt flt.d a5,fa0,fs0 beq a5,zero,.L2 ble s3,zero,.L2 fld fs9,.LC3,a5 fdiv.d fs9,fs1,fs9 fld fa5,.LC4,a5 li s2,0 ld s4,.LC5 fld fs11,.LC6,a5 fld fs10,.LC7,a5 fadd.d fs9,fs9,fs2 fsub.d fs9,fs9,fa5 .L6: ble s1,zero,.L7 fsub.d fa5,fs3,fs4 fmv.d.x fa4,s4 fadd.d fs0,fs7,fs11 li s0,0 fmul.d fs1,fs8,fa4 fadd.d fs2,fa5,fs5 fsub.d fs2,fs2,fs6 .L5: fmv.d fa1,fs1 fmv.d fa0,fs0 addiw s0,s0,1 call fmod@plt bne s1,s0,.L5 fdiv.d fa0,fs10,fa0 fadd.d fs0,fa0,fs2 .L4: addiw s2,s2,1 bne s3,s2,.L6 .L2: ld s0,128(sp) ld ra,136(sp) ld s1,120(sp) ld s2,112(sp) ld s3,104(sp) ld s4,96(sp) fld fs1,80(sp) fld fs2,72(sp) fld fs3,64(sp) fld fs4,56(sp) fld fs5,48(sp) fld fs6,40(sp) fld fs7,32(sp) fld fs8,24(sp) fld fs9,16(sp) fld fs10,8(sp) fld fs11,0(sp) fmv.x.d a2,fs0 fld fs0,88(sp) lla a1,.LC8 li a0,1 addi sp,sp,144 tail __printf_chk@plt .L7: fmv.d fs0,fs9 j .L4 .size compute, .-compute .align 1 .globl initPointer .type initPointer, @function initPointer: addi sp,sp,-32 li a0,80 fsd fs0,8(sp) sd ra,24(sp) fmv.d fs0,fa0 call malloc@plt ld ra,24(sp) fsd fs0,0(a0) fsd fs0,8(a0) fsd fs0,16(a0) fsd fs0,24(a0) fsd fs0,32(a0) fsd fs0,40(a0) fsd fs0,48(a0) fsd fs0,56(a0) fsd fs0,64(a0) fsd fs0,72(a0) fld fs0,8(sp) addi sp,sp,32 jr ra .size initPointer, .-initPointer .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: ld a0,8(a1) addi sp,sp,-128 sd s0,112(sp) mv s0,a1 li a1,0 sd ra,120(sp) sd s1,104(sp) sd s2,96(sp) fsd fs0,88(sp) fsd fs1,80(sp) fsd fs2,72(sp) fsd fs3,64(sp) fsd fs4,56(sp) fsd fs5,48(sp) fsd fs6,40(sp) fsd fs7,32(sp) fsd fs8,24(sp) fsd fs9,16(sp) fsd fs10,8(sp) fsd fs11,0(sp) call strtod@plt ld a0,16(s0) li a2,10 li a1,0 fmv.d fs0,fa0 call strtol@plt mv s2,a0 ld a0,24(s0) li a1,0 call strtod@plt ld a0,32(s0) li a1,0 fmv.d fs1,fa0 call strtod@plt ld a0,40(s0) li a1,0 fmv.d fs2,fa0 call strtod@plt ld a0,48(s0) li a2,10 li a1,0 fmv.d fs3,fa0 call strtol@plt mv s1,a0 ld a0,56(s0) li a1,0 call strtod@plt ld a0,64(s0) li a1,0 fmv.d fs4,fa0 call strtod@plt ld a0,72(s0) li a1,0 fmv.d fs5,fa0 call strtod@plt ld a0,80(s0) li a1,0 fmv.d fs6,fa0 call strtod@plt ld a0,88(s0) li a1,0 fmv.d fs7,fa0 call strtod@plt ld a0,96(s0) li a1,0 fmv.d fs8,fa0 call strtod@plt ld a0,104(s0) li a1,0 fmv.d fs9,fa0 call strtod@plt ld a0,112(s0) li a1,0 fmv.d fs10,fa0 call strtod@plt ld a0,120(s0) fmv.d fs11,fa0 li a1,0 call strtod@plt fmv.x.d a6,fa0 fmv.x.d a5,fs11 fmv.x.d a4,fs10 fmv.x.d a3,fs9 fmv.x.d a2,fs8 fmv.d fa7,fs7 fmv.d fa6,fs6 fmv.d fa5,fs5 fmv.d fa4,fs4 fmv.d fa3,fs3 fmv.d fa2,fs2 fmv.d fa1,fs1 fmv.d fa0,fs0 sext.w a0,s2 sext.w a1,s1 call compute ld ra,120(sp) ld s0,112(sp) ld s1,104(sp) ld s2,96(sp) fld fs0,88(sp) fld fs1,80(sp) fld fs2,72(sp) fld fs3,64(sp) fld fs4,56(sp) fld fs5,48(sp) fld fs6,40(sp) fld fs7,32(sp) fld fs8,24(sp) fld fs9,16(sp) fld fs10,8(sp) fld fs11,0(sp) li a0,0 addi sp,sp,128 jr ra .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 1344411004 .word -8312415 .align 3 .LC1: .word -963977186 .word 7484539 .align 3 .LC2: .word -1977314903 .word 2135471887 .align 3 .LC3: .word 125465370 .word 2138929669 .align 3 .LC4: .word -1290850440 .word 2135549176 .align 3 .LC5: .word 1991164501 .word -8314431 .align 3 .LC6: .word -1184782507 .word 1909837526 .align 3 .LC7: .word 0 .word -2147483648 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "test_21.c" .text .section .rodata .align 3 .LC0: .string "%.17g\n" .text .align 2 .global compute .type compute, %function compute: .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 d0, [sp, 88] str w0, [sp, 84] str d1, [sp, 72] str d2, [sp, 64] str d3, [sp, 56] str w1, [sp, 80] str d4, [sp, 48] str d5, [sp, 40] str d6, [sp, 32] str d7, [sp, 24] ldr d0, [sp, 64] adrp x0, .LC1 ldr d1, [x0, #:lo12:.LC1] fmul d1, d0, d1 ldr d0, [sp, 56] fadd d0, d1, d0 adrp x0, .LC2 ldr d1, [x0, #:lo12:.LC2] fmul d1, d0, d1 ldr d0, [sp, 72] fadd d0, d1, d0 adrp x0, .LC3 ldr d1, [x0, #:lo12:.LC3] fsub d0, d1, d0 bl atan fmov d1, d0 ldr d0, [sp, 88] fcmpe d0, d1 bgt .L8 b .L2 .L8: str wzr, [sp, 96] b .L4 .L7: ldr d0, [sp, 48] movi d1, #0 fdiv d0, d1, d0 adrp x0, .LC4 ldr d1, [x0, #:lo12:.LC4] fsub d0, d1, d0 ldr d1, [sp, 88] fadd d0, d1, d0 str d0, [sp, 88] adrp x0, .LC5 ldr d0, [x0, #:lo12:.LC5] str d0, [sp, 104] adrp x0, .LC6 ldr d1, [x0, #:lo12:.LC6] ldr d0, [sp, 32] fdiv d1, d0, d1 ldr d0, [sp, 40] fadd d0, d1, d0 ldr d1, [sp, 104] fadd d0, d1, d0 str d0, [sp, 88] str wzr, [sp, 100] b .L5 .L6: ldr d1, [sp, 24] ldr d0, [sp, 112] fsub d1, d1, d0 ldr d0, [sp, 120] fadd d1, d1, d0 ldr d0, [sp, 128] fsub d0, d1, d0 str d0, [sp, 88] ldr d0, [sp, 136] adrp x0, .LC7 ldr d1, [x0, #:lo12:.LC7] fadd d2, d0, d1 ldr d0, [sp, 144] adrp x0, .LC8 ldr d1, [x0, #:lo12:.LC8] fmul d0, d0, d1 fmov d1, d0 fmov d0, d2 bl fmod mov x0, -9223372036854775808 fmov d1, x0 fdiv d0, d1, d0 ldr d1, [sp, 88] fadd d0, d1, d0 str d0, [sp, 88] ldr w0, [sp, 100] add w0, w0, 1 str w0, [sp, 100] .L5: ldr w1, [sp, 100] ldr w0, [sp, 80] cmp w1, w0 blt .L6 ldr w0, [sp, 96] add w0, w0, 1 str w0, [sp, 96] .L4: ldr w1, [sp, 96] ldr w0, [sp, 84] cmp w1, w0 blt .L7 .L2: ldr d0, [sp, 88] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf nop ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size compute, .-compute .align 2 .global initPointer .type initPointer, %function initPointer: .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 d0, [sp, 24] mov x0, 80 bl malloc str x0, [sp, 40] str wzr, [sp, 36] b .L10 .L11: ldrsw x0, [sp, 36] lsl x0, x0, 3 ldr x1, [sp, 40] add x0, x1, x0 ldr d0, [sp, 24] str d0, [x0] ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L10: ldr w0, [sp, 36] cmp w0, 9 ble .L11 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 initPointer, .-initPointer .align 2 .global main .type main, %function main: .LFB8: .cfi_startproc sub sp, sp, #192 .cfi_def_cfa_offset 192 stp x29, x30, [sp, 48] .cfi_offset 29, -144 .cfi_offset 30, -136 add x29, sp, 48 str w0, [sp, 76] str x1, [sp, 64] ldr x0, [sp, 64] add x0, x0, 8 ldr x0, [x0] bl atof str d0, [sp, 88] ldr x0, [sp, 64] add x0, x0, 16 ldr x0, [x0] bl atoi str w0, [sp, 80] ldr x0, [sp, 64] add x0, x0, 24 ldr x0, [x0] bl atof str d0, [sp, 96] ldr x0, [sp, 64] add x0, x0, 32 ldr x0, [x0] bl atof str d0, [sp, 104] ldr x0, [sp, 64] add x0, x0, 40 ldr x0, [x0] bl atof str d0, [sp, 112] ldr x0, [sp, 64] add x0, x0, 48 ldr x0, [x0] bl atoi str w0, [sp, 84] ldr x0, [sp, 64] add x0, x0, 56 ldr x0, [x0] bl atof str d0, [sp, 120] ldr x0, [sp, 64] add x0, x0, 64 ldr x0, [x0] bl atof str d0, [sp, 128] ldr x0, [sp, 64] add x0, x0, 72 ldr x0, [x0] bl atof str d0, [sp, 136] ldr x0, [sp, 64] add x0, x0, 80 ldr x0, [x0] bl atof str d0, [sp, 144] ldr x0, [sp, 64] add x0, x0, 88 ldr x0, [x0] bl atof str d0, [sp, 152] ldr x0, [sp, 64] add x0, x0, 96 ldr x0, [x0] bl atof str d0, [sp, 160] ldr x0, [sp, 64] add x0, x0, 104 ldr x0, [x0] bl atof str d0, [sp, 168] ldr x0, [sp, 64] add x0, x0, 112 ldr x0, [x0] bl atof str d0, [sp, 176] ldr x0, [sp, 64] add x0, x0, 120 ldr x0, [x0] bl atof str d0, [sp, 184] ldr d0, [sp, 184] str d0, [sp, 32] ldr d0, [sp, 176] str d0, [sp, 24] ldr d0, [sp, 168] str d0, [sp, 16] ldr d0, [sp, 160] str d0, [sp, 8] ldr d0, [sp, 152] str d0, [sp] ldr d7, [sp, 144] ldr d6, [sp, 136] ldr d5, [sp, 128] ldr d4, [sp, 120] ldr w1, [sp, 84] ldr d3, [sp, 112] ldr d2, [sp, 104] ldr d1, [sp, 96] ldr w0, [sp, 80] ldr d0, [sp, 88] bl compute mov w0, 0 ldp x29, x30, [sp, 48] add sp, sp, 192 .cfi_restore 29 .cfi_restore 30 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size main, .-main .section .rodata .align 3 .LC1: .word 1344411004 .word -8312415 .align 3 .LC2: .word -963977186 .word 7484539 .align 3 .LC3: .word -1977314903 .word 2135471887 .align 3 .LC4: .word -1824484740 .word -13582009 .align 3 .LC5: .word -1290850440 .word -11934472 .align 3 .LC6: .word 125465370 .word 2138929669 .align 3 .LC7: .word -1184782507 .word 1909837526 .align 3 .LC8: .word 1991164501 .word -8314431 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "test_21.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%.17g\n" .text .align 2 .global compute .type compute, %function compute: .LFB39: .cfi_startproc stp x29, x30, [sp, -128]! .cfi_def_cfa_offset 128 .cfi_offset 29, -128 .cfi_offset 30, -120 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp d8, d9, [sp, 48] stp d10, d11, [sp, 64] stp d12, d13, [sp, 80] .cfi_offset 19, -112 .cfi_offset 20, -104 .cfi_offset 21, -96 .cfi_offset 22, -88 .cfi_offset 72, -80 .cfi_offset 73, -72 .cfi_offset 74, -64 .cfi_offset 75, -56 .cfi_offset 76, -48 .cfi_offset 77, -40 fmov d8, d0 mov w22, w0 mov w20, w1 fmov d13, d5 fmov d9, d6 fmov d10, d7 ldr d11, [sp, 152] ldr d12, [sp, 160] adrp x0, .LC1 ldr d0, [x0, #:lo12:.LC1] fmul d2, d2, d0 fadd d2, d2, d3 adrp x0, .LC2 ldr d0, [x0, #:lo12:.LC2] fmul d2, d2, d0 fadd d2, d2, d1 adrp x0, .LC3 ldr d0, [x0, #:lo12:.LC3] fsub d0, d0, d2 bl atan fcmpe d0, d8 bmi .L8 .L2: fmov d0, d8 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk ldp d8, d9, [sp, 48] ldp d10, d11, [sp, 64] ldp d12, d13, [sp, 80] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 128 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_restore 76 .cfi_restore 77 .cfi_restore 74 .cfi_restore 75 .cfi_restore 72 .cfi_restore 73 .cfi_def_cfa_offset 0 ret .L8: .cfi_restore_state cmp w22, 0 ble .L2 stp d14, d15, [sp, 96] .cfi_offset 79, -24 .cfi_offset 78, -32 adrp x0, .LC4 ldr d0, [x0, #:lo12:.LC4] fdiv d0, d9, d0 fadd d0, d0, d13 adrp x0, .LC5 ldr d1, [x0, #:lo12:.LC5] fsub d0, d0, d1 str d0, [sp, 120] mov w21, 0 adrp x0, .LC6 ldr d15, [x0, #:lo12:.LC6] adrp x0, .LC7 ldr d14, [x0, #:lo12:.LC7] adrp x0, .LC8 ldr d13, [x0, #:lo12:.LC8] .L6: cmp w20, 0 ble .L7 fmul d9, d12, d15 mov w19, 0 fadd d8, d11, d14 .L5: fmov d1, d9 fmov d0, d8 bl fmod add w19, w19, 1 cmp w20, w19 bne .L5 ldr d1, [sp, 128] fsub d1, d10, d1 ldr d2, [sp, 136] fadd d1, d1, d2 ldr d2, [sp, 144] fsub d1, d1, d2 fdiv d0, d13, d0 fadd d8, d0, d1 .L4: add w21, w21, 1 cmp w22, w21 bne .L6 ldp d14, d15, [sp, 96] .cfi_remember_state .cfi_restore 79 .cfi_restore 78 b .L2 .L7: .cfi_restore_state ldr d8, [sp, 120] b .L4 .cfi_endproc .LFE39: .size compute, .-compute .align 2 .global initPointer .type initPointer, %function initPointer: .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 d8, [sp, 16] .cfi_offset 72, -16 fmov d8, d0 mov x0, 80 bl malloc mov x1, x0 add x2, x0, 80 .L13: str d8, [x1], 8 cmp x1, x2 bne .L13 ldr d8, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 72 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE40: .size initPointer, .-initPointer .align 2 .global main .type main, %function main: .LFB41: .cfi_startproc sub sp, sp, #192 .cfi_def_cfa_offset 192 stp x29, x30, [sp, 48] .cfi_offset 29, -144 .cfi_offset 30, -136 add x29, sp, 48 stp x19, x20, [sp, 64] str x21, [sp, 80] stp d8, d9, [sp, 96] stp d10, d11, [sp, 112] stp d12, d13, [sp, 128] stp d14, d15, [sp, 144] .cfi_offset 19, -128 .cfi_offset 20, -120 .cfi_offset 21, -112 .cfi_offset 72, -96 .cfi_offset 73, -88 .cfi_offset 74, -80 .cfi_offset 75, -72 .cfi_offset 76, -64 .cfi_offset 77, -56 .cfi_offset 78, -48 .cfi_offset 79, -40 mov x19, x1 mov x1, 0 ldr x0, [x19, 8] bl strtod fmov d8, d0 mov w2, 10 mov x1, 0 ldr x0, [x19, 16] bl strtol mov x20, x0 mov x1, 0 ldr x0, [x19, 24] bl strtod str d0, [sp, 184] mov x1, 0 ldr x0, [x19, 32] bl strtod str d0, [sp, 176] mov x1, 0 ldr x0, [x19, 40] bl strtod str d0, [sp, 168] mov w2, 10 mov x1, 0 ldr x0, [x19, 48] bl strtol mov x21, x0 mov x1, 0 ldr x0, [x19, 56] bl strtod str d0, [sp, 160] mov x1, 0 ldr x0, [x19, 64] bl strtod fmov d9, d0 mov x1, 0 ldr x0, [x19, 72] bl strtod fmov d10, d0 mov x1, 0 ldr x0, [x19, 80] bl strtod fmov d11, d0 mov x1, 0 ldr x0, [x19, 88] bl strtod fmov d12, d0 mov x1, 0 ldr x0, [x19, 96] bl strtod fmov d13, d0 mov x1, 0 ldr x0, [x19, 104] bl strtod fmov d14, d0 mov x1, 0 ldr x0, [x19, 112] bl strtod fmov d15, d0 mov x1, 0 ldr x0, [x19, 120] bl strtod str d0, [sp, 32] str d15, [sp, 24] str d14, [sp, 16] str d13, [sp, 8] str d12, [sp] fmov d7, d11 fmov d6, d10 fmov d5, d9 ldr d4, [sp, 160] mov w1, w21 ldr d3, [sp, 168] ldr d2, [sp, 176] ldr d1, [sp, 184] mov w0, w20 fmov d0, d8 bl compute mov w0, 0 ldp d8, d9, [sp, 96] ldp d10, d11, [sp, 112] ldp d12, d13, [sp, 128] ldp d14, d15, [sp, 144] ldp x19, x20, [sp, 64] ldr x21, [sp, 80] ldp x29, x30, [sp, 48] add sp, sp, 192 .cfi_restore 29 .cfi_restore 30 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_restore 78 .cfi_restore 79 .cfi_restore 76 .cfi_restore 77 .cfi_restore 74 .cfi_restore 75 .cfi_restore 72 .cfi_restore 73 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC1: .word 1344411004 .word -8312415 .align 3 .LC2: .word -963977186 .word 7484539 .align 3 .LC3: .word -1977314903 .word 2135471887 .align 3 .LC4: .word 125465370 .word 2138929669 .align 3 .LC5: .word -1290850440 .word 2135549176 .align 3 .LC6: .word 1991164501 .word -8314431 .align 3 .LC7: .word -1184782507 .word 1909837526 .align 3 .LC8: .word 0 .word -2147483648 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "test_21.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%.17g\n" .text .align 2 .p2align 4,,11 .global compute .type compute, %function compute: .LFB39: .cfi_startproc stp x29, x30, [sp, -144]! .cfi_def_cfa_offset 144 .cfi_offset 29, -144 .cfi_offset 30, -136 adrp x2, .LC1 mov x29, sp ldr d4, [x2, #:lo12:.LC1] adrp x2, .LC2 stp d14, d15, [sp, 96] .cfi_offset 78, -48 .cfi_offset 79, -40 ldr d14, [x2, #:lo12:.LC2] fmadd d3, d2, d4, d3 stp d8, d9, [sp, 48] .cfi_offset 72, -96 .cfi_offset 73, -88 fmov d9, d0 adrp x2, .LC3 fmov d8, d5 stp d10, d11, [sp, 64] .cfi_offset 74, -80 .cfi_offset 75, -72 fmov d10, d6 ldr d16, [x2, #:lo12:.LC3] stp d12, d13, [sp, 80] ldr d15, [sp, 176] .cfi_offset 76, -64 .cfi_offset 77, -56 ldp d11, d12, [sp, 144] fmadd d0, d3, d14, d1 ldp d13, d14, [sp, 160] stp x19, x20, [sp, 16] .cfi_offset 19, -128 .cfi_offset 20, -120 mov w20, w1 stp x21, x22, [sp, 32] .cfi_offset 21, -112 .cfi_offset 22, -104 mov w22, w0 str d7, [sp, 120] fsub d0, d16, d0 bl atan fcmpe d0, d9 bmi .L8 .L2: fmov d0, d9 adrp x1, .LC0 ldp x19, x20, [sp, 16] add x1, x1, :lo12:.LC0 ldp x21, x22, [sp, 32] mov w0, 1 ldp d8, d9, [sp, 48] ldp d10, d11, [sp, 64] ldp d12, d13, [sp, 80] ldp d14, d15, [sp, 96] ldp x29, x30, [sp], 144 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_restore 78 .cfi_restore 79 .cfi_restore 76 .cfi_restore 77 .cfi_restore 74 .cfi_restore 75 .cfi_restore 72 .cfi_restore 73 .cfi_def_cfa_offset 0 b __printf_chk .p2align 2,,3 .L8: .cfi_restore_state cmp w22, 0 ble .L2 adrp x0, .LC4 mov w21, 0 ldr d0, [x0, #:lo12:.LC4] adrp x0, .LC5 ldr d1, [x0, #:lo12:.LC5] mov x0, -9223372036854775808 fdiv d0, d10, d0 str x0, [sp, 128] fadd d0, d0, d8 fsub d0, d0, d1 str d0, [sp, 136] cmp w20, 0 ble .L7 .p2align 3,,7 .L14: ldr d0, [sp, 120] adrp x0, .LC6 mov w19, 0 fsub d9, d0, d11 ldr d0, [x0, #:lo12:.LC6] adrp x0, .LC7 fmul d10, d15, d0 ldr d0, [x0, #:lo12:.LC7] fadd d9, d9, d12 fadd d8, d14, d0 fsub d9, d9, d13 .p2align 3,,7 .L5: fmov d1, d10 fmov d0, d8 add w19, w19, 1 bl fmod cmp w20, w19 bne .L5 ldr d1, [sp, 128] fdiv d0, d1, d0 fadd d9, d0, d9 .L4: add w21, w21, 1 cmp w22, w21 beq .L2 cmp w20, 0 bgt .L14 .L7: ldr d9, [sp, 136] b .L4 .cfi_endproc .LFE39: .size compute, .-compute .align 2 .p2align 4,,11 .global initPointer .type initPointer, %function initPointer: .LFB40: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x0, 80 mov x29, sp str d8, [sp, 16] .cfi_offset 72, -16 fmov d8, d0 bl malloc mov x1, x0 add x2, x0, 80 .p2align 3,,7 .L16: str d8, [x1], 8 cmp x1, x2 bne .L16 ldr d8, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 72 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE40: .size initPointer, .-initPointer .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB41: .cfi_startproc sub sp, sp, #192 .cfi_def_cfa_offset 192 stp x29, x30, [sp, 48] .cfi_offset 29, -144 .cfi_offset 30, -136 add x29, sp, 48 stp x19, x20, [sp, 64] .cfi_offset 19, -128 .cfi_offset 20, -120 mov x19, x1 mov x1, 0 stp d8, d9, [sp, 96] ldr x0, [x19, 8] str x21, [sp, 80] stp d10, d11, [sp, 112] stp d12, d13, [sp, 128] stp d14, d15, [sp, 144] .cfi_offset 72, -96 .cfi_offset 73, -88 .cfi_offset 21, -112 .cfi_offset 74, -80 .cfi_offset 75, -72 .cfi_offset 76, -64 .cfi_offset 77, -56 .cfi_offset 78, -48 .cfi_offset 79, -40 bl strtod fmov d12, d0 ldr x0, [x19, 16] mov w2, 10 mov x1, 0 bl strtol mov x20, x0 ldr x0, [x19, 24] mov x1, 0 bl strtod fmov d13, d0 ldr x0, [x19, 32] mov x1, 0 bl strtod fmov d14, d0 ldr x0, [x19, 40] mov x1, 0 bl strtod fmov d15, d0 ldr x0, [x19, 48] mov w2, 10 mov x1, 0 bl strtol mov x21, x0 ldr x0, [x19, 56] mov x1, 0 bl strtod str d0, [sp, 184] ldr x0, [x19, 64] mov x1, 0 bl strtod str d0, [sp, 176] ldr x0, [x19, 72] mov x1, 0 bl strtod str d0, [sp, 168] ldr x0, [x19, 80] mov x1, 0 bl strtod str d0, [sp, 160] ldr x0, [x19, 88] mov x1, 0 bl strtod fmov d11, d0 ldr x0, [x19, 96] mov x1, 0 bl strtod fmov d10, d0 ldr x0, [x19, 104] mov x1, 0 bl strtod fmov d9, d0 ldr x0, [x19, 112] mov x1, 0 bl strtod fmov d8, d0 ldr x0, [x19, 120] mov x1, 0 bl strtod fmov d16, d0 fmov d3, d15 fmov d2, d14 fmov d1, d13 fmov d0, d12 ldp d7, d6, [sp, 160] mov w1, w21 ldp d5, d4, [sp, 176] mov w0, w20 stp d11, d10, [sp] stp d9, d8, [sp, 16] str d16, [sp, 32] bl compute mov w0, 0 ldp x29, x30, [sp, 48] ldp x19, x20, [sp, 64] ldr x21, [sp, 80] ldp d8, d9, [sp, 96] ldp d10, d11, [sp, 112] ldp d12, d13, [sp, 128] ldp d14, d15, [sp, 144] add sp, sp, 192 .cfi_restore 29 .cfi_restore 30 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_restore 78 .cfi_restore 79 .cfi_restore 76 .cfi_restore 77 .cfi_restore 74 .cfi_restore 75 .cfi_restore 72 .cfi_restore 73 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC1: .word 1344411004 .word -8312415 .align 3 .LC2: .word -963977186 .word 7484539 .align 3 .LC3: .word -1977314903 .word 2135471887 .align 3 .LC4: .word 125465370 .word 2138929669 .align 3 .LC5: .word -1290850440 .word 2135549176 .align 3 .LC6: .word 1991164501 .word -8314431 .align 3 .LC7: .word -1184782507 .word 1909837526 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "test_21.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%.17g\n" .text .align 2 .p2align 4,,11 .global compute .type compute, %function compute: .LFB39: .cfi_startproc stp x29, x30, [sp, -144]! .cfi_def_cfa_offset 144 .cfi_offset 29, -144 .cfi_offset 30, -136 adrp x2, .LC1 mov x29, sp ldr d4, [x2, #:lo12:.LC1] adrp x2, .LC2 stp d14, d15, [sp, 96] .cfi_offset 78, -48 .cfi_offset 79, -40 ldr d14, [x2, #:lo12:.LC2] fmadd d3, d2, d4, d3 stp d8, d9, [sp, 48] .cfi_offset 72, -96 .cfi_offset 73, -88 fmov d9, d0 adrp x2, .LC3 fmov d8, d5 stp d10, d11, [sp, 64] .cfi_offset 74, -80 .cfi_offset 75, -72 fmov d10, d6 ldr d16, [x2, #:lo12:.LC3] stp d12, d13, [sp, 80] ldr d15, [sp, 176] .cfi_offset 76, -64 .cfi_offset 77, -56 ldp d11, d12, [sp, 144] fmadd d0, d3, d14, d1 ldp d13, d14, [sp, 160] stp x19, x20, [sp, 16] .cfi_offset 19, -128 .cfi_offset 20, -120 mov w20, w1 stp x21, x22, [sp, 32] .cfi_offset 21, -112 .cfi_offset 22, -104 mov w22, w0 str d7, [sp, 120] fsub d0, d16, d0 bl atan fcmpe d0, d9 bmi .L8 .L2: fmov d0, d9 adrp x1, .LC0 ldp x19, x20, [sp, 16] add x1, x1, :lo12:.LC0 ldp x21, x22, [sp, 32] mov w0, 1 ldp d8, d9, [sp, 48] ldp d10, d11, [sp, 64] ldp d12, d13, [sp, 80] ldp d14, d15, [sp, 96] ldp x29, x30, [sp], 144 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_restore 78 .cfi_restore 79 .cfi_restore 76 .cfi_restore 77 .cfi_restore 74 .cfi_restore 75 .cfi_restore 72 .cfi_restore 73 .cfi_def_cfa_offset 0 b __printf_chk .p2align 2,,3 .L8: .cfi_restore_state cmp w22, 0 ble .L2 adrp x0, .LC4 mov w21, 0 ldr d0, [x0, #:lo12:.LC4] adrp x0, .LC5 ldr d1, [x0, #:lo12:.LC5] mov x0, -9223372036854775808 fdiv d0, d10, d0 str x0, [sp, 128] fadd d0, d0, d8 fsub d0, d0, d1 str d0, [sp, 136] cmp w20, 0 ble .L7 .p2align 3,,7 .L14: ldr d0, [sp, 120] adrp x0, .LC6 mov w19, 0 fsub d9, d0, d11 ldr d0, [x0, #:lo12:.LC6] adrp x0, .LC7 fmul d10, d15, d0 ldr d0, [x0, #:lo12:.LC7] fadd d9, d9, d12 fadd d8, d14, d0 fsub d9, d9, d13 .p2align 3,,7 .L5: fmov d1, d10 fmov d0, d8 add w19, w19, 1 bl fmod cmp w20, w19 bne .L5 ldr d1, [sp, 128] fdiv d0, d1, d0 fadd d9, d0, d9 .L4: add w21, w21, 1 cmp w22, w21 beq .L2 cmp w20, 0 bgt .L14 .L7: ldr d9, [sp, 136] b .L4 .cfi_endproc .LFE39: .size compute, .-compute .align 2 .p2align 4,,11 .global initPointer .type initPointer, %function initPointer: .LFB40: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x0, 80 mov x29, sp str d8, [sp, 16] .cfi_offset 72, -16 fmov d8, d0 bl malloc dup v0.2d, v8.d[0] ldr d8, [sp, 16] stp q0, q0, [x0] stp q0, q0, [x0, 32] str q0, [x0, 64] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 72 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE40: .size initPointer, .-initPointer .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB41: .cfi_startproc sub sp, sp, #192 .cfi_def_cfa_offset 192 stp x29, x30, [sp, 48] .cfi_offset 29, -144 .cfi_offset 30, -136 add x29, sp, 48 stp x19, x20, [sp, 64] .cfi_offset 19, -128 .cfi_offset 20, -120 mov x19, x1 mov x1, 0 stp d8, d9, [sp, 96] ldr x0, [x19, 8] str x21, [sp, 80] stp d10, d11, [sp, 112] stp d12, d13, [sp, 128] stp d14, d15, [sp, 144] .cfi_offset 72, -96 .cfi_offset 73, -88 .cfi_offset 21, -112 .cfi_offset 74, -80 .cfi_offset 75, -72 .cfi_offset 76, -64 .cfi_offset 77, -56 .cfi_offset 78, -48 .cfi_offset 79, -40 bl strtod fmov d12, d0 ldr x0, [x19, 16] mov w2, 10 mov x1, 0 bl strtol mov x20, x0 ldr x0, [x19, 24] mov x1, 0 bl strtod fmov d13, d0 ldr x0, [x19, 32] mov x1, 0 bl strtod fmov d14, d0 ldr x0, [x19, 40] mov x1, 0 bl strtod fmov d15, d0 ldr x0, [x19, 48] mov w2, 10 mov x1, 0 bl strtol mov x21, x0 ldr x0, [x19, 56] mov x1, 0 bl strtod str d0, [sp, 184] ldr x0, [x19, 64] mov x1, 0 bl strtod str d0, [sp, 176] ldr x0, [x19, 72] mov x1, 0 bl strtod str d0, [sp, 168] ldr x0, [x19, 80] mov x1, 0 bl strtod str d0, [sp, 160] ldr x0, [x19, 88] mov x1, 0 bl strtod fmov d11, d0 ldr x0, [x19, 96] mov x1, 0 bl strtod fmov d10, d0 ldr x0, [x19, 104] mov x1, 0 bl strtod fmov d9, d0 ldr x0, [x19, 112] mov x1, 0 bl strtod fmov d8, d0 ldr x0, [x19, 120] mov x1, 0 bl strtod fmov d16, d0 fmov d3, d15 fmov d2, d14 fmov d1, d13 fmov d0, d12 ldp d7, d6, [sp, 160] mov w1, w21 ldp d5, d4, [sp, 176] mov w0, w20 stp d11, d10, [sp] stp d9, d8, [sp, 16] str d16, [sp, 32] bl compute mov w0, 0 ldp x29, x30, [sp, 48] ldp x19, x20, [sp, 64] ldr x21, [sp, 80] ldp d8, d9, [sp, 96] ldp d10, d11, [sp, 112] ldp d12, d13, [sp, 128] ldp d14, d15, [sp, 144] add sp, sp, 192 .cfi_restore 29 .cfi_restore 30 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_restore 78 .cfi_restore 79 .cfi_restore 76 .cfi_restore 77 .cfi_restore 74 .cfi_restore 75 .cfi_restore 72 .cfi_restore 73 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE41: .size main, .-main .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC1: .word 1344411004 .word -8312415 .align 3 .LC2: .word -963977186 .word 7484539 .align 3 .LC3: .word -1977314903 .word 2135471887 .align 3 .LC4: .word 125465370 .word 2138929669 .align 3 .LC5: .word -1290850440 .word 2135549176 .align 3 .LC6: .word 1991164501 .word -8314431 .align 3 .LC7: .word -1184782507 .word 1909837526 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
test4.c
#include <stdio.h> #include <stdbool.h> int main() { int i, j, n = 5, d[n][n], x; bool found; for (size_t i = 0; i < n; i++) { for (size_t j = 0; j < n; j++) { printf("Digite um valor para D(%d,%d): ", i, j); scanf("%d", &d[i][j]); } } printf("Digite um valor para procurar: "); scanf("%d", &x); for (size_t i = 0; i < n; i++) { for (size_t j = 0; j < n; j++) { if(d[i][j] == x) { found = true; break; } } } if(found) { printf("Valor %d existe.", x); } else { printf("Valor %d não existe.", x); } return 0; }
.file "test4.c" .option pic .text .section .rodata .align 3 .LC0: .string "Digite um valor para D(%d,%d): " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Digite um valor para procurar: " .align 3 .LC3: .string "Valor %d existe." .align 3 .LC4: .string "Valor %d n\303\243o existe." .text .align 1 .globl main .type main, @function main: addi sp,sp,-160 sd ra,152(sp) sd s0,144(sp) sd s1,136(sp) sd s2,128(sp) sd s3,120(sp) sd s4,112(sp) sd s5,104(sp) sd s6,96(sp) sd s7,88(sp) sd s8,80(sp) addi s0,sp,160 la t0,__stack_chk_guard ld s1, 0(t0) sd s1, -88(s0) li s1, 0 mv t0,sp mv s8,t0 li t0,5 sw t0,-148(s0) lw t0,-148(s0) lw ra,-148(s0) mv s1,t0 addi s1,s1,-1 sd s1,-112(s0) mv s1,t0 mv s6,s1 li s7,0 srli s1,s6,59 slli s5,s7,5 or s5,s1,s5 slli s4,s6,5 mv s1,t0 slli s1,s1,2 mv s4,ra addi s4,s4,-1 sd s4,-104(s0) mv s4,t0 mv t3,s4 li t4,0 mv s4,ra mv t1,s4 li t2,0 mul s5,t4,t1 mul s4,t2,t3 add s4,s5,s4 mul s5,t3,t1 mulhu t1,t3,t1 mv a2,s5 mv a3,t1 add t1,s4,a3 mv a3,t1 srli t1,a2,59 slli s3,a3,5 or s3,t1,s3 slli s2,a2,5 mv a3,t0 mv a6,a3 li a7,0 mv a3,ra mv a0,a3 li a1,0 mul a2,a7,a0 mul a3,a1,a6 add a3,a2,a3 mul t1,a6,a0 mulhu a2,a6,a0 mv a4,t1 mv a5,a2 add a3,a3,a5 mv a5,a3 srli a3,a4,59 slli t6,a5,5 or t6,a3,t6 slli t5,a4,5 mv a4,t0 mv a5,ra mul a5,a4,a5 slli a5,a5,2 addi a5,a5,15 srli a5,a5,4 slli a5,a5,4 sub sp,sp,a5 mv a5,sp addi a5,a5,3 srli a5,a5,2 slli a5,a5,2 sd a5,-96(s0) sd zero,-144(s0) j .L2 .L5: sd zero,-136(s0) j .L3 .L4: ld a2,-136(s0) ld a1,-144(s0) lla a0,.LC0 call printf@plt srli a4,s1,2 ld a5,-144(s0) mul a4,a4,a5 ld a5,-136(s0) add a5,a4,a5 slli a5,a5,2 ld a4,-96(s0) add a5,a4,a5 mv a1,a5 lla a0,.LC1 call __isoc99_scanf@plt ld a5,-136(s0) addi a5,a5,1 sd a5,-136(s0) .L3: lw a5,-148(s0) ld a4,-136(s0) bltu a4,a5,.L4 ld a5,-144(s0) addi a5,a5,1 sd a5,-144(s0) .L2: lw a5,-148(s0) ld a4,-144(s0) bltu a4,a5,.L5 lla a0,.LC2 call printf@plt addi a5,s0,-152 mv a1,a5 lla a0,.LC1 call __isoc99_scanf@plt sd zero,-128(s0) j .L6 .L11: sd zero,-120(s0) j .L7 .L10: srli a3,s1,2 ld a4,-96(s0) ld a5,-128(s0) mul a3,a3,a5 ld a5,-120(s0) add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 lw a4,0(a5) lw a5,-152(s0) bne a4,a5,.L8 li a5,1 sb a5,-153(s0) j .L9 .L8: ld a5,-120(s0) addi a5,a5,1 sd a5,-120(s0) .L7: lw a5,-148(s0) ld a4,-120(s0) bltu a4,a5,.L10 .L9: ld a5,-128(s0) addi a5,a5,1 sd a5,-128(s0) .L6: lw a5,-148(s0) ld a4,-128(s0) bltu a4,a5,.L11 lbu a5,-153(s0) andi a5,a5,0xff beq a5,zero,.L12 lw a5,-152(s0) mv a1,a5 lla a0,.LC3 call printf@plt j .L13 .L12: lw a5,-152(s0) mv a1,a5 lla a0,.LC4 call printf@plt .L13: li a5,0 mv sp,s8 mv a4,a5 la a5,__stack_chk_guard ld a3, -88(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L15 call __stack_chk_fail@plt .L15: mv a0,a4 addi sp,s0,-160 ld ra,152(sp) ld s0,144(sp) ld s1,136(sp) ld s2,128(sp) ld s3,120(sp) ld s4,112(sp) ld s5,104(sp) ld s6,96(sp) ld s7,88(sp) ld s8,80(sp) addi sp,sp,160 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "test4.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Digite um valor para D(%d,%d): " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Digite um valor para procurar: " .align 3 .LC3: .string "Valor %d existe." .text .align 1 .globl main .type main, @function main: addi sp,sp,-208 sd ra,200(sp) sd s0,192(sp) sd s1,184(sp) sd s2,176(sp) sd s3,168(sp) sd s4,160(sp) sd s5,152(sp) sd s6,144(sp) sd s7,136(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 120(sp) li a4, 0 addi s6,sp,16 mv s7,s6 li s2,0 lla s5,.LC0 lla s4,.LC1 li s3,5 .L2: mv s1,s7 li s0,0 .L3: mv a3,s0 mv a2,s2 mv a1,s5 li a0,1 call __printf_chk@plt mv a1,s1 mv a0,s4 call __isoc99_scanf@plt addi s0,s0,1 addi s1,s1,4 bne s0,s3,.L3 addi s2,s2,1 addi s7,s7,20 bne s2,s3,.L2 lla a1,.LC2 li a0,1 call __printf_chk@plt addi a1,sp,12 lla a0,.LC1 call __isoc99_scanf@plt lw a2,12(sp) addi a0,s6,100 li a1,5 j .L5 .L6: addi s6,s6,20 beq s6,a0,.L8 .L5: mv a5,s6 li a4,0 .L7: lw a3,0(a5) beq a3,a2,.L6 addi a4,a4,1 addi a5,a5,4 bne a4,a1,.L7 j .L6 .L8: lla a1,.LC3 li a0,1 call __printf_chk@plt la a5,__stack_chk_guard ld a4, 120(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L13 li a0,0 ld ra,200(sp) ld s0,192(sp) ld s1,184(sp) ld s2,176(sp) ld s3,168(sp) ld s4,160(sp) ld s5,152(sp) ld s6,144(sp) ld s7,136(sp) addi sp,sp,208 jr ra .L13: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "test4.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Digite um valor para D(%d,%d): " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Digite um valor para procurar: " .align 3 .LC3: .string "Valor %d existe." .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-208 sd s7,136(sp) la s7,__stack_chk_guard sd s2,176(sp) sd s3,168(sp) sd s4,160(sp) sd s5,152(sp) sd s6,144(sp) sd ra,200(sp) sd s0,192(sp) sd s1,184(sp) ld a5, 0(s7) sd a5, 120(sp) li a5, 0 addi s6,sp,16 li s2,0 lla s5,.LC0 lla s4,.LC1 li s3,5 .L2: mv s1,s6 li s0,0 .L3: mv a3,s0 mv a2,s2 mv a1,s5 li a0,1 call __printf_chk@plt mv a1,s1 mv a0,s4 addi s0,s0,1 call __isoc99_scanf@plt addi s1,s1,4 bne s0,s3,.L3 addi s2,s2,1 addi s6,s6,20 bne s2,s0,.L2 lla a1,.LC2 li a0,1 call __printf_chk@plt addi a1,sp,12 lla a0,.LC1 call __isoc99_scanf@plt lw a2,12(sp) lla a1,.LC3 li a0,1 call __printf_chk@plt ld a4, 120(sp) ld a5, 0(s7) xor a5, a4, a5 li a4, 0 bne a5,zero,.L9 ld ra,200(sp) ld s0,192(sp) ld s1,184(sp) ld s2,176(sp) ld s3,168(sp) ld s4,160(sp) ld s5,152(sp) ld s6,144(sp) ld s7,136(sp) li a0,0 addi sp,sp,208 jr ra .L9: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "test4.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Digite um valor para D(%d,%d): " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Digite um valor para procurar: " .align 3 .LC3: .string "Valor %d existe." .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-208 sd s7,136(sp) la s7,__stack_chk_guard sd s2,176(sp) sd s3,168(sp) sd s4,160(sp) sd s5,152(sp) sd s6,144(sp) sd ra,200(sp) sd s0,192(sp) sd s1,184(sp) ld a5, 0(s7) sd a5, 120(sp) li a5, 0 addi s6,sp,16 li s2,0 lla s5,.LC0 lla s4,.LC1 li s3,5 .L2: mv s1,s6 li s0,0 .L3: mv a3,s0 mv a2,s2 mv a1,s5 li a0,1 call __printf_chk@plt mv a1,s1 mv a0,s4 addi s0,s0,1 call __isoc99_scanf@plt addi s1,s1,4 bne s0,s3,.L3 addi s2,s2,1 addi s6,s6,20 bne s2,s0,.L2 lla a1,.LC2 li a0,1 call __printf_chk@plt addi a1,sp,12 lla a0,.LC1 call __isoc99_scanf@plt lw a2,12(sp) lla a1,.LC3 li a0,1 call __printf_chk@plt ld a4, 120(sp) ld a5, 0(s7) xor a5, a4, a5 li a4, 0 bne a5,zero,.L9 ld ra,200(sp) ld s0,192(sp) ld s1,184(sp) ld s2,176(sp) ld s3,168(sp) ld s4,160(sp) ld s5,152(sp) ld s6,144(sp) ld s7,136(sp) li a0,0 addi sp,sp,208 jr ra .L9: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "test4.c" .text .section .rodata .align 3 .LC0: .string "Digite um valor para D(%d,%d): " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Digite um valor para procurar: " .align 3 .LC3: .string "Valor %d existe." .align 3 .LC4: .string "Valor %d n\303\243o existe." .text .align 2 .global main .type main, %function main: .LFB0: .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] str x23, [sp, 48] sub sp, sp, #16 .cfi_offset 19, -128 .cfi_offset 20, -120 .cfi_offset 21, -112 .cfi_offset 22, -104 .cfi_offset 23, -96 adrp x20, :got:__stack_chk_guard ldr x20, [x20, #:got_lo12:__stack_chk_guard] ldr x21, [x20] str x21, [x29, 136] mov x21, 0 mov x20, sp mov x23, x20 mov w20, 5 str w20, [x29, 76] ldr w20, [x29, 76] ldr w21, [x29, 76] sxtw x22, w20 sub x22, x22, #1 str x22, [x29, 112] sxtw x22, w20 mov x18, x22 mov x19, 0 lsr x22, x18, 59 lsl x13, x19, 5 orr x13, x22, x13 lsl x12, x18, 5 sxtw x12, w20 lsl x19, x12, 2 sxtw x12, w21 sub x12, x12, #1 str x12, [x29, 120] sxtw x12, w20 mov x6, x12 mov x7, 0 sxtw x12, w21 mov x4, x12 mov x5, 0 mul x13, x6, x4 umulh x12, x6, x4 madd x12, x7, x4, x12 madd x12, x6, x5, x12 mov x16, x13 mov x17, x12 lsr x4, x16, 59 lsl x11, x17, 5 orr x11, x4, x11 lsl x10, x16, 5 sxtw x4, w20 mov x2, x4 mov x3, 0 sxtw x4, w21 mov x0, x4 mov x1, 0 mul x5, x2, x0 umulh x4, x2, x0 madd x4, x3, x0, x4 madd x4, x2, x1, x4 mov x14, x5 mov x15, x4 lsr x0, x14, 59 lsl x9, x15, 5 orr x9, x0, x9 lsl x8, x14, 5 sxtw x1, w20 sxtw x0, w21 mul x0, x1, x0 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, 128] str xzr, [x29, 80] b .L5 .L8: str xzr, [x29, 88] b .L6 .L7: ldr x2, [x29, 88] ldr x1, [x29, 80] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf lsr x1, x19, 2 ldr x0, [x29, 80] mul x1, x1, x0 ldr x0, [x29, 88] add x0, x1, x0 lsl x0, x0, 2 ldr x1, [x29, 128] add x0, x1, x0 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf ldr x0, [x29, 88] add x0, x0, 1 str x0, [x29, 88] .L6: ldrsw x0, [x29, 76] ldr x1, [x29, 88] cmp x1, x0 bcc .L7 ldr x0, [x29, 80] add x0, x0, 1 str x0, [x29, 80] .L5: ldrsw x0, [x29, 76] ldr x1, [x29, 80] cmp x1, x0 bcc .L8 adrp x0, .LC2 add x0, x0, :lo12:.LC2 bl printf add x0, x29, 72 mov x1, x0 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf str xzr, [x29, 96] b .L9 .L14: str xzr, [x29, 104] b .L10 .L13: lsr x2, x19, 2 ldr x0, [x29, 128] ldr x1, [x29, 96] mul x2, x2, x1 ldr x1, [x29, 104] add x1, x2, x1 ldr w1, [x0, x1, lsl 2] ldr w0, [x29, 72] cmp w1, w0 bne .L11 mov w0, 1 strb w0, [x29, 71] b .L12 .L11: ldr x0, [x29, 104] add x0, x0, 1 str x0, [x29, 104] .L10: ldrsw x0, [x29, 76] ldr x1, [x29, 104] cmp x1, x0 bcc .L13 .L12: ldr x0, [x29, 96] add x0, x0, 1 str x0, [x29, 96] .L9: ldrsw x0, [x29, 76] ldr x1, [x29, 96] cmp x1, x0 bcc .L14 ldrb w0, [x29, 71] cmp w0, 0 beq .L15 ldr w0, [x29, 72] mov w1, w0 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl printf b .L16 .L15: ldr w0, [x29, 72] mov w1, w0 adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl printf .L16: mov w0, 0 mov sp, x23 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 .L18 bl __stack_chk_fail .L18: mov w0, w1 mov sp, x29 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldr x23, [sp, 48] ldp x29, x30, [sp], 144 .cfi_restore 30 .cfi_restore 29 .cfi_restore 23 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa 31, 0 ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "test4.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Digite um valor para D(%d,%d): " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Digite um valor para procurar: " .align 3 .LC3: .string "Valor %d existe." .text .align 2 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -224]! .cfi_def_cfa_offset 224 .cfi_offset 29, -224 .cfi_offset 30, -216 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] stp x25, x26, [sp, 64] str x27, [sp, 80] .cfi_offset 19, -208 .cfi_offset 20, -200 .cfi_offset 21, -192 .cfi_offset 22, -184 .cfi_offset 23, -176 .cfi_offset 24, -168 .cfi_offset 25, -160 .cfi_offset 26, -152 .cfi_offset 27, -144 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 216] mov x1, 0 add x21, sp, 112 mov x26, x21 mov x25, 0 mov x22, 0 adrp x24, .LC0 add x24, x24, :lo12:.LC0 mov w27, 1 adrp x23, .LC1 add x23, x23, :lo12:.LC1 .L2: mov x20, x26 mov x19, 0 .L3: mov x3, x19 mov x2, x22 mov x1, x24 mov w0, w27 bl __printf_chk mov x1, x20 mov x0, x23 bl __isoc99_scanf add x19, x19, 1 add x20, x20, 4 cmp x19, 5 bne .L3 add x22, x22, 1 add x26, x26, 20 add x25, x25, 5 cmp x25, 25 bne .L2 adrp x1, .LC2 add x1, x1, :lo12:.LC2 mov w0, 1 bl __printf_chk add x1, sp, 108 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl __isoc99_scanf ldr w2, [sp, 108] add x3, x21, 100 b .L5 .L6: add x21, x21, 20 cmp x21, x3 beq .L8 .L5: mov x0, 0 .L7: ldr w1, [x21, x0, lsl 2] cmp w1, w2 beq .L6 add x0, x0, 1 cmp x0, 5 bne .L7 b .L6 .L8: adrp x1, .LC3 add x1, x1, :lo12:.LC3 mov w0, 1 bl __printf_chk 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 bne .L13 mov w0, 0 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], 224 .cfi_remember_state .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_offset 0 ret .L13: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "test4.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Digite um valor para D(%d,%d): " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Digite um valor para procurar: " .align 3 .LC3: .string "Valor %d existe." .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -208]! .cfi_def_cfa_offset 208 .cfi_offset 29, -208 .cfi_offset 30, -200 adrp x0, :got:__stack_chk_guard mov x29, sp ldr x0, [x0, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -192 .cfi_offset 20, -184 .cfi_offset 21, -176 .cfi_offset 22, -168 adrp x22, .LC1 add x22, x22, :lo12:.LC1 stp x23, x24, [sp, 48] .cfi_offset 23, -160 .cfi_offset 24, -152 adrp x23, .LC0 add x23, x23, :lo12:.LC0 str x25, [sp, 64] .cfi_offset 25, -144 add x25, sp, 96 mov x24, 0 mov x21, 0 ldr x1, [x0] str x1, [sp, 200] mov x1, 0 .L2: mov x20, x25 mov x19, 0 .L3: mov x3, x19 mov x2, x21 mov x1, x23 mov w0, 1 bl __printf_chk add x19, x19, 1 mov x1, x20 mov x0, x22 bl __isoc99_scanf add x20, x20, 4 cmp x19, 5 bne .L3 add x24, x24, 5 add x21, x21, 1 add x25, x25, 20 cmp x24, 25 bne .L2 adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk add x1, sp, 92 mov x0, x22 bl __isoc99_scanf ldr w2, [sp, 92] adrp x1, .LC3 mov w0, 1 add x1, x1, :lo12:.LC3 bl __printf_chk 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 bne .L9 mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldr x25, [sp, 64] ldp x29, x30, [sp], 208 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 25 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L9: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "test4.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Digite um valor para D(%d,%d): " .align 3 .LC1: .string "%d" .align 3 .LC2: .string "Digite um valor para procurar: " .align 3 .LC3: .string "Valor %d existe." .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB23: .cfi_startproc stp x29, x30, [sp, -208]! .cfi_def_cfa_offset 208 .cfi_offset 29, -208 .cfi_offset 30, -200 adrp x0, :got:__stack_chk_guard mov x29, sp ldr x0, [x0, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -192 .cfi_offset 20, -184 .cfi_offset 21, -176 .cfi_offset 22, -168 adrp x22, .LC1 add x22, x22, :lo12:.LC1 stp x23, x24, [sp, 48] .cfi_offset 23, -160 .cfi_offset 24, -152 adrp x23, .LC0 add x23, x23, :lo12:.LC0 str x25, [sp, 64] .cfi_offset 25, -144 add x25, sp, 96 mov x24, 0 mov x21, 0 ldr x1, [x0] str x1, [sp, 200] mov x1, 0 .L2: mov x20, x25 mov x19, 0 .L3: mov x3, x19 mov x2, x21 mov x1, x23 mov w0, 1 bl __printf_chk add x19, x19, 1 mov x1, x20 mov x0, x22 bl __isoc99_scanf add x20, x20, 4 cmp x19, 5 bne .L3 add x24, x24, 5 add x21, x21, 1 add x25, x25, 20 cmp x24, 25 bne .L2 adrp x1, .LC2 mov w0, 1 add x1, x1, :lo12:.LC2 bl __printf_chk add x1, sp, 92 mov x0, x22 bl __isoc99_scanf ldr w2, [sp, 92] adrp x1, .LC3 mov w0, 1 add x1, x1, :lo12:.LC3 bl __printf_chk 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 bne .L9 mov w0, 0 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldr x25, [sp, 64] ldp x29, x30, [sp], 208 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 25 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L9: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE23: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
typedefbounds.c
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s // RUN: 3c --addcr --alltypes %s -- | %clang_cc1 -fcheckedc-extension -x c - // // 3c -alltypes -output-postfix=checked %s // 3c -alltypes %S/typedefs.checked.c -- | diff %S/typedefs.checked.c - // rm %S/typedefs.checked.c typedef char* string; //CHECK_ALL: typedef _Array_ptr<char> string; void foo(void) { string x = "hello"; //CHECK_ALL: string x : byte_count(5) = "hello"; char c = x[2]; }
.file "typedefbounds.c" .option pic .text .section .rodata .align 3 .LC0: .string "hello" .text .align 1 .globl foo .type foo, @function foo: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 lla a5,.LC0 sd a5,-24(s0) ld a5,-24(s0) lbu a5,2(a5) sb a5,-25(s0) nop ld s0,24(sp) addi sp,sp,32 jr ra .size foo, .-foo .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "typedefbounds.c" .option pic .text .align 1 .globl foo .type foo, @function foo: ret .size foo, .-foo .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "typedefbounds.c" .option pic .text .align 1 .globl foo .type foo, @function foo: ret .size foo, .-foo .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "typedefbounds.c" .option pic .text .align 1 .globl foo .type foo, @function foo: ret .size foo, .-foo .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "typedefbounds.c" .text .section .rodata .align 3 .LC0: .string "hello" .text .align 2 .global foo .type foo, %function foo: .LFB0: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 adrp x0, .LC0 add x0, x0, :lo12:.LC0 str x0, [sp, 8] ldr x0, [sp, 8] ldrb w0, [x0, 2] strb w0, [sp, 7] nop add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size foo, .-foo .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "typedefbounds.c" .text .align 2 .global foo .type foo, %function foo: .LFB0: .cfi_startproc ret .cfi_endproc .LFE0: .size foo, .-foo .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "typedefbounds.c" .text .align 2 .p2align 4,,11 .global foo .type foo, %function foo: .LFB0: .cfi_startproc ret .cfi_endproc .LFE0: .size foo, .-foo .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "typedefbounds.c" .text .align 2 .p2align 4,,11 .global foo .type foo, %function foo: .LFB0: .cfi_startproc ret .cfi_endproc .LFE0: .size foo, .-foo .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
Main.c
#include <stdint.h> #include <stdio.h> #include <stdlib.h> struct Vector; // { } // typedef int *createArray(unsigned int length, int value) { int *data = (int *)malloc(length * sizeof(int)); if (data == NULL) { return NULL; } for (unsigned int i = 0; i < length; i++) { data[i] = value; } return data; } int *freeArray(int *array) { if (array != NULL) { free(array); } return NULL; } float meanArray(int *array, unsigned int length) { int sum = 0; for (unsigned int i = 0; i < length; i++) { sum += array[i]; } return (float)(sum) / (float)(length); } int minArray(int *array, unsigned int length) { if (length == 0) { return INT32_MIN; } int current_min = array[0]; for (unsigned int i = 1; i < length; i++) { if (array[i] < current_min) { current_min = array[i]; } } return current_min; } int maxArray(int *array, unsigned int length) { if (length == 0) { return INT32_MIN; } int current_max = array[0]; for (unsigned int i = 1; i < length; i++) { if (array[i] > current_max) { current_max = array[i]; } } return current_max; } void printArray(int *array, unsigned int length) { if (array == NULL) { return; } for (unsigned int i = 0; i < length; i++) { printf("%d\n", array[i]); } } int main() { // Vector v1 = {.data = createArray(3, 1), .length = 3}; // v1.data[1] = 2; // printVector(&v1); // int max_v1 = maxVector(&v1); // int min_v1 = minVector(&v1); // float mean_v1 = meanVector(&v1); // printf("Max: %d\n", max_v1); // printf("Min: %d\n", min_v1); // printf("Mean: %f\n", mean_v1); return 0; }
.file "Main.c" .option pic .text .align 1 .globl createArray .type createArray, @function createArray: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 mv a5,a0 mv a4,a1 sw a5,-36(s0) mv a5,a4 sw a5,-40(s0) lwu a5,-36(s0) slli a5,a5,2 mv a0,a5 call malloc@plt mv a5,a0 sd a5,-24(s0) ld a5,-24(s0) bne a5,zero,.L2 li a5,0 j .L3 .L2: sw zero,-28(s0) j .L4 .L5: lwu a5,-28(s0) slli a5,a5,2 ld a4,-24(s0) add a5,a4,a5 lw a4,-40(s0) sw a4,0(a5) lw a5,-28(s0) addiw a5,a5,1 sw a5,-28(s0) .L4: lw a5,-28(s0) mv a4,a5 lw a5,-36(s0) sext.w a4,a4 sext.w a5,a5 bltu a4,a5,.L5 ld a5,-24(s0) .L3: mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size createArray, .-createArray .align 1 .globl freeArray .type freeArray, @function freeArray: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 sd a0,-24(s0) ld a5,-24(s0) beq a5,zero,.L7 ld a0,-24(s0) call free@plt .L7: li a5,0 mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size freeArray, .-freeArray .align 1 .globl meanArray .type meanArray, @function meanArray: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 sw a5,-44(s0) sw zero,-24(s0) sw zero,-20(s0) j .L10 .L11: lwu a5,-20(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a5,0(a5) lw a4,-24(s0) addw a5,a4,a5 sw a5,-24(s0) lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L10: lw a5,-20(s0) mv a4,a5 lw a5,-44(s0) sext.w a4,a4 sext.w a5,a5 bltu a4,a5,.L11 lw a5,-24(s0) fcvt.s.w fa4,a5 lw a5,-44(s0) fcvt.s.wu fa5,a5 fdiv.s fa5,fa4,fa5 fmv.s fa0,fa5 ld s0,40(sp) addi sp,sp,48 jr ra .size meanArray, .-meanArray .align 1 .globl minArray .type minArray, @function minArray: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 sw a5,-44(s0) lw a5,-44(s0) sext.w a5,a5 bne a5,zero,.L14 li a5,-2147483648 j .L15 .L14: ld a5,-40(s0) lw a5,0(a5) sw a5,-24(s0) li a5,1 sw a5,-20(s0) j .L16 .L18: lwu a5,-20(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a4,0(a5) lw a5,-24(s0) sext.w a5,a5 ble a5,a4,.L17 lwu a5,-20(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a5,0(a5) sw a5,-24(s0) .L17: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L16: lw a5,-20(s0) mv a4,a5 lw a5,-44(s0) sext.w a4,a4 sext.w a5,a5 bltu a4,a5,.L18 lw a5,-24(s0) .L15: mv a0,a5 ld s0,40(sp) addi sp,sp,48 jr ra .size minArray, .-minArray .align 1 .globl maxArray .type maxArray, @function maxArray: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 sw a5,-44(s0) lw a5,-44(s0) sext.w a5,a5 bne a5,zero,.L20 li a5,-2147483648 j .L21 .L20: ld a5,-40(s0) lw a5,0(a5) sw a5,-24(s0) li a5,1 sw a5,-20(s0) j .L22 .L24: lwu a5,-20(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a4,0(a5) lw a5,-24(s0) sext.w a5,a5 bge a5,a4,.L23 lwu a5,-20(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a5,0(a5) sw a5,-24(s0) .L23: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L22: lw a5,-20(s0) mv a4,a5 lw a5,-44(s0) sext.w a4,a4 sext.w a5,a5 bltu a4,a5,.L24 lw a5,-24(s0) .L21: mv a0,a5 ld s0,40(sp) addi sp,sp,48 jr ra .size maxArray, .-maxArray .section .rodata .align 3 .LC0: .string "%d\n" .text .align 1 .globl printArray .type printArray, @function printArray: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 sw a5,-44(s0) ld a5,-40(s0) beq a5,zero,.L30 sw zero,-20(s0) j .L28 .L29: lwu a5,-20(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a5,0(a5) mv a1,a5 lla a0,.LC0 call printf@plt lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L28: lw a5,-20(s0) mv a4,a5 lw a5,-44(s0) sext.w a4,a4 sext.w a5,a5 bltu a4,a5,.L29 j .L25 .L30: nop .L25: ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size printArray, .-printArray .align 1 .globl main .type main, @function main: addi sp,sp,-16 sd s0,8(sp) addi s0,sp,16 li a5,0 mv a0,a5 ld s0,8(sp) addi sp,sp,16 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "Main.c" .option pic .text .align 1 .globl createArray .type createArray, @function createArray: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) mv s0,a0 mv s1,a1 slli a5,a0,32 srli a0,a5,30 call malloc@plt beq a0,zero,.L1 beq s0,zero,.L1 mv a5,a0 slli a3,s0,32 srli a4,a3,30 add a4,a4,a0 .L3: sw s1,0(a5) addi a5,a5,4 bne a5,a4,.L3 .L1: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size createArray, .-createArray .align 1 .globl freeArray .type freeArray, @function freeArray: beq a0,zero,.L9 addi sp,sp,-16 sd ra,8(sp) call free@plt li a0,0 ld ra,8(sp) addi sp,sp,16 jr ra .L9: li a0,0 ret .size freeArray, .-freeArray .align 1 .globl meanArray .type meanArray, @function meanArray: beq a1,zero,.L15 mv a5,a0 addiw a2,a1,-1 slli a4,a2,32 srli a2,a4,30 addi a0,a0,4 add a2,a2,a0 li a4,0 .L14: lw a3,0(a5) addw a4,a3,a4 addi a5,a5,4 bne a5,a2,.L14 .L13: fcvt.s.w fa0,a4 fcvt.s.wu fa5,a1 fdiv.s fa0,fa0,fa5 ret .L15: li a4,0 j .L13 .size meanArray, .-meanArray .align 1 .globl minArray .type minArray, @function minArray: mv a5,a0 beq a1,zero,.L21 lw a0,0(a0) li a4,1 bleu a1,a4,.L18 addi a4,a5,4 addiw a2,a1,-2 slli a3,a2,32 srli a2,a3,30 addi a5,a5,8 add a2,a2,a5 j .L20 .L19: sext.w a0,a3 addi a4,a4,4 beq a4,a2,.L23 .L20: lw a5,0(a4) mv a3,a5 sext.w a5,a5 ble a5,a0,.L19 mv a3,a0 j .L19 .L23: ret .L21: li a0,-2147483648 .L18: ret .size minArray, .-minArray .align 1 .globl maxArray .type maxArray, @function maxArray: mv a5,a0 beq a1,zero,.L28 lw a0,0(a0) li a4,1 bleu a1,a4,.L25 addi a4,a5,4 addiw a2,a1,-2 slli a3,a2,32 srli a2,a3,30 addi a5,a5,8 add a2,a2,a5 j .L27 .L26: sext.w a0,a3 addi a4,a4,4 beq a4,a2,.L30 .L27: lw a5,0(a4) mv a3,a5 sext.w a5,a5 bge a5,a0,.L26 mv a3,a0 j .L26 .L30: ret .L28: li a0,-2147483648 .L25: ret .size maxArray, .-maxArray .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d\n" .text .align 1 .globl printArray .type printArray, @function printArray: beq a0,zero,.L36 beq a1,zero,.L36 addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) mv s0,a0 addiw a1,a1,-1 slli a5,a1,32 srli a1,a5,30 add s1,a0,a1 lla s2,.LC0 .L33: lw a2,0(s0) mv a1,s2 li a0,1 call __printf_chk@plt mv a5,s0 addi s0,s0,4 bne a5,s1,.L33 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L36: ret .size printArray, .-printArray .align 1 .globl main .type main, @function main: li a0,0 ret .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "Main.c" .option pic .text .align 1 .globl createArray .type createArray, @function createArray: addi sp,sp,-32 slli a5,a0,32 sd s0,16(sp) srli s0,a5,30 sd s2,0(sp) mv s2,a0 mv a0,s0 sd s1,8(sp) sd ra,24(sp) mv s1,a1 call malloc@plt beq a0,zero,.L1 beq s2,zero,.L1 mv a5,a0 add a4,s0,a0 .L3: sw s1,0(a5) addi a5,a5,4 bne a5,a4,.L3 .L1: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .size createArray, .-createArray .align 1 .globl freeArray .type freeArray, @function freeArray: beq a0,zero,.L19 addi sp,sp,-16 sd ra,8(sp) call free@plt ld ra,8(sp) li a0,0 addi sp,sp,16 jr ra .L19: li a0,0 ret .size freeArray, .-freeArray .align 1 .globl meanArray .type meanArray, @function meanArray: beq a1,zero,.L25 addiw a3,a1,-1 slli a5,a3,32 srli a3,a5,30 addi a5,a0,4 add a3,a3,a5 li a5,0 .L24: lw a4,0(a0) addi a0,a0,4 addw a5,a4,a5 bne a3,a0,.L24 fcvt.s.w fa0,a5 fcvt.s.wu fa5,a1 fdiv.s fa0,fa0,fa5 ret .L25: fcvt.s.wu fa5,a1 fmv.w.x fa0,zero fdiv.s fa0,fa0,fa5 ret .size meanArray, .-meanArray .align 1 .globl minArray .type minArray, @function minArray: mv a5,a0 beq a1,zero,.L31 li a4,1 lw a0,0(a0) beq a1,a4,.L28 addiw a2,a1,-2 slli a4,a2,32 srli a2,a4,30 addi a4,a5,8 add a2,a2,a4 addi a5,a5,4 .L30: lw a4,0(a5) addi a5,a5,4 mv a3,a4 ble a4,a0,.L29 mv a3,a0 .L29: sext.w a0,a3 bne a5,a2,.L30 ret .L31: li a0,-2147483648 .L28: ret .size minArray, .-minArray .align 1 .globl maxArray .type maxArray, @function maxArray: mv a5,a0 beq a1,zero,.L37 li a4,1 lw a0,0(a0) beq a1,a4,.L34 addiw a2,a1,-2 slli a4,a2,32 srli a2,a4,30 addi a4,a5,8 add a2,a2,a4 addi a5,a5,4 .L36: lw a4,0(a5) addi a5,a5,4 mv a3,a4 bge a4,a0,.L35 mv a3,a0 .L35: sext.w a0,a3 bne a5,a2,.L36 ret .L37: li a0,-2147483648 .L34: ret .size maxArray, .-maxArray .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d\n" .text .align 1 .globl printArray .type printArray, @function printArray: beq a0,zero,.L50 beq a1,zero,.L50 addi sp,sp,-32 sd s1,8(sp) addiw s1,a1,-1 slli a5,s1,32 srli s1,a5,30 sd s0,16(sp) sd s2,0(sp) sd ra,24(sp) mv s0,a0 add s1,a0,s1 lla s2,.LC0 .L41: lw a2,0(s0) mv a1,s2 li a0,1 call __printf_chk@plt mv a5,s0 addi s0,s0,4 bne a5,s1,.L41 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L50: ret .size printArray, .-printArray .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: li a0,0 ret .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "Main.c" .option pic .text .align 1 .globl createArray .type createArray, @function createArray: addi sp,sp,-32 slli a5,a0,32 sd s1,8(sp) mv s1,a0 srli a0,a5,30 sd s0,16(sp) sd ra,24(sp) mv s0,a1 call malloc@plt beq a0,zero,.L1 beq s1,zero,.L1 li a5,1 beq s1,a5,.L7 srliw a4,s1,1 slli a3,s0,32 slli a5,s0,32 srli a3,a3,32 slli a4,a4,3 or a3,a3,a5 add a4,a4,a0 mv a5,a0 .L4: sd a3,0(a5) addi a5,a5,8 bne a4,a5,.L4 andi a5,s1,-2 beq s1,a5,.L1 .L3: slli a5,a5,32 srli a5,a5,30 add a5,a0,a5 sw s0,0(a5) .L1: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .L7: li a5,0 j .L3 .size createArray, .-createArray .align 1 .globl freeArray .type freeArray, @function freeArray: beq a0,zero,.L23 addi sp,sp,-16 sd ra,8(sp) call free@plt ld ra,8(sp) li a0,0 addi sp,sp,16 jr ra .L23: li a0,0 ret .size freeArray, .-freeArray .align 1 .globl meanArray .type meanArray, @function meanArray: beq a1,zero,.L29 addiw a3,a1,-1 slli a5,a3,32 srli a3,a5,30 addi a5,a0,4 add a3,a3,a5 li a5,0 .L28: lw a4,0(a0) addi a0,a0,4 addw a5,a4,a5 bne a3,a0,.L28 fcvt.s.w fa0,a5 fcvt.s.wu fa5,a1 fdiv.s fa0,fa0,fa5 ret .L29: fcvt.s.wu fa5,a1 fmv.w.x fa0,zero fdiv.s fa0,fa0,fa5 ret .size meanArray, .-meanArray .align 1 .globl minArray .type minArray, @function minArray: mv a5,a0 beq a1,zero,.L35 li a4,1 lw a0,0(a0) beq a1,a4,.L32 addiw a2,a1,-2 slli a4,a2,32 srli a2,a4,30 addi a4,a5,8 add a2,a2,a4 addi a5,a5,4 .L34: lw a4,0(a5) addi a5,a5,4 mv a3,a4 ble a4,a0,.L33 mv a3,a0 .L33: sext.w a0,a3 bne a2,a5,.L34 ret .L35: li a0,-2147483648 .L32: ret .size minArray, .-minArray .align 1 .globl maxArray .type maxArray, @function maxArray: mv a5,a0 beq a1,zero,.L41 li a4,1 lw a0,0(a0) beq a1,a4,.L38 addiw a2,a1,-2 slli a4,a2,32 srli a2,a4,30 addi a4,a5,8 add a2,a2,a4 addi a5,a5,4 .L40: lw a4,0(a5) addi a5,a5,4 mv a3,a4 bge a4,a0,.L39 mv a3,a0 .L39: sext.w a0,a3 bne a2,a5,.L40 ret .L41: li a0,-2147483648 .L38: ret .size maxArray, .-maxArray .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d\n" .text .align 1 .globl printArray .type printArray, @function printArray: beq a0,zero,.L54 beq a1,zero,.L54 addi sp,sp,-32 sd s1,8(sp) addiw s1,a1,-1 slli a5,s1,32 srli s1,a5,30 sd s0,16(sp) sd s2,0(sp) sd ra,24(sp) mv s0,a0 add s1,a0,s1 lla s2,.LC0 .L45: lw a2,0(s0) mv a1,s2 li a0,1 call __printf_chk@plt mv a5,s0 addi s0,s0,4 bne a5,s1,.L45 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L54: ret .size printArray, .-printArray .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: li a0,0 ret .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "Main.c" .text .align 2 .global createArray .type createArray, %function createArray: .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 w0, [sp, 28] lsl x0, x0, 2 bl malloc str x0, [sp, 40] ldr x0, [sp, 40] cmp x0, 0 bne .L2 mov x0, 0 b .L3 .L2: str wzr, [sp, 36] b .L4 .L5: ldr w0, [sp, 36] lsl x0, x0, 2 ldr x1, [sp, 40] add x0, x1, x0 ldr w1, [sp, 24] str w1, [x0] ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L4: ldr w1, [sp, 36] ldr w0, [sp, 28] cmp w1, w0 bcc .L5 ldr x0, [sp, 40] .L3: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size createArray, .-createArray .align 2 .global freeArray .type freeArray, %function freeArray: .LFB7: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp str x0, [sp, 24] ldr x0, [sp, 24] cmp x0, 0 beq .L7 ldr x0, [sp, 24] bl free .L7: mov x0, 0 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size freeArray, .-freeArray .align 2 .global meanArray .type meanArray, %function meanArray: .LFB8: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] str wzr, [sp, 24] str wzr, [sp, 28] b .L10 .L11: ldr w0, [sp, 28] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 24] add w0, w1, w0 str w0, [sp, 24] ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L10: ldr w1, [sp, 28] ldr w0, [sp, 4] cmp w1, w0 bcc .L11 ldr s0, [sp, 24] scvtf s1, s0 ldr s0, [sp, 4] ucvtf s0, s0 fdiv s0, s1, s0 add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size meanArray, .-meanArray .align 2 .global minArray .type minArray, %function minArray: .LFB9: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] ldr w0, [sp, 4] cmp w0, 0 bne .L14 mov w0, -2147483648 b .L15 .L14: ldr x0, [sp, 8] ldr w0, [x0] str w0, [sp, 24] mov w0, 1 str w0, [sp, 28] b .L16 .L18: ldr w0, [sp, 28] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 24] cmp w1, w0 ble .L17 ldr w0, [sp, 28] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 ldr w0, [x0] str w0, [sp, 24] .L17: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L16: ldr w1, [sp, 28] ldr w0, [sp, 4] cmp w1, w0 bcc .L18 ldr w0, [sp, 24] .L15: add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size minArray, .-minArray .align 2 .global maxArray .type maxArray, %function maxArray: .LFB10: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, 8] str w1, [sp, 4] ldr w0, [sp, 4] cmp w0, 0 bne .L20 mov w0, -2147483648 b .L21 .L20: ldr x0, [sp, 8] ldr w0, [x0] str w0, [sp, 24] mov w0, 1 str w0, [sp, 28] b .L22 .L24: ldr w0, [sp, 28] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 24] cmp w1, w0 bge .L23 ldr w0, [sp, 28] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 ldr w0, [x0] str w0, [sp, 24] .L23: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L22: ldr w1, [sp, 28] ldr w0, [sp, 4] cmp w1, w0 bcc .L24 ldr w0, [sp, 24] .L21: add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE10: .size maxArray, .-maxArray .section .rodata .align 3 .LC0: .string "%d\n" .text .align 2 .global printArray .type printArray, %function printArray: .LFB11: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp str x0, [sp, 24] str w1, [sp, 20] ldr x0, [sp, 24] cmp x0, 0 beq .L30 str wzr, [sp, 44] b .L28 .L29: ldr w0, [sp, 44] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 ldr w0, [x0] mov w1, w0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L28: ldr w1, [sp, 44] ldr w0, [sp, 20] cmp w1, w0 bcc .L29 b .L25 .L30: nop .L25: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE11: .size printArray, .-printArray .align 2 .global main .type main, %function main: .LFB12: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE12: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "Main.c" .text .align 2 .global createArray .type createArray, %function createArray: .LFB39: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w19, w0 mov w20, w1 ubfiz x0, x19, 2, 32 bl malloc cbz x0, .L1 cbz w19, .L1 mov x2, 0 .L3: str w20, [x0, x2, lsl 2] add x2, x2, 1 cmp w19, w2 bhi .L3 .L1: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE39: .size createArray, .-createArray .align 2 .global freeArray .type freeArray, %function freeArray: .LFB40: .cfi_startproc cbz x0, .L9 stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp bl free mov x0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L9: mov x0, 0 ret .cfi_endproc .LFE40: .size freeArray, .-freeArray .align 2 .global meanArray .type meanArray, %function meanArray: .LFB41: .cfi_startproc cbz w1, .L15 mov x2, 0 fmov s0, wzr .L14: ldr w3, [x0, x2, lsl 2] fmov s1, w3 add v0.2s, v0.2s, v1.2s add x2, x2, 1 cmp w1, w2 bhi .L14 .L13: scvtf s0, s0 ucvtf s1, w1 fdiv s0, s0, s1 ret .L15: fmov s0, wzr b .L13 .cfi_endproc .LFE41: .size meanArray, .-meanArray .align 2 .global minArray .type minArray, %function minArray: .LFB42: .cfi_startproc mov x4, x0 cbz w1, .L20 ldr w0, [x0] cmp w1, 1 bls .L17 mov x2, 1 .L19: ldr w3, [x4, x2, lsl 2] cmp w0, w3 csel w0, w0, w3, le add x2, x2, 1 cmp w1, w2 bhi .L19 .L17: ret .L20: mov w0, -2147483648 b .L17 .cfi_endproc .LFE42: .size minArray, .-minArray .align 2 .global maxArray .type maxArray, %function maxArray: .LFB43: .cfi_startproc mov x4, x0 cbz w1, .L25 ldr w0, [x0] cmp w1, 1 bls .L22 mov x2, 1 .L24: ldr w3, [x4, x2, lsl 2] cmp w0, w3 csel w0, w0, w3, ge add x2, x2, 1 cmp w1, w2 bhi .L24 .L22: ret .L25: mov w0, -2147483648 b .L22 .cfi_endproc .LFE43: .size maxArray, .-maxArray .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d\n" .text .align 2 .global printArray .type printArray, %function printArray: .LFB44: .cfi_startproc cbz x0, .L32 cbz w1, .L32 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] stp x21, x22, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 mov x19, x0 sub w1, w1, #1 add x20, x0, x1, lsl 2 adrp x21, .LC0 add x21, x21, :lo12:.LC0 mov w22, 1 .L29: ldr w2, [x19] mov x1, x21 mov w0, w22 bl __printf_chk cmp x19, x20 add x19, x19, 4 bne .L29 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L32: ret .cfi_endproc .LFE44: .size printArray, .-printArray .align 2 .global main .type main, %function main: .LFB45: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE45: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "Main.c" .text .align 2 .p2align 4,,11 .global createArray .type createArray, %function createArray: .LFB39: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w19, w0 mov w20, w1 ubfiz x0, x19, 2, 32 bl malloc cbz x0, .L1 cbz w19, .L1 mov x2, 0 .p2align 3,,7 .L3: str w20, [x0, x2, lsl 2] add x2, x2, 1 cmp w19, w2 bhi .L3 .L1: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE39: .size createArray, .-createArray .align 2 .p2align 4,,11 .global freeArray .type freeArray, %function freeArray: .LFB40: .cfi_startproc cbz x0, .L19 stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp bl free mov x0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L19: mov x0, 0 ret .cfi_endproc .LFE40: .size freeArray, .-freeArray .align 2 .p2align 4,,11 .global meanArray .type meanArray, %function meanArray: .LFB41: .cfi_startproc cbz w1, .L25 mov x2, 0 fmov s0, wzr .p2align 3,,7 .L24: ldr w3, [x0, x2, lsl 2] add x2, x2, 1 fmov s1, w3 add v0.2s, v0.2s, v1.2s cmp w1, w2 bhi .L24 ucvtf s1, w1 scvtf s0, s0 fdiv s0, s0, s1 ret .p2align 2,,3 .L25: ucvtf s1, w1 movi v0.2s, #0 fdiv s0, s0, s1 ret .cfi_endproc .LFE41: .size meanArray, .-meanArray .align 2 .p2align 4,,11 .global minArray .type minArray, %function minArray: .LFB42: .cfi_startproc mov x4, x0 cbz w1, .L30 ldr w0, [x0] cmp w1, 1 beq .L27 mov x2, 1 .p2align 3,,7 .L29: ldr w3, [x4, x2, lsl 2] add x2, x2, 1 cmp w0, w3 csel w0, w0, w3, le cmp w1, w2 bhi .L29 .L27: ret .L30: mov w0, -2147483648 ret .cfi_endproc .LFE42: .size minArray, .-minArray .align 2 .p2align 4,,11 .global maxArray .type maxArray, %function maxArray: .LFB43: .cfi_startproc mov x4, x0 cbz w1, .L38 ldr w0, [x0] cmp w1, 1 beq .L35 mov x2, 1 .p2align 3,,7 .L37: ldr w3, [x4, x2, lsl 2] add x2, x2, 1 cmp w0, w3 csel w0, w0, w3, ge cmp w1, w2 bhi .L37 .L35: ret .L38: mov w0, -2147483648 ret .cfi_endproc .LFE43: .size maxArray, .-maxArray .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d\n" .text .align 2 .p2align 4,,11 .global printArray .type printArray, %function printArray: .LFB44: .cfi_startproc cbz x0, .L54 cbz w1, .L54 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 sub w20, w1, #1 mov x19, x0 add x20, x0, w20, uxtw 2 str x21, [sp, 32] .cfi_offset 21, -16 adrp x21, .LC0 add x21, x21, :lo12:.LC0 .p2align 3,,7 .L45: ldr w2, [x19] mov x1, x21 mov w0, 1 bl __printf_chk cmp x19, x20 add x19, x19, 4 bne .L45 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L54: ret .cfi_endproc .LFE44: .size printArray, .-printArray .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB45: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE45: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "Main.c" .text .align 2 .p2align 4,,11 .global createArray .type createArray, %function createArray: .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 x19, [sp, 16] .cfi_offset 19, -16 mov w19, w0 str d8, [sp, 24] .cfi_offset 72, -8 fmov s8, w1 ubfiz x0, x19, 2, 32 bl malloc cbz x0, .L1 cbz w19, .L1 sub w1, w19, #1 cmp w1, 2 bls .L7 lsr w2, w19, 2 mov x1, x0 dup v0.4s, v8.s[0] add x2, x0, w2, uxtw 4 .p2align 3,,7 .L4: str q0, [x1], 16 cmp x1, x2 bne .L4 and w1, w19, -4 tst x19, 3 beq .L1 .L3: uxtw x2, w1 add w3, w1, 1 str s8, [x0, x2, lsl 2] cmp w19, w3 bls .L1 add w1, w1, 2 str s8, [x0, w3, uxtw 2] cmp w19, w1 bls .L1 str s8, [x0, x1, lsl 2] .L1: ldr x19, [sp, 16] ldr d8, [sp, 24] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 72 .cfi_def_cfa_offset 0 ret .L7: .cfi_restore_state mov w1, 0 b .L3 .cfi_endproc .LFE39: .size createArray, .-createArray .align 2 .p2align 4,,11 .global freeArray .type freeArray, %function freeArray: .LFB40: .cfi_startproc cbz x0, .L23 stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp bl free mov x0, 0 ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L23: mov x0, 0 ret .cfi_endproc .LFE40: .size freeArray, .-freeArray .align 2 .p2align 4,,11 .global meanArray .type meanArray, %function meanArray: .LFB41: .cfi_startproc cbz w1, .L31 sub w2, w1, #1 cmp w2, 2 bls .L32 lsr w3, w1, 2 add x4, x0, 16 sub w3, w3, #1 mov x2, x0 movi v0.4s, 0 add x3, x4, w3, uxtw 4 .p2align 3,,7 .L29: ldr q1, [x2], 16 add v0.4s, v0.4s, v1.4s cmp x2, x3 bne .L29 addv s0, v0.4s and w2, w1, -4 tst x1, 3 beq .L30 .L28: uxtw x3, w2 add w4, w2, 1 ldr w3, [x0, x3, lsl 2] fmov s1, w3 add v0.2s, v0.2s, v1.2s cmp w1, w4 bls .L30 ldr w3, [x0, w4, uxtw 2] add w2, w2, 2 fmov s1, w3 add v0.2s, v0.2s, v1.2s cmp w1, w2 bls .L30 ldr w0, [x0, x2, lsl 2] fmov s1, w0 add v0.2s, v0.2s, v1.2s .L30: ucvtf s1, w1 scvtf s0, s0 fdiv s0, s0, s1 ret .p2align 2,,3 .L31: ucvtf s1, w1 movi v0.2s, #0 fdiv s0, s0, s1 ret .L32: mov w2, 0 fmov s0, wzr b .L28 .cfi_endproc .LFE41: .size meanArray, .-meanArray .align 2 .p2align 4,,11 .global minArray .type minArray, %function minArray: .LFB42: .cfi_startproc mov x4, x0 cbz w1, .L40 ldr w0, [x0] cmp w1, 1 beq .L34 sub w2, w1, #2 sub w5, w1, #1 cmp w2, 2 bls .L41 lsr w3, w5, 2 add x6, x4, 20 sub w3, w3, #1 dup v0.4s, w0 add x2, x4, 4 add x3, x6, w3, uxtw 4 .p2align 3,,7 .L37: ldr q1, [x2], 16 smin v0.4s, v0.4s, v1.4s cmp x2, x3 bne .L37 sminv s0, v0.4s and w3, w5, -4 add w2, w3, 1 fmov w0, s0 cmp w5, w3 beq .L34 .L36: ldr w3, [x4, w2, uxtw 2] add w5, w2, 1 cmp w0, w3 csel w0, w0, w3, le cmp w1, w5 bls .L34 ldr w3, [x4, w5, uxtw 2] add w2, w2, 2 cmp w0, w3 csel w0, w0, w3, le cmp w1, w2 bls .L34 ldr w1, [x4, w2, uxtw 2] cmp w0, w1 csel w0, w0, w1, le .L34: ret .L41: mov w2, 1 b .L36 .L40: mov w0, -2147483648 ret .cfi_endproc .LFE42: .size minArray, .-minArray .align 2 .p2align 4,,11 .global maxArray .type maxArray, %function maxArray: .LFB43: .cfi_startproc mov x4, x0 cbz w1, .L52 ldr w0, [x0] cmp w1, 1 beq .L46 sub w2, w1, #2 sub w5, w1, #1 cmp w2, 2 bls .L53 lsr w3, w5, 2 add x6, x4, 20 sub w3, w3, #1 dup v0.4s, w0 add x2, x4, 4 add x3, x6, w3, uxtw 4 .p2align 3,,7 .L49: ldr q1, [x2], 16 smax v0.4s, v0.4s, v1.4s cmp x2, x3 bne .L49 smaxv s0, v0.4s and w3, w5, -4 add w2, w3, 1 fmov w0, s0 cmp w5, w3 beq .L46 .L48: ldr w3, [x4, w2, uxtw 2] add w5, w2, 1 cmp w0, w3 csel w0, w0, w3, ge cmp w1, w5 bls .L46 ldr w3, [x4, w5, uxtw 2] add w2, w2, 2 cmp w0, w3 csel w0, w0, w3, ge cmp w1, w2 bls .L46 ldr w1, [x4, w2, uxtw 2] cmp w0, w1 csel w0, w0, w1, ge .L46: ret .L53: mov w2, 1 b .L48 .L52: mov w0, -2147483648 ret .cfi_endproc .LFE43: .size maxArray, .-maxArray .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d\n" .text .align 2 .p2align 4,,11 .global printArray .type printArray, %function printArray: .LFB44: .cfi_startproc cbz x0, .L69 cbz w1, .L69 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 sub w20, w1, #1 mov x19, x0 add x20, x0, w20, uxtw 2 str x21, [sp, 32] .cfi_offset 21, -16 adrp x21, .LC0 add x21, x21, :lo12:.LC0 .p2align 3,,7 .L60: ldr w2, [x19] mov x1, x21 mov w0, 1 bl __printf_chk cmp x19, x20 add x19, x19, 4 bne .L60 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L69: ret .cfi_endproc .LFE44: .size printArray, .-printArray .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB45: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE45: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
floyd-warshall.c
#include "stdio.h" #include "stdlib.h" #include "limits.h" #define MAX_VEX_NUM 100 short int adj[MAX_VEX_NUM][MAX_VEX_NUM]; int dist[MAX_VEX_NUM][MAX_VEX_NUM]; int pred[MAX_VEX_NUM][MAX_VEX_NUM]; void floyd_warshall (int vex_num) { for (int i = 0; i < vex_num; i++) for (int j = 0; j < vex_num; j++) { if (adj[i][j]) dist[i][j] = adj[i][j]; else dist[i][j] = INT_MAX; pred[i][j] = j; } for (int mid = 0; mid < vex_num; mid++) for (int start = 0; start < vex_num; start++) for (int end = 0; end < vex_num; end++) { long new_dist = (dist[start][mid] == INT_MAX || dist[mid][end] == INT_MAX ? INT_MAX : dist[start][mid] + dist[mid][end]); if (dist[start][end] > new_dist) { dist[start][end] = new_dist; pred[start][end] = pred[start][mid]; } } } void path (int u, int v) { if (pred[u][v] == -1) return; printf("%d ", u); while (u != v) { u = pred[u][v]; printf("%d ", u); } }
.file "floyd-warshall.c" .option pic .text .globl adj .bss .align 3 .type adj, @object .size adj, 20000 adj: .zero 20000 .globl dist .align 3 .type dist, @object .size dist, 40000 dist: .zero 40000 .globl pred .align 3 .type pred, @object .size pred, 40000 pred: .zero 40000 .text .align 1 .globl floyd_warshall .type floyd_warshall, @function floyd_warshall: addi sp,sp,-64 sd s0,56(sp) addi s0,sp,64 mv a5,a0 sw a5,-52(s0) sw zero,-44(s0) j .L2 .L7: sw zero,-40(s0) j .L3 .L6: lla a4,adj lw a5,-40(s0) lw a2,-44(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,1 add a5,a4,a5 lh a5,0(a5) beq a5,zero,.L4 lla a4,adj lw a5,-40(s0) lw a2,-44(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,1 add a5,a4,a5 lh a5,0(a5) sext.w a4,a5 lla a3,dist lw a5,-40(s0) lw a1,-44(s0) li a2,100 mul a2,a1,a2 add a5,a2,a5 slli a5,a5,2 add a5,a3,a5 sw a4,0(a5) j .L5 .L4: lla a4,dist lw a5,-40(s0) lw a2,-44(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 li a4,-2147483648 xori a4,a4,-1 sw a4,0(a5) .L5: lla a4,pred lw a5,-40(s0) lw a2,-44(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 lw a4,-40(s0) sw a4,0(a5) lw a5,-40(s0) addiw a5,a5,1 sw a5,-40(s0) .L3: lw a5,-40(s0) mv a4,a5 lw a5,-52(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L6 lw a5,-44(s0) addiw a5,a5,1 sw a5,-44(s0) .L2: lw a5,-44(s0) mv a4,a5 lw a5,-52(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L7 sw zero,-36(s0) j .L8 .L16: sw zero,-32(s0) j .L9 .L15: sw zero,-28(s0) j .L10 .L14: lla a4,dist lw a5,-36(s0) lw a2,-32(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 lw a5,0(a5) mv a4,a5 li a5,-2147483648 xori a5,a5,-1 beq a4,a5,.L11 lla a4,dist lw a5,-28(s0) lw a2,-36(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 lw a5,0(a5) mv a4,a5 li a5,-2147483648 xori a5,a5,-1 beq a4,a5,.L11 lla a4,dist lw a5,-36(s0) lw a2,-32(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 lw a4,0(a5) lla a3,dist lw a5,-28(s0) lw a1,-36(s0) li a2,100 mul a2,a1,a2 add a5,a2,a5 slli a5,a5,2 add a5,a3,a5 lw a5,0(a5) addw a5,a4,a5 sext.w a5,a5 j .L12 .L11: li a5,-2147483648 xori a5,a5,-1 .L12: sd a5,-24(s0) lla a4,dist lw a5,-28(s0) lw a2,-32(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 lw a5,0(a5) mv a4,a5 ld a5,-24(s0) bge a5,a4,.L13 ld a5,-24(s0) sext.w a4,a5 lla a3,dist lw a5,-28(s0) lw a1,-32(s0) li a2,100 mul a2,a1,a2 add a5,a2,a5 slli a5,a5,2 add a5,a3,a5 sw a4,0(a5) lla a4,pred lw a5,-36(s0) lw a2,-32(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 lw a4,0(a5) lla a3,pred lw a5,-28(s0) lw a1,-32(s0) li a2,100 mul a2,a1,a2 add a5,a2,a5 slli a5,a5,2 add a5,a3,a5 sw a4,0(a5) .L13: lw a5,-28(s0) addiw a5,a5,1 sw a5,-28(s0) .L10: lw a5,-28(s0) mv a4,a5 lw a5,-52(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L14 lw a5,-32(s0) addiw a5,a5,1 sw a5,-32(s0) .L9: lw a5,-32(s0) mv a4,a5 lw a5,-52(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L15 lw a5,-36(s0) addiw a5,a5,1 sw a5,-36(s0) .L8: lw a5,-36(s0) mv a4,a5 lw a5,-52(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L16 nop nop ld s0,56(sp) addi sp,sp,64 jr ra .size floyd_warshall, .-floyd_warshall .section .rodata .align 3 .LC0: .string "%d " .text .align 1 .globl path .type path, @function path: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 mv a5,a0 mv a4,a1 sw a5,-20(s0) mv a5,a4 sw a5,-24(s0) lla a4,pred lw a5,-24(s0) lw a2,-20(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 lw a5,0(a5) mv a4,a5 li a5,-1 beq a4,a5,.L22 lw a5,-20(s0) mv a1,a5 lla a0,.LC0 call printf@plt j .L20 .L21: lla a4,pred lw a5,-24(s0) lw a2,-20(s0) li a3,100 mul a3,a2,a3 add a5,a3,a5 slli a5,a5,2 add a5,a4,a5 lw a5,0(a5) sw a5,-20(s0) lw a5,-20(s0) mv a1,a5 lla a0,.LC0 call printf@plt .L20: lw a5,-20(s0) mv a4,a5 lw a5,-24(s0) sext.w a4,a4 sext.w a5,a5 bne a4,a5,.L21 j .L17 .L22: nop .L17: ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size path, .-path .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "floyd-warshall.c" .option pic .text .align 1 .globl floyd_warshall .type floyd_warshall, @function floyd_warshall: ble a0,zero,.L19 addi sp,sp,-16 sd s0,8(sp) sd s1,0(sp) mv a6,a0 lla t1,adj lla t6,dist lla t5,pred addiw t0,a0,-1 slli t0,t0,32 srli t0,t0,32 li a5,200 mul t0,t0,a5 lla a5,adj+200 add t0,t0,a5 mv t4,t5 mv t3,t6 li t2,0 li a7,-2147483648 xori a7,a7,-1 j .L6 .L19: ret .L4: sw a1,0(a4) sw a2,0(a3) addiw a1,a2,1 addi a5,a5,2 addi a4,a4,4 addi a3,a3,4 beq a6,a1,.L20 mv a2,a1 .L5: lh a0,0(a5) mv a1,a7 beq a0,zero,.L4 sext.w a1,a0 j .L4 .L20: addi t1,t1,200 addi t3,t3,400 addi t4,t4,400 beq t1,t0,.L21 .L6: mv a3,t4 mv a4,t3 mv a5,t1 mv a2,t2 j .L5 .L21: slli a5,a2,32 srli a5,a5,32 slli a4,a5,2 lla s1,pred+4 add s1,s1,a4 lla s0,dist+4 add s0,s0,a4 addi a5,a5,1 slli t2,a5,2 sub t2,a5,t2 slli t2,t2,3 sub t2,t2,a5 slli t2,t2,4 li t4,0 li t0,0 li a1,-2147483648 xori a1,a1,-1 j .L7 .L23: addw a4,a4,a3 sext.w a3,a4 lw t1,0(a5) ble t1,a3,.L8 sw a4,0(a5) lw a4,0(t3) sw a4,0(a2) .L8: addi a5,a5,4 addi a2,a2,4 beq a5,a6,.L22 .L9: lw a4,0(a0) beq a4,a1,.L8 add a3,a5,a7 add a3,a3,t4 lw a3,0(a3) bne a3,a1,.L23 j .L8 .L22: addi a6,a6,400 addi t3,t3,400 addi a0,a0,400 addi a7,a7,-400 beq a7,t2,.L10 .L11: add a5,a0,t0 add a2,t3,t0 j .L9 .L10: addi t5,t5,4 addi t6,t6,4 addi t0,t0,-4 addi t4,t4,400 beq t5,s1,.L1 .L7: mv a0,t6 mv t3,t5 mv a6,s0 li a7,0 j .L11 .L1: ld s0,8(sp) ld s1,0(sp) addi sp,sp,16 jr ra .size floyd_warshall, .-floyd_warshall .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d " .text .align 1 .globl path .type path, @function path: li a5,100 mul a5,a0,a5 add a5,a5,a1 slli a5,a5,2 lla a4,pred add a5,a4,a5 lw a4,0(a5) li a5,-1 beq a4,a5,.L29 addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) sd s4,0(sp) mv s0,a0 mv s1,a1 mv a2,a0 lla a1,.LC0 li a0,1 call __printf_chk@plt beq s0,s1,.L24 lla s4,pred li s3,100 lla s2,.LC0 .L26: mul s0,s0,s3 add s0,s0,s1 slli s0,s0,2 add s0,s4,s0 lw s0,0(s0) mv a2,s0 mv a1,s2 li a0,1 call __printf_chk@plt bne s1,s0,.L26 .L24: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) addi sp,sp,48 jr ra .L29: ret .size path, .-path .globl pred .globl dist .globl adj .bss .align 3 .type pred, @object .size pred, 40000 pred: .zero 40000 .type dist, @object .size dist, 40000 dist: .zero 40000 .type adj, @object .size adj, 20000 adj: .zero 20000 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "floyd-warshall.c" .option pic .text .align 1 .globl floyd_warshall .type floyd_warshall, @function floyd_warshall: ble a0,zero,.L20 addi sp,sp,-16 sd s0,8(sp) addiw s0,a0,-1 slli s0,s0,32 srli s0,s0,32 li t5,200 mul t5,s0,t5 lla t2,dist lla t0,pred li a7,-2147483648 lla a5,adj+200 sd s1,0(sp) mv a6,a0 lla t1,adj sext.w t6,a0 mv t4,t0 mv t3,t2 xori a7,a7,-1 add t5,t5,a5 .L6: mv a2,t4 mv a3,t3 mv a4,t1 li a5,0 .L5: lh a0,0(a4) mv a1,a7 addi a4,a4,2 beq a0,zero,.L4 sext.w a1,a0 .L4: sw a5,0(a2) sw a1,0(a3) addiw a5,a5,1 addi a3,a3,4 addi a2,a2,4 bne a6,a5,.L5 addi t1,t1,200 addi t3,t3,400 addi t4,t4,400 bne t1,t5,.L6 slli a4,t6,32 srli a4,a4,32 slli t6,a4,2 sub t6,a4,t6 slli t6,t6,3 slli a5,s0,2 sub t6,t6,a4 lla s1,pred+4 lla s0,dist+4 li a1,-2147483648 add s1,s1,a5 add s0,s0,a5 slli t6,t6,4 li t5,0 li t3,0 xori a1,a1,-1 .L7: mv a6,t2 mv t4,t0 mv t1,s0 li a0,0 .L11: add a5,a6,t5 add a2,t4,t5 .L9: add a4,a5,a0 add a3,a4,t3 lw a4,0(a6) beq a4,a1,.L8 lw a3,0(a3) addw a7,a4,a3 beq a3,a1,.L8 lw a3,0(a5) ble a3,a7,.L8 lw a3,0(t4) sw a7,0(a5) sw a3,0(a2) .L8: addi a5,a5,4 addi a2,a2,4 bne a5,t1,.L9 addi a0,a0,-400 addi t1,a5,400 addi t4,t4,400 addi a6,a6,400 bne a0,t6,.L11 addi t0,t0,4 addi t3,t3,400 addi t2,t2,4 addi t5,t5,-4 bne t0,s1,.L7 ld s0,8(sp) ld s1,0(sp) addi sp,sp,16 jr ra .L20: ret .size floyd_warshall, .-floyd_warshall .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d " .text .align 1 .globl path .type path, @function path: li a5,100 mul a5,a0,a5 addi sp,sp,-48 sd s2,16(sp) lla s2,pred sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s3,8(sp) sd s4,0(sp) li a4,-1 add a5,a5,a1 slli a5,a5,2 add a5,s2,a5 lw a5,0(a5) beq a5,a4,.L21 mv s0,a0 mv s1,a1 mv a2,a0 lla a1,.LC0 li a0,1 call __printf_chk@plt beq s0,s1,.L21 li s4,100 lla s3,.LC0 .L23: mul s0,s0,s4 mv a1,s3 li a0,1 add s0,s0,s1 slli s0,s0,2 add s0,s2,s0 lw s0,0(s0) mv a2,s0 call __printf_chk@plt bne s1,s0,.L23 .L21: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) addi sp,sp,48 jr ra .size path, .-path .globl pred .globl dist .globl adj .bss .align 3 .type pred, @object .size pred, 40000 pred: .zero 40000 .type dist, @object .size dist, 40000 dist: .zero 40000 .type adj, @object .size adj, 20000 adj: .zero 20000 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "floyd-warshall.c" .option pic .text .align 1 .globl floyd_warshall .type floyd_warshall, @function floyd_warshall: ble a0,zero,.L22 addiw t4,a0,-1 slli t4,t4,32 srli t4,t4,32 li t5,200 mul t5,t4,t5 addi sp,sp,-16 lla t2,dist lla t0,pred li a6,-2147483648 lla a5,adj+200 sd s0,8(sp) sd s1,0(sp) lla a7,adj sext.w t6,a0 mv t3,t0 mv t1,t2 xori a6,a6,-1 add t5,t5,a5 .L8: mv a2,t3 mv a3,t1 mv a4,a7 li a5,0 j .L7 .L24: sw a1,0(a3) addiw a5,a5,1 addi a4,a4,2 addi a3,a3,4 addi a2,a2,4 beq a0,a5,.L23 .L7: lh a1,0(a4) sw a5,0(a2) bne a1,zero,.L24 sw a6,0(a3) addiw a5,a5,1 addi a4,a4,2 addi a3,a3,4 addi a2,a2,4 bne a0,a5,.L7 .L23: addi a7,a7,200 addi t1,t1,400 addi t3,t3,400 bne a7,t5,.L8 slli a5,t6,32 srli a5,a5,32 slli t6,a5,2 sub t6,a5,t6 slli t6,t6,3 slli t4,t4,2 sub t6,t6,a5 lla s1,pred+4 li a1,-2147483648 add s1,s1,t4 add s0,t4,t2 slli t6,t6,4 li t5,0 li t1,0 xori a1,a1,-1 .L9: mv a6,t2 mv t4,t0 mv t3,s0 li a0,0 .L14: add a4,a6,t5 add a5,a4,a0 add a3,a5,t1 lw a5,0(a6) add a2,t4,t5 beq a5,a1,.L10 .L25: lw a3,0(a3) addw a7,a5,a3 beq a3,a1,.L11 lw a3,0(a4) ble a3,a7,.L11 lw a3,0(t4) sw a7,0(a4) sw a3,0(a2) .L11: beq a4,t3,.L10 addi a4,a4,4 add a5,a4,a0 add a3,a5,t1 lw a5,0(a6) addi a2,a2,4 bne a5,a1,.L25 .L10: addi a0,a0,-400 addi t3,t3,400 addi t4,t4,400 addi a6,a6,400 bne a0,t6,.L14 addi t0,t0,4 addi t1,t1,400 addi t2,t2,4 addi t5,t5,-4 bne t0,s1,.L9 ld s0,8(sp) ld s1,0(sp) addi sp,sp,16 jr ra .L22: ret .size floyd_warshall, .-floyd_warshall .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d " .text .align 1 .globl path .type path, @function path: li a5,100 mul a5,a0,a5 addi sp,sp,-48 sd s2,16(sp) lla s2,pred sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s3,8(sp) sd s4,0(sp) li a4,-1 add a5,a5,a1 slli a5,a5,2 add a5,s2,a5 lw a5,0(a5) beq a5,a4,.L26 mv s0,a0 mv s1,a1 mv a2,a0 lla a1,.LC0 li a0,1 call __printf_chk@plt beq s0,s1,.L26 li s4,100 lla s3,.LC0 .L28: mul s0,s0,s4 mv a1,s3 li a0,1 add s0,s0,s1 slli s0,s0,2 add s0,s2,s0 lw s0,0(s0) mv a2,s0 call __printf_chk@plt bne s1,s0,.L28 .L26: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) addi sp,sp,48 jr ra .size path, .-path .globl pred .globl dist .globl adj .bss .align 3 .type pred, @object .size pred, 40000 pred: .zero 40000 .type dist, @object .size dist, 40000 dist: .zero 40000 .type adj, @object .size adj, 20000 adj: .zero 20000 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "floyd-warshall.c" .text .global adj .bss .align 3 .type adj, %object .size adj, 20000 adj: .zero 20000 .global dist .align 3 .type dist, %object .size dist, 40000 dist: .zero 40000 .global pred .align 3 .type pred, %object .size pred, 40000 pred: .zero 40000 .text .align 2 .global floyd_warshall .type floyd_warshall, %function floyd_warshall: .LFB6: .cfi_startproc sub sp, sp, #48 .cfi_def_cfa_offset 48 str w0, [sp, 12] str wzr, [sp, 20] b .L2 .L7: str wzr, [sp, 24] b .L3 .L6: adrp x0, adj add x2, x0, :lo12:adj ldrsw x3, [sp, 24] ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 ldrsh w0, [x2, x0, lsl 1] cmp w0, 0 beq .L4 adrp x0, adj add x2, x0, :lo12:adj ldrsw x3, [sp, 24] ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 ldrsh w0, [x2, x0, lsl 1] mov w4, w0 adrp x0, dist add x2, x0, :lo12:dist ldrsw x3, [sp, 24] ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 str w4, [x2, x0, lsl 2] b .L5 .L4: adrp x0, dist add x2, x0, :lo12:dist ldrsw x3, [sp, 24] ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 mov w1, 2147483647 str w1, [x2, x0, lsl 2] .L5: adrp x0, pred add x2, x0, :lo12:pred ldrsw x3, [sp, 24] ldrsw x1, [sp, 20] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 ldr w1, [sp, 24] str w1, [x2, x0, lsl 2] ldr w0, [sp, 24] add w0, w0, 1 str w0, [sp, 24] .L3: ldr w1, [sp, 24] ldr w0, [sp, 12] cmp w1, w0 blt .L6 ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L2: ldr w1, [sp, 20] ldr w0, [sp, 12] cmp w1, w0 blt .L7 str wzr, [sp, 28] b .L8 .L16: str wzr, [sp, 32] b .L9 .L15: str wzr, [sp, 36] b .L10 .L14: adrp x0, dist add x2, x0, :lo12:dist ldrsw x3, [sp, 28] ldrsw x1, [sp, 32] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 ldr w1, [x2, x0, lsl 2] mov w0, 2147483647 cmp w1, w0 beq .L11 adrp x0, dist add x2, x0, :lo12:dist ldrsw x3, [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, 2 add x0, x0, x3 ldr w1, [x2, x0, lsl 2] mov w0, 2147483647 cmp w1, w0 beq .L11 adrp x0, dist add x2, x0, :lo12:dist ldrsw x3, [sp, 28] ldrsw x1, [sp, 32] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 ldr w2, [x2, x0, lsl 2] adrp x0, dist add x3, x0, :lo12:dist ldrsw x4, [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, 2 add x0, x0, x4 ldr w0, [x3, x0, lsl 2] add w0, w2, w0 sxtw x0, w0 b .L12 .L11: mov x0, 2147483647 .L12: str x0, [sp, 40] adrp x0, dist add x2, x0, :lo12:dist ldrsw x3, [sp, 36] ldrsw x1, [sp, 32] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 ldr w0, [x2, x0, lsl 2] sxtw x0, w0 ldr x1, [sp, 40] cmp x1, x0 bge .L13 ldr x0, [sp, 40] mov w4, w0 adrp x0, dist add x2, x0, :lo12:dist ldrsw x3, [sp, 36] ldrsw x1, [sp, 32] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 str w4, [x2, x0, lsl 2] adrp x0, pred add x2, x0, :lo12:pred ldrsw x3, [sp, 28] ldrsw x1, [sp, 32] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 ldr w3, [x2, x0, lsl 2] adrp x0, pred add x2, x0, :lo12:pred ldrsw x4, [sp, 36] ldrsw x1, [sp, 32] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x4 str w3, [x2, x0, lsl 2] .L13: ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L10: ldr w1, [sp, 36] ldr w0, [sp, 12] cmp w1, w0 blt .L14 ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L9: ldr w1, [sp, 32] ldr w0, [sp, 12] cmp w1, w0 blt .L15 ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] .L8: ldr w1, [sp, 28] ldr w0, [sp, 12] cmp w1, w0 blt .L16 nop nop add sp, sp, 48 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size floyd_warshall, .-floyd_warshall .section .rodata .align 3 .LC0: .string "%d " .text .align 2 .global path .type path, %function path: .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 w1, [sp, 24] adrp x0, pred add x2, x0, :lo12:pred ldrsw x3, [sp, 24] ldrsw x1, [sp, 28] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 ldr w0, [x2, x0, lsl 2] cmn w0, #1 beq .L22 ldr w1, [sp, 28] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf b .L20 .L21: adrp x0, pred add x2, x0, :lo12:pred ldrsw x3, [sp, 24] ldrsw x1, [sp, 28] mov x0, x1 lsl x0, x0, 1 add x0, x0, x1 lsl x0, x0, 3 add x0, x0, x1 lsl x0, x0, 2 add x0, x0, x3 ldr w0, [x2, x0, lsl 2] str w0, [sp, 28] ldr w1, [sp, 28] adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf .L20: ldr w1, [sp, 28] ldr w0, [sp, 24] cmp w1, w0 bne .L21 b .L17 .L22: nop .L17: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size path, .-path .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "floyd-warshall.c" .text .align 2 .global floyd_warshall .type floyd_warshall, %function floyd_warshall: .LFB39: .cfi_startproc mov w8, w0 cmp w0, 0 ble .L1 adrp x12, dist add x12, x12, :lo12:dist adrp x13, pred add x13, x13, :lo12:pred adrp x3, adj add x3, x3, :lo12:adj sub w0, w0, #1 add x6, x0, x0, lsl 1 add x6, x0, x6, lsl 3 add x0, x12, 400 add x6, x0, x6, lsl 4 mov x4, x13 mov x2, x12 mov w5, 2147483647 .L6: mov x0, 0 .L5: ldrsh w1, [x3, x0, lsl 1] cmp w1, 0 csel w1, w1, w5, ne str w1, [x2, x0, lsl 2] str w0, [x4, x0, lsl 2] add x0, x0, 1 cmp w8, w0 bgt .L5 add x2, x2, 400 add x4, x4, 400 add x3, x3, 200 cmp x2, x6 bne .L6 uxtw x0, w8 sub x11, x0, w8, uxtw 2 lsl x11, x11, 3 sub x11, x11, x0 lsl x11, x11, 4 mov x10, 0 mov x5, 0 mov w4, 2147483647 b .L7 .L17: add w0, w0, w3 ldr w3, [x1] cmp w0, w3 bge .L8 str w0, [x1] ldr w0, [x7, x5, lsl 2] str w0, [x7, x2, lsl 2] .L8: add x2, x2, 1 add x1, x1, 4 cmp w8, w2 ble .L16 .L9: ldr w0, [x6, x5, lsl 2] cmp w0, w4 beq .L8 add x3, x1, x9 ldr w3, [x3, x10] cmp w3, w4 bne .L17 b .L8 .L16: add x7, x7, 400 add x6, x6, 400 sub x9, x9, #400 cmp x9, x11 beq .L10 .L11: mov x1, x6 mov x2, 0 b .L9 .L10: add x5, x5, 1 add x10, x10, 400 cmp w8, w5 ble .L1 .L7: mov x6, x12 mov x7, x13 mov x9, 0 b .L11 .L1: ret .cfi_endproc .LFE39: .size floyd_warshall, .-floyd_warshall .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d " .text .align 2 .global path .type path, %function path: .LFB40: .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 w19, w0 mov w20, w1 sxtw x1, w0 add x0, x1, w0, sxtw 1 add x0, x1, x0, lsl 3 lsl x0, x0, 2 add x0, x0, w20, sxtw adrp x1, pred add x1, x1, :lo12:pred ldr w0, [x1, x0, lsl 2] cmn w0, #1 beq .L18 mov w2, w19 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk cmp w19, w20 beq .L18 stp x21, x22, [sp, 32] .cfi_offset 22, -24 .cfi_offset 21, -32 stp x23, x24, [sp, 48] .cfi_offset 24, -8 .cfi_offset 23, -16 adrp x22, pred add x22, x22, :lo12:pred sxtw x23, w20 adrp x21, .LC0 add x21, x21, :lo12:.LC0 mov w24, 1 .L20: sxtw x0, w19 add x19, x0, w19, sxtw 1 add x19, x0, x19, lsl 3 add x19, x23, x19, lsl 2 ldr w19, [x22, x19, lsl 2] mov w2, w19 mov x1, x21 mov w0, w24 bl __printf_chk cmp w20, w19 bne .L20 ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 ldp x23, x24, [sp, 48] .cfi_restore 24 .cfi_restore 23 .L18: 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 .LFE40: .size path, .-path .global pred .global dist .global adj .bss .align 3 .type pred, %object .size pred, 40000 pred: .zero 40000 .type dist, %object .size dist, 40000 dist: .zero 40000 .type adj, %object .size adj, 20000 adj: .zero 20000 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "floyd-warshall.c" .text .align 2 .p2align 4,,11 .global floyd_warshall .type floyd_warshall, %function floyd_warshall: .LFB39: .cfi_startproc mov w9, w0 cmp w0, 0 ble .L1 adrp x12, dist add x12, x12, :lo12:dist add x0, x12, 400 sub w6, w9, #1 mov w1, 400 adrp x13, pred add x13, x13, :lo12:pred adrp x3, adj umaddl x6, w6, w1, x0 mov x2, x12 mov x4, x13 add x3, x3, :lo12:adj mov w5, 2147483647 .p2align 3,,7 .L6: mov x0, 0 .p2align 3,,7 .L5: ldrsh w1, [x3, x0, lsl 1] str w0, [x4, x0, lsl 2] cmp w1, 0 csel w1, w1, w5, ne str w1, [x2, x0, lsl 2] add x0, x0, 1 cmp w9, w0 bgt .L5 add x2, x2, 400 add x4, x4, 400 add x3, x3, 200 cmp x2, x6 bne .L6 uxtw x0, w9 mov x10, 0 sub x11, x0, w9, uxtw 2 mov x5, 0 mov w4, 2147483647 lsl x11, x11, 3 sub x11, x11, x0 lsl x11, x11, 4 .p2align 3,,7 .L7: mov x7, x12 mov x8, x13 mov x6, 0 .p2align 3,,7 .L11: mov x1, x7 mov x2, 0 .p2align 3,,7 .L9: ldr w0, [x7, x5, lsl 2] add x3, x1, x6 cmp w0, w4 beq .L8 ldr w3, [x3, x10] add w0, w0, w3 cmp w3, w4 beq .L8 ldr w3, [x1] cmp w0, w3 bge .L8 ldr w3, [x8, x5, lsl 2] str w3, [x8, x2, lsl 2] str w0, [x1] .L8: add x2, x2, 1 add x1, x1, 4 cmp w9, w2 bgt .L9 sub x6, x6, #400 add x8, x8, 400 add x7, x7, 400 cmp x6, x11 bne .L11 add x5, x5, 1 add x10, x10, 400 cmp w9, w5 bgt .L7 .L1: ret .cfi_endproc .LFE39: .size floyd_warshall, .-floyd_warshall .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d " .text .align 2 .p2align 4,,11 .global path .type path, %function path: .LFB40: .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 sxtw x20, w0 add x0, x20, w20, sxtw 1 stp x23, x24, [sp, 48] .cfi_offset 23, -16 .cfi_offset 24, -8 sxtw x24, w1 add x0, x20, x0, lsl 3 stp x21, x22, [sp, 32] .cfi_offset 21, -32 .cfi_offset 22, -24 adrp x22, pred add x0, x24, x0, lsl 2 add x22, x22, :lo12:pred ldr w0, [x22, x0, lsl 2] cmn w0, #1 beq .L17 adrp x23, .LC0 add x23, x23, :lo12:.LC0 mov x21, x24 mov x1, x23 mov w2, w20 mov w0, 1 bl __printf_chk cmp w20, w24 bne .L19 b .L17 .p2align 2,,3 .L25: sxtw x20, w19 .L19: add x2, x20, x20, lsl 1 mov x1, x23 mov w0, 1 add x2, x20, x2, lsl 3 add x2, x24, x2, lsl 2 ldr w19, [x22, x2, lsl 2] mov w2, w19 bl __printf_chk cmp w21, w19 bne .L25 .L17: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .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 .LFE40: .size path, .-path .global pred .global dist .global adj .bss .align 3 .type pred, %object .size pred, 40000 pred: .zero 40000 .type dist, %object .size dist, 40000 dist: .zero 40000 .type adj, %object .size adj, 20000 adj: .zero 20000 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "floyd-warshall.c" .text .align 2 .p2align 4,,11 .global floyd_warshall .type floyd_warshall, %function floyd_warshall: .LFB39: .cfi_startproc mov w12, w0 cmp w0, 0 ble .L1 adrp x2, .LC6 adrp x6, adj adrp x14, dist add x6, x6, :lo12:adj ldr q4, [x2, #:lo12:.LC6] adrp x2, .LC7 add x14, x14, :lo12:dist adrp x13, pred ldr q3, [x2, #:lo12:.LC7] adrp x2, .LC8 add x13, x13, :lo12:pred mov x11, x6 ldr q6, [x2, #:lo12:.LC8] adrp x2, .LC9 mvni v0.4s, 0x80, lsl 24 mov x1, x14 ldr q5, [x2, #:lo12:.LC9] adrp x2, .LC10 mov x0, x13 sub w9, w12, #1 ldr q16, [x2, #:lo12:.LC10] adrp x2, .LC11 lsr w8, w12, 3 and w16, w12, -8 ldr q7, [x2, #:lo12:.LC11] adrp x2, .LC12 mov w7, 0 mov w10, 2147483647 ldr q18, [x2, #:lo12:.LC12] adrp x2, .LC13 ldr q17, [x2, #:lo12:.LC13] adrp x2, .LC14 ldr q20, [x2, #:lo12:.LC14] adrp x2, .LC15 ldr q19, [x2, #:lo12:.LC15] adrp x2, .LC16 ldr q24, [x2, #:lo12:.LC16] adrp x2, .LC17 ldr q23, [x2, #:lo12:.LC17] adrp x2, .LC18 ldr q22, [x2, #:lo12:.LC18] adrp x2, .LC19 ldr q21, [x2, #:lo12:.LC19] adrp x2, .LC20 ldr q26, [x2, #:lo12:.LC20] adrp x2, .LC21 ldr q25, [x2, #:lo12:.LC21] adrp x2, .LC22 ldr q28, [x2, #:lo12:.LC22] adrp x2, .LC23 ldr q27, [x2, #:lo12:.LC23] .p2align 3,,7 .L15: cmp w9, 6 bls .L23 ldr q2, [x6] stp q4, q3, [x0] cmeq v1.8h, v2.8h, #0 sxtl v30.4s, v2.4h sxtl2 v2.4s, v2.8h not v1.16b, v1.16b sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1] cmp w8, 1 bls .L5 ldr q2, [x6, 16] stp q6, q5, [x0, 32] cmeq v1.8h, v2.8h, #0 sxtl v30.4s, v2.4h sxtl2 v2.4s, v2.8h not v1.16b, v1.16b sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 32] cmp w8, 2 beq .L5 ldr q2, [x6, 32] stp q16, q7, [x0, 64] cmeq v1.8h, v2.8h, #0 sxtl v30.4s, v2.4h sxtl2 v2.4s, v2.8h not v1.16b, v1.16b sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 64] cmp w8, 3 beq .L5 ldr q2, [x6, 48] stp q18, q17, [x0, 96] cmeq v1.8h, v2.8h, #0 sxtl v30.4s, v2.4h sxtl2 v2.4s, v2.8h not v1.16b, v1.16b sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 96] cmp w8, 4 beq .L5 ldr q2, [x6, 64] stp q20, q19, [x0, 128] cmeq v1.8h, v2.8h, #0 sxtl v30.4s, v2.4h sxtl2 v2.4s, v2.8h not v1.16b, v1.16b sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 128] cmp w8, 5 beq .L5 ldr q2, [x6, 80] stp q24, q23, [x0, 160] cmeq v1.8h, v2.8h, #0 sxtl v30.4s, v2.4h sxtl2 v2.4s, v2.8h not v1.16b, v1.16b sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 160] cmp w8, 6 beq .L5 ldr q2, [x6, 96] stp q22, q21, [x0, 192] cmeq v1.8h, v2.8h, #0 sxtl v30.4s, v2.4h sxtl2 v2.4s, v2.8h not v1.16b, v1.16b sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 192] cmp w8, 7 beq .L5 ldr q2, [x6, 112] stp q26, q25, [x0, 224] cmeq v1.8h, v2.8h, #0 sxtl v30.4s, v2.4h sxtl2 v2.4s, v2.8h not v1.16b, v1.16b sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 224] cmp w8, 8 beq .L5 ldr q2, [x6, 128] stp q28, q27, [x0, 256] cmeq v1.8h, v2.8h, #0 sxtl v30.4s, v2.4h sxtl2 v2.4s, v2.8h not v1.16b, v1.16b sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 256] cmp w8, 9 beq .L5 ldr q2, [x6, 144] adrp x2, .LC0 ldr q29, [x2, #:lo12:.LC0] adrp x2, .LC1 cmeq v1.8h, v2.8h, #0 ldr q31, [x2, #:lo12:.LC1] sxtl v30.4s, v2.4h not v1.16b, v1.16b sxtl2 v2.4s, v2.8h stp q29, q31, [x0, 288] sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 288] cmp w8, 10 beq .L5 ldr q2, [x6, 160] adrp x2, .LC2 ldr q29, [x2, #:lo12:.LC2] adrp x2, .LC3 cmeq v1.8h, v2.8h, #0 ldr q31, [x2, #:lo12:.LC3] sxtl v30.4s, v2.4h not v1.16b, v1.16b sxtl2 v2.4s, v2.8h stp q29, q31, [x0, 320] sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 320] cmp w8, 11 beq .L5 ldr q2, [x6, 176] adrp x2, .LC4 ldr q29, [x2, #:lo12:.LC4] adrp x2, .LC5 cmeq v1.8h, v2.8h, #0 ldr q31, [x2, #:lo12:.LC5] sxtl v30.4s, v2.4h not v1.16b, v1.16b sxtl2 v2.4s, v2.8h stp q29, q31, [x0, 352] sxtl v29.4s, v1.4h sxtl2 v1.4s, v1.8h bsl v29.16b, v30.16b, v0.16b bsl v1.16b, v2.16b, v0.16b stp q29, q1, [x1, 352] .p2align 3,,7 .L5: cmp w12, w16 beq .L6 mov w3, w16 .L4: sxtw x2, w7 add w15, w3, 1 add x4, x2, w7, sxtw 1 add x2, x2, x4, lsl 3 lsl x2, x2, 2 add x5, x2, w3, sxtw ldrsh w4, [x11, x5, lsl 1] str w3, [x13, x5, lsl 2] cmp w4, 0 csel w4, w4, w10, ne str w4, [x14, x5, lsl 2] cmp w12, w15 ble .L6 add x5, x2, w15, sxtw add w17, w3, 2 ldrsh w4, [x11, x5, lsl 1] str w15, [x13, x5, lsl 2] cmp w4, 0 csel w4, w4, w10, ne str w4, [x14, x5, lsl 2] cmp w17, w12 bge .L6 add x5, x2, w17, sxtw add w15, w3, 3 ldrsh w4, [x11, x5, lsl 1] str w17, [x13, x5, lsl 2] cmp w4, 0 csel w4, w4, w10, ne str w4, [x14, x5, lsl 2] cmp w12, w15 ble .L6 add x5, x2, w15, sxtw add w17, w3, 4 ldrsh w4, [x11, x5, lsl 1] str w15, [x13, x5, lsl 2] cmp w4, 0 csel w4, w4, w10, ne str w4, [x14, x5, lsl 2] cmp w12, w17 ble .L6 add x5, x2, w17, sxtw add w15, w3, 5 ldrsh w4, [x11, x5, lsl 1] str w17, [x13, x5, lsl 2] cmp w4, 0 csel w4, w4, w10, ne str w4, [x14, x5, lsl 2] cmp w12, w15 ble .L6 add x5, x2, w15, sxtw add w3, w3, 6 ldrsh w4, [x11, x5, lsl 1] str w15, [x13, x5, lsl 2] cmp w4, 0 csel w4, w4, w10, ne str w4, [x14, x5, lsl 2] cmp w12, w3 ble .L6 add x2, x2, w3, sxtw ldrsh w4, [x11, x2, lsl 1] str w3, [x13, x2, lsl 2] cmp w4, 0 csel w4, w4, w10, ne str w4, [x14, x2, lsl 2] .L6: add w7, w7, 1 add x6, x6, 200 add x1, x1, 400 add x0, x0, 400 cmp w7, w12 bne .L15 uxtw x0, w12 mov x10, 0 sub x11, x0, w12, uxtw 2 mov x5, 0 mov w4, 2147483647 lsl x11, x11, 3 sub x11, x11, x0 lsl x11, x11, 4 .p2align 3,,7 .L16: mov x7, x14 mov x8, x13 mov x6, 0 .p2align 3,,7 .L21: ldr w0, [x7, x5, lsl 2] mov x1, x7 add x3, x1, x6 mov x2, 0 cmp w0, w4 beq .L17 .p2align 3,,7 .L62: ldr w3, [x3, x10] add w0, w0, w3 cmp w3, w4 beq .L18 ldr w3, [x1] cmp w0, w3 bge .L18 ldr w3, [x8, x5, lsl 2] str w3, [x8, x2, lsl 2] str w0, [x1] .L18: cmp x2, x9 beq .L17 ldr w0, [x7, x5, lsl 2] add x1, x1, 4 add x2, x2, 1 add x3, x1, x6 cmp w0, w4 bne .L62 .L17: sub x6, x6, #400 add x8, x8, 400 add x7, x7, 400 cmp x6, x11 bne .L21 add x5, x5, 1 add x10, x10, 400 cmp w12, w5 bgt .L16 .L1: ret .L23: mov w3, 0 b .L4 .cfi_endproc .LFE39: .size floyd_warshall, .-floyd_warshall .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC24: .string "%d " .text .align 2 .p2align 4,,11 .global path .type path, %function path: .LFB40: .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 sxtw x20, w0 add x0, x20, w20, sxtw 1 stp x23, x24, [sp, 48] .cfi_offset 23, -16 .cfi_offset 24, -8 sxtw x24, w1 add x0, x20, x0, lsl 3 stp x21, x22, [sp, 32] .cfi_offset 21, -32 .cfi_offset 22, -24 adrp x22, pred add x0, x24, x0, lsl 2 add x22, x22, :lo12:pred ldr w0, [x22, x0, lsl 2] cmn w0, #1 beq .L63 adrp x23, .LC24 add x23, x23, :lo12:.LC24 mov x21, x24 mov x1, x23 mov w2, w20 mov w0, 1 bl __printf_chk cmp w20, w24 bne .L65 b .L63 .p2align 2,,3 .L71: sxtw x20, w19 .L65: add x2, x20, x20, lsl 1 mov x1, x23 mov w0, 1 add x2, x20, x2, lsl 3 add x2, x24, x2, lsl 2 ldr w19, [x22, x2, lsl 2] mov w2, w19 bl __printf_chk cmp w21, w19 bne .L71 .L63: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .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 .LFE40: .size path, .-path .global pred .global dist .global adj .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC0: .word 72 .word 73 .word 74 .word 75 .align 4 .LC1: .word 76 .word 77 .word 78 .word 79 .align 4 .LC2: .word 80 .word 81 .word 82 .word 83 .align 4 .LC3: .word 84 .word 85 .word 86 .word 87 .align 4 .LC4: .word 88 .word 89 .word 90 .word 91 .align 4 .LC5: .word 92 .word 93 .word 94 .word 95 .align 4 .LC6: .word 0 .word 1 .word 2 .word 3 .align 4 .LC7: .word 4 .word 5 .word 6 .word 7 .align 4 .LC8: .word 8 .word 9 .word 10 .word 11 .align 4 .LC9: .word 12 .word 13 .word 14 .word 15 .align 4 .LC10: .word 16 .word 17 .word 18 .word 19 .align 4 .LC11: .word 20 .word 21 .word 22 .word 23 .align 4 .LC12: .word 24 .word 25 .word 26 .word 27 .align 4 .LC13: .word 28 .word 29 .word 30 .word 31 .align 4 .LC14: .word 32 .word 33 .word 34 .word 35 .align 4 .LC15: .word 36 .word 37 .word 38 .word 39 .align 4 .LC16: .word 40 .word 41 .word 42 .word 43 .align 4 .LC17: .word 44 .word 45 .word 46 .word 47 .align 4 .LC18: .word 48 .word 49 .word 50 .word 51 .align 4 .LC19: .word 52 .word 53 .word 54 .word 55 .align 4 .LC20: .word 56 .word 57 .word 58 .word 59 .align 4 .LC21: .word 60 .word 61 .word 62 .word 63 .align 4 .LC22: .word 64 .word 65 .word 66 .word 67 .align 4 .LC23: .word 68 .word 69 .word 70 .word 71 .bss .align 4 .type pred, %object .size pred, 40000 pred: .zero 40000 .type dist, %object .size dist, 40000 dist: .zero 40000 .type adj, %object .size adj, 20000 adj: .zero 20000 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
100_standard_init8_false-unreach-call_ground.c
extern void __VERIFIER_error() __attribute__ ((__noreturn__)); void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: __VERIFIER_error(); } } #define N 100 int main ( ) { int a [N]; int i = 0; while ( i < N ) { a[i] = 42; i = i + 1; } i = 0; while ( i < N ) { a[i] = 43; i = i + 1; } i = 0; while ( i < N ) { a[i] = 44; i = i + 1; } i = 0; while ( i < N ) { a[i] = 45; i = i + 1; } i = 0; while ( i < N ) { a[i] = 46; i = i + 1; } i = 0; while ( i < N ) { a[i] = 47; i = i + 1; } i = 0; while ( i < N ) { a[i] = 48; i = i + 1; } i = 0; while ( i < N ) { a[i] = 49; i = i + 1; } int x; for ( x = 0 ; x < N ; x++ ) { __VERIFIER_assert( a[x] == 48 ); } return 0; }
.file "100_standard_init8_false-unreach-call_ground.c" .option pic .text .align 1 .globl __VERIFIER_assert .type __VERIFIER_assert, @function __VERIFIER_assert: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 mv a5,a0 sw a5,-20(s0) lw a5,-20(s0) sext.w a5,a5 bne a5,zero,.L4 nop .L3: call __VERIFIER_error@plt .L4: nop ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size __VERIFIER_assert, .-__VERIFIER_assert .align 1 .globl main .type main, @function main: addi sp,sp,-432 sd ra,424(sp) sd s0,416(sp) addi s0,sp,432 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 sw zero,-432(s0) j .L6 .L7: lw a5,-432(s0) slli a5,a5,2 addi a5,a5,-16 add a5,a5,s0 li a4,42 sw a4,-408(a5) lw a5,-432(s0) addiw a5,a5,1 sw a5,-432(s0) .L6: lw a5,-432(s0) sext.w a4,a5 li a5,99 ble a4,a5,.L7 sw zero,-432(s0) j .L8 .L9: lw a5,-432(s0) slli a5,a5,2 addi a5,a5,-16 add a5,a5,s0 li a4,43 sw a4,-408(a5) lw a5,-432(s0) addiw a5,a5,1 sw a5,-432(s0) .L8: lw a5,-432(s0) sext.w a4,a5 li a5,99 ble a4,a5,.L9 sw zero,-432(s0) j .L10 .L11: lw a5,-432(s0) slli a5,a5,2 addi a5,a5,-16 add a5,a5,s0 li a4,44 sw a4,-408(a5) lw a5,-432(s0) addiw a5,a5,1 sw a5,-432(s0) .L10: lw a5,-432(s0) sext.w a4,a5 li a5,99 ble a4,a5,.L11 sw zero,-432(s0) j .L12 .L13: lw a5,-432(s0) slli a5,a5,2 addi a5,a5,-16 add a5,a5,s0 li a4,45 sw a4,-408(a5) lw a5,-432(s0) addiw a5,a5,1 sw a5,-432(s0) .L12: lw a5,-432(s0) sext.w a4,a5 li a5,99 ble a4,a5,.L13 sw zero,-432(s0) j .L14 .L15: lw a5,-432(s0) slli a5,a5,2 addi a5,a5,-16 add a5,a5,s0 li a4,46 sw a4,-408(a5) lw a5,-432(s0) addiw a5,a5,1 sw a5,-432(s0) .L14: lw a5,-432(s0) sext.w a4,a5 li a5,99 ble a4,a5,.L15 sw zero,-432(s0) j .L16 .L17: lw a5,-432(s0) slli a5,a5,2 addi a5,a5,-16 add a5,a5,s0 li a4,47 sw a4,-408(a5) lw a5,-432(s0) addiw a5,a5,1 sw a5,-432(s0) .L16: lw a5,-432(s0) sext.w a4,a5 li a5,99 ble a4,a5,.L17 sw zero,-432(s0) j .L18 .L19: lw a5,-432(s0) slli a5,a5,2 addi a5,a5,-16 add a5,a5,s0 li a4,48 sw a4,-408(a5) lw a5,-432(s0) addiw a5,a5,1 sw a5,-432(s0) .L18: lw a5,-432(s0) sext.w a4,a5 li a5,99 ble a4,a5,.L19 sw zero,-432(s0) j .L20 .L21: lw a5,-432(s0) slli a5,a5,2 addi a5,a5,-16 add a5,a5,s0 li a4,49 sw a4,-408(a5) lw a5,-432(s0) addiw a5,a5,1 sw a5,-432(s0) .L20: lw a5,-432(s0) sext.w a4,a5 li a5,99 ble a4,a5,.L21 sw zero,-428(s0) j .L22 .L23: lw a5,-428(s0) slli a5,a5,2 addi a5,a5,-16 add a5,a5,s0 lw a5,-408(a5) mv a4,a5 li a5,48 sub a5,a4,a5 seqz a5,a5 andi a5,a5,0xff sext.w a5,a5 mv a0,a5 call __VERIFIER_assert lw a5,-428(s0) addiw a5,a5,1 sw a5,-428(s0) .L22: lw a5,-428(s0) sext.w a4,a5 li a5,99 ble a4,a5,.L23 li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L25 call __stack_chk_fail@plt .L25: mv a0,a4 ld ra,424(sp) ld s0,416(sp) addi sp,sp,432 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "100_standard_init8_false-unreach-call_ground.c" .option pic .text .align 1 .globl __VERIFIER_assert .type __VERIFIER_assert, @function __VERIFIER_assert: beq a0,zero,.L7 ret .L7: addi sp,sp,-16 sd ra,8(sp) .L3: call __VERIFIER_error@plt .size __VERIFIER_assert, .-__VERIFIER_assert .align 1 .globl main .type main, @function main: addi sp,sp,-448 sd ra,440(sp) sd s0,432(sp) sd s1,424(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 408(sp) li a4, 0 addi s1,sp,8 addi s0,sp,408 mv a5,s1 li a4,42 .L9: sw a4,0(a5) addi a5,a5,4 bne a5,s0,.L9 mv a5,s1 li a4,43 .L10: sw a4,0(a5) addi a5,a5,4 bne a5,s0,.L10 mv a5,s1 li a4,44 .L11: sw a4,0(a5) addi a5,a5,4 bne a5,s0,.L11 mv a5,s1 li a4,45 .L12: sw a4,0(a5) addi a5,a5,4 bne a5,s0,.L12 mv a5,s1 li a4,46 .L13: sw a4,0(a5) addi a5,a5,4 bne a5,s0,.L13 mv a5,s1 li a4,47 .L14: sw a4,0(a5) addi a5,a5,4 bne a5,s0,.L14 mv a5,s1 li a4,48 .L15: sw a4,0(a5) addi a5,a5,4 bne a5,s0,.L15 mv a5,s1 li a4,49 .L16: sw a4,0(a5) addi a5,a5,4 bne a5,s0,.L16 .L17: lw a0,0(s1) addi a0,a0,-48 seqz a0,a0 call __VERIFIER_assert addi s1,s1,4 bne s1,s0,.L17 la a5,__stack_chk_guard ld a4, 408(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L29 li a0,0 ld ra,440(sp) ld s0,432(sp) ld s1,424(sp) addi sp,sp,448 jr ra .L29: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "100_standard_init8_false-unreach-call_ground.c" .option pic .text .align 1 .globl __VERIFIER_assert .type __VERIFIER_assert, @function __VERIFIER_assert: beq a0,zero,.L8 ret .L8: .L3: addi sp,sp,-16 sd ra,8(sp) call __VERIFIER_error@plt .size __VERIFIER_assert, .-__VERIFIER_assert .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-432 la a1,__stack_chk_guard addi a3,sp,8 ld a5, 0(a1) sd a5, 408(sp) li a5, 0 sd ra,424(sp) addi a5,sp,408 mv a4,a3 li a2,42 .L10: sw a2,0(a4) addi a4,a4,4 bne a4,a5,.L10 mv a4,a3 li a2,43 .L11: sw a2,0(a4) addi a4,a4,4 bne a4,a5,.L11 mv a4,a3 li a2,44 .L12: sw a2,0(a4) addi a4,a4,4 bne a4,a5,.L12 mv a4,a3 li a2,45 .L13: sw a2,0(a4) addi a4,a4,4 bne a4,a5,.L13 mv a4,a3 li a2,46 .L14: sw a2,0(a4) addi a4,a4,4 bne a4,a5,.L14 mv a4,a3 li a2,47 .L15: sw a2,0(a4) addi a4,a4,4 bne a4,a5,.L15 mv a4,a3 li a2,48 .L16: sw a2,0(a4) addi a4,a4,4 bne a4,a5,.L16 mv a4,a3 li a2,49 .L17: sw a2,0(a4) addi a4,a4,4 bne a4,a5,.L17 li a2,48 .L20: lw a4,0(a3) bne a4,a2,.L32 addi a3,a3,4 bne a3,a5,.L20 ld a4, 408(sp) ld a5, 0(a1) xor a5, a4, a5 li a4, 0 bne a5,zero,.L33 ld ra,424(sp) li a0,0 addi sp,sp,432 jr ra .L32: .L19: call __VERIFIER_error@plt .L33: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "100_standard_init8_false-unreach-call_ground.c" .option pic .text .align 1 .globl __VERIFIER_assert .type __VERIFIER_assert, @function __VERIFIER_assert: beq a0,zero,.L8 ret .L8: .L3: addi sp,sp,-16 sd ra,8(sp) call __VERIFIER_error@plt .size __VERIFIER_assert, .-__VERIFIER_assert .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-432 la a1,__stack_chk_guard li a2,42 addi a4,sp,8 ld a5, 0(a1) sd a5, 408(sp) li a5, 0 slli a2,a2,32 sd ra,424(sp) addi a5,sp,408 mv a3,a4 addi a2,a2,42 .L10: sd a2,0(a3) addi a3,a3,8 bne a3,a5,.L10 li a2,43 slli a2,a2,32 mv a3,a4 addi a2,a2,43 .L11: sd a2,0(a3) addi a3,a3,8 bne a3,a5,.L11 li a2,44 slli a2,a2,32 mv a3,a4 addi a2,a2,44 .L12: sd a2,0(a3) addi a3,a3,8 bne a3,a5,.L12 li a2,45 slli a2,a2,32 mv a3,a4 addi a2,a2,45 .L13: sd a2,0(a3) addi a3,a3,8 bne a3,a5,.L13 li a2,46 slli a2,a2,32 mv a3,a4 addi a2,a2,46 .L14: sd a2,0(a3) addi a3,a3,8 bne a3,a5,.L14 li a2,47 slli a2,a2,32 mv a3,a4 addi a2,a2,47 .L15: sd a2,0(a3) addi a3,a3,8 bne a3,a5,.L15 li a2,48 slli a2,a2,32 mv a3,a4 addi a2,a2,48 .L16: sd a2,0(a3) addi a3,a3,8 bne a3,a5,.L16 li a2,49 slli a2,a2,32 mv a3,a4 addi a2,a2,49 .L17: sd a2,0(a3) addi a3,a3,8 bne a3,a5,.L17 li a2,48 .L20: lw a3,0(a4) bne a3,a2,.L32 addi a4,a4,4 bne a4,a5,.L20 ld a4, 408(sp) ld a5, 0(a1) xor a5, a4, a5 li a4, 0 bne a5,zero,.L33 ld ra,424(sp) li a0,0 addi sp,sp,432 jr ra .L32: .L19: call __VERIFIER_error@plt .L33: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "100_standard_init8_false-unreach-call_ground.c" .text .align 2 .global __VERIFIER_assert .type __VERIFIER_assert, %function __VERIFIER_assert: .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] ldr w0, [sp, 28] cmp w0, 0 bne .L4 nop .L3: bl __VERIFIER_error .L4: nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .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, -432]! .cfi_def_cfa_offset 432 .cfi_offset 29, -432 .cfi_offset 30, -424 mov x29, sp adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 424] mov x1, 0 str wzr, [sp, 16] b .L6 .L7: ldrsw x0, [sp, 16] lsl x0, x0, 2 add x1, sp, 24 mov w2, 42 str w2, [x1, x0] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L6: ldr w0, [sp, 16] cmp w0, 99 ble .L7 str wzr, [sp, 16] b .L8 .L9: ldrsw x0, [sp, 16] lsl x0, x0, 2 add x1, sp, 24 mov w2, 43 str w2, [x1, x0] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L8: ldr w0, [sp, 16] cmp w0, 99 ble .L9 str wzr, [sp, 16] b .L10 .L11: ldrsw x0, [sp, 16] lsl x0, x0, 2 add x1, sp, 24 mov w2, 44 str w2, [x1, x0] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L10: ldr w0, [sp, 16] cmp w0, 99 ble .L11 str wzr, [sp, 16] b .L12 .L13: ldrsw x0, [sp, 16] lsl x0, x0, 2 add x1, sp, 24 mov w2, 45 str w2, [x1, x0] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L12: ldr w0, [sp, 16] cmp w0, 99 ble .L13 str wzr, [sp, 16] b .L14 .L15: ldrsw x0, [sp, 16] lsl x0, x0, 2 add x1, sp, 24 mov w2, 46 str w2, [x1, x0] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L14: ldr w0, [sp, 16] cmp w0, 99 ble .L15 str wzr, [sp, 16] b .L16 .L17: ldrsw x0, [sp, 16] lsl x0, x0, 2 add x1, sp, 24 mov w2, 47 str w2, [x1, x0] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L16: ldr w0, [sp, 16] cmp w0, 99 ble .L17 str wzr, [sp, 16] b .L18 .L19: ldrsw x0, [sp, 16] lsl x0, x0, 2 add x1, sp, 24 mov w2, 48 str w2, [x1, x0] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L18: ldr w0, [sp, 16] cmp w0, 99 ble .L19 str wzr, [sp, 16] b .L20 .L21: ldrsw x0, [sp, 16] lsl x0, x0, 2 add x1, sp, 24 mov w2, 49 str w2, [x1, x0] ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L20: ldr w0, [sp, 16] cmp w0, 99 ble .L21 str wzr, [sp, 20] b .L22 .L23: ldrsw x0, [sp, 20] lsl x0, x0, 2 add x1, sp, 24 ldr w0, [x1, x0] cmp w0, 48 cset w0, eq and w0, w0, 255 bl __VERIFIER_assert ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L22: ldr w0, [sp, 20] cmp w0, 99 ble .L23 mov w0, 0 mov w1, w0 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x3, [sp, 424] ldr x2, [x0] subs x3, x3, x2 mov x2, 0 beq .L25 bl __stack_chk_fail .L25: mov w0, w1 ldp x29, x30, [sp], 432 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "100_standard_init8_false-unreach-call_ground.c" .text .align 2 .global __VERIFIER_assert .type __VERIFIER_assert, %function __VERIFIER_assert: .LFB0: .cfi_startproc cbz w0, .L7 ret .L7: stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp .L3: bl __VERIFIER_error .cfi_endproc .LFE0: .size __VERIFIER_assert, .-__VERIFIER_assert .align 2 .global main .type main, %function main: .LFB1: .cfi_startproc stp x29, x30, [sp, -448]! .cfi_def_cfa_offset 448 .cfi_offset 29, -448 .cfi_offset 30, -440 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -432 .cfi_offset 20, -424 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 440] mov x1, 0 add x20, sp, 40 add x19, sp, 440 mov x0, x20 mov w1, 42 .L9: str w1, [x0], 4 cmp x0, x19 bne .L9 mov x0, x20 mov w1, 43 .L10: str w1, [x0], 4 cmp x0, x19 bne .L10 mov x0, x20 mov w1, 44 .L11: str w1, [x0], 4 cmp x0, x19 bne .L11 mov x0, x20 mov w1, 45 .L12: str w1, [x0], 4 cmp x0, x19 bne .L12 mov x0, x20 mov w1, 46 .L13: str w1, [x0], 4 cmp x0, x19 bne .L13 mov x0, x20 mov w1, 47 .L14: str w1, [x0], 4 cmp x0, x19 bne .L14 mov x0, x20 mov w1, 48 .L15: str w1, [x0], 4 cmp x0, x19 bne .L15 mov x0, x20 mov w1, 49 .L16: str w1, [x0], 4 cmp x0, x19 bne .L16 .L17: ldr w0, [x20], 4 cmp w0, 48 cset w0, eq bl __VERIFIER_assert cmp x20, x19 bne .L17 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 bne .L29 mov w0, 0 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 448 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L29: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE1: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "100_standard_init8_false-unreach-call_ground.c" .text .align 2 .p2align 4,,11 .global __VERIFIER_assert .type __VERIFIER_assert, %function __VERIFIER_assert: .LFB0: .cfi_startproc cbz w0, .L8 ret .L8: .L3: stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp bl __VERIFIER_error .cfi_endproc .LFE0: .size __VERIFIER_assert, .-__VERIFIER_assert .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB1: .cfi_startproc stp x29, x30, [sp, -432]! .cfi_def_cfa_offset 432 .cfi_offset 29, -432 .cfi_offset 30, -424 adrp x4, :got:__stack_chk_guard mov w3, 42 mov x29, sp ldr x4, [x4, #:got_lo12:__stack_chk_guard] add x1, sp, 24 mov x2, x1 add x0, sp, 424 ldr x5, [x4] str x5, [sp, 424] mov x5, 0 .p2align 3,,7 .L10: str w3, [x2], 4 cmp x2, x0 bne .L10 mov x2, x1 mov w3, 43 .p2align 3,,7 .L11: str w3, [x2], 4 cmp x2, x0 bne .L11 mov x2, x1 mov w3, 44 .p2align 3,,7 .L12: str w3, [x2], 4 cmp x2, x0 bne .L12 mov x2, x1 mov w3, 45 .p2align 3,,7 .L13: str w3, [x2], 4 cmp x2, x0 bne .L13 mov x2, x1 mov w3, 46 .p2align 3,,7 .L14: str w3, [x2], 4 cmp x2, x0 bne .L14 mov x2, x1 mov w3, 47 .p2align 3,,7 .L15: str w3, [x2], 4 cmp x2, x0 bne .L15 mov x2, x1 mov w3, 48 .p2align 3,,7 .L16: str w3, [x2], 4 cmp x2, x0 bne .L16 mov x2, x1 mov w3, 49 .p2align 3,,7 .L17: str w3, [x2], 4 cmp x2, x0 bne .L17 .p2align 3,,7 .L20: ldr w2, [x1] cmp w2, 48 bne .L32 add x1, x1, 4 cmp x1, x0 bne .L20 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 424] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L33 mov w0, 0 ldp x29, x30, [sp], 432 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L32: .cfi_restore_state .L19: bl __VERIFIER_error .L33: bl __stack_chk_fail .cfi_endproc .LFE1: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "100_standard_init8_false-unreach-call_ground.c" .text .align 2 .p2align 4,,11 .global __VERIFIER_assert .type __VERIFIER_assert, %function __VERIFIER_assert: .LFB0: .cfi_startproc cbz w0, .L8 ret .L8: .L3: stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp bl __VERIFIER_error .cfi_endproc .LFE0: .size __VERIFIER_assert, .-__VERIFIER_assert .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB1: .cfi_startproc stp x29, x30, [sp, -432]! .cfi_def_cfa_offset 432 .cfi_offset 29, -432 .cfi_offset 30, -424 adrp x3, :got:__stack_chk_guard mov x29, sp ldr x3, [x3, #:got_lo12:__stack_chk_guard] add x0, sp, 16 movi v0.4s, 0x2a mov x2, x0 add x1, sp, 416 ldr x4, [x3] str x4, [sp, 424] mov x4, 0 .p2align 3,,7 .L10: str q0, [x2], 16 cmp x2, x1 bne .L10 movi v0.4s, 0x2b mov x2, x0 .p2align 3,,7 .L11: str q0, [x2], 16 cmp x2, x1 bne .L11 movi v0.4s, 0x2c mov x2, x0 .p2align 3,,7 .L12: str q0, [x2], 16 cmp x2, x1 bne .L12 movi v0.4s, 0x2d mov x2, x0 .p2align 3,,7 .L13: str q0, [x2], 16 cmp x2, x1 bne .L13 movi v0.4s, 0x2e mov x2, x0 .p2align 3,,7 .L14: str q0, [x2], 16 cmp x2, x1 bne .L14 movi v0.4s, 0x2f mov x2, x0 .p2align 3,,7 .L15: str q0, [x2], 16 cmp x2, x1 bne .L15 movi v0.4s, 0x30 mov x2, x0 .p2align 3,,7 .L16: str q0, [x2], 16 cmp x2, x1 bne .L16 movi v0.4s, 0x31 mov x2, x0 .p2align 3,,7 .L17: str q0, [x2], 16 cmp x2, x1 bne .L17 .p2align 3,,7 .L20: ldr w2, [x0] cmp w2, 48 bne .L32 add x0, x0, 4 cmp x0, x1 bne .L20 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 424] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L33 mov w0, 0 ldp x29, x30, [sp], 432 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L32: .cfi_restore_state .L19: bl __VERIFIER_error .L33: bl __stack_chk_fail .cfi_endproc .LFE1: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
01_recursion-in-c-English.c
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> //Complete the following function. int find_nth_term(int n, int a, int b, int c) { switch(n) { case 1: return a; case 2: return b; case 3: return c; default: return find_nth_term(n - 1, a, b, c); } } int main() { int n, a, b, c; scanf("%d %d %d %d", &n, &a, &b, &c); int ans = find_nth_term(n, a, b, c); printf("%d", ans); return 0; }
.file "01_recursion-in-c-English.c" .option pic .text .align 1 .globl find_nth_term .type find_nth_term, @function find_nth_term: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 mv a5,a0 mv a4,a3 sw a5,-20(s0) mv a5,a1 sw a5,-24(s0) mv a5,a2 sw a5,-28(s0) mv a5,a4 sw a5,-32(s0) lw a5,-20(s0) sext.w a4,a5 li a5,3 beq a4,a5,.L2 lw a5,-20(s0) sext.w a4,a5 li a5,3 bgt a4,a5,.L3 lw a5,-20(s0) sext.w a4,a5 li a5,1 beq a4,a5,.L4 lw a5,-20(s0) sext.w a4,a5 li a5,2 beq a4,a5,.L5 j .L3 .L4: lw a5,-24(s0) j .L6 .L5: lw a5,-28(s0) j .L6 .L2: lw a5,-32(s0) j .L6 .L3: lw a5,-20(s0) addiw a5,a5,-1 sext.w a5,a5 lw a3,-32(s0) lw a2,-28(s0) lw a4,-24(s0) mv a1,a4 mv a0,a5 call find_nth_term mv a5,a0 .L6: mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size find_nth_term, .-find_nth_term .section .rodata .align 3 .LC0: .string "%d %d %d %d" .align 3 .LC1: .string "%d" .text .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 addi a4,s0,-32 addi a3,s0,-36 addi a2,s0,-40 addi a5,s0,-44 mv a1,a5 lla a0,.LC0 call __isoc99_scanf@plt lw a5,-44(s0) lw a4,-40(s0) lw a2,-36(s0) lw a3,-32(s0) mv a1,a4 mv a0,a5 call find_nth_term mv a5,a0 sw a5,-28(s0) lw a5,-28(s0) mv a1,a5 lla a0,.LC1 call printf@plt li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L9 call __stack_chk_fail@plt .L9: mv a0,a4 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "01_recursion-in-c-English.c" .option pic .text .align 1 .globl find_nth_term .type find_nth_term, @function find_nth_term: li a4,2 beq a0,a4,.L3 mv a5,a0 li a4,3 mv a0,a3 beq a5,a4,.L7 li a4,1 mv a0,a1 beq a5,a4,.L7 addi sp,sp,-16 sd ra,8(sp) addiw a0,a5,-1 call find_nth_term ld ra,8(sp) addi sp,sp,16 jr ra .L3: mv a0,a2 ret .L7: ret .size find_nth_term, .-find_nth_term .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d %d %d %d" .align 3 .LC1: .string "%d" .text .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) la s0,__stack_chk_guard ld a5, 0(s0) sd a5, 24(sp) li a5, 0 addi a4,sp,20 addi a3,sp,16 addi a2,sp,12 addi a1,sp,8 lla a0,.LC0 call __isoc99_scanf@plt lw a3,20(sp) lw a2,16(sp) lw a1,12(sp) lw a0,8(sp) call find_nth_term mv a2,a0 lla a1,.LC1 li a0,1 call __printf_chk@plt ld a4, 24(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L13 li a0,0 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .L13: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "01_recursion-in-c-English.c" .option pic .text .align 1 .globl find_nth_term .type find_nth_term, @function find_nth_term: li a6,2 li a4,3 li a5,1 beq a0,a6,.L4 .L8: beq a0,a4,.L5 beq a0,a5,.L6 addiw a0,a0,-1 bne a0,a6,.L8 .L4: mv a0,a2 ret .L5: mv a0,a3 ret .L6: mv a0,a1 ret .size find_nth_term, .-find_nth_term .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d %d %d %d" .align 3 .LC1: .string "%d" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd s0,32(sp) la s0,__stack_chk_guard addi a4,sp,20 addi a3,sp,16 addi a2,sp,12 addi a1,sp,8 ld a5, 0(s0) sd a5, 24(sp) li a5, 0 lla a0,.LC0 sd ra,40(sp) call __isoc99_scanf@plt lw a5,8(sp) li a1,2 lw a2,12(sp) lw a6,16(sp) lw a0,20(sp) li a3,3 li a4,1 beq a5,a1,.L13 .L16: beq a5,a3,.L14 beq a5,a4,.L10 addiw a5,a5,-1 bne a5,a1,.L16 .L13: mv a2,a6 .L10: lla a1,.LC1 li a0,1 call __printf_chk@plt ld a4, 24(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L17 ld ra,40(sp) ld s0,32(sp) li a0,0 addi sp,sp,48 jr ra .L14: mv a2,a0 j .L10 .L17: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "01_recursion-in-c-English.c" .option pic .text .align 1 .globl find_nth_term .type find_nth_term, @function find_nth_term: li a6,2 li a4,3 li a5,1 beq a0,a6,.L4 .L8: beq a0,a4,.L5 beq a0,a5,.L6 addiw a0,a0,-1 bne a0,a6,.L8 .L4: mv a0,a2 ret .L5: mv a0,a3 ret .L6: mv a0,a1 ret .size find_nth_term, .-find_nth_term .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d %d %d %d" .align 3 .LC1: .string "%d" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-48 sd s0,32(sp) la s0,__stack_chk_guard addi a4,sp,20 addi a3,sp,16 addi a2,sp,12 addi a1,sp,8 ld a5, 0(s0) sd a5, 24(sp) li a5, 0 lla a0,.LC0 sd ra,40(sp) call __isoc99_scanf@plt lw a5,8(sp) li a1,2 lw a2,12(sp) lw a6,16(sp) lw a0,20(sp) li a3,3 li a4,1 beq a5,a1,.L13 .L16: beq a5,a3,.L14 beq a5,a4,.L10 addiw a5,a5,-1 bne a5,a1,.L16 .L13: mv a2,a6 .L10: lla a1,.LC1 li a0,1 call __printf_chk@plt ld a4, 24(sp) ld a5, 0(s0) xor a5, a4, a5 li a4, 0 bne a5,zero,.L17 ld ra,40(sp) ld s0,32(sp) li a0,0 addi sp,sp,48 jr ra .L14: mv a2,a0 j .L10 .L17: call __stack_chk_fail@plt .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "01_recursion-in-c-English.c" .text .align 2 .global find_nth_term .type find_nth_term, %function find_nth_term: .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 w1, [sp, 24] str w2, [sp, 20] str w3, [sp, 16] ldr w0, [sp, 28] cmp w0, 3 beq .L2 ldr w0, [sp, 28] cmp w0, 3 bgt .L3 ldr w0, [sp, 28] cmp w0, 1 beq .L4 ldr w0, [sp, 28] cmp w0, 2 beq .L5 b .L3 .L4: ldr w0, [sp, 24] b .L6 .L5: ldr w0, [sp, 20] b .L6 .L2: ldr w0, [sp, 16] b .L6 .L3: ldr w0, [sp, 28] sub w0, w0, #1 ldr w3, [sp, 16] ldr w2, [sp, 20] ldr w1, [sp, 24] bl find_nth_term .L6: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size find_nth_term, .-find_nth_term .section .rodata .align 3 .LC0: .string "%d %d %d %d" .align 3 .LC1: .string "%d" .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 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 x3, sp, 32 add x2, sp, 28 add x1, sp, 24 add x0, sp, 20 mov x4, x3 mov x3, x2 mov x2, x1 mov x1, x0 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr w0, [sp, 20] ldr w1, [sp, 24] ldr w2, [sp, 28] ldr w3, [sp, 32] bl find_nth_term 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, 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 .LFE7: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "01_recursion-in-c-English.c" .text .align 2 .global find_nth_term .type find_nth_term, %function find_nth_term: .LFB51: .cfi_startproc cmp w0, 2 beq .L3 mov w4, w0 mov w0, w3 cmp w4, 3 beq .L7 mov w0, w1 cmp w4, 1 beq .L7 stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp sub w0, w4, #1 bl find_nth_term ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L3: mov w0, w2 ret .L7: ret .cfi_endproc .LFE51: .size find_nth_term, .-find_nth_term .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d %d %d %d" .align 3 .LC1: .string "%d" .text .align 2 .global main .type main, %function main: .LFB52: .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 x4, sp, 36 add x3, sp, 32 add x2, sp, 28 add x1, sp, 24 adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldr w3, [sp, 36] ldr w2, [sp, 32] ldr w1, [sp, 28] ldr w0, [sp, 24] bl find_nth_term mov w2, w0 adrp x1, .LC1 add x1, x1, :lo12:.LC1 mov w0, 1 bl __printf_chk 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 bne .L13 mov w0, 0 ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L13: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE52: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "01_recursion-in-c-English.c" .text .align 2 .p2align 4,,11 .global find_nth_term .type find_nth_term, %function find_nth_term: .LFB51: .cfi_startproc cmp w0, 2 beq .L4 .L8: cmp w0, 3 beq .L5 cmp w0, 1 beq .L6 sub w0, w0, #1 cmp w0, 2 bne .L8 .L4: mov w0, w2 ret .p2align 2,,3 .L5: mov w0, w3 ret .p2align 2,,3 .L6: mov w0, w1 ret .cfi_endproc .LFE51: .size find_nth_term, .-find_nth_term .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d %d %d %d" .align 3 .LC1: .string "%d" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB52: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x5, :got:__stack_chk_guard adrp x0, .LC0 mov x29, sp ldr x5, [x5, #:got_lo12:__stack_chk_guard] add x3, sp, 32 add x2, sp, 28 add x1, sp, 24 ldr x6, [x5] str x6, [sp, 40] mov x6, 0 add x4, sp, 36 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldp w0, w2, [sp, 24] ldp w3, w1, [sp, 32] .L11: cmp w0, 2 beq .L13 cmp w0, 3 beq .L14 cmp w0, 1 beq .L10 sub w0, w0, #1 b .L11 .L14: mov w2, w1 .L10: adrp x1, .LC1 mov w0, 1 add x1, x1, :lo12:.LC1 bl __printf_chk 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 bne .L19 mov w0, 0 ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L13: .cfi_restore_state mov w2, w3 b .L10 .L19: bl __stack_chk_fail .cfi_endproc .LFE52: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "01_recursion-in-c-English.c" .text .align 2 .p2align 4,,11 .global find_nth_term .type find_nth_term, %function find_nth_term: .LFB51: .cfi_startproc cmp w0, 2 beq .L4 .L8: cmp w0, 3 beq .L5 cmp w0, 1 beq .L6 sub w0, w0, #1 cmp w0, 2 bne .L8 .L4: mov w0, w2 ret .p2align 2,,3 .L5: mov w0, w3 ret .p2align 2,,3 .L6: mov w0, w1 ret .cfi_endproc .LFE51: .size find_nth_term, .-find_nth_term .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "%d %d %d %d" .align 3 .LC1: .string "%d" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB52: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x5, :got:__stack_chk_guard adrp x0, .LC0 mov x29, sp ldr x5, [x5, #:got_lo12:__stack_chk_guard] add x3, sp, 32 add x2, sp, 28 add x1, sp, 24 ldr x6, [x5] str x6, [sp, 40] mov x6, 0 add x4, sp, 36 add x0, x0, :lo12:.LC0 bl __isoc99_scanf ldp w0, w2, [sp, 24] ldp w3, w1, [sp, 32] .L11: cmp w0, 2 beq .L13 cmp w0, 3 beq .L14 cmp w0, 1 beq .L10 sub w0, w0, #1 b .L11 .L14: mov w2, w1 .L10: adrp x1, .LC1 mov w0, 1 add x1, x1, :lo12:.LC1 bl __printf_chk 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 bne .L19 mov w0, 0 ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L13: .cfi_restore_state mov w2, w3 b .L10 .L19: bl __stack_chk_fail .cfi_endproc .LFE52: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
PrimeNumberofSetBitsinBinaryRepresentation.c
int bitCount(int n) { int res = 0; for (; n != 0; n &= n - 1) ++res; return res; } int isPrime(int N) //only consider prime less than 32 { if (N == 2 || N == 3 || N == 5) return 1; if (N < 2 || N % 2 == 0 || N % 3 == 0 || N % 5 == 0) return 0; return 1; } int countPrimeSetBits(int L, int R) { int res = 0; for (int i = L; i <= R; ++i) res += isPrime(bitCount(i)); return res; }
.file "PrimeNumberofSetBitsinBinaryRepresentation.c" .option pic .text .align 1 .globl bitCount .type bitCount, @function bitCount: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 mv a5,a0 sw a5,-36(s0) sw zero,-20(s0) j .L2 .L3: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) lw a5,-36(s0) addiw a5,a5,-1 sext.w a5,a5 lw a4,-36(s0) and a5,a5,a4 sw a5,-36(s0) .L2: lw a5,-36(s0) sext.w a5,a5 bne a5,zero,.L3 lw a5,-20(s0) mv a0,a5 ld s0,40(sp) addi sp,sp,48 jr ra .size bitCount, .-bitCount .align 1 .globl isPrime .type isPrime, @function isPrime: addi sp,sp,-32 sd s0,24(sp) addi s0,sp,32 mv a5,a0 sw a5,-20(s0) lw a5,-20(s0) sext.w a4,a5 li a5,2 beq a4,a5,.L6 lw a5,-20(s0) sext.w a4,a5 li a5,3 beq a4,a5,.L6 lw a5,-20(s0) sext.w a4,a5 li a5,5 bne a4,a5,.L7 .L6: li a5,1 j .L8 .L7: lw a5,-20(s0) sext.w a4,a5 li a5,1 ble a4,a5,.L9 lw a5,-20(s0) andi a5,a5,1 sext.w a5,a5 beq a5,zero,.L9 lw a5,-20(s0) mv a4,a5 li a5,3 remw a5,a4,a5 sext.w a5,a5 beq a5,zero,.L9 lw a5,-20(s0) mv a4,a5 li a5,5 remw a5,a4,a5 sext.w a5,a5 bne a5,zero,.L10 .L9: li a5,0 j .L8 .L10: li a5,1 .L8: mv a0,a5 ld s0,24(sp) addi sp,sp,32 jr ra .size isPrime, .-isPrime .align 1 .globl countPrimeSetBits .type countPrimeSetBits, @function countPrimeSetBits: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 mv a5,a0 mv a4,a1 sw a5,-36(s0) mv a5,a4 sw a5,-40(s0) sw zero,-24(s0) lw a5,-36(s0) sw a5,-20(s0) j .L12 .L13: lw a5,-20(s0) mv a0,a5 call bitCount mv a5,a0 mv a0,a5 call isPrime mv a5,a0 lw a4,-24(s0) addw a5,a4,a5 sw a5,-24(s0) lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L12: lw a5,-20(s0) mv a4,a5 lw a5,-40(s0) sext.w a4,a4 sext.w a5,a5 ble a4,a5,.L13 lw a5,-24(s0) mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size countPrimeSetBits, .-countPrimeSetBits .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "PrimeNumberofSetBitsinBinaryRepresentation.c" .option pic .text .align 1 .globl bitCount .type bitCount, @function bitCount: mv a5,a0 beq a0,zero,.L4 li a0,0 .L3: addiw a0,a0,1 addiw a4,a5,-1 and a5,a4,a5 bne a5,zero,.L3 ret .L4: ret .size bitCount, .-bitCount .align 1 .globl isPrime .type isPrime, @function isPrime: mv a5,a0 sext.w a4,a0 addiw a2,a0,-2 li a3,1 bleu a2,a3,.L8 li a3,5 li a0,1 beq a5,a3,.L7 li a3,1 li a0,0 ble a5,a3,.L7 andi a4,a4,1 beq a4,zero,.L7 li a0,3 remw a0,a5,a0 beq a0,zero,.L7 li a4,5 remw a5,a5,a4 snez a0,a5 ret .L8: li a0,1 .L7: ret .size isPrime, .-isPrime .align 1 .globl countPrimeSetBits .type countPrimeSetBits, @function countPrimeSetBits: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) bgt a0,a1,.L15 mv s0,a0 addiw s2,a1,1 li s1,0 .L14: mv a0,s0 call bitCount call isPrime addw s1,a0,s1 addiw s0,s0,1 bne s2,s0,.L14 .L13: mv a0,s1 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L15: li s1,0 j .L13 .size countPrimeSetBits, .-countPrimeSetBits .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "PrimeNumberofSetBitsinBinaryRepresentation.c" .option pic .text .align 1 .globl bitCount .type bitCount, @function bitCount: mv a5,a0 li a0,0 beq a5,zero,.L4 .L3: addiw a4,a5,-1 and a5,a4,a5 addiw a0,a0,1 bne a5,zero,.L3 ret .L4: ret .size bitCount, .-bitCount .align 1 .globl isPrime .type isPrime, @function isPrime: addiw a2,a0,-2 li a4,1 mv a5,a0 sext.w a3,a0 bleu a2,a4,.L9 li a2,5 li a0,1 beq a5,a2,.L8 li a0,0 ble a5,a4,.L8 andi a3,a3,1 beq a3,zero,.L8 li a0,3 remw a0,a5,a0 beq a0,zero,.L8 li a4,5 remw a5,a5,a4 snez a0,a5 ret .L9: li a0,1 .L8: ret .size isPrime, .-isPrime .align 1 .globl countPrimeSetBits .type countPrimeSetBits, @function countPrimeSetBits: mv a2,a0 bgt a0,a1,.L23 addiw a1,a1,1 li a0,0 li a6,22 li a7,1 li t1,3 li t3,5 .L19: mv a5,a2 li a4,0 beq a2,zero,.L22 .L20: addiw a3,a5,-1 and a5,a3,a5 sext.w a5,a5 mv a3,a4 addiw a4,a4,1 bne a5,zero,.L20 srl a3,a6,a3 andi a3,a3,1 bne a3,zero,.L36 sext.w a5,a4 beq a4,a7,.L22 andi a5,a5,1 beq a5,zero,.L22 remw a5,a4,t1 beq a5,zero,.L22 remw a4,a4,t3 beq a4,zero,.L22 .L36: addiw a0,a0,1 .L22: addiw a2,a2,1 bne a2,a1,.L19 ret .L23: li a0,0 ret .size countPrimeSetBits, .-countPrimeSetBits .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "PrimeNumberofSetBitsinBinaryRepresentation.c" .option pic .text .align 1 .globl bitCount .type bitCount, @function bitCount: mv a5,a0 li a0,0 beq a5,zero,.L4 .L3: addiw a4,a5,-1 and a5,a4,a5 addiw a0,a0,1 bne a5,zero,.L3 ret .L4: ret .size bitCount, .-bitCount .align 1 .globl isPrime .type isPrime, @function isPrime: addiw a2,a0,-2 li a4,1 mv a5,a0 sext.w a3,a0 bleu a2,a4,.L9 li a2,5 li a0,1 beq a5,a2,.L8 li a0,0 ble a5,a4,.L8 andi a3,a3,1 beq a3,zero,.L8 li a0,3 remw a0,a5,a0 beq a0,zero,.L8 li a4,5 remw a5,a5,a4 snez a0,a5 ret .L9: li a0,1 .L8: ret .size isPrime, .-isPrime .align 1 .globl countPrimeSetBits .type countPrimeSetBits, @function countPrimeSetBits: mv a2,a0 bgt a0,a1,.L23 addiw a1,a1,1 li a0,0 li a6,22 li a7,1 li t1,3 li t3,5 .L19: mv a5,a2 li a4,0 beq a2,zero,.L22 .L20: addiw a3,a5,-1 and a5,a3,a5 sext.w a5,a5 mv a3,a4 addiw a4,a4,1 bne a5,zero,.L20 srl a3,a6,a3 andi a3,a3,1 bne a3,zero,.L36 sext.w a5,a4 beq a4,a7,.L22 andi a5,a5,1 beq a5,zero,.L22 remw a5,a4,t1 beq a5,zero,.L22 remw a4,a4,t3 beq a4,zero,.L22 .L36: addiw a0,a0,1 .L22: addiw a2,a2,1 bne a2,a1,.L19 ret .L23: li a0,0 ret .size countPrimeSetBits, .-countPrimeSetBits .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "PrimeNumberofSetBitsinBinaryRepresentation.c" .text .align 2 .global bitCount .type bitCount, %function bitCount: .LFB0: .cfi_startproc sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, 12] str wzr, [sp, 28] b .L2 .L3: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] ldr w0, [sp, 12] sub w0, w0, #1 ldr w1, [sp, 12] and w0, w1, w0 str w0, [sp, 12] .L2: ldr w0, [sp, 12] cmp w0, 0 bne .L3 ldr w0, [sp, 28] add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size bitCount, .-bitCount .align 2 .global isPrime .type isPrime, %function isPrime: .LFB1: .cfi_startproc sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, 12] ldr w0, [sp, 12] cmp w0, 2 beq .L6 ldr w0, [sp, 12] cmp w0, 3 beq .L6 ldr w0, [sp, 12] cmp w0, 5 bne .L7 .L6: mov w0, 1 b .L8 .L7: ldr w0, [sp, 12] cmp w0, 1 ble .L9 ldr w0, [sp, 12] and w0, w0, 1 cmp w0, 0 beq .L9 ldr w2, [sp, 12] mov w0, 21846 movk w0, 0x5555, lsl 16 smull x0, w2, w0 lsr x1, x0, 32 asr w0, w2, 31 sub w1, w1, w0 mov w0, w1 lsl w0, w0, 1 add w0, w0, w1 sub w1, w2, w0 cmp w1, 0 beq .L9 ldr w2, [sp, 12] mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w2, w0 lsr x0, x0, 32 asr w1, w0, 1 asr w0, w2, 31 sub w1, w1, w0 mov w0, w1 lsl w0, w0, 2 add w0, w0, w1 sub w1, w2, w0 cmp w1, 0 bne .L10 .L9: mov w0, 0 b .L8 .L10: mov w0, 1 .L8: add sp, sp, 16 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size isPrime, .-isPrime .align 2 .global countPrimeSetBits .type countPrimeSetBits, %function countPrimeSetBits: .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] str w1, [sp, 24] str wzr, [sp, 40] ldr w0, [sp, 28] str w0, [sp, 44] b .L12 .L13: ldr w0, [sp, 44] bl bitCount bl isPrime mov w1, w0 ldr w0, [sp, 40] add w0, w0, w1 str w0, [sp, 40] ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L12: ldr w1, [sp, 44] ldr w0, [sp, 24] cmp w1, w0 ble .L13 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 countPrimeSetBits, .-countPrimeSetBits .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "PrimeNumberofSetBitsinBinaryRepresentation.c" .text .align 2 .global bitCount .type bitCount, %function bitCount: .LFB0: .cfi_startproc cbz w0, .L4 mov w1, w0 .L3: sub w2, w1, #1 ands w1, w1, w2 bne .L3 fmov s0, w0 cnt v0.8b, v0.8b addv b0, v0.8b .L1: fmov w0, s0 ret .L4: fmov s0, w0 b .L1 .cfi_endproc .LFE0: .size bitCount, .-bitCount .align 2 .global isPrime .type isPrime, %function isPrime: .LFB1: .cfi_startproc mov w1, w0 sub w0, w0, #2 cmp w0, 1 ccmp w1, 5, 4, hi mov w0, 1 beq .L6 mov w0, 0 cmp w1, 1 ble .L6 tbz x1, 0, .L6 mov w0, 21846 movk w0, 0x5555, lsl 16 smull x0, w1, w0 lsr x0, x0, 32 sub w0, w0, w1, asr 31 add w0, w0, w0, lsl 1 subs w0, w1, w0 beq .L6 mov w0, 26215 movk w0, 0x6666, lsl 16 smull x0, w1, w0 asr x0, x0, 33 sub w0, w0, w1, asr 31 add w0, w0, w0, lsl 2 cmp w1, w0 cset w0, ne .L6: ret .cfi_endproc .LFE1: .size isPrime, .-isPrime .align 2 .global countPrimeSetBits .type countPrimeSetBits, %function countPrimeSetBits: .LFB2: .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 cmp w0, w1 bgt .L14 str x21, [sp, 32] .cfi_offset 21, -16 mov w19, w0 add w21, w1, 1 mov w20, 0 .L13: mov w0, w19 bl bitCount bl isPrime add w20, w20, w0 add w19, w19, 1 cmp w21, w19 bne .L13 ldr x21, [sp, 32] .cfi_restore 21 .L11: mov w0, w20 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L14: .cfi_restore_state mov w20, 0 b .L11 .cfi_endproc .LFE2: .size countPrimeSetBits, .-countPrimeSetBits .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "PrimeNumberofSetBitsinBinaryRepresentation.c" .text .align 2 .p2align 4,,11 .global bitCount .type bitCount, %function bitCount: .LFB0: .cfi_startproc fmov s0, w0 cnt v0.8b, v0.8b addv b0, v0.8b fmov w0, s0 ret .cfi_endproc .LFE0: .size bitCount, .-bitCount .align 2 .p2align 4,,11 .global isPrime .type isPrime, %function isPrime: .LFB1: .cfi_startproc mov w1, w0 sub w0, w0, #2 cmp w0, 1 mov w0, 1 ccmp w1, 5, 4, hi beq .L3 mov w0, 0 cmp w1, 1 ble .L3 tbz x1, 0, .L3 mov w0, 21846 movk w0, 0x5555, lsl 16 smull x0, w1, w0 lsr x0, x0, 32 sub w0, w0, w1, asr 31 add w0, w0, w0, lsl 1 subs w0, w1, w0 beq .L3 mov w3, 52429 mov w2, 39321 movk w3, 0xcccc, lsl 16 movk w2, 0x1999, lsl 16 mov w0, 858993459 madd w1, w1, w3, w2 cmp w1, w0 cset w0, cs .L3: ret .cfi_endproc .LFE1: .size isPrime, .-isPrime .align 2 .p2align 4,,11 .global countPrimeSetBits .type countPrimeSetBits, %function countPrimeSetBits: .LFB2: .cfi_startproc mov w2, w0 cmp w0, w1 bgt .L18 mov w6, 43691 mov w8, 52429 add w4, w1, 1 mov w0, 0 mov x5, 22 movk w6, 0xaaaa, lsl 16 mov w9, 1431655765 movk w8, 0xcccc, lsl 16 mov w10, 858993459 b .L14 .p2align 2,,3 .L15: mul w3, w1, w6 cmp w1, 1 beq .L16 mul w7, w1, w8 tbz x1, 0, .L16 cmp w3, w9 bls .L16 cmp w7, w10 cinc w0, w0, hi .L16: add w2, w2, 1 cmp w4, w2 beq .L12 .L14: fmov s0, w2 cbz w2, .L16 cnt v0.8b, v0.8b addv b0, v0.8b fmov w1, s0 sub w3, w1, #1 lsr x3, x5, x3 tbz x3, 0, .L15 add w2, w2, 1 add w0, w0, 1 cmp w4, w2 bne .L14 .L12: ret .L18: mov w0, 0 ret .cfi_endproc .LFE2: .size countPrimeSetBits, .-countPrimeSetBits .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "PrimeNumberofSetBitsinBinaryRepresentation.c" .text .align 2 .p2align 4,,11 .global bitCount .type bitCount, %function bitCount: .LFB0: .cfi_startproc fmov s0, w0 cnt v0.8b, v0.8b addv b0, v0.8b fmov w0, s0 ret .cfi_endproc .LFE0: .size bitCount, .-bitCount .align 2 .p2align 4,,11 .global isPrime .type isPrime, %function isPrime: .LFB1: .cfi_startproc mov w1, w0 sub w0, w0, #2 cmp w0, 1 mov w0, 1 ccmp w1, 5, 4, hi beq .L3 mov w0, 0 cmp w1, 1 ble .L3 tbz x1, 0, .L3 mov w0, 21846 movk w0, 0x5555, lsl 16 smull x0, w1, w0 lsr x0, x0, 32 sub w0, w0, w1, asr 31 add w0, w0, w0, lsl 1 subs w0, w1, w0 beq .L3 mov w3, 52429 mov w2, 39321 movk w3, 0xcccc, lsl 16 movk w2, 0x1999, lsl 16 mov w0, 858993459 madd w1, w1, w3, w2 cmp w1, w0 cset w0, cs .L3: ret .cfi_endproc .LFE1: .size isPrime, .-isPrime .align 2 .p2align 4,,11 .global countPrimeSetBits .type countPrimeSetBits, %function countPrimeSetBits: .LFB2: .cfi_startproc mov w2, w0 cmp w0, w1 bgt .L18 mov w6, 43691 mov w8, 52429 add w4, w1, 1 mov w0, 0 mov x5, 22 movk w6, 0xaaaa, lsl 16 mov w9, 1431655765 movk w8, 0xcccc, lsl 16 mov w10, 858993459 b .L14 .p2align 2,,3 .L15: mul w3, w1, w6 cmp w1, 1 beq .L16 mul w7, w1, w8 tbz x1, 0, .L16 cmp w3, w9 bls .L16 cmp w7, w10 cinc w0, w0, hi .L16: add w2, w2, 1 cmp w2, w4 beq .L12 .L14: fmov s0, w2 cbz w2, .L16 cnt v0.8b, v0.8b addv b0, v0.8b fmov w1, s0 sub w3, w1, #1 lsr x3, x5, x3 tbz x3, 0, .L15 add w2, w2, 1 add w0, w0, 1 cmp w2, w4 bne .L14 .L12: ret .L18: mov w0, 0 ret .cfi_endproc .LFE2: .size countPrimeSetBits, .-countPrimeSetBits .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
struct.c
#include <stdio.h> #include <string.h> struct student { char name[30]; short age; float grade; }; int main() { int i; struct student st1; struct student st2={"First",20,4.5}; st1.age=19; st1.grade=4; st2.age++; strcpy(st1.name, "Second"); }
.file "struct.c" .option pic .text .section .rodata .align 3 .LC0: .string "First" .zero 24 .half 20 .word 1083179008 .text .align 1 .globl main .type main, @function main: addi sp,sp,-112 sd ra,104(sp) sd s0,96(sp) addi s0,sp,112 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 lla a5,.LC0 ld a1,0(a5) ld a2,8(a5) ld a3,16(a5) ld a4,24(a5) sd a1,-64(s0) sd a2,-56(s0) sd a3,-48(s0) sd a4,-40(s0) lw a5,32(a5) sw a5,-32(s0) li a5,19 sh a5,-74(s0) lla a5,.LC1 flw fa5,0(a5) fsw fa5,-72(s0) lh a5,-34(s0) slli a5,a5,48 srli a5,a5,48 addiw a5,a5,1 slli a5,a5,48 srli a5,a5,48 slliw a5,a5,16 sraiw a5,a5,16 sh a5,-34(s0) addi a5,s0,-104 li a4,1868783616 addi a4,a4,1363 sw a4,0(a5) li a4,24576 addi a4,a4,1134 sh a4,4(a5) sb zero,6(a5) li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L3 call __stack_chk_fail@plt .L3: mv a0,a4 ld ra,104(sp) ld s0,96(sp) addi sp,sp,112 jr ra .size main, .-main .section .rodata .align 2 .LC1: .word 1082130432 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "struct.c" .option pic .text .align 1 .globl main .type main, @function main: li a0,0 ret .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "struct.c" .option pic .text .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: li a0,0 ret .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "struct.c" .option pic .text .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: li a0,0 ret .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "struct.c" .text .section .rodata .align 3 .LC1: .string "Second" .text .align 2 .global main .type main, %function main: .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 adrp x0, .LC0 add x1, x0, :lo12:.LC0 add x0, sp, 64 ldp q0, q1, [x1] stp q0, q1, [x0] ldr w1, [x1, 32] str w1, [x0, 32] mov w0, 19 strh w0, [sp, 54] fmov s0, 4.0e+0 str s0, [sp, 56] ldrsh w0, [sp, 94] and w0, w0, 65535 add w0, w0, 1 and w0, w0, 65535 sxth w0, w0 strh w0, [sp, 94] add x2, sp, 24 adrp x0, .LC1 add x1, x0, :lo12:.LC1 mov x0, x2 ldr w2, [x1] str w2, [x0] ldr w1, [x1, 3] str w1, [x0, 3] 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 .L3 bl __stack_chk_fail .L3: mov w0, w1 ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size main, .-main .section .rodata .align 3 .LC0: .string "First" .zero 24 .hword 20 .word 1083179008 .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "struct.c" .text .align 2 .global main .type main, %function main: .LFB35: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE35: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "struct.c" .text .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB35: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE35: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "struct.c" .text .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB35: .cfi_startproc mov w0, 0 ret .cfi_endproc .LFE35: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
d_mayer_fft.c
/* ** FFT and FHT routines ** Copyright 1988, 1993; Ron Mayer ** ** mayer_fht(fz,n); ** Does a hartley transform of "n" points in the array "fz". ** mayer_fft(n,real,imag) ** Does a fourier transform of "n" points of the "real" and ** "imag" arrays. ** mayer_ifft(n,real,imag) ** Does an inverse fourier transform of "n" points of the "real" ** and "imag" arrays. ** mayer_realfft(n,real) ** Does a real-valued fourier transform of "n" points of the ** "real" array. The real part of the transform ends ** up in the first half of the array and the imaginary part of the ** transform ends up in the second half of the array. ** mayer_realifft(n,real) ** The inverse of the realfft() routine above. ** ** ** NOTE: This routine uses at least 2 patented algorithms, and may be ** under the restrictions of a bunch of different organizations. ** Although I wrote it completely myself, it is kind of a derivative ** of a routine I once authored and released under the GPL, so it ** may fall under the free software foundation's restrictions; ** it was worked on as a Stanford Univ project, so they claim ** some rights to it; it was further optimized at work here, so ** I think this company claims parts of it. The patents are ** held by R. Bracewell (the FHT algorithm) and O. Buneman (the ** trig generator), both at Stanford Univ. ** If it were up to me, I'd say go do whatever you want with it; ** but it would be polite to give credit to the following people ** if you use this anywhere: ** Euler - probable inventor of the fourier transform. ** Gauss - probable inventor of the FFT. ** Hartley - probable inventor of the hartley transform. ** Buneman - for a really cool trig generator ** Mayer(me) - for authoring this particular version and ** including all the optimizations in one package. ** Thanks, ** Ron Mayer; mayer@acuson.com ** */ /* This is a slightly modified version of Mayer's contribution; write * msp@ucsd.edu for the original code. Kudos to Mayer for a fine piece * of work. -msp */ #ifdef MSW #pragma warning( disable : 4305 ) /* uncast const double to float */ #pragma warning( disable : 4244 ) /* uncast double to float */ #pragma warning( disable : 4101 ) /* unused local variables */ #endif #define REAL float #define GOOD_TRIG #ifdef GOOD_TRIG #else #define FAST_TRIG #endif #if defined(GOOD_TRIG) #define FHT_SWAP(a,b,t) {(t)=(a);(a)=(b);(b)=(t);} #define TRIG_VARS \ int t_lam=0; #define TRIG_INIT(k,c,s) \ { \ int i; \ for (i=2 ; i<=k ; i++) \ {coswrk[i]=costab[i];sinwrk[i]=sintab[i];} \ t_lam = 0; \ c = 1; \ s = 0; \ } #define TRIG_NEXT(k,c,s) \ { \ int i,j; \ (t_lam)++; \ for (i=0 ; !((1<<i)&t_lam) ; i++); \ i = k-i; \ s = sinwrk[i]; \ c = coswrk[i]; \ if (i>1) \ { \ for (j=k-i+2 ; (1<<j)&t_lam ; j++); \ j = k - j; \ sinwrk[i] = halsec[i] * (sinwrk[i-1] + sinwrk[j]); \ coswrk[i] = halsec[i] * (coswrk[i-1] + coswrk[j]); \ } \ } #define TRIG_RESET(k,c,s) #endif #if defined(FAST_TRIG) #define TRIG_VARS \ REAL t_c,t_s; #define TRIG_INIT(k,c,s) \ { \ t_c = costab[k]; \ t_s = sintab[k]; \ c = 1; \ s = 0; \ } #define TRIG_NEXT(k,c,s) \ { \ REAL t = c; \ c = t*t_c - s*t_s; \ s = t*t_s + s*t_c; \ } #define TRIG_RESET(k,c,s) #endif static REAL halsec[20]= { 0, 0, .54119610014619698439972320536638942006107206337801, .50979557910415916894193980398784391368261849190893, .50241928618815570551167011928012092247859337193963, .50060299823519630134550410676638239611758632599591, .50015063602065098821477101271097658495974913010340, .50003765191554772296778139077905492847503165398345, .50000941253588775676512870469186533538523133757983, .50000235310628608051401267171204408939326297376426, .50000058827484117879868526730916804925780637276181, .50000014706860214875463798283871198206179118093251, .50000003676714377807315864400643020315103490883972, .50000000919178552207366560348853455333939112569380, .50000000229794635411562887767906868558991922348920, .50000000057448658687873302235147272458812263401372 }; static REAL costab[20]= { .00000000000000000000000000000000000000000000000000, .70710678118654752440084436210484903928483593768847, .92387953251128675612818318939678828682241662586364, .98078528040323044912618223613423903697393373089333, .99518472667219688624483695310947992157547486872985, .99879545620517239271477160475910069444320361470461, .99969881869620422011576564966617219685006108125772, .99992470183914454092164649119638322435060646880221, .99998117528260114265699043772856771617391725094433, .99999529380957617151158012570011989955298763362218, .99999882345170190992902571017152601904826792288976, .99999970586288221916022821773876567711626389934930, .99999992646571785114473148070738785694820115568892, .99999998161642929380834691540290971450507605124278, .99999999540410731289097193313960614895889430318945, .99999999885102682756267330779455410840053741619428 }; static REAL sintab[20]= { 1.0000000000000000000000000000000000000000000000000, .70710678118654752440084436210484903928483593768846, .38268343236508977172845998403039886676134456248561, .19509032201612826784828486847702224092769161775195, .09801714032956060199419556388864184586113667316749, .04906767432741801425495497694268265831474536302574, .02454122852291228803173452945928292506546611923944, .01227153828571992607940826195100321214037231959176, .00613588464915447535964023459037258091705788631738, .00306795676296597627014536549091984251894461021344, .00153398018628476561230369715026407907995486457522, .00076699031874270452693856835794857664314091945205, .00038349518757139558907246168118138126339502603495, .00019174759731070330743990956198900093346887403385, .00009587379909597734587051721097647635118706561284, .00004793689960306688454900399049465887274686668768 }; static REAL coswrk[20]= { .00000000000000000000000000000000000000000000000000, .70710678118654752440084436210484903928483593768847, .92387953251128675612818318939678828682241662586364, .98078528040323044912618223613423903697393373089333, .99518472667219688624483695310947992157547486872985, .99879545620517239271477160475910069444320361470461, .99969881869620422011576564966617219685006108125772, .99992470183914454092164649119638322435060646880221, .99998117528260114265699043772856771617391725094433, .99999529380957617151158012570011989955298763362218, .99999882345170190992902571017152601904826792288976, .99999970586288221916022821773876567711626389934930, .99999992646571785114473148070738785694820115568892, .99999998161642929380834691540290971450507605124278, .99999999540410731289097193313960614895889430318945, .99999999885102682756267330779455410840053741619428 }; static REAL sinwrk[20]= { 1.0000000000000000000000000000000000000000000000000, .70710678118654752440084436210484903928483593768846, .38268343236508977172845998403039886676134456248561, .19509032201612826784828486847702224092769161775195, .09801714032956060199419556388864184586113667316749, .04906767432741801425495497694268265831474536302574, .02454122852291228803173452945928292506546611923944, .01227153828571992607940826195100321214037231959176, .00613588464915447535964023459037258091705788631738, .00306795676296597627014536549091984251894461021344, .00153398018628476561230369715026407907995486457522, .00076699031874270452693856835794857664314091945205, .00038349518757139558907246168118138126339502603495, .00019174759731070330743990956198900093346887403385, .00009587379909597734587051721097647635118706561284, .00004793689960306688454900399049465887274686668768 }; #define SQRT2_2 0.70710678118654752440084436210484 #define SQRT2 2*0.70710678118654752440084436210484 void mayer_fht(REAL *fz, int n) { /* REAL a,b; REAL c1,s1,s2,c2,s3,c3,s4,c4; REAL f0,g0,f1,g1,f2,g2,f3,g3; */ int k,k1,k2,k3,k4,kx; REAL *fi,*fn,*gi; TRIG_VARS; for (k1=1,k2=0;k1<n;k1++) { REAL aa; for (k=n>>1; (!((k2^=k)&k)); k>>=1); if (k1>k2) { aa=fz[k1];fz[k1]=fz[k2];fz[k2]=aa; } } for ( k=0 ; (1<<k)<n ; k++ ); k &= 1; if (k==0) { for (fi=fz,fn=fz+n;fi<fn;fi+=4) { REAL f0,f1,f2,f3; f1 = fi[0 ]-fi[1 ]; f0 = fi[0 ]+fi[1 ]; f3 = fi[2 ]-fi[3 ]; f2 = fi[2 ]+fi[3 ]; fi[2 ] = (f0-f2); fi[0 ] = (f0+f2); fi[3 ] = (f1-f3); fi[1 ] = (f1+f3); } } else { for (fi=fz,fn=fz+n,gi=fi+1;fi<fn;fi+=8,gi+=8) { REAL bs1,bc1,bs2,bc2,bs3,bc3,bs4,bc4, bg0,bf0,bf1,bg1,bf2,bg2,bf3,bg3; bc1 = fi[0 ] - gi[0 ]; bs1 = fi[0 ] + gi[0 ]; bc2 = fi[2 ] - gi[2 ]; bs2 = fi[2 ] + gi[2 ]; bc3 = fi[4 ] - gi[4 ]; bs3 = fi[4 ] + gi[4 ]; bc4 = fi[6 ] - gi[6 ]; bs4 = fi[6 ] + gi[6 ]; bf1 = (bs1 - bs2); bf0 = (bs1 + bs2); bg1 = (bc1 - bc2); bg0 = (bc1 + bc2); bf3 = (bs3 - bs4); bf2 = (bs3 + bs4); bg3 = SQRT2*bc4; bg2 = SQRT2*bc3; fi[4 ] = bf0 - bf2; fi[0 ] = bf0 + bf2; fi[6 ] = bf1 - bf3; fi[2 ] = bf1 + bf3; gi[4 ] = bg0 - bg2; gi[0 ] = bg0 + bg2; gi[6 ] = bg1 - bg3; gi[2 ] = bg1 + bg3; } } if (n<16) return; do { REAL s1,c1; int ii; k += 2; k1 = 1 << k; k2 = k1 << 1; k4 = k2 << 1; k3 = k2 + k1; kx = k1 >> 1; fi = fz; gi = fi + kx; fn = fz + n; do { REAL g0,f0,f1,g1,f2,g2,f3,g3; f1 = fi[0 ] - fi[k1]; f0 = fi[0 ] + fi[k1]; f3 = fi[k2] - fi[k3]; f2 = fi[k2] + fi[k3]; fi[k2] = f0 - f2; fi[0 ] = f0 + f2; fi[k3] = f1 - f3; fi[k1] = f1 + f3; g1 = gi[0 ] - gi[k1]; g0 = gi[0 ] + gi[k1]; g3 = SQRT2 * gi[k3]; g2 = SQRT2 * gi[k2]; gi[k2] = g0 - g2; gi[0 ] = g0 + g2; gi[k3] = g1 - g3; gi[k1] = g1 + g3; gi += k4; fi += k4; } while (fi<fn); TRIG_INIT(k,c1,s1); for (ii=1;ii<kx;ii++) { REAL c2,s2; TRIG_NEXT(k,c1,s1); c2 = c1*c1 - s1*s1; s2 = 2*(c1*s1); fn = fz + n; fi = fz +ii; gi = fz +k1-ii; do { REAL a,b,g0,f0,f1,g1,f2,g2,f3,g3; b = s2*fi[k1] - c2*gi[k1]; a = c2*fi[k1] + s2*gi[k1]; f1 = fi[0 ] - a; f0 = fi[0 ] + a; g1 = gi[0 ] - b; g0 = gi[0 ] + b; b = s2*fi[k3] - c2*gi[k3]; a = c2*fi[k3] + s2*gi[k3]; f3 = fi[k2] - a; f2 = fi[k2] + a; g3 = gi[k2] - b; g2 = gi[k2] + b; b = s1*f2 - c1*g3; a = c1*f2 + s1*g3; fi[k2] = f0 - a; fi[0 ] = f0 + a; gi[k3] = g1 - b; gi[k1] = g1 + b; b = c1*g2 - s1*f3; a = s1*g2 + c1*f3; gi[k2] = g0 - a; gi[0 ] = g0 + a; fi[k3] = f1 - b; fi[k1] = f1 + b; gi += k4; fi += k4; } while (fi<fn); } TRIG_RESET(k,c1,s1); } while (k4<n); } void mayer_fft(int n, REAL *real, REAL *imag) { REAL a,b,c,d; REAL q,r,s,t; int i,j,k; for (i=1,j=n-1,k=n/2;i<k;i++,j--) { a = real[i]; b = real[j]; q=a+b; r=a-b; c = imag[i]; d = imag[j]; s=c+d; t=c-d; real[i] = (q+t)*.5; real[j] = (q-t)*.5; imag[i] = (s-r)*.5; imag[j] = (s+r)*.5; } mayer_fht(real,n); mayer_fht(imag,n); } void mayer_ifft(int n, REAL *real, REAL *imag) { REAL a,b,c,d; REAL q,r,s,t; int i,j,k; mayer_fht(real,n); mayer_fht(imag,n); for (i=1,j=n-1,k=n/2;i<k;i++,j--) { a = real[i]; b = real[j]; q=a+b; r=a-b; c = imag[i]; d = imag[j]; s=c+d; t=c-d; imag[i] = (s+r)*0.5; imag[j] = (s-r)*0.5; real[i] = (q-t)*0.5; real[j] = (q+t)*0.5; } } void mayer_realfft(int n, REAL *real) { #ifdef ROCKBOX REAL a,b; #else REAL a,b,c,d; #endif int i,j,k; mayer_fht(real,n); for (i=1,j=n-1,k=n/2;i<k;i++,j--) { a = real[i]; b = real[j]; real[j] = (a-b)*0.5; real[i] = (a+b)*0.5; } } void mayer_realifft(int n, REAL *real) { #ifdef ROCKBOX REAL a,b; #else REAL a,b,c,d; #endif int i,j,k; for (i=1,j=n-1,k=n/2;i<k;i++,j--) { a = real[i]; b = real[j]; real[j] = (a-b); real[i] = (a+b); } mayer_fht(real,n); }
.file "d_mayer_fft.c" .option pic .text .data .align 3 .type halsec, @object .size halsec, 80 halsec: .word 0 .word 0 .word 1057655764 .word 1057128951 .word 1057005197 .word 1056974725 .word 1056967135 .word 1056965240 .word 1056964766 .word 1056964647 .word 1056964618 .word 1056964610 .word 1056964609 .word 1056964608 .word 1056964608 .word 1056964608 .zero 16 .align 3 .type costab, @object .size costab, 80 costab: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .align 3 .type sintab, @object .size sintab, 80 sintab: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .align 3 .type coswrk, @object .size coswrk, 80 coswrk: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .align 3 .type sinwrk, @object .size sinwrk, 80 sinwrk: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .text .align 1 .globl mayer_fht .type mayer_fht, @function mayer_fht: addi sp,sp,-272 sd s0,264(sp) addi s0,sp,272 sd a0,-264(s0) mv a5,a1 sw a5,-268(s0) sw zero,-244(s0) li a5,1 sw a5,-252(s0) sw zero,-248(s0) j .L2 .L6: lw a5,-268(s0) sraiw a5,a5,1 sw a5,-256(s0) j .L3 .L4: lw a5,-256(s0) sraiw a5,a5,1 sw a5,-256(s0) .L3: lw a5,-248(s0) mv a4,a5 lw a5,-256(s0) xor a5,a4,a5 sw a5,-248(s0) lw a5,-248(s0) mv a4,a5 lw a5,-256(s0) and a5,a4,a5 sext.w a5,a5 beq a5,zero,.L4 lw a5,-252(s0) mv a4,a5 lw a5,-248(s0) sext.w a4,a4 sext.w a5,a5 ble a4,a5,.L5 lw a5,-252(s0) slli a5,a5,2 ld a4,-264(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-44(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-264(s0) add a4,a4,a5 lw a5,-252(s0) slli a5,a5,2 ld a3,-264(s0) add a5,a3,a5 flw fa5,0(a4) fsw fa5,0(a5) lw a5,-248(s0) slli a5,a5,2 ld a4,-264(s0) add a5,a4,a5 flw fa5,-44(s0) fsw fa5,0(a5) .L5: lw a5,-252(s0) addiw a5,a5,1 sw a5,-252(s0) .L2: lw a5,-252(s0) mv a4,a5 lw a5,-268(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L6 sw zero,-256(s0) j .L7 .L8: lw a5,-256(s0) addiw a5,a5,1 sw a5,-256(s0) .L7: lw a5,-256(s0) mv a4,a5 li a5,1 sllw a5,a5,a4 sext.w a4,a5 lw a5,-268(s0) sext.w a5,a5 bgt a5,a4,.L8 lw a5,-256(s0) andi a5,a5,1 sw a5,-256(s0) lw a5,-256(s0) sext.w a5,a5 bne a5,zero,.L9 ld a5,-264(s0) sd a5,-40(s0) lw a5,-268(s0) slli a5,a5,2 ld a4,-264(s0) add a5,a4,a5 sd a5,-24(s0) j .L10 .L11: ld a5,-40(s0) flw fa4,0(a5) ld a5,-40(s0) addi a5,a5,4 flw fa5,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,-160(s0) ld a5,-40(s0) flw fa4,0(a5) ld a5,-40(s0) addi a5,a5,4 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fsw fa5,-156(s0) ld a5,-40(s0) addi a5,a5,8 flw fa4,0(a5) ld a5,-40(s0) addi a5,a5,12 flw fa5,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,-152(s0) ld a5,-40(s0) addi a5,a5,8 flw fa4,0(a5) ld a5,-40(s0) addi a5,a5,12 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fsw fa5,-148(s0) ld a5,-40(s0) addi a5,a5,8 flw fa4,-156(s0) flw fa5,-148(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-156(s0) flw fa5,-148(s0) fadd.s fa5,fa4,fa5 ld a5,-40(s0) fsw fa5,0(a5) ld a5,-40(s0) addi a5,a5,12 flw fa4,-160(s0) flw fa5,-152(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) ld a5,-40(s0) addi a5,a5,4 flw fa4,-160(s0) flw fa5,-152(s0) fadd.s fa5,fa4,fa5 fsw fa5,0(a5) ld a5,-40(s0) addi a5,a5,16 sd a5,-40(s0) .L10: ld a4,-40(s0) ld a5,-24(s0) bltu a4,a5,.L11 j .L12 .L9: ld a5,-264(s0) sd a5,-40(s0) lw a5,-268(s0) slli a5,a5,2 ld a4,-264(s0) add a5,a4,a5 sd a5,-24(s0) ld a5,-40(s0) addi a5,a5,4 sd a5,-32(s0) j .L13 .L14: ld a5,-40(s0) flw fa4,0(a5) ld a5,-32(s0) flw fa5,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,-224(s0) ld a5,-40(s0) flw fa4,0(a5) ld a5,-32(s0) flw fa5,0(a5) fadd.s fa5,fa4,fa5 fsw fa5,-220(s0) ld a5,-40(s0) addi a5,a5,8 flw fa4,0(a5) ld a5,-32(s0) addi a5,a5,8 flw fa5,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,-216(s0) ld a5,-40(s0) addi a5,a5,8 flw fa4,0(a5) ld a5,-32(s0) addi a5,a5,8 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fsw fa5,-212(s0) ld a5,-40(s0) addi a5,a5,16 flw fa4,0(a5) ld a5,-32(s0) addi a5,a5,16 flw fa5,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,-208(s0) ld a5,-40(s0) addi a5,a5,16 flw fa4,0(a5) ld a5,-32(s0) addi a5,a5,16 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fsw fa5,-204(s0) ld a5,-40(s0) addi a5,a5,24 flw fa4,0(a5) ld a5,-32(s0) addi a5,a5,24 flw fa5,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,-200(s0) ld a5,-40(s0) addi a5,a5,24 flw fa4,0(a5) ld a5,-32(s0) addi a5,a5,24 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fsw fa5,-196(s0) flw fa4,-220(s0) flw fa5,-212(s0) fsub.s fa5,fa4,fa5 fsw fa5,-192(s0) flw fa4,-220(s0) flw fa5,-212(s0) fadd.s fa5,fa4,fa5 fsw fa5,-188(s0) flw fa4,-224(s0) flw fa5,-216(s0) fsub.s fa5,fa4,fa5 fsw fa5,-184(s0) flw fa4,-224(s0) flw fa5,-216(s0) fadd.s fa5,fa4,fa5 fsw fa5,-180(s0) flw fa4,-204(s0) flw fa5,-196(s0) fsub.s fa5,fa4,fa5 fsw fa5,-176(s0) flw fa4,-204(s0) flw fa5,-196(s0) fadd.s fa5,fa4,fa5 fsw fa5,-172(s0) flw fa5,-200(s0) fcvt.d.s fa4,fa5 lla a5,.LC0 fld fa5,0(a5) fmul.d fa5,fa4,fa5 fcvt.s.d fa5,fa5 fsw fa5,-168(s0) flw fa5,-208(s0) fcvt.d.s fa4,fa5 lla a5,.LC0 fld fa5,0(a5) fmul.d fa5,fa4,fa5 fcvt.s.d fa5,fa5 fsw fa5,-164(s0) ld a5,-40(s0) addi a5,a5,16 flw fa4,-188(s0) flw fa5,-172(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-188(s0) flw fa5,-172(s0) fadd.s fa5,fa4,fa5 ld a5,-40(s0) fsw fa5,0(a5) ld a5,-40(s0) addi a5,a5,24 flw fa4,-192(s0) flw fa5,-176(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) ld a5,-40(s0) addi a5,a5,8 flw fa4,-192(s0) flw fa5,-176(s0) fadd.s fa5,fa4,fa5 fsw fa5,0(a5) ld a5,-32(s0) addi a5,a5,16 flw fa4,-180(s0) flw fa5,-164(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-180(s0) flw fa5,-164(s0) fadd.s fa5,fa4,fa5 ld a5,-32(s0) fsw fa5,0(a5) ld a5,-32(s0) addi a5,a5,24 flw fa4,-184(s0) flw fa5,-168(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) ld a5,-32(s0) addi a5,a5,8 flw fa4,-184(s0) flw fa5,-168(s0) fadd.s fa5,fa4,fa5 fsw fa5,0(a5) ld a5,-40(s0) addi a5,a5,32 sd a5,-40(s0) ld a5,-32(s0) addi a5,a5,32 sd a5,-32(s0) .L13: ld a4,-40(s0) ld a5,-24(s0) bltu a4,a5,.L14 .L12: lw a5,-268(s0) sext.w a4,a5 li a5,15 ble a4,a5,.L28 .L15: lw a5,-256(s0) addiw a5,a5,2 sw a5,-256(s0) lw a5,-256(s0) mv a4,a5 li a5,1 sllw a5,a5,a4 sw a5,-252(s0) lw a5,-252(s0) slliw a5,a5,1 sw a5,-248(s0) lw a5,-248(s0) slliw a5,a5,1 sw a5,-144(s0) lw a5,-248(s0) mv a4,a5 lw a5,-252(s0) addw a5,a4,a5 sw a5,-140(s0) lw a5,-252(s0) sraiw a5,a5,1 sw a5,-136(s0) ld a5,-264(s0) sd a5,-40(s0) lw a5,-136(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 sd a5,-32(s0) lw a5,-268(s0) slli a5,a5,2 ld a4,-264(s0) add a5,a4,a5 sd a5,-24(s0) .L17: ld a5,-40(s0) flw fa4,0(a5) lw a5,-252(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa5,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,-132(s0) ld a5,-40(s0) flw fa4,0(a5) lw a5,-252(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fsw fa5,-128(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,0(a5) lw a5,-140(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa5,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,-124(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,0(a5) lw a5,-140(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fsw fa5,-120(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,-128(s0) flw fa5,-120(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-128(s0) flw fa5,-120(s0) fadd.s fa5,fa4,fa5 ld a5,-40(s0) fsw fa5,0(a5) lw a5,-140(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,-132(s0) flw fa5,-124(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-252(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,-132(s0) flw fa5,-124(s0) fadd.s fa5,fa4,fa5 fsw fa5,0(a5) ld a5,-32(s0) flw fa4,0(a5) lw a5,-252(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa5,0(a5) fsub.s fa5,fa4,fa5 fsw fa5,-116(s0) ld a5,-32(s0) flw fa4,0(a5) lw a5,-252(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa5,0(a5) fadd.s fa5,fa4,fa5 fsw fa5,-112(s0) lw a5,-140(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa5,0(a5) fcvt.d.s fa4,fa5 lla a5,.LC0 fld fa5,0(a5) fmul.d fa5,fa4,fa5 fcvt.s.d fa5,fa5 fsw fa5,-108(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa5,0(a5) fcvt.d.s fa4,fa5 lla a5,.LC0 fld fa5,0(a5) fmul.d fa5,fa4,fa5 fcvt.s.d fa5,fa5 fsw fa5,-104(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa4,-112(s0) flw fa5,-104(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-112(s0) flw fa5,-104(s0) fadd.s fa5,fa4,fa5 ld a5,-32(s0) fsw fa5,0(a5) lw a5,-140(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa4,-116(s0) flw fa5,-108(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-252(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa4,-116(s0) flw fa5,-108(s0) fadd.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-144(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 sd a5,-32(s0) lw a5,-144(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 sd a5,-40(s0) ld a4,-40(s0) ld a5,-24(s0) bltu a4,a5,.L17 li a5,2 sw a5,-236(s0) j .L18 .L19: lla a4,costab lw a5,-236(s0) slli a5,a5,2 add a5,a4,a5 flw fa5,0(a5) lla a4,coswrk lw a5,-236(s0) slli a5,a5,2 add a5,a4,a5 fsw fa5,0(a5) lla a4,sintab lw a5,-236(s0) slli a5,a5,2 add a5,a4,a5 flw fa5,0(a5) lla a4,sinwrk lw a5,-236(s0) slli a5,a5,2 add a5,a4,a5 fsw fa5,0(a5) lw a5,-236(s0) addiw a5,a5,1 sw a5,-236(s0) .L18: lw a5,-236(s0) mv a4,a5 lw a5,-256(s0) sext.w a4,a4 sext.w a5,a5 ble a4,a5,.L19 sw zero,-244(s0) lla a5,.LC1 flw fa5,0(a5) fsw fa5,-100(s0) sw zero,-96(s0) li a5,1 sw a5,-240(s0) j .L20 .L27: lw a5,-244(s0) addiw a5,a5,1 sw a5,-244(s0) sw zero,-232(s0) j .L21 .L22: lw a5,-232(s0) addiw a5,a5,1 sw a5,-232(s0) .L21: lw a5,-232(s0) lw a4,-244(s0) sraw a5,a4,a5 sext.w a5,a5 andi a5,a5,1 sext.w a5,a5 beq a5,zero,.L22 lw a5,-256(s0) mv a4,a5 lw a5,-232(s0) subw a5,a4,a5 sw a5,-232(s0) lla a4,sinwrk lw a5,-232(s0) slli a5,a5,2 add a5,a4,a5 flw fa5,0(a5) fsw fa5,-96(s0) lla a4,coswrk lw a5,-232(s0) slli a5,a5,2 add a5,a4,a5 flw fa5,0(a5) fsw fa5,-100(s0) lw a5,-232(s0) sext.w a4,a5 li a5,1 ble a4,a5,.L23 lw a5,-256(s0) mv a4,a5 lw a5,-232(s0) subw a5,a4,a5 sext.w a5,a5 addiw a5,a5,2 sw a5,-228(s0) j .L24 .L25: lw a5,-228(s0) addiw a5,a5,1 sw a5,-228(s0) .L24: lw a5,-228(s0) lw a4,-244(s0) sraw a5,a4,a5 sext.w a5,a5 andi a5,a5,1 sext.w a5,a5 bne a5,zero,.L25 lw a5,-256(s0) mv a4,a5 lw a5,-228(s0) subw a5,a4,a5 sw a5,-228(s0) lla a4,halsec lw a5,-232(s0) slli a5,a5,2 add a5,a4,a5 flw fa4,0(a5) lw a5,-232(s0) addiw a5,a5,-1 sext.w a5,a5 lla a4,sinwrk slli a5,a5,2 add a5,a4,a5 flw fa3,0(a5) lla a4,sinwrk lw a5,-228(s0) slli a5,a5,2 add a5,a4,a5 flw fa5,0(a5) fadd.s fa5,fa3,fa5 fmul.s fa5,fa4,fa5 lla a4,sinwrk lw a5,-232(s0) slli a5,a5,2 add a5,a4,a5 fsw fa5,0(a5) lla a4,halsec lw a5,-232(s0) slli a5,a5,2 add a5,a4,a5 flw fa4,0(a5) lw a5,-232(s0) addiw a5,a5,-1 sext.w a5,a5 lla a4,coswrk slli a5,a5,2 add a5,a4,a5 flw fa3,0(a5) lla a4,coswrk lw a5,-228(s0) slli a5,a5,2 add a5,a4,a5 flw fa5,0(a5) fadd.s fa5,fa3,fa5 fmul.s fa5,fa4,fa5 lla a4,coswrk lw a5,-232(s0) slli a5,a5,2 add a5,a4,a5 fsw fa5,0(a5) .L23: flw fa5,-100(s0) fmul.s fa4,fa5,fa5 flw fa5,-96(s0) fmul.s fa5,fa5,fa5 fsub.s fa5,fa4,fa5 fsw fa5,-92(s0) flw fa4,-100(s0) flw fa5,-96(s0) fmul.s fa5,fa4,fa5 fadd.s fa5,fa5,fa5 fsw fa5,-88(s0) lw a5,-268(s0) slli a5,a5,2 ld a4,-264(s0) add a5,a4,a5 sd a5,-24(s0) lw a5,-240(s0) slli a5,a5,2 ld a4,-264(s0) add a5,a4,a5 sd a5,-40(s0) lw a4,-252(s0) lw a5,-240(s0) sub a5,a4,a5 slli a5,a5,2 ld a4,-264(s0) add a5,a4,a5 sd a5,-32(s0) .L26: lw a5,-252(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,0(a5) flw fa5,-88(s0) fmul.s fa4,fa4,fa5 lw a5,-252(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa3,0(a5) flw fa5,-92(s0) fmul.s fa5,fa3,fa5 fsub.s fa5,fa4,fa5 fsw fa5,-84(s0) lw a5,-252(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,0(a5) flw fa5,-92(s0) fmul.s fa4,fa4,fa5 lw a5,-252(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa3,0(a5) flw fa5,-88(s0) fmul.s fa5,fa3,fa5 fadd.s fa5,fa4,fa5 fsw fa5,-80(s0) ld a5,-40(s0) flw fa4,0(a5) flw fa5,-80(s0) fsub.s fa5,fa4,fa5 fsw fa5,-76(s0) ld a5,-40(s0) flw fa5,0(a5) flw fa4,-80(s0) fadd.s fa5,fa4,fa5 fsw fa5,-72(s0) ld a5,-32(s0) flw fa4,0(a5) flw fa5,-84(s0) fsub.s fa5,fa4,fa5 fsw fa5,-68(s0) ld a5,-32(s0) flw fa5,0(a5) flw fa4,-84(s0) fadd.s fa5,fa4,fa5 fsw fa5,-64(s0) lw a5,-140(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,0(a5) flw fa5,-88(s0) fmul.s fa4,fa4,fa5 lw a5,-140(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa3,0(a5) flw fa5,-92(s0) fmul.s fa5,fa3,fa5 fsub.s fa5,fa4,fa5 fsw fa5,-84(s0) lw a5,-140(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,0(a5) flw fa5,-92(s0) fmul.s fa4,fa4,fa5 lw a5,-140(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa3,0(a5) flw fa5,-88(s0) fmul.s fa5,fa3,fa5 fadd.s fa5,fa4,fa5 fsw fa5,-80(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,0(a5) flw fa5,-80(s0) fsub.s fa5,fa4,fa5 fsw fa5,-60(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa5,0(a5) flw fa4,-80(s0) fadd.s fa5,fa4,fa5 fsw fa5,-56(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa4,0(a5) flw fa5,-84(s0) fsub.s fa5,fa4,fa5 fsw fa5,-52(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa5,0(a5) flw fa4,-84(s0) fadd.s fa5,fa4,fa5 fsw fa5,-48(s0) flw fa4,-96(s0) flw fa5,-56(s0) fmul.s fa4,fa4,fa5 flw fa3,-100(s0) flw fa5,-52(s0) fmul.s fa5,fa3,fa5 fsub.s fa5,fa4,fa5 fsw fa5,-84(s0) flw fa4,-100(s0) flw fa5,-56(s0) fmul.s fa4,fa4,fa5 flw fa3,-96(s0) flw fa5,-52(s0) fmul.s fa5,fa3,fa5 fadd.s fa5,fa4,fa5 fsw fa5,-80(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,-72(s0) flw fa5,-80(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-72(s0) flw fa5,-80(s0) fadd.s fa5,fa4,fa5 ld a5,-40(s0) fsw fa5,0(a5) lw a5,-140(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa4,-68(s0) flw fa5,-84(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-252(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa4,-68(s0) flw fa5,-84(s0) fadd.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-100(s0) flw fa5,-48(s0) fmul.s fa4,fa4,fa5 flw fa3,-96(s0) flw fa5,-60(s0) fmul.s fa5,fa3,fa5 fsub.s fa5,fa4,fa5 fsw fa5,-84(s0) flw fa4,-96(s0) flw fa5,-48(s0) fmul.s fa4,fa4,fa5 flw fa3,-100(s0) flw fa5,-60(s0) fmul.s fa5,fa3,fa5 fadd.s fa5,fa4,fa5 fsw fa5,-80(s0) lw a5,-248(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 flw fa4,-64(s0) flw fa5,-80(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-64(s0) flw fa5,-80(s0) fadd.s fa5,fa4,fa5 ld a5,-32(s0) fsw fa5,0(a5) lw a5,-140(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,-76(s0) flw fa5,-84(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-252(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 flw fa4,-76(s0) flw fa5,-84(s0) fadd.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-144(s0) slli a5,a5,2 ld a4,-32(s0) add a5,a4,a5 sd a5,-32(s0) lw a5,-144(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 sd a5,-40(s0) ld a4,-40(s0) ld a5,-24(s0) bltu a4,a5,.L26 lw a5,-240(s0) addiw a5,a5,1 sw a5,-240(s0) .L20: lw a5,-240(s0) mv a4,a5 lw a5,-136(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L27 lw a5,-144(s0) mv a4,a5 lw a5,-268(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L15 j .L1 .L28: nop .L1: ld s0,264(sp) addi sp,sp,272 jr ra .size mayer_fht, .-mayer_fht .align 1 .globl mayer_fft .type mayer_fft, @function mayer_fft: addi sp,sp,-96 sd ra,88(sp) sd s0,80(sp) addi s0,sp,96 mv a5,a0 sd a1,-80(s0) sd a2,-88(s0) sw a5,-68(s0) li a5,1 sw a5,-60(s0) lw a5,-68(s0) addiw a5,a5,-1 sw a5,-56(s0) lw a5,-68(s0) srliw a4,a5,31 addw a5,a4,a5 sraiw a5,a5,1 sw a5,-52(s0) j .L30 .L31: lw a5,-60(s0) slli a5,a5,2 ld a4,-80(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-48(s0) lw a5,-56(s0) slli a5,a5,2 ld a4,-80(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-44(s0) flw fa4,-48(s0) flw fa5,-44(s0) fadd.s fa5,fa4,fa5 fsw fa5,-40(s0) flw fa4,-48(s0) flw fa5,-44(s0) fsub.s fa5,fa4,fa5 fsw fa5,-36(s0) lw a5,-60(s0) slli a5,a5,2 ld a4,-88(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-32(s0) lw a5,-56(s0) slli a5,a5,2 ld a4,-88(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-28(s0) flw fa4,-32(s0) flw fa5,-28(s0) fadd.s fa5,fa4,fa5 fsw fa5,-24(s0) flw fa4,-32(s0) flw fa5,-28(s0) fsub.s fa5,fa4,fa5 fsw fa5,-20(s0) flw fa4,-40(s0) flw fa5,-20(s0) fadd.s fa4,fa4,fa5 lw a5,-60(s0) slli a5,a5,2 ld a4,-80(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-40(s0) flw fa5,-20(s0) fsub.s fa4,fa4,fa5 lw a5,-56(s0) slli a5,a5,2 ld a4,-80(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-24(s0) flw fa5,-36(s0) fsub.s fa4,fa4,fa5 lw a5,-60(s0) slli a5,a5,2 ld a4,-88(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-24(s0) flw fa5,-36(s0) fadd.s fa4,fa4,fa5 lw a5,-56(s0) slli a5,a5,2 ld a4,-88(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-60(s0) addiw a5,a5,1 sw a5,-60(s0) lw a5,-56(s0) addiw a5,a5,-1 sw a5,-56(s0) .L30: lw a5,-60(s0) mv a4,a5 lw a5,-52(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L31 lw a5,-68(s0) mv a1,a5 ld a0,-80(s0) call mayer_fht lw a5,-68(s0) mv a1,a5 ld a0,-88(s0) call mayer_fht nop ld ra,88(sp) ld s0,80(sp) addi sp,sp,96 jr ra .size mayer_fft, .-mayer_fft .align 1 .globl mayer_ifft .type mayer_ifft, @function mayer_ifft: addi sp,sp,-96 sd ra,88(sp) sd s0,80(sp) addi s0,sp,96 mv a5,a0 sd a1,-80(s0) sd a2,-88(s0) sw a5,-68(s0) lw a5,-68(s0) mv a1,a5 ld a0,-80(s0) call mayer_fht lw a5,-68(s0) mv a1,a5 ld a0,-88(s0) call mayer_fht li a5,1 sw a5,-60(s0) lw a5,-68(s0) addiw a5,a5,-1 sw a5,-56(s0) lw a5,-68(s0) srliw a4,a5,31 addw a5,a4,a5 sraiw a5,a5,1 sw a5,-52(s0) j .L33 .L34: lw a5,-60(s0) slli a5,a5,2 ld a4,-80(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-48(s0) lw a5,-56(s0) slli a5,a5,2 ld a4,-80(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-44(s0) flw fa4,-48(s0) flw fa5,-44(s0) fadd.s fa5,fa4,fa5 fsw fa5,-40(s0) flw fa4,-48(s0) flw fa5,-44(s0) fsub.s fa5,fa4,fa5 fsw fa5,-36(s0) lw a5,-60(s0) slli a5,a5,2 ld a4,-88(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-32(s0) lw a5,-56(s0) slli a5,a5,2 ld a4,-88(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-28(s0) flw fa4,-32(s0) flw fa5,-28(s0) fadd.s fa5,fa4,fa5 fsw fa5,-24(s0) flw fa4,-32(s0) flw fa5,-28(s0) fsub.s fa5,fa4,fa5 fsw fa5,-20(s0) flw fa4,-24(s0) flw fa5,-36(s0) fadd.s fa4,fa4,fa5 lw a5,-60(s0) slli a5,a5,2 ld a4,-88(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-24(s0) flw fa5,-36(s0) fsub.s fa4,fa4,fa5 lw a5,-56(s0) slli a5,a5,2 ld a4,-88(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-40(s0) flw fa5,-20(s0) fsub.s fa4,fa4,fa5 lw a5,-60(s0) slli a5,a5,2 ld a4,-80(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-40(s0) flw fa5,-20(s0) fadd.s fa4,fa4,fa5 lw a5,-56(s0) slli a5,a5,2 ld a4,-80(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-60(s0) addiw a5,a5,1 sw a5,-60(s0) lw a5,-56(s0) addiw a5,a5,-1 sw a5,-56(s0) .L33: lw a5,-60(s0) mv a4,a5 lw a5,-52(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L34 nop nop ld ra,88(sp) ld s0,80(sp) addi sp,sp,96 jr ra .size mayer_ifft, .-mayer_ifft .align 1 .globl mayer_realfft .type mayer_realfft, @function mayer_realfft: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 mv a5,a0 sd a1,-64(s0) sw a5,-52(s0) lw a5,-52(s0) mv a1,a5 ld a0,-64(s0) call mayer_fht li a5,1 sw a5,-36(s0) lw a5,-52(s0) addiw a5,a5,-1 sw a5,-32(s0) lw a5,-52(s0) srliw a4,a5,31 addw a5,a4,a5 sraiw a5,a5,1 sw a5,-28(s0) j .L36 .L37: lw a5,-36(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-24(s0) lw a5,-32(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-20(s0) flw fa4,-24(s0) flw fa5,-20(s0) fsub.s fa4,fa4,fa5 lw a5,-32(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) flw fa4,-24(s0) flw fa5,-20(s0) fadd.s fa4,fa4,fa5 lw a5,-36(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 lla a4,.LC2 flw fa5,0(a4) fmul.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-36(s0) addiw a5,a5,1 sw a5,-36(s0) lw a5,-32(s0) addiw a5,a5,-1 sw a5,-32(s0) .L36: lw a5,-36(s0) mv a4,a5 lw a5,-28(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L37 nop nop ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .size mayer_realfft, .-mayer_realfft .align 1 .globl mayer_realifft .type mayer_realifft, @function mayer_realifft: addi sp,sp,-64 sd ra,56(sp) sd s0,48(sp) addi s0,sp,64 mv a5,a0 sd a1,-64(s0) sw a5,-52(s0) li a5,1 sw a5,-36(s0) lw a5,-52(s0) addiw a5,a5,-1 sw a5,-32(s0) lw a5,-52(s0) srliw a4,a5,31 addw a5,a4,a5 sraiw a5,a5,1 sw a5,-28(s0) j .L39 .L40: lw a5,-36(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-24(s0) lw a5,-32(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 flw fa5,0(a5) fsw fa5,-20(s0) lw a5,-32(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 flw fa4,-24(s0) flw fa5,-20(s0) fsub.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-36(s0) slli a5,a5,2 ld a4,-64(s0) add a5,a4,a5 flw fa4,-24(s0) flw fa5,-20(s0) fadd.s fa5,fa4,fa5 fsw fa5,0(a5) lw a5,-36(s0) addiw a5,a5,1 sw a5,-36(s0) lw a5,-32(s0) addiw a5,a5,-1 sw a5,-32(s0) .L39: lw a5,-36(s0) mv a4,a5 lw a5,-28(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L40 lw a5,-52(s0) mv a1,a5 ld a0,-64(s0) call mayer_fht nop ld ra,56(sp) ld s0,48(sp) addi sp,sp,64 jr ra .size mayer_realifft, .-mayer_realifft .section .rodata .align 3 .LC0: .word 1719614413 .word 1073127582 .align 2 .LC1: .word 1065353216 .align 2 .LC2: .word 1056964608 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "d_mayer_fft.c" .option pic .text .align 1 .globl mayer_fht .type mayer_fht, @function mayer_fht: addi sp,sp,-96 sd s0,88(sp) sd s1,80(sp) sd s2,72(sp) sd s3,64(sp) sd s4,56(sp) sd s5,48(sp) sd s6,40(sp) sd s7,32(sp) sd s8,24(sp) sd s9,16(sp) sd s10,8(sp) sd s11,0(sp) mv s5,a0 mv s6,a1 li a5,1 ble a1,a5,.L3 sraiw a1,a1,1 addi a0,a0,4 mv a3,a1 li a2,1 .L28: addiw a2,a2,1 beq s6,a2,.L42 xor a3,a1,a3 and a5,a1,a3 sext.w a5,a5 bne a5,zero,.L4 mv a5,a1 .L5: sraiw a5,a5,1 xor a3,a5,a3 and a4,a3,a5 sext.w a4,a4 beq a4,zero,.L5 .L4: addi a0,a0,4 bge a3,a2,.L28 flw fa5,0(a0) slli a5,a3,2 add a5,s5,a5 flw fa4,0(a5) fsw fa4,0(a0) fsw fa5,0(a5) j .L28 .L42: li s0,0 li a4,1 .L8: addiw s0,s0,1 sllw a5,a4,s0 blt a5,a2,.L8 andi s0,s0,1 beq s0,zero,.L3 slli a4,a2,2 add a4,s5,a4 bgeu s5,a4,.L10 mv a5,s5 fld ft5,.LC0,a3 .L12: flw fa5,0(a5) flw fa4,4(a5) fsub.s fa2,fa5,fa4 fadd.s fa3,fa5,fa4 flw fa5,8(a5) flw fa4,12(a5) fsub.s ft1,fa5,fa4 fadd.s fa0,fa5,fa4 flw fa4,16(a5) flw ft2,20(a5) fadd.s fa1,fa4,ft2 flw fa5,24(a5) flw ft3,28(a5) fadd.s ft4,fa5,ft3 fsub.s ft0,fa3,fa0 fadd.s fa3,fa3,fa0 fsub.s fa0,fa2,ft1 fadd.s fa2,fa2,ft1 fsub.s ft1,fa1,ft4 fadd.s fa1,fa1,ft4 fsub.s fa5,fa5,ft3 fcvt.d.s fa5,fa5 fmul.d fa5,fa5,ft5 fcvt.s.d fa5,fa5 fsub.s fa4,fa4,ft2 fcvt.d.s fa4,fa4 fmul.d fa4,fa4,ft5 fcvt.s.d fa4,fa4 fsub.s ft2,fa3,fa1 fsw ft2,16(a5) fadd.s fa3,fa3,fa1 fsw fa3,0(a5) fsub.s fa3,ft0,ft1 fsw fa3,24(a5) fadd.s ft0,ft0,ft1 fsw ft0,8(a5) fsub.s fa3,fa2,fa4 fsw fa3,20(a5) fadd.s fa2,fa2,fa4 fsw fa2,4(a5) fsub.s fa4,fa0,fa5 fsw fa4,28(a5) fadd.s fa0,fa0,fa5 fsw fa0,12(a5) addi a5,a5,32 bgtu a4,a5,.L12 j .L10 .L3: slli a4,s6,2 add a4,s5,a4 bgeu s5,a4,.L29 mv a5,s5 .L11: flw fa5,0(a5) flw fa4,4(a5) fsub.s fa3,fa5,fa4 fadd.s fa5,fa5,fa4 flw fa4,8(a5) flw fa1,12(a5) fsub.s fa2,fa4,fa1 fadd.s fa4,fa4,fa1 fsub.s fa1,fa5,fa4 fsw fa1,8(a5) fadd.s fa5,fa5,fa4 fsw fa5,0(a5) fsub.s fa5,fa3,fa2 fsw fa5,12(a5) fadd.s fa3,fa3,fa2 fsw fa3,4(a5) addi a5,a5,16 bgtu a4,a5,.L11 li s0,0 .L10: li a5,15 ble s6,a5,.L1 slli t6,s6,2 add t6,s5,t6 li s10,1 fld fa6,.LC0,a5 li s4,1 lla s11,.LANCHOR0+12 li s9,0 lla s2,.LANCHOR1 lla s7,.LANCHOR0 j .L26 .L29: li s0,0 j .L10 .L30: mv a4,s9 j .L19 .L22: subw a4,s0,a4 slli a3,a7,2 add a2,s7,a3 flw fa4,160(a2) addiw a2,a6,-1 add a3,s2,a3 slli a2,a2,2 add a2,s2,a2 slli a4,a4,2 add a4,s2,a4 flw fa5,80(a2) flw fa3,80(a4) fadd.s fa5,fa5,fa3 fmul.s fa5,fa5,fa4 fsw fa5,80(a3) flw fa5,0(a2) flw fa3,0(a4) fadd.s fa5,fa5,fa3 fmul.s fa5,fa5,fa4 fsw fa5,0(a3) .L21: fmul.s fa5,ft5,ft5 fmul.s ft3,ft6,ft6 fsub.s ft3,fa5,ft3 fmul.s ft4,ft6,ft5 fadd.s ft4,ft4,ft4 mv a4,t2 mv t4,t0 add t3,s1,t2 add t1,s1,t0 add a7,a1,t2 add a6,a1,t0 add a2,a0,t2 add a3,a0,t0 .L24: flw fa5,0(t3) flw fa4,0(t1) fmul.s fa3,fa5,ft4 fmul.s fa2,fa4,ft3 fsub.s fa3,fa3,fa2 fmul.s fa5,fa5,ft3 fmul.s fa4,fa4,ft4 fadd.s fa4,fa5,fa4 flw fa5,0(a4) fsub.s fa1,fa5,fa4 fadd.s fa2,fa5,fa4 flw fa5,0(t4) fsub.s ft0,fa5,fa3 fadd.s fa3,fa5,fa3 flw fa5,0(a7) flw fa4,0(a6) fmul.s ft1,fa5,ft4 fmul.s fa0,fa4,ft3 fsub.s ft1,ft1,fa0 fmul.s fa5,fa5,ft3 fmul.s fa4,fa4,ft4 fadd.s fa4,fa5,fa4 flw fa5,0(a2) fsub.s fa0,fa5,fa4 fadd.s fa4,fa5,fa4 flw fa5,0(a3) fsub.s ft2,fa5,ft1 fadd.s fa5,fa5,ft1 fmul.s ft1,ft6,fa4 fmul.s ft7,ft5,ft2 fsub.s ft1,ft1,ft7 fmul.s fa4,ft5,fa4 fmul.s ft2,ft6,ft2 fadd.s fa4,fa4,ft2 fsub.s ft2,fa2,fa4 fsw ft2,0(a2) fadd.s fa2,fa2,fa4 fsw fa2,0(a4) fsub.s fa4,ft0,ft1 fsw fa4,0(a6) fadd.s ft0,ft0,ft1 fsw ft0,0(t1) fmul.s fa4,ft5,fa5 fmul.s fa2,ft6,fa0 fsub.s fa4,fa4,fa2 fmul.s fa5,ft6,fa5 fmul.s fa0,ft5,fa0 fadd.s fa5,fa5,fa0 fsub.s fa2,fa3,fa5 fsw fa2,0(a3) fadd.s fa5,fa3,fa5 fsw fa5,0(t4) fsub.s fa5,fa1,fa4 fsw fa5,0(a7) fadd.s fa1,fa1,fa4 fsw fa1,0(t3) add t4,t4,a5 add a4,a4,a5 add t3,t3,a5 add t1,t1,a5 add a7,a7,a5 add a6,a6,a5 add a2,a2,a5 add a3,a3,a5 bgtu t6,a4,.L24 beq t5,s3,.L18 addiw t5,t5,1 andi a4,t5,1 bne a4,zero,.L30 .L20: addiw a4,a4,1 sraw a3,t5,a4 andi a3,a3,1 beq a3,zero,.L20 .L19: addi t2,t2,4 addi t0,t0,-4 .L27: subw a6,s0,a4 sext.w a7,a6 slli a2,a7,2 add a2,s2,a2 flw ft6,80(a2) flw ft5,0(a2) ble a7,s4,.L21 addiw a4,a4,2 sraw a3,t5,a4 andi a3,a3,1 beq a3,zero,.L22 .L23: addiw a4,a4,1 sraw a3,t5,a4 andi a3,a3,1 bne a3,zero,.L23 j .L22 .L18: ble s6,s8,.L1 .L26: mv t4,s0 addiw s0,s0,2 sllw a5,s10,s0 sext.w t5,a5 slliw a4,a5,1 sext.w a0,a4 slliw s8,a5,2 sraiw s3,a5,1 sext.w t0,s3 slli t2,t0,2 add t2,s5,t2 slli s1,t5,2 slli a0,a0,2 addw a5,a5,a4 slli a1,a5,2 slli a5,s8,2 add t3,s5,s1 add t1,s5,a0 add a7,s5,a1 add a6,t2,s1 add a2,t2,a1 add a3,t2,a0 mv a4,s5 .L14: flw fa5,0(a4) flw fa4,0(t3) fsub.s fa3,fa5,fa4 fadd.s fa5,fa5,fa4 flw fa4,0(t1) flw fa1,0(a7) fsub.s fa2,fa4,fa1 fadd.s fa4,fa4,fa1 fsub.s fa1,fa5,fa4 fsw fa1,0(t1) fadd.s fa5,fa5,fa4 fsw fa5,0(a4) fsub.s fa5,fa3,fa2 fsw fa5,0(a7) fadd.s fa3,fa3,fa2 fsw fa3,0(t3) flw fa5,0(t2) flw fa4,0(a6) fsub.s fa2,fa5,fa4 fadd.s fa3,fa5,fa4 flw fa5,0(a2) fcvt.d.s fa5,fa5 fmul.d fa5,fa5,fa6 fcvt.s.d fa5,fa5 flw fa4,0(a3) fcvt.d.s fa4,fa4 fmul.d fa4,fa4,fa6 fcvt.s.d fa4,fa4 fsub.s fa1,fa3,fa4 fsw fa1,0(a3) fadd.s fa3,fa3,fa4 fsw fa3,0(t2) fsub.s fa4,fa2,fa5 fsw fa4,0(a2) fadd.s fa2,fa2,fa5 fsw fa2,0(a6) add t2,t2,a5 add a4,a4,a5 add t3,t3,a5 add t1,t1,a5 add a7,a7,a5 add a6,a6,a5 add a2,a2,a5 add a3,a3,a5 bgtu t6,a4,.L14 ble s0,s4,.L15 lla a4,.LANCHOR0+8 lla a6,.LANCHOR1+8 lla a2,.LANCHOR0+88 lla a3,.LANCHOR1+88 slli t1,t4,32 srli a7,t1,30 add a7,a7,s11 .L16: flw fa5,0(a4) fsw fa5,0(a6) flw fa5,0(a2) fsw fa5,0(a3) addi a4,a4,4 addi a6,a6,4 addi a2,a2,4 addi a3,a3,4 bne a4,a7,.L16 .L15: ble t0,s4,.L18 addi t2,s5,4 addi t0,t5,-1 slli t0,t0,2 add t0,s5,t0 addiw s3,s3,-1 mv t5,s4 mv a4,s9 j .L27 .L1: ld s0,88(sp) ld s1,80(sp) ld s2,72(sp) ld s3,64(sp) ld s4,56(sp) ld s5,48(sp) ld s6,40(sp) ld s7,32(sp) ld s8,24(sp) ld s9,16(sp) ld s10,8(sp) ld s11,0(sp) addi sp,sp,96 jr ra .size mayer_fht, .-mayer_fht .align 1 .globl mayer_fft .type mayer_fft, @function mayer_fft: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) mv s0,a0 mv a0,a1 mv s1,a2 srliw t1,s0,31 addw t1,t1,s0 li a4,3 ble s0,a4,.L44 addiw a5,s0,-1 sraiw t1,t1,1 addi a6,a1,4 slli a5,a5,2 add a3,a1,a5 addi a4,a2,4 add a5,a2,a5 li a7,1 flw fa2,.LC1,a2 .L45: flw fa5,0(a6) flw fa3,0(a3) fadd.s fa4,fa5,fa3 fsub.s fa5,fa5,fa3 flw fa3,0(a4) flw fa1,0(a5) fadd.s fa0,fa3,fa1 fsub.s fa3,fa3,fa1 fadd.s fa1,fa4,fa3 fmul.s fa1,fa1,fa2 fsw fa1,0(a6) fsub.s fa4,fa4,fa3 fmul.s fa4,fa4,fa2 fsw fa4,0(a3) fsub.s fa4,fa0,fa5 fmul.s fa4,fa4,fa2 fsw fa4,0(a4) fadd.s fa5,fa5,fa0 fmul.s fa5,fa5,fa2 fsw fa5,0(a5) addiw a7,a7,1 addi a6,a6,4 addi a3,a3,-4 addi a4,a4,4 addi a5,a5,-4 bgt t1,a7,.L45 .L44: mv a1,s0 call mayer_fht mv a1,s0 mv a0,s1 call mayer_fht ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size mayer_fft, .-mayer_fft .align 1 .globl mayer_ifft .type mayer_ifft, @function mayer_ifft: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) mv s2,a0 mv s1,a1 mv s0,a2 mv a1,a0 mv a0,s1 call mayer_fht mv a1,s2 mv a0,s0 call mayer_fht srliw a6,s2,31 addw a6,a6,s2 li a5,3 ble s2,a5,.L48 addiw a3,s2,-1 sraiw a6,a6,1 addi a4,s1,4 slli a3,a3,2 add a1,s1,a3 addi a5,s0,4 add a2,s0,a3 li a3,1 flw fa1,.LC1,a0 .L50: flw fa4,0(a4) flw fa3,0(a1) fadd.s fa5,fa4,fa3 fsub.s fa2,fa4,fa3 flw fa3,0(a5) flw fa0,0(a2) fadd.s fa4,fa3,fa0 fsub.s fa3,fa3,fa0 fadd.s fa0,fa2,fa4 fmul.s fa0,fa0,fa1 fsw fa0,0(a5) fsub.s fa4,fa4,fa2 fmul.s fa4,fa4,fa1 fsw fa4,0(a2) fsub.s fa4,fa5,fa3 fmul.s fa4,fa4,fa1 fsw fa4,0(a4) fadd.s fa5,fa5,fa3 fmul.s fa5,fa5,fa1 fsw fa5,0(a1) addiw a3,a3,1 addi a4,a4,4 addi a1,a1,-4 addi a5,a5,4 addi a2,a2,-4 bgt a6,a3,.L50 .L48: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .size mayer_ifft, .-mayer_ifft .align 1 .globl mayer_realfft .type mayer_realfft, @function mayer_realfft: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) mv s1,a0 mv s0,a1 mv a1,a0 mv a0,s0 call mayer_fht srliw a3,s1,31 addw a3,a3,s1 li a5,3 ble s1,a5,.L53 addiw a4,s1,-1 sraiw a3,a3,1 addi a5,s0,4 slli a4,a4,2 add a1,s0,a4 li a4,1 flw fa2,.LC1,a2 .L55: flw fa5,0(a5) flw fa3,0(a1) fsub.s fa4,fa5,fa3 fmul.s fa4,fa4,fa2 fsw fa4,0(a1) fadd.s fa5,fa5,fa3 fmul.s fa5,fa5,fa2 fsw fa5,0(a5) addiw a4,a4,1 addi a5,a5,4 addi a1,a1,-4 bgt a3,a4,.L55 .L53: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size mayer_realfft, .-mayer_realfft .align 1 .globl mayer_realifft .type mayer_realifft, @function mayer_realifft: addi sp,sp,-16 sd ra,8(sp) mv a6,a0 mv a0,a1 srliw a2,a6,31 addw a2,a2,a6 li a4,3 ble a6,a4,.L59 addiw a5,a6,-1 sraiw a2,a2,1 addi a4,a1,4 slli a5,a5,2 add a5,a1,a5 li a3,1 .L60: flw fa5,0(a4) flw fa4,0(a5) fsub.s fa3,fa5,fa4 fsw fa3,0(a5) fadd.s fa5,fa5,fa4 fsw fa5,0(a4) addiw a3,a3,1 addi a4,a4,4 addi a5,a5,-4 bgt a2,a3,.L60 .L59: mv a1,a6 call mayer_fht ld ra,8(sp) addi sp,sp,16 jr ra .size mayer_realifft, .-mayer_realifft .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 1719614413 .word 1073127582 .section .rodata.cst4,"aM",@progbits,4 .align 2 .LC1: .word 1056964608 .section .rodata .align 3 .set .LANCHOR0,. + 0 .type costab, @object .size costab, 80 costab: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sintab, @object .size sintab, 80 sintab: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .type halsec, @object .size halsec, 80 halsec: .word 0 .word 0 .word 1057655764 .word 1057128951 .word 1057005197 .word 1056974725 .word 1056967135 .word 1056965240 .word 1056964766 .word 1056964647 .word 1056964618 .word 1056964610 .word 1056964609 .word 1056964608 .word 1056964608 .word 1056964608 .zero 16 .data .align 3 .set .LANCHOR1,. + 0 .type coswrk, @object .size coswrk, 80 coswrk: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sinwrk, @object .size sinwrk, 80 sinwrk: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "d_mayer_fft.c" .option pic .text .align 1 .globl mayer_fht .type mayer_fht, @function mayer_fht: addi sp,sp,-112 sd s5,64(sp) sd s7,48(sp) sd s0,104(sp) sd s1,96(sp) sd s2,88(sp) sd s3,80(sp) sd s4,72(sp) sd s6,56(sp) sd s8,40(sp) sd s9,32(sp) sd s10,24(sp) sd s11,16(sp) li a5,1 mv s7,a1 mv s5,a0 ble a1,a5,.L3 srai a1,a1,1 addi a0,a0,4 mv a3,a1 li a2,1 .L28: addiw a2,a2,1 beq s7,a2,.L49 .L7: xor a3,a1,a3 and a5,a1,a3 sext.w a5,a5 bne a5,zero,.L4 mv a5,a1 .L5: sraiw a5,a5,1 xor a3,a5,a3 and a4,a3,a5 sext.w a4,a4 beq a4,zero,.L5 .L4: addi a0,a0,4 bge a3,a2,.L28 slli a5,a3,2 add a5,s5,a5 flw fa4,0(a5) flw fa5,0(a0) addiw a2,a2,1 fsw fa4,0(a0) fsw fa5,0(a5) bne s7,a2,.L7 .L49: li s0,0 li a4,1 .L8: addiw s0,s0,1 sllw a5,a4,s0 blt a5,a2,.L8 andi s0,s0,1 beq s0,zero,.L3 slli a4,a2,2 add a4,s5,a4 bgeu s5,a4,.L10 mv a5,s5 fld ft8,.LC2,a3 .L12: flw ft3,20(a5) flw ft1,28(a5) flw fa2,16(a5) flw fa0,24(a5) flw ft2,4(a5) fsub.s fa3,fa2,ft3 fsub.s fa4,fa0,ft1 flw fa5,0(a5) flw ft0,8(a5) flw ft4,12(a5) fcvt.d.s fa3,fa3 fcvt.d.s fa4,fa4 fsub.s fa1,fa5,ft2 fadd.s fa0,fa0,ft1 fadd.s fa5,fa5,ft2 fadd.s fa2,fa2,ft3 fsub.s ft2,ft0,ft4 fmul.d fa4,fa4,ft8 fadd.s ft0,ft0,ft4 fmul.d fa3,fa3,ft8 addi a5,a5,32 fsub.s ft1,fa5,ft0 fadd.s fa5,fa5,ft0 fsub.s ft0,fa1,ft2 fadd.s fa1,fa1,ft2 fsub.s ft2,fa2,fa0 fadd.s fa2,fa2,fa0 fcvt.s.d fa3,fa3 fcvt.s.d fa4,fa4 fsub.s fa0,ft1,ft2 fsub.s ft3,fa5,fa2 fadd.s ft1,ft1,ft2 fadd.s fa5,fa5,fa2 fsub.s fa2,fa1,fa3 fadd.s fa1,fa1,fa3 fsub.s fa3,ft0,fa4 fadd.s ft0,ft0,fa4 fsw ft3,-16(a5) fsw fa5,-32(a5) fsw fa0,-8(a5) fsw ft1,-24(a5) fsw fa2,-12(a5) fsw fa1,-28(a5) fsw fa3,-4(a5) fsw ft0,-20(a5) bltu a5,a4,.L12 .L10: li a5,15 ble s7,a5,.L1 addiw a5,s0,2 mv a4,a5 lla s2,.LANCHOR0 slli a5,a5,2 lla s8,.LANCHOR0+80 add s10,s2,a5 add s8,s8,a5 fld ft8,.LC2,a5 flw ft10,.LC0,a5 flw ft9,.LC1,a5 slli t6,s7,2 addi a5,s5,4 add t6,s5,t6 sd a5,8(sp) li s6,1 lla s9,.LANCHOR1 .L17: li a5,1 sllw t0,a5,a4 slliw a0,t0,1 sraiw s3,t0,1 addw a5,t0,a0 slli a3,s3,2 add a3,s5,a3 slli a1,a5,2 slli s1,t0,2 slli a0,a0,2 slliw s4,t0,2 mv t5,s0 slli a5,s4,2 sext.w s0,a4 add t4,s5,s1 add t3,s5,a0 add t1,s5,a1 add a7,a3,s1 add a6,a3,a1 add a2,a3,a0 mv a4,s5 .L14: flw fa2,0(t4) flw fa1,0(t1) flw fa5,0(a4) flw fa4,0(t3) fadd.s fa3,fa5,fa2 fsub.s fa5,fa5,fa2 fadd.s fa2,fa4,fa1 fsub.s fa4,fa4,fa1 fsub.s fa1,fa3,fa2 fadd.s fa3,fa3,fa2 fsub.s fa2,fa5,fa4 fadd.s fa5,fa5,fa4 fsw fa1,0(t3) fsw fa3,0(a4) fsw fa2,0(t1) fsw fa5,0(t4) flw fa4,0(a2) flw fa5,0(a6) flw fa1,0(a7) fcvt.d.s fa4,fa4 fcvt.d.s fa5,fa5 flw fa3,0(a3) fmul.d fa4,fa4,ft8 fmul.d fa5,fa5,ft8 fadd.s fa2,fa3,fa1 fsub.s fa3,fa3,fa1 add a4,a4,a5 add t4,t4,a5 add t3,t3,a5 fcvt.s.d fa4,fa4 fcvt.s.d fa5,fa5 add t1,t1,a5 fsub.s fa1,fa2,fa4 fadd.s fa2,fa2,fa4 fsub.s fa4,fa3,fa5 fadd.s fa3,fa3,fa5 fsw fa1,0(a2) fsw fa2,0(a3) fsw fa4,0(a6) fsw fa3,0(a7) add a3,a3,a5 add a7,a7,a5 add a6,a6,a5 add a2,a2,a5 bgtu t6,a4,.L14 slli a4,t5,32 srli a7,a4,30 lla t1,.LANCHOR0+92 fmv.s fa4,ft10 fmv.s fa5,ft9 lla a4,.LANCHOR0+88 lla a3,.LANCHOR0+8 lla a6,.LANCHOR1+12 lla a2,.LANCHOR1+92 add a7,t1,a7 j .L16 .L50: flw fa5,0(a6) flw fa4,0(a2) addi a6,a6,4 addi a2,a2,4 .L16: fsw fa5,0(a4) fsw fa4,0(a3) addi a4,a4,4 addi a3,a3,4 bne a7,a4,.L50 addi t0,t0,-1 ld t2,8(sp) slli t0,t0,2 add t0,s5,t0 li t5,1 slli s11,s0,2 .L25: andi a4,t5,1 bne a4,zero,.L19 .L20: mv a2,a4 addiw a4,a4,1 sraw a3,t5,a4 andi a3,a3,1 beq a3,zero,.L20 subw a4,s0,a4 slli a6,a4,2 add a3,s2,a6 flw fa7,0(a3) flw fa6,80(a3) addiw a3,a2,3 bgt a4,s6,.L47 .L21: fmul.s fa4,fa7,fa7 fmul.s fa5,fa7,fa6 mv a4,t2 mv t4,t0 add t3,s1,t2 fmsub.s ft7,fa6,fa6,fa4 fadd.s ft6,fa5,fa5 add t1,s1,t0 add a7,a1,t2 add a6,a1,t0 add a2,a0,t2 add a3,a0,t0 .L24: flw fa5,0(a6) flw fa3,0(a7) flw fa0,0(t1) fmul.s ft1,fa5,ft7 fmul.s fa1,fa5,ft6 flw fa5,0(a3) fmul.s ft4,fa0,ft6 flw fa4,0(a2) fmsub.s ft1,fa3,ft6,ft1 fmadd.s fa1,fa3,ft7,fa1 flw fa2,0(t3) fmul.s fa0,fa0,ft7 flw fa3,0(a4) fsub.s ft5,fa5,ft1 fsub.s ft3,fa4,fa1 fmadd.s ft4,fa2,ft7,ft4 fadd.s fa4,fa4,fa1 fmsub.s fa1,fa2,ft6,fa0 fmul.s ft2,ft5,fa7 fmul.s ft5,ft5,fa6 flw fa2,0(t4) fadd.s fa5,fa5,ft1 fmul.s ft1,ft3,fa6 fmadd.s ft2,fa4,fa6,ft2 fadd.s ft0,fa3,ft4 fmul.s ft3,ft3,fa7 fsub.s fa0,fa2,fa1 fmsub.s fa4,fa4,fa7,ft5 fadd.s fa2,fa2,fa1 fmadd.s fa1,fa5,fa7,ft1 fsub.s ft5,ft0,ft2 fsub.s fa3,fa3,ft4 fmsub.s fa5,fa5,fa6,ft3 fadd.s ft0,ft0,ft2 fsub.s ft2,fa0,fa4 fadd.s fa0,fa0,fa4 fsub.s ft1,fa2,fa1 fsw ft5,0(a2) fadd.s fa2,fa2,fa1 fsw ft0,0(a4) fsub.s fa4,fa3,fa5 fsw ft2,0(a6) fadd.s fa3,fa3,fa5 fsw fa0,0(t1) fsw ft1,0(a3) fsw fa2,0(t4) fsw fa4,0(a7) fsw fa3,0(t3) add a4,a4,a5 add t4,t4,a5 add t3,t3,a5 add t1,t1,a5 add a7,a7,a5 add a6,a6,a5 add a2,a2,a5 add a3,a3,a5 bgtu t6,a4,.L24 addiw t5,t5,1 addi t2,t2,4 addi t0,t0,-4 bne s3,t5,.L25 addi s10,s10,8 addi s8,s8,8 ble s7,s4,.L1 addiw a4,s0,2 j .L17 .L23: addiw a3,a3,1 .L47: sraw a2,t5,a3 andi a2,a2,1 bne a2,zero,.L23 subw a3,s0,a3 addiw a4,a4,-1 slli a2,a4,2 slli a4,a3,2 add a4,s2,a4 add a3,s2,a2 flw fa3,80(a4) flw fa2,0(a4) flw fa4,0(a3) flw fa5,80(a3) add a4,s9,a6 fadd.s fa4,fa4,fa2 fadd.s fa5,fa5,fa3 flw fa3,160(a4) add a6,s2,a6 fmul.s fa4,fa4,fa3 fmul.s fa5,fa5,fa3 fsw fa4,0(a6) fsw fa5,80(a6) j .L21 .L19: flw fa7,0(s10) flw fa6,0(s8) mv a4,s0 li a3,2 mv a6,s11 j .L47 .L1: ld s0,104(sp) ld s1,96(sp) ld s2,88(sp) ld s3,80(sp) ld s4,72(sp) ld s5,64(sp) ld s6,56(sp) ld s7,48(sp) ld s8,40(sp) ld s9,32(sp) ld s10,24(sp) ld s11,16(sp) addi sp,sp,112 jr ra .L3: slli a4,s7,2 add a4,s5,a4 bgeu s5,a4,.L29 mv a5,s5 .L11: flw fa2,4(a5) flw fa1,12(a5) flw fa5,0(a5) flw fa4,8(a5) addi a5,a5,16 fsub.s fa3,fa5,fa2 fadd.s fa5,fa5,fa2 fsub.s fa2,fa4,fa1 fadd.s fa4,fa4,fa1 fsub.s fa0,fa3,fa2 fsub.s fa1,fa5,fa4 fadd.s fa3,fa3,fa2 fadd.s fa5,fa5,fa4 fsw fa0,-4(a5) fsw fa1,-8(a5) fsw fa3,-12(a5) fsw fa5,-16(a5) bgtu a4,a5,.L11 .L29: li s0,0 j .L10 .size mayer_fht, .-mayer_fht .align 1 .globl mayer_fft .type mayer_fft, @function mayer_fft: addi sp,sp,-32 srliw t1,a0,31 sd s0,16(sp) sd s1,8(sp) mv s0,a0 sd ra,24(sp) li a4,3 addw t1,t1,a0 mv s1,a2 mv a0,a1 ble s0,a4,.L52 addiw a5,s0,-1 slli a5,a5,2 add a3,a1,a5 addi a4,a2,4 add a5,a2,a5 sraiw t1,t1,1 addi a6,a1,4 li a7,1 flw fa2,.LC3,a2 .L53: flw fa1,0(a3) flw fa0,0(a5) flw fa5,0(a6) flw fa3,0(a4) addi a6,a6,4 fadd.s fa4,fa5,fa1 fsub.s fa5,fa5,fa1 fsub.s fa1,fa3,fa0 fadd.s fa3,fa3,fa0 addi a3,a3,-4 addi a4,a4,4 addi a5,a5,-4 fadd.s fa0,fa4,fa1 fsub.s fa4,fa4,fa1 fsub.s fa1,fa3,fa5 fadd.s fa5,fa5,fa3 addiw a7,a7,1 fmul.s fa0,fa0,fa2 fmul.s fa4,fa4,fa2 fmul.s fa1,fa1,fa2 fmul.s fa5,fa5,fa2 fsw fa0,-4(a6) fsw fa4,4(a3) fsw fa1,-4(a4) fsw fa5,4(a5) bgt t1,a7,.L53 .L52: mv a1,s0 call mayer_fht mv a1,s0 ld s0,16(sp) ld ra,24(sp) mv a0,s1 ld s1,8(sp) addi sp,sp,32 tail mayer_fht .size mayer_fft, .-mayer_fft .align 1 .globl mayer_ifft .type mayer_ifft, @function mayer_ifft: addi sp,sp,-32 sd s1,8(sp) mv s1,a1 sd s2,0(sp) mv a1,a0 mv s2,a0 mv a0,s1 sd ra,24(sp) sd s0,16(sp) mv s0,a2 call mayer_fht mv a1,s2 mv a0,s0 call mayer_fht srliw a6,s2,31 li a5,3 addw a6,a6,s2 ble s2,a5,.L56 addiw a3,s2,-1 slli a3,a3,2 add a1,s1,a3 add a2,s0,a3 sraiw a6,a6,1 addi a4,s1,4 addi a5,s0,4 li a3,1 flw fa2,.LC3,a0 .L58: flw fa4,0(a1) flw fa0,0(a2) flw fa5,0(a4) flw fa3,0(a5) addi a5,a5,4 fsub.s fa1,fa5,fa4 fadd.s fa5,fa5,fa4 fadd.s fa4,fa3,fa0 fsub.s fa3,fa3,fa0 addi a2,a2,-4 addi a4,a4,4 addi a1,a1,-4 fadd.s fa0,fa1,fa4 fsub.s fa4,fa4,fa1 fsub.s fa1,fa5,fa3 fadd.s fa5,fa5,fa3 addiw a3,a3,1 fmul.s fa0,fa0,fa2 fmul.s fa4,fa4,fa2 fmul.s fa1,fa1,fa2 fmul.s fa5,fa5,fa2 fsw fa0,-4(a5) fsw fa4,4(a2) fsw fa1,-4(a4) fsw fa5,4(a1) bgt a6,a3,.L58 .L56: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .size mayer_ifft, .-mayer_ifft .align 1 .globl mayer_realfft .type mayer_realfft, @function mayer_realfft: addi sp,sp,-32 sd s0,16(sp) mv s0,a1 sd s1,8(sp) mv a1,a0 mv s1,a0 mv a0,s0 sd ra,24(sp) call mayer_fht srliw a3,s1,31 li a4,3 addw a3,a3,s1 ble s1,a4,.L61 addiw a5,s1,-1 slli a4,a5,2 add a1,s0,a4 sraiw a3,a3,1 addi a5,s0,4 li a4,1 flw fa2,.LC3,a2 .L63: flw fa5,0(a5) flw fa3,0(a1) addi a1,a1,-4 addi a5,a5,4 fsub.s fa4,fa5,fa3 fadd.s fa5,fa5,fa3 addiw a4,a4,1 fmul.s fa4,fa4,fa2 fmul.s fa5,fa5,fa2 fsw fa4,4(a1) fsw fa5,-4(a5) bgt a3,a4,.L63 .L61: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size mayer_realfft, .-mayer_realfft .align 1 .globl mayer_realifft .type mayer_realifft, @function mayer_realifft: srliw a2,a0,31 mv a6,a0 addw a2,a2,a0 li a4,3 mv a0,a1 addiw a5,a6,-1 sraiw a2,a2,1 ble a6,a4,.L67 slli a5,a5,2 addi a4,a1,4 add a5,a1,a5 li a3,1 .L68: flw fa5,0(a4) flw fa4,0(a5) addi a5,a5,-4 addi a4,a4,4 fsub.s fa3,fa5,fa4 fadd.s fa5,fa5,fa4 addiw a3,a3,1 fsw fa3,4(a5) fsw fa5,-4(a4) bgt a2,a3,.L68 .L67: mv a1,a6 tail mayer_fht .size mayer_realifft, .-mayer_realifft .section .rodata.cst4,"aM",@progbits,4 .align 2 .LC0: .word 1053028117 .align 2 .LC1: .word 1064076126 .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC2: .word 1719614413 .word 1073127582 .section .rodata.cst4 .align 2 .LC3: .word 1056964608 .section .rodata .align 3 .set .LANCHOR1,. + 0 .type costab, @object .size costab, 80 costab: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sintab, @object .size sintab, 80 sintab: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .type halsec, @object .size halsec, 80 halsec: .word 0 .word 0 .word 1057655764 .word 1057128951 .word 1057005197 .word 1056974725 .word 1056967135 .word 1056965240 .word 1056964766 .word 1056964647 .word 1056964618 .word 1056964610 .word 1056964609 .word 1056964608 .word 1056964608 .word 1056964608 .zero 16 .data .align 3 .set .LANCHOR0,. + 0 .type sinwrk, @object .size sinwrk, 80 sinwrk: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .type coswrk, @object .size coswrk, 80 coswrk: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "d_mayer_fft.c" .option pic .text .align 1 .globl mayer_fht .type mayer_fht, @function mayer_fht: addi sp,sp,-176 sd s10,80(sp) sd ra,168(sp) sd s0,160(sp) sd s1,152(sp) sd s2,144(sp) sd s3,136(sp) sd s4,128(sp) sd s5,120(sp) sd s6,112(sp) sd s7,104(sp) sd s8,96(sp) sd s9,88(sp) sd s11,72(sp) fsd fs0,56(sp) li a5,1 mv t4,a1 mv s10,a0 ble a1,a5,.L3 srai a1,a1,1 addi a0,a0,4 mv a3,a1 li a2,1 .L27: addiw a2,a2,1 beq t4,a2,.L47 .L7: xor a3,a1,a3 and a5,a1,a3 sext.w a5,a5 bne a5,zero,.L4 mv a5,a1 .L5: sraiw a5,a5,1 xor a3,a5,a3 and a4,a3,a5 sext.w a4,a4 beq a4,zero,.L5 .L4: addi a0,a0,4 bge a3,a2,.L27 slli a5,a3,2 add a5,s10,a5 flw fa4,0(a5) flw fa5,0(a0) addiw a2,a2,1 fsw fa4,0(a0) fsw fa5,0(a5) bne t4,a2,.L7 .L47: li a5,0 li a3,1 .L8: addiw a5,a5,1 sllw a4,a3,a5 blt a4,a2,.L8 andi s8,a5,1 beq s8,zero,.L3 slli a2,a2,2 add s1,s10,a2 bgeu s10,s1,.L10 mv a5,s10 fld fs0,.LC0,a4 .L12: flw ft3,20(a5) flw ft1,28(a5) flw fa2,16(a5) flw fa0,24(a5) flw ft2,4(a5) fsub.s fa3,fa2,ft3 fsub.s fa4,fa0,ft1 flw fa5,0(a5) flw ft0,8(a5) flw ft4,12(a5) fcvt.d.s fa3,fa3 fcvt.d.s fa4,fa4 fsub.s fa1,fa5,ft2 fadd.s fa0,fa0,ft1 fadd.s fa5,fa5,ft2 fadd.s fa2,fa2,ft3 fsub.s ft2,ft0,ft4 fmul.d fa4,fa4,fs0 fadd.s ft0,ft0,ft4 fmul.d fa3,fa3,fs0 addi a5,a5,32 fsub.s ft1,fa5,ft0 fadd.s fa5,fa5,ft0 fsub.s ft0,fa1,ft2 fadd.s fa1,fa1,ft2 fsub.s ft2,fa2,fa0 fadd.s fa2,fa2,fa0 fcvt.s.d fa3,fa3 fcvt.s.d fa4,fa4 fsub.s fa0,ft1,ft2 fsub.s ft3,fa5,fa2 fadd.s ft1,ft1,ft2 fadd.s fa5,fa5,fa2 fsub.s fa2,fa1,fa3 fadd.s fa1,fa1,fa3 fsub.s fa3,ft0,fa4 fadd.s ft0,ft0,fa4 fsw ft3,-16(a5) fsw fa5,-32(a5) fsw fa0,-8(a5) fsw ft1,-24(a5) fsw fa2,-12(a5) fsw fa1,-28(a5) fsw fa3,-4(a5) fsw ft0,-20(a5) bltu a5,s1,.L12 .L10: li a5,15 ble t4,a5,.L1 addi a5,s8,2 slli a5,a5,2 lla s5,.LANCHOR0 lla t5,.LANCHOR0+80 add t0,s5,a5 add t5,t5,a5 fld fs0,.LC0,a5 li a5,-1 srli a5,a5,32 sd a5,40(sp) li s11,1 .L16: li a5,1 addiw s6,s8,2 sllw a6,a5,s6 slliw s3,a6,1 sraiw s7,a6,1 addw a5,a6,s3 slli a4,s7,2 add a4,s10,a4 slli s2,a5,2 slli s4,a6,2 slli s3,s3,2 slliw s9,a6,2 slli s0,s9,2 add t1,s10,s4 add a7,s10,s3 add a0,s10,s2 add a1,a4,s4 add a2,a4,s2 add a3,a4,s3 mv a5,s10 .L14: flw fa2,0(t1) flw fa1,0(a0) flw fa5,0(a5) flw fa4,0(a7) fadd.s fa3,fa5,fa2 fsub.s fa5,fa5,fa2 fadd.s fa2,fa4,fa1 fsub.s fa4,fa4,fa1 fsub.s fa1,fa3,fa2 fadd.s fa3,fa3,fa2 fsub.s fa2,fa5,fa4 fadd.s fa5,fa5,fa4 fsw fa1,0(a7) fsw fa3,0(a5) fsw fa2,0(a0) fsw fa5,0(t1) flw fa4,0(a3) flw fa5,0(a2) flw fa1,0(a1) fcvt.d.s fa4,fa4 fcvt.d.s fa5,fa5 flw fa3,0(a4) fmul.d fa4,fa4,fs0 fmul.d fa5,fa5,fs0 fadd.s fa2,fa3,fa1 fsub.s fa3,fa3,fa1 add a5,a5,s0 add t1,t1,s0 add a7,a7,s0 fcvt.s.d fa4,fa4 fcvt.s.d fa5,fa5 add a0,a0,s0 fsub.s fa1,fa2,fa4 fadd.s fa2,fa2,fa4 fsub.s fa4,fa3,fa5 fadd.s fa3,fa3,fa5 fsw fa1,0(a3) fsw fa2,0(a4) fsw fa4,0(a2) fsw fa3,0(a1) add a4,a4,s0 add a1,a1,s0 add a2,a2,s0 add a3,a3,s0 bltu a5,s1,.L14 ld a5,40(sp) lla a1,.LANCHOR1+8 lla a0,.LANCHOR0+88 and a2,s8,a5 addi a2,a2,1 slli a2,a2,2 sd t4,32(sp) sd t0,24(sp) sd t5,16(sp) sd a6,8(sp) sd a2,0(sp) call memcpy@plt ld a2,0(sp) lla a1,.LANCHOR1+88 lla a0,.LANCHOR0+8 call memcpy@plt ld a6,8(sp) ld t5,16(sp) ld t0,24(sp) ld t4,32(sp) ble s7,s11,.L25 addi a0,a6,-1 slli a0,a0,2 addi t2,s10,4 add a0,s10,a0 li a1,1 slli t6,s6,2 .L24: andi a5,a1,1 bne a5,zero,.L18 .L19: mv a3,a5 addiw a5,a5,1 sraw a4,a1,a5 andi a4,a4,1 beq a4,zero,.L19 subw a5,s6,a5 slli a2,a5,2 add a4,s5,a2 flw fa7,0(a4) flw fa6,80(a4) addiw a4,a3,3 bgt a5,s11,.L45 .L20: fmul.s fa4,fa7,fa7 fmul.s fa5,fa7,fa6 mv a5,t2 mv t3,a0 add t1,s4,t2 fmsub.s ft7,fa6,fa6,fa4 fadd.s ft6,fa5,fa5 add a7,s4,a0 add a6,s2,t2 add a2,s2,a0 add a3,s3,t2 add a4,s3,a0 .L23: flw fa5,0(a2) flw fa3,0(a6) flw fa0,0(a7) fmul.s ft1,fa5,ft7 fmul.s fa1,fa5,ft6 flw fa5,0(a4) fmul.s ft4,fa0,ft6 flw fa4,0(a3) fmsub.s ft1,fa3,ft6,ft1 fmadd.s fa1,fa3,ft7,fa1 flw fa2,0(t1) fmul.s fa0,fa0,ft7 flw fa3,0(a5) fsub.s ft5,fa5,ft1 fsub.s ft3,fa4,fa1 fmadd.s ft4,fa2,ft7,ft4 fadd.s fa4,fa4,fa1 fmsub.s fa1,fa2,ft6,fa0 fmul.s ft2,ft5,fa7 fmul.s ft5,ft5,fa6 flw fa2,0(t3) fadd.s fa5,fa5,ft1 fmul.s ft1,ft3,fa6 fmadd.s ft2,fa4,fa6,ft2 fadd.s ft0,fa3,ft4 fmul.s ft3,ft3,fa7 fsub.s fa0,fa2,fa1 fmsub.s fa4,fa4,fa7,ft5 fadd.s fa2,fa2,fa1 fmadd.s fa1,fa5,fa7,ft1 fsub.s ft5,ft0,ft2 fsub.s fa3,fa3,ft4 fmsub.s fa5,fa5,fa6,ft3 fadd.s ft0,ft0,ft2 fsub.s ft2,fa0,fa4 fadd.s fa0,fa0,fa4 fsub.s ft1,fa2,fa1 fsw ft5,0(a3) fadd.s fa2,fa2,fa1 fsw ft0,0(a5) fsub.s fa4,fa3,fa5 fsw ft2,0(a2) fadd.s fa3,fa3,fa5 fsw fa0,0(a7) fsw ft1,0(a4) fsw fa2,0(t3) fsw fa4,0(a6) fsw fa3,0(t1) add a5,a5,s0 add t3,t3,s0 add t1,t1,s0 add a7,a7,s0 add a6,a6,s0 add a2,a2,s0 add a3,a3,s0 add a4,a4,s0 bltu a5,s1,.L23 addiw a1,a1,1 addi t2,t2,4 addi a0,a0,-4 bne s7,a1,.L24 .L25: addi s8,s8,2 addi t0,t0,8 addi t5,t5,8 bgt t4,s9,.L16 .L1: ld ra,168(sp) ld s0,160(sp) ld s1,152(sp) ld s2,144(sp) ld s3,136(sp) ld s4,128(sp) ld s5,120(sp) ld s6,112(sp) ld s7,104(sp) ld s8,96(sp) ld s9,88(sp) ld s10,80(sp) ld s11,72(sp) fld fs0,56(sp) addi sp,sp,176 jr ra .L22: addiw a4,a4,1 .L45: sraw a3,a1,a4 andi a3,a3,1 bne a3,zero,.L22 subw a4,s6,a4 addiw a5,a5,-1 slli a3,a5,2 slli a5,a4,2 add a5,s5,a5 add a4,s5,a3 flw fa3,80(a5) flw fa2,0(a5) flw fa4,0(a4) flw fa5,80(a4) lla a5,.LANCHOR1 fadd.s fa4,fa4,fa2 fadd.s fa5,fa5,fa3 add a5,a5,a2 flw fa3,160(a5) add a2,s5,a2 fmul.s fa4,fa4,fa3 fmul.s fa5,fa5,fa3 fsw fa4,0(a2) fsw fa5,80(a2) j .L20 .L18: flw fa7,0(t0) flw fa6,0(t5) mv a5,s6 li a4,2 mv a2,t6 j .L45 .L3: slli s1,t4,2 add s1,s10,s1 bgeu s10,s1,.L28 mv a5,s10 .L11: flw fa2,4(a5) flw fa1,12(a5) flw fa5,0(a5) flw fa4,8(a5) addi a5,a5,16 fsub.s fa3,fa5,fa2 fadd.s fa5,fa5,fa2 fsub.s fa2,fa4,fa1 fadd.s fa4,fa4,fa1 fsub.s fa0,fa3,fa2 fsub.s fa1,fa5,fa4 fadd.s fa3,fa3,fa2 fadd.s fa5,fa5,fa4 fsw fa0,-4(a5) fsw fa1,-8(a5) fsw fa3,-12(a5) fsw fa5,-16(a5) bgtu s1,a5,.L11 .L28: li s8,0 j .L10 .size mayer_fht, .-mayer_fht .align 1 .globl mayer_fft .type mayer_fft, @function mayer_fft: addi sp,sp,-32 srliw t1,a0,31 sd s0,16(sp) sd s1,8(sp) mv s0,a0 sd ra,24(sp) li a4,3 addw t1,t1,a0 mv s1,a2 mv a0,a1 ble s0,a4,.L49 addiw a5,s0,-1 slli a5,a5,2 add a3,a1,a5 addi a4,a2,4 add a5,a2,a5 sraiw t1,t1,1 addi a6,a1,4 li a7,1 flw fa2,.LC1,a2 .L50: flw fa1,0(a3) flw fa0,0(a5) flw fa5,0(a6) flw fa3,0(a4) addi a6,a6,4 fadd.s fa4,fa5,fa1 fsub.s fa5,fa5,fa1 fsub.s fa1,fa3,fa0 fadd.s fa3,fa3,fa0 addi a3,a3,-4 addi a4,a4,4 addi a5,a5,-4 fadd.s fa0,fa4,fa1 fsub.s fa4,fa4,fa1 fsub.s fa1,fa3,fa5 fadd.s fa5,fa5,fa3 addiw a7,a7,1 fmul.s fa0,fa0,fa2 fmul.s fa4,fa4,fa2 fmul.s fa1,fa1,fa2 fmul.s fa5,fa5,fa2 fsw fa0,-4(a6) fsw fa4,4(a3) fsw fa1,-4(a4) fsw fa5,4(a5) bgt t1,a7,.L50 .L49: mv a1,s0 call mayer_fht mv a1,s0 ld s0,16(sp) ld ra,24(sp) mv a0,s1 ld s1,8(sp) addi sp,sp,32 tail mayer_fht .size mayer_fft, .-mayer_fft .align 1 .globl mayer_ifft .type mayer_ifft, @function mayer_ifft: addi sp,sp,-32 sd s1,8(sp) mv s1,a1 sd s2,0(sp) mv a1,a0 mv s2,a0 mv a0,s1 sd ra,24(sp) sd s0,16(sp) mv s0,a2 call mayer_fht mv a1,s2 mv a0,s0 call mayer_fht srliw a6,s2,31 li a5,3 addw a6,a6,s2 ble s2,a5,.L53 addiw a3,s2,-1 slli a3,a3,2 add a1,s1,a3 add a2,s0,a3 sraiw a6,a6,1 addi a4,s1,4 addi a5,s0,4 li a3,1 flw fa2,.LC1,a0 .L55: flw fa4,0(a1) flw fa0,0(a2) flw fa5,0(a4) flw fa3,0(a5) addi a5,a5,4 fsub.s fa1,fa5,fa4 fadd.s fa5,fa5,fa4 fadd.s fa4,fa3,fa0 fsub.s fa3,fa3,fa0 addi a2,a2,-4 addi a4,a4,4 addi a1,a1,-4 fadd.s fa0,fa1,fa4 fsub.s fa4,fa4,fa1 fsub.s fa1,fa5,fa3 fadd.s fa5,fa5,fa3 addiw a3,a3,1 fmul.s fa0,fa0,fa2 fmul.s fa4,fa4,fa2 fmul.s fa1,fa1,fa2 fmul.s fa5,fa5,fa2 fsw fa0,-4(a5) fsw fa4,4(a2) fsw fa1,-4(a4) fsw fa5,4(a1) bgt a6,a3,.L55 .L53: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .size mayer_ifft, .-mayer_ifft .align 1 .globl mayer_realfft .type mayer_realfft, @function mayer_realfft: addi sp,sp,-32 sd s0,16(sp) mv s0,a1 sd s1,8(sp) mv a1,a0 mv s1,a0 mv a0,s0 sd ra,24(sp) call mayer_fht srliw a3,s1,31 li a4,3 addw a3,a3,s1 ble s1,a4,.L58 addiw a5,s1,-1 slli a4,a5,2 add a1,s0,a4 sraiw a3,a3,1 addi a5,s0,4 li a4,1 flw fa2,.LC1,a2 .L60: flw fa5,0(a5) flw fa3,0(a1) addi a1,a1,-4 addi a5,a5,4 fsub.s fa4,fa5,fa3 fadd.s fa5,fa5,fa3 addiw a4,a4,1 fmul.s fa4,fa4,fa2 fmul.s fa5,fa5,fa2 fsw fa4,4(a1) fsw fa5,-4(a5) bgt a3,a4,.L60 .L58: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .size mayer_realfft, .-mayer_realfft .align 1 .globl mayer_realifft .type mayer_realifft, @function mayer_realifft: srliw a2,a0,31 mv a6,a0 addw a2,a2,a0 li a4,3 mv a0,a1 addiw a5,a6,-1 sraiw a2,a2,1 ble a6,a4,.L64 slli a5,a5,2 addi a4,a1,4 add a5,a1,a5 li a3,1 .L65: flw fa5,0(a4) flw fa4,0(a5) addi a5,a5,-4 addi a4,a4,4 fsub.s fa3,fa5,fa4 fadd.s fa5,fa5,fa4 addiw a3,a3,1 fsw fa3,4(a5) fsw fa5,-4(a4) bgt a2,a3,.L65 .L64: mv a1,a6 tail mayer_fht .size mayer_realifft, .-mayer_realifft .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 1719614413 .word 1073127582 .section .rodata.cst4,"aM",@progbits,4 .align 2 .LC1: .word 1056964608 .section .rodata .align 3 .set .LANCHOR1,. + 0 .type costab, @object .size costab, 80 costab: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sintab, @object .size sintab, 80 sintab: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .type halsec, @object .size halsec, 80 halsec: .word 0 .word 0 .word 1057655764 .word 1057128951 .word 1057005197 .word 1056974725 .word 1056967135 .word 1056965240 .word 1056964766 .word 1056964647 .word 1056964618 .word 1056964610 .word 1056964609 .word 1056964608 .word 1056964608 .word 1056964608 .zero 16 .data .align 3 .set .LANCHOR0,. + 0 .type sinwrk, @object .size sinwrk, 80 sinwrk: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .type coswrk, @object .size coswrk, 80 coswrk: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "d_mayer_fft.c" .text .data .align 3 .type halsec, %object .size halsec, 80 halsec: .word 0 .word 0 .word 1057655764 .word 1057128951 .word 1057005197 .word 1056974725 .word 1056967135 .word 1056965240 .word 1056964766 .word 1056964647 .word 1056964618 .word 1056964610 .word 1056964609 .word 1056964608 .word 1056964608 .word 1056964608 .zero 16 .align 3 .type costab, %object .size costab, 80 costab: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .align 3 .type sintab, %object .size sintab, 80 sintab: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .align 3 .type coswrk, %object .size coswrk, 80 coswrk: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .align 3 .type sinwrk, %object .size sinwrk, 80 sinwrk: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .text .align 2 .global mayer_fht .type mayer_fht, %function mayer_fht: .LFB0: .cfi_startproc sub sp, sp, #256 .cfi_def_cfa_offset 256 str x0, [sp, 8] str w1, [sp, 4] str wzr, [sp, 28] mov w0, 1 str w0, [sp, 20] str wzr, [sp, 24] b .L2 .L6: ldr w0, [sp, 4] asr w0, w0, 1 str w0, [sp, 16] b .L3 .L4: ldr w0, [sp, 16] asr w0, w0, 1 str w0, [sp, 16] .L3: ldr w1, [sp, 24] ldr w0, [sp, 16] eor w0, w1, w0 str w0, [sp, 24] ldr w1, [sp, 24] ldr w0, [sp, 16] and w0, w1, w0 cmp w0, 0 beq .L4 ldr w1, [sp, 20] ldr w0, [sp, 24] cmp w1, w0 ble .L5 ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 228] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 8] add x1, x1, x0 ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x2, [sp, 8] add x0, x2, x0 ldr s0, [x1] str s0, [x0] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 ldr s0, [sp, 228] str s0, [x0] .L5: ldr w0, [sp, 20] add w0, w0, 1 str w0, [sp, 20] .L2: ldr w1, [sp, 20] ldr w0, [sp, 4] cmp w1, w0 blt .L6 str wzr, [sp, 16] b .L7 .L8: ldr w0, [sp, 16] add w0, w0, 1 str w0, [sp, 16] .L7: ldr w0, [sp, 16] mov w1, 1 lsl w0, w1, w0 ldr w1, [sp, 4] cmp w1, w0 bgt .L8 ldr w0, [sp, 16] and w0, w0, 1 str w0, [sp, 16] ldr w0, [sp, 16] cmp w0, 0 bne .L9 ldr x0, [sp, 8] str x0, [sp, 232] ldrsw x0, [sp, 4] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 str x0, [sp, 248] b .L10 .L11: ldr x0, [sp, 232] ldr s1, [x0] ldr x0, [sp, 232] add x0, x0, 4 ldr s0, [x0] fsub s0, s1, s0 str s0, [sp, 112] ldr x0, [sp, 232] ldr s1, [x0] ldr x0, [sp, 232] add x0, x0, 4 ldr s0, [x0] fadd s0, s1, s0 str s0, [sp, 116] ldr x0, [sp, 232] add x0, x0, 8 ldr s1, [x0] ldr x0, [sp, 232] add x0, x0, 12 ldr s0, [x0] fsub s0, s1, s0 str s0, [sp, 120] ldr x0, [sp, 232] add x0, x0, 8 ldr s1, [x0] ldr x0, [sp, 232] add x0, x0, 12 ldr s0, [x0] fadd s0, s1, s0 str s0, [sp, 124] ldr x0, [sp, 232] add x0, x0, 8 ldr s1, [sp, 116] ldr s0, [sp, 124] fsub s0, s1, s0 str s0, [x0] ldr s1, [sp, 116] ldr s0, [sp, 124] fadd s0, s1, s0 ldr x0, [sp, 232] str s0, [x0] ldr x0, [sp, 232] add x0, x0, 12 ldr s1, [sp, 112] ldr s0, [sp, 120] fsub s0, s1, s0 str s0, [x0] ldr x0, [sp, 232] add x0, x0, 4 ldr s1, [sp, 112] ldr s0, [sp, 120] fadd s0, s1, s0 str s0, [x0] ldr x0, [sp, 232] add x0, x0, 16 str x0, [sp, 232] .L10: ldr x1, [sp, 232] ldr x0, [sp, 248] cmp x1, x0 bcc .L11 b .L12 .L9: ldr x0, [sp, 8] str x0, [sp, 232] ldrsw x0, [sp, 4] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 str x0, [sp, 248] ldr x0, [sp, 232] add x0, x0, 4 str x0, [sp, 240] b .L13 .L14: ldr x0, [sp, 232] ldr s1, [x0] ldr x0, [sp, 240] ldr s0, [x0] fsub s0, s1, s0 str s0, [sp, 48] ldr x0, [sp, 232] ldr s1, [x0] ldr x0, [sp, 240] ldr s0, [x0] fadd s0, s1, s0 str s0, [sp, 52] ldr x0, [sp, 232] add x0, x0, 8 ldr s1, [x0] ldr x0, [sp, 240] add x0, x0, 8 ldr s0, [x0] fsub s0, s1, s0 str s0, [sp, 56] ldr x0, [sp, 232] add x0, x0, 8 ldr s1, [x0] ldr x0, [sp, 240] add x0, x0, 8 ldr s0, [x0] fadd s0, s1, s0 str s0, [sp, 60] ldr x0, [sp, 232] add x0, x0, 16 ldr s1, [x0] ldr x0, [sp, 240] add x0, x0, 16 ldr s0, [x0] fsub s0, s1, s0 str s0, [sp, 64] ldr x0, [sp, 232] add x0, x0, 16 ldr s1, [x0] ldr x0, [sp, 240] add x0, x0, 16 ldr s0, [x0] fadd s0, s1, s0 str s0, [sp, 68] ldr x0, [sp, 232] add x0, x0, 24 ldr s1, [x0] ldr x0, [sp, 240] add x0, x0, 24 ldr s0, [x0] fsub s0, s1, s0 str s0, [sp, 72] ldr x0, [sp, 232] add x0, x0, 24 ldr s1, [x0] ldr x0, [sp, 240] add x0, x0, 24 ldr s0, [x0] fadd s0, s1, s0 str s0, [sp, 76] ldr s1, [sp, 52] ldr s0, [sp, 60] fsub s0, s1, s0 str s0, [sp, 80] ldr s1, [sp, 52] ldr s0, [sp, 60] fadd s0, s1, s0 str s0, [sp, 84] ldr s1, [sp, 48] ldr s0, [sp, 56] fsub s0, s1, s0 str s0, [sp, 88] ldr s1, [sp, 48] ldr s0, [sp, 56] fadd s0, s1, s0 str s0, [sp, 92] ldr s1, [sp, 68] ldr s0, [sp, 76] fsub s0, s1, s0 str s0, [sp, 96] ldr s1, [sp, 68] ldr s0, [sp, 76] fadd s0, s1, s0 str s0, [sp, 100] ldr s0, [sp, 72] fcvt d0, s0 adrp x0, .LC0 ldr d1, [x0, #:lo12:.LC0] fmul d0, d0, d1 fcvt s0, d0 str s0, [sp, 104] ldr s0, [sp, 64] fcvt d0, s0 adrp x0, .LC0 ldr d1, [x0, #:lo12:.LC0] fmul d0, d0, d1 fcvt s0, d0 str s0, [sp, 108] ldr x0, [sp, 232] add x0, x0, 16 ldr s1, [sp, 84] ldr s0, [sp, 100] fsub s0, s1, s0 str s0, [x0] ldr s1, [sp, 84] ldr s0, [sp, 100] fadd s0, s1, s0 ldr x0, [sp, 232] str s0, [x0] ldr x0, [sp, 232] add x0, x0, 24 ldr s1, [sp, 80] ldr s0, [sp, 96] fsub s0, s1, s0 str s0, [x0] ldr x0, [sp, 232] add x0, x0, 8 ldr s1, [sp, 80] ldr s0, [sp, 96] fadd s0, s1, s0 str s0, [x0] ldr x0, [sp, 240] add x0, x0, 16 ldr s1, [sp, 92] ldr s0, [sp, 108] fsub s0, s1, s0 str s0, [x0] ldr s1, [sp, 92] ldr s0, [sp, 108] fadd s0, s1, s0 ldr x0, [sp, 240] str s0, [x0] ldr x0, [sp, 240] add x0, x0, 24 ldr s1, [sp, 88] ldr s0, [sp, 104] fsub s0, s1, s0 str s0, [x0] ldr x0, [sp, 240] add x0, x0, 8 ldr s1, [sp, 88] ldr s0, [sp, 104] fadd s0, s1, s0 str s0, [x0] ldr x0, [sp, 232] add x0, x0, 32 str x0, [sp, 232] ldr x0, [sp, 240] add x0, x0, 32 str x0, [sp, 240] .L13: ldr x1, [sp, 232] ldr x0, [sp, 248] cmp x1, x0 bcc .L14 .L12: ldr w0, [sp, 4] cmp w0, 15 ble .L28 .L15: ldr w0, [sp, 16] add w0, w0, 2 str w0, [sp, 16] ldr w0, [sp, 16] mov w1, 1 lsl w0, w1, w0 str w0, [sp, 20] ldr w0, [sp, 20] lsl w0, w0, 1 str w0, [sp, 24] ldr w0, [sp, 24] lsl w0, w0, 1 str w0, [sp, 128] ldr w1, [sp, 24] ldr w0, [sp, 20] add w0, w1, w0 str w0, [sp, 132] ldr w0, [sp, 20] asr w0, w0, 1 str w0, [sp, 136] ldr x0, [sp, 8] str x0, [sp, 232] ldrsw x0, [sp, 136] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 str x0, [sp, 240] ldrsw x0, [sp, 4] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 str x0, [sp, 248] .L17: ldr x0, [sp, 232] ldr s1, [x0] ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s0, [x0] fsub s0, s1, s0 str s0, [sp, 140] ldr x0, [sp, 232] ldr s1, [x0] ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s0, [x0] fadd s0, s1, s0 str s0, [sp, 144] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [x0] ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s0, [x0] fsub s0, s1, s0 str s0, [sp, 148] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [x0] ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s0, [x0] fadd s0, s1, s0 str s0, [sp, 152] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [sp, 144] ldr s0, [sp, 152] fsub s0, s1, s0 str s0, [x0] ldr s1, [sp, 144] ldr s0, [sp, 152] fadd s0, s1, s0 ldr x0, [sp, 232] str s0, [x0] ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [sp, 140] ldr s0, [sp, 148] fsub s0, s1, s0 str s0, [x0] ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [sp, 140] ldr s0, [sp, 148] fadd s0, s1, s0 str s0, [x0] ldr x0, [sp, 240] ldr s1, [x0] ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s0, [x0] fsub s0, s1, s0 str s0, [sp, 156] ldr x0, [sp, 240] ldr s1, [x0] ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s0, [x0] fadd s0, s1, s0 str s0, [sp, 160] ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s0, [x0] fcvt d0, s0 adrp x0, .LC0 ldr d1, [x0, #:lo12:.LC0] fmul d0, d0, d1 fcvt s0, d0 str s0, [sp, 164] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s0, [x0] fcvt d0, s0 adrp x0, .LC0 ldr d1, [x0, #:lo12:.LC0] fmul d0, d0, d1 fcvt s0, d0 str s0, [sp, 168] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s1, [sp, 160] ldr s0, [sp, 168] fsub s0, s1, s0 str s0, [x0] ldr s1, [sp, 160] ldr s0, [sp, 168] fadd s0, s1, s0 ldr x0, [sp, 240] str s0, [x0] ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s1, [sp, 156] ldr s0, [sp, 164] fsub s0, s1, s0 str s0, [x0] ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s1, [sp, 156] ldr s0, [sp, 164] fadd s0, s1, s0 str s0, [x0] ldrsw x0, [sp, 128] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 str x0, [sp, 240] ldrsw x0, [sp, 128] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 str x0, [sp, 232] ldr x1, [sp, 232] ldr x0, [sp, 248] cmp x1, x0 bcc .L17 mov w0, 2 str w0, [sp, 36] b .L18 .L19: adrp x0, costab add x0, x0, :lo12:costab ldrsw x1, [sp, 36] ldr s0, [x0, x1, lsl 2] adrp x0, coswrk add x0, x0, :lo12:coswrk ldrsw x1, [sp, 36] str s0, [x0, x1, lsl 2] adrp x0, sintab add x0, x0, :lo12:sintab ldrsw x1, [sp, 36] ldr s0, [x0, x1, lsl 2] adrp x0, sinwrk add x0, x0, :lo12:sinwrk ldrsw x1, [sp, 36] str s0, [x0, x1, lsl 2] ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] .L18: ldr w1, [sp, 36] ldr w0, [sp, 16] cmp w1, w0 ble .L19 str wzr, [sp, 28] fmov s0, 1.0e+0 str s0, [sp, 172] str wzr, [sp, 176] mov w0, 1 str w0, [sp, 32] b .L20 .L27: ldr w0, [sp, 28] add w0, w0, 1 str w0, [sp, 28] str wzr, [sp, 40] b .L21 .L22: ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L21: ldr w0, [sp, 40] ldr w1, [sp, 28] asr w0, w1, w0 and w0, w0, 1 cmp w0, 0 beq .L22 ldr w1, [sp, 16] ldr w0, [sp, 40] sub w0, w1, w0 str w0, [sp, 40] adrp x0, sinwrk add x0, x0, :lo12:sinwrk ldrsw x1, [sp, 40] ldr s0, [x0, x1, lsl 2] str s0, [sp, 176] adrp x0, coswrk add x0, x0, :lo12:coswrk ldrsw x1, [sp, 40] ldr s0, [x0, x1, lsl 2] str s0, [sp, 172] ldr w0, [sp, 40] cmp w0, 1 ble .L23 ldr w1, [sp, 16] ldr w0, [sp, 40] sub w0, w1, w0 add w0, w0, 2 str w0, [sp, 44] b .L24 .L25: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L24: ldr w0, [sp, 44] ldr w1, [sp, 28] asr w0, w1, w0 and w0, w0, 1 cmp w0, 0 bne .L25 ldr w1, [sp, 16] ldr w0, [sp, 44] sub w0, w1, w0 str w0, [sp, 44] adrp x0, halsec add x0, x0, :lo12:halsec ldrsw x1, [sp, 40] ldr s1, [x0, x1, lsl 2] ldr w0, [sp, 40] sub w1, w0, #1 adrp x0, sinwrk add x0, x0, :lo12:sinwrk sxtw x1, w1 ldr s2, [x0, x1, lsl 2] adrp x0, sinwrk add x0, x0, :lo12:sinwrk ldrsw x1, [sp, 44] ldr s0, [x0, x1, lsl 2] fadd s0, s2, s0 fmul s0, s1, s0 adrp x0, sinwrk add x0, x0, :lo12:sinwrk ldrsw x1, [sp, 40] str s0, [x0, x1, lsl 2] adrp x0, halsec add x0, x0, :lo12:halsec ldrsw x1, [sp, 40] ldr s1, [x0, x1, lsl 2] ldr w0, [sp, 40] sub w1, w0, #1 adrp x0, coswrk add x0, x0, :lo12:coswrk sxtw x1, w1 ldr s2, [x0, x1, lsl 2] adrp x0, coswrk add x0, x0, :lo12:coswrk ldrsw x1, [sp, 44] ldr s0, [x0, x1, lsl 2] fadd s0, s2, s0 fmul s0, s1, s0 adrp x0, coswrk add x0, x0, :lo12:coswrk ldrsw x1, [sp, 40] str s0, [x0, x1, lsl 2] .L23: ldr s0, [sp, 172] fmul s1, s0, s0 ldr s0, [sp, 176] fmul s0, s0, s0 fsub s0, s1, s0 str s0, [sp, 180] ldr s1, [sp, 172] ldr s0, [sp, 176] fmul s0, s1, s0 fadd s0, s0, s0 str s0, [sp, 184] ldrsw x0, [sp, 4] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 str x0, [sp, 248] ldrsw x0, [sp, 32] lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 str x0, [sp, 232] ldrsw x1, [sp, 20] ldrsw x0, [sp, 32] sub x0, x1, x0 lsl x0, x0, 2 ldr x1, [sp, 8] add x0, x1, x0 str x0, [sp, 240] .L26: ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [x0] ldr s0, [sp, 184] fmul s1, s1, s0 ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s2, [x0] ldr s0, [sp, 180] fmul s0, s2, s0 fsub s0, s1, s0 str s0, [sp, 188] ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [x0] ldr s0, [sp, 180] fmul s1, s1, s0 ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s2, [x0] ldr s0, [sp, 184] fmul s0, s2, s0 fadd s0, s1, s0 str s0, [sp, 192] ldr x0, [sp, 232] ldr s1, [x0] ldr s0, [sp, 192] fsub s0, s1, s0 str s0, [sp, 196] ldr x0, [sp, 232] ldr s0, [x0] ldr s1, [sp, 192] fadd s0, s1, s0 str s0, [sp, 200] ldr x0, [sp, 240] ldr s1, [x0] ldr s0, [sp, 188] fsub s0, s1, s0 str s0, [sp, 204] ldr x0, [sp, 240] ldr s0, [x0] ldr s1, [sp, 188] fadd s0, s1, s0 str s0, [sp, 208] ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [x0] ldr s0, [sp, 184] fmul s1, s1, s0 ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s2, [x0] ldr s0, [sp, 180] fmul s0, s2, s0 fsub s0, s1, s0 str s0, [sp, 188] ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [x0] ldr s0, [sp, 180] fmul s1, s1, s0 ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s2, [x0] ldr s0, [sp, 184] fmul s0, s2, s0 fadd s0, s1, s0 str s0, [sp, 192] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [x0] ldr s0, [sp, 192] fsub s0, s1, s0 str s0, [sp, 212] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s0, [x0] ldr s1, [sp, 192] fadd s0, s1, s0 str s0, [sp, 216] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s1, [x0] ldr s0, [sp, 188] fsub s0, s1, s0 str s0, [sp, 220] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s0, [x0] ldr s1, [sp, 188] fadd s0, s1, s0 str s0, [sp, 224] ldr s1, [sp, 176] ldr s0, [sp, 216] fmul s1, s1, s0 ldr s2, [sp, 172] ldr s0, [sp, 220] fmul s0, s2, s0 fsub s0, s1, s0 str s0, [sp, 188] ldr s1, [sp, 172] ldr s0, [sp, 216] fmul s1, s1, s0 ldr s2, [sp, 176] ldr s0, [sp, 220] fmul s0, s2, s0 fadd s0, s1, s0 str s0, [sp, 192] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [sp, 200] ldr s0, [sp, 192] fsub s0, s1, s0 str s0, [x0] ldr s1, [sp, 200] ldr s0, [sp, 192] fadd s0, s1, s0 ldr x0, [sp, 232] str s0, [x0] ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s1, [sp, 204] ldr s0, [sp, 188] fsub s0, s1, s0 str s0, [x0] ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s1, [sp, 204] ldr s0, [sp, 188] fadd s0, s1, s0 str s0, [x0] ldr s1, [sp, 172] ldr s0, [sp, 224] fmul s1, s1, s0 ldr s2, [sp, 176] ldr s0, [sp, 212] fmul s0, s2, s0 fsub s0, s1, s0 str s0, [sp, 188] ldr s1, [sp, 176] ldr s0, [sp, 224] fmul s1, s1, s0 ldr s2, [sp, 172] ldr s0, [sp, 212] fmul s0, s2, s0 fadd s0, s1, s0 str s0, [sp, 192] ldrsw x0, [sp, 24] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 ldr s1, [sp, 208] ldr s0, [sp, 192] fsub s0, s1, s0 str s0, [x0] ldr s1, [sp, 208] ldr s0, [sp, 192] fadd s0, s1, s0 ldr x0, [sp, 240] str s0, [x0] ldrsw x0, [sp, 132] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [sp, 196] ldr s0, [sp, 188] fsub s0, s1, s0 str s0, [x0] ldrsw x0, [sp, 20] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 ldr s1, [sp, 196] ldr s0, [sp, 188] fadd s0, s1, s0 str s0, [x0] ldrsw x0, [sp, 128] lsl x0, x0, 2 ldr x1, [sp, 240] add x0, x1, x0 str x0, [sp, 240] ldrsw x0, [sp, 128] lsl x0, x0, 2 ldr x1, [sp, 232] add x0, x1, x0 str x0, [sp, 232] ldr x1, [sp, 232] ldr x0, [sp, 248] cmp x1, x0 bcc .L26 ldr w0, [sp, 32] add w0, w0, 1 str w0, [sp, 32] .L20: ldr w1, [sp, 32] ldr w0, [sp, 136] cmp w1, w0 blt .L27 ldr w1, [sp, 128] ldr w0, [sp, 4] cmp w1, w0 blt .L15 b .L1 .L28: nop .L1: add sp, sp, 256 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size mayer_fht, .-mayer_fht .align 2 .global mayer_fft .type mayer_fft, %function mayer_fft: .LFB1: .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, 44] str x1, [sp, 32] str x2, [sp, 24] mov w0, 1 str w0, [sp, 52] ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 56] ldr w0, [sp, 44] lsr w1, w0, 31 add w0, w1, w0 asr w0, w0, 1 str w0, [sp, 60] b .L30 .L31: ldrsw x0, [sp, 52] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 64] ldrsw x0, [sp, 56] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 68] ldr s1, [sp, 64] ldr s0, [sp, 68] fadd s0, s1, s0 str s0, [sp, 72] ldr s1, [sp, 64] ldr s0, [sp, 68] fsub s0, s1, s0 str s0, [sp, 76] ldrsw x0, [sp, 52] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 80] ldrsw x0, [sp, 56] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 84] ldr s1, [sp, 80] ldr s0, [sp, 84] fadd s0, s1, s0 str s0, [sp, 88] ldr s1, [sp, 80] ldr s0, [sp, 84] fsub s0, s1, s0 str s0, [sp, 92] ldr s1, [sp, 72] ldr s0, [sp, 92] fadd s1, s1, s0 ldrsw x0, [sp, 52] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 fmov s0, 5.0e-1 fmul s0, s1, s0 str s0, [x0] ldr s1, [sp, 72] ldr s0, [sp, 92] fsub s1, s1, s0 ldrsw x0, [sp, 56] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 fmov s0, 5.0e-1 fmul s0, s1, s0 str s0, [x0] ldr s1, [sp, 88] ldr s0, [sp, 76] fsub s1, s1, s0 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 s1, [sp, 88] ldr s0, [sp, 76] fadd s1, s1, s0 ldrsw x0, [sp, 56] 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 str w0, [sp, 52] ldr w0, [sp, 56] sub w0, w0, #1 str w0, [sp, 56] .L30: ldr w1, [sp, 52] ldr w0, [sp, 60] cmp w1, w0 blt .L31 ldr w1, [sp, 44] ldr x0, [sp, 32] bl mayer_fht ldr w1, [sp, 44] ldr x0, [sp, 24] bl mayer_fht nop ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size mayer_fft, .-mayer_fft .align 2 .global mayer_ifft .type mayer_ifft, %function mayer_ifft: .LFB2: .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, 44] str x1, [sp, 32] str x2, [sp, 24] ldr w1, [sp, 44] ldr x0, [sp, 32] bl mayer_fht ldr w1, [sp, 44] ldr x0, [sp, 24] bl mayer_fht mov w0, 1 str w0, [sp, 52] ldr w0, [sp, 44] sub w0, w0, #1 str w0, [sp, 56] ldr w0, [sp, 44] lsr w1, w0, 31 add w0, w1, w0 asr w0, w0, 1 str w0, [sp, 60] b .L33 .L34: ldrsw x0, [sp, 52] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 64] ldrsw x0, [sp, 56] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 68] ldr s1, [sp, 64] ldr s0, [sp, 68] fadd s0, s1, s0 str s0, [sp, 72] ldr s1, [sp, 64] ldr s0, [sp, 68] fsub s0, s1, s0 str s0, [sp, 76] ldrsw x0, [sp, 52] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 80] ldrsw x0, [sp, 56] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 84] ldr s1, [sp, 80] ldr s0, [sp, 84] fadd s0, s1, s0 str s0, [sp, 88] ldr s1, [sp, 80] ldr s0, [sp, 84] fsub s0, s1, s0 str s0, [sp, 92] ldr s1, [sp, 88] ldr s0, [sp, 76] fadd s1, s1, s0 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 s1, [sp, 88] ldr s0, [sp, 76] fsub s1, s1, s0 ldrsw x0, [sp, 56] 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 s1, [sp, 72] ldr s0, [sp, 92] fsub s1, s1, s0 ldrsw x0, [sp, 52] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 fmov s0, 5.0e-1 fmul s0, s1, s0 str s0, [x0] ldr s1, [sp, 72] ldr s0, [sp, 92] fadd s1, s1, s0 ldrsw x0, [sp, 56] lsl x0, x0, 2 ldr x1, [sp, 32] add x0, x1, x0 fmov s0, 5.0e-1 fmul s0, s1, s0 str s0, [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] .L33: ldr w1, [sp, 52] ldr w0, [sp, 60] cmp w1, w0 blt .L34 nop nop ldp x29, x30, [sp], 96 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size mayer_ifft, .-mayer_ifft .align 2 .global mayer_realfft .type mayer_realfft, %function mayer_realfft: .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 w0, [sp, 28] str x1, [sp, 16] ldr w1, [sp, 28] ldr x0, [sp, 16] bl mayer_fht mov w0, 1 str w0, [sp, 44] ldr w0, [sp, 28] sub w0, w0, #1 str w0, [sp, 48] ldr w0, [sp, 28] lsr w1, w0, 31 add w0, w1, w0 asr w0, w0, 1 str w0, [sp, 52] b .L36 .L37: ldrsw x0, [sp, 44] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 56] ldrsw x0, [sp, 48] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 60] ldr s1, [sp, 56] ldr s0, [sp, 60] fsub s1, s1, s0 ldrsw x0, [sp, 48] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 fmov s0, 5.0e-1 fmul s0, s1, s0 str s0, [x0] ldr s1, [sp, 56] ldr s0, [sp, 60] fadd s1, s1, s0 ldrsw x0, [sp, 44] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 fmov s0, 5.0e-1 fmul s0, s1, s0 str s0, [x0] ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] ldr w0, [sp, 48] sub w0, w0, #1 str w0, [sp, 48] .L36: ldr w1, [sp, 44] ldr w0, [sp, 52] cmp w1, w0 blt .L37 nop nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size mayer_realfft, .-mayer_realfft .align 2 .global mayer_realifft .type mayer_realifft, %function mayer_realifft: .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 w0, [sp, 28] str x1, [sp, 16] mov w0, 1 str w0, [sp, 44] ldr w0, [sp, 28] sub w0, w0, #1 str w0, [sp, 48] ldr w0, [sp, 28] lsr w1, w0, 31 add w0, w1, w0 asr w0, w0, 1 str w0, [sp, 52] b .L39 .L40: ldrsw x0, [sp, 44] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 56] ldrsw x0, [sp, 48] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr s0, [x0] str s0, [sp, 60] ldrsw x0, [sp, 48] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr s1, [sp, 56] ldr s0, [sp, 60] fsub s0, s1, s0 str s0, [x0] ldrsw x0, [sp, 44] lsl x0, x0, 2 ldr x1, [sp, 16] add x0, x1, x0 ldr s1, [sp, 56] ldr s0, [sp, 60] fadd s0, s1, s0 str s0, [x0] ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] ldr w0, [sp, 48] sub w0, w0, #1 str w0, [sp, 48] .L39: ldr w1, [sp, 44] ldr w0, [sp, 52] cmp w1, w0 blt .L40 ldr w1, [sp, 28] ldr x0, [sp, 16] bl mayer_fht nop ldp x29, x30, [sp], 64 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size mayer_realifft, .-mayer_realifft .section .rodata .align 3 .LC0: .word 1719614413 .word 1073127582 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "d_mayer_fft.c" .text .align 2 .global mayer_fht .type mayer_fht, %function mayer_fht: .LFB0: .cfi_startproc mov x14, x0 mov w15, w1 cmp w1, 1 ble .L3 asr w3, w1, 1 sub w4, w1, #1 mov w1, w3 mov x2, 1 b .L28 .L6: cmp x2, x4 beq .L45 eor w1, w1, w3 tst w3, w1 bne .L4 mov w0, w3 .L5: asr w0, w0, 1 eor w1, w1, w0 tst w1, w0 beq .L5 .L4: add x2, x2, 1 .L28: cmp w1, w2 bge .L6 ldr s0, [x14, x2, lsl 2] sxtw x0, w1 ldr s1, [x14, x0, lsl 2] str s1, [x14, x2, lsl 2] str s0, [x14, x0, lsl 2] b .L6 .L45: mov w0, 0 mov w2, 1 .L8: add w0, w0, 1 lsl w1, w2, w0 cmp w1, w15 blt .L8 and w11, w0, 1 tbz x0, 0, .L3 add x1, x14, w15, sxtw 2 cmp x14, x1 bcs .L10 mov x0, x14 adrp x2, .LC0 ldr d19, [x2, #:lo12:.LC0] .L12: ldr s2, [x0] ldr s0, [x0, 4] fsub s3, s2, s0 fadd s2, s2, s0 ldr s5, [x0, 8] ldr s0, [x0, 12] fsub s7, s5, s0 fadd s5, s5, s0 ldr s1, [x0, 16] ldr s16, [x0, 20] fadd s4, s1, s16 ldr s0, [x0, 24] ldr s17, [x0, 28] fadd s18, s0, s17 fsub s6, s2, s5 fadd s2, s2, s5 fsub s5, s3, s7 fadd s3, s3, s7 fsub s7, s4, s18 fadd s4, s4, s18 fsub s0, s0, s17 fcvt d0, s0 fmul d0, d0, d19 fcvt s0, d0 fsub s1, s1, s16 fcvt d1, s1 fmul d1, d1, d19 fcvt s1, d1 fsub s16, s2, s4 str s16, [x0, 16] fadd s2, s2, s4 str s2, [x0] fsub s2, s6, s7 str s2, [x0, 24] fadd s6, s6, s7 str s6, [x0, 8] fsub s2, s3, s1 str s2, [x0, 20] fadd s3, s3, s1 str s3, [x0, 4] fsub s1, s5, s0 str s1, [x0, 28] fadd s5, s5, s0 str s5, [x0, 12] add x0, x0, 32 cmp x1, x0 bhi .L12 b .L10 .L3: add x1, x14, w15, sxtw 2 cmp x14, x1 bcs .L29 mov x0, x14 .L11: ldr s0, [x0] ldr s1, [x0, 4] fsub s2, s0, s1 fadd s0, s0, s1 ldr s1, [x0, 8] ldr s4, [x0, 12] fsub s3, s1, s4 fadd s1, s1, s4 fsub s4, s0, s1 str s4, [x0, 8] fadd s0, s0, s1 str s0, [x0] fsub s0, s2, s3 str s0, [x0, 12] fadd s2, s2, s3 str s2, [x0, 4] add x0, x0, 16 cmp x1, x0 bhi .L11 mov w11, 0 .L10: cmp w15, 15 ble .L42 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] str x21, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 add x7, x14, w15, sxtw 2 mov w18, 1 adrp x0, .LC0 ldr d19, [x0, #:lo12:.LC0] adrp x9, .LANCHOR0 add x9, x9, :lo12:.LANCHOR0 adrp x12, .LANCHOR1 add x12, x12, :lo12:.LANCHOR1 add x10, x9, 80 add x13, x12, 80 add x16, x12, 160 b .L26 .L29: .cfi_def_cfa_offset 0 .cfi_restore 19 .cfi_restore 20 .cfi_restore 21 .cfi_restore 29 .cfi_restore 30 mov w11, 0 b .L10 .L30: .cfi_def_cfa_offset 48 .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 29, -48 .cfi_offset 30, -40 mov w0, 0 b .L19 .L22: sub w0, w11, w0 sxtw x1, w8 ldr s1, [x16, x1, lsl 2] sub w8, w8, #1 sxtw x8, w8 sxtw x0, w0 ldr s0, [x10, x8, lsl 2] ldr s2, [x10, x0, lsl 2] fadd s0, s0, s2 fmul s0, s0, s1 str s0, [x10, x1, lsl 2] ldr s0, [x9, x8, lsl 2] ldr s2, [x9, x0, lsl 2] fadd s0, s0, s2 fmul s0, s0, s1 str s0, [x9, x1, lsl 2] .L21: fmul s7, s17, s17 fmul s0, s18, s18 fsub s7, s7, s0 fmul s16, s18, s17 fadd s16, s16, s16 mov x0, x30 sub x1, x20, x30 .L24: ldr s0, [x0, x3] ldr s2, [x1, x3] fmul s1, s0, s16 fmul s3, s2, s7 fsub s1, s1, s3 fmul s0, s0, s7 fmul s2, s2, s16 fadd s0, s0, s2 ldr s3, [x0] fsub s4, s3, s0 fadd s3, s3, s0 ldr s2, [x1] fsub s6, s2, s1 fadd s2, s2, s1 ldr s0, [x0, x2] ldr s1, [x1, x2] fmul s20, s0, s16 fmul s5, s1, s7 fsub s20, s20, s5 fmul s0, s0, s7 fmul s1, s1, s16 fadd s0, s0, s1 ldr s1, [x0, x4] fsub s5, s1, s0 fadd s1, s1, s0 ldr s0, [x1, x4] fsub s21, s0, s20 fadd s0, s0, s20 fmul s20, s18, s1 fmul s22, s17, s21 fsub s20, s20, s22 fmul s1, s17, s1 fmul s21, s18, s21 fadd s1, s1, s21 fsub s21, s3, s1 str s21, [x0, x4] fadd s3, s3, s1 str s3, [x0] fsub s1, s6, s20 str s1, [x1, x2] fadd s6, s6, s20 str s6, [x1, x3] fmul s1, s17, s0 fmul s3, s18, s5 fsub s1, s1, s3 fmul s0, s18, s0 fmul s5, s17, s5 fadd s0, s0, s5 fsub s3, s2, s0 str s3, [x1, x4] fadd s2, s2, s0 str s2, [x1] fsub s0, s4, s1 str s0, [x0, x2] fadd s0, s4, s1 str s0, [x0, x3] add x1, x1, x5 add x0, x0, x5 cmp x7, x0 bhi .L24 cmp w6, w19 beq .L18 add w6, w6, 1 and w0, w6, 1 tbnz x6, 0, .L30 .L20: add w0, w0, 1 asr w1, w6, w0 tbz x1, 0, .L20 .L19: add x30, x30, 4 .L27: sub w8, w11, w0 sxtw x1, w8 ldr s18, [x10, x1, lsl 2] ldr s17, [x9, x1, lsl 2] cmp w8, 1 ble .L21 add w0, w0, 2 asr w1, w6, w0 tbz x1, 0, .L22 .L23: add w0, w0, 1 asr w1, w6, w0 tbnz x1, 0, .L23 b .L22 .L18: cmp w15, w17 ble .L46 .L26: mov w20, w11 add w11, w11, 2 lsl w0, w18, w11 lsl w2, w0, 1 lsl w17, w0, 2 asr w19, w0, 1 add x1, x14, w19, sxtw 2 sxtw x21, w0 sbfiz x3, x0, 2, 32 sbfiz x4, x2, 2, 32 add w0, w0, w2 sbfiz x2, x0, 2, 32 sbfiz x5, x17, 2, 32 mov x0, x14 .L14: ldr s0, [x0] ldr s1, [x0, x3] fsub s2, s0, s1 fadd s0, s0, s1 ldr s1, [x0, x4] ldr s4, [x0, x2] fsub s3, s1, s4 fadd s1, s1, s4 fsub s4, s0, s1 str s4, [x0, x4] fadd s0, s0, s1 str s0, [x0] fsub s0, s2, s3 str s0, [x0, x2] fadd s2, s2, s3 str s2, [x0, x3] ldr s2, [x1] ldr s0, [x1, x3] fsub s3, s2, s0 fadd s2, s2, s0 ldr s0, [x1, x2] fcvt d0, s0 fmul d0, d0, d19 fcvt s0, d0 ldr s1, [x1, x4] fcvt d1, s1 fmul d1, d1, d19 fcvt s1, d1 fsub s4, s2, s1 str s4, [x1, x4] fadd s2, s2, s1 str s2, [x1] fsub s1, s3, s0 str s1, [x1, x2] fadd s3, s3, s0 str s3, [x1, x3] add x1, x1, x5 add x0, x0, x5 cmp x7, x0 bhi .L14 cmp w11, 1 ble .L15 uxtw x20, w20 mov x1, 0 .L16: lsl x0, x1, 2 add x6, x9, x0 add x8, x12, x0 ldr s0, [x8, 8] str s0, [x6, 8] add x6, x10, x0 add x0, x13, x0 ldr s0, [x0, 8] str s0, [x6, 8] cmp x20, x1 add x1, x1, 1 bne .L16 .L15: cmp w19, 1 ble .L18 add x30, x14, 4 sub w19, w19, #1 add x20, x14, x21, lsl 1 lsl x20, x20, 1 mov w6, 1 mov w0, 0 b .L27 .L46: ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L42: ret .cfi_endproc .LFE0: .size mayer_fht, .-mayer_fht .align 2 .global mayer_fft .type mayer_fft, %function mayer_fft: .LFB1: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w20, w0 mov x0, x1 mov x19, x2 add w2, w20, w20, lsr 31 cmp w20, 3 ble .L48 sub w4, w20, #1 asr w2, w2, 1 sxtw x4, w4 mov x3, 1 fmov s3, 5.0e-1 .L49: ldr s0, [x0, x3, lsl 2] ldr s2, [x0, x4, lsl 2] fadd s1, s0, s2 fsub s0, s0, s2 ldr s2, [x19, x3, lsl 2] ldr s4, [x19, x4, lsl 2] fadd s5, s2, s4 fsub s2, s2, s4 fadd s4, s1, s2 fmul s4, s4, s3 str s4, [x0, x3, lsl 2] fsub s1, s1, s2 fmul s1, s1, s3 str s1, [x0, x4, lsl 2] fsub s1, s5, s0 fmul s1, s1, s3 str s1, [x19, x3, lsl 2] fadd s0, s0, s5 fmul s0, s0, s3 str s0, [x19, x4, lsl 2] add x3, x3, 1 sub x4, x4, #1 cmp w2, w3 bgt .L49 .L48: mov w1, w20 bl mayer_fht mov w1, w20 mov x0, x19 bl mayer_fht ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size mayer_fft, .-mayer_fft .align 2 .global mayer_ifft .type mayer_ifft, %function mayer_ifft: .LFB2: .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] str x21, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 mov w21, w0 mov x19, x1 mov x20, x2 mov w1, w0 mov x0, x19 bl mayer_fht mov w1, w21 mov x0, x20 bl mayer_fht add w2, w21, w21, lsr 31 cmp w21, 3 ble .L52 sub w3, w21, #1 asr w2, w2, 1 sxtw x3, w3 mov x0, 1 fmov s4, 5.0e-1 .L54: ldr s3, [x19, x0, lsl 2] ldr s1, [x19, x3, lsl 2] fadd s0, s3, s1 fsub s3, s3, s1 ldr s2, [x20, x0, lsl 2] ldr s5, [x20, x3, lsl 2] fadd s1, s2, s5 fsub s2, s2, s5 fadd s5, s3, s1 fmul s5, s5, s4 str s5, [x20, x0, lsl 2] fsub s1, s1, s3 fmul s1, s1, s4 str s1, [x20, x3, lsl 2] fsub s1, s0, s2 fmul s1, s1, s4 str s1, [x19, x0, lsl 2] fadd s0, s0, s2 fmul s0, s0, s4 str s0, [x19, x3, lsl 2] add x0, x0, 1 sub x3, x3, #1 cmp w2, w0 bgt .L54 .L52: ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size mayer_ifft, .-mayer_ifft .align 2 .global mayer_realfft .type mayer_realfft, %function mayer_realfft: .LFB3: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w20, w0 mov x19, x1 mov w1, w0 mov x0, x19 bl mayer_fht add w2, w20, w20, lsr 31 cmp w20, 3 ble .L57 sub w1, w20, #1 asr w2, w2, 1 sxtw x1, w1 mov x0, 1 fmov s3, 5.0e-1 .L59: ldr s0, [x19, x0, lsl 2] ldr s2, [x19, x1, lsl 2] fsub s1, s0, s2 fmul s1, s1, s3 str s1, [x19, x1, lsl 2] fadd s0, s0, s2 fmul s0, s0, s3 str s0, [x19, x0, lsl 2] add x0, x0, 1 sub x1, x1, #1 cmp w2, w0 bgt .L59 .L57: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size mayer_realfft, .-mayer_realfft .align 2 .global mayer_realifft .type mayer_realifft, %function mayer_realifft: .LFB4: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp mov w5, w0 mov x0, x1 add w4, w5, w5, lsr 31 cmp w5, 3 ble .L63 sub w3, w5, #1 asr w4, w4, 1 sxtw x3, w3 mov x2, 1 .L64: ldr s0, [x0, x2, lsl 2] ldr s1, [x0, x3, lsl 2] fsub s2, s0, s1 str s2, [x0, x3, lsl 2] fadd s0, s0, s1 str s0, [x0, x2, lsl 2] add x2, x2, 1 sub x3, x3, #1 cmp w4, w2 bgt .L64 .L63: mov w1, w5 bl mayer_fht ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE4: .size mayer_realifft, .-mayer_realifft .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 1719614413 .word 1073127582 .section .rodata .align 3 .set .LANCHOR1,. + 0 .type costab, %object .size costab, 80 costab: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sintab, %object .size sintab, 80 sintab: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .type halsec, %object .size halsec, 80 halsec: .word 0 .word 0 .word 1057655764 .word 1057128951 .word 1057005197 .word 1056974725 .word 1056967135 .word 1056965240 .word 1056964766 .word 1056964647 .word 1056964618 .word 1056964610 .word 1056964609 .word 1056964608 .word 1056964608 .word 1056964608 .zero 16 .data .align 3 .set .LANCHOR0,. + 0 .type coswrk, %object .size coswrk, 80 coswrk: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sinwrk, %object .size sinwrk, 80 sinwrk: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "d_mayer_fft.c" .text .align 2 .p2align 4,,11 .global mayer_fht .type mayer_fht, %function mayer_fht: .LFB0: .cfi_startproc stp x29, x30, [sp, -80]! .cfi_def_cfa_offset 80 .cfi_offset 29, -80 .cfi_offset 30, -72 mov x16, x0 mov w30, w1 mov x29, sp cmp w1, 1 ble .L3 asr w3, w1, 1 sub w4, w1, #1 mov w1, w3 mov x2, 1 .p2align 3,,7 .L29: cmp w1, w2 bge .L6 sxtw x0, w1 ldr s0, [x16, x2, lsl 2] ldr s1, [x16, x0, lsl 2] str s1, [x16, x2, lsl 2] str s0, [x16, x0, lsl 2] .L6: cmp x4, x2 beq .L49 eor w1, w1, w3 tst w3, w1 bne .L4 mov w0, w3 .p2align 3,,7 .L5: asr w0, w0, 1 eor w1, w1, w0 tst w1, w0 beq .L5 .L4: add x2, x2, 1 b .L29 .L49: mov w0, 0 mov w2, 1 .p2align 3,,7 .L8: add w0, w0, 1 lsl w1, w2, w0 cmp w1, w30 blt .L8 and w17, w0, 1 tbz x0, 0, .L3 add x1, x16, w30, sxtw 2 sxtw x7, w30 cmp x16, x1 bcs .L10 adrp x2, .LC0 mov x0, x16 ldr d17, [x2, #:lo12:.LC0] .L12: ldp s3, s1, [x0, 16] ldp s6, s4, [x0, 24] fsub s2, s3, s1 fadd s3, s3, s1 ldp s0, s7, [x0] fsub s1, s6, s4 ldp s5, s16, [x0, 8] fcvt d2, s2 fadd s6, s6, s4 fsub s4, s0, s7 fcvt d1, s1 fadd s0, s0, s7 fsub s7, s5, s16 fadd s5, s5, s16 fmul d2, d2, d17 fadd s16, s3, s6 fsub s3, s3, s6 fmul d1, d1, d17 fadd s6, s4, s7 fsub s4, s4, s7 fcvt s2, d2 fsub s7, s0, s5 fadd s0, s0, s5 fcvt s1, d1 fsub s5, s7, s3 fadd s7, s7, s3 fsub s18, s0, s16 fsub s3, s6, s2 fadd s0, s0, s16 fadd s6, s6, s2 fsub s2, s4, s1 fadd s4, s4, s1 stp s18, s3, [x0, 16] stp s0, s6, [x0] stp s7, s4, [x0, 8] stp s5, s2, [x0, 24] add x0, x0, 32 cmp x0, x1 bcc .L12 .L10: cmp w30, 15 ble .L1 mov w0, 33630 adrp x9, .LANCHOR0 movk w0, 0x3f6c, lsl 16 fmov s21, w0 adrp x0, .LC0 add x9, x9, :lo12:.LANCHOR0 adrp x14, .LANCHOR1 add x14, x14, :lo12:.LANCHOR1 mov w1, 61205 add x7, x16, x7, lsl 2 sxtw x17, w17 add x10, x9, 80 add x15, x14, 80 ldr d20, [x0, #:lo12:.LC0] stp x19, x20, [sp, 16] .cfi_offset 20, -56 .cfi_offset 19, -64 add x19, x14, 160 movk w1, 0x3ec3, lsl 16 fmov s22, w1 stp x21, x22, [sp, 32] .cfi_offset 22, -40 .cfi_offset 21, -48 stp x23, x24, [sp, 48] .cfi_offset 24, -24 .cfi_offset 23, -32 mov w23, 1 str x25, [sp, 64] .cfi_offset 25, -16 .p2align 3,,7 .L18: add w12, w17, 2 mov x0, x16 lsl w21, w23, w12 lsl w2, w21, 1 lsl w20, w21, 2 add w3, w21, w2 asr w13, w21, 1 sbfiz x2, x2, 2, 32 sbfiz x5, x20, 2, 32 sbfiz x3, x3, 2, 32 add x1, x16, w13, sxtw 2 sbfiz x4, x21, 2, 32 .p2align 3,,7 .L14: ldr s3, [x0, x4] ldr s4, [x0, x3] ldr s1, [x0, x2] ldr s0, [x0] fadd s2, s0, s3 fsub s0, s0, s3 fadd s3, s1, s4 fsub s1, s1, s4 fsub s4, s2, s3 fadd s2, s2, s3 fsub s3, s0, s1 fadd s0, s0, s1 str s4, [x0, x2] str s2, [x0] str s3, [x0, x3] str s0, [x0, x4] add x0, x0, x5 ldr s1, [x1, x2] ldr s0, [x1, x3] ldr s4, [x1, x4] fcvt d1, s1 ldr s2, [x1] fcvt d0, s0 fadd s3, s2, s4 fsub s2, s2, s4 fmul d1, d1, d20 fmul d0, d0, d20 fcvt s1, d1 fcvt s0, d0 fsub s4, s3, s1 fadd s3, s3, s1 fsub s1, s2, s0 fadd s2, s2, s0 str s4, [x1, x2] str s3, [x1] str s1, [x1, x3] str s2, [x1, x4] add x1, x1, x5 cmp x7, x0 bhi .L14 fmov s1, s22 fmov s0, s21 ubfiz x18, x17, 2, 32 mov x0, 0 b .L16 .p2align 2,,3 .L50: add x0, x0, 4 ldr s1, [x8, 12] ldr s0, [x11, 12] .L16: add x6, x9, x0 add x1, x10, x0 add x11, x14, x0 add x8, x15, x0 str s1, [x1, 8] str s0, [x6, 8] cmp x18, x0 bne .L50 cmp w13, 1 ble .L27 add x11, x16, w21, sxtw 1 lsl x18, x17, 2 add x22, x10, x18 add x8, x16, 4 add x18, x9, x18 lsl x11, x11, 1 sxtw x21, w12 mov w6, 1 .p2align 3,,7 .L26: and w0, w6, 1 tbnz x6, 0, .L20 .p2align 3,,7 .L21: mov w1, w0 add w0, w0, 1 asr w24, w6, w0 tbz x24, 0, .L21 sub w0, w12, w0 add w1, w1, 3 sxtw x24, w0 ldr s19, [x10, x24, lsl 2] ldr s18, [x9, x24, lsl 2] cmp w0, 1 bgt .L47 .L22: fmul s17, s19, s19 fmul s16, s19, s18 fnmsub s17, s18, s18, s17 mov x0, x8 sub x1, x11, x8 fadd s16, s16, s16 .p2align 3,,7 .L25: ldr s5, [x1, x3] ldr s0, [x0, x3] ldr s6, [x1, x2] fmul s7, s5, s17 fmul s5, s5, s16 fnmsub s7, s0, s16, s7 fmadd s5, s0, s17, s5 ldr s4, [x1, x4] ldr s2, [x0, x4] ldr s0, [x0, x2] fmul s25, s4, s16 fmul s4, s4, s17 fmadd s25, s2, s17, s25 fnmsub s4, s2, s16, s4 ldr s1, [x0] ldr s2, [x1] fsub s3, s6, s7 fadd s23, s0, s5 fsub s0, s0, s5 fadd s5, s6, s7 fmul s24, s3, s19 fmul s3, s3, s18 fmadd s24, s23, s18, s24 fnmsub s3, s23, s19, s3 fmul s23, s0, s18 fadd s7, s1, s25 fmadd s23, s5, s19, s23 fmul s0, s0, s19 fsub s6, s2, s4 fnmsub s0, s5, s18, s0 fsub s1, s1, s25 fadd s2, s2, s4 fsub s25, s7, s24 fadd s7, s7, s24 fsub s5, s6, s3 fadd s6, s6, s3 fsub s4, s2, s23 fadd s2, s2, s23 fsub s3, s1, s0 fadd s1, s1, s0 str s25, [x0, x2] str s7, [x0] str s5, [x1, x3] str s6, [x1, x4] str s4, [x1, x2] str s2, [x1] add x1, x1, x5 str s3, [x0, x3] str s1, [x0, x4] add x0, x0, x5 cmp x7, x0 bhi .L25 add w6, w6, 1 add x8, x8, 4 cmp w13, w6 bne .L26 .L27: add x17, x17, 2 cmp w30, w20 bgt .L18 ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 ldp x23, x24, [sp, 48] .cfi_restore 24 .cfi_restore 23 ldr x25, [sp, 64] .cfi_restore 25 .L1: ldp x29, x30, [sp], 80 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L24: .cfi_def_cfa_offset 80 .cfi_offset 19, -64 .cfi_offset 20, -56 .cfi_offset 21, -48 .cfi_offset 22, -40 .cfi_offset 23, -32 .cfi_offset 24, -24 .cfi_offset 25, -16 .cfi_offset 29, -80 .cfi_offset 30, -72 add w1, w1, 1 .L47: asr w25, w6, w1 tbnz x25, 0, .L24 sub w1, w12, w1 sub w0, w0, #1 ldr s2, [x19, x24, lsl 2] sxtw x1, w1 sxtw x0, w0 ldr s4, [x10, x1, lsl 2] ldr s1, [x10, x0, lsl 2] ldr s0, [x9, x0, lsl 2] ldr s3, [x9, x1, lsl 2] fadd s1, s1, s4 fadd s0, s0, s3 fmul s1, s1, s2 fmul s0, s0, s2 str s1, [x10, x24, lsl 2] str s0, [x9, x24, lsl 2] b .L22 .p2align 2,,3 .L20: mov w0, w12 mov x24, x21 mov w1, 2 ldr s18, [x18, 8] ldr s19, [x22, 8] b .L47 .L3: .cfi_restore 19 .cfi_restore 20 .cfi_restore 21 .cfi_restore 22 .cfi_restore 23 .cfi_restore 24 .cfi_restore 25 add x1, x16, w30, sxtw 2 sxtw x7, w30 cmp x16, x1 bcs .L30 mov x0, x16 .L11: ldp s0, s3, [x0] ldp s1, s4, [x0, 8] fsub s2, s0, s3 fadd s0, s0, s3 fadd s3, s1, s4 fsub s1, s1, s4 fsub s4, s0, s3 fadd s0, s0, s3 fsub s3, s2, s1 fadd s2, s2, s1 stp s0, s2, [x0] stp s4, s3, [x0, 8] add x0, x0, 16 cmp x1, x0 bhi .L11 .L30: mov w17, 0 b .L10 .cfi_endproc .LFE0: .size mayer_fht, .-mayer_fht .align 2 .p2align 4,,11 .global mayer_fft .type mayer_fft, %function mayer_fft: .LFB1: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w20, w0 mov x19, x2 mov x0, x1 add w2, w20, w20, lsr 31 cmp w20, 3 ble .L52 sub w4, w20, #1 asr w2, w2, 1 mov x3, 1 fmov s3, 5.0e-1 sxtw x4, w4 .p2align 3,,7 .L53: ldr s4, [x0, x4, lsl 2] ldr s5, [x19, x4, lsl 2] ldr s0, [x0, x3, lsl 2] ldr s2, [x19, x3, lsl 2] fadd s1, s0, s4 fsub s0, s0, s4 fsub s4, s2, s5 fadd s2, s2, s5 fadd s5, s1, s4 fsub s1, s1, s4 fsub s4, s2, s0 fadd s0, s0, s2 fmul s5, s5, s3 fmul s1, s1, s3 fmul s2, s4, s3 fmul s0, s0, s3 str s5, [x0, x3, lsl 2] str s1, [x0, x4, lsl 2] str s2, [x19, x3, lsl 2] add x3, x3, 1 str s0, [x19, x4, lsl 2] sub x4, x4, #1 cmp w2, w3 bgt .L53 .L52: mov w1, w20 bl mayer_fht mov w1, w20 mov x0, x19 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b mayer_fht .cfi_endproc .LFE1: .size mayer_fft, .-mayer_fft .align 2 .p2align 4,,11 .global mayer_ifft .type mayer_ifft, %function mayer_ifft: .LFB2: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x19, x1 mov x20, x2 mov w1, w0 str x21, [sp, 32] .cfi_offset 21, -16 mov w21, w0 mov x0, x19 bl mayer_fht mov w1, w21 mov x0, x20 bl mayer_fht add w2, w21, w21, lsr 31 cmp w21, 3 ble .L56 sub w3, w21, #1 asr w2, w2, 1 mov x0, 1 fmov s3, 5.0e-1 sxtw x3, w3 .p2align 3,,7 .L58: ldr s1, [x19, x3, lsl 2] ldr s5, [x20, x3, lsl 2] ldr s0, [x19, x0, lsl 2] ldr s2, [x20, x0, lsl 2] fsub s4, s0, s1 fadd s0, s0, s1 fadd s1, s2, s5 fsub s2, s2, s5 fadd s5, s4, s1 fsub s1, s1, s4 fsub s4, s0, s2 fadd s0, s0, s2 fmul s5, s5, s3 fmul s1, s1, s3 fmul s2, s4, s3 fmul s0, s0, s3 str s5, [x20, x0, lsl 2] str s1, [x20, x3, lsl 2] str s2, [x19, x0, lsl 2] add x0, x0, 1 str s0, [x19, x3, lsl 2] sub x3, x3, #1 cmp w2, w0 bgt .L58 .L56: ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size mayer_ifft, .-mayer_ifft .align 2 .p2align 4,,11 .global mayer_realfft .type mayer_realfft, %function mayer_realfft: .LFB3: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w20, w0 mov x19, x1 mov w1, w0 mov x0, x19 bl mayer_fht add w3, w20, w20, lsr 31 cmp w20, 3 ble .L61 sub w2, w20, #1 asr w3, w3, 1 fmov s3, 5.0e-1 sxtw x0, w2 mov x2, 1 .p2align 3,,7 .L63: ldr s0, [x19, x2, lsl 2] ldr s2, [x19, x0, lsl 2] fsub s1, s0, s2 fadd s0, s0, s2 fmul s1, s1, s3 fmul s0, s0, s3 str s1, [x19, x0, lsl 2] sub x0, x0, #1 str s0, [x19, x2, lsl 2] add x2, x2, 1 cmp w3, w2 bgt .L63 .L61: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size mayer_realfft, .-mayer_realfft .align 2 .p2align 4,,11 .global mayer_realifft .type mayer_realifft, %function mayer_realifft: .LFB4: .cfi_startproc mov w5, w0 mov x0, x1 sub w3, w5, #1 add w4, w5, w5, lsr 31 asr w4, w4, 1 cmp w5, 3 ble .L67 sxtw x3, w3 mov x2, 1 .p2align 3,,7 .L68: ldr s0, [x0, x2, lsl 2] ldr s1, [x0, x3, lsl 2] fsub s2, s0, s1 fadd s0, s0, s1 str s2, [x0, x3, lsl 2] sub x3, x3, #1 str s0, [x0, x2, lsl 2] add x2, x2, 1 cmp w4, w2 bgt .L68 .L67: mov w1, w5 b mayer_fht .cfi_endproc .LFE4: .size mayer_realifft, .-mayer_realifft .section .rodata.cst8,"aM",@progbits,8 .align 3 .LC0: .word 1719614413 .word 1073127582 .section .rodata .align 3 .set .LANCHOR1,. + 0 .type costab, %object .size costab, 80 costab: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sintab, %object .size sintab, 80 sintab: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .type halsec, %object .size halsec, 80 halsec: .word 0 .word 0 .word 1057655764 .word 1057128951 .word 1057005197 .word 1056974725 .word 1056967135 .word 1056965240 .word 1056964766 .word 1056964647 .word 1056964618 .word 1056964610 .word 1056964609 .word 1056964608 .word 1056964608 .word 1056964608 .zero 16 .data .align 3 .set .LANCHOR0,. + 0 .type coswrk, %object .size coswrk, 80 coswrk: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sinwrk, %object .size sinwrk, 80 sinwrk: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "d_mayer_fft.c" .text .align 2 .p2align 4,,11 .global mayer_fht .type mayer_fht, %function mayer_fht: .LFB0: .cfi_startproc stp x29, x30, [sp, -144]! .cfi_def_cfa_offset 144 .cfi_offset 29, -144 .cfi_offset 30, -136 mov x29, sp stp x21, x22, [sp, 32] .cfi_offset 21, -112 .cfi_offset 22, -104 mov w22, w1 stp x23, x24, [sp, 48] .cfi_offset 23, -96 .cfi_offset 24, -88 mov x23, x0 stp x25, x26, [sp, 64] str d8, [sp, 96] cmp w1, 1 .cfi_offset 25, -80 .cfi_offset 26, -72 .cfi_offset 72, -48 ble .L3 asr w3, w1, 1 sub w4, w1, #1 mov w1, w3 mov x2, 1 .p2align 3,,7 .L32: cmp w1, w2 bge .L6 sxtw x0, w1 ldr s0, [x23, x2, lsl 2] ldr s1, [x23, x0, lsl 2] str s1, [x23, x2, lsl 2] str s0, [x23, x0, lsl 2] .L6: cmp x4, x2 beq .L54 eor w1, w1, w3 tst w3, w1 bne .L4 mov w0, w3 .p2align 3,,7 .L5: asr w0, w0, 1 eor w1, w1, w0 tst w1, w0 beq .L5 .L4: add x2, x2, 1 b .L32 .L54: mov w0, 0 mov w2, 1 .p2align 3,,7 .L8: add w0, w0, 1 lsl w1, w2, w0 cmp w1, w22 blt .L8 and w6, w0, 1 tbz x0, 0, .L3 sbfiz x2, x22, 2, 32 add x1, x23, 4 add x25, x23, x2 cmp x23, x25 bcs .L10 sub x2, x2, #1 mov x0, x23 lsr x3, x2, 5 add x3, x3, 1 cmp x2, 95 bls .L14 adrp x4, .LC0 lsr x2, x3, 2 ldr q5, [x4, #:lo12:.LC0] add x2, x23, x2, lsl 7 .L15: ldp q1, q8, [x0] ldp q7, q3, [x0, 32] ldp q0, q4, [x0, 64] ldp q2, q16, [x0, 96] uzp1 v6.4s, v1.4s, v8.4s uzp2 v1.4s, v1.4s, v8.4s uzp1 v8.4s, v7.4s, v3.4s uzp2 v7.4s, v7.4s, v3.4s uzp1 v3.4s, v0.4s, v4.4s uzp2 v0.4s, v0.4s, v4.4s uzp1 v4.4s, v2.4s, v16.4s uzp2 v2.4s, v2.4s, v16.4s uzp1 v18.4s, v6.4s, v8.4s uzp2 v6.4s, v6.4s, v8.4s uzp1 v8.4s, v3.4s, v4.4s uzp2 v3.4s, v3.4s, v4.4s uzp1 v4.4s, v1.4s, v7.4s uzp2 v1.4s, v1.4s, v7.4s uzp1 v7.4s, v0.4s, v2.4s uzp2 v0.4s, v0.4s, v2.4s uzp2 v19.4s, v6.4s, v3.4s uzp2 v16.4s, v18.4s, v8.4s uzp2 v2.4s, v4.4s, v7.4s uzp2 v17.4s, v1.4s, v0.4s uzp1 v18.4s, v18.4s, v8.4s uzp1 v4.4s, v4.4s, v7.4s fsub v8.4s, v16.4s, v2.4s fsub v7.4s, v19.4s, v17.4s uzp1 v6.4s, v6.4s, v3.4s uzp1 v1.4s, v1.4s, v0.4s fcvtl v0.2d, v8.2s fcvtl v3.2d, v7.2s fcvtl2 v8.2d, v8.4s fcvtl2 v7.2d, v7.4s fmul v0.2d, v0.2d, v5.2d fmul v3.2d, v3.2d, v5.2d fadd v17.4s, v17.4s, v19.4s fadd v2.4s, v2.4s, v16.4s fmul v8.2d, v8.2d, v5.2d fsub v16.4s, v18.4s, v4.4s fcvtn v0.2s, v0.2d fadd v4.4s, v4.4s, v18.4s fcvtn v3.2s, v3.2d fsub v18.4s, v6.4s, v1.4s fadd v1.4s, v1.4s, v6.4s fmul v6.2d, v7.2d, v5.2d fcvtn2 v0.4s, v8.2d fsub v7.4s, v16.4s, v18.4s fadd v19.4s, v18.4s, v16.4s fcvtn2 v3.4s, v6.2d fsub v18.4s, v4.4s, v1.4s fadd v1.4s, v1.4s, v4.4s fadd v4.4s, v17.4s, v2.4s fsub v2.4s, v2.4s, v17.4s fsub v6.4s, v7.4s, v3.4s fsub v8.4s, v19.4s, v0.4s fadd v3.4s, v3.4s, v7.4s fsub v17.4s, v1.4s, v4.4s fsub v16.4s, v18.4s, v2.4s fadd v4.4s, v4.4s, v1.4s fadd v0.4s, v0.4s, v19.4s fadd v1.4s, v2.4s, v18.4s zip2 v2.4s, v3.4s, v6.4s zip1 v7.4s, v0.4s, v8.4s zip2 v0.4s, v0.4s, v8.4s zip1 v8.4s, v3.4s, v6.4s zip1 v6.4s, v4.4s, v17.4s zip2 v3.4s, v4.4s, v17.4s zip1 v4.4s, v1.4s, v16.4s zip2 v1.4s, v1.4s, v16.4s zip1 v16.4s, v7.4s, v8.4s zip2 v7.4s, v7.4s, v8.4s zip1 v8.4s, v6.4s, v4.4s zip2 v4.4s, v6.4s, v4.4s zip1 v6.4s, v0.4s, v2.4s zip2 v0.4s, v0.4s, v2.4s zip1 v2.4s, v3.4s, v1.4s zip2 v1.4s, v3.4s, v1.4s zip1 v3.4s, v8.4s, v16.4s zip2 v8.4s, v8.4s, v16.4s zip1 v16.4s, v4.4s, v7.4s zip2 v4.4s, v4.4s, v7.4s zip1 v7.4s, v2.4s, v6.4s zip2 v2.4s, v2.4s, v6.4s stp q3, q8, [x0] zip1 v3.4s, v1.4s, v0.4s stp q16, q4, [x0, 32] zip2 v1.4s, v1.4s, v0.4s stp q7, q2, [x0, 64] stp q3, q1, [x0, 96] add x0, x0, 128 cmp x2, x0 bne .L15 and x2, x3, -4 lsl x0, x2, 5 add x1, x1, x0 add x0, x23, x0 cmp x2, x3 beq .L10 .L14: ldr s0, [x1, 16] adrp x2, .LC1 ldr s4, [x0, 16] ldr s16, [x1, 24] ldr s7, [x0, 24] fsub s1, s4, s0 fadd s4, s4, s0 ldr s5, [x1] fsub s0, s7, s16 ldr s2, [x0] ldr s8, [x1, 8] fadd s7, s7, s16 fcvt d1, s1 ldr s6, [x0, 8] ldr d3, [x2, #:lo12:.LC1] fadd s16, s5, s2 fcvt d0, s0 fsub s2, s2, s5 fadd s5, s6, s8 fsub s6, s6, s8 fmul d1, d1, d3 fadd s8, s4, s7 fsub s4, s4, s7 add x2, x0, 32 fmul d0, d0, d3 fsub s7, s16, s5 fadd s5, s5, s16 fcvt s1, d1 fadd s16, s2, s6 fsub s2, s2, s6 fcvt s0, d0 fsub s6, s7, s4 fsub s17, s5, s8 fadd s7, s7, s4 fadd s8, s8, s5 fsub s5, s16, s1 fadd s1, s1, s16 fsub s4, s2, s0 fadd s0, s0, s2 str s17, [x0, 16] str s8, [x0] str s7, [x0, 8] str s6, [x0, 24] str s1, [x1] str s0, [x1, 8] str s5, [x1, 16] str s4, [x1, 24] cmp x25, x2 bls .L10 ldr s0, [x0, 48] add x2, x0, 64 ldr s2, [x1, 48] ldr s16, [x0, 56] ldr s7, [x1, 56] fsub s1, s0, s2 fadd s2, s2, s0 ldr s5, [x1, 32] fsub s0, s16, s7 ldr s4, [x0, 32] ldr s8, [x1, 40] fadd s7, s7, s16 fcvt d1, s1 ldr s6, [x0, 40] fadd s17, s5, s4 fsub s4, s4, s5 fcvt d0, s0 fadd s5, s8, s6 fsub s6, s6, s8 fmul d1, d1, d3 fadd s8, s7, s2 fsub s2, s2, s7 fmul d0, d0, d3 fsub s16, s17, s5 fadd s5, s5, s17 fadd s7, s6, s4 fcvt s1, d1 fsub s4, s4, s6 fcvt s0, d0 fsub s18, s5, s8 fsub s17, s16, s2 fadd s8, s8, s5 fadd s2, s2, s16 fsub s6, s7, s1 fadd s1, s1, s7 fsub s5, s4, s0 fadd s0, s0, s4 str s18, [x0, 48] str s8, [x0, 32] str s2, [x0, 40] str s17, [x0, 56] str s1, [x1, 32] str s0, [x1, 40] str s6, [x1, 48] str s5, [x1, 56] cmp x25, x2 bls .L10 ldr s0, [x0, 80] ldr s2, [x1, 80] ldr s16, [x0, 88] ldr s7, [x1, 88] fsub s1, s0, s2 fadd s2, s2, s0 ldr s5, [x1, 64] fsub s0, s16, s7 ldr s4, [x0, 64] ldr s8, [x1, 72] fadd s7, s7, s16 fcvt d1, s1 ldr s6, [x0, 72] fadd s17, s5, s4 fsub s4, s4, s5 fcvt d0, s0 fadd s5, s8, s6 fsub s6, s6, s8 fmul d1, d1, d3 fadd s8, s7, s2 fsub s2, s2, s7 fmul d0, d0, d3 fsub s16, s17, s5 fadd s5, s5, s17 fadd s7, s6, s4 fsub s3, s4, s6 fcvt s1, d1 fcvt s0, d0 fsub s17, s5, s8 fsub s6, s16, s2 fadd s8, s8, s5 fadd s2, s2, s16 fsub s5, s7, s1 fadd s1, s1, s7 fsub s4, s3, s0 fadd s0, s0, s3 str s17, [x0, 80] str s8, [x0, 64] str s2, [x0, 72] str s6, [x0, 88] str s1, [x1, 64] str s0, [x1, 72] str s5, [x1, 80] str s4, [x1, 88] .L10: cmp w22, 15 ble .L1 adrp x0, .LC1 adrp x26, .LANCHOR0 add x26, x26, :lo12:.LANCHOR0 sxtw x6, w6 ldr d8, [x0, #:lo12:.LC1] stp x27, x28, [sp, 80] .cfi_offset 28, -56 .cfi_offset 27, -64 add x27, x26, 80 stp x19, x20, [sp, 16] .cfi_offset 20, -120 .cfi_offset 19, -128 .p2align 3,,7 .L21: add w3, w6, 2 mov w1, 1 mov x0, x23 lsl w9, w1, w3 lsl w19, w9, 1 lsl w8, w9, 2 add w20, w9, w19 asr w4, w9, 1 sbfiz x19, x19, 2, 32 sbfiz x24, x8, 2, 32 sbfiz x20, x20, 2, 32 add x1, x23, w4, sxtw 2 sbfiz x21, x9, 2, 32 .p2align 3,,7 .L19: ldr s3, [x0, x21] ldr s4, [x0, x20] ldr s1, [x0, x19] ldr s0, [x0] fadd s2, s0, s3 fsub s0, s0, s3 fadd s3, s1, s4 fsub s1, s1, s4 fsub s4, s2, s3 fadd s2, s2, s3 fsub s3, s0, s1 fadd s0, s0, s1 str s4, [x0, x19] str s2, [x0] str s3, [x0, x20] str s0, [x0, x21] add x0, x0, x24 ldr s1, [x1, x19] ldr s0, [x1, x20] ldr s4, [x1, x21] fcvt d1, s1 ldr s2, [x1] fcvt d0, s0 fadd s3, s2, s4 fsub s2, s2, s4 fmul d1, d1, d8 fmul d0, d0, d8 fcvt s1, d1 fcvt s0, d0 fsub s4, s3, s1 fadd s3, s3, s1 fsub s1, s2, s0 fadd s2, s2, s0 str s4, [x1, x19] str s3, [x1] str s1, [x1, x20] str s2, [x1, x21] add x1, x1, x24 cmp x0, x25 bcc .L19 ubfiz x2, x6, 2, 32 adrp x0, .LANCHOR1 add x28, x0, :lo12:.LANCHOR1 add x2, x2, 4 add x1, x28, 8 add x0, x26, 8 stp x2, x6, [sp, 112] stp w9, w8, [sp, 128] stp w4, w3, [sp, 136] bl memcpy ldr x2, [sp, 112] add x1, x28, 88 add x0, x26, 88 bl memcpy ldp w4, w3, [sp, 136] ldp w9, w8, [sp, 128] cmp w4, 1 ldr x6, [sp, 120] ble .L30 add x9, x23, w9, sxtw 1 lsl x11, x6, 2 add x13, x27, x11 add x28, x28, 160 lsl x10, x9, 1 add x11, x26, x11 add x9, x23, 4 sxtw x12, w3 mov w2, 1 .p2align 3,,7 .L29: and w0, w2, 1 tbnz x2, 0, .L23 .p2align 3,,7 .L24: mov w1, w0 add w0, w0, 1 asr w14, w2, w0 tbz x14, 0, .L24 sub w0, w3, w0 add w1, w1, 3 sxtw x14, w0 ldr s20, [x27, x14, lsl 2] ldr s19, [x26, x14, lsl 2] cmp w0, 1 bgt .L52 .L25: fmul s18, s20, s20 fmul s17, s20, s19 fnmsub s18, s19, s19, s18 mov x0, x9 sub x1, x10, x9 fadd s17, s17, s17 .p2align 3,,7 .L28: ldr s5, [x1, x20] ldr s0, [x0, x20] ldr s6, [x1, x19] fmul s7, s5, s18 fmul s5, s5, s17 fnmsub s7, s0, s17, s7 fmadd s5, s0, s18, s5 ldr s4, [x1, x21] ldr s2, [x0, x21] ldr s0, [x0, x19] fmul s22, s4, s17 fmul s4, s4, s18 fmadd s22, s2, s18, s22 fnmsub s4, s2, s17, s4 ldr s1, [x0] ldr s2, [x1] fsub s3, s6, s7 fadd s16, s0, s5 fsub s0, s0, s5 fadd s5, s6, s7 fmul s21, s3, s20 fmul s3, s3, s19 fmadd s21, s16, s19, s21 fnmsub s3, s16, s20, s3 fmul s16, s0, s19 fadd s7, s1, s22 fmadd s16, s5, s20, s16 fmul s0, s0, s20 fsub s6, s2, s4 fnmsub s0, s5, s19, s0 fsub s1, s1, s22 fadd s2, s2, s4 fsub s22, s7, s21 fadd s7, s7, s21 fsub s5, s6, s3 fadd s6, s6, s3 fsub s4, s2, s16 fadd s2, s2, s16 fsub s3, s1, s0 fadd s1, s1, s0 str s22, [x0, x19] str s7, [x0] str s5, [x1, x20] str s6, [x1, x21] str s4, [x1, x19] str s2, [x1] add x1, x1, x24 str s3, [x0, x20] str s1, [x0, x21] add x0, x0, x24 cmp x0, x25 bcc .L28 add w2, w2, 1 add x9, x9, 4 cmp w4, w2 bne .L29 .L30: add x6, x6, 2 cmp w22, w8 bgt .L21 ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 ldp x27, x28, [sp, 80] .cfi_restore 28 .cfi_restore 27 .L1: ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] ldp x25, x26, [sp, 64] ldr d8, [sp, 96] ldp x29, x30, [sp], 144 .cfi_restore 30 .cfi_restore 29 .cfi_restore 25 .cfi_restore 26 .cfi_restore 23 .cfi_restore 24 .cfi_restore 21 .cfi_restore 22 .cfi_restore 72 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L27: .cfi_def_cfa_offset 144 .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 .cfi_offset 28, -56 .cfi_offset 29, -144 .cfi_offset 30, -136 .cfi_offset 72, -48 add w1, w1, 1 .L52: asr w15, w2, w1 tbnz x15, 0, .L27 sub w1, w3, w1 sub w0, w0, #1 ldr s2, [x28, x14, lsl 2] sxtw x1, w1 sxtw x0, w0 ldr s4, [x27, x1, lsl 2] ldr s1, [x27, x0, lsl 2] ldr s0, [x26, x0, lsl 2] ldr s3, [x26, x1, lsl 2] fadd s1, s1, s4 fadd s0, s0, s3 fmul s1, s1, s2 fmul s0, s0, s2 str s1, [x27, x14, lsl 2] str s0, [x26, x14, lsl 2] b .L25 .p2align 2,,3 .L23: mov w0, w3 mov x14, x12 mov w1, 2 ldr s19, [x11, 8] ldr s20, [x13, 8] b .L52 .L3: .cfi_restore 19 .cfi_restore 20 .cfi_restore 27 .cfi_restore 28 sbfiz x1, x22, 2, 32 add x25, x23, x1 cmp x23, x25 bcs .L33 sub x1, x1, #1 mov x0, x23 lsr x2, x1, 4 add x2, x2, 1 cmp x1, 47 bls .L11 lsr x1, x2, 2 add x1, x23, x1, lsl 6 .L12: ld4 {v0.4s - v3.4s}, [x0] fadd v17.4s, v0.4s, v1.4s fsub v8.4s, v0.4s, v1.4s fadd v16.4s, v2.4s, v3.4s fsub v0.4s, v2.4s, v3.4s fadd v4.4s, v16.4s, v17.4s fadd v5.4s, v0.4s, v8.4s fsub v6.4s, v17.4s, v16.4s fsub v7.4s, v8.4s, v0.4s st4 {v4.4s - v7.4s}, [x0], 64 cmp x1, x0 bne .L12 and x1, x2, -4 add x0, x23, x1, lsl 4 cmp x1, x2 beq .L33 .L11: ldp s0, s3, [x0] add x1, x0, 16 ldp s1, s4, [x0, 8] fsub s2, s0, s3 fadd s0, s0, s3 fadd s3, s1, s4 fsub s1, s1, s4 fsub s4, s0, s3 fadd s0, s0, s3 fsub s3, s2, s1 fadd s2, s2, s1 stp s0, s2, [x0] stp s4, s3, [x0, 8] cmp x25, x1 bls .L33 ldp s0, s3, [x0, 16] add x1, x0, 32 ldp s1, s4, [x0, 24] fsub s2, s0, s3 fadd s0, s0, s3 fadd s3, s1, s4 fsub s1, s1, s4 fsub s4, s0, s3 fadd s0, s0, s3 fsub s3, s2, s1 fadd s2, s2, s1 stp s0, s2, [x0, 16] stp s4, s3, [x0, 24] cmp x25, x1 bls .L33 ldp s2, s1, [x0, 32] ldp s0, s4, [x0, 40] fsub s3, s2, s1 fadd s1, s1, s2 fadd s2, s4, s0 fsub s0, s0, s4 fsub s4, s1, s2 fadd s2, s2, s1 fsub s1, s3, s0 fadd s0, s0, s3 stp s2, s0, [x0, 32] stp s4, s1, [x0, 40] .L33: mov w6, 0 b .L10 .cfi_endproc .LFE0: .size mayer_fht, .-mayer_fht .align 2 .p2align 4,,11 .global mayer_fft .type mayer_fft, %function mayer_fft: .LFB1: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w20, w0 mov x19, x2 mov x0, x1 add w6, w20, w20, lsr 31 cmp w20, 3 ble .L56 asr w6, w6, 1 sbfiz x7, x20, 2, 32 sub w1, w6, #1 add x8, x19, 4 add x2, x1, 1 add x10, x0, x7 sub x1, x7, x1, lsl 2 add x9, x0, 20 lsl x2, x2, 2 add x3, x0, x1 cmp x2, x1 add x5, x19, x2 cset w13, le cmp x5, x3 ccmp x10, x8, 0, hi add x5, x0, 4 cset w11, ls cmp w13, 0 ccmp x5, x10, 2, eq add x3, x19, 20 cset w14, cs cmp x8, x9 ccmp x5, x3, 2, cc add x2, x0, x2 add x1, x19, x1 ccmp w20, 5, 4, cs add x12, x19, x7 cset w3, gt cmp x2, x1 and w2, w11, w14 ccmp x5, x12, 2, hi sub x5, x7, #16 cset w9, cs cmp w13, 0 ccmp x12, x8, 0, eq add x1, x0, x5 cset w8, ls add x5, x19, x5 cmp x1, x12 and w2, w3, w2 ccmp x5, x10, 2, cc and w3, w9, w8 and w2, w2, w3 cset w3, cs sub w4, w20, #1 sub w8, w6, #1 tst w3, w2 beq .L57 cmp w20, 9 ble .L65 adrp x9, .LC2 lsr w6, w8, 2 sub w6, w6, #1 mov x3, 20 ldr q7, [x9, #:lo12:.LC2] add x6, x3, w6, uxtw 4 fmov v6.4s, 5.0e-1 mov x2, 4 mov x3, 0 .p2align 3,,7 .L59: ldr q0, [x1, x3] ldr q2, [x5, x3] mov v1.16b, v0.16b ldr q4, [x0, x2] mov v3.16b, v2.16b tbl v1.16b, {v0.16b - v1.16b}, v7.16b ldr q0, [x19, x2] tbl v2.16b, {v2.16b - v3.16b}, v7.16b fadd v3.4s, v4.4s, v1.4s fsub v1.4s, v4.4s, v1.4s fsub v5.4s, v0.4s, v2.4s fadd v0.4s, v0.4s, v2.4s fsub v4.4s, v3.4s, v5.4s fadd v2.4s, v1.4s, v0.4s fadd v3.4s, v3.4s, v5.4s fsub v0.4s, v0.4s, v1.4s fmul v4.4s, v4.4s, v6.4s fmul v2.4s, v2.4s, v6.4s fmul v1.4s, v3.4s, v6.4s fmul v0.4s, v0.4s, v6.4s mov v5.16b, v4.16b mov v3.16b, v2.16b str q1, [x0, x2] tbl v4.16b, {v4.16b - v5.16b}, v7.16b tbl v2.16b, {v2.16b - v3.16b}, v7.16b str q4, [x1, x3] str q0, [x19, x2] add x2, x2, 16 str q2, [x5, x3] sub x3, x3, #16 cmp x6, x2 bne .L59 and w3, w8, -4 sub w4, w4, w3 add w2, w3, 1 cmp w8, w3 beq .L56 .L58: sub w8, w8, w3 cmp w8, 1 beq .L61 sub x7, x7, #8 add x1, x3, 1 sub x3, x7, x3, lsl 2 fmov v5.2s, 5.0e-1 lsl x1, x1, 2 and w5, w8, -2 add w2, w2, w5 sub w4, w4, w5 ldr d3, [x0, x3] ldr d2, [x19, x3] ldr d4, [x0, x1] rev64 v3.2s, v3.2s ldr d0, [x19, x1] rev64 v2.2s, v2.2s fadd v1.2s, v4.2s, v3.2s fsub v4.2s, v4.2s, v3.2s fsub v6.2s, v0.2s, v2.2s fadd v0.2s, v0.2s, v2.2s fsub v3.2s, v1.2s, v6.2s fadd v2.2s, v4.2s, v0.2s fadd v1.2s, v1.2s, v6.2s fsub v0.2s, v0.2s, v4.2s fmul v3.2s, v3.2s, v5.2s fmul v2.2s, v2.2s, v5.2s fmul v1.2s, v1.2s, v5.2s fmul v0.2s, v0.2s, v5.2s rev64 v3.2s, v3.2s rev64 v2.2s, v2.2s str d1, [x0, x1] str d3, [x0, x3] str d0, [x19, x1] str d2, [x19, x3] cmp w8, w5 beq .L56 .L61: sxtw x2, w2 sxtw x3, w4 fmov s3, 5.0e-1 ldr s4, [x0, x3, lsl 2] ldr s5, [x19, x3, lsl 2] ldr s0, [x0, x2, lsl 2] ldr s2, [x19, x2, lsl 2] fadd s1, s0, s4 fsub s0, s0, s4 fsub s4, s2, s5 fadd s2, s2, s5 fadd s5, s1, s4 fsub s1, s1, s4 fsub s4, s2, s0 fadd s0, s0, s2 fmul s5, s5, s3 fmul s1, s1, s3 fmul s2, s4, s3 fmul s0, s0, s3 str s5, [x0, x2, lsl 2] str s1, [x0, x3, lsl 2] str s2, [x19, x2, lsl 2] str s0, [x19, x3, lsl 2] .L56: mov w1, w20 bl mayer_fht mov w1, w20 mov x0, x19 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b mayer_fht .p2align 2,,3 .L57: .cfi_restore_state sxtw x2, w4 mov x3, 1 fmov s3, 5.0e-1 .p2align 3,,7 .L63: ldr s4, [x0, x2, lsl 2] ldr s5, [x19, x2, lsl 2] ldr s0, [x0, x3, lsl 2] ldr s2, [x19, x3, lsl 2] fadd s1, s0, s4 fsub s0, s0, s4 fsub s4, s2, s5 fadd s2, s2, s5 fadd s5, s1, s4 fsub s1, s1, s4 fsub s4, s2, s0 fadd s0, s0, s2 fmul s5, s5, s3 fmul s1, s1, s3 fmul s2, s4, s3 fmul s0, s0, s3 str s5, [x0, x3, lsl 2] str s1, [x0, x2, lsl 2] str s2, [x19, x3, lsl 2] add x3, x3, 1 str s0, [x19, x2, lsl 2] sub x2, x2, #1 cmp w6, w3 bgt .L63 mov w1, w20 bl mayer_fht mov w1, w20 mov x0, x19 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b mayer_fht .L65: .cfi_restore_state mov x3, 0 mov w2, 1 b .L58 .cfi_endproc .LFE1: .size mayer_fft, .-mayer_fft .align 2 .p2align 4,,11 .global mayer_ifft .type mayer_ifft, %function mayer_ifft: .LFB2: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x19, x1 mov x20, x2 mov w1, w0 str x21, [sp, 32] .cfi_offset 21, -16 mov w21, w0 mov x0, x19 bl mayer_fht mov w1, w21 mov x0, x20 bl mayer_fht add w5, w21, w21, lsr 31 cmp w21, 3 ble .L72 asr w5, w5, 1 sbfiz x6, x21, 2, 32 sub w0, w5, #1 add x4, x20, 4 add x1, x0, 1 add x8, x19, x6 sub x0, x6, x0, lsl 2 add x10, x19, 20 lsl x1, x1, 2 add x3, x19, x0 cmp x1, x0 add x7, x20, x1 cset w11, le cmp x7, x3 ccmp x8, x4, 0, hi add x3, x19, 4 cset w9, ls cmp w11, 0 ccmp x3, x8, 2, eq add x7, x20, 20 cset w12, cs cmp x4, x10 ccmp x3, x7, 2, cc add x1, x19, x1 add x0, x20, x0 ccmp w21, 5, 4, cs add x10, x20, x6 cset w7, gt cmp x1, x0 and w0, w9, w12 ccmp x3, x10, 2, hi sub x3, x6, #16 cset w1, cs cmp w11, 0 ccmp x10, x4, 0, eq add x4, x19, x3 cset w9, ls add x3, x20, x3 cmp x4, x10 and w0, w7, w0 and w1, w1, w9 ccmp x3, x8, 2, cc and w0, w0, w1 cset w1, cs sub w2, w21, #1 sub w7, w5, #1 tst w1, w0 beq .L74 cmp w21, 9 ble .L82 adrp x8, .LC2 lsr w5, w7, 2 sub w5, w5, #1 mov x1, 20 ldr q7, [x8, #:lo12:.LC2] add x5, x1, w5, uxtw 4 fmov v6.4s, 5.0e-1 mov x0, 4 mov x1, 0 .p2align 3,,7 .L76: ldr q4, [x4, x1] ldr q2, [x3, x1] mov v5.16b, v4.16b ldr q0, [x19, x0] mov v3.16b, v2.16b tbl v4.16b, {v4.16b - v5.16b}, v7.16b ldr q5, [x20, x0] tbl v2.16b, {v2.16b - v3.16b}, v7.16b fsub v1.4s, v0.4s, v4.4s fadd v0.4s, v0.4s, v4.4s fadd v16.4s, v5.4s, v2.4s fsub v3.4s, v5.4s, v2.4s fsub v4.4s, v16.4s, v1.4s fadd v2.4s, v0.4s, v3.4s fadd v1.4s, v1.4s, v16.4s fsub v0.4s, v0.4s, v3.4s fmul v4.4s, v4.4s, v6.4s fmul v2.4s, v2.4s, v6.4s fmul v1.4s, v1.4s, v6.4s fmul v0.4s, v0.4s, v6.4s mov v5.16b, v4.16b mov v3.16b, v2.16b str q1, [x20, x0] tbl v4.16b, {v4.16b - v5.16b}, v7.16b tbl v2.16b, {v2.16b - v3.16b}, v7.16b str q4, [x3, x1] str q0, [x19, x0] add x0, x0, 16 str q2, [x4, x1] sub x1, x1, #16 cmp x5, x0 bne .L76 and w1, w7, -4 sub w2, w2, w1 add w0, w1, 1 cmp w7, w1 beq .L72 .L75: sub w7, w7, w1 cmp w7, 1 beq .L78 sub x6, x6, #8 add x3, x1, 1 sub x1, x6, x1, lsl 2 fmov v5.2s, 5.0e-1 lsl x3, x3, 2 and w4, w7, -2 add w0, w0, w4 sub w2, w2, w4 ldr d3, [x19, x1] ldr d2, [x20, x1] ldr d0, [x19, x3] rev64 v3.2s, v3.2s ldr d4, [x20, x3] rev64 v2.2s, v2.2s fsub v1.2s, v0.2s, v3.2s fadd v0.2s, v0.2s, v3.2s fadd v6.2s, v4.2s, v2.2s fsub v4.2s, v4.2s, v2.2s fsub v3.2s, v6.2s, v1.2s fadd v2.2s, v0.2s, v4.2s fadd v1.2s, v1.2s, v6.2s fsub v0.2s, v0.2s, v4.2s fmul v3.2s, v3.2s, v5.2s fmul v2.2s, v2.2s, v5.2s fmul v1.2s, v1.2s, v5.2s fmul v0.2s, v0.2s, v5.2s rev64 v3.2s, v3.2s rev64 v2.2s, v2.2s str d1, [x20, x3] str d3, [x20, x1] str d0, [x19, x3] str d2, [x19, x1] cmp w7, w4 beq .L72 .L78: sxtw x0, w0 sxtw x1, w2 fmov s3, 5.0e-1 ldr s1, [x19, x1, lsl 2] ldr s5, [x20, x1, lsl 2] ldr s0, [x19, x0, lsl 2] ldr s2, [x20, x0, lsl 2] fsub s4, s0, s1 fadd s0, s0, s1 fadd s1, s2, s5 fsub s2, s2, s5 fadd s5, s4, s1 fsub s1, s1, s4 fsub s4, s0, s2 fadd s0, s0, s2 fmul s5, s5, s3 fmul s1, s1, s3 fmul s2, s4, s3 fmul s0, s0, s3 str s5, [x20, x0, lsl 2] str s1, [x20, x1, lsl 2] str s2, [x19, x0, lsl 2] str s0, [x19, x1, lsl 2] .L72: ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L74: .cfi_restore_state sxtw x0, w2 mov x1, 1 fmov s3, 5.0e-1 .p2align 3,,7 .L80: ldr s1, [x19, x0, lsl 2] ldr s5, [x20, x0, lsl 2] ldr s0, [x19, x1, lsl 2] ldr s2, [x20, x1, lsl 2] fsub s4, s0, s1 fadd s0, s0, s1 fadd s1, s2, s5 fsub s2, s2, s5 fadd s5, s4, s1 fsub s1, s1, s4 fsub s4, s0, s2 fadd s0, s0, s2 fmul s5, s5, s3 fmul s1, s1, s3 fmul s2, s4, s3 fmul s0, s0, s3 str s5, [x20, x1, lsl 2] str s1, [x20, x0, lsl 2] str s2, [x19, x1, lsl 2] add x1, x1, 1 str s0, [x19, x0, lsl 2] sub x0, x0, #1 cmp w5, w1 bgt .L80 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L82: .cfi_restore_state mov x1, 0 mov w0, 1 b .L75 .cfi_endproc .LFE2: .size mayer_ifft, .-mayer_ifft .align 2 .p2align 4,,11 .global mayer_realfft .type mayer_realfft, %function mayer_realfft: .LFB3: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov w20, w0 mov x19, x1 mov w1, w0 mov x0, x19 bl mayer_fht add w3, w20, w20, lsr 31 cmp w20, 3 ble .L89 asr w3, w3, 1 sbfiz x5, x20, 2, 32 sub w0, w3, #1 add x6, x19, x5 add x4, x0, 1 sub w2, w20, #1 sub x1, x5, x0, lsl 2 add x0, x19, 4 cmp x1, x4, lsl 2 sub w4, w3, #1 ccmp x0, x6, 2, lt ccmp w20, 5, 4, cs ble .L91 cmp w20, 9 ble .L99 lsr w3, w4, 2 adrp x7, .LC2 sub w3, w3, #1 add x6, x19, 20 sub x1, x5, #16 ldr q4, [x7, #:lo12:.LC2] add x3, x6, w3, uxtw 4 fmov v3.4s, 5.0e-1 add x1, x19, x1 .p2align 3,,7 .L93: ldr q0, [x1] ldr q2, [x0] mov v1.16b, v0.16b tbl v1.16b, {v0.16b - v1.16b}, v4.16b fsub v0.4s, v2.4s, v1.4s fadd v2.4s, v2.4s, v1.4s fmul v0.4s, v0.4s, v3.4s fmul v2.4s, v2.4s, v3.4s mov v1.16b, v0.16b tbl v0.16b, {v0.16b - v1.16b}, v4.16b str q0, [x1], -16 str q2, [x0], 16 cmp x0, x3 bne .L93 and w1, w4, -4 sub w2, w2, w1 add w0, w1, 1 cmp w4, w1 beq .L89 .L92: sub w4, w4, w1 cmp w4, 1 beq .L95 sub x5, x5, #8 add x3, x1, 1 sub x1, x5, x1, lsl 2 fmov v3.2s, 5.0e-1 lsl x3, x3, 2 and w5, w4, -2 add w0, w0, w5 sub w2, w2, w5 ldr d2, [x19, x1] ldr d0, [x19, x3] rev64 v2.2s, v2.2s fsub v1.2s, v0.2s, v2.2s fadd v0.2s, v0.2s, v2.2s fmul v1.2s, v1.2s, v3.2s fmul v0.2s, v0.2s, v3.2s rev64 v1.2s, v1.2s str d1, [x19, x1] str d0, [x19, x3] cmp w4, w5 beq .L89 .L95: sxtw x0, w0 sxtw x1, w2 fmov s2, 5.0e-1 ldr s0, [x19, x0, lsl 2] ldr s3, [x19, x1, lsl 2] fsub s1, s0, s3 fadd s0, s0, s3 fmul s1, s1, s2 fmul s0, s0, s2 str s1, [x19, x1, lsl 2] str s0, [x19, x0, lsl 2] .L89: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L91: .cfi_restore_state sxtw x0, w2 mov x1, 1 fmov s3, 5.0e-1 .p2align 3,,7 .L97: ldr s0, [x19, x1, lsl 2] ldr s2, [x19, x0, lsl 2] fsub s1, s0, s2 fadd s0, s0, s2 fmul s1, s1, s3 fmul s0, s0, s3 str s1, [x19, x0, lsl 2] sub x0, x0, #1 str s0, [x19, x1, lsl 2] add x1, x1, 1 cmp w3, w1 bgt .L97 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L99: .cfi_restore_state mov x1, 0 mov w0, 1 b .L92 .cfi_endproc .LFE3: .size mayer_realfft, .-mayer_realfft .align 2 .p2align 4,,11 .global mayer_realifft .type mayer_realifft, %function mayer_realifft: .LFB4: .cfi_startproc mov x2, x1 mov w1, w0 sub w4, w1, #1 mov x0, x2 add w6, w1, w1, lsr 31 asr w6, w6, 1 cmp w1, 3 ble .L107 sub w2, w6, #1 sbfiz x3, x1, 2, 32 add x7, x2, 1 add x8, x0, x3 sub x5, x3, x2, lsl 2 add x2, x0, 4 cmp x5, x7, lsl 2 sub w7, w6, #1 ccmp x2, x8, 2, lt ccmp w1, 9, 4, cs ble .L108 lsr w5, w7, 2 adrp x9, .LC2 sub w5, w5, #1 sub x3, x3, #16 add x8, x0, 20 add x3, x0, x3 ldr q3, [x9, #:lo12:.LC2] add x5, x8, w5, uxtw 4 .p2align 3,,7 .L109: ldr q0, [x3] ldr q2, [x2] mov v1.16b, v0.16b tbl v0.16b, {v0.16b - v1.16b}, v3.16b fsub v1.4s, v2.4s, v0.4s fadd v2.4s, v2.4s, v0.4s mov v0.16b, v1.16b tbl v0.16b, {v0.16b - v1.16b}, v3.16b str q0, [x3], -16 str q2, [x2], 16 cmp x2, x5 bne .L109 and w3, w7, -4 sub w2, w4, w3 add w4, w3, 1 cmp w7, w3 beq .L107 sxtw x7, w4 sxtw x8, w2 add w5, w3, 2 sbfiz x4, x4, 2, 32 sub w2, w2, #1 ldr s0, [x0, x7, lsl 2] ldr s1, [x0, x8, lsl 2] fsub s2, s0, s1 fadd s0, s0, s1 str s2, [x0, x8, lsl 2] str s0, [x0, x7, lsl 2] cmp w6, w5 ble .L107 sxtw x7, w2 add x5, x4, 4 add w3, w3, 3 sbfiz x2, x2, 2, 32 ldr s0, [x0, x5] ldr s1, [x0, x7, lsl 2] fsub s2, s0, s1 fadd s0, s0, s1 str s2, [x0, x7, lsl 2] str s0, [x0, x5] cmp w6, w3 ble .L107 add x4, x4, 8 sub x2, x2, #4 ldr s0, [x0, x4] ldr s1, [x0, x2] fsub s2, s0, s1 fadd s0, s0, s1 str s2, [x0, x2] str s0, [x0, x4] .L107: b mayer_fht .p2align 2,,3 .L108: sxtw x2, w4 mov x3, 1 .p2align 3,,7 .L111: ldr s0, [x0, x3, lsl 2] ldr s1, [x0, x2, lsl 2] fsub s2, s0, s1 fadd s0, s0, s1 str s2, [x0, x2, lsl 2] sub x2, x2, #1 str s0, [x0, x3, lsl 2] add x3, x3, 1 cmp w6, w3 bgt .L111 b mayer_fht .cfi_endproc .LFE4: .size mayer_realifft, .-mayer_realifft .section .rodata.cst16,"aM",@progbits,16 .align 4 .LC0: .word 1719614413 .word 1073127582 .word 1719614413 .word 1073127582 .set .LC1,.LC0 .align 4 .LC2: .byte 12 .byte 13 .byte 14 .byte 15 .byte 8 .byte 9 .byte 10 .byte 11 .byte 4 .byte 5 .byte 6 .byte 7 .byte 0 .byte 1 .byte 2 .byte 3 .section .rodata .align 4 .set .LANCHOR1,. + 0 .type costab, %object .size costab, 80 costab: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sintab, %object .size sintab, 80 sintab: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .type halsec, %object .size halsec, 80 halsec: .word 0 .word 0 .word 1057655764 .word 1057128951 .word 1057005197 .word 1056974725 .word 1056967135 .word 1056965240 .word 1056964766 .word 1056964647 .word 1056964618 .word 1056964610 .word 1056964609 .word 1056964608 .word 1056964608 .word 1056964608 .zero 16 .data .align 4 .set .LANCHOR0,. + 0 .type coswrk, %object .size coswrk, 80 coswrk: .word 0 .word 1060439283 .word 1064076126 .word 1065030846 .word 1065272429 .word 1065333007 .word 1065348163 .word 1065351953 .word 1065352900 .word 1065353137 .word 1065353196 .word 1065353211 .word 1065353215 .word 1065353216 .word 1065353216 .word 1065353216 .zero 16 .type sinwrk, %object .size sinwrk, 80 sinwrk: .word 1065353216 .word 1060439283 .word 1053028117 .word 1044891074 .word 1036565814 .word 1028193072 .word 1019808432 .word 1011420816 .word 1003032456 .word 994643910 .word 986255317 .word 977866713 .word 969478106 .word 961089499 .word 952700891 .word 944312283 .zero 16 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
solution.c
// https://youtu.be/krtTy-mRaNk // https://repl.it/student/assignments/484784/model_solution?fromSubmissionId=1817075 // http://www.geeksforgeeks.org/quick-sort/ #include <stdio.h> void swap(int* a, int* b) { int temp = *a; *a = *b; *b = temp; } int partition(int arr[], int low, int high) { int pivot = arr[high]; int i = low - 1; for (int j = low; j <= high - 1; j++) { if (arr[j] <= pivot) { i++; swap(&arr[i], &arr[j]); } } swap(&arr[i+1], &arr[high]); return i + 1; } void quick_sort(int arr[], int low, int high) { if (low < high) { int index = partition(arr, low, high); quick_sort(arr, low, index - 1); quick_sort(arr, index + 1, high); } } void print_array(int arr[], int size) { for (int i = 0; i < size; i++) { printf("%d\n", arr[i]); } } int main(int argc, char* argv[]) { int arr[] = {100, 55, 4, 98, 10, 18, 90, 95, 43, 11, 47, 67, 89, 42, 49, 79}; int n = sizeof(arr) / sizeof(arr[0]); quick_sort(arr, 0, n-1); print_array(arr, n); return 0; }
.file "solution.c" .option pic .text .align 1 .globl swap .type swap, @function swap: addi sp,sp,-48 sd s0,40(sp) addi s0,sp,48 sd a0,-40(s0) sd a1,-48(s0) ld a5,-40(s0) lw a5,0(a5) sw a5,-20(s0) ld a5,-48(s0) lw a4,0(a5) ld a5,-40(s0) sw a4,0(a5) ld a5,-48(s0) lw a4,-20(s0) sw a4,0(a5) nop ld s0,40(sp) addi sp,sp,48 jr ra .size swap, .-swap .align 1 .globl partition .type partition, @function partition: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 mv a4,a2 sw a5,-44(s0) mv a5,a4 sw a5,-48(s0) lw a5,-48(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a5,0(a5) sw a5,-20(s0) lw a5,-44(s0) addiw a5,a5,-1 sw a5,-28(s0) lw a5,-44(s0) sw a5,-24(s0) j .L3 .L5: lw a5,-24(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a4,0(a5) lw a5,-20(s0) sext.w a5,a5 blt a5,a4,.L4 lw a5,-28(s0) addiw a5,a5,1 sw a5,-28(s0) lw a5,-28(s0) slli a5,a5,2 ld a4,-40(s0) add a3,a4,a5 lw a5,-24(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 mv a1,a5 mv a0,a3 call swap .L4: lw a5,-24(s0) addiw a5,a5,1 sw a5,-24(s0) .L3: lw a5,-48(s0) mv a4,a5 lw a5,-24(s0) sext.w a4,a4 sext.w a5,a5 bgt a4,a5,.L5 lw a5,-28(s0) addi a5,a5,1 slli a5,a5,2 ld a4,-40(s0) add a3,a4,a5 lw a5,-48(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 mv a1,a5 mv a0,a3 call swap lw a5,-28(s0) addiw a5,a5,1 sext.w a5,a5 mv a0,a5 ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size partition, .-partition .align 1 .globl quick_sort .type quick_sort, @function quick_sort: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 mv a4,a2 sw a5,-44(s0) mv a5,a4 sw a5,-48(s0) lw a5,-44(s0) mv a4,a5 lw a5,-48(s0) sext.w a4,a4 sext.w a5,a5 bge a4,a5,.L9 lw a4,-48(s0) lw a5,-44(s0) mv a2,a4 mv a1,a5 ld a0,-40(s0) call partition mv a5,a0 sw a5,-20(s0) lw a5,-20(s0) addiw a5,a5,-1 sext.w a4,a5 lw a5,-44(s0) mv a2,a4 mv a1,a5 ld a0,-40(s0) call quick_sort lw a5,-20(s0) addiw a5,a5,1 sext.w a5,a5 lw a4,-48(s0) mv a2,a4 mv a1,a5 ld a0,-40(s0) call quick_sort .L9: nop ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size quick_sort, .-quick_sort .section .rodata .align 3 .LC1: .string "%d\n" .text .align 1 .globl print_array .type print_array, @function print_array: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) mv a5,a1 sw a5,-44(s0) sw zero,-20(s0) j .L11 .L12: lw a5,-20(s0) slli a5,a5,2 ld a4,-40(s0) add a5,a4,a5 lw a5,0(a5) mv a1,a5 lla a0,.LC1 call printf@plt lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L11: lw a5,-20(s0) mv a4,a5 lw a5,-44(s0) sext.w a4,a4 sext.w a5,a5 blt a4,a5,.L12 nop nop ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size print_array, .-print_array .section .rodata .align 3 .LC0: .word 100 .word 55 .word 4 .word 98 .word 10 .word 18 .word 90 .word 95 .word 43 .word 11 .word 47 .word 67 .word 89 .word 42 .word 49 .word 79 .text .align 1 .globl main .type main, @function main: addi sp,sp,-112 sd ra,104(sp) sd s0,96(sp) addi s0,sp,112 mv a5,a0 sd a1,-112(s0) sw a5,-100(s0) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 lla a5,.LC0 ld a7,0(a5) ld a6,8(a5) ld a0,16(a5) ld a1,24(a5) ld a2,32(a5) ld a3,40(a5) ld a4,48(a5) ld a5,56(a5) sd a7,-88(s0) sd a6,-80(s0) sd a0,-72(s0) sd a1,-64(s0) sd a2,-56(s0) sd a3,-48(s0) sd a4,-40(s0) sd a5,-32(s0) li a5,16 sw a5,-92(s0) lw a5,-92(s0) addiw a5,a5,-1 sext.w a4,a5 addi a5,s0,-88 mv a2,a4 li a1,0 mv a0,a5 call quick_sort lw a4,-92(s0) addi a5,s0,-88 mv a1,a4 mv a0,a5 call print_array li a5,0 mv a4,a5 la a5,__stack_chk_guard ld a3, -24(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L15 call __stack_chk_fail@plt .L15: mv a0,a4 ld ra,104(sp) ld s0,96(sp) addi sp,sp,112 jr ra .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "solution.c" .option pic .text .align 1 .globl swap .type swap, @function swap: lw a5,0(a0) lw a4,0(a1) sw a4,0(a0) sw a5,0(a1) ret .size swap, .-swap .align 1 .globl partition .type partition, @function partition: slli t1,a2,2 add t1,a0,t1 lw a7,0(t1) addiw a6,a1,-1 ble a2,a1,.L3 slli a5,a1,2 add a5,a0,a5 subw a4,a2,a1 addiw a4,a4,-1 slli a4,a4,32 srli a4,a4,32 add a4,a4,a1 slli a4,a4,2 addi a3,a0,4 add a4,a4,a3 j .L5 .L4: addi a5,a5,4 beq a5,a4,.L3 .L5: lw a3,0(a5) bgt a3,a7,.L4 addiw a6,a6,1 slli a2,a6,2 add a2,a0,a2 lw a1,0(a2) sw a3,0(a2) sw a1,0(a5) j .L4 .L3: addi a5,a6,1 slli a5,a5,2 add a0,a0,a5 lw a5,0(a0) lw a4,0(t1) sw a4,0(a0) sw a5,0(t1) addiw a0,a6,1 ret .size partition, .-partition .align 1 .globl quick_sort .type quick_sort, @function quick_sort: blt a1,a2,.L13 ret .L13: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) mv s2,a0 mv s1,a1 mv s0,a2 call partition mv s3,a0 addiw a2,a0,-1 mv a1,s1 mv a0,s2 call quick_sort mv a2,s0 addiw a1,s3,1 mv a0,s2 call quick_sort ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .size quick_sort, .-quick_sort .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC1: .string "%d\n" .text .align 1 .globl print_array .type print_array, @function print_array: ble a1,zero,.L19 addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) sd s2,0(sp) mv s0,a0 addiw s1,a1,-1 slli a5,s1,32 srli s1,a5,30 addi a0,a0,4 add s1,s1,a0 lla s2,.LC1 .L16: lw a2,0(s0) mv a1,s2 li a0,1 call __printf_chk@plt addi s0,s0,4 bne s0,s1,.L16 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L19: ret .size print_array, .-print_array .align 1 .globl main .type main, @function main: addi sp,sp,-112 sd ra,104(sp) sd s0,96(sp) sd s1,88(sp) la s1,__stack_chk_guard ld a5, 0(s1) sd a5, 72(sp) li a5, 0 lla a5,.LANCHOR0 ld a7,0(a5) ld a6,8(a5) ld a0,16(a5) ld a1,24(a5) ld a2,32(a5) ld a3,40(a5) ld a4,48(a5) ld a5,56(a5) sd a7,8(sp) sd a6,16(sp) sd a0,24(sp) sd a1,32(sp) sd a2,40(sp) sd a3,48(sp) sd a4,56(sp) sd a5,64(sp) li a2,15 li a1,0 addi s0,sp,8 mv a0,s0 call quick_sort li a1,16 mv a0,s0 call print_array ld a4, 72(sp) ld a5, 0(s1) xor a5, a4, a5 li a4, 0 bne a5,zero,.L25 li a0,0 ld ra,104(sp) ld s0,96(sp) ld s1,88(sp) addi sp,sp,112 jr ra .L25: call __stack_chk_fail@plt .size main, .-main .section .rodata .align 3 .set .LANCHOR0,. + 0 .LC0: .word 100 .word 55 .word 4 .word 98 .word 10 .word 18 .word 90 .word 95 .word 43 .word 11 .word 47 .word 67 .word 89 .word 42 .word 49 .word 79 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "solution.c" .option pic .text .align 1 .globl swap .type swap, @function swap: lw a4,0(a1) lw a5,0(a0) sw a4,0(a0) sw a5,0(a1) ret .size swap, .-swap .align 1 .globl partition .type partition, @function partition: slli t3,a2,2 add t3,a0,t3 lw t1,0(t3) mv a7,a0 addiw a6,a1,-1 ble a2,a1,.L7 subw a4,a2,a1 addiw a4,a4,-1 slli a4,a4,32 srli a4,a4,32 add a4,a4,a1 slli a4,a4,2 slli a1,a1,2 addi a3,a0,4 add a5,a0,a1 add a4,a4,a3 .L6: lw a2,0(a5) bgt a2,t1,.L5 addiw a6,a6,1 slli a3,a6,2 add a3,a7,a3 lw a1,0(a3) sw a2,0(a3) sw a1,0(a5) .L5: addi a5,a5,4 bne a4,a5,.L6 addiw a0,a6,1 addi a6,a6,1 slli a6,a6,2 lw t1,0(t3) add a7,a7,a6 lw a5,0(a7) sw t1,0(a7) sw a5,0(t3) ret .L7: addi a6,a6,1 slli a6,a6,2 add a7,a7,a6 lw a5,0(a7) sw t1,0(a7) mv a0,a1 sw a5,0(t3) ret .size partition, .-partition .align 1 .globl quick_sort .type quick_sort, @function quick_sort: ble a2,a1,.L38 addi sp,sp,-176 sd s0,160(sp) sd s5,120(sp) sd s7,104(sp) sd ra,168(sp) sd s1,152(sp) sd s2,144(sp) sd s3,136(sp) sd s4,128(sp) sd s6,112(sp) sd s8,96(sp) sd s9,88(sp) sd s10,80(sp) sd s11,72(sp) mv s7,a1 mv s5,a2 mv s0,a0 .L27: mv a2,s5 mv a1,s7 mv a0,s0 call partition sd a0,8(sp) addiw s9,a0,-1 ble s9,s7,.L11 .L26: mv a2,s9 mv a1,s7 mv a0,s0 call partition sd a0,16(sp) addiw s10,a0,-1 ble s10,s7,.L12 .L25: mv a2,s10 mv a1,s7 mv a0,s0 call partition sd a0,24(sp) addiw s11,a0,-1 ble s11,s7,.L13 .L24: mv a2,s11 mv a1,s7 mv a0,s0 call partition sd a0,32(sp) addiw s3,a0,-1 ble s3,s7,.L14 .L23: mv a2,s3 mv a1,s7 mv a0,s0 call partition addiw s2,a0,-1 mv s1,a0 ble s2,s7,.L15 .L22: mv a2,s2 mv a1,s7 mv a0,s0 call partition addiw s6,a0,-1 mv s4,a0 ble s6,s7,.L16 .L21: mv a2,s6 mv a1,s7 mv a0,s0 call partition sd a0,40(sp) addiw s8,a0,-1 ble s8,s7,.L17 .L20: mv a2,s8 mv a1,s7 mv a0,s0 call partition addiw a6,a0,-1 mv a4,a0 ble a6,s7,.L18 .L19: mv a2,a6 mv a1,s7 mv a0,s0 sd a4,56(sp) sd a6,48(sp) call partition mv a7,a0 mv a1,s7 addiw a2,a0,-1 mv a0,s0 addiw s7,a7,1 call quick_sort ld a6,48(sp) ld a4,56(sp) bgt a6,s7,.L19 .L18: addiw s7,a4,1 bgt s8,s7,.L20 .L17: ld a5,40(sp) addiw s7,a5,1 bgt s6,s7,.L21 .L16: addiw s7,s4,1 bgt s2,s7,.L22 .L15: addiw s7,s1,1 bgt s3,s7,.L23 .L14: ld a5,32(sp) addiw s7,a5,1 bgt s11,s7,.L24 .L13: ld a5,24(sp) addiw s7,a5,1 bgt s10,s7,.L25 .L12: ld a5,16(sp) addiw s7,a5,1 bgt s9,s7,.L26 .L11: ld a5,8(sp) addiw s7,a5,1 blt s7,s5,.L27 ld ra,168(sp) ld s0,160(sp) ld s1,152(sp) ld s2,144(sp) ld s3,136(sp) ld s4,128(sp) ld s5,120(sp) ld s6,112(sp) ld s7,104(sp) ld s8,96(sp) ld s9,88(sp) ld s10,80(sp) ld s11,72(sp) addi sp,sp,176 jr ra .L38: ret .size quick_sort, .-quick_sort .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC1: .string "%d\n" .text .align 1 .globl print_array .type print_array, @function print_array: ble a1,zero,.L46 addi sp,sp,-32 sd s1,8(sp) addiw s1,a1,-1 slli a5,s1,32 srli s1,a5,30 addi a5,a0,4 sd s0,16(sp) sd s2,0(sp) sd ra,24(sp) mv s0,a0 add s1,s1,a5 lla s2,.LC1 .L43: lw a2,0(s0) mv a1,s2 addi s0,s0,4 li a0,1 call __printf_chk@plt bne s0,s1,.L43 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L46: ret .size print_array, .-print_array .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: lla a5,.LANCHOR0 addi sp,sp,-112 ld a4,48(a5) ld t4,0(a5) ld t3,8(a5) ld t1,16(a5) ld a7,24(a5) ld a6,32(a5) ld a3,40(a5) ld a5,56(a5) sd s0,96(sp) sd s1,88(sp) addi s0,sp,8 la s1,__stack_chk_guard li a2,15 li a1,0 mv a0,s0 ld t5, 0(s1) sd t5, 72(sp) li t5, 0 sd a4,56(sp) sd a5,64(sp) sd ra,104(sp) sd t4,8(sp) sd t3,16(sp) sd t1,24(sp) sd a7,32(sp) sd a6,40(sp) sd a3,48(sp) call quick_sort li a1,16 mv a0,s0 call print_array ld a4, 72(sp) ld a5, 0(s1) xor a5, a4, a5 li a4, 0 bne a5,zero,.L52 ld ra,104(sp) ld s0,96(sp) ld s1,88(sp) li a0,0 addi sp,sp,112 jr ra .L52: call __stack_chk_fail@plt .size main, .-main .section .rodata .align 3 .set .LANCHOR0,. + 0 .LC0: .word 100 .word 55 .word 4 .word 98 .word 10 .word 18 .word 90 .word 95 .word 43 .word 11 .word 47 .word 67 .word 89 .word 42 .word 49 .word 79 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "solution.c" .option pic .text .align 1 .globl swap .type swap, @function swap: lw a4,0(a1) lw a5,0(a0) sw a4,0(a0) sw a5,0(a1) ret .size swap, .-swap .align 1 .globl partition .type partition, @function partition: slli t3,a2,2 add t3,a0,t3 lw t1,0(t3) mv a7,a0 addiw a6,a1,-1 ble a2,a1,.L7 subw a4,a2,a1 addiw a4,a4,-1 slli a4,a4,32 srli a4,a4,32 add a4,a4,a1 slli a4,a4,2 slli a1,a1,2 addi a3,a0,4 add a5,a0,a1 add a4,a4,a3 .L6: lw a2,0(a5) bgt a2,t1,.L5 addiw a6,a6,1 slli a3,a6,2 add a3,a7,a3 lw a1,0(a3) sw a2,0(a3) sw a1,0(a5) .L5: addi a5,a5,4 bne a4,a5,.L6 addiw a0,a6,1 addi a6,a6,1 slli a6,a6,2 lw t1,0(t3) add a7,a7,a6 lw a5,0(a7) sw t1,0(a7) sw a5,0(t3) ret .L7: addi a6,a6,1 slli a6,a6,2 add a7,a7,a6 lw a5,0(a7) sw t1,0(a7) mv a0,a1 sw a5,0(t3) ret .size partition, .-partition .align 1 .globl quick_sort .type quick_sort, @function quick_sort: ble a2,a1,.L17 addi sp,sp,-48 sd s3,8(sp) slli s3,a2,2 sd s1,24(sp) sd s2,16(sp) sd ra,40(sp) sd s0,32(sp) mv s1,a2 mv s2,a0 add s3,a0,s3 .L13: lw a2,0(s3) slli a5,a1,2 addiw s0,a1,-1 add a5,s2,a5 mv a4,a1 .L12: lw a6,0(a5) addiw a4,a4,1 blt a2,a6,.L11 addiw s0,s0,1 slli a3,s0,2 add a3,s2,a3 lw a0,0(a3) sw a6,0(a3) sw a0,0(a5) .L11: addi a5,a5,4 bgt s1,a4,.L12 addi a5,s0,1 slli a5,a5,2 lw a3,0(s3) add a5,s2,a5 lw a4,0(a5) sw a3,0(a5) mv a2,s0 sw a4,0(s3) mv a0,s2 call quick_sort addiw a1,s0,2 blt a1,s1,.L13 ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L17: ret .size quick_sort, .-quick_sort .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC1: .string "%d\n" .text .align 1 .globl print_array .type print_array, @function print_array: ble a1,zero,.L25 addi sp,sp,-32 sd s1,8(sp) addiw s1,a1,-1 slli a5,s1,32 srli s1,a5,30 addi a5,a0,4 sd s0,16(sp) sd s2,0(sp) sd ra,24(sp) mv s0,a0 add s1,s1,a5 lla s2,.LC1 .L22: lw a2,0(s0) mv a1,s2 addi s0,s0,4 li a0,1 call __printf_chk@plt bne s0,s1,.L22 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 jr ra .L25: ret .size print_array, .-print_array .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: lla a5,.LANCHOR0 addi sp,sp,-128 ld t4,0(a5) ld t3,8(a5) ld t1,16(a5) ld a7,24(a5) ld a6,32(a5) ld a3,40(a5) ld a4,48(a5) ld a5,56(a5) sd s3,88(sp) la s3,__stack_chk_guard addi a0,sp,8 li a2,15 li a1,0 ld t5, 0(s3) sd t5, 72(sp) li t5, 0 sd s0,112(sp) sd s1,104(sp) sd s2,96(sp) sd ra,120(sp) sd t4,8(sp) sd t3,16(sp) sd t1,24(sp) sd a7,32(sp) sd a6,40(sp) sd a3,48(sp) sd a4,56(sp) sd a5,64(sp) mv s0,a0 addi s2,sp,72 call quick_sort lla s1,.LC1 .L29: lw a2,0(s0) mv a1,s1 addi s0,s0,4 li a0,1 call __printf_chk@plt bne s0,s2,.L29 ld a4, 72(sp) ld a5, 0(s3) xor a5, a4, a5 li a4, 0 bne a5,zero,.L33 ld ra,120(sp) ld s0,112(sp) ld s1,104(sp) ld s2,96(sp) ld s3,88(sp) li a0,0 addi sp,sp,128 jr ra .L33: call __stack_chk_fail@plt .size main, .-main .section .rodata .align 3 .set .LANCHOR0,. + 0 .LC0: .word 100 .word 55 .word 4 .word 98 .word 10 .word 18 .word 90 .word 95 .word 43 .word 11 .word 47 .word 67 .word 89 .word 42 .word 49 .word 79 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "solution.c" .text .align 2 .global swap .type swap, %function swap: .LFB0: .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, 28] ldr x0, [sp] ldr w1, [x0] ldr x0, [sp, 8] str w1, [x0] ldr x0, [sp] ldr w1, [sp, 28] str w1, [x0] nop add sp, sp, 32 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size swap, .-swap .align 2 .global partition .type partition, %function partition: .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] str w1, [sp, 20] str w2, [sp, 16] ldrsw x0, [sp, 16] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 ldr w0, [x0] str w0, [sp, 44] ldr w0, [sp, 20] sub w0, w0, #1 str w0, [sp, 36] ldr w0, [sp, 20] str w0, [sp, 40] b .L3 .L5: ldrsw x0, [sp, 40] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 ldr w0, [x0] ldr w1, [sp, 44] cmp w1, w0 blt .L4 ldr w0, [sp, 36] add w0, w0, 1 str w0, [sp, 36] ldrsw x0, [sp, 36] lsl x0, x0, 2 ldr x1, [sp, 24] add x2, x1, x0 ldrsw x0, [sp, 40] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 mov x1, x0 mov x0, x2 bl swap .L4: ldr w0, [sp, 40] add w0, w0, 1 str w0, [sp, 40] .L3: ldr w1, [sp, 16] ldr w0, [sp, 40] cmp w1, w0 bgt .L5 ldrsw x0, [sp, 36] add x0, x0, 1 lsl x0, x0, 2 ldr x1, [sp, 24] add x2, x1, x0 ldrsw x0, [sp, 16] lsl x0, x0, 2 ldr x1, [sp, 24] add x0, x1, x0 mov x1, x0 mov x0, x2 bl swap ldr w0, [sp, 36] add w0, w0, 1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE1: .size partition, .-partition .align 2 .global quick_sort .type quick_sort, %function quick_sort: .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 w2, [sp, 16] ldr w1, [sp, 20] ldr w0, [sp, 16] cmp w1, w0 bge .L9 ldr w2, [sp, 16] ldr w1, [sp, 20] ldr x0, [sp, 24] bl partition str w0, [sp, 44] ldr w0, [sp, 44] sub w0, w0, #1 mov w2, w0 ldr w1, [sp, 20] ldr x0, [sp, 24] bl quick_sort ldr w0, [sp, 44] add w0, w0, 1 ldr w2, [sp, 16] mov w1, w0 ldr x0, [sp, 24] bl quick_sort .L9: nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE2: .size quick_sort, .-quick_sort .section .rodata .align 3 .LC1: .string "%d\n" .text .align 2 .global print_array .type print_array, %function print_array: .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] str w1, [sp, 20] str wzr, [sp, 44] b .L11 .L12: 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] .L11: ldr w1, [sp, 44] ldr w0, [sp, 20] cmp w1, w0 blt .L12 nop nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE3: .size print_array, .-print_array .align 2 .global main .type main, %function main: .LFB4: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 mov x29, sp str w0, [sp, 28] str x1, [sp, 16] adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 104] mov x1, 0 adrp x0, .LC0 add x1, x0, :lo12:.LC0 add x0, sp, 40 ldp q0, q1, [x1] stp q0, q1, [x0] ldp q0, q1, [x1, 32] stp q0, q1, [x0, 32] mov w0, 16 str w0, [sp, 36] ldr w0, [sp, 36] sub w1, w0, #1 add x0, sp, 40 mov w2, w1 mov w1, 0 bl quick_sort add x0, sp, 40 ldr w1, [sp, 36] bl print_array 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 .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 .LFE4: .size main, .-main .section .rodata .align 3 .LC0: .word 100 .word 55 .word 4 .word 98 .word 10 .word 18 .word 90 .word 95 .word 43 .word 11 .word 47 .word 67 .word 89 .word 42 .word 49 .word 79 .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "solution.c" .text .align 2 .global swap .type swap, %function swap: .LFB23: .cfi_startproc ldr w2, [x0] ldr w3, [x1] str w3, [x0] str w2, [x1] ret .cfi_endproc .LFE23: .size swap, .-swap .align 2 .global partition .type partition, %function partition: .LFB24: .cfi_startproc sxtw x8, w2 ldr w5, [x0, x8, lsl 2] sub w4, w1, #1 cmp w2, w1 ble .L3 sxtw x1, w1 b .L5 .L4: add x1, x1, 1 cmp w2, w1 ble .L3 .L5: ldr w3, [x0, x1, lsl 2] cmp w3, w5 bgt .L4 add w4, w4, 1 sxtw x6, w4 ldr w7, [x0, x6, lsl 2] str w3, [x0, x6, lsl 2] str w7, [x0, x1, lsl 2] b .L4 .L3: sxtw x1, w4 add x1, x1, 1 ldr w2, [x0, x1, lsl 2] ldr w3, [x0, x8, lsl 2] str w3, [x0, x1, lsl 2] str w2, [x0, x8, lsl 2] add w0, w4, 1 ret .cfi_endproc .LFE24: .size partition, .-partition .align 2 .global quick_sort .type quick_sort, %function quick_sort: .LFB25: .cfi_startproc cmp w1, w2 blt .L13 ret .L13: 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] stp x21, x22, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 mov x21, x0 mov w20, w1 mov w19, w2 bl partition mov w22, w0 sub w2, w0, #1 mov w1, w20 mov x0, x21 bl quick_sort mov w2, w19 add w1, w22, 1 mov x0, x21 bl quick_sort ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE25: .size quick_sort, .-quick_sort .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC1: .string "%d\n" .text .align 2 .global print_array .type print_array, %function print_array: .LFB26: .cfi_startproc cmp w1, 0 ble .L19 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] stp x21, x22, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 mov x19, x0 sub w1, w1, #1 add x0, x0, 4 add x20, x0, x1, lsl 2 adrp x21, .LC1 add x21, x21, :lo12:.LC1 mov w22, 1 .L16: ldr w2, [x19], 4 mov x1, x21 mov w0, w22 bl __printf_chk cmp x19, x20 bne .L16 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L19: ret .cfi_endproc .LFE26: .size print_array, .-print_array .align 2 .global main .type main, %function main: .LFB27: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 mov x29, sp str x19, [sp, 16] .cfi_offset 19, -96 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, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 add x19, sp, 40 ldp q0, q1, [x0] stp q0, q1, [x19] ldp q0, q1, [x0, 32] stp q0, q1, [x19, 32] mov w2, 15 mov x0, x19 bl quick_sort mov w1, 16 mov x0, x19 bl print_array 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 bne .L25 mov w0, 0 ldr x19, [sp, 16] ldp x29, x30, [sp], 112 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .L25: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE27: .size main, .-main .section .rodata .align 3 .set .LANCHOR0,. + 0 .LC0: .word 100 .word 55 .word 4 .word 98 .word 10 .word 18 .word 90 .word 95 .word 43 .word 11 .word 47 .word 67 .word 89 .word 42 .word 49 .word 79 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "solution.c" .text .align 2 .p2align 4,,11 .global swap .type swap, %function swap: .LFB23: .cfi_startproc ldr w3, [x1] ldr w2, [x0] str w3, [x0] str w2, [x1] ret .cfi_endproc .LFE23: .size swap, .-swap .align 2 .p2align 4,,11 .global partition .type partition, %function partition: .LFB24: .cfi_startproc sxtw x8, w2 mov x3, x0 sub w4, w1, #1 ldr w6, [x0, x8, lsl 2] cmp w2, w1 ble .L7 sxtw x1, w1 .p2align 3,,7 .L6: ldr w0, [x3, x1, lsl 2] cmp w0, w6 bgt .L5 add w4, w4, 1 sxtw x5, w4 ldr w7, [x3, x5, lsl 2] str w0, [x3, x5, lsl 2] str w7, [x3, x1, lsl 2] .L5: add x1, x1, 1 cmp w2, w1 bgt .L6 add w0, w4, 1 sxtw x4, w4 add x4, x4, 1 ldr w6, [x3, x8, lsl 2] ldr w1, [x3, x4, lsl 2] str w6, [x3, x4, lsl 2] str w1, [x3, x8, lsl 2] ret .p2align 2,,3 .L7: sxtw x4, w4 mov w0, w1 add x4, x4, 1 ldr w1, [x3, x4, lsl 2] str w6, [x3, x4, lsl 2] str w1, [x3, x8, lsl 2] ret .cfi_endproc .LFE24: .size partition, .-partition .align 2 .p2align 4,,11 .global quick_sort .type quick_sort, %function quick_sort: .LFB25: .cfi_startproc stp x29, x30, [sp, -144]! .cfi_def_cfa_offset 144 .cfi_offset 29, -144 .cfi_offset 30, -136 mov x29, sp str w2, [sp, 112] cmp w2, w1 ble .L9 stp x19, x20, [sp, 16] .cfi_offset 20, -120 .cfi_offset 19, -128 mov x19, x0 stp x23, x24, [sp, 48] .cfi_offset 24, -88 .cfi_offset 23, -96 mov w24, w1 .L27: ldr w2, [sp, 112] mov w1, w24 mov x0, x19 bl partition str w0, [sp, 116] sub w0, w0, #1 str w0, [sp, 108] cmp w0, w24 ble .L11 stp x21, x22, [sp, 32] .cfi_offset 22, -104 .cfi_offset 21, -112 stp x27, x28, [sp, 80] .cfi_offset 28, -56 .cfi_offset 27, -64 .L26: ldr w2, [sp, 108] mov w1, w24 mov x0, x19 bl partition sub w27, w0, #1 str w0, [sp, 120] cmp w27, w24 ble .L12 .L25: mov w2, w27 mov w1, w24 mov x0, x19 bl partition sub w28, w0, #1 str w0, [sp, 124] cmp w28, w24 ble .L13 .L24: mov w2, w28 mov w1, w24 mov x0, x19 bl partition sub w22, w0, #1 str w0, [sp, 128] cmp w22, w24 ble .L14 .L23: mov w2, w22 mov w1, w24 mov x0, x19 bl partition sub w21, w0, #1 mov w20, w0 cmp w21, w24 ble .L15 stp x25, x26, [sp, 64] .cfi_offset 26, -72 .cfi_offset 25, -80 .L22: mov w2, w21 mov w1, w24 mov x0, x19 bl partition sub w25, w0, #1 mov w23, w0 cmp w25, w24 ble .L16 .L21: mov w2, w25 mov w1, w24 mov x0, x19 bl partition sub w26, w0, #1 str w0, [sp, 132] cmp w26, w24 ble .L17 .L20: mov w2, w26 mov w1, w24 mov x0, x19 bl partition sub w6, w0, #1 mov w4, w0 cmp w6, w24 ble .L18 .L19: mov w2, w6 mov w1, w24 mov x0, x19 stp w6, w4, [sp, 136] bl partition mov w3, w0 mov w1, w24 mov x0, x19 sub w2, w3, #1 add w24, w3, 1 bl quick_sort ldp w6, w4, [sp, 136] cmp w6, w24 bgt .L19 .L18: add w24, w4, 1 cmp w26, w24 bgt .L20 .L17: ldr w0, [sp, 132] add w24, w0, 1 cmp w25, w24 bgt .L21 .L16: add w24, w23, 1 cmp w21, w24 bgt .L22 ldp x25, x26, [sp, 64] .cfi_restore 26 .cfi_restore 25 .L15: add w24, w20, 1 cmp w22, w24 bgt .L23 .L14: ldr w0, [sp, 128] add w24, w0, 1 cmp w28, w24 bgt .L24 .L13: ldr w0, [sp, 124] add w24, w0, 1 cmp w27, w24 bgt .L25 .L12: ldr w0, [sp, 120] add w24, w0, 1 ldr w0, [sp, 108] cmp w0, w24 bgt .L26 ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 ldp x27, x28, [sp, 80] .cfi_restore 28 .cfi_restore 27 .L11: ldr w0, [sp, 116] add w24, w0, 1 ldr w0, [sp, 112] cmp w24, w0 blt .L27 ldp x19, x20, [sp, 16] .cfi_restore 20 .cfi_restore 19 ldp x23, x24, [sp, 48] .cfi_restore 24 .cfi_restore 23 .L9: ldp x29, x30, [sp], 144 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE25: .size quick_sort, .-quick_sort .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC1: .string "%d\n" .text .align 2 .p2align 4,,11 .global print_array .type print_array, %function print_array: .LFB26: .cfi_startproc cmp w1, 0 ble .L43 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 sub w20, w1, #1 mov x19, x0 add x0, x0, 4 str x21, [sp, 32] .cfi_offset 21, -16 add x20, x0, w20, uxtw 2 adrp x21, .LC1 add x21, x21, :lo12:.LC1 .p2align 3,,7 .L40: ldr w2, [x19], 4 mov x1, x21 mov w0, 1 bl __printf_chk cmp x19, x20 bne .L40 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L43: ret .cfi_endproc .LFE26: .size print_array, .-print_array .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB27: .cfi_startproc adrp x3, .LANCHOR0 add x3, x3, :lo12:.LANCHOR0 stp x29, x30, [sp, -96]! .cfi_def_cfa_offset 96 .cfi_offset 29, -96 .cfi_offset 30, -88 adrp x4, :got:__stack_chk_guard mov w2, 15 mov x29, sp ldp q2, q3, [x3] add x9, sp, 24 ldp q0, q1, [x3, 32] mov x0, x9 ldr x3, [x4, #:got_lo12:__stack_chk_guard] mov w1, 0 ldr x4, [x3] str x4, [sp, 88] mov x4, 0 stp q2, q3, [x9] stp q0, q1, [x9, 32] bl quick_sort mov x0, x9 mov w1, 16 bl print_array 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 bne .L49 mov w0, 0 ldp x29, x30, [sp], 96 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .L49: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE27: .size main, .-main .section .rodata .align 3 .set .LANCHOR0,. + 0 .LC0: .word 100 .word 55 .word 4 .word 98 .word 10 .word 18 .word 90 .word 95 .word 43 .word 11 .word 47 .word 67 .word 89 .word 42 .word 49 .word 79 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "solution.c" .text .align 2 .p2align 4,,11 .global swap .type swap, %function swap: .LFB23: .cfi_startproc ldr w3, [x1] ldr w2, [x0] str w3, [x0] str w2, [x1] ret .cfi_endproc .LFE23: .size swap, .-swap .align 2 .p2align 4,,11 .global partition .type partition, %function partition: .LFB24: .cfi_startproc sxtw x8, w2 mov x3, x0 sub w4, w1, #1 ldr w6, [x0, x8, lsl 2] cmp w2, w1 ble .L7 sxtw x1, w1 .p2align 3,,7 .L6: ldr w0, [x3, x1, lsl 2] cmp w0, w6 bgt .L5 add w4, w4, 1 sxtw x5, w4 ldr w7, [x3, x5, lsl 2] str w0, [x3, x5, lsl 2] str w7, [x3, x1, lsl 2] .L5: add x1, x1, 1 cmp w2, w1 bgt .L6 add w0, w4, 1 sxtw x4, w4 add x4, x4, 1 ldr w6, [x3, x8, lsl 2] ldr w1, [x3, x4, lsl 2] str w6, [x3, x4, lsl 2] str w1, [x3, x8, lsl 2] ret .p2align 2,,3 .L7: sxtw x4, w4 mov w0, w1 add x4, x4, 1 ldr w1, [x3, x4, lsl 2] str w6, [x3, x4, lsl 2] str w1, [x3, x8, lsl 2] ret .cfi_endproc .LFE24: .size partition, .-partition .align 2 .p2align 4,,11 .global quick_sort .type quick_sort, %function quick_sort: .LFB25: .cfi_startproc cmp w2, w1 ble .L17 stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x19, x0 stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 mov w21, w2 add x22, x0, w2, sxtw 2 .L13: ldr w2, [x22] sub w20, w1, #1 sxtw x3, w1 .p2align 3,,7 .L12: ldr w0, [x19, x3, lsl 2] cmp w2, w0 blt .L11 add w20, w20, 1 sxtw x4, w20 ldr w5, [x19, x4, lsl 2] str w0, [x19, x4, lsl 2] str w5, [x19, x3, lsl 2] .L11: add x3, x3, 1 cmp w21, w3 bgt .L12 sxtw x3, w20 ldr w5, [x22] add x3, x3, 1 mov w2, w20 mov x0, x19 ldr w4, [x19, x3, lsl 2] str w5, [x19, x3, lsl 2] str w4, [x22] bl quick_sort add w1, w20, 2 cmp w1, w21 blt .L13 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L17: ret .cfi_endproc .LFE25: .size quick_sort, .-quick_sort .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC1: .string "%d\n" .text .align 2 .p2align 4,,11 .global print_array .type print_array, %function print_array: .LFB26: .cfi_startproc cmp w1, 0 ble .L25 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 sub w20, w1, #1 mov x19, x0 add x0, x0, 4 str x21, [sp, 32] .cfi_offset 21, -16 add x20, x0, w20, uxtw 2 adrp x21, .LC1 add x21, x21, :lo12:.LC1 .p2align 3,,7 .L22: ldr w2, [x19], 4 mov x1, x21 mov w0, 1 bl __printf_chk cmp x19, x20 bne .L22 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L25: ret .cfi_endproc .LFE26: .size print_array, .-print_array .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB27: .cfi_startproc stp x29, x30, [sp, -128]! .cfi_def_cfa_offset 128 .cfi_offset 29, -128 .cfi_offset 30, -120 adrp x3, :got:__stack_chk_guard adrp x1, .LANCHOR0 add x1, x1, :lo12:.LANCHOR0 mov x29, sp ldr x3, [x3, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] add x0, sp, 56 str x21, [sp, 32] .cfi_offset 19, -112 .cfi_offset 20, -104 .cfi_offset 21, -96 adrp x20, .LC1 ldp q2, q3, [x1] ldr x4, [x3] str x4, [sp, 120] mov x4, 0 ldp q0, q1, [x1, 32] mov x19, x0 add x20, x20, :lo12:.LC1 add x21, sp, 120 mov w2, 15 mov w1, 0 stp q2, q3, [x0] stp q0, q1, [x0, 32] bl quick_sort .p2align 3,,7 .L29: ldr w2, [x19], 4 mov x1, x20 mov w0, 1 bl __printf_chk cmp x19, x21 bne .L29 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 120] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L33 mov w0, 0 ldp x19, x20, [sp, 16] ldr x21, [sp, 32] ldp x29, x30, [sp], 128 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L33: .cfi_restore_state bl __stack_chk_fail .cfi_endproc .LFE27: .size main, .-main .section .rodata .align 3 .set .LANCHOR0,. + 0 .LC0: .word 100 .word 55 .word 4 .word 98 .word 10 .word 18 .word 90 .word 95 .word 43 .word 11 .word 47 .word 67 .word 89 .word 42 .word 49 .word 79 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
morse.c
/* $OpenBSD: morse.c,v 1.22 2016/03/07 12:07:56 mestre Exp $ */ /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include <ctype.h> #include <err.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> static char *digit[] = { "-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----.", }, *alph[] = { ".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--..", }; struct punc { char c; char *morse; } other[] = { { 'e', "..-.." }, /* accented e - only decodes */ { ',', "--..--" }, { '.', ".-.-.-" }, { '?', "..--.." }, { '/', "-..-." }, { '-', "-....-" }, { ':', "---..." }, { ';', "-.-.-." }, { '(', "-.--." }, /* KN */ { ')', "-.--.-" }, { '"', ".-..-." }, { '`', ".-..-." }, { '\'', ".----." }, { '+', ".-.-." }, /* AR \n\n\n */ { '=', "-...-" }, /* BT \n\n */ { '@', ".--.-." }, { '\n', ".-.-" }, /* AA (will only decode) */ { '\0', NULL } }; struct prosign { char *c; char *morse; } ps[] = { { "<AS>", ".-..." }, /* wait */ { "<CL>", "-.-..-.." }, { "<CT>", "-.-.-" }, /* start */ { "<EE5>", "......" }, /* error */ { "<EE5>", "......." }, { "<EE5>", "........" }, { "<SK>", "...-.-" }, { "<SN>", "...-." }, /* understood */ { "<SOS>", "...---..." }, { NULL, NULL } }; void morse(int); void decode(char *); void show(char *); static int sflag = 0; static int dflag = 0; int main(int argc, char *argv[]) { int ch; char *p; if (pledge("stdio", NULL) == -1) err(1, "pledge"); while ((ch = getopt(argc, argv, "dsh")) != -1) switch(ch) { case 'd': dflag = 1; break; case 's': sflag = 1; break; case 'h': default: fprintf(stderr, "usage: %s [-d | -s] [string ...]\n", getprogname()); return 1; } argc -= optind; argv += optind; if (dflag) { if (*argv) { do { decode(*argv); } while (*++argv); } else { char foo[10]; /* All morse chars shorter than this */ int isblank, i; i = 0; isblank = 0; while ((ch = getchar()) != EOF) { if (ch == '-' || ch == '.') { foo[i++] = ch; if (i == 10) { /* overrun means gibberish--print 'x' and * advance */ i = 0; putchar('x'); while ((ch = getchar()) != EOF && (ch == '.' || ch == '-')) ; isblank = 1; } } else if (i) { foo[i] = '\0'; decode(foo); i = 0; isblank = 0; } else if (isspace(ch)) { if (isblank) { /* print whitespace for each double blank */ putchar(' '); isblank = 0; } else isblank = 1; } } } putchar('\n'); } else { if (*argv) do { for (p = *argv; *p; ++p) morse((int)*p); show(""); } while (*++argv); else while ((ch = getchar()) != EOF) morse(ch); show("...-.-"); /* SK */ } return 0; } void morse(int c) { int i; if (isalpha(c)) show(alph[c - (isupper(c) ? 'A' : 'a')]); else if (isdigit(c)) show(digit[c - '0']); else if (isspace(c)) show(""); /* could show BT for a pause */ else { i = 0; while (other[i].c) { if (other[i].c == c) { show(other[i].morse); break; } i++; } } } void decode(char *s) { int i; for (i = 0; i < 10; i++) if (strcmp(digit[i], s) == 0) { putchar('0' + i); return; } for (i = 0; i < 26; i++) if (strcmp(alph[i], s) == 0) { putchar('A' + i); return; } i = 0; while (other[i].c) { if (strcmp(other[i].morse, s) == 0) { putchar(other[i].c); return; } i++; } i = 0; while (ps[i].c) { /* put whitespace around prosigns */ if (strcmp(ps[i].morse, s) == 0) { printf(" %s ", ps[i].c); return; } i++; } putchar('x'); /* line noise */ } void show(char *s) { if (sflag) printf(" %s", s); else for (; *s; ++s) printf(" %s", *s == '.' ? "dit" : "daw"); printf("\n"); }
.file "morse.c" .option pic .text .section .rodata .align 3 .LC0: .string "-----" .align 3 .LC1: .string ".----" .align 3 .LC2: .string "..---" .align 3 .LC3: .string "...--" .align 3 .LC4: .string "....-" .align 3 .LC5: .string "....." .align 3 .LC6: .string "-...." .align 3 .LC7: .string "--..." .align 3 .LC8: .string "---.." .align 3 .LC9: .string "----." .section .data.rel.local,"aw" .align 3 .type digit, @object .size digit, 80 digit: .dword .LC0 .dword .LC1 .dword .LC2 .dword .LC3 .dword .LC4 .dword .LC5 .dword .LC6 .dword .LC7 .dword .LC8 .dword .LC9 .section .rodata .align 3 .LC10: .string ".-" .align 3 .LC11: .string "-..." .align 3 .LC12: .string "-.-." .align 3 .LC13: .string "-.." .align 3 .LC14: .string "." .align 3 .LC15: .string "..-." .align 3 .LC16: .string "--." .align 3 .LC17: .string "...." .align 3 .LC18: .string ".." .align 3 .LC19: .string ".---" .align 3 .LC20: .string "-.-" .align 3 .LC21: .string ".-.." .align 3 .LC22: .string "--" .align 3 .LC23: .string "-." .align 3 .LC24: .string "---" .align 3 .LC25: .string ".--." .align 3 .LC26: .string "--.-" .align 3 .LC27: .string ".-." .align 3 .LC28: .string "..." .align 3 .LC29: .string "-" .align 3 .LC30: .string "..-" .align 3 .LC31: .string "...-" .align 3 .LC32: .string ".--" .align 3 .LC33: .string "-..-" .align 3 .LC34: .string "-.--" .align 3 .LC35: .string "--.." .section .data.rel.local .align 3 .type alph, @object .size alph, 208 alph: .dword .LC10 .dword .LC11 .dword .LC12 .dword .LC13 .dword .LC14 .dword .LC15 .dword .LC16 .dword .LC17 .dword .LC18 .dword .LC19 .dword .LC20 .dword .LC21 .dword .LC22 .dword .LC23 .dword .LC24 .dword .LC25 .dword .LC26 .dword .LC27 .dword .LC28 .dword .LC29 .dword .LC30 .dword .LC31 .dword .LC32 .dword .LC33 .dword .LC34 .dword .LC35 .globl other .section .rodata .align 3 .LC36: .string "..-.." .align 3 .LC37: .string "--..--" .align 3 .LC38: .string ".-.-.-" .align 3 .LC39: .string "..--.." .align 3 .LC40: .string "-..-." .align 3 .LC41: .string "-....-" .align 3 .LC42: .string "---..." .align 3 .LC43: .string "-.-.-." .align 3 .LC44: .string "-.--." .align 3 .LC45: .string "-.--.-" .align 3 .LC46: .string ".-..-." .align 3 .LC47: .string ".----." .align 3 .LC48: .string ".-.-." .align 3 .LC49: .string "-...-" .align 3 .LC50: .string ".--.-." .align 3 .LC51: .string ".-.-" .section .data.rel.local .align 3 .type other, @object .size other, 288 other: .byte 101 .zero 7 .dword .LC36 .byte 44 .zero 7 .dword .LC37 .byte 46 .zero 7 .dword .LC38 .byte 63 .zero 7 .dword .LC39 .byte 47 .zero 7 .dword .LC40 .byte 45 .zero 7 .dword .LC41 .byte 58 .zero 7 .dword .LC42 .byte 59 .zero 7 .dword .LC43 .byte 40 .zero 7 .dword .LC44 .byte 41 .zero 7 .dword .LC45 .byte 34 .zero 7 .dword .LC46 .byte 96 .zero 7 .dword .LC46 .byte 39 .zero 7 .dword .LC47 .byte 43 .zero 7 .dword .LC48 .byte 61 .zero 7 .dword .LC49 .byte 64 .zero 7 .dword .LC50 .byte 10 .zero 7 .dword .LC51 .byte 0 .zero 7 .dword 0 .globl ps .section .rodata .align 3 .LC52: .string "<AS>" .align 3 .LC53: .string ".-..." .align 3 .LC54: .string "<CL>" .align 3 .LC55: .string "-.-..-.." .align 3 .LC56: .string "<CT>" .align 3 .LC57: .string "-.-.-" .align 3 .LC58: .string "<EE5>" .align 3 .LC59: .string "......" .align 3 .LC60: .string "......." .align 3 .LC61: .string "........" .align 3 .LC62: .string "<SK>" .align 3 .LC63: .string "...-.-" .align 3 .LC64: .string "<SN>" .align 3 .LC65: .string "...-." .align 3 .LC66: .string "<SOS>" .align 3 .LC67: .string "...---..." .section .data.rel.local .align 3 .type ps, @object .size ps, 160 ps: .dword .LC52 .dword .LC53 .dword .LC54 .dword .LC55 .dword .LC56 .dword .LC57 .dword .LC58 .dword .LC59 .dword .LC58 .dword .LC60 .dword .LC58 .dword .LC61 .dword .LC62 .dword .LC63 .dword .LC64 .dword .LC65 .dword .LC66 .dword .LC67 .dword 0 .dword 0 .local sflag .comm sflag,4,4 .local dflag .comm dflag,4,4 .section .rodata .align 3 .LC68: .string "stdio" .align 3 .LC69: .string "pledge" .align 3 .LC70: .string "usage: %s [-d | -s] [string ...]\n" .align 3 .LC71: .string "dsh" .align 3 .LC72: .string "" .text .align 1 .globl main .type main, @function main: addi sp,sp,-96 sd ra,88(sp) sd s0,80(sp) sd s1,72(sp) addi s0,sp,96 mv a5,a0 sd a1,-96(s0) sw a5,-84(s0) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -40(s0) li a4, 0 li a1,0 lla a0,.LC68 call pledge@plt mv a5,a0 mv a4,a5 li a5,-1 bne a4,a5,.L3 lla a1,.LC69 li a0,1 call err@plt .L8: lw a5,-68(s0) sext.w a4,a5 li a5,100 beq a4,a5,.L4 lw a5,-68(s0) sext.w a4,a5 li a5,115 beq a4,a5,.L5 j .L31 .L4: lla a5,dflag li a4,1 sw a4,0(a5) j .L3 .L5: lla a5,sflag li a4,1 sw a4,0(a5) j .L3 .L31: la a5,stderr ld s1,0(a5) call getprogname@plt mv a5,a0 mv a2,a5 lla a1,.LC70 mv a0,s1 call fprintf@plt li a5,1 j .L7 .L3: lw a5,-84(s0) lla a2,.LC71 ld a1,-96(s0) mv a0,a5 call getopt@plt mv a5,a0 sw a5,-68(s0) lw a5,-68(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L8 la a5,optind lw a5,0(a5) lw a4,-84(s0) subw a5,a4,a5 sw a5,-84(s0) la a5,optind lw a5,0(a5) slli a5,a5,3 ld a4,-96(s0) add a5,a4,a5 sd a5,-96(s0) lla a5,dflag lw a5,0(a5) beq a5,zero,.L9 ld a5,-96(s0) ld a5,0(a5) beq a5,zero,.L10 .L11: ld a5,-96(s0) ld a5,0(a5) mv a0,a5 call decode ld a5,-96(s0) addi a5,a5,8 sd a5,-96(s0) ld a5,-96(s0) ld a5,0(a5) bne a5,zero,.L11 j .L12 .L10: sw zero,-72(s0) sw zero,-76(s0) j .L13 .L21: lw a5,-68(s0) sext.w a4,a5 li a5,45 beq a4,a5,.L14 lw a5,-68(s0) sext.w a4,a5 li a5,46 bne a4,a5,.L15 .L14: lw a5,-72(s0) addiw a4,a5,1 sw a4,-72(s0) lw a4,-68(s0) andi a4,a4,0xff addi a5,a5,-32 add a5,a5,s0 sb a4,-24(a5) lw a5,-72(s0) sext.w a4,a5 li a5,10 bne a4,a5,.L13 sw zero,-72(s0) li a0,120 call putchar@plt nop .L18: call getchar@plt mv a5,a0 sw a5,-68(s0) lw a5,-68(s0) sext.w a4,a5 li a5,-1 beq a4,a5,.L17 lw a5,-68(s0) sext.w a4,a5 li a5,46 beq a4,a5,.L18 lw a5,-68(s0) sext.w a4,a5 li a5,45 beq a4,a5,.L18 .L17: li a5,1 sw a5,-76(s0) j .L13 .L15: lw a5,-72(s0) sext.w a5,a5 beq a5,zero,.L19 lw a5,-72(s0) addi a5,a5,-32 add a5,a5,s0 sb zero,-24(a5) addi a5,s0,-56 mv a0,a5 call decode sw zero,-72(s0) sw zero,-76(s0) j .L13 .L19: call __ctype_b_loc@plt mv a5,a0 ld a4,0(a5) lw a5,-68(s0) slli a5,a5,1 add a5,a4,a5 lhu a5,0(a5) sext.w a4,a5 li a5,8192 and a5,a4,a5 sext.w a5,a5 beq a5,zero,.L13 lw a5,-76(s0) sext.w a5,a5 beq a5,zero,.L20 li a0,32 call putchar@plt sw zero,-76(s0) j .L13 .L20: li a5,1 sw a5,-76(s0) .L13: call getchar@plt mv a5,a0 sw a5,-68(s0) lw a5,-68(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L21 .L12: li a0,10 call putchar@plt j .L22 .L9: ld a5,-96(s0) ld a5,0(a5) beq a5,zero,.L28 .L26: ld a5,-96(s0) ld a5,0(a5) sd a5,-64(s0) j .L24 .L25: ld a5,-64(s0) lbu a5,0(a5) sext.w a5,a5 mv a0,a5 call morse ld a5,-64(s0) addi a5,a5,1 sd a5,-64(s0) .L24: ld a5,-64(s0) lbu a5,0(a5) bne a5,zero,.L25 lla a0,.LC72 call show ld a5,-96(s0) addi a5,a5,8 sd a5,-96(s0) ld a5,-96(s0) ld a5,0(a5) bne a5,zero,.L26 j .L27 .L29: lw a5,-68(s0) mv a0,a5 call morse .L28: call getchar@plt mv a5,a0 sw a5,-68(s0) lw a5,-68(s0) sext.w a4,a5 li a5,-1 bne a4,a5,.L29 .L27: lla a0,.LC63 call show .L22: li a5,0 .L7: mv a4,a5 la a5,__stack_chk_guard ld a3, -40(s0) ld a5, 0(a5) xor a5, a3, a5 li a3, 0 beq a5,zero,.L30 call __stack_chk_fail@plt .L30: mv a0,a4 ld ra,88(sp) ld s0,80(sp) ld s1,72(sp) addi sp,sp,96 jr ra .size main, .-main .align 1 .globl morse .type morse, @function morse: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 mv a5,a0 sw a5,-36(s0) call __ctype_b_loc@plt mv a5,a0 ld a4,0(a5) lw a5,-36(s0) slli a5,a5,1 add a5,a4,a5 lhu a5,0(a5) sext.w a5,a5 andi a5,a5,1024 sext.w a5,a5 beq a5,zero,.L33 call __ctype_b_loc@plt mv a5,a0 ld a4,0(a5) lw a5,-36(s0) slli a5,a5,1 add a5,a4,a5 lhu a5,0(a5) sext.w a5,a5 andi a5,a5,256 sext.w a5,a5 beq a5,zero,.L34 li a5,65 j .L35 .L34: li a5,97 .L35: lw a4,-36(s0) subw a5,a4,a5 sext.w a5,a5 lla a4,alph slli a5,a5,3 add a5,a4,a5 ld a5,0(a5) mv a0,a5 call show j .L42 .L33: call __ctype_b_loc@plt mv a5,a0 ld a4,0(a5) lw a5,-36(s0) slli a5,a5,1 add a5,a4,a5 lhu a5,0(a5) sext.w a4,a5 li a5,4096 addi a5,a5,-2048 and a5,a4,a5 sext.w a5,a5 beq a5,zero,.L37 lw a5,-36(s0) addiw a5,a5,-48 sext.w a5,a5 lla a4,digit slli a5,a5,3 add a5,a4,a5 ld a5,0(a5) mv a0,a5 call show j .L42 .L37: call __ctype_b_loc@plt mv a5,a0 ld a4,0(a5) lw a5,-36(s0) slli a5,a5,1 add a5,a4,a5 lhu a5,0(a5) sext.w a4,a5 li a5,8192 and a5,a4,a5 sext.w a5,a5 beq a5,zero,.L38 lla a0,.LC72 call show j .L42 .L38: sw zero,-20(s0) j .L39 .L41: lla a4,other lw a5,-20(s0) slli a5,a5,4 add a5,a4,a5 lbu a5,0(a5) sext.w a4,a5 lw a5,-36(s0) sext.w a5,a5 bne a5,a4,.L40 lla a4,other lw a5,-20(s0) slli a5,a5,4 add a5,a4,a5 ld a5,8(a5) mv a0,a5 call show nop j .L42 .L40: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L39: lla a4,other lw a5,-20(s0) slli a5,a5,4 add a5,a4,a5 lbu a5,0(a5) bne a5,zero,.L41 .L42: nop ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size morse, .-morse .section .rodata .align 3 .LC73: .string " %s " .text .align 1 .globl decode .type decode, @function decode: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) addi s0,sp,48 sd a0,-40(s0) sw zero,-20(s0) j .L44 .L47: lla a4,digit lw a5,-20(s0) slli a5,a5,3 add a5,a4,a5 ld a5,0(a5) ld a1,-40(s0) mv a0,a5 call strcmp@plt mv a5,a0 bne a5,zero,.L45 lw a5,-20(s0) addiw a5,a5,48 sext.w a5,a5 mv a0,a5 call putchar@plt j .L43 .L45: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L44: lw a5,-20(s0) sext.w a4,a5 li a5,9 ble a4,a5,.L47 sw zero,-20(s0) j .L48 .L50: lla a4,alph lw a5,-20(s0) slli a5,a5,3 add a5,a4,a5 ld a5,0(a5) ld a1,-40(s0) mv a0,a5 call strcmp@plt mv a5,a0 bne a5,zero,.L49 lw a5,-20(s0) addiw a5,a5,65 sext.w a5,a5 mv a0,a5 call putchar@plt j .L43 .L49: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L48: lw a5,-20(s0) sext.w a4,a5 li a5,25 ble a4,a5,.L50 sw zero,-20(s0) j .L51 .L53: lla a4,other lw a5,-20(s0) slli a5,a5,4 add a5,a4,a5 ld a5,8(a5) ld a1,-40(s0) mv a0,a5 call strcmp@plt mv a5,a0 bne a5,zero,.L52 lla a4,other lw a5,-20(s0) slli a5,a5,4 add a5,a4,a5 lbu a5,0(a5) sext.w a5,a5 mv a0,a5 call putchar@plt j .L43 .L52: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L51: lla a4,other lw a5,-20(s0) slli a5,a5,4 add a5,a4,a5 lbu a5,0(a5) bne a5,zero,.L53 sw zero,-20(s0) j .L54 .L56: lla a4,ps lw a5,-20(s0) slli a5,a5,4 add a5,a4,a5 ld a5,8(a5) ld a1,-40(s0) mv a0,a5 call strcmp@plt mv a5,a0 bne a5,zero,.L55 lla a4,ps lw a5,-20(s0) slli a5,a5,4 add a5,a4,a5 ld a5,0(a5) mv a1,a5 lla a0,.LC73 call printf@plt j .L43 .L55: lw a5,-20(s0) addiw a5,a5,1 sw a5,-20(s0) .L54: lla a4,ps lw a5,-20(s0) slli a5,a5,4 add a5,a4,a5 ld a5,0(a5) bne a5,zero,.L56 li a0,120 call putchar@plt .L43: ld ra,40(sp) ld s0,32(sp) addi sp,sp,48 jr ra .size decode, .-decode .section .rodata .align 3 .LC74: .string " %s" .align 3 .LC75: .string "dit" .align 3 .LC76: .string "daw" .text .align 1 .globl show .type show, @function show: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 sd a0,-24(s0) lla a5,sflag lw a5,0(a5) beq a5,zero,.L60 ld a1,-24(s0) lla a0,.LC74 call printf@plt j .L59 .L63: ld a5,-24(s0) lbu a5,0(a5) mv a4,a5 li a5,46 bne a4,a5,.L61 lla a5,.LC75 j .L62 .L61: lla a5,.LC76 .L62: mv a1,a5 lla a0,.LC74 call printf@plt ld a5,-24(s0) addi a5,a5,1 sd a5,-24(s0) .L60: ld a5,-24(s0) lbu a5,0(a5) bne a5,zero,.L63 .L59: li a0,10 call putchar@plt nop ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size show, .-show .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "morse.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string " %s " .text .align 1 .globl decode .type decode, @function decode: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) mv s2,a0 lla s1,.LANCHOR0 li s0,0 li s3,10 .L4: mv a1,s2 ld a0,0(s1) call strcmp@plt beq a0,zero,.L18 addiw s0,s0,1 addi s1,s1,8 bne s0,s3,.L4 lla s1,.LANCHOR0+80 li s0,0 li s3,26 .L6: mv a1,s2 ld a0,0(s1) call strcmp@plt beq a0,zero,.L19 addiw s0,s0,1 addi s1,s1,8 bne s0,s3,.L6 lbu s1,.LANCHOR1 beq s1,zero,.L7 lla s0,.LANCHOR1+8 .L9: mv a1,s2 ld a0,0(s0) call strcmp@plt beq a0,zero,.L20 addi s0,s0,16 lbu s1,-8(s0) bne s1,zero,.L9 .L7: ld s1,.LANCHOR1+288 beq s1,zero,.L10 lla s0,.LANCHOR1+296 .L12: mv a1,s2 ld a0,0(s0) call strcmp@plt beq a0,zero,.L21 addi s0,s0,16 ld s1,-8(s0) bne s1,zero,.L12 .L10: la a5,stdout ld a1,0(a5) li a0,120 call putc@plt j .L1 .L18: la a5,stdout ld a1,0(a5) addiw a0,s0,48 call putc@plt j .L1 .L19: la a5,stdout ld a1,0(a5) addiw a0,s0,65 call putc@plt .L1: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 jr ra .L20: la a5,stdout ld a1,0(a5) mv a0,s1 call putc@plt j .L1 .L21: mv a2,s1 lla a1,.LC0 li a0,1 call __printf_chk@plt j .L1 .size decode, .-decode .section .rodata.str1.8 .align 3 .LC1: .string "dit" .align 3 .LC2: .string "daw" .align 3 .LC3: .string " %s" .text .align 1 .globl show .type show, @function show: addi sp,sp,-48 sd ra,40(sp) sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) sd s4,0(sp) mv s0,a0 lw a5,.LANCHOR2 bne a5,zero,.L23 lbu a5,0(a0) beq a5,zero,.L25 li s3,46 lla s2,.LC1 lla s4,.LC2 lla s1,.LC3 j .L24 .L23: mv a2,a0 lla a1,.LC3 li a0,1 call __printf_chk@plt .L25: li a0,10 call putchar@plt ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) addi sp,sp,48 jr ra .L26: mv a1,s1 li a0,1 call __printf_chk@plt addi s0,s0,1 lbu a5,0(s0) beq a5,zero,.L25 .L24: mv a2,s2 beq a5,s3,.L26 mv a2,s4 j .L26 .size show, .-show .section .rodata.str1.8 .align 3 .LC4: .string "" .text .align 1 .globl morse .type morse, @function morse: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) mv s0,a0 call __ctype_b_loc@plt ld a5,0(a0) slli a4,s0,1 add a5,a5,a4 lhu a5,0(a5) andi a4,a5,1024 beq a4,zero,.L32 andi a5,a5,256 li a4,65 bne a5,zero,.L33 li a4,97 .L33: subw a4,s0,a4 slli a4,a4,3 lla a5,.LANCHOR0 add a5,a5,a4 ld a0,80(a5) call show .L31: ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .L32: srli a4,a5,11 andi a4,a4,1 bne a4,zero,.L44 li a4,8192 and a5,a5,a4 bne a5,zero,.L36 lbu a5,.LANCHOR1 lla a4,.LANCHOR1+16 li a3,0 beq a5,zero,.L31 .L39: sext.w a5,a5 beq a5,s0,.L45 addiw a3,a3,1 addi a4,a4,16 lbu a5,-16(a4) bne a5,zero,.L39 j .L31 .L44: addiw s0,s0,-48 slli s0,s0,3 lla a5,.LANCHOR0 add a5,a5,s0 ld a0,0(a5) call show j .L31 .L36: lla a0,.LC4 call show j .L31 .L45: slli a3,a3,4 lla a5,.LANCHOR1 add a5,a5,a3 ld a0,8(a5) call show j .L31 .size morse, .-morse .section .rodata.str1.8 .align 3 .LC5: .string "stdio" .align 3 .LC6: .string "pledge" .align 3 .LC7: .string "usage: %s [-d | -s] [string ...]\n" .align 3 .LC8: .string "dsh" .align 3 .LC9: .string "...-.-" .text .align 1 .globl main .type main, @function main: addi sp,sp,-128 sd ra,120(sp) sd s0,112(sp) sd s1,104(sp) sd s2,96(sp) sd s3,88(sp) sd s4,80(sp) sd s5,72(sp) sd s6,64(sp) sd s7,56(sp) sd s8,48(sp) sd s9,40(sp) sd s10,32(sp) mv s0,a0 mv s1,a1 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 24(sp) li a4, 0 li a1,0 lla a0,.LC5 call pledge@plt li a5,-1 beq a0,a5,.L79 lla s3,.LC8 li s2,-1 li s5,100 lla s7,.LANCHOR2 li s6,1 li s4,115 .L47: mv a2,s3 mv a1,s1 mv a0,s0 call getopt@plt beq a0,s2,.L83 beq a0,s5,.L48 beq a0,s4,.L49 la a5,stderr ld s0,0(a5) call getprogname@plt mv a3,a0 lla a2,.LC7 li a1,1 mv a0,s0 call __fprintf_chk@plt li s2,1 .L52: la a5,__stack_chk_guard ld a4, 24(sp) ld a5, 0(a5) xor a5, a4, a5 li a4, 0 bne a5,zero,.L84 mv a0,s2 ld ra,120(sp) ld s0,112(sp) ld s1,104(sp) ld s2,96(sp) ld s3,88(sp) ld s4,80(sp) ld s5,72(sp) ld s6,64(sp) ld s7,56(sp) ld s8,48(sp) ld s9,40(sp) ld s10,32(sp) addi sp,sp,128 jr ra .L79: lla a1,.LC6 li a0,1 call err@plt .L48: sw s6,4(s7) j .L47 .L49: sw s6,0(s7) j .L47 .L83: la a5,optind lw a5,0(a5) slli a5,a5,3 add s1,s1,a5 lw s2,.LANCHOR2+4 beq s2,zero,.L54 ld a5,0(s1) beq a5,zero,.L70 .L56: ld a0,0(s1) call decode addi s1,s1,8 ld a5,0(s1) bne a5,zero,.L56 .L57: la a5,stdout ld a1,0(a5) li a0,10 call putc@plt li s2,0 j .L52 .L86: addiw a5,s1,1 addi a4,s1,32 add s1,a4,sp sb s0,-24(s1) mv s1,a5 beq a5,s6,.L85 .L55: ld a0,0(s3) call getc@plt mv s0,a0 beq a0,s4,.L57 addiw a5,s0,-45 bleu a5,s2,.L86 bne s1,zero,.L87 call __ctype_b_loc@plt ld a5,0(a0) slli s0,s0,1 add a5,a5,s0 lhu a5,0(a5) and a5,a5,s8 beq a5,zero,.L55 bne s5,zero,.L88 mv s1,s5 mv s5,s2 j .L55 .L85: ld a1,0(s10) li a0,120 call putc@plt .L60: ld a0,0(s3) call getc@plt addiw a5,a0,-45 bleu a5,s2,.L60 mv s1,s7 mv s5,s2 j .L55 .L87: addi a5,s1,32 add s1,a5,sp sb zero,-24(s1) mv a0,s9 call decode mv s1,s7 mv s5,s7 j .L55 .L88: ld a1,0(s10) li a0,32 call putc@plt mv s5,s1 j .L55 .L70: li s1,0 li s5,0 la s3,stdin li s4,-1 li s2,1 li s8,8192 la s10,stdout addi s9,sp,8 li s7,0 li s6,10 j .L55 .L54: ld a5,0(s1) lla s3,.LC4 beq a5,zero,.L89 .L66: ld s0,0(s1) lbu a0,0(s0) beq a0,zero,.L64 .L65: call morse addi s0,s0,1 lbu a0,0(s0) bne a0,zero,.L65 .L64: mv a0,s3 call show addi s1,s1,8 ld a5,0(s1) bne a5,zero,.L66 .L67: lla a0,.LC9 call show j .L52 .L89: la s1,stdin li s0,-1 j .L63 .L68: call morse .L63: ld a0,0(s1) call getc@plt bne a0,s0,.L68 j .L67 .L84: call __stack_chk_fail@plt .size main, .-main .globl ps .section .rodata.str1.8 .align 3 .LC10: .string "<AS>" .align 3 .LC11: .string ".-..." .align 3 .LC12: .string "<CL>" .align 3 .LC13: .string "-.-..-.." .align 3 .LC14: .string "<CT>" .align 3 .LC15: .string "-.-.-" .align 3 .LC16: .string "<EE5>" .align 3 .LC17: .string "......" .align 3 .LC18: .string "......." .align 3 .LC19: .string "........" .align 3 .LC20: .string "<SK>" .align 3 .LC21: .string "<SN>" .align 3 .LC22: .string "...-." .align 3 .LC23: .string "<SOS>" .align 3 .LC24: .string "...---..." .globl other .align 3 .LC25: .string "..-.." .align 3 .LC26: .string "--..--" .align 3 .LC27: .string ".-.-.-" .align 3 .LC28: .string "..--.." .align 3 .LC29: .string "-..-." .align 3 .LC30: .string "-....-" .align 3 .LC31: .string "---..." .align 3 .LC32: .string "-.-.-." .align 3 .LC33: .string "-.--." .align 3 .LC34: .string "-.--.-" .align 3 .LC35: .string ".-..-." .align 3 .LC36: .string ".----." .align 3 .LC37: .string ".-.-." .align 3 .LC38: .string "-...-" .align 3 .LC39: .string ".--.-." .align 3 .LC40: .string ".-.-" .align 3 .LC41: .string ".-" .align 3 .LC42: .string "-..." .align 3 .LC43: .string "-.-." .align 3 .LC44: .string "-.." .align 3 .LC45: .string "." .align 3 .LC46: .string "..-." .align 3 .LC47: .string "--." .align 3 .LC48: .string "...." .align 3 .LC49: .string ".." .align 3 .LC50: .string ".---" .align 3 .LC51: .string "-.-" .align 3 .LC52: .string ".-.." .align 3 .LC53: .string "--" .align 3 .LC54: .string "-." .align 3 .LC55: .string "---" .align 3 .LC56: .string ".--." .align 3 .LC57: .string "--.-" .align 3 .LC58: .string ".-." .align 3 .LC59: .string "..." .align 3 .LC60: .string "-" .align 3 .LC61: .string "..-" .align 3 .LC62: .string "...-" .align 3 .LC63: .string ".--" .align 3 .LC64: .string "-..-" .align 3 .LC65: .string "-.--" .align 3 .LC66: .string "--.." .align 3 .LC67: .string "-----" .align 3 .LC68: .string ".----" .align 3 .LC69: .string "..---" .align 3 .LC70: .string "...--" .align 3 .LC71: .string "....-" .align 3 .LC72: .string "....." .align 3 .LC73: .string "-...." .align 3 .LC74: .string "--..." .align 3 .LC75: .string "---.." .align 3 .LC76: .string "----." .bss .align 2 .set .LANCHOR2,. + 0 .type sflag, @object .size sflag, 4 sflag: .zero 4 .type dflag, @object .size dflag, 4 dflag: .zero 4 .section .data.rel.local,"aw" .align 3 .set .LANCHOR1,. + 0 .type other, @object .size other, 288 other: .byte 101 .zero 7 .dword .LC25 .byte 44 .zero 7 .dword .LC26 .byte 46 .zero 7 .dword .LC27 .byte 63 .zero 7 .dword .LC28 .byte 47 .zero 7 .dword .LC29 .byte 45 .zero 7 .dword .LC30 .byte 58 .zero 7 .dword .LC31 .byte 59 .zero 7 .dword .LC32 .byte 40 .zero 7 .dword .LC33 .byte 41 .zero 7 .dword .LC34 .byte 34 .zero 7 .dword .LC35 .byte 96 .zero 7 .dword .LC35 .byte 39 .zero 7 .dword .LC36 .byte 43 .zero 7 .dword .LC37 .byte 61 .zero 7 .dword .LC38 .byte 64 .zero 7 .dword .LC39 .byte 10 .zero 7 .dword .LC40 .byte 0 .zero 7 .dword 0 .type ps, @object .size ps, 160 ps: .dword .LC10 .dword .LC11 .dword .LC12 .dword .LC13 .dword .LC14 .dword .LC15 .dword .LC16 .dword .LC17 .dword .LC16 .dword .LC18 .dword .LC16 .dword .LC19 .dword .LC20 .dword .LC9 .dword .LC21 .dword .LC22 .dword .LC23 .dword .LC24 .dword 0 .dword 0 .section .data.rel.ro.local,"aw" .align 3 .set .LANCHOR0,. + 0 .type digit, @object .size digit, 80 digit: .dword .LC67 .dword .LC68 .dword .LC69 .dword .LC70 .dword .LC71 .dword .LC72 .dword .LC73 .dword .LC74 .dword .LC75 .dword .LC76 .type alph, @object .size alph, 208 alph: .dword .LC41 .dword .LC42 .dword .LC43 .dword .LC44 .dword .LC45 .dword .LC46 .dword .LC47 .dword .LC48 .dword .LC49 .dword .LC50 .dword .LC51 .dword .LC52 .dword .LC53 .dword .LC54 .dword .LC55 .dword .LC56 .dword .LC57 .dword .LC58 .dword .LC59 .dword .LC60 .dword .LC61 .dword .LC62 .dword .LC63 .dword .LC64 .dword .LC65 .dword .LC66 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "morse.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "-----" .align 3 .LC1: .string ".-" .align 3 .LC2: .string " %s " .text .align 1 .globl decode .type decode, @function decode: addi sp,sp,-48 sd s0,32(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) mv s1,a0 sd ra,40(sp) lla s2,.LANCHOR0+8 lla a0,.LC0 li s0,0 li s3,10 j .L5 .L3: ld a0,0(s2) addi s2,s2,8 .L5: mv a1,s1 call strcmp@plt beq a0,zero,.L25 addiw s0,s0,1 bne s0,s3,.L3 lla s2,.LANCHOR0+88 lla a0,.LC1 li s0,0 li s3,26 j .L4 .L6: addiw s0,s0,1 beq s0,s3,.L7 ld a0,0(s2) addi s2,s2,8 .L4: mv a1,s1 call strcmp@plt bne a0,zero,.L6 la a5,stdout ld a1,0(a5) addiw a0,s0,65 .L23: ld s0,32(sp) ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 tail putc@plt .L25: la a5,stdout addiw a0,s0,48 ld s0,32(sp) ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld a1,0(a5) addi sp,sp,48 tail putc@plt .L7: lla s3,.LANCHOR1 lbu s2,0(s3) beq s2,zero,.L8 lla s0,.LANCHOR1+8 j .L10 .L9: lbu s2,-8(s0) beq s2,zero,.L8 .L10: ld a0,0(s0) mv a1,s1 addi s0,s0,16 call strcmp@plt bne a0,zero,.L9 ld s0,32(sp) la a5,stdout ld ra,40(sp) ld s1,24(sp) ld s3,8(sp) ld a1,0(a5) mv a0,s2 ld s2,16(sp) addi sp,sp,48 tail putc@plt .L8: ld s2,288(s3) beq s2,zero,.L11 lla s0,.LANCHOR1+296 j .L13 .L12: ld s2,-8(s0) beq s2,zero,.L11 .L13: ld a0,0(s0) mv a1,s1 addi s0,s0,16 call strcmp@plt bne a0,zero,.L12 ld s0,32(sp) ld ra,40(sp) ld s1,24(sp) ld s3,8(sp) mv a2,s2 ld s2,16(sp) lla a1,.LC2 li a0,1 addi sp,sp,48 tail __printf_chk@plt .L11: la a5,stdout ld a1,0(a5) li a0,120 j .L23 .size decode, .-decode .section .rodata.str1.8 .align 3 .LC3: .string "dit" .align 3 .LC4: .string "daw" .align 3 .LC5: .string " %s" .text .align 1 .globl show .type show, @function show: addi sp,sp,-48 sd s0,32(sp) sd ra,40(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) sd s4,0(sp) lw a5,.LANCHOR2 mv s0,a0 bne a5,zero,.L27 lbu a5,0(a0) beq a5,zero,.L30 li s3,46 lla s2,.LC3 lla s4,.LC4 lla s1,.LC5 .L28: mv a1,s1 li a0,1 addi s0,s0,1 mv a2,s2 beq a5,s3,.L31 mv a2,s4 .L31: call __printf_chk@plt lbu a5,0(s0) bne a5,zero,.L28 .L30: ld s0,32(sp) ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) li a0,10 addi sp,sp,48 tail putchar@plt .L27: mv a2,a0 lla a1,.LC5 li a0,1 call __printf_chk@plt j .L30 .size show, .-show .section .rodata.str1.8 .align 3 .LC6: .string "" .text .align 1 .globl morse .type morse, @function morse: addi sp,sp,-16 sd s0,0(sp) sd ra,8(sp) mv s0,a0 call __ctype_b_loc@plt ld a5,0(a0) slli a4,s0,1 add a5,a5,a4 lhu a5,0(a5) andi a4,a5,1024 beq a4,zero,.L37 andi a5,a5,256 li a4,65 beq a5,zero,.L50 .L38: subw s0,s0,a4 slli s0,s0,3 lla a5,.LANCHOR0 add a5,a5,s0 ld s0,0(sp) ld ra,8(sp) ld a0,80(a5) addi sp,sp,16 tail show .L37: srli a4,a5,11 andi a4,a4,1 bne a4,zero,.L51 li a4,8192 and a5,a5,a4 bne a5,zero,.L40 lla a2,.LANCHOR1 lbu a5,0(a2) lla a4,.LANCHOR1+16 li a3,0 bne a5,zero,.L44 j .L36 .L43: lbu a5,-16(a4) addiw a3,a3,1 beq a5,zero,.L36 .L44: addi a4,a4,16 bne a5,s0,.L43 slli a3,a3,4 ld s0,0(sp) add a2,a2,a3 ld ra,8(sp) ld a0,8(a2) addi sp,sp,16 tail show .L50: li a4,97 j .L38 .L51: addiw s0,s0,-48 slli s0,s0,3 lla a5,.LANCHOR0 add a5,a5,s0 ld s0,0(sp) ld ra,8(sp) ld a0,0(a5) addi sp,sp,16 tail show .L36: ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .L40: ld s0,0(sp) ld ra,8(sp) lla a0,.LC6 addi sp,sp,16 tail show .size morse, .-morse .section .rodata.str1.8 .align 3 .LC7: .string "stdio" .align 3 .LC8: .string "pledge" .align 3 .LC9: .string "usage: %s [-d | -s] [string ...]\n" .align 3 .LC10: .string "dsh" .align 3 .LC11: .string "...-.-" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-128 sd s6,64(sp) la s6,__stack_chk_guard sd s0,112(sp) sd s1,104(sp) ld a5, 0(s6) sd a5, 24(sp) li a5, 0 mv s0,a0 mv s1,a1 lla a0,.LC7 li a1,0 sd ra,120(sp) sd s2,96(sp) sd s3,88(sp) sd s4,80(sp) sd s5,72(sp) sd s7,56(sp) sd s8,48(sp) sd s9,40(sp) sd s10,32(sp) call pledge@plt li a5,-1 beq a0,a5,.L92 lla s3,.LC10 li s2,-1 li s5,100 lla s8,.LANCHOR2 li s7,1 li s4,115 .L53: mv a2,s3 mv a1,s1 mv a0,s0 call getopt@plt beq a0,s2,.L95 .L59: beq a0,s5,.L54 beq a0,s4,.L55 la a5,stderr ld s0,0(a5) call getprogname@plt mv a3,a0 lla a2,.LC9 li a1,1 mv a0,s0 call __fprintf_chk@plt li s2,1 .L58: ld a4, 24(sp) ld a5, 0(s6) xor a5, a4, a5 li a4, 0 bne a5,zero,.L96 ld ra,120(sp) ld s0,112(sp) ld s1,104(sp) ld s3,88(sp) ld s4,80(sp) ld s5,72(sp) ld s6,64(sp) ld s7,56(sp) ld s8,48(sp) ld s9,40(sp) ld s10,32(sp) mv a0,s2 ld s2,96(sp) addi sp,sp,128 jr ra .L54: mv a2,s3 mv a1,s1 mv a0,s0 sw s7,4(s8) call getopt@plt bne a0,s2,.L59 .L95: la a5,optind lw a5,0(a5) lw s2,.LANCHOR2+4 slli a5,a5,3 add s1,s1,a5 ld a5,0(s1) beq s2,zero,.L60 beq a5,zero,.L77 .L62: ld a0,0(s1) addi s1,s1,8 call decode ld a5,0(s1) bne a5,zero,.L62 la s5,stdout .L63: ld a1,0(s5) li a0,10 li s2,0 call putc@plt j .L58 .L55: sw s7,0(s8) j .L53 .L60: beq a5,zero,.L81 lla s3,.LC6 .L72: ld s0,0(s1) lbu a0,0(s0) beq a0,zero,.L74 .L71: addi s0,s0,1 call morse lbu a0,0(s0) bne a0,zero,.L71 .L74: mv a0,s3 addi s1,s1,8 call show ld a5,0(s1) bne a5,zero,.L72 .L73: lla a0,.LC11 call show j .L58 .L77: li s1,0 li s7,0 la s5,stdout la s3,stdin li s4,-1 li s2,1 li s9,8192 addi s10,sp,8 li s8,10 .L61: ld a0,0(s3) call getc@plt mv s0,a0 beq a0,s4,.L63 addiw a5,s0,-45 bleu a5,s2,.L97 bne s1,zero,.L98 call __ctype_b_loc@plt ld a5,0(a0) slli s0,s0,1 add a5,a5,s0 lhu a5,0(a5) and a5,a5,s9 beq a5,zero,.L61 bne s7,zero,.L99 .L68: li s1,0 li s7,1 j .L61 .L97: addi a5,s1,32 add a5,a5,sp sb s0,-24(a5) addiw s1,s1,1 bne s1,s8,.L61 ld a1,0(s5) li a0,120 call putc@plt .L66: ld a0,0(s3) call getc@plt addiw a5,a0,-45 bleu a5,s2,.L66 j .L68 .L98: addi a5,s1,32 add s1,a5,sp sb zero,-24(s1) mv a0,s10 li s1,0 call decode li s7,0 j .L61 .L81: la s3,stdin li s0,-1 j .L70 .L75: call morse .L70: ld a0,0(s3) call getc@plt bne a0,s0,.L75 j .L73 .L99: ld a1,0(s5) li a0,32 li s7,0 call putc@plt j .L61 .L96: call __stack_chk_fail@plt .L92: lla a1,.LC8 li a0,1 call err@plt .size main, .-main .globl ps .section .rodata.str1.8 .align 3 .LC12: .string "<AS>" .align 3 .LC13: .string ".-..." .align 3 .LC14: .string "<CL>" .align 3 .LC15: .string "-.-..-.." .align 3 .LC16: .string "<CT>" .align 3 .LC17: .string "-.-.-" .align 3 .LC18: .string "<EE5>" .align 3 .LC19: .string "......" .align 3 .LC20: .string "......." .align 3 .LC21: .string "........" .align 3 .LC22: .string "<SK>" .align 3 .LC23: .string "<SN>" .align 3 .LC24: .string "...-." .align 3 .LC25: .string "<SOS>" .align 3 .LC26: .string "...---..." .globl other .align 3 .LC27: .string "..-.." .align 3 .LC28: .string "--..--" .align 3 .LC29: .string ".-.-.-" .align 3 .LC30: .string "..--.." .align 3 .LC31: .string "-..-." .align 3 .LC32: .string "-....-" .align 3 .LC33: .string "---..." .align 3 .LC34: .string "-.-.-." .align 3 .LC35: .string "-.--." .align 3 .LC36: .string "-.--.-" .align 3 .LC37: .string ".-..-." .align 3 .LC38: .string ".----." .align 3 .LC39: .string ".-.-." .align 3 .LC40: .string "-...-" .align 3 .LC41: .string ".--.-." .align 3 .LC42: .string ".-.-" .align 3 .LC43: .string "-..." .align 3 .LC44: .string "-.-." .align 3 .LC45: .string "-.." .align 3 .LC46: .string "." .align 3 .LC47: .string "..-." .align 3 .LC48: .string "--." .align 3 .LC49: .string "...." .align 3 .LC50: .string ".." .align 3 .LC51: .string ".---" .align 3 .LC52: .string "-.-" .align 3 .LC53: .string ".-.." .align 3 .LC54: .string "--" .align 3 .LC55: .string "-." .align 3 .LC56: .string "---" .align 3 .LC57: .string ".--." .align 3 .LC58: .string "--.-" .align 3 .LC59: .string ".-." .align 3 .LC60: .string "..." .align 3 .LC61: .string "-" .align 3 .LC62: .string "..-" .align 3 .LC63: .string "...-" .align 3 .LC64: .string ".--" .align 3 .LC65: .string "-..-" .align 3 .LC66: .string "-.--" .align 3 .LC67: .string "--.." .align 3 .LC68: .string ".----" .align 3 .LC69: .string "..---" .align 3 .LC70: .string "...--" .align 3 .LC71: .string "....-" .align 3 .LC72: .string "....." .align 3 .LC73: .string "-...." .align 3 .LC74: .string "--..." .align 3 .LC75: .string "---.." .align 3 .LC76: .string "----." .bss .align 2 .set .LANCHOR2,. + 0 .type sflag, @object .size sflag, 4 sflag: .zero 4 .type dflag, @object .size dflag, 4 dflag: .zero 4 .section .data.rel.local,"aw" .align 3 .set .LANCHOR1,. + 0 .type other, @object .size other, 288 other: .byte 101 .zero 7 .dword .LC27 .byte 44 .zero 7 .dword .LC28 .byte 46 .zero 7 .dword .LC29 .byte 63 .zero 7 .dword .LC30 .byte 47 .zero 7 .dword .LC31 .byte 45 .zero 7 .dword .LC32 .byte 58 .zero 7 .dword .LC33 .byte 59 .zero 7 .dword .LC34 .byte 40 .zero 7 .dword .LC35 .byte 41 .zero 7 .dword .LC36 .byte 34 .zero 7 .dword .LC37 .byte 96 .zero 7 .dword .LC37 .byte 39 .zero 7 .dword .LC38 .byte 43 .zero 7 .dword .LC39 .byte 61 .zero 7 .dword .LC40 .byte 64 .zero 7 .dword .LC41 .byte 10 .zero 7 .dword .LC42 .byte 0 .zero 7 .dword 0 .type ps, @object .size ps, 160 ps: .dword .LC12 .dword .LC13 .dword .LC14 .dword .LC15 .dword .LC16 .dword .LC17 .dword .LC18 .dword .LC19 .dword .LC18 .dword .LC20 .dword .LC18 .dword .LC21 .dword .LC22 .dword .LC11 .dword .LC23 .dword .LC24 .dword .LC25 .dword .LC26 .dword 0 .dword 0 .section .data.rel.ro.local,"aw" .align 3 .set .LANCHOR0,. + 0 .type digit, @object .size digit, 80 digit: .dword .LC0 .dword .LC68 .dword .LC69 .dword .LC70 .dword .LC71 .dword .LC72 .dword .LC73 .dword .LC74 .dword .LC75 .dword .LC76 .type alph, @object .size alph, 208 alph: .dword .LC1 .dword .LC43 .dword .LC44 .dword .LC45 .dword .LC46 .dword .LC47 .dword .LC48 .dword .LC49 .dword .LC50 .dword .LC51 .dword .LC52 .dword .LC53 .dword .LC54 .dword .LC55 .dword .LC56 .dword .LC57 .dword .LC58 .dword .LC59 .dword .LC60 .dword .LC61 .dword .LC62 .dword .LC63 .dword .LC64 .dword .LC65 .dword .LC66 .dword .LC67 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "morse.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string " %s" .align 3 .LC1: .string "dit" .align 3 .LC2: .string "daw" .align 3 .LC3: .string "" .text .align 1 .globl morse .type morse, @function morse: addi sp,sp,-48 sd s0,32(sp) sd ra,40(sp) mv s0,a0 sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) sd s4,0(sp) call __ctype_b_loc@plt ld a5,0(a0) slli a4,s0,1 add a5,a5,a4 lhu a5,0(a5) andi a4,a5,1024 beq a4,zero,.L2 andi a5,a5,256 li a4,65 beq a5,zero,.L46 subw s0,s0,a4 slli s0,s0,3 lla a5,.LANCHOR0 add a5,a5,s0 lw a4,.LANCHOR1 ld s0,0(a5) bne a4,zero,.L19 .L50: lbu a5,0(s0) beq a5,zero,.L7 li s3,46 lla s2,.LC2 lla s1,.LC0 lla s4,.LC1 .L5: mv a2,s2 mv a1,s1 li a0,1 beq a5,s3,.L47 addi s0,s0,1 call __printf_chk@plt lbu a5,0(s0) bne a5,zero,.L5 .L7: ld s0,32(sp) ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) li a0,10 addi sp,sp,48 tail putchar@plt .L2: srli a4,a5,11 andi a4,a4,1 bne a4,zero,.L48 li a4,8192 and a5,a5,a4 bne a5,zero,.L15 lla a2,.LANCHOR2 lbu a5,0(a2) lla a4,.LANCHOR2+16 li a3,0 bne a5,zero,.L23 j .L1 .L18: lbu a5,-16(a4) addiw a3,a3,1 beq a5,zero,.L1 .L23: addi a4,a4,16 bne a5,s0,.L18 slli a3,a3,4 add a2,a2,a3 lw a5,.LANCHOR1 ld s0,8(a2) bne a5,zero,.L19 lbu a5,0(s0) beq a5,zero,.L7 li s3,46 lla s2,.LC2 lla s1,.LC0 lla s4,.LC1 .L20: mv a2,s2 mv a1,s1 li a0,1 beq a5,s3,.L49 .L21: addi s0,s0,1 call __printf_chk@plt lbu a5,0(s0) beq a5,zero,.L7 mv a2,s2 mv a1,s1 li a0,1 bne a5,s3,.L21 .L49: mv a2,s4 addi s0,s0,1 call __printf_chk@plt lbu a5,0(s0) bne a5,zero,.L20 j .L7 .L46: li a4,97 subw s0,s0,a4 slli s0,s0,3 lla a5,.LANCHOR0 add a5,a5,s0 lw a4,.LANCHOR1 ld s0,0(a5) beq a4,zero,.L50 .L19: mv a2,s0 lla a1,.LC0 li a0,1 call __printf_chk@plt j .L7 .L47: mv a2,s4 addi s0,s0,1 call __printf_chk@plt lbu a5,0(s0) bne a5,zero,.L5 j .L7 .L48: addiw s0,s0,-48 slli s0,s0,3 lla a5,.LANCHOR0 add a5,a5,s0 lw a4,.LANCHOR1 ld s0,208(a5) bne a4,zero,.L19 lbu a5,0(s0) beq a5,zero,.L7 li s3,46 lla s2,.LC2 lla s1,.LC0 lla s4,.LC1 .L12: mv a2,s2 mv a1,s1 li a0,1 beq a5,s3,.L51 .L13: addi s0,s0,1 call __printf_chk@plt lbu a5,0(s0) beq a5,zero,.L7 mv a2,s2 mv a1,s1 li a0,1 bne a5,s3,.L13 .L51: mv a2,s4 addi s0,s0,1 call __printf_chk@plt lbu a5,0(s0) bne a5,zero,.L12 j .L7 .L1: ld ra,40(sp) ld s0,32(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) addi sp,sp,48 jr ra .L15: lw a5,.LANCHOR1 beq a5,zero,.L7 lla a2,.LC3 lla a1,.LC0 li a0,1 call __printf_chk@plt j .L7 .size morse, .-morse .section .rodata.str1.8 .align 3 .LC4: .string "-----" .align 3 .LC5: .string ".----" .align 3 .LC6: .string "..---" .align 3 .LC7: .string "...--" .align 3 .LC8: .string "....-" .align 3 .LC9: .string "....." .align 3 .LC10: .string "-...." .align 3 .LC11: .string "--..." .align 3 .LC12: .string "---.." .align 3 .LC13: .string "----." .align 3 .LC14: .string " %s " .text .align 1 .globl decode .type decode, @function decode: addi sp,sp,-48 sd s1,24(sp) mv a1,a0 mv s1,a0 lla a0,.LC4 sd ra,40(sp) sd s0,32(sp) sd s2,16(sp) sd s3,8(sp) call strcmp@plt beq a0,zero,.L53 mv a1,s1 lla a0,.LC5 call strcmp@plt beq a0,zero,.L62 mv a1,s1 lla a0,.LC6 call strcmp@plt beq a0,zero,.L63 mv a1,s1 lla a0,.LC7 call strcmp@plt beq a0,zero,.L64 mv a1,s1 lla a0,.LC8 call strcmp@plt beq a0,zero,.L65 mv a1,s1 lla a0,.LC9 call strcmp@plt beq a0,zero,.L66 mv a1,s1 lla a0,.LC10 call strcmp@plt beq a0,zero,.L67 mv a1,s1 lla a0,.LC11 call strcmp@plt beq a0,zero,.L68 mv a1,s1 lla a0,.LC12 call strcmp@plt beq a0,zero,.L69 mv a1,s1 lla a0,.LC13 call strcmp@plt lla s0,.LANCHOR0 li s2,0 li s3,26 bne a0,zero,.L56 j .L138 .L55: addiw s2,s2,1 beq s2,s3,.L139 .L56: ld a0,0(s0) mv a1,s1 addi s0,s0,8 call strcmp@plt bne a0,zero,.L55 la a5,stdout ld a1,0(a5) addiw a0,s2,65 .L137: ld s0,32(sp) ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) addi sp,sp,48 tail putc@plt .L62: li a0,1 .L53: ld s0,32(sp) la a5,stdout ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld a1,0(a5) addiw a0,a0,48 addi sp,sp,48 tail putc@plt .L139: lla s3,.LANCHOR2 lbu s2,0(s3) beq s2,zero,.L57 lla s0,.LANCHOR2+8 j .L59 .L58: lbu s2,-8(s0) beq s2,zero,.L57 .L59: ld a0,0(s0) mv a1,s1 addi s0,s0,16 call strcmp@plt bne a0,zero,.L58 ld s0,32(sp) la a5,stdout ld ra,40(sp) ld s1,24(sp) ld s3,8(sp) ld a1,0(a5) mv a0,s2 ld s2,16(sp) addi sp,sp,48 tail putc@plt .L57: ld s0,288(s3) beq s0,zero,.L60 ld a0,296(s3) mv a1,s1 call strcmp@plt beq a0,zero,.L61 ld s0,304(s3) beq s0,zero,.L60 ld a0,312(s3) mv a1,s1 call strcmp@plt beq a0,zero,.L61 ld s0,320(s3) beq s0,zero,.L60 ld a0,328(s3) mv a1,s1 call strcmp@plt beq a0,zero,.L61 ld s0,336(s3) beq s0,zero,.L60 ld a0,344(s3) mv a1,s1 call strcmp@plt beq a0,zero,.L61 ld s0,352(s3) beq s0,zero,.L60 ld a0,360(s3) mv a1,s1 call strcmp@plt beq a0,zero,.L61 ld s0,368(s3) beq s0,zero,.L60 ld a0,376(s3) mv a1,s1 call strcmp@plt beq a0,zero,.L61 ld s0,384(s3) beq s0,zero,.L60 ld a0,392(s3) mv a1,s1 call strcmp@plt beq a0,zero,.L61 ld s0,400(s3) beq s0,zero,.L60 ld a0,408(s3) mv a1,s1 call strcmp@plt beq a0,zero,.L61 ld s0,416(s3) beq s0,zero,.L60 ld a0,424(s3) mv a1,s1 call strcmp@plt beq a0,zero,.L61 ld s0,432(s3) beq s0,zero,.L60 .L61: mv a2,s0 ld s0,32(sp) ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) lla a1,.LC14 li a0,1 addi sp,sp,48 tail __printf_chk@plt .L60: la a5,stdout ld a1,0(a5) li a0,120 j .L137 .L63: li a0,2 j .L53 .L64: li a0,3 j .L53 .L65: li a0,4 j .L53 .L66: li a0,5 j .L53 .L67: li a0,6 j .L53 .L68: li a0,7 j .L53 .L69: li a0,8 j .L53 .L138: li a0,9 j .L53 .size decode, .-decode .align 1 .globl show .type show, @function show: addi sp,sp,-48 sd s0,32(sp) sd ra,40(sp) sd s1,24(sp) sd s2,16(sp) sd s3,8(sp) sd s4,0(sp) lw a5,.LANCHOR1 mv s0,a0 bne a5,zero,.L141 lbu a5,0(a0) beq a5,zero,.L144 li s3,46 lla s2,.LC2 lla s1,.LC0 lla s4,.LC1 .L142: mv a2,s2 mv a1,s1 li a0,1 beq a5,s3,.L152 addi s0,s0,1 call __printf_chk@plt lbu a5,0(s0) bne a5,zero,.L142 .L144: ld s0,32(sp) ld ra,40(sp) ld s1,24(sp) ld s2,16(sp) ld s3,8(sp) ld s4,0(sp) li a0,10 addi sp,sp,48 tail putchar@plt .L152: mv a2,s4 addi s0,s0,1 call __printf_chk@plt lbu a5,0(s0) bne a5,zero,.L142 j .L144 .L141: mv a2,a0 lla a1,.LC0 li a0,1 call __printf_chk@plt j .L144 .size show, .-show .section .rodata.str1.8 .align 3 .LC15: .string "stdio" .align 3 .LC16: .string "pledge" .align 3 .LC17: .string "usage: %s [-d | -s] [string ...]\n" .align 3 .LC18: .string "dsh" .align 3 .LC19: .string "...-.-" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-128 sd s6,64(sp) la s6,__stack_chk_guard sd s0,112(sp) sd s1,104(sp) ld a5, 0(s6) sd a5, 24(sp) li a5, 0 mv s0,a0 mv s1,a1 lla a0,.LC15 li a1,0 sd ra,120(sp) sd s2,96(sp) sd s3,88(sp) sd s4,80(sp) sd s5,72(sp) sd s7,56(sp) sd s8,48(sp) sd s9,40(sp) sd s10,32(sp) call pledge@plt li a5,-1 beq a0,a5,.L193 lla s3,.LC18 li s2,-1 li s5,100 lla s8,.LANCHOR1 li s7,1 li s4,115 .L154: mv a2,s3 mv a1,s1 mv a0,s0 call getopt@plt beq a0,s2,.L196 .L160: beq a0,s5,.L155 beq a0,s4,.L156 la a5,stderr ld s0,0(a5) call getprogname@plt mv a3,a0 lla a2,.LC17 li a1,1 mv a0,s0 call __fprintf_chk@plt li s2,1 .L159: ld a4, 24(sp) ld a5, 0(s6) xor a5, a4, a5 li a4, 0 bne a5,zero,.L197 ld ra,120(sp) ld s0,112(sp) ld s1,104(sp) ld s3,88(sp) ld s4,80(sp) ld s5,72(sp) ld s6,64(sp) ld s7,56(sp) ld s8,48(sp) ld s9,40(sp) ld s10,32(sp) mv a0,s2 ld s2,96(sp) addi sp,sp,128 jr ra .L155: mv a2,s3 mv a1,s1 mv a0,s0 sw s7,4(s8) call getopt@plt bne a0,s2,.L160 .L196: la a5,optind lw a5,0(a5) lw s2,.LANCHOR1+4 slli a5,a5,3 add s1,s1,a5 ld a5,0(s1) beq s2,zero,.L161 beq a5,zero,.L178 .L163: ld a0,0(s1) addi s1,s1,8 call decode ld a5,0(s1) bne a5,zero,.L163 la s5,stdout .L164: ld a1,0(s5) li a0,10 li s2,0 call putc@plt j .L159 .L156: sw s7,0(s8) j .L154 .L161: beq a5,zero,.L182 lla s3,.LC3 .L173: ld s0,0(s1) lbu a0,0(s0) beq a0,zero,.L175 .L172: addi s0,s0,1 call morse lbu a0,0(s0) bne a0,zero,.L172 .L175: mv a0,s3 addi s1,s1,8 call show ld a5,0(s1) bne a5,zero,.L173 .L174: lla a0,.LC19 call show j .L159 .L178: li s1,0 li s7,0 la s5,stdout la s3,stdin li s4,-1 li s2,1 li s9,8192 addi s10,sp,8 li s8,10 .L162: ld a0,0(s3) call getc@plt mv s0,a0 beq a0,s4,.L164 addiw a5,s0,-45 bleu a5,s2,.L198 bne s1,zero,.L199 call __ctype_b_loc@plt ld a5,0(a0) slli s0,s0,1 add a5,a5,s0 lhu a5,0(a5) and a5,a5,s9 beq a5,zero,.L162 bne s7,zero,.L200 .L169: li s1,0 li s7,1 j .L162 .L198: addi a5,s1,32 add a5,a5,sp sb s0,-24(a5) addiw s1,s1,1 bne s1,s8,.L162 ld a1,0(s5) li a0,120 call putc@plt .L167: ld a0,0(s3) call getc@plt addiw a5,a0,-45 bleu a5,s2,.L167 j .L169 .L199: addi a5,s1,32 add s1,a5,sp sb zero,-24(s1) mv a0,s10 li s1,0 call decode li s7,0 j .L162 .L182: la s3,stdin li s0,-1 j .L171 .L176: call morse .L171: ld a0,0(s3) call getc@plt bne a0,s0,.L176 j .L174 .L200: ld a1,0(s5) li a0,32 li s7,0 call putc@plt j .L162 .L197: call __stack_chk_fail@plt .L193: lla a1,.LC16 li a0,1 call err@plt .size main, .-main .globl ps .section .rodata.str1.8 .align 3 .LC20: .string "<AS>" .align 3 .LC21: .string ".-..." .align 3 .LC22: .string "<CL>" .align 3 .LC23: .string "-.-..-.." .align 3 .LC24: .string "<CT>" .align 3 .LC25: .string "-.-.-" .align 3 .LC26: .string "<EE5>" .align 3 .LC27: .string "......" .align 3 .LC28: .string "......." .align 3 .LC29: .string "........" .align 3 .LC30: .string "<SK>" .align 3 .LC31: .string "<SN>" .align 3 .LC32: .string "...-." .align 3 .LC33: .string "<SOS>" .align 3 .LC34: .string "...---..." .globl other .align 3 .LC35: .string "..-.." .align 3 .LC36: .string "--..--" .align 3 .LC37: .string ".-.-.-" .align 3 .LC38: .string "..--.." .align 3 .LC39: .string "-..-." .align 3 .LC40: .string "-....-" .align 3 .LC41: .string "---..." .align 3 .LC42: .string "-.-.-." .align 3 .LC43: .string "-.--." .align 3 .LC44: .string "-.--.-" .align 3 .LC45: .string ".-..-." .align 3 .LC46: .string ".----." .align 3 .LC47: .string ".-.-." .align 3 .LC48: .string "-...-" .align 3 .LC49: .string ".--.-." .align 3 .LC50: .string ".-.-" .align 3 .LC51: .string ".-" .align 3 .LC52: .string "-..." .align 3 .LC53: .string "-.-." .align 3 .LC54: .string "-.." .align 3 .LC55: .string "." .align 3 .LC56: .string "..-." .align 3 .LC57: .string "--." .align 3 .LC58: .string "...." .align 3 .LC59: .string ".." .align 3 .LC60: .string ".---" .align 3 .LC61: .string "-.-" .align 3 .LC62: .string ".-.." .align 3 .LC63: .string "--" .align 3 .LC64: .string "-." .align 3 .LC65: .string "---" .align 3 .LC66: .string ".--." .align 3 .LC67: .string "--.-" .align 3 .LC68: .string ".-." .align 3 .LC69: .string "..." .align 3 .LC70: .string "-" .align 3 .LC71: .string "..-" .align 3 .LC72: .string "...-" .align 3 .LC73: .string ".--" .align 3 .LC74: .string "-..-" .align 3 .LC75: .string "-.--" .align 3 .LC76: .string "--.." .bss .align 2 .set .LANCHOR1,. + 0 .type sflag, @object .size sflag, 4 sflag: .zero 4 .type dflag, @object .size dflag, 4 dflag: .zero 4 .section .data.rel.local,"aw" .align 3 .set .LANCHOR2,. + 0 .type other, @object .size other, 288 other: .byte 101 .zero 7 .dword .LC35 .byte 44 .zero 7 .dword .LC36 .byte 46 .zero 7 .dword .LC37 .byte 63 .zero 7 .dword .LC38 .byte 47 .zero 7 .dword .LC39 .byte 45 .zero 7 .dword .LC40 .byte 58 .zero 7 .dword .LC41 .byte 59 .zero 7 .dword .LC42 .byte 40 .zero 7 .dword .LC43 .byte 41 .zero 7 .dword .LC44 .byte 34 .zero 7 .dword .LC45 .byte 96 .zero 7 .dword .LC45 .byte 39 .zero 7 .dword .LC46 .byte 43 .zero 7 .dword .LC47 .byte 61 .zero 7 .dword .LC48 .byte 64 .zero 7 .dword .LC49 .byte 10 .zero 7 .dword .LC50 .byte 0 .zero 7 .dword 0 .type ps, @object .size ps, 160 ps: .dword .LC20 .dword .LC21 .dword .LC22 .dword .LC23 .dword .LC24 .dword .LC25 .dword .LC26 .dword .LC27 .dword .LC26 .dword .LC28 .dword .LC26 .dword .LC29 .dword .LC30 .dword .LC19 .dword .LC31 .dword .LC32 .dword .LC33 .dword .LC34 .dword 0 .dword 0 .section .data.rel.ro.local,"aw" .align 3 .set .LANCHOR0,. + 0 .type alph, @object .size alph, 208 alph: .dword .LC51 .dword .LC52 .dword .LC53 .dword .LC54 .dword .LC55 .dword .LC56 .dword .LC57 .dword .LC58 .dword .LC59 .dword .LC60 .dword .LC61 .dword .LC62 .dword .LC63 .dword .LC64 .dword .LC65 .dword .LC66 .dword .LC67 .dword .LC68 .dword .LC69 .dword .LC70 .dword .LC71 .dword .LC72 .dword .LC73 .dword .LC74 .dword .LC75 .dword .LC76 .type digit, @object .size digit, 80 digit: .dword .LC4 .dword .LC5 .dword .LC6 .dword .LC7 .dword .LC8 .dword .LC9 .dword .LC10 .dword .LC11 .dword .LC12 .dword .LC13 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "morse.c" .text .section .rodata .align 3 .LC0: .string "-----" .align 3 .LC1: .string ".----" .align 3 .LC2: .string "..---" .align 3 .LC3: .string "...--" .align 3 .LC4: .string "....-" .align 3 .LC5: .string "....." .align 3 .LC6: .string "-...." .align 3 .LC7: .string "--..." .align 3 .LC8: .string "---.." .align 3 .LC9: .string "----." .section .data.rel.local,"aw" .align 3 .type digit, %object .size digit, 80 digit: .xword .LC0 .xword .LC1 .xword .LC2 .xword .LC3 .xword .LC4 .xword .LC5 .xword .LC6 .xword .LC7 .xword .LC8 .xword .LC9 .section .rodata .align 3 .LC10: .string ".-" .align 3 .LC11: .string "-..." .align 3 .LC12: .string "-.-." .align 3 .LC13: .string "-.." .align 3 .LC14: .string "." .align 3 .LC15: .string "..-." .align 3 .LC16: .string "--." .align 3 .LC17: .string "...." .align 3 .LC18: .string ".." .align 3 .LC19: .string ".---" .align 3 .LC20: .string "-.-" .align 3 .LC21: .string ".-.." .align 3 .LC22: .string "--" .align 3 .LC23: .string "-." .align 3 .LC24: .string "---" .align 3 .LC25: .string ".--." .align 3 .LC26: .string "--.-" .align 3 .LC27: .string ".-." .align 3 .LC28: .string "..." .align 3 .LC29: .string "-" .align 3 .LC30: .string "..-" .align 3 .LC31: .string "...-" .align 3 .LC32: .string ".--" .align 3 .LC33: .string "-..-" .align 3 .LC34: .string "-.--" .align 3 .LC35: .string "--.." .section .data.rel.local .align 3 .type alph, %object .size alph, 208 alph: .xword .LC10 .xword .LC11 .xword .LC12 .xword .LC13 .xword .LC14 .xword .LC15 .xword .LC16 .xword .LC17 .xword .LC18 .xword .LC19 .xword .LC20 .xword .LC21 .xword .LC22 .xword .LC23 .xword .LC24 .xword .LC25 .xword .LC26 .xword .LC27 .xword .LC28 .xword .LC29 .xword .LC30 .xword .LC31 .xword .LC32 .xword .LC33 .xword .LC34 .xword .LC35 .global other .section .rodata .align 3 .LC36: .string "..-.." .align 3 .LC37: .string "--..--" .align 3 .LC38: .string ".-.-.-" .align 3 .LC39: .string "..--.." .align 3 .LC40: .string "-..-." .align 3 .LC41: .string "-....-" .align 3 .LC42: .string "---..." .align 3 .LC43: .string "-.-.-." .align 3 .LC44: .string "-.--." .align 3 .LC45: .string "-.--.-" .align 3 .LC46: .string ".-..-." .align 3 .LC47: .string ".----." .align 3 .LC48: .string ".-.-." .align 3 .LC49: .string "-...-" .align 3 .LC50: .string ".--.-." .align 3 .LC51: .string ".-.-" .section .data.rel.local .align 3 .type other, %object .size other, 288 other: .byte 101 .zero 7 .xword .LC36 .byte 44 .zero 7 .xword .LC37 .byte 46 .zero 7 .xword .LC38 .byte 63 .zero 7 .xword .LC39 .byte 47 .zero 7 .xword .LC40 .byte 45 .zero 7 .xword .LC41 .byte 58 .zero 7 .xword .LC42 .byte 59 .zero 7 .xword .LC43 .byte 40 .zero 7 .xword .LC44 .byte 41 .zero 7 .xword .LC45 .byte 34 .zero 7 .xword .LC46 .byte 96 .zero 7 .xword .LC46 .byte 39 .zero 7 .xword .LC47 .byte 43 .zero 7 .xword .LC48 .byte 61 .zero 7 .xword .LC49 .byte 64 .zero 7 .xword .LC50 .byte 10 .zero 7 .xword .LC51 .byte 0 .zero 7 .xword 0 .global ps .section .rodata .align 3 .LC52: .string "<AS>" .align 3 .LC53: .string ".-..." .align 3 .LC54: .string "<CL>" .align 3 .LC55: .string "-.-..-.." .align 3 .LC56: .string "<CT>" .align 3 .LC57: .string "-.-.-" .align 3 .LC58: .string "<EE5>" .align 3 .LC59: .string "......" .align 3 .LC60: .string "......." .align 3 .LC61: .string "........" .align 3 .LC62: .string "<SK>" .align 3 .LC63: .string "...-.-" .align 3 .LC64: .string "<SN>" .align 3 .LC65: .string "...-." .align 3 .LC66: .string "<SOS>" .align 3 .LC67: .string "...---..." .section .data.rel.local .align 3 .type ps, %object .size ps, 160 ps: .xword .LC52 .xword .LC53 .xword .LC54 .xword .LC55 .xword .LC56 .xword .LC57 .xword .LC58 .xword .LC59 .xword .LC58 .xword .LC60 .xword .LC58 .xword .LC61 .xword .LC62 .xword .LC63 .xword .LC64 .xword .LC65 .xword .LC66 .xword .LC67 .xword 0 .xword 0 .local sflag .comm sflag,4,4 .local dflag .comm dflag,4,4 .section .rodata .align 3 .LC68: .string "stdio" .align 3 .LC69: .string "pledge" .align 3 .LC70: .string "usage: %s [-d | -s] [string ...]\n" .align 3 .LC71: .string "dsh" .align 3 .LC72: .string "" .text .align 2 .global main .type main, %function main: .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 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, 88] mov x1, 0 mov x1, 0 adrp x0, .LC68 add x0, x0, :lo12:.LC68 bl pledge cmn w0, #1 bne .L3 adrp x0, .LC69 add x1, x0, :lo12:.LC69 mov w0, 1 bl err .L8: ldr w0, [sp, 60] cmp w0, 100 beq .L4 ldr w0, [sp, 60] cmp w0, 115 beq .L5 b .L31 .L4: adrp x0, dflag add x0, x0, :lo12:dflag mov w1, 1 str w1, [x0] b .L3 .L5: adrp x0, sflag add x0, x0, :lo12:sflag mov w1, 1 str w1, [x0] b .L3 .L31: adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x19, [x0] bl getprogname mov w2, w0 adrp x0, .LC70 add x1, x0, :lo12:.LC70 mov x0, x19 bl fprintf mov w0, 1 b .L7 .L3: adrp x0, .LC71 add x2, x0, :lo12:.LC71 ldr x1, [sp, 32] ldr w0, [sp, 44] bl getopt str w0, [sp, 60] ldr w0, [sp, 60] cmn w0, #1 bne .L8 adrp x0, :got:optind ldr x0, [x0, #:got_lo12:optind] ldr w0, [x0] ldr w1, [sp, 44] sub w0, w1, w0 str w0, [sp, 44] adrp x0, :got:optind ldr x0, [x0, #:got_lo12:optind] ldr w0, [x0] sxtw x0, w0 lsl x0, x0, 3 ldr x1, [sp, 32] add x0, x1, x0 str x0, [sp, 32] adrp x0, dflag add x0, x0, :lo12:dflag ldr w0, [x0] cmp w0, 0 beq .L9 ldr x0, [sp, 32] ldr x0, [x0] cmp x0, 0 beq .L10 .L11: ldr x0, [sp, 32] ldr x0, [x0] bl decode ldr x0, [sp, 32] add x0, x0, 8 str x0, [sp, 32] ldr x0, [sp, 32] ldr x0, [x0] cmp x0, 0 bne .L11 b .L12 .L10: str wzr, [sp, 56] str wzr, [sp, 52] b .L13 .L21: ldr w0, [sp, 60] cmp w0, 45 beq .L14 ldr w0, [sp, 60] cmp w0, 46 bne .L15 .L14: ldr w0, [sp, 56] add w1, w0, 1 str w1, [sp, 56] ldr w1, [sp, 60] and w2, w1, 255 sxtw x0, w0 add x1, sp, 72 strb w2, [x1, x0] ldr w0, [sp, 56] cmp w0, 10 bne .L13 str wzr, [sp, 56] mov w0, 120 bl putchar nop .L18: bl getchar str w0, [sp, 60] ldr w0, [sp, 60] cmn w0, #1 beq .L17 ldr w0, [sp, 60] cmp w0, 46 beq .L18 ldr w0, [sp, 60] cmp w0, 45 beq .L18 .L17: mov w0, 1 str w0, [sp, 52] b .L13 .L15: ldr w0, [sp, 56] cmp w0, 0 beq .L19 ldrsw x0, [sp, 56] add x1, sp, 72 strb wzr, [x1, x0] add x0, sp, 72 bl decode str wzr, [sp, 56] str wzr, [sp, 52] b .L13 .L19: bl __ctype_b_loc ldr x1, [x0] ldrsw x0, [sp, 60] lsl x0, x0, 1 add x0, x1, x0 ldrh w0, [x0] and w0, w0, 8192 cmp w0, 0 beq .L13 ldr w0, [sp, 52] cmp w0, 0 beq .L20 mov w0, 32 bl putchar str wzr, [sp, 52] b .L13 .L20: mov w0, 1 str w0, [sp, 52] .L13: bl getchar str w0, [sp, 60] ldr w0, [sp, 60] cmn w0, #1 bne .L21 .L12: mov w0, 10 bl putchar b .L22 .L9: ldr x0, [sp, 32] ldr x0, [x0] cmp x0, 0 beq .L28 .L26: ldr x0, [sp, 32] ldr x0, [x0] str x0, [sp, 64] b .L24 .L25: ldr x0, [sp, 64] ldrb w0, [x0] bl morse ldr x0, [sp, 64] add x0, x0, 1 str x0, [sp, 64] .L24: ldr x0, [sp, 64] ldrb w0, [x0] cmp w0, 0 bne .L25 adrp x0, .LC72 add x0, x0, :lo12:.LC72 bl show ldr x0, [sp, 32] add x0, x0, 8 str x0, [sp, 32] ldr x0, [sp, 32] ldr x0, [x0] cmp x0, 0 bne .L26 b .L27 .L29: ldr w0, [sp, 60] bl morse .L28: bl getchar str w0, [sp, 60] ldr w0, [sp, 60] cmn w0, #1 bne .L29 .L27: adrp x0, .LC63 add x0, x0, :lo12:.LC63 bl show .L22: mov w0, 0 .L7: 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 .L30 bl __stack_chk_fail .L30: mov w0, w1 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 main, .-main .align 2 .global morse .type morse, %function morse: .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] bl __ctype_b_loc ldr x1, [x0] ldrsw x0, [sp, 28] lsl x0, x0, 1 add x0, x1, x0 ldrh w0, [x0] and w0, w0, 1024 cmp w0, 0 beq .L33 bl __ctype_b_loc ldr x1, [x0] ldrsw x0, [sp, 28] lsl x0, x0, 1 add x0, x1, x0 ldrh w0, [x0] and w0, w0, 256 cmp w0, 0 beq .L34 mov w0, 65 b .L35 .L34: mov w0, 97 .L35: ldr w1, [sp, 28] sub w1, w1, w0 adrp x0, alph add x0, x0, :lo12:alph sxtw x1, w1 ldr x0, [x0, x1, lsl 3] bl show b .L42 .L33: bl __ctype_b_loc ldr x1, [x0] ldrsw x0, [sp, 28] lsl x0, x0, 1 add x0, x1, x0 ldrh w0, [x0] and w0, w0, 2048 cmp w0, 0 beq .L37 ldr w0, [sp, 28] sub w1, w0, #48 adrp x0, digit add x0, x0, :lo12:digit sxtw x1, w1 ldr x0, [x0, x1, lsl 3] bl show b .L42 .L37: bl __ctype_b_loc ldr x1, [x0] ldrsw x0, [sp, 28] lsl x0, x0, 1 add x0, x1, x0 ldrh w0, [x0] and w0, w0, 8192 cmp w0, 0 beq .L38 adrp x0, .LC72 add x0, x0, :lo12:.LC72 bl show b .L42 .L38: str wzr, [sp, 44] b .L39 .L41: adrp x0, other add x1, x0, :lo12:other ldrsw x0, [sp, 44] lsl x0, x0, 4 add x0, x1, x0 ldrb w0, [x0] mov w1, w0 ldr w0, [sp, 28] cmp w0, w1 bne .L40 adrp x0, other add x1, x0, :lo12:other ldrsw x0, [sp, 44] lsl x0, x0, 4 add x0, x1, x0 ldr x0, [x0, 8] bl show nop b .L42 .L40: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L39: adrp x0, other add x1, x0, :lo12:other ldrsw x0, [sp, 44] lsl x0, x0, 4 add x0, x1, x0 ldrb w0, [x0] cmp w0, 0 bne .L41 .L42: nop ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE7: .size morse, .-morse .section .rodata .align 3 .LC73: .string " %s " .text .align 2 .global decode .type decode, %function decode: .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 wzr, [sp, 44] b .L44 .L47: adrp x0, digit add x0, x0, :lo12:digit ldrsw x1, [sp, 44] ldr x0, [x0, x1, lsl 3] ldr x1, [sp, 24] bl strcmp cmp w0, 0 bne .L45 ldr w0, [sp, 44] add w0, w0, 48 bl putchar b .L43 .L45: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L44: ldr w0, [sp, 44] cmp w0, 9 ble .L47 str wzr, [sp, 44] b .L48 .L50: adrp x0, alph add x0, x0, :lo12:alph ldrsw x1, [sp, 44] ldr x0, [x0, x1, lsl 3] ldr x1, [sp, 24] bl strcmp cmp w0, 0 bne .L49 ldr w0, [sp, 44] add w0, w0, 65 bl putchar b .L43 .L49: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L48: ldr w0, [sp, 44] cmp w0, 25 ble .L50 str wzr, [sp, 44] b .L51 .L53: adrp x0, other add x1, x0, :lo12:other ldrsw x0, [sp, 44] lsl x0, x0, 4 add x0, x1, x0 ldr x0, [x0, 8] ldr x1, [sp, 24] bl strcmp cmp w0, 0 bne .L52 adrp x0, other add x1, x0, :lo12:other ldrsw x0, [sp, 44] lsl x0, x0, 4 add x0, x1, x0 ldrb w0, [x0] bl putchar b .L43 .L52: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L51: adrp x0, other add x1, x0, :lo12:other ldrsw x0, [sp, 44] lsl x0, x0, 4 add x0, x1, x0 ldrb w0, [x0] cmp w0, 0 bne .L53 str wzr, [sp, 44] b .L54 .L56: adrp x0, ps add x1, x0, :lo12:ps ldrsw x0, [sp, 44] lsl x0, x0, 4 add x0, x1, x0 ldr x0, [x0, 8] ldr x1, [sp, 24] bl strcmp cmp w0, 0 bne .L55 adrp x0, ps add x1, x0, :lo12:ps ldrsw x0, [sp, 44] lsl x0, x0, 4 add x0, x1, x0 ldr x0, [x0] mov x1, x0 adrp x0, .LC73 add x0, x0, :lo12:.LC73 bl printf b .L43 .L55: ldr w0, [sp, 44] add w0, w0, 1 str w0, [sp, 44] .L54: adrp x0, ps add x1, x0, :lo12:ps ldrsw x0, [sp, 44] lsl x0, x0, 4 add x0, x1, x0 ldr x0, [x0] cmp x0, 0 bne .L56 mov w0, 120 bl putchar .L43: ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE8: .size decode, .-decode .section .rodata .align 3 .LC74: .string " %s" .align 3 .LC75: .string "dit" .align 3 .LC76: .string "daw" .text .align 2 .global show .type show, %function show: .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] adrp x0, sflag add x0, x0, :lo12:sflag ldr w0, [x0] cmp w0, 0 beq .L60 ldr x1, [sp, 24] adrp x0, .LC74 add x0, x0, :lo12:.LC74 bl printf b .L59 .L63: ldr x0, [sp, 24] ldrb w0, [x0] cmp w0, 46 bne .L61 adrp x0, .LC75 add x0, x0, :lo12:.LC75 b .L62 .L61: adrp x0, .LC76 add x0, x0, :lo12:.LC76 .L62: mov x1, x0 adrp x0, .LC74 add x0, x0, :lo12:.LC74 bl printf ldr x0, [sp, 24] add x0, x0, 1 str x0, [sp, 24] .L60: ldr x0, [sp, 24] ldrb w0, [x0] cmp w0, 0 bne .L63 .L59: mov w0, 10 bl putchar nop ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE9: .size show, .-show .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "morse.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string " %s " .text .align 2 .global decode .type decode, %function decode: .LFB67: .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] stp x21, x22, [sp, 32] .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 mov x20, x0 mov x19, 0 adrp x21, .LANCHOR0 add x21, x21, :lo12:.LANCHOR0 .L4: mov x1, x20 ldr x0, [x21, x19, lsl 3] bl strcmp cbz w0, .L18 add x19, x19, 1 cmp x19, 10 bne .L4 mov x19, 0 adrp x21, .LANCHOR0 add x21, x21, :lo12:.LANCHOR0 add x21, x21, 80 .L6: mov x1, x20 ldr x0, [x21, x19, lsl 3] bl strcmp cbz w0, .L19 add x19, x19, 1 cmp x19, 26 bne .L6 adrp x0, .LANCHOR1 ldrb w21, [x0, #:lo12:.LANCHOR1] cbz w21, .L7 add x19, x0, :lo12:.LANCHOR1 add x19, x19, 8 .L9: mov x1, x20 ldr x0, [x19] bl strcmp cbz w0, .L20 add x19, x19, 16 ldrb w21, [x19, -8] cbnz w21, .L9 .L7: adrp x0, .LANCHOR1+288 ldr x21, [x0, #:lo12:.LANCHOR1+288] cbz x21, .L10 adrp x19, .LANCHOR1 add x19, x19, :lo12:.LANCHOR1 add x19, x19, 296 .L12: mov x1, x20 ldr x0, [x19] bl strcmp cbz w0, .L21 add x19, x19, 16 ldr x21, [x19, -8] cbnz x21, .L12 .L10: adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x1, [x0] mov w0, 120 bl putc b .L1 .L18: adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x1, [x0] add w0, w19, 48 bl putc b .L1 .L19: adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x1, [x0] add w0, w19, 65 bl putc .L1: ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L20: .cfi_restore_state adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x1, [x0] mov w0, w21 bl putc b .L1 .L21: mov x2, x21 adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk b .L1 .cfi_endproc .LFE67: .size decode, .-decode .section .rodata.str1.8 .align 3 .LC1: .string "dit" .align 3 .LC2: .string "daw" .align 3 .LC3: .string " %s" .text .align 2 .global show .type show, %function show: .LFB68: .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 adrp x0, .LANCHOR2 ldr w0, [x0, #:lo12:.LANCHOR2] cbnz w0, .L23 ldrb w2, [x19] cbz w2, .L25 stp x21, x22, [sp, 32] .cfi_offset 22, -24 .cfi_offset 21, -32 str x23, [sp, 48] .cfi_offset 23, -16 adrp x22, .LC2 add x22, x22, :lo12:.LC2 adrp x21, .LC1 add x21, x21, :lo12:.LC1 adrp x20, .LC3 add x20, x20, :lo12:.LC3 mov w23, 1 .L24: cmp w2, 46 csel x2, x21, x22, eq mov x1, x20 mov w0, w23 bl __printf_chk ldrb w2, [x19, 1]! cbnz w2, .L24 ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 ldr x23, [sp, 48] .cfi_restore 23 .L25: mov w0, 10 bl putchar ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 64 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L23: .cfi_restore_state mov x2, x19 adrp x1, .LC3 add x1, x1, :lo12:.LC3 mov w0, 1 bl __printf_chk b .L25 .cfi_endproc .LFE68: .size show, .-show .section .rodata.str1.8 .align 3 .LC4: .string "" .text .align 2 .global morse .type morse, %function morse: .LFB66: .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 w19, w0 bl __ctype_b_loc ldr x0, [x0] ldrh w0, [x0, w19, sxtw 1] tbz x0, 10, .L32 tst x0, 256 mov w1, 65 mov w0, 97 csel w1, w1, w0, ne adrp x0, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 sub w1, w19, w1 add x0, x0, 80 ldr x0, [x0, w1, sxtw 3] bl show .L31: ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .L32: .cfi_restore_state tbnz x0, 11, .L43 tbnz x0, 13, .L36 adrp x0, .LANCHOR1 ldrb w0, [x0, #:lo12:.LANCHOR1] cbz w0, .L31 adrp x1, .LANCHOR1 add x1, x1, :lo12:.LANCHOR1 add x1, x1, 16 mov w2, 0 .L39: cmp w0, w19 beq .L44 add w2, w2, 1 ldrb w0, [x1], 16 cbnz w0, .L39 b .L31 .L43: sub w19, w19, #48 adrp x0, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 ldr x0, [x0, w19, sxtw 3] bl show b .L31 .L36: adrp x0, .LC4 add x0, x0, :lo12:.LC4 bl show b .L31 .L44: adrp x0, .LANCHOR1 add x0, x0, :lo12:.LANCHOR1 add x2, x0, w2, sxtw 4 ldr x0, [x2, 8] bl show b .L31 .cfi_endproc .LFE66: .size morse, .-morse .section .rodata.str1.8 .align 3 .LC5: .string "stdio" .align 3 .LC6: .string "pledge" .align 3 .LC7: .string "usage: %s [-d | -s] [string ...]\n" .align 3 .LC8: .string "dsh" .align 3 .LC9: .string "...-.-" .text .align 2 .global main .type main, %function main: .LFB65: .cfi_startproc stp x29, x30, [sp, -128]! .cfi_def_cfa_offset 128 .cfi_offset 29, -128 .cfi_offset 30, -120 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] .cfi_offset 19, -112 .cfi_offset 20, -104 .cfi_offset 21, -96 .cfi_offset 22, -88 mov w21, w0 mov x19, x1 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, .LC5 add x0, x0, :lo12:.LC5 bl pledge cmn w0, #1 beq .L78 stp x23, x24, [sp, 48] .cfi_offset 24, -72 .cfi_offset 23, -80 adrp x20, .LC8 add x20, x20, :lo12:.LC8 adrp x22, .LANCHOR2 add x22, x22, :lo12:.LANCHOR2 mov w23, 1 .L46: mov x2, x20 mov x1, x19 mov w0, w21 bl getopt cmn w0, #1 beq .L82 cmp w0, 100 beq .L47 cmp w0, 115 beq .L48 adrp x0, :got:stderr ldr x0, [x0, #:got_lo12:stderr] ldr x19, [x0] bl getprogname mov w3, w0 adrp x2, .LC7 add x2, x2, :lo12:.LC7 mov w1, 1 mov x0, x19 bl __fprintf_chk mov w21, 1 .L45: adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x2, [sp, 120] ldr x1, [x0] subs x2, x2, x1 mov x1, 0 bne .L83 mov w0, w21 ldp x23, x24, [sp, 48] .cfi_restore 24 .cfi_restore 23 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 128 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L78: .cfi_restore_state stp x23, x24, [sp, 48] .cfi_offset 24, -72 .cfi_offset 23, -80 stp x25, x26, [sp, 64] .cfi_offset 26, -56 .cfi_offset 25, -64 str x27, [sp, 80] .cfi_offset 27, -48 adrp x1, .LC6 add x1, x1, :lo12:.LC6 mov w0, 1 bl err .L47: .cfi_restore 25 .cfi_restore 26 .cfi_restore 27 str w23, [x22, 4] b .L46 .L48: str w23, [x22] b .L46 .L82: adrp x0, :got:optind ldr x0, [x0, #:got_lo12:optind] ldrsw x20, [x0] lsl x0, x20, 3 add x20, x19, x20, lsl 3 adrp x1, .LANCHOR2+4 ldr w21, [x1, #:lo12:.LANCHOR2+4] cbz w21, .L53 ldr x0, [x19, x0] cbz x0, .L69 .L55: ldr x0, [x20] bl decode ldr x0, [x20, 8]! cbnz x0, .L55 .L56: adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x1, [x0] mov w0, 10 bl putc mov w21, 0 b .L45 .L86: .cfi_offset 25, -64 .cfi_offset 26, -56 .cfi_offset 27, -48 add w0, w20, 1 add x1, sp, 104 strb w19, [x1, w20, sxtw] mov w20, w0 cmp w0, 10 beq .L84 .L54: ldr x0, [x21] bl getc mov w19, w0 cmn w0, #1 beq .L85 sub w0, w19, #45 cmp w0, 1 bls .L86 cbnz w20, .L87 bl __ctype_b_loc ldr x0, [x0] ldrh w0, [x0, w19, sxtw 1] tbz x0, 13, .L54 cbnz w22, .L88 mov w20, w22 mov w22, w24 b .L54 .L84: ldr x0, [x23, #:got_lo12:stdout] ldr x1, [x0] mov w0, 120 bl putc ldr x19, [x25, #:got_lo12:stdin] .L59: ldr x0, [x19] bl getc sub w0, w0, #45 cmp w0, 1 bls .L59 mov w20, 0 mov w22, w24 b .L54 .L87: add x0, sp, 104 strb wzr, [x0, w20, sxtw] bl decode mov w20, 0 mov w22, 0 b .L54 .L88: ldr x1, [x27] mov w0, w26 bl putc mov w22, w20 b .L54 .L69: .cfi_restore 25 .cfi_restore 26 .cfi_restore 27 stp x25, x26, [sp, 64] .cfi_offset 26, -56 .cfi_offset 25, -64 str x27, [sp, 80] .cfi_offset 27, -48 mov w20, 0 mov w22, 0 adrp x25, :got:stdin ldr x21, [x25, #:got_lo12:stdin] mov w24, 1 adrp x23, :got:stdout ldr x27, [x23, #:got_lo12:stdout] mov w26, 32 b .L54 .L85: ldp x25, x26, [sp, 64] .cfi_restore 26 .cfi_restore 25 ldr x27, [sp, 80] .cfi_restore 27 b .L56 .L53: ldr x0, [x19, x0] cbz x0, .L89 adrp x22, .LC4 add x22, x22, :lo12:.LC4 .L65: ldr x19, [x20] ldrb w0, [x19] cbz w0, .L63 .L64: bl morse ldrb w0, [x19, 1]! cbnz w0, .L64 .L63: mov x0, x22 bl show ldr x0, [x20, 8]! cbnz x0, .L65 .L66: adrp x0, .LC9 add x0, x0, :lo12:.LC9 bl show b .L45 .L89: adrp x19, :got:stdin ldr x19, [x19, #:got_lo12:stdin] b .L62 .L67: bl morse .L62: ldr x0, [x19] bl getc cmn w0, #1 bne .L67 b .L66 .L83: stp x25, x26, [sp, 64] .cfi_offset 26, -56 .cfi_offset 25, -64 str x27, [sp, 80] .cfi_offset 27, -48 bl __stack_chk_fail .cfi_endproc .LFE65: .size main, .-main .global ps .section .rodata.str1.8 .align 3 .LC10: .string "<AS>" .align 3 .LC11: .string ".-..." .align 3 .LC12: .string "<CL>" .align 3 .LC13: .string "-.-..-.." .align 3 .LC14: .string "<CT>" .align 3 .LC15: .string "-.-.-" .align 3 .LC16: .string "<EE5>" .align 3 .LC17: .string "......" .align 3 .LC18: .string "......." .align 3 .LC19: .string "........" .align 3 .LC20: .string "<SK>" .align 3 .LC21: .string "<SN>" .align 3 .LC22: .string "...-." .align 3 .LC23: .string "<SOS>" .align 3 .LC24: .string "...---..." .global other .align 3 .LC25: .string "..-.." .align 3 .LC26: .string "--..--" .align 3 .LC27: .string ".-.-.-" .align 3 .LC28: .string "..--.." .align 3 .LC29: .string "-..-." .align 3 .LC30: .string "-....-" .align 3 .LC31: .string "---..." .align 3 .LC32: .string "-.-.-." .align 3 .LC33: .string "-.--." .align 3 .LC34: .string "-.--.-" .align 3 .LC35: .string ".-..-." .align 3 .LC36: .string ".----." .align 3 .LC37: .string ".-.-." .align 3 .LC38: .string "-...-" .align 3 .LC39: .string ".--.-." .align 3 .LC40: .string ".-.-" .align 3 .LC41: .string ".-" .align 3 .LC42: .string "-..." .align 3 .LC43: .string "-.-." .align 3 .LC44: .string "-.." .align 3 .LC45: .string "." .align 3 .LC46: .string "..-." .align 3 .LC47: .string "--." .align 3 .LC48: .string "...." .align 3 .LC49: .string ".." .align 3 .LC50: .string ".---" .align 3 .LC51: .string "-.-" .align 3 .LC52: .string ".-.." .align 3 .LC53: .string "--" .align 3 .LC54: .string "-." .align 3 .LC55: .string "---" .align 3 .LC56: .string ".--." .align 3 .LC57: .string "--.-" .align 3 .LC58: .string ".-." .align 3 .LC59: .string "..." .align 3 .LC60: .string "-" .align 3 .LC61: .string "..-" .align 3 .LC62: .string "...-" .align 3 .LC63: .string ".--" .align 3 .LC64: .string "-..-" .align 3 .LC65: .string "-.--" .align 3 .LC66: .string "--.." .align 3 .LC67: .string "-----" .align 3 .LC68: .string ".----" .align 3 .LC69: .string "..---" .align 3 .LC70: .string "...--" .align 3 .LC71: .string "....-" .align 3 .LC72: .string "....." .align 3 .LC73: .string "-...." .align 3 .LC74: .string "--..." .align 3 .LC75: .string "---.." .align 3 .LC76: .string "----." .bss .align 2 .set .LANCHOR2,. + 0 .type sflag, %object .size sflag, 4 sflag: .zero 4 .type dflag, %object .size dflag, 4 dflag: .zero 4 .section .data.rel.local,"aw" .align 3 .set .LANCHOR1,. + 0 .type other, %object .size other, 288 other: .byte 101 .zero 7 .xword .LC25 .byte 44 .zero 7 .xword .LC26 .byte 46 .zero 7 .xword .LC27 .byte 63 .zero 7 .xword .LC28 .byte 47 .zero 7 .xword .LC29 .byte 45 .zero 7 .xword .LC30 .byte 58 .zero 7 .xword .LC31 .byte 59 .zero 7 .xword .LC32 .byte 40 .zero 7 .xword .LC33 .byte 41 .zero 7 .xword .LC34 .byte 34 .zero 7 .xword .LC35 .byte 96 .zero 7 .xword .LC35 .byte 39 .zero 7 .xword .LC36 .byte 43 .zero 7 .xword .LC37 .byte 61 .zero 7 .xword .LC38 .byte 64 .zero 7 .xword .LC39 .byte 10 .zero 7 .xword .LC40 .byte 0 .zero 7 .xword 0 .type ps, %object .size ps, 160 ps: .xword .LC10 .xword .LC11 .xword .LC12 .xword .LC13 .xword .LC14 .xword .LC15 .xword .LC16 .xword .LC17 .xword .LC16 .xword .LC18 .xword .LC16 .xword .LC19 .xword .LC20 .xword .LC9 .xword .LC21 .xword .LC22 .xword .LC23 .xword .LC24 .xword 0 .xword 0 .section .data.rel.ro.local,"aw" .align 3 .set .LANCHOR0,. + 0 .type digit, %object .size digit, 80 digit: .xword .LC67 .xword .LC68 .xword .LC69 .xword .LC70 .xword .LC71 .xword .LC72 .xword .LC73 .xword .LC74 .xword .LC75 .xword .LC76 .type alph, %object .size alph, 208 alph: .xword .LC41 .xword .LC42 .xword .LC43 .xword .LC44 .xword .LC45 .xword .LC46 .xword .LC47 .xword .LC48 .xword .LC49 .xword .LC50 .xword .LC51 .xword .LC52 .xword .LC53 .xword .LC54 .xword .LC55 .xword .LC56 .xword .LC57 .xword .LC58 .xword .LC59 .xword .LC60 .xword .LC61 .xword .LC62 .xword .LC63 .xword .LC64 .xword .LC65 .xword .LC66 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "morse.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "-----" .align 3 .LC1: .string ".-" .align 3 .LC2: .string " %s " .text .align 2 .p2align 4,,11 .global decode .type decode, %function decode: .LFB67: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LC0 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x20, x0 mov x19, 0 add x0, x1, :lo12:.LC0 stp x21, x22, [sp, 32] .cfi_offset 21, -16 .cfi_offset 22, -8 adrp x21, .LANCHOR0 add x21, x21, :lo12:.LANCHOR0 b .L4 .p2align 2,,3 .L26: ldr x0, [x21, x19, lsl 3] .L4: mov w22, w19 mov x1, x20 add x19, x19, 1 bl strcmp cbz w0, .L25 cmp x19, 10 bne .L26 adrp x21, .LANCHOR0 add x21, x21, :lo12:.LANCHOR0 adrp x0, .LC1 add x21, x21, 80 add x0, x0, :lo12:.LC1 mov x19, 0 b .L3 .p2align 2,,3 .L5: cmp x19, 26 beq .L6 ldr x0, [x21, x19, lsl 3] .L3: mov w22, w19 mov x1, x20 add x19, x19, 1 bl strcmp cbnz w0, .L5 add w0, w22, 65 adrp x1, :got:stdout .L23: ldr x1, [x1, #:got_lo12:stdout] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ldr x1, [x1] b putc .p2align 2,,3 .L25: .cfi_restore_state adrp x1, :got:stdout add w0, w22, 48 ldp x19, x20, [sp, 16] ldr x1, [x1, #:got_lo12:stdout] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ldr x1, [x1] b putc .p2align 2,,3 .L6: .cfi_restore_state adrp x21, .LANCHOR1 add x19, x21, :lo12:.LANCHOR1 ldrb w22, [x21, #:lo12:.LANCHOR1] cbz w22, .L7 add x19, x19, 8 b .L9 .p2align 2,,3 .L8: ldrb w22, [x19, -8] cbz w22, .L7 .L9: ldr x0, [x19] mov x1, x20 add x19, x19, 16 bl strcmp cbnz w0, .L8 adrp x1, :got:stdout mov w0, w22 ldp x19, x20, [sp, 16] ldr x1, [x1, #:got_lo12:stdout] ldp x21, x22, [sp, 32] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ldr x1, [x1] b putc .p2align 2,,3 .L7: .cfi_restore_state add x19, x21, :lo12:.LANCHOR1 ldr x21, [x19, 288] cbz x21, .L10 add x19, x19, 296 b .L12 .p2align 2,,3 .L11: ldr x21, [x19, -8] cbz x21, .L10 .L12: ldr x0, [x19] mov x1, x20 add x19, x19, 16 bl strcmp cbnz w0, .L11 mov x2, x21 adrp x1, .LC2 ldp x19, x20, [sp, 16] add x1, x1, :lo12:.LC2 ldp x21, x22, [sp, 32] mov w0, 1 ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b __printf_chk .L10: .cfi_restore_state adrp x1, :got:stdout mov w0, 120 b .L23 .cfi_endproc .LFE67: .size decode, .-decode .section .rodata.str1.8 .align 3 .LC3: .string "dit" .align 3 .LC4: .string "daw" .align 3 .LC5: .string " %s" .text .align 2 .p2align 4,,11 .global show .type show, %function show: .LFB68: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LANCHOR2 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x19, x0 ldr w0, [x1, #:lo12:.LANCHOR2] cbnz w0, .L28 ldrb w2, [x19] adrp x20, .LC5 cbz w2, .L31 add x20, x20, :lo12:.LC5 stp x21, x22, [sp, 32] .cfi_offset 22, -8 .cfi_offset 21, -16 adrp x22, .LC4 adrp x21, .LC3 add x22, x22, :lo12:.LC4 add x21, x21, :lo12:.LC3 .p2align 3,,7 .L29: cmp w2, 46 mov x1, x20 csel x2, x21, x22, eq mov w0, 1 bl __printf_chk ldrb w2, [x19, 1]! cbnz w2, .L29 ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 .L31: mov w0, 10 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b putchar .p2align 2,,3 .L28: .cfi_restore_state mov x2, x19 adrp x1, .LC5 mov w0, 1 add x1, x1, :lo12:.LC5 bl __printf_chk ldp x19, x20, [sp, 16] mov w0, 10 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b putchar .cfi_endproc .LFE68: .size show, .-show .section .rodata.str1.8 .align 3 .LC6: .string "" .text .align 2 .p2align 4,,11 .global morse .type morse, %function morse: .LFB66: .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 w19, w0 bl __ctype_b_loc ldr x0, [x0] ldrh w0, [x0, w19, sxtw 1] tbz x0, 10, .L39 tst x0, 256 mov w2, 97 mov w1, 65 adrp x0, .LANCHOR0 csel w1, w1, w2, ne add x0, x0, :lo12:.LANCHOR0 sub w19, w19, w1 add x0, x0, 80 ldr x0, [x0, w19, sxtw 3] ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 b show .p2align 2,,3 .L39: .cfi_restore_state tbnz x0, 11, .L51 tbnz x0, 13, .L42 adrp x3, .LANCHOR1 add x1, x3, :lo12:.LANCHOR1 add x1, x1, 16 mov w2, 0 ldrb w0, [x3, #:lo12:.LANCHOR1] cbnz w0, .L46 b .L38 .p2align 2,,3 .L45: ldrb w0, [x1], 16 add w2, w2, 1 cbz w0, .L38 .L46: cmp w0, w19 bne .L45 add x3, x3, :lo12:.LANCHOR1 add x2, x3, w2, sxtw 4 ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ldr x0, [x2, 8] b show .p2align 2,,3 .L51: .cfi_restore_state sub w19, w19, #48 adrp x0, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 ldr x0, [x0, w19, sxtw 3] ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 b show .p2align 2,,3 .L38: .cfi_restore_state ldr x19, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L42: .cfi_restore_state ldr x19, [sp, 16] adrp x0, .LC6 ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_def_cfa_offset 0 add x0, x0, :lo12:.LC6 b show .cfi_endproc .LFE66: .size morse, .-morse .section .rodata.str1.8 .align 3 .LC7: .string "stdio" .align 3 .LC8: .string "pledge" .align 3 .LC9: .string "usage: %s [-d | -s] [string ...]\n" .align 3 .LC10: .string "dsh" .align 3 .LC11: .string "...-.-" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB65: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 adrp x2, :got:__stack_chk_guard mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] .cfi_offset 19, -96 .cfi_offset 20, -88 mov x19, x1 stp x21, x22, [sp, 32] mov x1, 0 .cfi_offset 21, -80 .cfi_offset 22, -72 mov w21, w0 ldr x3, [x2] str x3, [sp, 104] mov x3, 0 adrp x0, .LC7 add x0, x0, :lo12:.LC7 bl pledge stp x23, x24, [sp, 48] .cfi_offset 24, -56 .cfi_offset 23, -64 cmn w0, #1 beq .L93 adrp x20, .LC10 adrp x22, .LANCHOR2 add x20, x20, :lo12:.LC10 add x22, x22, :lo12:.LANCHOR2 mov w23, 1 .L53: mov x2, x20 mov x1, x19 mov w0, w21 bl getopt cmn w0, #1 beq .L96 .L59: cmp w0, 100 beq .L54 cmp w0, 115 beq .L55 adrp x0, :got:stderr mov w21, 1 ldr x0, [x0, #:got_lo12:stderr] ldr x19, [x0] bl getprogname adrp x2, .LC9 mov w3, w0 add x2, x2, :lo12:.LC9 mov x0, x19 mov w1, w21 bl __fprintf_chk .L52: 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 bne .L97 mov w0, w21 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] .cfi_remember_state .cfi_restore 24 .cfi_restore 23 ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L54: .cfi_restore_state mov x2, x20 mov x1, x19 mov w0, w21 str w23, [x22, 4] bl getopt cmn w0, #1 bne .L59 .L96: adrp x0, :got:optind adrp x1, .LANCHOR2+4 ldr x0, [x0, #:got_lo12:optind] ldr w21, [x1, #:lo12:.LANCHOR2+4] ldrsw x0, [x0] add x20, x19, x0, lsl 3 ldr x0, [x19, x0, lsl 3] cbz w21, .L60 cbz x0, .L77 .L62: ldr x0, [x20] bl decode ldr x0, [x20, 8]! cbnz x0, .L62 adrp x21, :got:stdout .L63: ldr x1, [x21, #:got_lo12:stdout] mov w0, 10 mov w21, 0 ldr x1, [x1] bl putc b .L52 .p2align 2,,3 .L55: str w23, [x22] b .L53 .L60: cbz x0, .L81 adrp x22, .LC6 add x22, x22, :lo12:.LC6 .L72: ldr x19, [x20] ldrb w0, [x19] cbz w0, .L74 .p2align 3,,7 .L71: bl morse ldrb w0, [x19, 1]! cbnz w0, .L71 .L74: mov x0, x22 bl show ldr x0, [x20, 8]! cbnz x0, .L72 .L73: adrp x0, .LC11 add x0, x0, :lo12:.LC11 bl show b .L52 .L77: adrp x21, :got:stdout adrp x22, :got:stdin stp x25, x26, [sp, 64] .cfi_offset 26, -40 .cfi_offset 25, -48 add x24, sp, 88 mov w20, 0 ldr x25, [x21, #:got_lo12:stdout] mov w26, 0 ldr x23, [x22, #:got_lo12:stdin] .L61: ldr x0, [x23] bl getc mov w19, w0 cmn w0, #1 beq .L98 sub w0, w19, #45 cmp w0, 1 bls .L99 cbnz w20, .L100 bl __ctype_b_loc ldr x0, [x0] ldrh w0, [x0, w19, sxtw 1] tbz x0, 13, .L61 cbnz w26, .L101 .L68: mov w20, 0 mov w26, 1 b .L61 .L99: strb w19, [x24, w20, sxtw] add w20, w20, 1 cmp w20, 10 bne .L61 ldr x1, [x21, #:got_lo12:stdout] mov w0, 120 ldr x1, [x1] bl putc ldr x19, [x22, #:got_lo12:stdin] .L66: ldr x0, [x19] bl getc sub w0, w0, #45 cmp w0, 1 bls .L66 b .L68 .L100: mov x0, x24 mov w26, 0 strb wzr, [x24, w20, sxtw] mov w20, 0 bl decode b .L61 .L98: ldp x25, x26, [sp, 64] .cfi_restore 26 .cfi_restore 25 b .L63 .L81: adrp x22, :got:stdin ldr x22, [x22, #:got_lo12:stdin] b .L70 .L75: bl morse .L70: ldr x0, [x22] bl getc cmn w0, #1 bne .L75 b .L73 .L101: .cfi_offset 25, -48 .cfi_offset 26, -40 ldr x1, [x25] mov w26, 0 mov w0, 32 bl putc b .L61 .L97: .cfi_restore 25 .cfi_restore 26 stp x25, x26, [sp, 64] .cfi_remember_state .cfi_offset 26, -40 .cfi_offset 25, -48 bl __stack_chk_fail .L93: .cfi_restore_state adrp x1, .LC8 mov w0, 1 add x1, x1, :lo12:.LC8 stp x25, x26, [sp, 64] .cfi_offset 26, -40 .cfi_offset 25, -48 bl err .cfi_endproc .LFE65: .size main, .-main .global ps .section .rodata.str1.8 .align 3 .LC12: .string "<AS>" .align 3 .LC13: .string ".-..." .align 3 .LC14: .string "<CL>" .align 3 .LC15: .string "-.-..-.." .align 3 .LC16: .string "<CT>" .align 3 .LC17: .string "-.-.-" .align 3 .LC18: .string "<EE5>" .align 3 .LC19: .string "......" .align 3 .LC20: .string "......." .align 3 .LC21: .string "........" .align 3 .LC22: .string "<SK>" .align 3 .LC23: .string "<SN>" .align 3 .LC24: .string "...-." .align 3 .LC25: .string "<SOS>" .align 3 .LC26: .string "...---..." .global other .align 3 .LC27: .string "..-.." .align 3 .LC28: .string "--..--" .align 3 .LC29: .string ".-.-.-" .align 3 .LC30: .string "..--.." .align 3 .LC31: .string "-..-." .align 3 .LC32: .string "-....-" .align 3 .LC33: .string "---..." .align 3 .LC34: .string "-.-.-." .align 3 .LC35: .string "-.--." .align 3 .LC36: .string "-.--.-" .align 3 .LC37: .string ".-..-." .align 3 .LC38: .string ".----." .align 3 .LC39: .string ".-.-." .align 3 .LC40: .string "-...-" .align 3 .LC41: .string ".--.-." .align 3 .LC42: .string ".-.-" .align 3 .LC43: .string "-..." .align 3 .LC44: .string "-.-." .align 3 .LC45: .string "-.." .align 3 .LC46: .string "." .align 3 .LC47: .string "..-." .align 3 .LC48: .string "--." .align 3 .LC49: .string "...." .align 3 .LC50: .string ".." .align 3 .LC51: .string ".---" .align 3 .LC52: .string "-.-" .align 3 .LC53: .string ".-.." .align 3 .LC54: .string "--" .align 3 .LC55: .string "-." .align 3 .LC56: .string "---" .align 3 .LC57: .string ".--." .align 3 .LC58: .string "--.-" .align 3 .LC59: .string ".-." .align 3 .LC60: .string "..." .align 3 .LC61: .string "-" .align 3 .LC62: .string "..-" .align 3 .LC63: .string "...-" .align 3 .LC64: .string ".--" .align 3 .LC65: .string "-..-" .align 3 .LC66: .string "-.--" .align 3 .LC67: .string "--.." .align 3 .LC68: .string ".----" .align 3 .LC69: .string "..---" .align 3 .LC70: .string "...--" .align 3 .LC71: .string "....-" .align 3 .LC72: .string "....." .align 3 .LC73: .string "-...." .align 3 .LC74: .string "--..." .align 3 .LC75: .string "---.." .align 3 .LC76: .string "----." .bss .align 2 .set .LANCHOR2,. + 0 .type sflag, %object .size sflag, 4 sflag: .zero 4 .type dflag, %object .size dflag, 4 dflag: .zero 4 .section .data.rel.local,"aw" .align 3 .set .LANCHOR1,. + 0 .type other, %object .size other, 288 other: .byte 101 .zero 7 .xword .LC27 .byte 44 .zero 7 .xword .LC28 .byte 46 .zero 7 .xword .LC29 .byte 63 .zero 7 .xword .LC30 .byte 47 .zero 7 .xword .LC31 .byte 45 .zero 7 .xword .LC32 .byte 58 .zero 7 .xword .LC33 .byte 59 .zero 7 .xword .LC34 .byte 40 .zero 7 .xword .LC35 .byte 41 .zero 7 .xword .LC36 .byte 34 .zero 7 .xword .LC37 .byte 96 .zero 7 .xword .LC37 .byte 39 .zero 7 .xword .LC38 .byte 43 .zero 7 .xword .LC39 .byte 61 .zero 7 .xword .LC40 .byte 64 .zero 7 .xword .LC41 .byte 10 .zero 7 .xword .LC42 .byte 0 .zero 7 .xword 0 .type ps, %object .size ps, 160 ps: .xword .LC12 .xword .LC13 .xword .LC14 .xword .LC15 .xword .LC16 .xword .LC17 .xword .LC18 .xword .LC19 .xword .LC18 .xword .LC20 .xword .LC18 .xword .LC21 .xword .LC22 .xword .LC11 .xword .LC23 .xword .LC24 .xword .LC25 .xword .LC26 .xword 0 .xword 0 .section .data.rel.ro.local,"aw" .align 3 .set .LANCHOR0,. + 0 .type digit, %object .size digit, 80 digit: .xword .LC0 .xword .LC68 .xword .LC69 .xword .LC70 .xword .LC71 .xword .LC72 .xword .LC73 .xword .LC74 .xword .LC75 .xword .LC76 .type alph, %object .size alph, 208 alph: .xword .LC1 .xword .LC43 .xword .LC44 .xword .LC45 .xword .LC46 .xword .LC47 .xword .LC48 .xword .LC49 .xword .LC50 .xword .LC51 .xword .LC52 .xword .LC53 .xword .LC54 .xword .LC55 .xword .LC56 .xword .LC57 .xword .LC58 .xword .LC59 .xword .LC60 .xword .LC61 .xword .LC62 .xword .LC63 .xword .LC64 .xword .LC65 .xword .LC66 .xword .LC67 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "morse.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string " %s" .align 3 .LC1: .string "dit" .align 3 .LC2: .string "daw" .align 3 .LC3: .string "" .text .align 2 .p2align 4,,11 .global morse .type morse, %function morse: .LFB66: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov w19, w0 bl __ctype_b_loc ldr x0, [x0] ldrh w0, [x0, w19, sxtw 1] tbz x0, 10, .L2 adrp x1, .LANCHOR1 tst x0, 256 mov w2, 97 mov w0, 65 ldr w1, [x1, #:lo12:.LANCHOR1] csel w0, w0, w2, ne sub w19, w19, w0 adrp x0, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 ldr x20, [x0, w19, sxtw 3] cbnz w1, .L19 ldrb w3, [x20] adrp x19, .LC0 cbz w3, .L7 add x19, x19, :lo12:.LC0 stp x21, x22, [sp, 32] .cfi_offset 22, -8 .cfi_offset 21, -16 adrp x21, .LC2 adrp x22, .LC1 add x21, x21, :lo12:.LC2 add x22, x22, :lo12:.LC1 .p2align 3,,7 .L5: mov x2, x21 mov x1, x19 mov w0, 1 cmp w3, 46 beq .L50 bl __printf_chk ldrb w3, [x20, 1]! cbnz w3, .L5 .L46: ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 .L7: mov w0, 10 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b putchar .p2align 2,,3 .L2: .cfi_restore_state tbnz x0, 11, .L51 tbnz x0, 13, .L15 adrp x3, .LANCHOR2 add x1, x3, :lo12:.LANCHOR2 add x1, x1, 16 mov w2, 0 ldrb w0, [x3, #:lo12:.LANCHOR2] cbnz w0, .L23 b .L1 .p2align 2,,3 .L18: ldrb w0, [x1], 16 add w2, w2, 1 cbz w0, .L1 .L23: cmp w0, w19 bne .L18 adrp x0, .LANCHOR1 add x3, x3, :lo12:.LANCHOR2 add x2, x3, w2, sxtw 4 ldr w0, [x0, #:lo12:.LANCHOR1] ldr x20, [x2, 8] cbnz w0, .L19 ldrb w3, [x20] adrp x19, .LC0 cbz w3, .L7 add x19, x19, :lo12:.LC0 stp x21, x22, [sp, 32] .cfi_offset 22, -8 .cfi_offset 21, -16 adrp x21, .LC2 adrp x22, .LC1 add x21, x21, :lo12:.LC2 add x22, x22, :lo12:.LC1 .L20: mov x2, x21 mov x1, x19 mov w0, 1 cmp w3, 46 beq .L52 .L21: bl __printf_chk ldrb w3, [x20, 1]! cbz w3, .L46 mov x2, x21 mov x1, x19 mov w0, 1 cmp w3, 46 bne .L21 .L52: mov x2, x22 bl __printf_chk ldrb w3, [x20, 1]! cbnz w3, .L20 b .L46 .p2align 2,,3 .L19: .cfi_restore 21 .cfi_restore 22 mov x2, x20 adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldp x19, x20, [sp, 16] mov w0, 10 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b putchar .p2align 2,,3 .L50: .cfi_def_cfa_offset 48 .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x2, x22 bl __printf_chk ldrb w3, [x20, 1]! cbnz w3, .L5 b .L46 .p2align 2,,3 .L51: .cfi_restore 21 .cfi_restore 22 adrp x1, .LANCHOR1 adrp x0, .LANCHOR0 add x0, x0, :lo12:.LANCHOR0 sub w19, w19, #48 ldr w1, [x1, #:lo12:.LANCHOR1] add x0, x0, 208 ldr x20, [x0, w19, sxtw 3] cbnz w1, .L19 ldrb w3, [x20] adrp x19, .LC0 cbz w3, .L7 add x19, x19, :lo12:.LC0 stp x21, x22, [sp, 32] .cfi_offset 22, -8 .cfi_offset 21, -16 adrp x21, .LC2 adrp x22, .LC1 add x21, x21, :lo12:.LC2 add x22, x22, :lo12:.LC1 .L12: mov x2, x21 mov x1, x19 mov w0, 1 cmp w3, 46 beq .L53 .L13: bl __printf_chk ldrb w3, [x20, 1]! cbz w3, .L46 mov x2, x21 mov x1, x19 mov w0, 1 cmp w3, 46 bne .L13 .L53: mov x2, x22 bl __printf_chk ldrb w3, [x20, 1]! cbnz w3, .L12 b .L46 .p2align 2,,3 .L1: .cfi_restore 21 .cfi_restore 22 ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 48 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L15: .cfi_restore_state adrp x0, .LANCHOR1 ldr w0, [x0, #:lo12:.LANCHOR1] cbz w0, .L7 adrp x2, .LC3 adrp x1, .LC0 add x2, x2, :lo12:.LC3 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk b .L7 .cfi_endproc .LFE66: .size morse, .-morse .section .rodata.str1.8 .align 3 .LC4: .string "-----" .align 3 .LC5: .string ".----" .align 3 .LC6: .string "..---" .align 3 .LC7: .string "...--" .align 3 .LC8: .string "....-" .align 3 .LC9: .string "....." .align 3 .LC10: .string "-...." .align 3 .LC11: .string "--..." .align 3 .LC12: .string "---.." .align 3 .LC13: .string "----." .align 3 .LC14: .string " %s " .text .align 2 .p2align 4,,11 .global decode .type decode, %function decode: .LFB67: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LC4 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x20, x0 add x0, x1, :lo12:.LC4 mov x1, x20 bl strcmp cbz w0, .L55 adrp x0, .LC5 mov x1, x20 add x0, x0, :lo12:.LC5 bl strcmp cbz w0, .L63 adrp x0, .LC6 mov x1, x20 add x0, x0, :lo12:.LC6 bl strcmp cbz w0, .L64 adrp x0, .LC7 mov x1, x20 add x0, x0, :lo12:.LC7 bl strcmp cbz w0, .L65 adrp x0, .LC8 mov x1, x20 add x0, x0, :lo12:.LC8 bl strcmp cbz w0, .L66 adrp x0, .LC9 mov x1, x20 add x0, x0, :lo12:.LC9 bl strcmp cbz w0, .L67 adrp x0, .LC10 mov x1, x20 add x0, x0, :lo12:.LC10 bl strcmp cbz w0, .L68 adrp x0, .LC11 mov x1, x20 add x0, x0, :lo12:.LC11 bl strcmp cbz w0, .L69 adrp x0, .LC12 mov x1, x20 add x0, x0, :lo12:.LC12 bl strcmp cbz w0, .L70 mov x1, x20 adrp x0, .LC13 mov x19, 0 add x0, x0, :lo12:.LC13 stp x21, x22, [sp, 32] .cfi_offset 22, -8 .cfi_offset 21, -16 adrp x21, .LANCHOR0 bl strcmp add x21, x21, :lo12:.LANCHOR0 cbnz w0, .L56 b .L140 .p2align 2,,3 .L57: cmp x19, 26 beq .L141 .L56: ldr x0, [x21, x19, lsl 3] mov w22, w19 mov x1, x20 add x19, x19, 1 bl strcmp cbnz w0, .L57 add w0, w22, 65 adrp x1, :got:stdout .L139: ldr x1, [x1, #:got_lo12:stdout] ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ldr x1, [x1] b putc .L63: .cfi_def_cfa_offset 48 .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 29, -48 .cfi_offset 30, -40 mov w0, 1 .L55: adrp x1, :got:stdout add w0, w0, 48 ldp x19, x20, [sp, 16] ldr x1, [x1, #:got_lo12:stdout] ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ldr x1, [x1] b putc .p2align 2,,3 .L141: .cfi_def_cfa_offset 48 .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x22, .LANCHOR2 add x19, x22, :lo12:.LANCHOR2 ldrb w21, [x22, #:lo12:.LANCHOR2] cbz w21, .L58 add x19, x19, 8 b .L60 .p2align 2,,3 .L59: ldrb w21, [x19, -8] cbz w21, .L58 .L60: ldr x0, [x19] mov x1, x20 add x19, x19, 16 bl strcmp cbnz w0, .L59 adrp x1, :got:stdout mov w0, w21 ldp x19, x20, [sp, 16] ldr x1, [x1, #:got_lo12:stdout] ldp x21, x22, [sp, 32] .cfi_remember_state .cfi_restore 22 .cfi_restore 21 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ldr x1, [x1] b putc .p2align 2,,3 .L58: .cfi_restore_state add x0, x22, :lo12:.LANCHOR2 add x19, x0, 288 ldr x21, [x0, 288] cbz x21, .L61 ldr x0, [x0, 296] mov x1, x20 bl strcmp cbz w0, .L62 ldr x21, [x19, 16] cbz x21, .L61 ldr x0, [x19, 24] mov x1, x20 bl strcmp cbz w0, .L62 ldr x21, [x19, 32] cbz x21, .L61 ldr x0, [x19, 40] mov x1, x20 bl strcmp cbz w0, .L62 ldr x21, [x19, 48] cbz x21, .L61 ldr x0, [x19, 56] mov x1, x20 bl strcmp cbz w0, .L62 ldr x21, [x19, 64] cbz x21, .L61 ldr x0, [x19, 72] mov x1, x20 bl strcmp cbz w0, .L62 add x19, x22, :lo12:.LANCHOR2 add x19, x19, 288 ldr x21, [x19, 80] cbz x21, .L61 ldr x0, [x19, 88] mov x1, x20 bl strcmp cbz w0, .L62 ldr x21, [x19, 96] cbz x21, .L61 ldr x0, [x19, 104] mov x1, x20 bl strcmp cbz w0, .L62 ldr x21, [x19, 112] cbz x21, .L61 ldr x0, [x19, 120] mov x1, x20 bl strcmp cbz w0, .L62 ldr x21, [x19, 128] cbz x21, .L61 ldr x0, [x19, 136] mov x1, x20 bl strcmp cbz w0, .L62 ldr x21, [x19, 144] cbz x21, .L61 .L62: mov x2, x21 adrp x1, .LC14 ldp x19, x20, [sp, 16] add x1, x1, :lo12:.LC14 ldp x21, x22, [sp, 32] .cfi_remember_state .cfi_restore 22 .cfi_restore 21 mov w0, 1 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b __printf_chk .L61: .cfi_restore_state adrp x1, :got:stdout mov w0, 120 b .L139 .L64: .cfi_restore 21 .cfi_restore 22 mov w0, 2 b .L55 .L65: mov w0, 3 b .L55 .L66: mov w0, 4 b .L55 .L67: mov w0, 5 b .L55 .L68: mov w0, 6 b .L55 .L69: mov w0, 7 b .L55 .L70: mov w0, 8 b .L55 .L140: .cfi_offset 21, -16 .cfi_offset 22, -8 mov w0, 9 ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 b .L55 .cfi_endproc .LFE67: .size decode, .-decode .align 2 .p2align 4,,11 .global show .type show, %function show: .LFB68: .cfi_startproc stp x29, x30, [sp, -48]! .cfi_def_cfa_offset 48 .cfi_offset 29, -48 .cfi_offset 30, -40 adrp x1, .LANCHOR1 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -32 .cfi_offset 20, -24 mov x19, x0 ldr w0, [x1, #:lo12:.LANCHOR1] cbnz w0, .L143 ldrb w3, [x19] adrp x20, .LC0 cbz w3, .L146 add x20, x20, :lo12:.LC0 stp x21, x22, [sp, 32] .cfi_offset 22, -8 .cfi_offset 21, -16 adrp x21, .LC2 adrp x22, .LC1 add x21, x21, :lo12:.LC2 add x22, x22, :lo12:.LC1 .p2align 3,,7 .L144: mov x2, x21 mov x1, x20 mov w0, 1 cmp w3, 46 beq .L156 bl __printf_chk ldrb w3, [x19, 1]! cbnz w3, .L144 .L155: ldp x21, x22, [sp, 32] .cfi_restore 22 .cfi_restore 21 .L146: mov w0, 10 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 b putchar .p2align 2,,3 .L156: .cfi_def_cfa_offset 48 .cfi_offset 19, -32 .cfi_offset 20, -24 .cfi_offset 21, -16 .cfi_offset 22, -8 .cfi_offset 29, -48 .cfi_offset 30, -40 mov x2, x22 bl __printf_chk ldrb w3, [x19, 1]! cbnz w3, .L144 b .L155 .p2align 2,,3 .L143: .cfi_restore 21 .cfi_restore 22 mov x2, x19 adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 bl __printf_chk ldp x19, x20, [sp, 16] mov w0, 10 ldp x29, x30, [sp], 48 .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 b putchar .cfi_endproc .LFE68: .size show, .-show .section .rodata.str1.8 .align 3 .LC15: .string "stdio" .align 3 .LC16: .string "pledge" .align 3 .LC17: .string "usage: %s [-d | -s] [string ...]\n" .align 3 .LC18: .string "dsh" .align 3 .LC19: .string "...-.-" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB65: .cfi_startproc stp x29, x30, [sp, -112]! .cfi_def_cfa_offset 112 .cfi_offset 29, -112 .cfi_offset 30, -104 adrp x2, :got:__stack_chk_guard mov x29, sp ldr x2, [x2, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] .cfi_offset 19, -96 .cfi_offset 20, -88 mov x19, x1 stp x21, x22, [sp, 32] mov x1, 0 .cfi_offset 21, -80 .cfi_offset 22, -72 mov w21, w0 ldr x3, [x2] str x3, [sp, 104] mov x3, 0 adrp x0, .LC15 add x0, x0, :lo12:.LC15 bl pledge stp x23, x24, [sp, 48] .cfi_offset 24, -56 .cfi_offset 23, -64 cmn w0, #1 beq .L198 adrp x20, .LC18 adrp x22, .LANCHOR1 add x20, x20, :lo12:.LC18 add x22, x22, :lo12:.LANCHOR1 mov w23, 1 .L158: mov x2, x20 mov x1, x19 mov w0, w21 bl getopt cmn w0, #1 beq .L201 .L164: cmp w0, 100 beq .L159 cmp w0, 115 beq .L160 adrp x0, :got:stderr mov w21, 1 ldr x0, [x0, #:got_lo12:stderr] ldr x19, [x0] bl getprogname adrp x2, .LC17 mov w3, w0 add x2, x2, :lo12:.LC17 mov x0, x19 mov w1, w21 bl __fprintf_chk .L157: 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 bne .L202 mov w0, w21 ldp x19, x20, [sp, 16] ldp x21, x22, [sp, 32] ldp x23, x24, [sp, 48] .cfi_remember_state .cfi_restore 24 .cfi_restore 23 ldp x29, x30, [sp], 112 .cfi_restore 30 .cfi_restore 29 .cfi_restore 21 .cfi_restore 22 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L159: .cfi_restore_state mov x2, x20 mov x1, x19 mov w0, w21 str w23, [x22, 4] bl getopt cmn w0, #1 bne .L164 .L201: adrp x0, :got:optind adrp x1, .LANCHOR1+4 ldr x0, [x0, #:got_lo12:optind] ldr w21, [x1, #:lo12:.LANCHOR1+4] ldrsw x0, [x0] add x20, x19, x0, lsl 3 ldr x0, [x19, x0, lsl 3] cbz w21, .L165 cbz x0, .L182 .L167: ldr x0, [x20] bl decode ldr x0, [x20, 8]! cbnz x0, .L167 adrp x21, :got:stdout .L168: ldr x1, [x21, #:got_lo12:stdout] mov w0, 10 mov w21, 0 ldr x1, [x1] bl putc b .L157 .p2align 2,,3 .L160: str w23, [x22] b .L158 .L165: cbz x0, .L186 adrp x22, .LC3 add x22, x22, :lo12:.LC3 .L177: ldr x19, [x20] ldrb w0, [x19] cbz w0, .L179 .p2align 3,,7 .L176: bl morse ldrb w0, [x19, 1]! cbnz w0, .L176 .L179: mov x0, x22 bl show ldr x0, [x20, 8]! cbnz x0, .L177 .L178: adrp x0, .LC19 add x0, x0, :lo12:.LC19 bl show b .L157 .L182: adrp x21, :got:stdout adrp x22, :got:stdin stp x25, x26, [sp, 64] .cfi_offset 26, -40 .cfi_offset 25, -48 add x24, sp, 88 mov w20, 0 ldr x25, [x21, #:got_lo12:stdout] mov w26, 0 ldr x23, [x22, #:got_lo12:stdin] .L166: ldr x0, [x23] bl getc mov w19, w0 cmn w0, #1 beq .L203 sub w0, w19, #45 cmp w0, 1 bls .L204 cbnz w20, .L205 bl __ctype_b_loc ldr x0, [x0] ldrh w0, [x0, w19, sxtw 1] tbz x0, 13, .L166 cbnz w26, .L206 .L173: mov w20, 0 mov w26, 1 b .L166 .L204: strb w19, [x24, w20, sxtw] add w20, w20, 1 cmp w20, 10 bne .L166 ldr x1, [x21, #:got_lo12:stdout] mov w0, 120 ldr x1, [x1] bl putc ldr x19, [x22, #:got_lo12:stdin] .L171: ldr x0, [x19] bl getc sub w0, w0, #45 cmp w0, 1 bls .L171 b .L173 .L205: mov x0, x24 mov w26, 0 strb wzr, [x24, w20, sxtw] mov w20, 0 bl decode b .L166 .L203: ldp x25, x26, [sp, 64] .cfi_restore 26 .cfi_restore 25 b .L168 .L186: adrp x22, :got:stdin ldr x22, [x22, #:got_lo12:stdin] b .L175 .L180: bl morse .L175: ldr x0, [x22] bl getc cmn w0, #1 bne .L180 b .L178 .L206: .cfi_offset 25, -48 .cfi_offset 26, -40 ldr x1, [x25] mov w26, 0 mov w0, 32 bl putc b .L166 .L202: .cfi_restore 25 .cfi_restore 26 stp x25, x26, [sp, 64] .cfi_remember_state .cfi_offset 26, -40 .cfi_offset 25, -48 bl __stack_chk_fail .L198: .cfi_restore_state adrp x1, .LC16 mov w0, 1 add x1, x1, :lo12:.LC16 stp x25, x26, [sp, 64] .cfi_offset 26, -40 .cfi_offset 25, -48 bl err .cfi_endproc .LFE65: .size main, .-main .global ps .section .rodata.str1.8 .align 3 .LC20: .string "<AS>" .align 3 .LC21: .string ".-..." .align 3 .LC22: .string "<CL>" .align 3 .LC23: .string "-.-..-.." .align 3 .LC24: .string "<CT>" .align 3 .LC25: .string "-.-.-" .align 3 .LC26: .string "<EE5>" .align 3 .LC27: .string "......" .align 3 .LC28: .string "......." .align 3 .LC29: .string "........" .align 3 .LC30: .string "<SK>" .align 3 .LC31: .string "<SN>" .align 3 .LC32: .string "...-." .align 3 .LC33: .string "<SOS>" .align 3 .LC34: .string "...---..." .global other .align 3 .LC35: .string "..-.." .align 3 .LC36: .string "--..--" .align 3 .LC37: .string ".-.-.-" .align 3 .LC38: .string "..--.." .align 3 .LC39: .string "-..-." .align 3 .LC40: .string "-....-" .align 3 .LC41: .string "---..." .align 3 .LC42: .string "-.-.-." .align 3 .LC43: .string "-.--." .align 3 .LC44: .string "-.--.-" .align 3 .LC45: .string ".-..-." .align 3 .LC46: .string ".----." .align 3 .LC47: .string ".-.-." .align 3 .LC48: .string "-...-" .align 3 .LC49: .string ".--.-." .align 3 .LC50: .string ".-.-" .align 3 .LC51: .string ".-" .align 3 .LC52: .string "-..." .align 3 .LC53: .string "-.-." .align 3 .LC54: .string "-.." .align 3 .LC55: .string "." .align 3 .LC56: .string "..-." .align 3 .LC57: .string "--." .align 3 .LC58: .string "...." .align 3 .LC59: .string ".." .align 3 .LC60: .string ".---" .align 3 .LC61: .string "-.-" .align 3 .LC62: .string ".-.." .align 3 .LC63: .string "--" .align 3 .LC64: .string "-." .align 3 .LC65: .string "---" .align 3 .LC66: .string ".--." .align 3 .LC67: .string "--.-" .align 3 .LC68: .string ".-." .align 3 .LC69: .string "..." .align 3 .LC70: .string "-" .align 3 .LC71: .string "..-" .align 3 .LC72: .string "...-" .align 3 .LC73: .string ".--" .align 3 .LC74: .string "-..-" .align 3 .LC75: .string "-.--" .align 3 .LC76: .string "--.." .bss .align 2 .set .LANCHOR1,. + 0 .type sflag, %object .size sflag, 4 sflag: .zero 4 .type dflag, %object .size dflag, 4 dflag: .zero 4 .section .data.rel.local,"aw" .align 3 .set .LANCHOR2,. + 0 .type other, %object .size other, 288 other: .byte 101 .zero 7 .xword .LC35 .byte 44 .zero 7 .xword .LC36 .byte 46 .zero 7 .xword .LC37 .byte 63 .zero 7 .xword .LC38 .byte 47 .zero 7 .xword .LC39 .byte 45 .zero 7 .xword .LC40 .byte 58 .zero 7 .xword .LC41 .byte 59 .zero 7 .xword .LC42 .byte 40 .zero 7 .xword .LC43 .byte 41 .zero 7 .xword .LC44 .byte 34 .zero 7 .xword .LC45 .byte 96 .zero 7 .xword .LC45 .byte 39 .zero 7 .xword .LC46 .byte 43 .zero 7 .xword .LC47 .byte 61 .zero 7 .xword .LC48 .byte 64 .zero 7 .xword .LC49 .byte 10 .zero 7 .xword .LC50 .byte 0 .zero 7 .xword 0 .type ps, %object .size ps, 160 ps: .xword .LC20 .xword .LC21 .xword .LC22 .xword .LC23 .xword .LC24 .xword .LC25 .xword .LC26 .xword .LC27 .xword .LC26 .xword .LC28 .xword .LC26 .xword .LC29 .xword .LC30 .xword .LC19 .xword .LC31 .xword .LC32 .xword .LC33 .xword .LC34 .xword 0 .xword 0 .section .data.rel.ro.local,"aw" .align 4 .set .LANCHOR0,. + 0 .type alph, %object .size alph, 208 alph: .xword .LC51 .xword .LC52 .xword .LC53 .xword .LC54 .xword .LC55 .xword .LC56 .xword .LC57 .xword .LC58 .xword .LC59 .xword .LC60 .xword .LC61 .xword .LC62 .xword .LC63 .xword .LC64 .xword .LC65 .xword .LC66 .xword .LC67 .xword .LC68 .xword .LC69 .xword .LC70 .xword .LC71 .xword .LC72 .xword .LC73 .xword .LC74 .xword .LC75 .xword .LC76 .type digit, %object .size digit, 80 digit: .xword .LC4 .xword .LC5 .xword .LC6 .xword .LC7 .xword .LC8 .xword .LC9 .xword .LC10 .xword .LC11 .xword .LC12 .xword .LC13 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
memcpy.c
#if __ARMEB__ || __thumb__ #include "../memcpy.c" #endif
.file "memcpy.c" .option pic .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "memcpy.c" .option pic .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "memcpy.c" .option pic .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "memcpy.c" .option pic .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "memcpy.c" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "memcpy.c" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "memcpy.c" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "memcpy.c" .text .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
client.c
#define _GNU_SOURCE #include <stdio.h> #include <fcntl.h> #include <pthread.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <mqueue.h> #define QUEUE_NAME "/test_queue" #define MAX_SIZE 1024 #define MSG_STOP "exit" mqd_t mq; void cleanup(void){ mq_close(mq); printf("Exiting"); } int main(int argc, char** argv) { atexit(cleanup); char buffer[MAX_SIZE]; /* open the mail queue */ mq = mq_open(QUEUE_NAME, O_WRONLY); int count = 0; while(1) { snprintf(buffer, sizeof(buffer), "MESSAGE %d", count++); printf("Client: Send message %i\r\n", count - 1); mq_send(mq, buffer, MAX_SIZE, 0); fflush(stdout); usleep(7.33 * 1e6); } return (0); } //ipcs //iprm //atexit //posix - serwer zamyka po swojej stronie kolejkę klienta, po tym klient zamyka swoją
.file "client.c" .option pic .text .globl mq .bss .align 2 .type mq, @object .size mq, 4 mq: .zero 4 .section .rodata .align 3 .LC0: .string "Exiting" .text .align 1 .globl cleanup .type cleanup, @function cleanup: addi sp,sp,-16 sd ra,8(sp) sd s0,0(sp) addi s0,sp,16 lla a5,mq lw a5,0(a5) mv a0,a5 call mq_close@plt lla a0,.LC0 call printf@plt nop ld ra,8(sp) ld s0,0(sp) addi sp,sp,16 jr ra .size cleanup, .-cleanup .section .rodata .align 3 .LC1: .string "/test_queue" .align 3 .LC2: .string "MESSAGE %d" .align 3 .LC3: .string "Client: Send message %i\r\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-1072 sd ra,1064(sp) sd s0,1056(sp) addi s0,sp,1072 mv a5,a0 sd a1,-1072(s0) sw a5,-1060(s0) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, -24(s0) li a4, 0 lla a0,cleanup call atexit@plt li a1,1 lla a0,.LC1 call mq_open@plt mv a5,a0 mv a4,a5 lla a5,mq sw a4,0(a5) sw zero,-1052(s0) .L3: lw a5,-1052(s0) addiw a4,a5,1 sw a4,-1052(s0) addi a4,s0,-1048 mv a3,a5 lla a2,.LC2 li a1,1024 mv a0,a4 call snprintf@plt lw a5,-1052(s0) addiw a5,a5,-1 sext.w a5,a5 mv a1,a5 lla a0,.LC3 call printf@plt lla a5,mq lw a5,0(a5) addi a4,s0,-1048 li a3,0 li a2,1024 mv a1,a4 mv a0,a5 call mq_send@plt la a5,stdout ld a5,0(a5) mv a0,a5 call fflush@plt li a5,7331840 addi a0,a5,-1840 call usleep@plt j .L3 .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "client.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Exiting" .text .align 1 .globl cleanup .type cleanup, @function cleanup: addi sp,sp,-16 sd ra,8(sp) lw a0,.LANCHOR0 call mq_close@plt lla a1,.LC0 li a0,1 call __printf_chk@plt ld ra,8(sp) addi sp,sp,16 jr ra .size cleanup, .-cleanup .section .rodata.str1.8 .align 3 .LC1: .string "/test_queue" .align 3 .LC2: .string "MESSAGE %d" .align 3 .LC3: .string "Client: Send message %i\r\n" .text .align 1 .globl main .type main, @function main: addi sp,sp,-1120 sd ra,1112(sp) sd s0,1104(sp) sd s1,1096(sp) sd s2,1088(sp) sd s3,1080(sp) sd s4,1072(sp) sd s5,1064(sp) sd s6,1056(sp) sd s7,1048(sp) la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 1032(sp) li a4, 0 lla a0,cleanup call atexit@plt li a1,1 lla a0,.LC1 call mq_open@plt sw a0,.LANCHOR0,a5 li s0,0 addi s1,sp,8 lla s7,.LC2 lla s6,.LC3 lla s5,.LANCHOR0 la s4,stdout li s3,7331840 addi s3,s3,-1840 .L4: addiw s2,s0,1 mv a5,s0 mv a4,s7 li a3,1024 li a2,1 li a1,1024 mv a0,s1 call __snprintf_chk@plt mv a2,s0 mv a1,s6 li a0,1 call __printf_chk@plt li a3,0 li a2,1024 mv a1,s1 lw a0,0(s5) call mq_send@plt ld a0,0(s4) call fflush@plt mv a0,s3 call usleep@plt mv s0,s2 j .L4 .size main, .-main .globl mq .bss .align 2 .set .LANCHOR0,. + 0 .type mq, @object .size mq, 4 mq: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "client.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Exiting" .text .align 1 .globl cleanup .type cleanup, @function cleanup: addi sp,sp,-16 lw a0,.LANCHOR0 sd ra,8(sp) call mq_close@plt ld ra,8(sp) lla a1,.LC0 li a0,1 addi sp,sp,16 tail __printf_chk@plt .size cleanup, .-cleanup .section .rodata.str1.8 .align 3 .LC1: .string "/test_queue" .align 3 .LC2: .string "MESSAGE %d" .align 3 .LC3: .string "Client: Send message %i\r\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-1104 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 1032(sp) li a4, 0 lla a0,cleanup sd ra,1096(sp) sd s0,1088(sp) sd s1,1080(sp) sd s2,1072(sp) sd s3,1064(sp) sd s4,1056(sp) sd s5,1048(sp) sd s6,1040(sp) call atexit@plt li a1,1 lla a0,.LC1 call mq_open@plt lla s3,.LANCHOR0 li s2,7331840 sw a0,0(s3) li s0,0 addi s1,sp,8 la s6,stdout lla s5,.LC2 lla s4,.LC3 addi s2,s2,-1840 .L5: mv a5,s0 mv a4,s5 li a3,1024 li a2,1 li a1,1024 mv a0,s1 call __snprintf_chk@plt mv a2,s0 mv a1,s4 li a0,1 call __printf_chk@plt lw a0,0(s3) li a3,0 li a2,1024 mv a1,s1 call mq_send@plt ld a0,0(s6) addiw s0,s0,1 call fflush@plt mv a0,s2 call usleep@plt j .L5 .size main, .-main .globl mq .bss .align 2 .set .LANCHOR0,. + 0 .type mq, @object .size mq, 4 mq: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "client.c" .option pic .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Exiting" .text .align 1 .globl cleanup .type cleanup, @function cleanup: addi sp,sp,-16 lw a0,.LANCHOR0 sd ra,8(sp) call mq_close@plt ld ra,8(sp) lla a1,.LC0 li a0,1 addi sp,sp,16 tail __printf_chk@plt .size cleanup, .-cleanup .section .rodata.str1.8 .align 3 .LC1: .string "/test_queue" .align 3 .LC2: .string "MESSAGE %d" .align 3 .LC3: .string "Client: Send message %i\r\n" .section .text.startup,"ax",@progbits .align 1 .globl main .type main, @function main: addi sp,sp,-1104 la a5,__stack_chk_guard ld a4, 0(a5) sd a4, 1032(sp) li a4, 0 lla a0,cleanup sd ra,1096(sp) sd s0,1088(sp) sd s1,1080(sp) sd s2,1072(sp) sd s3,1064(sp) sd s4,1056(sp) sd s5,1048(sp) sd s6,1040(sp) call atexit@plt li a1,1 lla a0,.LC1 call mq_open@plt lla s3,.LANCHOR0 li s2,7331840 sw a0,0(s3) li s0,0 addi s1,sp,8 la s6,stdout lla s5,.LC2 lla s4,.LC3 addi s2,s2,-1840 .L5: mv a5,s0 mv a4,s5 li a3,1024 li a2,1 li a1,1024 mv a0,s1 call __snprintf_chk@plt mv a2,s0 mv a1,s4 li a0,1 call __printf_chk@plt lw a0,0(s3) li a3,0 li a2,1024 mv a1,s1 call mq_send@plt ld a0,0(s6) addiw s0,s0,1 call fflush@plt mv a0,s2 call usleep@plt j .L5 .size main, .-main .globl mq .bss .align 2 .set .LANCHOR0,. + 0 .type mq, @object .size mq, 4 mq: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "client.c" .text .global mq .bss .align 2 .type mq, %object .size mq, 4 mq: .zero 4 .section .rodata .align 3 .LC0: .string "Exiting" .text .align 2 .global cleanup .type cleanup, %function cleanup: .LFB6: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 mov x29, sp adrp x0, mq add x0, x0, :lo12:mq ldr w0, [x0] bl mq_close adrp x0, .LC0 add x0, x0, :lo12:.LC0 bl printf nop ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE6: .size cleanup, .-cleanup .section .rodata .align 3 .LC1: .string "/test_queue" .align 3 .LC2: .string "MESSAGE %d" .align 3 .LC3: .string "Client: Send message %i\r\n" .text .align 2 .global main .type main, %function main: .LFB7: .cfi_startproc sub sp, sp, #1072 .cfi_def_cfa_offset 1072 stp x29, x30, [sp] .cfi_offset 29, -1072 .cfi_offset 30, -1064 mov x29, sp str 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, 1064] mov x1, 0 adrp x0, cleanup add x0, x0, :lo12:cleanup bl atexit mov w1, 1 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl mq_open mov w1, w0 adrp x0, mq add x0, x0, :lo12:mq str w1, [x0] str wzr, [sp, 36] .L3: ldr w0, [sp, 36] add w1, w0, 1 str w1, [sp, 36] add x4, sp, 40 mov w3, w0 adrp x0, .LC2 add x2, x0, :lo12:.LC2 mov x1, 1024 mov x0, x4 bl snprintf ldr w0, [sp, 36] sub w0, w0, #1 mov w1, w0 adrp x0, .LC3 add x0, x0, :lo12:.LC3 bl printf adrp x0, mq add x0, x0, :lo12:mq ldr w0, [x0] add x1, sp, 40 mov w3, 0 mov x2, 1024 bl mq_send adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush mov w0, 55504 movk w0, 0x6f, lsl 16 bl usleep b .L3 .cfi_endproc .LFE7: .size main, .-main .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "client.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Exiting" .text .align 2 .global cleanup .type cleanup, %function cleanup: .LFB78: .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, .LANCHOR0 ldr w0, [x0, #:lo12:.LANCHOR0] bl mq_close adrp x1, .LC0 add x1, x1, :lo12:.LC0 mov w0, 1 bl __printf_chk ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE78: .size cleanup, .-cleanup .section .rodata.str1.8 .align 3 .LC1: .string "/test_queue" .align 3 .LC2: .string "MESSAGE %d" .align 3 .LC3: .string "Client: Send message %i\r\n" .text .align 2 .global main .type main, %function main: .LFB79: .cfi_startproc sub sp, sp, #1120 .cfi_def_cfa_offset 1120 stp x29, x30, [sp] .cfi_offset 29, -1120 .cfi_offset 30, -1112 mov x29, sp stp x19, x20, [sp, 16] stp x21, x22, [sp, 32] stp x23, x24, [sp, 48] stp x25, x26, [sp, 64] .cfi_offset 19, -1104 .cfi_offset 20, -1096 .cfi_offset 21, -1088 .cfi_offset 22, -1080 .cfi_offset 23, -1072 .cfi_offset 24, -1064 .cfi_offset 25, -1056 .cfi_offset 26, -1048 adrp x0, :got:__stack_chk_guard ldr x0, [x0, #:got_lo12:__stack_chk_guard] ldr x1, [x0] str x1, [sp, 1112] mov x1, 0 adrp x0, cleanup add x0, x0, :lo12:cleanup bl atexit mov w1, 1 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl mq_open adrp x1, .LANCHOR0 str w0, [x1, #:lo12:.LANCHOR0] mov w20, 0 adrp x26, .LC2 add x26, x26, :lo12:.LC2 mov x22, 1024 mov w21, 1 adrp x25, .LC3 add x25, x25, :lo12:.LC3 add x24, x1, :lo12:.LANCHOR0 .L4: add w23, w20, 1 add x19, sp, 88 mov w5, w20 mov x4, x26 mov x3, x22 mov w2, w21 mov x1, x22 mov x0, x19 bl __snprintf_chk mov w2, w20 mov x1, x25 mov w0, w21 bl __printf_chk mov w3, 0 mov x2, x22 mov x1, x19 ldr w0, [x24] bl mq_send adrp x0, :got:stdout ldr x0, [x0, #:got_lo12:stdout] ldr x0, [x0] bl fflush mov w0, 55504 movk w0, 0x6f, lsl 16 bl usleep mov w20, w23 b .L4 .cfi_endproc .LFE79: .size main, .-main .global mq .bss .align 2 .set .LANCHOR0,. + 0 .type mq, %object .size mq, 4 mq: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "client.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Exiting" .text .align 2 .p2align 4,,11 .global cleanup .type cleanup, %function cleanup: .LFB78: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LANCHOR0 mov x29, sp ldr w0, [x0, #:lo12:.LANCHOR0] bl mq_close ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 b __printf_chk .cfi_endproc .LFE78: .size cleanup, .-cleanup .section .rodata.str1.8 .align 3 .LC1: .string "/test_queue" .align 3 .LC2: .string "MESSAGE %d" .align 3 .LC3: .string "Client: Send message %i\r\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB79: .cfi_startproc sub sp, sp, #1120 .cfi_def_cfa_offset 1120 adrp x1, :got:__stack_chk_guard adrp x0, cleanup add x0, x0, :lo12:cleanup stp x29, x30, [sp] .cfi_offset 29, -1120 .cfi_offset 30, -1112 mov x29, sp ldr x1, [x1, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] .cfi_offset 19, -1104 .cfi_offset 20, -1096 add x20, sp, 88 stp x21, x22, [sp, 32] .cfi_offset 21, -1088 .cfi_offset 22, -1080 adrp x22, .LC2 adrp x21, .LC3 stp x23, x24, [sp, 48] .cfi_offset 23, -1072 .cfi_offset 24, -1064 adrp x23, .LANCHOR0 add x22, x22, :lo12:.LC2 str x25, [sp, 64] .cfi_offset 25, -1056 add x21, x21, :lo12:.LC3 mov w25, 55504 mov w19, 0 ldr x2, [x1] str x2, [sp, 1112] mov x2, 0 adrp x24, :got:stdout movk w25, 0x6f, lsl 16 bl atexit mov w1, 1 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl mq_open str w0, [x23, #:lo12:.LANCHOR0] .p2align 3,,7 .L5: mov w5, w19 mov x4, x22 mov x3, 1024 mov x0, x20 mov x1, x3 mov w2, 1 bl __snprintf_chk mov w2, w19 mov x1, x21 mov w0, 1 bl __printf_chk ldr w0, [x23, #:lo12:.LANCHOR0] mov x1, x20 mov w3, 0 mov x2, 1024 add w19, w19, 1 bl mq_send ldr x0, [x24, #:got_lo12:stdout] ldr x0, [x0] bl fflush mov w0, w25 bl usleep b .L5 .cfi_endproc .LFE79: .size main, .-main .global mq .bss .align 2 .set .LANCHOR0,. + 0 .type mq, %object .size mq, 4 mq: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "client.c" .text .section .rodata.str1.8,"aMS",@progbits,1 .align 3 .LC0: .string "Exiting" .text .align 2 .p2align 4,,11 .global cleanup .type cleanup, %function cleanup: .LFB78: .cfi_startproc stp x29, x30, [sp, -16]! .cfi_def_cfa_offset 16 .cfi_offset 29, -16 .cfi_offset 30, -8 adrp x0, .LANCHOR0 mov x29, sp ldr w0, [x0, #:lo12:.LANCHOR0] bl mq_close ldp x29, x30, [sp], 16 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 adrp x1, .LC0 mov w0, 1 add x1, x1, :lo12:.LC0 b __printf_chk .cfi_endproc .LFE78: .size cleanup, .-cleanup .section .rodata.str1.8 .align 3 .LC1: .string "/test_queue" .align 3 .LC2: .string "MESSAGE %d" .align 3 .LC3: .string "Client: Send message %i\r\n" .section .text.startup,"ax",@progbits .align 2 .p2align 4,,11 .global main .type main, %function main: .LFB79: .cfi_startproc sub sp, sp, #1120 .cfi_def_cfa_offset 1120 adrp x1, :got:__stack_chk_guard adrp x0, cleanup add x0, x0, :lo12:cleanup stp x29, x30, [sp] .cfi_offset 29, -1120 .cfi_offset 30, -1112 mov x29, sp ldr x1, [x1, #:got_lo12:__stack_chk_guard] stp x19, x20, [sp, 16] .cfi_offset 19, -1104 .cfi_offset 20, -1096 add x20, sp, 88 stp x21, x22, [sp, 32] .cfi_offset 21, -1088 .cfi_offset 22, -1080 adrp x22, .LC2 adrp x21, .LC3 stp x23, x24, [sp, 48] .cfi_offset 23, -1072 .cfi_offset 24, -1064 adrp x23, .LANCHOR0 add x22, x22, :lo12:.LC2 str x25, [sp, 64] .cfi_offset 25, -1056 add x21, x21, :lo12:.LC3 mov w25, 55504 mov w19, 0 ldr x2, [x1] str x2, [sp, 1112] mov x2, 0 adrp x24, :got:stdout movk w25, 0x6f, lsl 16 bl atexit mov w1, 1 adrp x0, .LC1 add x0, x0, :lo12:.LC1 bl mq_open str w0, [x23, #:lo12:.LANCHOR0] .p2align 3,,7 .L5: mov w5, w19 mov x4, x22 mov x3, 1024 mov x0, x20 mov x1, x3 mov w2, 1 bl __snprintf_chk mov w2, w19 mov x1, x21 mov w0, 1 bl __printf_chk ldr w0, [x23, #:lo12:.LANCHOR0] mov x1, x20 mov w3, 0 mov x2, 1024 add w19, w19, 1 bl mq_send ldr x0, [x24, #:got_lo12:stdout] ldr x0, [x0] bl fflush mov w0, w25 bl usleep b .L5 .cfi_endproc .LFE79: .size main, .-main .global mq .bss .align 2 .set .LANCHOR0,. + 0 .type mq, %object .size mq, 4 mq: .zero 4 .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
rename.c
int rename(from, to) char *from, *to; { (void) unlink(to); if (link(from, to) < 0) return -1; (void) unlink(from); return 0; }
.file "rename.c" .option pic .text .align 1 .globl rename .type rename, @function rename: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) addi s0,sp,32 sd a0,-24(s0) sd a1,-32(s0) ld a0,-32(s0) call unlink@plt ld a1,-32(s0) ld a0,-24(s0) call link@plt mv a5,a0 bge a5,zero,.L2 li a5,-1 j .L3 .L2: ld a0,-24(s0) call unlink@plt li a5,0 .L3: mv a0,a5 ld ra,24(sp) ld s0,16(sp) addi sp,sp,32 jr ra .size rename, .-rename .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "rename.c" .option pic .text .align 1 .globl rename .type rename, @function rename: addi sp,sp,-32 sd ra,24(sp) sd s0,16(sp) sd s1,8(sp) mv s1,a0 mv s0,a1 mv a0,a1 call unlink@plt mv a1,s0 mv a0,s1 call link@plt blt a0,zero,.L3 mv a0,s1 call unlink@plt li a0,0 .L2: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .L3: li a0,-1 j .L2 .size rename, .-rename .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "rename.c" .option pic .text .align 1 .globl rename .type rename, @function rename: addi sp,sp,-32 sd s1,8(sp) mv s1,a0 mv a0,a1 sd s0,16(sp) sd ra,24(sp) mv s0,a1 call unlink@plt mv a1,s0 mv a0,s1 call link@plt blt a0,zero,.L3 mv a0,s1 call unlink@plt li a0,0 .L2: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .L3: li a0,-1 j .L2 .size rename, .-rename .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.file "rename.c" .option pic .text .align 1 .globl rename .type rename, @function rename: addi sp,sp,-32 sd s1,8(sp) mv s1,a0 mv a0,a1 sd s0,16(sp) sd ra,24(sp) mv s0,a1 call unlink@plt mv a1,s0 mv a0,s1 call link@plt blt a0,zero,.L3 mv a0,s1 call unlink@plt li a0,0 .L2: ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) addi sp,sp,32 jr ra .L3: li a0,-1 j .L2 .size rename, .-rename .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "rename.c" .text .align 2 .global rename .type rename, %function rename: .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] str x1, [sp, 16] ldr x0, [sp, 16] bl unlink ldr x1, [sp, 16] ldr x0, [sp, 24] bl link cmp w0, 0 bge .L2 mov w0, -1 b .L3 .L2: ldr x0, [sp, 24] bl unlink mov w0, 0 .L3: ldp x29, x30, [sp], 32 .cfi_restore 30 .cfi_restore 29 .cfi_def_cfa_offset 0 ret .cfi_endproc .LFE0: .size rename, .-rename .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "rename.c" .text .align 2 .global rename .type rename, %function rename: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov x20, x0 mov x19, x1 mov x0, x1 bl unlink mov x1, x19 mov x0, x20 bl link tbnz w0, #31, .L3 mov x0, x20 bl unlink mov w0, 0 .L1: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .L3: .cfi_restore_state mov w0, -1 b .L1 .cfi_endproc .LFE0: .size rename, .-rename .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "rename.c" .text .align 2 .p2align 4,,11 .global rename .type rename, %function rename: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov x19, x1 mov x20, x0 mov x0, x1 bl unlink mov x1, x19 mov x0, x20 bl link tbnz w0, #31, .L3 mov x0, x20 bl unlink mov w0, 0 .L1: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L3: .cfi_restore_state mov w0, -1 b .L1 .cfi_endproc .LFE0: .size rename, .-rename .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits
.arch armv8-a .file "rename.c" .text .align 2 .p2align 4,,11 .global rename .type rename, %function rename: .LFB0: .cfi_startproc stp x29, x30, [sp, -32]! .cfi_def_cfa_offset 32 .cfi_offset 29, -32 .cfi_offset 30, -24 mov x29, sp stp x19, x20, [sp, 16] .cfi_offset 19, -16 .cfi_offset 20, -8 mov x19, x1 mov x20, x0 mov x0, x1 bl unlink mov x1, x19 mov x0, x20 bl link tbnz w0, #31, .L3 mov x0, x20 bl unlink mov w0, 0 .L1: ldp x19, x20, [sp, 16] ldp x29, x30, [sp], 32 .cfi_remember_state .cfi_restore 30 .cfi_restore 29 .cfi_restore 19 .cfi_restore 20 .cfi_def_cfa_offset 0 ret .p2align 2,,3 .L3: .cfi_restore_state mov w0, -1 b .L1 .cfi_endproc .LFE0: .size rename, .-rename .ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0" .section .note.GNU-stack,"",@progbits