	.file	"36593.c"
	.intel_syntax noprefix
	.text
	.type	binary_search, @function
binary_search:
.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
	mov	DWORD PTR -12[rbp], -1
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -12[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	jle	.L3
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -8[rbp], eax
.L2:
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 1
	cmp	DWORD PTR -8[rbp], eax
	jg	.L4
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	je	.L5
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	je	.L6
.L5:
	mov	eax, DWORD PTR -8[rbp]
	not	eax
	jmp	.L7
.L6:
	mov	eax, DWORD PTR -8[rbp]
.L7:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	binary_search, .-binary_search
	.type	insert, @function
insert:
.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, 80
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	QWORD PTR -68[rbp], rdx
	mov	QWORD PTR -80[rbp], rcx
	cmp	DWORD PTR -60[rbp], 0
	jne	.L9
	mov	edi, 8
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	edx, DWORD PTR -68[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
	mov	edx, DWORD PTR -64[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -80[rbp]
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -16[rbp]
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -60[rbp]
	add	eax, eax
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -48[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -48[rbp]
	add	edx, edx
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -48[rbp]
	add	edx, edx
	movsx	rdx, edx
	add	rdx, 1
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -48[rbp], 1
.L11:
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L12
	mov	edx, DWORD PTR -68[rbp]
	mov	eax, DWORD PTR -60[rbp]
	lea	ecx, [rax+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	binary_search
	mov	DWORD PTR -24[rbp], eax
	mov	edx, DWORD PTR -64[rbp]
	mov	eax, DWORD PTR -60[rbp]
	lea	ecx, [rax+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	binary_search
	mov	DWORD PTR -20[rbp], eax
	mov	DWORD PTR -40[rbp], -1
	mov	DWORD PTR -36[rbp], -1
	mov	DWORD PTR -32[rbp], -1
	mov	DWORD PTR -28[rbp], -1
	cmp	DWORD PTR -24[rbp], 0
	js	.L13
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -32[rbp], eax
	jmp	.L14
.L13:
	mov	eax, DWORD PTR -24[rbp]
	not	eax
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -32[rbp], eax
.L14:
	cmp	DWORD PTR -20[rbp], 0
	js	.L15
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -28[rbp], eax
	jmp	.L16
.L15:
	mov	eax, DWORD PTR -20[rbp]
	not	eax
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L17
	cmp	DWORD PTR -36[rbp], 1
	jle	.L18
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	sub	eax, 1
	jmp	.L19
.L18:
	mov	eax, 0
.L19:
	mov	DWORD PTR -28[rbp], eax
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -28[rbp], eax
.L16:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jne	.L20
	cmp	DWORD PTR -24[rbp], 0
	jns	.L21
	cmp	DWORD PTR -20[rbp], 0
	jns	.L21
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jne	.L21
	mov	eax, DWORD PTR -40[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L21
	mov	eax, DWORD PTR -60[rbp]
	add	eax, 1
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -68[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -60[rbp]
	sub	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rax, 1
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rsi
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	jmp	.L24
.L21:
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	cmp	DWORD PTR -24[rbp], 0
	jns	.L23
	mov	eax, DWORD PTR -40[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L23
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -68[rbp]
	mov	DWORD PTR [rdx], eax
.L23:
	cmp	DWORD PTR -20[rbp], 0
	jns	.L24
	mov	eax, DWORD PTR -36[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L24
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -64[rbp]
	mov	DWORD PTR 4[rdx], eax
	jmp	.L24
.L20:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, DWORD PTR -32[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -60[rbp]
	sub	eax, edx
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -60[rbp]
	sub	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rsi
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	cmp	DWORD PTR -24[rbp], 0
	jns	.L25
	mov	eax, DWORD PTR -40[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L25
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -68[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L26
.L25:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -32[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -16[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
.L26:
	cmp	DWORD PTR -20[rbp], 0
	jns	.L27
	mov	eax, DWORD PTR -36[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L27
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -64[rbp]
	mov	DWORD PTR 4[rdx], eax
	jmp	.L24
.L27:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -32[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -16[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR 4[rdx], eax
.L24:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -44[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -16[rbp]
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	insert, .-insert
	.globl	merge
	.type	merge, @function
merge:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L29
.L30:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	lea	rdi, [rdx+rax]
	mov	esi, DWORD PTR -24[rbp]
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	rdx, QWORD PTR [rdi]
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -16[rbp], rax
	add	DWORD PTR -20[rbp], 1
.L29:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L30
	mov	edx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	merge, .-merge
	.section	.rodata
.LC0:
	.string	"Usage: ./test s0 e0 s1 e1..."
.LC1:
	.string	"[%d, %d]\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -52[rbp], 0
	jle	.L34
	mov	eax, DWORD PTR -52[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L35
.L34:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, -1
	call	exit@PLT
.L35:
	mov	DWORD PTR -40[rbp], 0
	mov	eax, DWORD PTR -52[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -36[rbp], 1
	jmp	.L36
.L37:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	DWORD PTR 4[rdx], eax
	add	QWORD PTR -32[rbp], 8
	add	DWORD PTR -36[rbp], 2
.L36:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L37
	mov	eax, DWORD PTR -52[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	ecx, eax
	lea	rdx, -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	merge
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -36[rbp], 0
	jmp	.L38
.L39:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	QWORD PTR -24[rbp], 8
	add	DWORD PTR -36[rbp], 1
.L38:
	mov	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L39
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"36593.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	binary_search, %function
binary_search:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mvn	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	b	.L2
.L4:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	ble	.L3
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-16]
	b	.L2
.L3:
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bgt	.L4
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	beq	.L5
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	beq	.L6
.L5:
	ldr	r3, [fp, #-12]
	mvn	r3, r3
	b	.L7
.L6:
	ldr	r3, [fp, #-12]
.L7:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	binary_search, .-binary_search
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ args = 4, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	sub	r1, fp, #60
	stm	r1, {r2, r3}
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L9
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-44]
	str	r2, [r3]
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-44]
	str	r2, [r3, #4]
	ldr	r3, [fp, #4]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	b	.L10
.L9:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L11
.L12:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-48]
	add	r2, r2, r3
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #3
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-48]
	add	r2, r2, r3
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #3
	add	r3, r3, #4
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2, #4]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L11:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	blt	.L12
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-60]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	binary_search
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-56]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	binary_search
	str	r0, [fp, #-8]
	mvn	r3, #0
	str	r3, [fp, #-32]
	mvn	r3, #0
	str	r3, [fp, #-28]
	mvn	r3, #0
	str	r3, [fp, #-24]
	mvn	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L13
	ldr	r3, [fp, #-12]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L14
.L13:
	ldr	r3, [fp, #-12]
	mvn	r3, r3
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-24]
.L14:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L15
	ldr	r3, [fp, #-8]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L16
.L15:
	ldr	r3, [fp, #-8]
	mvn	r3, r3
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L17
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	ble	.L18
	ldr	r3, [fp, #-28]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	sub	r3, r3, #1
	b	.L19
.L18:
	mov	r3, #0
.L19:
	str	r3, [fp, #-20]
	b	.L16
.L17:
	ldr	r3, [fp, #-28]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-20]
.L16:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bne	.L20
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L21
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L21
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bne	.L21
	ldr	r3, [fp, #-32]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L21
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-44]
	bl	memcpy
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	mov	r2, r3
	sub	r3, fp, #60
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r0, r2, r3
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-48]
	add	r1, r2, r3
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	lsl	r3, r3, #3
	mov	r2, r3
	bl	memcpy
	b	.L24
.L21:
	ldr	r3, [fp, #-52]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-44]
	bl	memcpy
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L23
	ldr	r3, [fp, #-32]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L23
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-60]
	str	r2, [r3]
.L23:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L24
	ldr	r3, [fp, #-28]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L24
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-56]
	str	r2, [r3, #4]
	b	.L24
.L20:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	ldr	r2, [fp, #-52]
	sub	r3, r2, r3
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-44]
	bl	memcpy
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r0, r2, r3
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-48]
	add	r1, r2, r3
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	lsl	r3, r3, #3
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L25
	ldr	r3, [fp, #-32]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-60]
	str	r2, [r3]
	b	.L26
.L25:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-48]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r1, [fp, #-44]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
.L26:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L27
	ldr	r3, [fp, #-28]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L27
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-56]
	str	r2, [r3, #4]
	b	.L24
.L27:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-48]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r1, [fp, #-44]
	add	r3, r1, r3
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
.L24:
	ldr	r0, [fp, #-16]
	bl	free
	ldr	r0, [fp, #-48]
	bl	free
	ldr	r3, [fp, #4]
	ldr	r2, [fp, #-36]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	insert, .-insert
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	merge
	.syntax unified
	.arm
	.fpu softvfp
	.type	merge, %function
merge:
	@ 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]
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L29
.L30:
	ldr	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	sub	r2, fp, #20
	str	r2, [sp]
	ldm	r3, {r2, r3}
	ldr	r0, [fp, #-12]
	bl	insert
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L29:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L30
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r2, .L33
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC0
	.size	merge, .-merge
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Usage: ./test s0 e0 s1 e1...\000"
	.align	2
.LC2:
	.ascii	"[%d, %d]\012\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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	ble	.L36
	ldr	r3, [fp, #-32]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L37
.L36:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L44+8
	bl	fwrite
	mvn	r0, #0
	bl	exit
.L37:
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L38
.L39:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-20]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r3, r3, #2
	str	r3, [fp, #-24]
.L38:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L39
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r1, r3
	sub	r3, fp, #28
	mov	r2, r3
	ldr	r0, [fp, #-12]
	bl	merge
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L40
.L41:
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r0, .L44+12
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L40:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L41
	mov	r3, #0
	ldr	r2, .L44
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC3
	.word	stderr
	.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
