	.file	"691481.c"
	.intel_syntax noprefix
	.text
	.type	_insertion, @function
_insertion:
.LFB0:
	.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	DWORD PTR -44[rbp], r8d
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -44[rbp]
	add	eax, edx
	mov	DWORD PTR -16[rbp], eax
	jmp	.L2
.L6:
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, DWORD PTR -44[rbp]
	add	edx, ecx
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -44[rbp]
	sub	DWORD PTR -12[rbp], eax
.L3:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L4
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	rcx
	test	eax, eax
	jg	.L5
.L4:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -44[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -44[rbp]
	add	DWORD PTR -16[rbp], eax
.L2:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jle	.L6
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	_insertion, .-_insertion
	.type	medianOfMedians, @function
medianOfMedians:
.LFB1:
	.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	DWORD PTR -44[rbp], r8d
	mov	edx, DWORD PTR -44[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, DWORD PTR -36[rbp]
	add	eax, 1
	cdq
	idiv	DWORD PTR -8[rbp]
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L8
	mov	edi, DWORD PTR -44[rbp]
	mov	ecx, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	_insertion
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, DWORD PTR -36[rbp]
	add	eax, 1
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	imul	eax, DWORD PTR -44[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L10
.L11:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	lea	ecx, -1[rax]
	mov	edi, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	_insertion
	mov	eax, DWORD PTR -8[rbp]
	add	DWORD PTR -12[rbp], eax
.L10:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	cmp	DWORD PTR -40[rbp], eax
	jg	.L11
	cmp	DWORD PTR -4[rbp], 4
	jg	.L12
	mov	eax, DWORD PTR -8[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -36[rbp]
	lea	edi, [rdx+rax]
	mov	ecx, DWORD PTR -8[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, edi
	mov	rdi, rax
	call	_insertion
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, DWORD PTR -8[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	jmp	.L9
.L12:
	mov	edx, DWORD PTR -44[rbp]
	mov	eax, edx
	sal	eax, 2
	lea	edi, [rax+rdx]
	mov	eax, DWORD PTR -12[rbp]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -8[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -36[rbp]
	add	edx, eax
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	medianOfMedians
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	medianOfMedians, .-medianOfMedians
	.globl	selectMedian
	.type	selectMedian, @function
selectMedian:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, DWORD PTR -36[rbp]
	add	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	add	eax, 1
	mov	DWORD PTR -16[rbp], eax
	jmp	.L14
.L18:
	mov	ecx, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8d, 1
	mov	rdi, rax
	call	medianOfMedians
	mov	DWORD PTR -12[rbp], eax
	mov	edi, DWORD PTR -12[rbp]
	mov	ecx, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	partition@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	sub	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jne	.L15
	mov	eax, DWORD PTR -8[rbp]
	jmp	.L16
.L15:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jge	.L17
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, 1
	mov	DWORD PTR -40[rbp], eax
	jmp	.L14
.L17:
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -36[rbp]
	add	eax, 1
	sub	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	DWORD PTR -36[rbp], eax
.L14:
	cmp	DWORD PTR -16[rbp], 0
	jg	.L18
	mov	eax, DWORD PTR -36[rbp]
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	selectMedian, .-selectMedian
	.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	"691481.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_insertion, %function
_insertion:
	@ args = 4, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #4]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	b	.L2
.L6:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #4]
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L3
.L5:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r1, [fp, #-12]
	ldr	r3, [fp, #4]
	add	r3, r1, r3
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #4]
	sub	r3, r2, r3
	str	r3, [fp, #-12]
.L3:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L4
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-8]
	mov	r0, r2
	blx	r3
	mov	r3, r0
	cmp	r3, #0
	bgt	.L5
.L4:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #4]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #4]
	add	r3, r2, r3
	str	r3, [fp, #-16]
.L2:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	ble	.L6
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	_insertion, .-_insertion
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	medianOfMedians, %function
medianOfMedians:
	@ args = 4, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r2, [fp, #4]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	add	r3, r3, #1
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	_insertion
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	add	r3, r3, #1
	ldr	r1, [fp, #4]
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r2, [fp, #4]
	mul	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	b	.L9
.L8:
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-16]
	b	.L10
.L11:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	sub	r2, r3, #1
	ldr	r3, [fp, #4]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	_insertion
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-16]
.L10:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bgt	.L11
	ldr	r3, [fp, #-8]
	cmp	r3, #4
	bgt	.L12
	ldr	r3, [fp, #-12]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	_insertion
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	mul	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	b	.L9
.L12:
	ldr	r3, [fp, #-12]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r1, r2, r3
	ldr	r3, [fp, #-16]
	sub	r0, r3, #1
	ldr	r2, [fp, #4]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	str	r3, [sp]
	mov	r3, r0
	mov	r2, r1
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	medianOfMedians
	mov	r3, r0
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	medianOfMedians, .-medianOfMedians
	.align	2
	.global	selectMedian
	.syntax unified
	.arm
	.fpu softvfp
	.type	selectMedian, %function
selectMedian:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	add	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L14
.L18:
	mov	r3, #1
	str	r3, [sp]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	medianOfMedians
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	partition
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bne	.L15
	ldr	r3, [fp, #-12]
	b	.L16
.L15:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bge	.L17
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
	b	.L14
.L17:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-20]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L14:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bgt	.L18
	ldr	r3, [fp, #-32]
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	selectMedian, .-selectMedian
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
