	.file	"139067.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
.LC3:
	.string	"\n%s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	QWORD PTR -16[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L2
.L3:
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	insert
	mov	QWORD PTR -16[rbp], rax
	add	DWORD PTR -20[rbp], 1
.L2:
	mov	eax, DWORD PTR -28[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L3
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	inorder
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	isbst
	test	eax, eax
	je	.L4
	lea	rax, .LC1[rip]
	jmp	.L5
.L4:
	lea	rax, .LC2[rip]
.L5:
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC4:
	.string	"%d_"
	.text
	.globl	inorder
	.type	inorder, @function
inorder:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L11
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	inorder
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	inorder
	jmp	.L8
.L11:
	nop
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	inorder, .-inorder
	.globl	insert
	.type	insert, @function
insert:
.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, 88
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	QWORD PTR -88[rbp], rdx
	cmp	QWORD PTR -80[rbp], 0
	jne	.L13
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR -68[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -88[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	jmp	.L14
.L13:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	cmp	ebx, eax
	jge	.L15
	mov	rax, QWORD PTR -80[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	insert
	mov	rdx, QWORD PTR -80[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L16
.L15:
	mov	rax, QWORD PTR -80[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	insert
	mov	rdx, QWORD PTR -80[rbp]
	mov	QWORD PTR 16[rdx], rax
.L16:
	mov	rax, QWORD PTR -80[rbp]
.L14:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	insert, .-insert
	.globl	height
	.type	height, @function
height:
.LFB9:
	.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, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L18
	mov	eax, -1
	jmp	.L19
.L18:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	cmp	ebx, eax
	jle	.L20
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	height
	add	eax, 1
	jmp	.L19
.L20:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	add	eax, 1
.L19:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	height, .-height
	.globl	bstinsert
	.type	bstinsert, @function
bstinsert:
.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, 80
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	cmp	QWORD PTR -64[rbp], 0
	jne	.L23
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -52[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -52[rbp], eax
	jge	.L25
	mov	rax, QWORD PTR -64[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	insert
	mov	rdx, QWORD PTR -64[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L26
.L25:
	mov	rax, QWORD PTR -64[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	insert
	mov	rdx, QWORD PTR -64[rbp]
	mov	QWORD PTR 16[rdx], rax
.L26:
	mov	rax, QWORD PTR -64[rbp]
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	bstinsert, .-bstinsert
	.globl	isbst
	.type	isbst, @function
isbst:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L28
	mov	eax, 1
	jmp	.L29
.L28:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L30
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	jle	.L30
	mov	eax, 0
	jmp	.L29
.L30:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L31
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	jge	.L31
	mov	eax, 0
	jmp	.L29
.L31:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	isbst
	test	eax, eax
	je	.L32
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	isbst
	test	eax, eax
	jne	.L33
.L32:
	mov	eax, 0
	jmp	.L29
.L33:
	mov	eax, 1
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	isbst, .-isbst
	.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	"139067.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"yes\000"
	.align	2
.LC2:
	.ascii	"no\000"
	.align	2
.LC3:
	.ascii	"\012%s\012\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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L8+4
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L3:
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L8+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	mov	r2, #0
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	insert
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L3
	ldr	r0, [fp, #-16]
	bl	inorder
	ldr	r0, [fp, #-16]
	bl	isbst
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L8+8
	b	.L5
.L4:
	ldr	r3, .L8+12
.L5:
	mov	r1, r3
	ldr	r0, .L8+16
	bl	printf
	mov	r3, #0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%d_\000"
	.text
	.align	2
	.global	inorder
	.syntax unified
	.arm
	.fpu softvfp
	.type	inorder, %function
inorder:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	inorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L14
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	inorder
	b	.L10
.L13:
	nop
.L10:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC5
	.size	inorder, .-inorder
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L17
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-40]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-48]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-32]
	b	.L18
.L17:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	cmp	r4, r3
	bge	.L19
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	insert
	mov	r2, r0
	ldr	r3, [fp, #-44]
	str	r2, [r3]
	b	.L20
.L19:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-44]
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	insert
	mov	r2, r0
	ldr	r3, [fp, #-44]
	str	r2, [r3, #8]
.L20:
	ldr	r3, [fp, #-44]
.L18:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	insert, .-insert
	.align	2
	.global	height
	.syntax unified
	.arm
	.fpu softvfp
	.type	height, %function
height:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L22
	mvn	r3, #0
	b	.L23
.L22:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	cmp	r4, r3
	ble	.L24
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	height
	mov	r3, r0
	add	r3, r3, #1
	b	.L23
.L24:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	add	r3, r3, #1
.L23:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	height, .-height
	.align	2
	.global	bstinsert
	.syntax unified
	.arm
	.fpu softvfp
	.type	bstinsert, %function
bstinsert:
	@ 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, [fp, #-36]
	cmp	r3, #0
	bne	.L27
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-32]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-40]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	b	.L28
.L27:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bge	.L29
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	insert
	mov	r2, r0
	ldr	r3, [fp, #-36]
	str	r2, [r3]
	b	.L30
.L29:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-36]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	insert
	mov	r2, r0
	ldr	r3, [fp, #-36]
	str	r2, [r3, #8]
.L30:
	ldr	r3, [fp, #-36]
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	bstinsert, .-bstinsert
	.align	2
	.global	isbst
	.syntax unified
	.arm
	.fpu softvfp
	.type	isbst, %function
isbst:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L32
	mov	r3, #1
	b	.L33
.L32:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L34
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	ble	.L34
	mov	r3, #0
	b	.L33
.L34:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L35
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bge	.L35
	mov	r3, #0
	b	.L33
.L35:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	isbst
	mov	r3, r0
	cmp	r3, #0
	beq	.L36
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	isbst
	mov	r3, r0
	cmp	r3, #0
	bne	.L37
.L36:
	mov	r3, #0
	b	.L33
.L37:
	mov	r3, #1
.L33:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	isbst, .-isbst
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
