.text .globl dependent_computation .p2align 2 dependent_computation: .L.dependent_computation.0: stp x29, x30, [sp, #-16]! mov x29, sp sub sp, sp, #32 str x20, [sp, #0] str x19, [sp, #8] mov w19, w0 mov w8, #0 mov w15, w8 mov w8, #4 mov w12, w8 mov w8, #3 mov w11, w8 mov w8, #2 mov w10, w8 mov w8, #1 b .L.dependent_computation.1 .L.dependent_computation.1: cmp w15, w19 b.lt .L.dependent_computation.2 b .L.dependent_computation.3 .L.dependent_computation.2: add w9, w8, w10 add w8, w10, w11 add w20, w11, w12 add w11, w12, w9 mov w10, #1 add w10, w15, w10 mov w15, w10 mov w12, w11 mov w11, w20 mov w10, w8 mov w8, w9 b .L.dependent_computation.1 .L.dependent_computation.3: add w8, w8, w10 add w8, w8, w11 add w8, w8, w12 mov w0, w8 ldr x20, [sp, #0] ldr x19, [sp, #8] add sp, sp, #32 ldp x29, x30, [sp], #16 ret .text .globl independent_computation .p2align 2 independent_computation: .L.independent_computation.0: stp x29, x30, [sp, #-16]! mov x29, sp sub sp, sp, #32 str x20, [sp, #0] str x19, [sp, #8] mov w20, w0 mov w8, #0 mov w19, w8 mov w8, #4 mov w15, w8 mov w8, #3 mov w12, w8 mov w8, #2 mov w11, w8 mov w8, #1 mov w10, w8 b .L.independent_computation.1 .L.independent_computation.1: cmp w19, w20 b.lt .L.independent_computation.2 b .L.independent_computation.3 .L.independent_computation.2: add w9, w10, w11 add w8, w11, w12 add w12, w12, w15 add w11, w15, w10 mov w10, #1 add w10, w19, w10 mov w19, w10 mov w15, w11 mov w11, w8 mov w10, w9 b .L.independent_computation.1 .L.independent_computation.3: add w8, w10, w11 add w8, w8, w12 add w8, w8, w15 mov w0, w8 ldr x20, [sp, #0] ldr x19, [sp, #8] add sp, sp, #32 ldp x29, x30, [sp], #16 ret .text .globl main .p2align 2 main: .L.main.0: stp x29, x30, [sp, #-16]! mov x29, sp sub sp, sp, #32 str x20, [sp, #0] str x19, [sp, #8] bl getint mov w19, w0 bl starttime mov w0, w19 bl dependent_computation mov w20, w0 mov w0, w19 bl independent_computation mov w19, w0 bl stoptime mov w0, w20 bl putint mov w20, #10 mov w0, w20 bl putch mov w0, w19 bl putint mov w0, w20 bl putch mov w8, #0 mov w0, w8 ldr x20, [sp, #0] ldr x19, [sp, #8] add sp, sp, #32 ldp x29, x30, [sp], #16 ret