	.file	"129437.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"============== t r e e ================="
.LC1:
	.string	" |"
.LC2:
	.string	"-\033[1;32m%d(%d,%d,%d,%d)\033[0m\n"
	.text
	.globl	print_tree
	.type	print_tree, @function
print_tree:
.LFB6:
	.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	QWORD PTR -24[rbp], rdi
	mov	eax, DWORD PTR depth.0[rip]
	test	eax, eax
	jne	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
.L2:
	cmp	QWORD PTR -24[rbp], 0
	je	.L7
	mov	eax, DWORD PTR depth.0[rip]
	add	eax, 1
	mov	DWORD PTR depth.0[rip], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	print_tree
	mov	eax, DWORD PTR depth.0[rip]
	sub	eax, 1
	mov	DWORD PTR depth.0[rip], eax
	mov	edi, 124
	call	putchar@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L5
.L6:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L5:
	mov	eax, DWORD PTR depth.0[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L6
	mov	rax, QWORD PTR -24[rbp]
	mov	edi, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	r9d, edi
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR depth.0[rip]
	add	eax, 1
	mov	DWORD PTR depth.0[rip], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	print_tree
	mov	eax, DWORD PTR depth.0[rip]
	sub	eax, 1
	mov	DWORD PTR depth.0[rip], eax
	jmp	.L1
.L7:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_tree, .-print_tree
	.section	.rodata
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L9
.L17:
	mov	DWORD PTR -24[rbp], 1
	mov	QWORD PTR -16[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	jmp	.L10
.L11:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	ecx, DWORD PTR -32[rbp]
	mov	edx, DWORD PTR -28[rbp]
	lea	rax, -16[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	append
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 1[rax]
	lea	rax, -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	splay
	add	DWORD PTR -28[rbp], 1
.L10:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L11
	mov	DWORD PTR -28[rbp], 0
	jmp	.L12
.L15:
	cmp	DWORD PTR -24[rbp], 0
	je	.L13
	mov	DWORD PTR -24[rbp], 0
	jmp	.L14
.L13:
	mov	edi, 32
	call	putchar@PLT
.L14:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	find_min
	mov	DWORD PTR -20[rbp], eax
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -20[rbp]
	lea	rax, -16[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	flip
	lea	rax, -16[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	splay
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	QWORD PTR -16[rbp], rax
	add	DWORD PTR -28[rbp], 1
.L12:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L15
	mov	edi, 10
	call	putchar@PLT
.L9:
	lea	rax, -36[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	jne	.L16
	mov	eax, DWORD PTR -36[rbp]
	test	eax, eax
	jne	.L17
.L16:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.globl	maintain
	.type	maintain, @function
maintain:
.LFB8:
	.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 -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L26
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], 1
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	test	rax, rax
	je	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	eax, DWORD PTR 8[rax]
	add	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	eax, DWORD PTR 12[rax]
	cmp	edx, eax
	jle	.L24
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 16[rax], edx
.L24:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	eax, DWORD PTR 12[rax]
	cmp	edx, eax
	jne	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	cmp	edx, eax
	jge	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 16[rax], edx
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	test	rax, rax
	je	.L20
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	eax, DWORD PTR 8[rax]
	add	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	eax, DWORD PTR 12[rax]
	cmp	edx, eax
	jle	.L25
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 16[rax], edx
.L25:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	eax, DWORD PTR 12[rax]
	cmp	edx, eax
	jne	.L20
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	cmp	edx, eax
	jge	.L20
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 16[rax], edx
	jmp	.L20
.L26:
	nop
.L20:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	maintain, .-maintain
	.globl	pushdown
	.type	pushdown, @function
pushdown:
.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, 24
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	je	.L32
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 20[rax]
	test	eax, eax
	je	.L27
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	test	rax, rax
	je	.L30
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	xor	edx, 1
	mov	DWORD PTR 20[rax], edx
.L30:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	test	rax, rax
	je	.L31
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	xor	edx, 1
	mov	DWORD PTR 20[rax], edx
.L31:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 32[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 20[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	maintain
	jmp	.L27
.L32:
	nop
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	pushdown, .-pushdown
	.globl	find_min
	.type	find_min, @function
find_min:
.LFB10:
	.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	pushdown
	cmp	QWORD PTR -24[rbp], 0
	jne	.L34
	mov	eax, 0
	jmp	.L35
.L34:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	test	rax, rax
	je	.L36
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	eax, DWORD PTR 8[rax]
	jmp	.L37
.L36:
	mov	eax, 0
.L37:
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	test	rax, rax
	je	.L38
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	eax, DWORD PTR 12[rax]
	cmp	edx, eax
	jne	.L38
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	eax, DWORD PTR 16[rax]
	cmp	edx, eax
	jne	.L38
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	find_min
	jmp	.L35
.L38:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	jne	.L39
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	jmp	.L35
.L39:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	find_min
	mov	edx, DWORD PTR -4[rbp]
	add	eax, edx
	add	eax, 1
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	find_min, .-find_min
	.globl	new_node
	.type	new_node, @function
new_node:
.LFB11:
	.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	DWORD PTR -24[rbp], esi
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], 1
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 20[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 32[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	new_node, .-new_node
	.globl	split
	.type	split, @function
split:
.LFB12:
	.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	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	DWORD PTR -28[rbp], ecx
	cmp	DWORD PTR -28[rbp], 0
	jne	.L43
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L45
.L43:
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	splay
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 32[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	maintain
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
.L45:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	split, .-split
	.globl	merge
	.type	merge, @function
merge:
.LFB13:
	.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	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L47
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L49
.L47:
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	splay
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	maintain
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
.L49:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	merge, .-merge
	.globl	rotate
	.type	rotate, @function
rotate:
.LFB14:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	pushdown
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	rdi, rax
	call	pushdown
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -28[rbp]
	xor	eax, 1
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8[rbp]
	movsx	rcx, ecx
	add	rcx, 2
	mov	rdx, QWORD PTR 8[rdx+rcx*8]
	mov	ecx, DWORD PTR -28[rbp]
	movsx	rcx, ecx
	add	rcx, 2
	mov	QWORD PTR 8[rax+rcx*8], rdx
	mov	eax, DWORD PTR -28[rbp]
	xor	eax, 1
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	movsx	rcx, ecx
	add	rcx, 2
	mov	QWORD PTR 8[rax+rcx*8], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -28[rbp]
	xor	edx, 1
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	rdi, rax
	call	maintain
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	maintain
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	rotate, .-rotate
	.globl	splay
	.type	splay, @function
splay:
.LFB15:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	pushdown
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 24[rax]
	test	rax, rax
	je	.L52
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 24[rax]
	mov	eax, DWORD PTR 8[rax]
	jmp	.L53
.L52:
	mov	eax, 0
.L53:
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jg	.L54
	mov	DWORD PTR -12[rbp], 0
	jmp	.L55
.L54:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	cmp	DWORD PTR -28[rbp], eax
	je	.L65
	mov	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	sub	DWORD PTR -28[rbp], eax
.L55:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	rdi, rax
	call	pushdown
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	rax, QWORD PTR 24[rax]
	test	rax, rax
	je	.L58
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rax, QWORD PTR 8[rax+rdx*8]
	mov	rax, QWORD PTR 24[rax]
	mov	eax, DWORD PTR 8[rax]
	jmp	.L59
.L58:
	mov	eax, 0
.L59:
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jg	.L60
	mov	DWORD PTR -8[rbp], 0
	jmp	.L61
.L60:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	cmp	DWORD PTR -28[rbp], eax
	jne	.L62
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotate
	jmp	.L51
.L62:
	mov	DWORD PTR -8[rbp], 1
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	sub	DWORD PTR -28[rbp], eax
.L61:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	add	rdx, 2
	mov	rdx, QWORD PTR 8[rax+rdx*8]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 2
	sal	rax, 3
	add	rax, rdx
	lea	rdx, 8[rax]
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	splay
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jne	.L63
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotate
	jmp	.L64
.L63:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, 2
	sal	rax, 3
	add	rax, rdx
	lea	rdx, 8[rax]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	rotate
.L64:
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotate
	jmp	.L51
.L65:
	nop
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	splay, .-splay
	.globl	append
	.type	append, @function
append:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L67
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	edi, eax
	call	new_node
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L69
.L67:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	pushdown
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rcx, 32[rax]
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	mov	rdi, rcx
	call	append
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	maintain
.L69:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	append, .-append
	.globl	flip
	.type	flip, @function
flip:
.LFB17:
	.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 -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	DWORD PTR -64[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -60[rbp]
	cmp	eax, DWORD PTR -64[rbp]
	je	.L75
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jge	.L73
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -64[rbp], eax
.L73:
	mov	ecx, DWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	lea	rsi, -32[rbp]
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	split
	mov	eax, DWORD PTR -60[rbp]
	lea	ecx, -1[rax]
	lea	rdx, -16[rbp]
	lea	rsi, -24[rbp]
	lea	rax, -40[rbp]
	mov	rdi, rax
	call	split
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -24[rbp]
	xor	edx, 1
	mov	DWORD PTR 20[rax], edx
	lea	rdx, -24[rbp]
	lea	rcx, -40[rbp]
	lea	rax, -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	merge
	lea	rdx, -32[rbp]
	lea	rcx, -16[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	merge
	jmp	.L70
.L75:
	nop
.L70:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L74
	call	__stack_chk_fail@PLT
.L74:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	flip, .-flip
	.local	depth.0
	.comm	depth.0,4,4
	.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	"129437.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"============== t r e e =================\000"
	.align	2
.LC1:
	.ascii	" |\000"
	.align	2
.LC2:
	.ascii	"-\033[1;32m%d(%d,%d,%d,%d)\033[0m\012\000"
	.text
	.align	2
	.global	print_tree
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_tree, %function
print_tree:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	ldr	r3, .L8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L8+4
	bl	puts
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L8
	str	r3, [r2]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	mov	r0, r3
	bl	print_tree
	ldr	r3, .L8
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L8
	str	r3, [r2]
	mov	r0, #124
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L5
.L6:
	ldr	r0, .L8+8
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L5:
	ldr	r3, .L8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L6
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	ldr	r0, [r3, #20]
	ldr	r3, [fp, #-16]
	ldr	ip, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	ldr	r2, [fp, #-16]
	ldr	r2, [r2, #4]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r0, .L8+12
	bl	printf
	ldr	r3, .L8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L8
	str	r3, [r2]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	mov	r0, r3
	bl	print_tree
	ldr	r3, .L8
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L8
	str	r3, [r2]
	b	.L1
.L7:
	nop
.L1:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	depth.5153
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	print_tree, .-print_tree
	.section	.rodata
	.align	2
.LC3:
	.ascii	"%d\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 = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L11
.L19:
	mov	r3, #1
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L12
.L13:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L22+4
	bl	__isoc99_scanf
	ldr	r1, [fp, #-28]
	sub	r3, fp, #24
	ldr	r2, [fp, #-20]
	mov	r0, r3
	bl	append
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	splay
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L12:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L13
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L14
.L17:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L15
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L16
.L15:
	mov	r0, #32
	bl	putchar
.L16:
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	find_min
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L22+4
	bl	printf
	sub	r3, fp, #24
	ldr	r2, [fp, #-12]
	mov	r1, #1
	mov	r0, r3
	bl	flip
	sub	r3, fp, #24
	mov	r1, #1
	mov	r0, r3
	bl	splay
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L14:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L17
	mov	r0, #10
	bl	putchar
.L11:
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L22+4
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L18
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L19
.L18:
	mov	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC4
	.word	.LC3
	.size	main, .-main
	.align	2
	.global	maintain
	.syntax unified
	.arm
	.fpu softvfp
	.type	maintain, %function
maintain:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L30
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	cmp	r3, #0
	beq	.L27
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	ldr	r3, [r3, #8]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	ldr	r3, [r3, #12]
	cmp	r2, r3
	ble	.L28
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #16]
.L28:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	ldr	r3, [r3, #12]
	cmp	r2, r3
	bne	.L27
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r2, r3
	bge	.L27
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #16]
.L27:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	cmp	r3, #0
	beq	.L24
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	ldr	r3, [r3, #8]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	ldr	r3, [r3, #12]
	cmp	r2, r3
	ble	.L29
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #16]
.L29:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	ldr	r3, [r3, #12]
	cmp	r2, r3
	bne	.L24
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r2, r3
	bge	.L24
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #16]
	b	.L24
.L30:
	nop
.L24:
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	maintain, .-maintain
	.align	2
	.global	pushdown
	.syntax unified
	.arm
	.fpu softvfp
	.type	pushdown, %function
pushdown:
	@ 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]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L36
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	beq	.L31
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	cmp	r3, #0
	beq	.L34
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	ldr	r2, [r3, #20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	eor	r2, r2, #1
	str	r2, [r3, #20]
.L34:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	cmp	r3, #0
	beq	.L35
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	ldr	r2, [r3, #20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	eor	r2, r2, #1
	str	r2, [r3, #20]
.L35:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #28]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #24]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #28]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #20]
	ldr	r0, [fp, #-16]
	bl	maintain
	b	.L31
.L36:
	nop
.L31:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	pushdown, .-pushdown
	.align	2
	.global	find_min
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_min, %function
find_min:
	@ 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]
	ldr	r0, [fp, #-16]
	bl	pushdown
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L38
	mov	r3, #0
	b	.L39
.L38:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	cmp	r3, #0
	beq	.L40
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	ldr	r3, [r3, #8]
	b	.L41
.L40:
	mov	r3, #0
.L41:
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	cmp	r3, #0
	beq	.L42
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	ldr	r3, [r3, #12]
	cmp	r2, r3
	bne	.L42
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	ldr	r3, [r3, #16]
	cmp	r2, r3
	bne	.L42
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #24]
	mov	r0, r3
	bl	find_min
	mov	r3, r0
	b	.L39
.L42:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L43
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	b	.L39
.L43:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	mov	r0, r3
	bl	find_min
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	add	r3, r3, #1
.L39:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	find_min, .-find_min
	.align	2
	.global	new_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_node, %function
new_node:
	@ 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	r0, #32
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #20]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #24]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #28]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	new_node, .-new_node
	.align	2
	.global	split
	.syntax unified
	.arm
	.fpu softvfp
	.type	split, %function
split:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L47
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	b	.L49
.L47:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	splay
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [r3, #28]
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #28]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	maintain
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
.L49:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	split, .-split
	.align	2
	.global	merge
	.syntax unified
	.arm
	.fpu softvfp
	.type	merge, %function
merge:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L51
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	b	.L53
.L51:
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	splay
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r2, [r2]
	str	r2, [r3, #24]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	maintain
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
.L53:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	merge, .-merge
	.align	2
	.global	rotate
	.syntax unified
	.arm
	.fpu softvfp
	.type	rotate, %function
rotate:
	@ 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]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	pushdown
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	add	r2, r2, #6
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	pushdown
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	add	r2, r2, #6
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	eor	r1, r3, #1
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	add	r1, r1, #6
	ldr	r1, [r2, r1, lsl #2]
	ldr	r2, [fp, #-20]
	add	r2, r2, #6
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-20]
	eor	r2, r3, #1
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	add	r2, r2, #6
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	eor	r2, r2, #1
	add	r2, r2, #6
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	maintain
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	maintain
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rotate, .-rotate
	.align	2
	.global	splay
	.syntax unified
	.arm
	.fpu softvfp
	.type	splay, %function
splay:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r0, r3
	bl	pushdown
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r3, [r3, #24]
	cmp	r3, #0
	beq	.L56
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r3, [r3, #24]
	ldr	r3, [r3, #8]
	b	.L57
.L56:
	mov	r3, #0
.L57:
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bgt	.L58
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L59
.L58:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	beq	.L69
	mov	r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r2, [fp, #-28]
	sub	r3, r2, r3
	str	r3, [fp, #-28]
.L59:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	add	r2, r2, #6
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	pushdown
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	add	r2, r2, #6
	ldr	r3, [r3, r2, lsl #2]
	ldr	r3, [r3, #24]
	cmp	r3, #0
	beq	.L62
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	add	r2, r2, #6
	ldr	r3, [r3, r2, lsl #2]
	ldr	r3, [r3, #24]
	ldr	r3, [r3, #8]
	b	.L63
.L62:
	mov	r3, #0
.L63:
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bgt	.L64
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L65
.L64:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L66
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	rotate
	b	.L55
.L66:
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r2, [fp, #-28]
	sub	r3, r2, r3
	str	r3, [fp, #-28]
.L65:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	add	r2, r2, #6
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #6
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	splay
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bne	.L67
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	rotate
	b	.L68
.L67:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #6
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	rotate
.L68:
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	rotate
	b	.L55
.L69:
	nop
.L55:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	splay, .-splay
	.align	2
	.global	append
	.syntax unified
	.arm
	.fpu softvfp
	.type	append, %function
append:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L71
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	new_node
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	b	.L73
.L71:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	pushdown
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r3, r3, #28
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	append
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	maintain
.L73:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	append, .-append
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	flip
	.syntax unified
	.arm
	.fpu softvfp
	.type	flip, %function
flip:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r3, .L80
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	beq	.L79
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bge	.L77
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-40]
.L77:
	sub	r1, fp, #24
	sub	r0, fp, #16
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-32]
	bl	split
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	sub	r2, fp, #16
	sub	r1, fp, #20
	sub	r0, fp, #28
	bl	split
	ldr	r3, [fp, #-20]
	ldr	r2, [r3, #20]
	ldr	r3, [fp, #-20]
	eor	r2, r2, #1
	str	r2, [r3, #20]
	sub	r2, fp, #20
	sub	r1, fp, #28
	sub	r3, fp, #16
	mov	r0, r3
	bl	merge
	sub	r2, fp, #24
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	merge
	b	.L74
.L79:
	nop
.L74:
	ldr	r3, .L80
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L78
	bl	__stack_chk_fail
.L78:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L81:
	.align	2
.L80:
	.word	.LC5
	.size	flip, .-flip
	.local	depth.5153
	.comm	depth.5153,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
