	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_simplify_tree                  ## -- Begin function simplify_tree
	.p2align	4, 0x90
_simplify_tree:                         ## @simplify_tree
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	_op_and@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmpq	%rdx, %r13
	je	LBB0_23
## %bb.1:
	movq	_op_or@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_23
## %bb.2:
	movl	(%r15), %eax
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	%r13, %rdi
	callq	_IS_CONST
	testl	%eax, %eax
	je	LBB0_43
## %bb.4:
	movl	(%r15), %eax
LBB0_5:
	movq	_v_int@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	movl	$1, %r12d
	testl	%eax, %eax
	jle	LBB0_9
## %bb.6:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_simplify_tree
	testl	%eax, %eax
	je	LBB0_42
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	40(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	andl	4(%rax), %r12d
	movq	16(%rax), %rsi
	movq	%r13, %rdi
	callq	_max
	movq	%rax, %r13
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_9:
	movq	8(%r15), %rax
	movq	_op_shr@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.10:
	movq	%r13, %rdi
	callq	_IS_STR
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movq	40(%r15), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rdx
	movq	%rdx, (%rax)
	movq	40(%r15), %rax
	movq	%rcx, 8(%rax)
	movq	_op_shl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
LBB0_12:
	movq	_v_string@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_14
## %bb.13:
	movq	_v_cstring@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
LBB0_14:
	cmpl	$0, (%r15)
	jle	LBB0_32
## %bb.15:
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_32
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	cmpq	%r13, 16(%rax)
	je	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r13, %rdi
	callq	_IS_STR
	movl	%eax, %r14d
	movq	40(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movq	16(%rax), %rdi
	callq	_IS_STR
	testl	%r14d, %r14d
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	testl	%eax, %eax
	jne	LBB0_16
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	40(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	%r13, %rsi
	callq	_tree_conv
	movq	40(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	40(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	cmpl	$0, 4(%rdi)
	je	LBB0_16
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	callq	_recalc_node
	testl	%eax, %eax
	jne	LBB0_16
LBB0_36:
	xorl	%r14d, %r14d
	jmp	LBB0_42
LBB0_23:
	xorl	%ebx, %ebx
	cmpq	%rdx, %r13
	setne	%al
	movq	_v_int@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 16(%r15)
	cmpl	$0, (%r15)
	jle	LBB0_35
## %bb.24:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movb	%al, %bl
	movl	$1, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_26 Depth=1
	incq	%r12
	movslq	(%r15), %rax
	cmpq	%rax, %r12
	jge	LBB0_38
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%r15), %rax
	movq	(%rax,%r12,8), %rdi
	callq	_simplify_tree
	testl	%eax, %eax
	je	LBB0_36
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	40(%r15), %rax
	movq	(%rax,%r12,8), %rdi
	movl	4(%rdi), %eax
	movq	16(%rdi), %rcx
	movq	_v_int@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	_v_long@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_36
LBB0_29:                                ##   in Loop: Header=BB0_26 Depth=1
	andl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_25
## %bb.30:                              ##   in Loop: Header=BB0_26 Depth=1
	callq	_to_bool
	cmpl	%ebx, %eax
	jne	LBB0_25
## %bb.31:
	movl	%ebx, 24(%r15)
	movl	%r14d, 4(%r15)
	jmp	LBB0_40
LBB0_32:
	movq	8(%r15), %rsi
	movq	%r13, %rdi
	callq	_get_op_type
	movq	%rax, 16(%r15)
	movq	_v_err@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_42
## %bb.33:
	movl	%r12d, 4(%r15)
	testl	%r12d, %r12d
	je	LBB0_41
## %bb.34:
	movq	%r15, %rdi
	callq	_recalc_node
	testl	%eax, %eax
	jne	LBB0_40
	jmp	LBB0_42
LBB0_35:
	movl	$1, 4(%r15)
	jmp	LBB0_39
LBB0_38:
	movl	%r14d, 4(%r15)
	testl	%r14d, %r14d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_40
LBB0_39:
	xorl	%eax, %eax
	cmpq	%rdx, %r13
	sete	%al
	movl	%eax, 24(%r15)
LBB0_40:
	movq	%r15, %rdi
	callq	_node_pfree
LBB0_41:
	movl	$1, %r14d
LBB0_42:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_43:
	movq	8(%r15), %rax
	movq	_t_var@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movq	16(%r15), %rax
	movq	_v_fid@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	$1, %r14d
	cmpq	(%rcx), %rax
	setne	%dl
	movl	%edx, 4(%r15)
	jne	LBB0_42
## %bb.44:
	movq	_t_fid@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	movq	_std_t@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	__cur_type@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	32(%r15), %rdx
	movq	_FN@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	addq	(%rcx,%rdx,8), %rsi
	movq	(%rax,%rsi,8), %rax
	movq	%rax, 16(%r15)
	jmp	LBB0_42
	.cfi_endproc
                                        ## -- End function
	.comm	_op_and,8,3                     ## @op_and
	.comm	_op_or,8,3                      ## @op_or
	.comm	_v_int,8,3                      ## @v_int
	.comm	_v_long,8,3                     ## @v_long
	.comm	_t_var,8,3                      ## @t_var
	.comm	_v_fid,8,3                      ## @v_fid
	.comm	_t_fid,8,3                      ## @t_fid
	.comm	_std_t,8,3                      ## @std_t
	.comm	__cur_type,8,3                  ## @_cur_type
	.comm	_FN,8,3                         ## @FN
	.comm	_op_shr,8,3                     ## @op_shr
	.comm	_op_shl,8,3                     ## @op_shl
	.comm	_v_string,8,3                   ## @v_string
	.comm	_v_cstring,8,3                  ## @v_cstring
	.comm	_v_err,8,3                      ## @v_err
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_simplify_tree                  ; -- Begin function simplify_tree
	.p2align	2
_simplify_tree:                         ; @simplify_tree
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _op_and@GOTPAGE
Lloh1:
	ldr	x8, [x8, _op_and@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
Lloh3:
	adrp	x8, _op_or@GOTPAGE
Lloh4:
	ldr	x8, [x8, _op_or@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x20, x21
	ccmp	x20, x8, #4, ne
	b.ne	LBB0_9
; %bb.1:
	cmp	x20, x21
	cset	w22, ne
Lloh6:
	adrp	x23, _v_int@GOTPAGE
Lloh7:
	ldr	x23, [x23, _v_int@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x19, #16]
	ldr	w8, [x19]
	cmp	w8, #0
	b.le	LBB0_16
; %bb.2:
	mov	x25, #0
	mov	w24, #1
Lloh8:
	adrp	x26, _v_long@GOTPAGE
Lloh9:
	ldr	x26, [x26, _v_long@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x19]
	cmp	x25, x8
	b.ge	LBB0_33
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	x0, [x8, x25, lsl #3]
	bl	_simplify_tree
	cbz	w0, LBB0_37
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #40]
	ldr	x0, [x8, x25, lsl #3]
	ldr	x8, [x0, #16]
	ldr	x9, [x23]
	ldr	x10, [x26]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_30
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x0, #4]
	and	w24, w8, w24
	cbz	w8, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_to_bool
	cmp	w0, w22
	b.ne	LBB0_3
; %bb.8:
	str	w22, [x19, #24]
	str	w24, [x19, #4]
	b	LBB0_35
LBB0_9:
	ldr	w8, [x19]
	cbnz	w8, LBB0_12
; %bb.10:
	mov	x0, x20
	bl	_IS_CONST
	cbz	w0, LBB0_38
; %bb.11:
	ldr	w8, [x19]
LBB0_12:
Lloh10:
	adrp	x9, _v_int@GOTPAGE
Lloh11:
	ldr	x9, [x9, _v_int@GOTPAGEOFF]
Lloh12:
	ldr	x20, [x9]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.13:
	mov	x21, #0
	mov	w22, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	x0, [x8, x21, lsl #3]
	bl	_simplify_tree
	cbz	w0, LBB0_37
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x19, #40]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w9, [x8, #4]
	and	w22, w9, w22
	ldr	x1, [x8, #16]
	mov	x0, x20
	bl	_max
	mov	x20, x0
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_14
	b	LBB0_18
LBB0_16:
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_34
LBB0_17:
	mov	w22, #1
LBB0_18:
	ldr	x8, [x19, #8]
Lloh13:
	adrp	x9, _op_shr@GOTPAGE
Lloh14:
	ldr	x9, [x9, _op_shr@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.19:
	mov	x0, x20
	bl	_IS_STR
	cbz	w0, LBB0_21
; %bb.20:
	ldr	x8, [x19, #40]
	ldp	x9, x10, [x8]
	str	x10, [x8]
	ldr	x8, [x19, #40]
	str	x9, [x8, #8]
Lloh16:
	adrp	x8, _op_shl@GOTPAGE
Lloh17:
	ldr	x8, [x8, _op_shl@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_21:
Lloh19:
	adrp	x8, _v_string@GOTPAGE
Lloh20:
	ldr	x8, [x8, _v_string@GOTPAGEOFF]
Lloh21:
	adrp	x9, _v_cstring@GOTPAGE
Lloh22:
	ldr	x9, [x9, _v_cstring@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
Lloh24:
	ldr	x9, [x9]
	cmp	x20, x8
	csel	x20, x9, x20, eq
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_29
; %bb.22:
	mov	x23, #0
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.ge	LBB0_29
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	x8, [x8, x23, lsl #3]
	ldr	x8, [x8, #16]
	cmp	x8, x20
	b.eq	LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	mov	x0, x20
	bl	_IS_STR
	mov	x21, x0
	ldr	x8, [x19, #40]
	ldr	x8, [x8, x23, lsl #3]
	ldr	x0, [x8, #16]
	bl	_IS_STR
	cbz	w21, LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=1
	cbnz	w0, LBB0_23
LBB0_27:                                ;   in Loop: Header=BB0_24 Depth=1
	ldr	x8, [x19, #40]
	lsl	x21, x23, #3
	ldr	x0, [x8, x21]
	mov	x1, x20
	bl	_tree_conv
	ldr	x8, [x19, #40]
	str	x0, [x8, x21]
	ldr	x8, [x19, #40]
	ldr	x0, [x8, x21]
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_23
; %bb.28:                               ;   in Loop: Header=BB0_24 Depth=1
	bl	_recalc_node
	cbnz	w0, LBB0_23
	b	LBB0_37
LBB0_29:
	ldr	x1, [x19, #8]
	mov	x0, x20
	bl	_get_op_type
	str	x0, [x19, #16]
Lloh25:
	adrp	x8, _v_err@GOTPAGE
Lloh26:
	ldr	x8, [x8, _v_err@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_31
LBB0_30:
	mov	w0, #0
	b	LBB0_37
LBB0_31:
	str	w22, [x19, #4]
	cbz	w22, LBB0_36
; %bb.32:
	mov	x0, x19
	bl	_recalc_node
	cbnz	w0, LBB0_35
	b	LBB0_37
LBB0_33:
	str	w24, [x19, #4]
	cbz	w24, LBB0_35
LBB0_34:
	cmp	x20, x21
	cset	w8, eq
	str	w8, [x19, #24]
LBB0_35:
	mov	x0, x19
	bl	_node_pfree
LBB0_36:
	mov	w0, #1
LBB0_37:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_38:
	ldr	x8, [x19, #8]
Lloh28:
	adrp	x9, _t_var@GOTPAGE
Lloh29:
	ldr	x9, [x9, _t_var@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #16]
Lloh31:
	adrp	x9, _v_fid@GOTPAGE
Lloh32:
	ldr	x9, [x9, _v_fid@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ne
	str	w8, [x19, #4]
	b.ne	LBB0_36
; %bb.39:
Lloh34:
	adrp	x8, _t_fid@GOTPAGE
Lloh35:
	ldr	x8, [x8, _t_fid@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	str	x8, [x19, #8]
Lloh37:
	adrp	x8, _std_t@GOTPAGE
Lloh38:
	ldr	x8, [x8, _std_t@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
Lloh40:
	adrp	x9, __cur_type@GOTPAGE
Lloh41:
	ldr	x9, [x9, __cur_type@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x10, [x19, #32]
	ldr	x9, [x9, x10, lsl #3]
Lloh43:
	adrp	x10, _FN@GOTPAGE
Lloh44:
	ldr	x10, [x10, _FN@GOTPAGEOFF]
Lloh45:
	ldr	x10, [x10]
	add	x9, x10, x9
	ldr	x8, [x8, x9, lsl #3]
	str	x8, [x19, #16]
	b	LBB0_36
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_op_and,8,3                     ; @op_and
	.comm	_op_or,8,3                      ; @op_or
	.comm	_v_int,8,3                      ; @v_int
	.comm	_v_long,8,3                     ; @v_long
	.comm	_t_var,8,3                      ; @t_var
	.comm	_v_fid,8,3                      ; @v_fid
	.comm	_t_fid,8,3                      ; @t_fid
	.comm	_std_t,8,3                      ; @std_t
	.comm	__cur_type,8,3                  ; @_cur_type
	.comm	_FN,8,3                         ; @FN
	.comm	_op_shr,8,3                     ; @op_shr
	.comm	_op_shl,8,3                     ; @op_shl
	.comm	_v_string,8,3                   ; @v_string
	.comm	_v_cstring,8,3                  ; @v_cstring
	.comm	_v_err,8,3                      ; @v_err
.subsections_via_symbols
