	.file	"903748.c"
	.intel_syntax noprefix
	.text
	.globl	get_node
	.type	get_node, @function
get_node:
.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	DWORD PTR -28[rbp], esi
	mov	edi, 128
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 104[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 112[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 120[rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_node, .-get_node
	.globl	height
	.type	height, @function
height:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	je	.L3
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	rdi, rax
	call	height
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	rdi, rax
	call	height
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cmp	DWORD PTR -4[rbp], eax
	cmovge	eax, DWORD PTR -4[rbp]
	jmp	.L2
.L3:
.L2:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	height, .-height
	.globl	add_node
	.type	add_node, @function
add_node:
.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, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	cmp	QWORD PTR -8[rbp], 0
	jne	.L6
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	get_node
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L8
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	edx, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	add_node
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 112[rdx], rax
.L8:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jge	.L9
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	edx, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	add_node
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 104[rdx], rax
.L9:
	mov	rax, QWORD PTR -8[rbp]
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	add_node, .-add_node
	.globl	distance_root_to_node
	.type	distance_root_to_node, @function
distance_root_to_node:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L11
	mov	eax, 0
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L13
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	distance_root_to_node
	add	eax, 1
	jmp	.L10
.L13:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	distance_root_to_node
	add	eax, 1
	jmp	.L10
.L14:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L15
	mov	eax, 0
	jmp	.L10
.L15:
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	distance_root_to_node, .-distance_root_to_node
	.globl	min_distance_btw_nodes
	.type	min_distance_btw_nodes, @function
min_distance_btw_nodes:
.LFB10:
	.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
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	cmp	QWORD PTR -24[rbp], 0
	jne	.L17
	mov	eax, 0
	jmp	.L16
.L17:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -28[rbp], eax
	jge	.L19
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	jge	.L19
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	min_distance_btw_nodes
	jmp	.L16
.L19:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L20
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	jle	.L20
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	min_distance_btw_nodes
	jmp	.L16
.L20:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -28[rbp], eax
	jg	.L21
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	jl	.L21
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	distance_root_to_node
	mov	ebx, eax
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	distance_root_to_node
	add	eax, ebx
	jmp	.L16
.L21:
.L16:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	min_distance_btw_nodes, .-min_distance_btw_nodes
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	create_bst
	.type	create_bst, @function
create_bst:
.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, 144
	mov	QWORD PTR -136[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -120[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L23
.L24:
	lea	rax, -116[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -116[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -112[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	add_node
	mov	rdx, QWORD PTR -136[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -120[rbp]
	sub	eax, 1
	mov	DWORD PTR -120[rbp], eax
.L23:
	mov	eax, DWORD PTR -120[rbp]
	test	eax, eax
	jne	.L24
	nop
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	create_bst, .-create_bst
	.section	.rodata
.LC1:
	.string	"%d "
	.text
	.globl	preorder
	.type	preorder, @function
preorder:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L29
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	rdi, rax
	call	preorder
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	rdi, rax
	call	preorder
	jmp	.L26
.L29:
	nop
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	preorder, .-preorder
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -16[rbp], 0
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	create_bst
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	preorder
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L31
.L34:
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cmp	edx, eax
	jge	.L32
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	min_distance_btw_nodes
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L33
.L32:
	mov	edx, DWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	min_distance_btw_nodes
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L33:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	mov	DWORD PTR -28[rbp], eax
.L31:
	mov	eax, DWORD PTR -28[rbp]
	test	eax, eax
	jne	.L34
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	"903748.c"
	.text
	.align	2
	.global	get_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_node, %function
get_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, #116
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #104]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #108]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #112]
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	get_node, .-get_node
	.align	2
	.global	height
	.syntax unified
	.arm
	.fpu softvfp
	.type	height, %function
height:
	@ 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	.L3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #104]
	mov	r0, r3
	bl	height
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #108]
	mov	r0, r3
	bl	height
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	b	.L2
.L3:
.L2:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	height, .-height
	.align	2
	.global	add_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_node, %function
add_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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L6
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	get_node
	mov	r3, r0
	b	.L7
.L6:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L8
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #108]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	add_node
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #108]
.L8:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L9
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #104]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	add_node
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #104]
.L9:
	ldr	r3, [fp, #-8]
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	add_node, .-add_node
	.align	2
	.global	distance_root_to_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	distance_root_to_node, %function
distance_root_to_node:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L11
	mov	r3, #0
	b	.L10
.L11:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L13
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #108]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	distance_root_to_node
	mov	r3, r0
	add	r3, r3, #1
	b	.L10
.L13:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L14
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #104]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	distance_root_to_node
	mov	r3, r0
	add	r3, r3, #1
	b	.L10
.L14:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L15
	mov	r3, #0
	b	.L10
.L15:
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	distance_root_to_node, .-distance_root_to_node
	.align	2
	.global	min_distance_btw_nodes
	.syntax unified
	.arm
	.fpu softvfp
	.type	min_distance_btw_nodes, %function
min_distance_btw_nodes:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L17
	mov	r3, #0
	b	.L16
.L17:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bge	.L19
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bge	.L19
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #104]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	min_distance_btw_nodes
	mov	r3, r0
	b	.L16
.L19:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	ble	.L20
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	ble	.L20
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #108]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	min_distance_btw_nodes
	mov	r3, r0
	b	.L16
.L20:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bgt	.L21
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L21
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	distance_root_to_node
	mov	r4, r0
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	distance_root_to_node
	mov	r3, r0
	add	r3, r4, r3
	b	.L16
.L21:
.L16:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	min_distance_btw_nodes, .-min_distance_btw_nodes
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	create_bst
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_bst, %function
create_bst:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #116
	mov	r1, r3
	ldr	r0, .L26+4
	bl	__isoc99_scanf
	b	.L23
.L24:
	sub	r3, fp, #112
	mov	r1, r3
	ldr	r0, .L26+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-120]
	ldr	r3, [r3]
	ldr	r2, [fp, #-112]
	sub	r1, fp, #108
	mov	r0, r3
	bl	add_node
	mov	r2, r0
	ldr	r3, [fp, #-120]
	str	r2, [r3]
	ldr	r3, [fp, #-116]
	sub	r3, r3, #1
	str	r3, [fp, #-116]
.L23:
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bne	.L24
	nop
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC1
	.word	.LC0
	.size	create_bst, .-create_bst
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d \000"
	.text
	.align	2
	.global	preorder
	.syntax unified
	.arm
	.fpu softvfp
	.type	preorder, %function
preorder:
	@ 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	.L31
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L32
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #104]
	mov	r0, r3
	bl	preorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #108]
	mov	r0, r3
	bl	preorder
	b	.L28
.L31:
	nop
.L28:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC2
	.size	preorder, .-preorder
	.section	.rodata
	.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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-24]
	sub	r3, fp, #24
	mov	r0, r3
	bl	create_bst
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	preorder
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L40+4
	bl	__isoc99_scanf
	b	.L35
.L38:
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L40+4
	bl	__isoc99_scanf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L40+4
	bl	__isoc99_scanf
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bge	.L36
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r0, r3
	bl	min_distance_btw_nodes
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L40+8
	bl	printf
	b	.L37
.L36:
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-12]
	ldr	r2, [fp, #-16]
	mov	r0, r3
	bl	min_distance_btw_nodes
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L40+8
	bl	printf
.L37:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
.L35:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L38
	nop
	ldr	r3, .L40
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L39
	bl	__stack_chk_fail
.L39:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC3
	.word	.LC0
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
