	.file	"962546.c"
	.intel_syntax noprefix
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, rsi
	mov	r8, rdi
	mov	rsi, r8
	mov	rdi, r9
	mov	rdi, rax
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -24[rbp], rcx
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cmp	edx, eax
	jle	.L2
	mov	eax, 1
	jmp	.L3
.L2:
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cmp	edx, eax
	jge	.L4
	mov	eax, -1
	jmp	.L3
.L4:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -28[rbp]
	cmp	edx, eax
	jle	.L5
	mov	eax, 1
	jmp	.L3
.L5:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -28[rbp]
	cmp	edx, eax
	jge	.L6
	mov	eax, -1
	jmp	.L3
.L6:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -24[rbp]
	cmp	edx, eax
	jle	.L7
	mov	eax, 1
	jmp	.L3
.L7:
	mov	eax, -1
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.globl	rank
	.type	rank, @function
rank:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -24[rbp], 0
	jmp	.L9
.L13:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, 1
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	mov	rdx, QWORD PTR -40[rbp]
	add	rcx, rdx
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	rdi, QWORD PTR [rcx]
	mov	rsi, QWORD PTR 8[rcx]
	mov	rcx, rdx
	mov	rdx, rax
	call	cmp
	cmp	eax, -1
	jne	.L11
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -8[rbp], rdx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, 1
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	mov	rdx, QWORD PTR -40[rbp]
	add	rcx, rdx
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, 1
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
.L11:
	add	DWORD PTR -20[rbp], 1
.L10:
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, DWORD PTR -24[rbp]
	sub	eax, 1
	cmp	DWORD PTR -20[rbp], eax
	jl	.L12
	add	DWORD PTR -24[rbp], 1
.L9:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	rank, .-rank
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d %d %d %d\n"
	.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
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 4
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	jmp	.L15
.L16:
	lea	rsi, -28[rbp]
	lea	rcx, -32[rbp]
	lea	rdx, -36[rbp]
	lea	rax, -40[rbp]
	mov	r8, rsi
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR 8[rdx], eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR 12[rdx], eax
	add	DWORD PTR -24[rbp], 1
.L15:
	mov	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L16
	mov	edx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rank
	mov	DWORD PTR -20[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -20[rbp], 1
.L17:
	mov	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L18
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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	"962546.c"
	.text
	.align	2
	.global	cmp
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmp, %function
cmp:
	@ args = 16, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	sub	ip, fp, #20
	stm	ip, {r0, r1, r2, r3}
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #16]
	cmp	r2, r3
	ble	.L2
	mov	r3, #1
	b	.L3
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #16]
	cmp	r2, r3
	bge	.L4
	mvn	r3, #0
	b	.L3
.L4:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #8]
	cmp	r2, r3
	ble	.L5
	mov	r3, #1
	b	.L3
.L5:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #8]
	cmp	r2, r3
	bge	.L6
	mvn	r3, #0
	b	.L3
.L6:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #12]
	cmp	r2, r3
	ble	.L7
	mov	r3, #1
	b	.L3
.L7:
	mvn	r3, #0
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	cmp, .-cmp
	.align	2
	.global	rank
	.syntax unified
	.arm
	.fpu softvfp
	.type	rank, %function
rank:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L9
.L13:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L10
.L12:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	ip, r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	lr, sp
	ldm	r3, {r0, r1, r2, r3}
	stm	lr, {r0, r1, r2, r3}
	ldm	ip, {r0, r1, r2, r3}
	bl	cmp
	mov	r3, r0
	cmn	r3, #1
	bne	.L11
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	sub	ip, fp, #20
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	r1, r2, r3
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	ip, r3
	mov	r3, r1
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	lsl	r3, r3, #4
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	ip, r3
	sub	r3, fp, #20
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
.L11:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L10:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L12
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L9:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L13
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rank, .-rank
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\012\000"
	.align	2
.LC1:
	.ascii	"%d %d %d %d\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L21+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #4
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L15
.L16:
	sub	r0, fp, #28
	sub	r2, fp, #32
	sub	r1, fp, #36
	sub	r3, fp, #24
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L21+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L15:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L16
	ldr	r3, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	rank
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L17
.L18:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21+4
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L17:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L18
	ldr	r0, [fp, #-12]
	bl	free
	mov	r3, #0
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
