	.file	"492441.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"This program is going to print a magic square."
	.align 8
.LC1:
	.string	"You can specify the size, give me an odd number\n between 2 and 100: "
.LC2:
	.string	"%d"
.LC3:
	.string	"Try a different odd number"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -36864[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 2368
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -39220[rbp], 1
	lea	rax, -39216[rbp]
	mov	edx, 39204
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -39224[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -39224[rbp]
	and	eax, 1
	test	eax, eax
	je	.L2
	mov	eax, DWORD PTR -39224[rbp]
	cmp	eax, 99
	jg	.L2
	mov	eax, DWORD PTR -39224[rbp]
	cmp	eax, 2
	jg	.L3
.L2:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L5
.L3:
	mov	eax, DWORD PTR -39224[rbp]
	lea	rdx, -39216[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	create_magic_square
	mov	eax, DWORD PTR -39224[rbp]
	lea	rdx, -39216[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	print_magic_square
	mov	eax, 0
.L5:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	create_magic_square
	.type	create_magic_square, @function
create_magic_square:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -12[rbp], 1
	mov	DWORD PTR -8[rbp], 0
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -12[rbp], 1
	jmp	.L8
.L13:
	cmp	DWORD PTR -8[rbp], 0
	jns	.L9
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jne	.L9
	mov	DWORD PTR -8[rbp], 1
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	DWORD PTR -4[rbp], eax
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jne	.L11
	mov	DWORD PTR -4[rbp], 0
.L11:
	cmp	DWORD PTR -8[rbp], 0
	jns	.L10
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
.L10:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	imul	rdx, rax, 396
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	je	.L12
	sub	DWORD PTR -4[rbp], 1
	add	DWORD PTR -8[rbp], 2
	jmp	.L8
.L12:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	imul	rcx, rdx, 396
	mov	rdx, QWORD PTR -32[rbp]
	add	rcx, rdx
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rcx+rdx*4], eax
	sub	DWORD PTR -8[rbp], 1
	add	DWORD PTR -4[rbp], 1
.L8:
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax
	cmp	DWORD PTR -12[rbp], eax
	jle	.L13
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	create_magic_square, .-create_magic_square
	.section	.rodata
.LC4:
	.string	"%5d"
	.text
	.globl	print_magic_square
	.type	print_magic_square, @function
print_magic_square:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L15
.L18:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	imul	rdx, rax, 396
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L16:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L17
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L15:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	print_magic_square, .-print_magic_square
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"492441.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"This program is going to print a magic square.\000"
	.align	2
.LC1:
	.ascii	"You can specify the size, give me an odd number\012"
	.ascii	" between 2 and 100: \000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"Try a different odd number\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 39216
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #39168
	sub	sp, sp, #48
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #36864
	sub	r3, r3, #4
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-2348]
	sub	r3, fp, #36864
	sub	r3, r3, #4
	sub	r3, r3, #2336
	sub	r3, r3, #8
	ldr	r2, .L7+4
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r0, .L7+8
	bl	puts
	ldr	r0, .L7+12
	bl	printf
	sub	r3, fp, #39168
	sub	r3, r3, #4
	sub	r3, r3, #48
	mov	r1, r3
	ldr	r0, .L7+16
	bl	__isoc99_scanf
	sub	r3, fp, #36864
	sub	r3, r3, #4
	ldr	r3, [r3, #-2352]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L2
	sub	r3, fp, #36864
	sub	r3, r3, #4
	ldr	r3, [r3, #-2352]
	cmp	r3, #99
	bgt	.L2
	sub	r3, fp, #36864
	sub	r3, r3, #4
	ldr	r3, [r3, #-2352]
	cmp	r3, #2
	bgt	.L3
.L2:
	ldr	r0, .L7+20
	bl	puts
	mov	r3, #1
	b	.L5
.L3:
	sub	r3, fp, #36864
	sub	r3, r3, #4
	ldr	r2, [r3, #-2352]
	sub	r3, fp, #39168
	sub	r3, r3, #4
	sub	r3, r3, #40
	mov	r1, r3
	mov	r0, r2
	bl	create_magic_square
	sub	r3, fp, #36864
	sub	r3, r3, #4
	ldr	r2, [r3, #-2352]
	sub	r3, fp, #39168
	sub	r3, r3, #4
	sub	r3, r3, #40
	mov	r1, r3
	mov	r0, r2
	bl	print_magic_square
	mov	r3, #0
.L5:
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC4
	.word	39204
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.align	2
	.global	create_magic_square
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_magic_square, %function
create_magic_square:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-8]
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L10
.L15:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L11
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bne	.L11
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L12
.L11:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bne	.L13
	mov	r3, #0
	str	r3, [fp, #-8]
.L13:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L12
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L12:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #5
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	beq	.L14
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #2
	str	r3, [fp, #-12]
	b	.L10
.L14:
	ldr	r2, [fp, #-16]
	add	r3, r2, #1
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-12]
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	lsl	r1, r3, #5
	add	r3, r3, r1
	lsl	r3, r3, #2
	mov	r1, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r1
	ldr	r1, [fp, #-8]
	str	r2, [r3, r1, lsl #2]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L10:
	ldr	r3, [fp, #-24]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L15
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	create_magic_square, .-create_magic_square
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%5d\000"
	.text
	.align	2
	.global	print_magic_square
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_magic_square, %function
print_magic_square:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L17
.L20:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L18
.L19:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #5
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L21
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L18:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L19
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L17:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L20
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC5
	.size	print_magic_square, .-print_magic_square
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
