1: .arch armv6 2: .eabi_attribute 27, 3 3: .eabi_attribute 28, 1 4: .fpu vfp 5: .eabi_attribute 20, 1 6: .eabi_attribute 21, 1 7: .eabi_attribute 23, 3 8: .eabi_attribute 24, 1 9: .eabi_attribute 25, 1 10: .eabi_attribute 26, 2 11: .eabi_attribute 30, 6 12: .eabi_attribute 34, 1 13: .eabi_attribute 18, 4 14: .file "sumsqs2.c" 15: .text 16: .align 2 17: .global square 18: .type square, %function 19:square: 20: @ args = 0, pretend = 0, frame = 8 21: @ frame_needed = 1, uses_anonymous_args = 0 22: @ link register save eliminated. 23: str fp, [sp, #-4]! 24: add fp, sp, #0 25: sub sp, sp, #12 26: str r0, [fp, #-8] 27: ldr r3, [fp, #-8] 28: ldr r2, [fp, #-8] 29: mul r3, r2, r3 30: mov r0, r3 31: sub sp, fp, #0 32: @ sp needed 33: ldr fp, [sp], #4 34: bx lr 35: .size square, .-square 36: .section .rodata 37: .align 2 38:.LC0: 39: .ascii "Enter a positive integer: \000" 40: .align 2 41:.LC1: 42: .ascii "%d\000" 43: .align 2 44:.LC2: 45: .ascii "The sum of the first %d squares is %d.\012\000" 46: .text 47: .align 2 48: .global main 49: .type main, %function 50:main: 51: @ args = 0, pretend = 0, frame = 16 52: @ frame_needed = 1, uses_anonymous_args = 0 53: stmfd sp!, {fp, lr} 54: add fp, sp, #4 55: sub sp, sp, #16 56: mov r3, #0 57: str r3, [fp, #-8] 58: ldr r0, .L7 59: bl printf 60: sub r3, fp, #16 61: ldr r0, .L7+4 62: mov r1, r3 63: bl __isoc99_scanf 64: mov r3, #0 65: str r3, [fp, #-12] 66: b .L4 67:.L5: 68: ldr r0, [fp, #-12] 69: bl square 70: mov r2, r0 71: ldr r3, [fp, #-8] 72: add r3, r3, r2 73: str r3, [fp, #-8] 74: ldr r3, [fp, #-12] 75: add r3, r3, #1 76: str r3, [fp, #-12] 77:.L4: 78: ldr r3, [fp, #-16] 79: ldr r2, [fp, #-12] 80: cmp r2, r3 81: ble .L5 82: ldr r3, [fp, #-16] 83: ldr r0, .L7+8 84: mov r1, r3 85: ldr r2, [fp, #-8] 86: bl printf 87: mov r3, #0 88: mov r0, r3 89: sub sp, fp, #4 90: @ sp needed 91: ldmfd sp!, {fp, pc} 92:.L8: 93: .align 2 94:.L7: 95: .word .LC0 96: .word .LC1 97: .word .LC2 98: .size main, .-main 99: .ident "GCC: (Raspbian 4.9.2-10) 4.9.2" 100: .section .note.GNU-stack,"",%progbits