	.file	"397695.c"
	.intel_syntax noprefix
	.text
	.globl	max
	.type	max, @function
max:
.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	cmp	QWORD PTR -16[rbp], rax
	cmovge	rax, QWORD PTR -16[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	max, .-max
	.globl	step
	.data
	.align 4
	.type	step, @object
	.size	step, 4
step:
	.long	1
	.globl	last_random
	.bss
	.align 4
	.type	last_random, @object
	.size	last_random, 4
last_random:
	.zero	4
	.globl	count
	.align 32
	.type	count, @object
	.size	count, 80040
count:
	.zero	80040
	.globl	flag
	.data
	.align 4
	.type	flag, @object
	.size	flag, 4
flag:
	.long	1
	.globl	maxi
	.align 8
	.type	maxi, @object
	.size	maxi, 8
maxi:
	.quad	-10100
	.globl	max_head
	.bss
	.align 8
	.type	max_head, @object
	.size	max_head, 8
max_head:
	.zero	8
	.text
	.globl	generate_random
	.type	generate_random, @function
generate_random:
.LFB7:
	.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, 56
	.cfi_offset 3, -24
	mov	DWORD PTR -52[rbp], edi
	mov	DWORD PTR -56[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	time@PLT
	mov	edx, eax
	mov	eax, DWORD PTR last_random[rip]
	add	eax, edx
	mov	edi, eax
	call	srand@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	time@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -56[rbp]
	add	edx, eax
	mov	eax, DWORD PTR step[rip]
	add	edx, eax
	mov	eax, DWORD PTR last_random[rip]
	add	eax, edx
	mov	edi, eax
	call	srand@PLT
	cmp	DWORD PTR -52[rbp], 1
	jne	.L4
.L7:
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	time@PLT
	mov	ebx, eax
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 100
	sub	eax, ecx
	mov	edx, eax
	mov	eax, edx
	lea	edx, [rbx+rax]
	mov	eax, DWORD PTR -56[rbp]
	add	edx, eax
	mov	eax, DWORD PTR step[rip]
	add	edx, eax
	mov	eax, DWORD PTR last_random[rip]
	add	eax, edx
	add	eax, 1
	mov	edi, eax
	call	srand@PLT
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	mov	ecx, eax
	sar	ecx, 31
	mov	ebx, edx
	sub	ebx, ecx
	imul	edx, ebx, 100
	sub	eax, edx
	mov	ebx, eax
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 100
	sub	eax, ecx
	mov	edx, eax
	mov	eax, ebx
	sub	eax, edx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR -36[rbp], xmm0
	movss	xmm0, DWORD PTR -36[rbp]
	cvttss2si	eax, xmm0
	mov	DWORD PTR last_random[rip], eax
	movss	xmm0, DWORD PTR -36[rbp]
	cvttss2si	eax, xmm0
	add	eax, 10000
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, count[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L12
	jmp	.L7
.L12:
	nop
	movss	xmm0, DWORD PTR -36[rbp]
	cvttss2si	eax, xmm0
	add	eax, 10000
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, count[rip]
	mov	DWORD PTR [rdx+rax], 1
	jmp	.L8
.L4:
	call	rand@PLT
	mov	edx, eax
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 3
	mov	esi, edx
	sar	esi, 31
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	sal	eax, 2
	mov	ecx, edx
	sub	ecx, eax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, ecx
	movsd	xmm0, QWORD PTR .LC0[rip]
	addsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR .LC1[rip]
	divsd	xmm0, xmm1
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR -36[rbp], xmm0
.L8:
	movss	xmm0, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	generate_random, .-generate_random
	.globl	generate_tree
	.type	generate_tree, @function
generate_tree:
.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	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR step[rip]
	add	eax, 1
	mov	DWORD PTR step[rip], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L14
	mov	eax, 0
	jmp	.L15
.L14:
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	mov	edi, 0
	call	generate_random
	movd	eax, xmm0
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	mulss	xmm0, DWORD PTR -16[rbp]
	pxor	xmm1, xmm1
	cvtss2sd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	call	ceil@PLT
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -12[rbp], eax
	mov	edi, 48
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR step[rip]
	add	eax, 1
	mov	DWORD PTR step[rip], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 32[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 40[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], -1000
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], -1000
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], -1000
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	mov	edi, 1
	call	generate_random
	cvttss2si	edx, xmm0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	generate_tree
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 32[rdx], rax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	mov	edi, eax
	call	generate_tree
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 40[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	generate_tree, .-generate_tree
	.section	.rodata
.LC2:
	.string	"%d "
	.text
	.globl	inorder
	.type	inorder, @function
inorder:
.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
	cmp	QWORD PTR -8[rbp], 0
	je	.L19
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	inorder
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	inorder
	jmp	.L16
.L19:
	nop
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	inorder, .-inorder
	.globl	preorder
	.type	preorder, @function
preorder:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	preorder
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	preorder
	jmp	.L20
.L23:
	nop
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	preorder, .-preorder
	.globl	postorder
	.type	postorder, @function
postorder:
.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
	je	.L27
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	postorder
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	postorder
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L24
.L27:
	nop
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	postorder, .-postorder
	.globl	max_sum_root_leaf
	.type	max_sum_root_leaf, @function
max_sum_root_leaf:
.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
	jne	.L29
	mov	eax, 0
	jmp	.L30
.L29:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	jne	.L31
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	test	rax, rax
	jne	.L31
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	jmp	.L30
.L31:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	jne	.L32
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], -10000
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	max_sum_root_leaf
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rax, rdx
	jmp	.L30
.L32:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	test	rax, rax
	jne	.L33
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], -10000
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	max_sum_root_leaf
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rax, rdx
	jmp	.L30
.L33:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	max_sum_root_leaf
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	max_sum_root_leaf
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	cmp	rdx, rax
	jle	.L34
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	jmp	.L30
.L34:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	max_sum_root_leaf, .-max_sum_root_leaf
	.globl	print_key_root_leaf
	.type	print_key_root_leaf, @function
print_key_root_leaf:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L42
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	test	rax, rax
	jne	.L38
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	jne	.L38
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L35
.L38:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	test	rax, rax
	jne	.L39
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	print_key_root_leaf
	jmp	.L35
.L39:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	jne	.L40
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	print_key_root_leaf
	jmp	.L35
.L40:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	cmp	rdx, rax
	jle	.L41
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	print_key_root_leaf
	jmp	.L35
.L41:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	print_key_root_leaf
	jmp	.L35
.L42:
	nop
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	print_key_root_leaf, .-print_key_root_leaf
	.globl	max_sum_all_path
	.type	max_sum_all_path, @function
max_sum_all_path:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 32
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	QWORD PTR -40[rbp], rdi
	cmp	QWORD PTR -40[rbp], 0
	jne	.L44
	mov	eax, 0
	jmp	.L45
.L44:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	max_sum_all_path
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	max_sum_all_path
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sub	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	movsx	rbx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	r12, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	max
	mov	rsi, r12
	mov	rdi, rax
	call	max
	mov	rsi, rbx
	mov	rdi, rax
	call	max
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR maxi[rip]
	cmp	QWORD PTR -24[rbp], rax
	jle	.L46
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR maxi[rip], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR max_head[rip], rax
.L46:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	movsx	rbx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	max
	mov	rsi, rbx
	mov	rdi, rax
	call	max
.L45:
	add	rsp, 32
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	max_sum_all_path, .-max_sum_all_path
	.globl	print_key_max_path
	.type	print_key_max_path, @function
print_key_max_path:
.LFB15:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	movsx	rbx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	max
	mov	rsi, rbx
	mov	rdi, rax
	call	max
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	cmp	QWORD PTR -24[rbp], rax
	je	.L51
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR -24[rbp], rax
	jne	.L50
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	print_key_max_path
	jmp	.L47
.L50:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	print_key_max_path
	jmp	.L47
.L51:
	nop
.L47:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	print_key_max_path, .-print_key_max_path
	.globl	print_key_max_root
	.type	print_key_max_root, @function
print_key_max_root:
.LFB16:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	movsx	rbx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	max
	mov	rsi, rbx
	mov	rdi, rax
	call	max
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	cmp	QWORD PTR -24[rbp], rax
	jne	.L53
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L52
.L53:
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jne	.L55
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	print_key_max_root
	jmp	.L52
.L55:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR -24[rbp], rax
	jne	.L56
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	print_key_max_root
	jmp	.L57
.L56:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	print_key_max_root
.L57:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L52:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	print_key_max_root, .-print_key_max_root
	.section	.rodata
	.align 8
.LC3:
	.string	"Enter number of nodes in binary tree"
.LC4:
	.string	"%d"
	.align 8
.LC5:
	.string	"Inorder of the binary tree is:"
	.align 8
.LC6:
	.string	"\nPreorder of the binary tree is:"
	.align 8
.LC7:
	.string	"\nPostorder of the binary tree is:"
	.align 8
.LC8:
	.string	"Maximum sum from root to leaf is %ld\n"
	.align 8
.LC9:
	.string	"The keys are along maximum sum path from root to leaf are :"
	.align 8
.LC10:
	.string	"\nThe maximum sum among all paths is %ld\n"
	.align 8
.LC11:
	.string	"The keys along the maximum sum path from any 2 nodes are:"
	.text
	.globl	main
	.type	main, @function
main:
.LFB17:
	.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, 40
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -44[rbp], 0
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	generate_tree
	mov	QWORD PTR -40[rbp], rax
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	inorder
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	preorder
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	postorder
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	max_sum_root_leaf
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	print_key_root_leaf
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	max_sum_all_path
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR maxi[rip]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	rax, QWORD PTR max_head[rip]
	mov	eax, DWORD PTR [rax]
	movsx	rbx, eax
	mov	rax, QWORD PTR max_head[rip]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR max_head[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	max
	mov	rsi, rbx
	mov	rdi, rax
	call	max
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR maxi[rip]
	cmp	QWORD PTR -32[rbp], rax
	jne	.L59
	mov	rax, QWORD PTR max_head[rip]
	mov	rdi, rax
	call	print_key_max_path
	jmp	.L60
.L59:
	mov	rdx, QWORD PTR max_head[rip]
	mov	rax, QWORD PTR max_head[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	print_key_max_root
	mov	rax, QWORD PTR max_head[rip]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR max_head[rip]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	print_key_max_path
.L60:
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L62
	call	__stack_chk_fail@PLT
.L62:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1078198272
	.align 8
.LC1:
	.long	0
	.long	1079574528
	.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	"397695.c"
	.text
	.align	2
	.global	max
	.syntax unified
	.arm
	.fpu softvfp
	.type	max, %function
max:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	max, .-max
	.global	step
	.data
	.align	2
	.type	step, %object
	.size	step, 4
step:
	.word	1
	.global	last_random
	.bss
	.align	2
	.type	last_random, %object
	.size	last_random, 4
last_random:
	.space	4
	.global	count
	.align	2
	.type	count, %object
	.size	count, 80040
count:
	.space	80040
	.global	flag
	.data
	.align	2
	.type	flag, %object
	.size	flag, 4
flag:
	.word	1
	.global	maxi
	.align	2
	.type	maxi, %object
	.size	maxi, 4
maxi:
	.word	-10100
	.comm	max_head,4,4
	.global	__aeabi_i2d
	.global	__aeabi_d2f
	.global	__aeabi_f2iz
	.global	__aeabi_dadd
	.global	__aeabi_ddiv
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	generate_random
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_random, %function
generate_random:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r0, r3
	bl	time
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L13+4
	ldr	r3, [r3]
	add	r3, r2, r3
	mov	r0, r3
	bl	srand
	sub	r3, fp, #24
	mov	r0, r3
	bl	time
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	ldr	r2, .L13+8
	ldr	r2, [r2]
	add	r3, r3, r2
	ldr	r2, .L13+4
	ldr	r2, [r2]
	add	r3, r3, r2
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	bne	.L4
.L7:
	sub	r3, fp, #24
	mov	r0, r3
	bl	time
	mov	r3, r0
	mov	r4, r3
	bl	rand
	mov	r2, r0
	ldr	r3, .L13+12
	smull	r1, r3, r2, r3
	asr	r1, r3, #5
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	sub	r1, r2, r3
	mov	r3, r1
	add	r2, r4, r3
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	ldr	r2, .L13+8
	ldr	r2, [r2]
	add	r3, r3, r2
	ldr	r2, .L13+4
	ldr	r2, [r2]
	add	r3, r3, r2
	add	r3, r3, #1
	mov	r0, r3
	bl	srand
	bl	rand
	mov	r2, r0
	ldr	r3, .L13+12
	smull	r1, r3, r2, r3
	asr	r1, r3, #5
	asr	r3, r2, #31
	sub	r4, r1, r3
	mov	r3, r4
	lsl	r3, r3, #2
	add	r3, r3, r4
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	sub	r4, r2, r3
	bl	rand
	mov	r1, r0
	ldr	r3, .L13+12
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	sub	r3, r4, r2
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r3, r0
	str	r3, [fp, #-20]	@ float
	ldr	r0, [fp, #-20]	@ float
	bl	__aeabi_f2iz
	mov	r3, r0
	ldr	r2, .L13+4
	str	r3, [r2]
	ldr	r0, [fp, #-20]	@ float
	bl	__aeabi_f2iz
	mov	r3, r0
	add	r3, r3, #9984
	add	r3, r3, #16
	ldr	r2, .L13+16
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L12
	b	.L7
.L12:
	nop
	ldr	r0, [fp, #-20]	@ float
	bl	__aeabi_f2iz
	mov	r3, r0
	add	r3, r3, #9984
	add	r3, r3, #16
	ldr	r2, .L13+16
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
	b	.L8
.L4:
	bl	rand
	mov	r1, r0
	ldr	r3, .L13+20
	smull	r2, r3, r1, r3
	asr	r2, r3, #3
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	mov	r0, r2
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L13+24
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L13+28
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r3, r0
	str	r3, [fp, #-20]	@ float
.L8:
	ldr	r3, [fp, #-20]	@ float
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	last_random
	.word	step
	.word	1374389535
	.word	count
	.word	1717986919
	.word	1078198272
	.word	1079574528
	.size	generate_random, .-generate_random
	.global	__aeabi_i2f
	.global	__aeabi_fmul
	.global	__aeabi_f2d
	.global	__aeabi_d2iz
	.align	2
	.global	generate_tree
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_tree, %function
generate_tree:
	@ 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]
	ldr	r3, .L18
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L18
	str	r3, [r2]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L16
	mov	r3, #0
	b	.L17
.L16:
	ldr	r1, [fp, #-24]
	mov	r0, #0
	bl	generate_random
	str	r0, [fp, #-16]	@ float
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	mov	r0, r3
	bl	__aeabi_i2f
	mov	r3, r0
	ldr	r1, [fp, #-16]	@ float
	mov	r0, r3
	bl	__aeabi_fmul
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	ceil
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r0, #24
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, .L18
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L18
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #20]
	ldr	r3, [fp, #-8]
	ldr	r2, .L18+4
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r2, .L18+4
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L18+4
	str	r2, [r3, #12]
	ldr	r1, [fp, #-24]
	mov	r0, #1
	bl	generate_random
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2iz
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r0, [fp, #-12]
	bl	generate_tree
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #16]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	sub	r3, r3, #1
	mov	r0, r3
	bl	generate_tree
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-8]
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	step
	.word	-1000
	.size	generate_tree, .-generate_tree
	.section	.rodata
	.align	2
.LC1:
	.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	.L23
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	inorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L24
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	inorder
	b	.L20
.L23:
	nop
.L20:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC1
	.size	inorder, .-inorder
	.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	.L29
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L30
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	preorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	preorder
	b	.L26
.L29:
	nop
.L26:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC1
	.size	preorder, .-preorder
	.align	2
	.global	postorder
	.syntax unified
	.arm
	.fpu softvfp
	.type	postorder, %function
postorder:
	@ 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	.L35
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	postorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	postorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L36
	bl	printf
	b	.L32
.L35:
	nop
.L32:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC1
	.size	postorder, .-postorder
	.align	2
	.global	max_sum_root_leaf
	.syntax unified
	.arm
	.fpu softvfp
	.type	max_sum_root_leaf, %function
max_sum_root_leaf:
	@ 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	.L39
	mov	r3, #0
	b	.L40
.L39:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	bne	.L41
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	bne	.L41
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	b	.L40
.L41:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	bne	.L42
	ldr	r3, [fp, #-8]
	ldr	r2, .L45
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	max_sum_root_leaf
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r3, r2, r3
	b	.L40
.L42:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	bne	.L43
	ldr	r3, [fp, #-8]
	ldr	r2, .L45
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	max_sum_root_leaf
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r3, r2, r3
	b	.L40
.L43:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	max_sum_root_leaf
	mov	r2, r0
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	max_sum_root_leaf
	mov	r2, r0
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r2, r3
	ble	.L44
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	b	.L40
.L44:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
.L40:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	-10000
	.size	max_sum_root_leaf, .-max_sum_root_leaf
	.align	2
	.global	print_key_root_leaf
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_key_root_leaf, %function
print_key_root_leaf:
	@ 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	.L54
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	bne	.L50
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	bne	.L50
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L55
	bl	printf
	b	.L47
.L50:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	bne	.L51
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L55
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	print_key_root_leaf
	b	.L47
.L51:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	bne	.L52
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L55
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	print_key_root_leaf
	b	.L47
.L52:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L55
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r2, r3
	ble	.L53
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	print_key_root_leaf
	b	.L47
.L53:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	print_key_root_leaf
	b	.L47
.L54:
	nop
.L47:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L56:
	.align	2
.L55:
	.word	.LC1
	.size	print_key_root_leaf, .-print_key_root_leaf
	.align	2
	.global	max_sum_all_path
	.syntax unified
	.arm
	.fpu softvfp
	.type	max_sum_all_path, %function
max_sum_all_path:
	@ 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
	bne	.L58
	mov	r3, #0
	b	.L59
.L58:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	max_sum_all_path
	mov	r2, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	max_sum_all_path
	mov	r2, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	sub	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	max
	mov	r2, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	mov	r1, r3
	mov	r0, r2
	bl	max
	mov	r2, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	max
	str	r0, [fp, #-8]
	ldr	r3, .L61
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L60
	ldr	r2, .L61
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r2, .L61+4
	ldr	r3, [fp, #-16]
	str	r3, [r2]
.L60:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	max
	mov	r2, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	max
	mov	r3, r0
.L59:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L62:
	.align	2
.L61:
	.word	maxi
	.word	max_head
	.size	max_sum_all_path, .-max_sum_all_path
	.align	2
	.global	print_key_max_path
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_key_max_path, %function
print_key_max_path:
	@ 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]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	max
	mov	r2, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	max
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L68
	bl	printf
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	beq	.L67
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bne	.L66
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	print_key_max_path
	b	.L63
.L66:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	print_key_max_path
	b	.L63
.L67:
	nop
.L63:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	.LC1
	.size	print_key_max_path, .-print_key_max_path
	.align	2
	.global	print_key_max_root
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_key_max_root, %function
print_key_max_root:
	@ 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	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	max
	mov	r2, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	max
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bne	.L71
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L76
	bl	printf
	b	.L70
.L71:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bne	.L73
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	print_key_max_root
	b	.L70
.L73:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bne	.L74
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	print_key_max_root
	b	.L75
.L74:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #20]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	print_key_max_root
.L75:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L76
	bl	printf
.L70:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L77:
	.align	2
.L76:
	.word	.LC1
	.size	print_key_max_root, .-print_key_max_root
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Enter number of nodes in binary tree\000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"Inorder of the binary tree is:\000"
	.align	2
.LC5:
	.ascii	"\012Preorder of the binary tree is:\000"
	.align	2
.LC6:
	.ascii	"\012Postorder of the binary tree is:\000"
	.align	2
.LC7:
	.ascii	"Maximum sum from root to leaf is %ld\012\000"
	.align	2
.LC8:
	.ascii	"The keys are along maximum sum path from root to le"
	.ascii	"af are :\000"
	.align	2
.LC9:
	.ascii	"\012The maximum sum among all paths is %ld\012\000"
	.align	2
.LC10:
	.ascii	"The keys along the maximum sum path from any 2 node"
	.ascii	"s are:\000"
	.align	2
.LC11:
	.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, .L83
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r0, .L83+4
	bl	puts
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L83+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	generate_tree
	str	r0, [fp, #-16]
	ldr	r0, .L83+12
	bl	puts
	ldr	r0, [fp, #-16]
	bl	inorder
	ldr	r0, .L83+16
	bl	puts
	ldr	r0, [fp, #-16]
	bl	preorder
	ldr	r0, .L83+20
	bl	puts
	ldr	r0, [fp, #-16]
	bl	postorder
	mov	r0, #10
	bl	putchar
	ldr	r0, [fp, #-16]
	bl	max_sum_root_leaf
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L83+24
	bl	printf
	ldr	r0, .L83+28
	bl	puts
	ldr	r0, [fp, #-16]
	bl	print_key_root_leaf
	ldr	r0, [fp, #-16]
	bl	max_sum_all_path
	str	r0, [fp, #-12]
	ldr	r3, .L83+32
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L83+36
	bl	printf
	ldr	r0, .L83+40
	bl	puts
	ldr	r3, .L83+44
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L83+44
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	max
	mov	r2, r0
	ldr	r3, .L83+44
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	max
	str	r0, [fp, #-12]
	ldr	r3, .L83+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L79
	ldr	r3, .L83+44
	ldr	r3, [r3]
	mov	r0, r3
	bl	print_key_max_path
	b	.L80
.L79:
	ldr	r3, .L83+44
	ldr	r3, [r3]
	ldr	r2, .L83+44
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	print_key_max_root
	ldr	r3, .L83+44
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L83+48
	bl	printf
	ldr	r3, .L83+44
	ldr	r3, [r3]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	print_key_max_path
.L80:
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	ldr	r2, .L83
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L82
	bl	__stack_chk_fail
.L82:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L84:
	.align	2
.L83:
	.word	.LC11
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	maxi
	.word	.LC9
	.word	.LC10
	.word	max_head
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
