	.file	"526238.c"
	.intel_syntax noprefix
	.text
	.globl	revert
	.type	revert, @function
revert:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -28[rbp], 1
	sub	DWORD PTR -32[rbp], 1
.L2:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jl	.L3
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	revert, .-revert
	.globl	findDiagonalOrder
	.type	findDiagonalOrder, @function
findDiagonalOrder:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	QWORD PTR -72[rbp], rdi
	mov	DWORD PTR -76[rbp], esi
	mov	QWORD PTR -88[rbp], rdx
	mov	QWORD PTR -96[rbp], rcx
	cmp	DWORD PTR -76[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -96[rbp]
	mov	DWORD PTR [rax], 0
	mov	eax, 0
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	imul	eax, DWORD PTR -76[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -96[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -96[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -60[rbp], 0
	mov	DWORD PTR -56[rbp], 0
	jmp	.L7
.L15:
	mov	eax, DWORD PTR -56[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR -52[rbp], eax
	mov	DWORD PTR -48[rbp], 0
	jmp	.L9
.L11:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -60[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	sub	DWORD PTR -52[rbp], 1
	add	DWORD PTR -48[rbp], 1
.L9:
	cmp	DWORD PTR -52[rbp], 0
	js	.L10
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jl	.L11
.L10:
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, -1[rax]
	mov	ecx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	revert
	jmp	.L12
.L8:
	mov	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR -44[rbp], eax
	mov	DWORD PTR -40[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -60[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	sub	DWORD PTR -44[rbp], 1
	add	DWORD PTR -40[rbp], 1
.L13:
	cmp	DWORD PTR -44[rbp], 0
	js	.L12
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jl	.L14
.L12:
	add	DWORD PTR -56[rbp], 1
.L7:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -56[rbp], eax
	jl	.L15
	mov	DWORD PTR -36[rbp], 1
	jmp	.L16
.L24:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	and	eax, 1
	test	eax, eax
	jne	.L17
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, 1
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -28[rbp], eax
	jmp	.L18
.L20:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -60[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	sub	DWORD PTR -32[rbp], 1
	add	DWORD PTR -28[rbp], 1
.L18:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jge	.L19
	cmp	DWORD PTR -32[rbp], 0
	jns	.L20
.L19:
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, -1[rax]
	mov	ecx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	revert
	jmp	.L21
.L17:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, 1
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -60[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	sub	DWORD PTR -24[rbp], 1
	add	DWORD PTR -20[rbp], 1
.L22:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jge	.L21
	cmp	DWORD PTR -24[rbp], 0
	jns	.L23
.L21:
	add	DWORD PTR -36[rbp], 1
.L16:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jl	.L24
	mov	rax, QWORD PTR -8[rbp]
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	findDiagonalOrder, .-findDiagonalOrder
	.section	.rodata
.LC0:
	.string	"Test for 498"
.LC1:
	.string	"Returned array's size is %d\n"
.LC2:
	.string	"%d "
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	edi, 8
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR [rax], 2
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 4
	mov	DWORD PTR [rax], 5
	mov	rax, QWORD PTR -40[rbp]
	lea	rbx, 8[rax]
	mov	edi, 8
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR [rax], 8
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	add	rax, 4
	mov	DWORD PTR [rax], 4
	mov	rax, QWORD PTR -40[rbp]
	lea	rbx, 16[rax]
	mov	edi, 8
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	add	rax, 4
	mov	DWORD PTR [rax], -1
	mov	DWORD PTR -44[rbp], 3
	mov	DWORD PTR -56[rbp], 2
	mov	DWORD PTR -52[rbp], 0
	lea	rcx, -52[rbp]
	lea	rdx, -56[rbp]
	mov	esi, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	findDiagonalOrder
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -48[rbp], 0
	jmp	.L26
.L27:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -48[rbp], 1
.L26:
	mov	eax, DWORD PTR -52[rbp]
	cmp	DWORD PTR -48[rbp], eax
	jl	.L27
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.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	"526238.c"
	.text
	.align	2
	.global	revert
	.syntax unified
	.arm
	.fpu softvfp
	.type	revert, %function
revert:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	b	.L2
.L3:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
.L2:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L3
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	revert, .-revert
	.align	2
	.global	findDiagonalOrder
	.syntax unified
	.arm
	.fpu softvfp
	.type	findDiagonalOrder, %function
findDiagonalOrder:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	str	r2, [fp, #-72]
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-76]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	b	.L6
.L5:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r2, [fp, #-68]
	mul	r2, r3, r2
	ldr	r3, [fp, #-76]
	str	r2, [r3]
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L7
.L15:
	ldr	r3, [fp, #-56]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-60]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L9
.L11:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-60]
	add	r1, r3, #1
	str	r1, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	sub	r3, r3, #1
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L9:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	blt	.L10
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	blt	.L11
.L10:
	ldr	r3, [fp, #-60]
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	revert
	b	.L12
.L8:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L13
.L14:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-60]
	add	r1, r3, #1
	str	r1, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	sub	r3, r3, #1
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L13:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	blt	.L12
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	blt	.L14
.L12:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L7:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	cmp	r2, r3
	blt	.L15
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L16
.L24:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L17
	ldr	r3, [fp, #-60]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	sub	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-28]
	b	.L18
.L20:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-60]
	add	r1, r3, #1
	str	r1, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L18:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	bge	.L19
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L20
.L19:
	ldr	r3, [fp, #-60]
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	revert
	b	.L21
.L17:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-20]
	b	.L22
.L23:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-60]
	add	r1, r3, #1
	str	r1, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L22:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	bge	.L21
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L23
.L21:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L16:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	blt	.L24
	ldr	r3, [fp, #-16]
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	findDiagonalOrder, .-findDiagonalOrder
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Test for 498\000"
	.align	2
.LC1:
	.ascii	"Returned array's size is %d\012\000"
	.align	2
.LC2:
	.ascii	"%d \000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L30+4
	bl	puts
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r3, r3, #4
	mov	r2, #5
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r4, r3, #4
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #8
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r3, #4
	mov	r2, #4
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r4, r3, #8
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	add	r3, r3, #4
	mvn	r2, #0
	str	r2, [r3]
	mov	r3, #3
	str	r3, [fp, #-24]
	mov	r3, #2
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	sub	r3, fp, #36
	sub	r2, fp, #40
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-28]
	bl	findDiagonalOrder
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-36]
	mov	r1, r3
	ldr	r0, .L30+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L26
.L27:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L30+12
	bl	printf
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L26:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L27
	mov	r0, #10
	bl	putchar
	ldr	r0, [fp, #-20]
	bl	free
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-28]
	bl	free
	mov	r3, #0
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
