	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -56(%rbp)
	movl	$0, -52(%rbp)
	movl	$0, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	leaq	-60(%rbp), %rsi
	callq	_scanf
	cmpl	$0, -60(%rbp)
	jle	LBB0_16
## %bb.1:
	movq	_T@GOTPCREL(%rip), %rbx
	movq	_arr@GOTPCREL(%rip), %r14
	leaq	L_.str.3(%rip), %r12
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	leaq	-44(%rbp), %rsi
	callq	_scanf
	movl	(%rbx), %edi
	movl	-44(%rbp), %esi
	callq	_tree23_lookup
	testl	%eax, %eax
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str.2(%rip), %rax
	cmoveq	%rax, %rdi
	callq	_puts
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	movl	$-1000000000, %esi              ## imm = 0xC4653600
	movl	$1000000000, %edx               ## imm = 0x3B9ACA00
	callq	_check
	testl	%eax, %eax
	js	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	cmpl	-60(%rbp), %r13d
	jge	LBB0_16
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	leaq	L_.str(%rip), %rdi
	leaq	-64(%rbp), %rsi
	callq	_scanf
	movl	-64(%rbp), %eax
	decl	%eax
	cmpl	$3, %eax
	ja	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	leaq	-44(%rbp), %rsi
	callq	_scanf
	movl	(%rbx), %edi
	movl	-44(%rbp), %esi
	callq	_tree23_lookup
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	callq	_tree23_insert
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	leaq	-44(%rbp), %rsi
	callq	_scanf
	movl	(%rbx), %edi
	movq	(%r14), %rsi
	callq	_sort
	movq	(%r14), %rcx
	subq	%rcx, %rax
	shrq	$2, %rax
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jle	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx), %esi
	movq	%r12, %rdi
	movl	$10, %edx
	xorl	%eax, %eax
	callq	_printf
	cmpl	$2, -44(%rbp)
	jl	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %rax
	movl	(%rax,%r15,4), %esi
	movq	%r12, %rdi
	movl	$10, %edx
	xorl	%eax, %eax
	callq	_printf
	incq	%r15
	movslq	-44(%rbp), %rax
	cmpq	%rax, %r15
	jl	LBB0_10
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	leaq	-44(%rbp), %rsi
	callq	_scanf
	movl	(%rbx), %edi
	movl	-44(%rbp), %esi
	callq	_tree23_lookup
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	callq	_tree23_delete
	jmp	LBB0_13
LBB0_16:
	movq	_T@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	$-1000000000, %esi              ## imm = 0xC4653600
	movl	$1000000000, %edx               ## imm = 0x3B9ACA00
	callq	_check
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r14), %edi
	callq	_dump
	movl	(%r14), %edi
	movq	_arr@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	callq	_sort
	movq	(%r15), %rcx
	subq	%rcx, %rax
	shrq	$2, %rax
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jle	LBB0_20
## %bb.17:
	movl	(%rcx), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	$10, %edx
	xorl	%eax, %eax
	callq	_printf
	cmpl	$2, -44(%rbp)
	jl	LBB0_20
## %bb.18:
	movl	$1, %ebx
	leaq	L_.str.3(%rip), %r12
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r12, %rdi
	movl	$10, %edx
	xorl	%eax, %eax
	callq	_printf
	incq	%rbx
	movslq	-44(%rbp), %rax
	cmpq	%rax, %rbx
	jl	LBB0_19
