	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tree_flatten                   ## -- Begin function tree_flatten
	.p2align	4, 0x90
_tree_flatten:                          ## @tree_flatten
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	32(%rdi), %r14
	movl	40(%rdi), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_DLOG
	movq	(%r13), %rax
	movq	_CT_CON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.1:
	movq	8(%r14), %rax
	movq	_L_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_20
## %bb.2:
	cmpq	$0, 48(%r13)
	je	LBB0_3
LBB0_20:
	leaq	20(%r13), %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	movq	%rax, %rbx
	movq	_nodes@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_TAILQ_NEXT
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_tree_flatten
	movq	%r14, %rbx
	testq	%r14, %r14
	jne	LBB0_22
LBB0_23:
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_26
## %bb.24:
	movq	%rax, %rbx
	movq	_floating_windows@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_TAILQ_NEXT
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_tree_flatten
	movq	%r14, %rbx
	testq	%r14, %r14
	jne	LBB0_25
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	20(%r13), %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_20
## %bb.4:
	movq	%rax, %r15
	movq	_nodes@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%rax, %rdi
	callq	_TAILQ_NEXT
	testq	%rax, %rax
	jne	LBB0_20
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_DLOG
	movq	%r13, %rdi
	callq	_con_is_split
	testl	%eax, %eax
	je	LBB0_20
## %bb.6:
	movq	%r15, %rdi
	callq	_con_is_split
	testl	%eax, %eax
	je	LBB0_20
## %bb.7:
	movq	8(%r13), %rdx
	movq	_L_SPLITH@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_L_SPLITV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rcx, %rdx
	je	LBB0_9
## %bb.8:
	cmpq	%rax, %rdx
	jne	LBB0_20
LBB0_9:
	movq	8(%r15), %rdx
	cmpq	%rcx, %rdx
	je	LBB0_11
## %bb.10:
	cmpq	%rax, %rdx
	jne	LBB0_20
LBB0_11:
	movq	%r13, %rdi
	callq	_con_orientation
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_con_orientation
	cmpq	%rax, %r12
	je	LBB0_20
## %bb.12:
	movq	%r15, %rdi
	callq	_con_orientation
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_con_orientation
	cmpq	%rax, %r12
	jne	LBB0_20
## %bb.13:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	leaq	24(%r15), %rdi
	callq	_TAILQ_FIRST
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	addq	$20, %r15
	movq	%r15, %rdi
	callq	_TAILQ_EMPTY
	testl	%eax, %eax
	jne	LBB0_16
