	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tree_split                     ## -- Begin function tree_split
	.p2align	4, 0x90
_tree_split:                            ## @tree_split
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_con_is_floating
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DLOG                           ## TAILCALL
LBB0_3:
	movq	(%rbx), %rax
	movq	_CT_WORKSPACE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.4:
	movq	%rbx, %rdi
	callq	_con_num_children
	cmpl	$1, %eax
	jg	LBB0_11
## %bb.5:
	movq	%rbx, %rdi
	callq	_con_num_children
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	movq	_L_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	movq	_HORIZ@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_8
## %bb.9:
	movq	_L_SPLITH@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_11:
	movq	%rbx, %rdi
	callq	_workspace_encapsulate
	movq	%rax, %rbx
LBB0_12:
	movq	24(%rbx), %r15
	movq	%rbx, %rdi
	callq	_con_force_split_parents_redraw
	movq	%r15, %rdi
	callq	_con_num_children
	cmpl	$1, %eax
	jne	LBB0_16
## %bb.13:
	movq	8(%r15), %rdx
	movq	_L_SPLITH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_L_SPLITV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rax, %rdx
	je	LBB0_15
## %bb.14:
	cmpq	%rcx, %rdx
	je	LBB0_15
LBB0_16:
	leaq	L_.str.4(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_DLOG
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_con_new
	movq	%rax, %r12
	leaq	36(%r15), %rdi
	movq	_nodes@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_TAILQ_REPLACE
	leaq	32(%r15), %rdi
	movq	_focused@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_TAILQ_REPLACE
	movq	%r15, 24(%r12)
	movq	_HORIZ@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_17
## %bb.18:
	movq	_L_SPLITH@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movq	_L_SPLITV@GOTPCREL(%rip), %rax
LBB0_19:
	movq	(%rax), %rax
	movq	%rax, 8(%r12)
	movsd	16(%rbx), %xmm0                 ## xmm0 = mem[0],zero
	movsd	%xmm0, 16(%r12)
	movq	$0, 16(%rbx)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_con_attach                     ## TAILCALL
LBB0_15:
	movq	_HORIZ@GOTPCREL(%rip), %rdx
	cmpq	%r14, (%rdx)
	cmoveq	%rax, %rcx
	movq	%rcx, 8(%r15)
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	movq	_L_SPLITV@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Floating containers can't be split.\n"

	.comm	_CT_WORKSPACE,8,3               ## @CT_WORKSPACE
L_.str.1:                               ## @.str.1
	.asciz	"Changing workspace_layout to L_DEFAULT\n"

	.comm	_L_DEFAULT,4,2                  ## @L_DEFAULT
L_.str.2:                               ## @.str.2
	.asciz	"Changing orientation of workspace\n"

	.comm	_HORIZ,8,3                      ## @HORIZ
	.comm	_L_SPLITH,8,3                   ## @L_SPLITH
	.comm	_L_SPLITV,8,3                   ## @L_SPLITV
L_.str.3:                               ## @.str.3
	.asciz	"Just changing orientation of existing container\n"

L_.str.4:                               ## @.str.4
	.asciz	"Splitting in orientation %d\n"

	.comm	_nodes,4,2                      ## @nodes
	.comm	_focused,4,2                    ## @focused
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tree_split                     ; -- Begin function tree_split
	.p2align	2
_tree_split:                            ; @tree_split
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_con_is_floating
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	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
	add	sp, sp, #80
	b	_DLOG
LBB0_3:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _CT_WORKSPACE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CT_WORKSPACE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_con_num_children
	cmp	w0, #1
	b.gt	LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_con_num_children
	cbnz	w0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DLOG
Lloh7:
	adrp	x8, _L_DEFAULT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _L_DEFAULT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #40]
LBB0_7:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DLOG
Lloh12:
	adrp	x8, _HORIZ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HORIZ@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _L_SPLITH@GOTPAGE
Lloh16:
	ldr	x9, [x9, _L_SPLITH@GOTPAGEOFF]
Lloh17:
	adrp	x10, _L_SPLITV@GOTPAGE
Lloh18:
	ldr	x10, [x10, _L_SPLITV@GOTPAGEOFF]
	cmp	x8, x20
	csel	x8, x9, x10, eq
	ldr	x8, [x8]
	str	x8, [x19, #8]
	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
	add	sp, sp, #80
	ret
LBB0_8:
	mov	x0, x19
	bl	_workspace_encapsulate
	mov	x19, x0
LBB0_9:
	ldr	x21, [x19, #24]
	mov	x0, x19
	bl	_con_force_split_parents_redraw
	mov	x0, x21
	bl	_con_num_children
Lloh19:
	adrp	x23, _L_SPLITH@GOTPAGE
Lloh20:
	ldr	x23, [x23, _L_SPLITH@GOTPAGEOFF]
Lloh21:
	adrp	x24, _L_SPLITV@GOTPAGE
Lloh22:
	ldr	x24, [x24, _L_SPLITV@GOTPAGEOFF]
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.10:
	ldr	x10, [x21, #8]
	ldr	x8, [x23]
	ldr	x9, [x24]
	cmp	x10, x8
	ccmp	x10, x9, #4, ne
	b.ne	LBB0_12
; %bb.11:
Lloh23:
	adrp	x10, _HORIZ@GOTPAGE
Lloh24:
	ldr	x10, [x10, _HORIZ@GOTPAGEOFF]
Lloh25:
	ldr	x10, [x10]
	cmp	x10, x20
	csel	x8, x8, x9, eq
	str	x8, [x21, #8]
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_2
LBB0_12:
	str	x20, [sp]
Lloh28:
	adrp	x0, l_.str.4@PAGE
Lloh29:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DLOG
	mov	x0, #0
	mov	x1, #0
	bl	_con_new
	mov	x22, x0
	add	x0, x21, #36
Lloh30:
	adrp	x8, _nodes@GOTPAGE
Lloh31:
	ldr	x8, [x8, _nodes@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
	mov	x1, x19
	mov	x2, x22
	bl	_TAILQ_REPLACE
	add	x0, x21, #32
Lloh33:
	adrp	x8, _focused@GOTPAGE
Lloh34:
	ldr	x8, [x8, _focused@GOTPAGEOFF]
Lloh35:
	ldr	w3, [x8]
	mov	x1, x19
	mov	x2, x22
	bl	_TAILQ_REPLACE
Lloh36:
	adrp	x8, _HORIZ@GOTPAGE
Lloh37:
	ldr	x8, [x8, _HORIZ@GOTPAGEOFF]
	str	x21, [x22, #24]
Lloh38:
	ldr	x8, [x8]
	cmp	x8, x20
	csel	x8, x23, x24, eq
	ldr	x8, [x8]
	str	x8, [x22, #8]
	ldr	d0, [x19, #16]
	str	d0, [x22, #16]
	str	xzr, [x19, #16]
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	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
	add	sp, sp, #80
	b	_con_attach
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Floating containers can't be split.\n"

	.comm	_CT_WORKSPACE,8,3               ; @CT_WORKSPACE
l_.str.1:                               ; @.str.1
	.asciz	"Changing workspace_layout to L_DEFAULT\n"

	.comm	_L_DEFAULT,4,2                  ; @L_DEFAULT
l_.str.2:                               ; @.str.2
	.asciz	"Changing orientation of workspace\n"

	.comm	_HORIZ,8,3                      ; @HORIZ
	.comm	_L_SPLITH,8,3                   ; @L_SPLITH
	.comm	_L_SPLITV,8,3                   ; @L_SPLITV
l_.str.3:                               ; @.str.3
	.asciz	"Just changing orientation of existing container\n"

l_.str.4:                               ; @.str.4
	.asciz	"Splitting in orientation %d\n"

	.comm	_nodes,4,2                      ; @nodes
	.comm	_focused,4,2                    ; @focused
.subsections_via_symbols