LBB0_20:
	movl	(%r14), %edi
	leaq	-56(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_count
	movq	_lp@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_np@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ld@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_nd@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%esi, %r9d
	subl	%ecx, %r9d
	movl	%edx, %eax
	subl	%r8d, %eax
	movl	%eax, (%rsp)
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	-56(%rbp), %esi
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %ecx
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

	.comm	_T,4,2                          ## @T
L_.str.1:                               ## @.str.1
	.asciz	"YES"

L_.str.2:                               ## @.str.2
	.asciz	"NO"

	.comm	_arr,8,3                        ## @arr
L_.str.3:                               ## @.str.3
	.asciz	"%d%c"

L_.str.5:                               ## @.str.5
	.asciz	"%d\n"

L_.str.6:                               ## @.str.6
	.asciz	"leaves allocated %d\nnodes allocated %d\nleaves freed %d\nnodes freed %d\nleaves current %d\nnodes current %d\n"

	.comm	_lp,4,2                         ## @lp
	.comm	_np,4,2                         ## @np
	.comm	_ld,4,2                         ## @ld
	.comm	_nd,4,2                         ## @nd
L_.str.7:                               ## @.str.7
	.asciz	"leaves in tree %d\nnodes in tree %d\nnumbers in tree %d\n"

L_str:                                  ## @str
	.asciz	"BAD TREE"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	wzr, [sp, #64]
	str	xzr, [sp, #56]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #76
	bl	_scanf
	ldr	w8, [sp, #76]
Lloh2:
	adrp	x19, _T@GOTPAGE
Lloh3:
	ldr	x19, [x19, _T@GOTPAGEOFF]
Lloh4:
	adrp	x23, _arr@GOTPAGE
Lloh5:
	ldr	x23, [x23, _arr@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.1:
	mov	w24, #0
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
Lloh8:
	adrp	x21, l_str@PAGE
Lloh9:
	add	x21, x21, l_str@PAGEOFF
Lloh10:
	adrp	x25, lJTI0_0@PAGE
Lloh11:
	add	x25, x25, lJTI0_0@PAGEOFF
Lloh12:
	adrp	x27, l_.str.2@PAGE
Lloh13:
	add	x27, x27, l_.str.2@PAGEOFF
	mov	w28, #10
Lloh14:
	adrp	x22, l_.str.3@PAGE
Lloh15:
	add	x22, x22, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #68
	mov	x0, x20
	bl	_scanf
	ldr	w0, [x19]
	ldr	w1, [sp, #68]
	bl	_tree23_lookup
	cmp	w0, #0
Lloh16:
	adrp	x8, l_.str.1@PAGE
Lloh17:
	add	x8, x8, l_.str.1@PAGEOFF
	csel	x0, x27, x8, eq
	bl	_puts
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19]
	mov	w1, #13824
	movk	w1, #50277, lsl #16
	mov	w2, #51712
	movk	w2, #15258, lsl #16
	bl	_check
	tbnz	w0, #31, LBB0_9
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, #1
	ldr	w8, [sp, #76]
	cmp	w24, w8
	b.ge	LBB0_16
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	add	x1, sp, #72
	mov	x0, x20
	bl	_scanf
	ldr	w8, [sp, #72]
	sub	w8, w8, #1
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	adr	x9, LBB0_2
	ldrb	w10, [x25, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #68
	mov	x0, x20
	bl	_scanf
	ldr	w0, [x19]
	ldr	w1, [sp, #68]
	bl	_tree23_lookup
	cbnz	w0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [sp, #68]
	mov	x0, x19
	bl	_tree23_insert
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_puts
	b	LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #68
	mov	x0, x20
	bl	_scanf
	ldr	w0, [x19]
	ldr	x1, [x23]
	bl	_sort
	ldr	x8, [x23]
	sub	x9, x0, x8
	lsr	x9, x9, #2
	str	w9, [sp, #68]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x8]
	stp	x8, x28, [sp]
	mov	x0, x22
	bl	_printf
	ldr	w8, [sp, #68]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w26, #1
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x23]
	ldr	w8, [x8, x26, lsl #2]
	stp	x8, x28, [sp]
	mov	x0, x22
	bl	_printf
	add	x26, x26, #1
	ldrsw	x8, [sp, #68]
	cmp	x26, x8
	b.lt	LBB0_13
	b	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #68
	mov	x0, x20
	bl	_scanf
	ldr	w0, [x19]
	ldr	w1, [sp, #68]
	bl	_tree23_lookup
	cbz	w0, LBB0_3
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [sp, #68]
	mov	x0, x19
	bl	_tree23_delete
	b	LBB0_3
LBB0_16:
	ldr	w0, [x19]
	mov	w1, #13824
	movk	w1, #50277, lsl #16
	mov	w2, #51712
	movk	w2, #15258, lsl #16
	bl	_check
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh18:
	adrp	x0, l_.str.5@PAGE
Lloh19:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
	ldr	w0, [x19]
	bl	_dump
	ldr	w0, [x19]
	ldr	x1, [x23]
	bl	_sort
	ldr	x8, [x23]
	sub	x9, x0, x8
	lsr	x9, x9, #2
	str	w9, [sp, #68]
	cmp	w9, #1
	b.lt	LBB0_20
; %bb.17:
	ldr	w8, [x8]
	mov	w9, #10
	stp	x8, x9, [sp]
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	ldr	w8, [sp, #68]
	cmp	w8, #2
	b.lt	LBB0_20
; %bb.18:
	mov	w21, #1
	mov	w22, #10
Lloh22:
	adrp	x20, l_.str.3@PAGE
Lloh23:
	add	x20, x20, l_.str.3@PAGEOFF
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	w8, [x8, x21, lsl #2]
	stp	x8, x22, [sp]
	mov	x0, x20
	bl	_printf
	add	x21, x21, #1
	ldrsw	x8, [sp, #68]
	cmp	x21, x8
	b.lt	LBB0_19
LBB0_20:
	ldr	w0, [x19]
	add	x1, sp, #64
	add	x2, sp, #60
	add	x3, sp, #56
	bl	_count
Lloh24:
	adrp	x8, _lp@GOTPAGE
Lloh25:
	ldr	x8, [x8, _lp@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _np@GOTPAGE
Lloh28:
	ldr	x9, [x9, _np@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
Lloh30:
	adrp	x10, _ld@GOTPAGE
Lloh31:
	ldr	x10, [x10, _ld@GOTPAGEOFF]
Lloh32:
	ldr	w10, [x10]
Lloh33:
	adrp	x11, _nd@GOTPAGE
Lloh34:
	ldr	x11, [x11, _nd@GOTPAGEOFF]
Lloh35:
	ldr	w11, [x11]
	sub	w12, w8, w10
	sub	w13, w9, w11
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
	stp	x12, x13, [sp, #32]
Lloh36:
	adrp	x0, l_.str.6@PAGE
Lloh37:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_printf
	ldp	w9, w8, [sp, #60]
	ldr	w10, [sp, #56]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh38:
	adrp	x0, l_.str.7@PAGE
Lloh39:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_printf
	mov	w0, #0
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

	.comm	_T,4,2                          ; @T
l_.str.1:                               ; @.str.1
	.asciz	"YES"

l_.str.2:                               ; @.str.2
	.asciz	"NO"

	.comm	_arr,8,3                        ; @arr
l_.str.3:                               ; @.str.3
	.asciz	"%d%c"

l_.str.5:                               ; @.str.5
	.asciz	"%d\n"

l_.str.6:                               ; @.str.6
	.asciz	"leaves allocated %d\nnodes allocated %d\nleaves freed %d\nnodes freed %d\nleaves current %d\nnodes current %d\n"

	.comm	_lp,4,2                         ; @lp
	.comm	_np,4,2                         ; @np
	.comm	_ld,4,2                         ; @ld
	.comm	_nd,4,2                         ; @nd
l_.str.7:                               ; @.str.7
	.asciz	"leaves in tree %d\nnodes in tree %d\nnumbers in tree %d\n"

l_str:                                  ; @str
	.asciz	"BAD TREE"

.subsections_via_symbols