## %bb.14:
	leaq	24(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %r12
	movl	40(%rax), %edx
	leaq	L_.str.4(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_DLOG
	movq	%r12, %rdi
	callq	_con_detach
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	movq	%r14, 32(%r12)
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_TAILQ_INSERT_BEFORE
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	movq	_focused@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_TAILQ_INSERT_TAIL
	movl	28(%r13), %eax
	movl	%eax, 28(%r12)
	movq	%r15, %rdi
	callq	_TAILQ_EMPTY
	testl	%eax, %eax
	je	LBB0_15
LBB0_16:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.17:
	addq	$24, %r14
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	cmpq	%r13, %rax
	jne	LBB0_19
## %bb.18:
	leaq	L_.str.8(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_DLOG
	movq	_focused@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_HEAD
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
LBB0_19:
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	movq	_DONT_KILL_WINDOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tree_close_internal            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Checking if I can flatten con = %p / %s\n"

	.comm	_CT_CON,8,3                     ## @CT_CON
	.comm	_L_OUTPUT,8,3                   ## @L_OUTPUT
	.comm	_nodes,4,2                      ## @nodes
L_.str.1:                               ## @.str.1
	.asciz	"child = %p, con = %p, parent = %p\n"

	.comm	_L_SPLITH,8,3                   ## @L_SPLITH
	.comm	_L_SPLITV,8,3                   ## @L_SPLITV
L_.str.2:                               ## @.str.2
	.asciz	"Alright, I have to flatten this situation now. Stay calm.\n"

L_.str.3:                               ## @.str.3
	.asciz	"detaching...\n"

L_.str.4:                               ## @.str.4
	.asciz	"detaching current=%p / %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"re-attaching\n"

L_.str.6:                               ## @.str.6
	.asciz	"attaching to focus list\n"

	.comm	_focused,4,2                    ## @focused
L_.str.7:                               ## @.str.7
	.asciz	"re-attached all\n"

L_.str.8:                               ## @.str.8
	.asciz	"restoring focus to focus_next=%p\n"

L_.str.9:                               ## @.str.9
	.asciz	"restored focus.\n"

L_.str.10:                              ## @.str.10
	.asciz	"closing redundant cons\n"

	.comm	_DONT_KILL_WINDOW,4,2           ## @DONT_KILL_WINDOW
	.comm	_floating_windows,4,2           ## @floating_windows
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tree_flatten                   ; -- Begin function tree_flatten
	.p2align	2
_tree_flatten:                          ; @tree_flatten
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	ldr	x20, [x0, #32]
	ldr	w8, [x0, #40]
	stp	x0, x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DLOG
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _CT_CON@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CT_CON@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x9, _L_OUTPUT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _L_OUTPUT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_10
LBB0_3:
	add	x0, x19, #20
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_6
; %bb.4:
	mov	x20, x0
Lloh8:
	adrp	x22, _nodes@GOTPAGE
Lloh9:
	ldr	x22, [x22, _nodes@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x20
	bl	_TAILQ_NEXT
	mov	x21, x0
	mov	x0, x20
	bl	_tree_flatten
	mov	x20, x21
	cbnz	x21, LBB0_5
LBB0_6:
	add	x0, x19, #16
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_9
; %bb.7:
	mov	x19, x0
Lloh10:
	adrp	x21, _floating_windows@GOTPAGE
Lloh11:
	ldr	x21, [x21, _floating_windows@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_TAILQ_NEXT
	mov	x20, x0
	mov	x0, x19
	bl	_tree_flatten
	mov	x19, x20
	cbnz	x20, LBB0_8
LBB0_9:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	add	x0, x19, #20
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_3
; %bb.11:
	mov	x22, x0
Lloh12:
	adrp	x28, _nodes@GOTPAGE
Lloh13:
	ldr	x28, [x28, _nodes@GOTPAGEOFF]
	ldr	w1, [x28]
	bl	_TAILQ_NEXT
	cbnz	x0, LBB0_3
; %bb.12:
	stp	x19, x20, [sp, #8]
	str	x22, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DLOG
	mov	x0, x19
	bl	_con_is_split
	cbz	w0, LBB0_3
; %bb.13:
	mov	x0, x22
	bl	_con_is_split
	cbz	w0, LBB0_3
; %bb.14:
Lloh16:
	adrp	x8, _L_SPLITH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _L_SPLITH@GOTPAGEOFF]
	ldr	x10, [x19, #8]
Lloh18:
	ldr	x9, [x8]
Lloh19:
	adrp	x8, _L_SPLITV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _L_SPLITV@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x10, x9
	b.eq	LBB0_16
; %bb.15:
	cmp	x10, x8
	b.ne	LBB0_3
LBB0_16:
	ldr	x10, [x22, #8]
	cmp	x10, x9
	b.eq	LBB0_18
; %bb.17:
	cmp	x10, x8
	b.ne	LBB0_3
LBB0_18:
	mov	x0, x19
	bl	_con_orientation
	mov	x21, x0
	mov	x0, x22
	bl	_con_orientation
	cmp	x21, x0
	b.eq	LBB0_3
; %bb.19:
	mov	x0, x22
	bl	_con_orientation
	mov	x21, x0
	mov	x0, x20
	bl	_con_orientation
	cmp	x21, x0
	b.ne	LBB0_3
; %bb.20:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DLOG
	add	x0, x22, #24
	bl	_TAILQ_FIRST
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DLOG
	add	x22, x22, #20
	mov	x0, x22
	bl	_TAILQ_EMPTY
	cbnz	w0, LBB0_23
; %bb.21:
	add	x23, x20, #24
Lloh26:
	adrp	x24, l_.str.4@PAGE
Lloh27:
	add	x24, x24, l_.str.4@PAGEOFF
Lloh28:
	adrp	x25, l_.str.5@PAGE
Lloh29:
	add	x25, x25, l_.str.5@PAGEOFF
Lloh30:
	adrp	x21, _focused@GOTPAGE
Lloh31:
	ldr	x21, [x21, _focused@GOTPAGEOFF]
Lloh32:
	adrp	x26, l_.str.6@PAGE
Lloh33:
	add	x26, x26, l_.str.6@PAGEOFF
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_TAILQ_FIRST
	mov	x27, x0
	ldr	w8, [x0, #40]
	stp	x0, x8, [sp]
	mov	x0, x24
	bl	_DLOG
	mov	x0, x27
	bl	_con_detach
	mov	x0, x25
	bl	_DLOG
	str	x20, [x27, #32]
	ldr	w2, [x28]
	mov	x0, x19
	mov	x1, x27
	bl	_TAILQ_INSERT_BEFORE
	mov	x0, x26
	bl	_DLOG
	ldr	w2, [x21]
	mov	x0, x23
	mov	x1, x27
	bl	_TAILQ_INSERT_TAIL
	ldr	w8, [x19, #28]
	str	w8, [x27, #28]
	mov	x0, x22
	bl	_TAILQ_EMPTY
	cbz	w0, LBB0_22
LBB0_23:
Lloh34:
	adrp	x0, l_.str.7@PAGE
Lloh35:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DLOG
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	cbz	x22, LBB0_26
; %bb.24:
	add	x20, x20, #24
	mov	x0, x20
	bl	_TAILQ_FIRST
	cmp	x0, x19
	b.ne	LBB0_26
; %bb.25:
	str	x22, [sp]
Lloh36:
	adrp	x0, l_.str.8@PAGE
Lloh37:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_DLOG
Lloh38:
	adrp	x21, _focused@GOTPAGE
Lloh39:
	ldr	x21, [x21, _focused@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x20
	mov	x1, x22
	bl	_TAILQ_REMOVE
	ldr	w2, [x21]
	mov	x0, x20
	mov	x1, x22
	bl	_TAILQ_INSERT_HEAD
Lloh40:
	adrp	x0, l_.str.9@PAGE
Lloh41:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_DLOG
LBB0_26:
Lloh42:
	adrp	x0, l_.str.10@PAGE
Lloh43:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_DLOG
Lloh44:
	adrp	x8, _DONT_KILL_WINDOW@GOTPAGE
Lloh45:
	ldr	x8, [x8, _DONT_KILL_WINDOW@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_tree_close_internal
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Checking if I can flatten con = %p / %s\n"

	.comm	_CT_CON,8,3                     ; @CT_CON
	.comm	_L_OUTPUT,8,3                   ; @L_OUTPUT
	.comm	_nodes,4,2                      ; @nodes
l_.str.1:                               ; @.str.1
	.asciz	"child = %p, con = %p, parent = %p\n"

	.comm	_L_SPLITH,8,3                   ; @L_SPLITH
	.comm	_L_SPLITV,8,3                   ; @L_SPLITV
l_.str.2:                               ; @.str.2
	.asciz	"Alright, I have to flatten this situation now. Stay calm.\n"

l_.str.3:                               ; @.str.3
	.asciz	"detaching...\n"

l_.str.4:                               ; @.str.4
	.asciz	"detaching current=%p / %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"re-attaching\n"

l_.str.6:                               ; @.str.6
	.asciz	"attaching to focus list\n"

	.comm	_focused,4,2                    ; @focused
l_.str.7:                               ; @.str.7
	.asciz	"re-attached all\n"

l_.str.8:                               ; @.str.8
	.asciz	"restoring focus to focus_next=%p\n"

l_.str.9:                               ; @.str.9
	.asciz	"restored focus.\n"

l_.str.10:                              ; @.str.10
	.asciz	"closing redundant cons\n"

	.comm	_DONT_KILL_WINDOW,4,2           ; @DONT_KILL_WINDOW
	.comm	_floating_windows,4,2           ; @floating_windows
.subsections_via_symbols
