	.file	"93290.c"
	.intel_syntax noprefix
	.text
	.globl	preorder
	.bss
	.align 8
	.type	preorder, @object
	.size	preorder, 8
preorder:
	.zero	8
	.globl	inorder
	.align 8
	.type	inorder, @object
	.size	inorder, 8
inorder:
	.zero	8
	.globl	top_preorder
	.data
	.align 4
	.type	top_preorder, @object
	.size	top_preorder, 4
top_preorder:
	.long	-1
	.globl	top_inorder
	.align 4
	.type	top_inorder, @object
	.size	top_inorder, 4
top_inorder:
	.long	-1
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.text
	.globl	bt_create
	.type	bt_create, @function
bt_create:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	DWORD PTR -44[rbp], edx
	mov	DWORD PTR -48[rbp], ecx
	mov	rdx, QWORD PTR preorder[rip]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -20[rbp], -1
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -16[rbp], eax
	jmp	.L2
.L5:
	mov	rdx, QWORD PTR inorder[rip]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L3
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L4
.L3:
	add	DWORD PTR -16[rbp], 1
.L2:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jle	.L5
.L4:
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jge	.L6
	mov	eax, DWORD PTR -20[rbp]
	lea	ecx, -1[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	sub	eax, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -36[rbp]
	lea	edi, 1[rdx]
	mov	edx, DWORD PTR -44[rbp]
	mov	esi, eax
	call	bt_create
	jmp	.L7
.L6:
	mov	eax, 0
.L7:
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	sub	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -40[rbp], eax
	jle	.L8
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jge	.L8
	mov	eax, DWORD PTR -20[rbp]
	lea	esi, 1[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	sub	eax, DWORD PTR -44[rbp]
	lea	edi, 1[rax]
	mov	edx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	ecx, edx
	mov	edx, esi
	mov	esi, eax
	call	bt_create
	jmp	.L9
.L8:
	mov	eax, 0
.L9:
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	bt_create, .-bt_create
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	bt_postorder
	.type	bt_postorder, @function
bt_postorder:
.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
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L12
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	bt_postorder
.L12:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L13
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	bt_postorder
.L13:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR N[rip]
	sub	eax, 1
	mov	DWORD PTR N[rip], eax
	mov	eax, DWORD PTR N[rip]
	test	eax, eax
	je	.L15
	mov	edi, 32
	call	putchar@PLT
.L15:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	bt_postorder, .-bt_postorder
	.section	.rodata
.LC1:
	.string	"%[^ \n]s"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, N[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	mov	eax, DWORD PTR N[rip]
	cdqe
	sal	rax, 2
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR preorder[rip], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR inorder[rip], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -36[rbp], -1
	jmp	.L17
.L20:
	movzx	eax, BYTE PTR -12[rbp]
	cmp	al, 111
	jne	.L18
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -36[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR inorder[rip]
	mov	edx, DWORD PTR top_inorder[rip]
	add	edx, 1
	mov	DWORD PTR top_inorder[rip], edx
	mov	edx, DWORD PTR top_inorder[rip]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	jmp	.L19
.L18:
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rdx, QWORD PTR preorder[rip]
	mov	eax, DWORD PTR top_preorder[rip]
	add	eax, 1
	mov	DWORD PTR top_preorder[rip], eax
	mov	eax, DWORD PTR top_preorder[rip]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -36[rbp], 1
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR [rdx], eax
.L19:
	call	getchar@PLT
.L17:
	lea	rax, -13[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, -1
	jne	.L20
	mov	eax, DWORD PTR N[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR N[rip]
	sub	eax, 1
	mov	ecx, edx
	mov	edx, 0
	mov	esi, eax
	mov	edi, 0
	call	bt_create
	mov	rdi, rax
	call	bt_postorder
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"93290.c"
	.text
	.comm	preorder,4,4
	.comm	inorder,4,4
	.global	top_preorder
	.data
	.align	2
	.type	top_preorder, %object
	.size	top_preorder, 4
top_preorder:
	.word	-1
	.global	top_inorder
	.align	2
	.type	top_inorder, %object
	.size	top_inorder, 4
top_inorder:
	.word	-1
	.comm	N,4,4
	.text
	.align	2
	.global	bt_create
	.syntax unified
	.arm
	.fpu softvfp
	.type	bt_create, %function
bt_create:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mvn	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-16]
	b	.L2
.L5:
	ldr	r3, .L11+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L3
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-20]
	b	.L4
.L3:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	ble	.L5
.L4:
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bge	.L6
	ldr	r3, [fp, #-24]
	add	r0, r3, #1
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	sub	r1, r2, r3
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	ldr	r2, [fp, #-32]
	bl	bt_create
	mov	r3, r0
	b	.L7
.L6:
	mov	r3, #0
.L7:
	ldr	r2, [fp, #-8]
	str	r3, [r2, #4]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L8
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bge	.L8
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	add	r0, r3, #1
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-28]
	bl	bt_create
	mov	r3, r0
	b	.L9
.L8:
	mov	r3, #0
.L9:
	ldr	r2, [fp, #-8]
	str	r3, [r2, #8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	preorder
	.word	inorder
	.size	bt_create, .-bt_create
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.text
	.align	2
	.global	bt_postorder
	.syntax unified
	.arm
	.fpu softvfp
	.type	bt_postorder, %function
bt_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]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L14
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	bt_postorder
.L14:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	bt_postorder
.L15:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L18
	bl	printf
	ldr	r3, .L18+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L18+4
	str	r3, [r2]
	ldr	r3, .L18+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L17
	mov	r0, #32
	bl	putchar
.L17:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	N
	.size	bt_postorder, .-bt_postorder
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%[^ \012]s\000"
	.align	2
.LC2:
	.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, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L27+4
	ldr	r0, .L27+8
	bl	__isoc99_scanf
	bl	getchar
	ldr	r3, .L27+4
	ldr	r3, [r3]
	lsl	r3, r3, #2
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-24]
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+12
	str	r2, [r3]
	ldr	r0, [fp, #-24]
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+16
	str	r2, [r3]
	ldr	r0, [fp, #-24]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mvn	r3, #0
	str	r3, [fp, #-28]
	b	.L21
.L24:
	ldrb	r3, [fp, #-15]	@ zero_extendqisi2
	cmp	r3, #111
	bne	.L22
	ldr	r3, [fp, #-28]
	sub	r2, r3, #1
	str	r2, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, .L27+16
	ldr	r1, [r3]
	ldr	r3, .L27+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r0, .L27+20
	str	r3, [r0]
	ldr	r3, .L27+20
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	b	.L23
.L22:
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L27+8
	bl	__isoc99_scanf
	ldr	r3, .L27+12
	ldr	r2, [r3]
	ldr	r3, .L27+24
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r1, .L27+24
	str	r3, [r1]
	ldr	r3, .L27+24
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	str	r2, [r3]
.L23:
	bl	getchar
.L21:
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L27+28
	bl	__isoc99_scanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L24
	ldr	r3, .L27+4
	ldr	r3, [r3]
	sub	r1, r3, #1
	ldr	r3, .L27+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r2, #0
	mov	r0, #0
	bl	bt_create
	mov	r3, r0
	mov	r0, r3
	bl	bt_postorder
	mov	r3, #0
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC2
	.word	N
	.word	.LC0
	.word	preorder
	.word	inorder
	.word	top_inorder
	.word	top_preorder
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
