	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_con_set_layout                 ## -- Begin function con_set_layout
	.p2align	4, 0x90
_con_set_layout:                        ## @con_set_layout
	.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	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rdi), %rcx
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_DLOG
	movq	_CT_WORKSPACE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, (%r12)
	je	LBB0_2
## %bb.1:
	movq	32(%r12), %r12
LBB0_2:
	movq	8(%r12), %rdx
	movq	_L_SPLITH@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	_L_SPLITV@GOTPCREL(%rip), %rbx
	cmpq	%rcx, %rdx
	je	LBB0_4
## %bb.3:
	cmpq	(%rbx), %rdx
	je	LBB0_4
## %bb.5:
	cmpq	%rax, (%r12)
	jne	LBB0_17
LBB0_6:
	movq	%r12, %rdi
	callq	_con_num_children
	movq	_L_STACKED@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	sete	%dl
	movq	_L_TABBED@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	sete	%cl
	orb	%dl, %cl
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	cmpq	%r14, (%rbx)
	sete	%al
	orb	%al, %cl
	jne	LBB0_12
## %bb.11:
	cmpq	%r14, (%r15)
	jne	LBB0_16
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_con_new
	movq	%rax, %r15
	movq	%r12, 32(%rax)
	movq	%r14, 8(%rax)
	movq	16(%r12), %rax
	movq	%rax, 16(%r15)
	movq	%r12, %rdi
	callq	_get_focus_order
	movq	%rax, %r14
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	leaq	24(%r12), %r13
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_TAILQ_EMPTY
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r13, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_con_detach
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_con_attach
	jmp	LBB0_14
LBB0_4:
	movq	%rdx, 16(%r12)
	cmpq	%rax, (%r12)
	je	LBB0_6
LBB0_17:
	movq	_L_DEFAULT@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_19
## %bb.18:
	movq	16(%r12), %rax
	movq	%rax, 8(%r12)
	cmpq	%r14, %rax
	cmovneq	%rax, %rcx
	movq	%rcx, %r14
LBB0_19:
	movq	%r14, 8(%r12)
	jmp	LBB0_16
LBB0_7:
	movq	%r14, %rbx
	testb	%cl, %cl
	jne	LBB0_9
## %bb.8:
	movq	_L_DEFAULT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_DLOG
	movq	%rbx, 40(%r12)
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_DLOG
	movq	%r14, 8(%r12)
	jmp	LBB0_16
LBB0_15:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_set_focus_order
	movq	%r14, %rdi
	callq	_free
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_con_attach
	movq	_croot@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tree_flatten
LBB0_16:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_con_force_split_parents_redraw ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"con_set_layout(%p, %d), con->type = %d\n"

	.comm	_CT_WORKSPACE,8,3               ## @CT_WORKSPACE
	.comm	_L_SPLITH,8,3                   ## @L_SPLITH
	.comm	_L_SPLITV,8,3                   ## @L_SPLITV
	.comm	_L_STACKED,8,3                  ## @L_STACKED
	.comm	_L_TABBED,8,3                   ## @L_TABBED
	.comm	_L_DEFAULT,8,3                  ## @L_DEFAULT
L_.str.1:                               ## @.str.1
	.asciz	"Setting workspace_layout to %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Setting layout to %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Creating new split container\n"

L_.str.4:                               ## @.str.4
	.asciz	"Moving cons\n"

L_.str.5:                               ## @.str.5
	.asciz	"Attaching new split to ws\n"

	.comm	_croot,4,2                      ## @croot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_con_set_layout                 ; -- Begin function con_set_layout
	.p2align	2
_con_set_layout:                        ; @con_set_layout
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x8, [x0]
	stp	x1, x8, [sp, #8]
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DLOG
	ldr	x9, [x19]
Lloh2:
	adrp	x8, _CT_WORKSPACE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CT_WORKSPACE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_2
; %bb.1:
	ldr	x19, [x19, #32]
LBB0_2:
	ldr	x10, [x19, #8]
Lloh5:
	adrp	x21, _L_SPLITH@GOTPAGE
Lloh6:
	ldr	x21, [x21, _L_SPLITH@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh7:
	adrp	x22, _L_SPLITV@GOTPAGE
Lloh8:
	ldr	x22, [x22, _L_SPLITV@GOTPAGEOFF]
	ldr	x11, [x22]
	cmp	x10, x9
	ccmp	x10, x11, #4, ne
	b.ne	LBB0_4
; %bb.3:
	str	x10, [x19, #16]
LBB0_4:
	ldr	x10, [x19]
	cmp	x10, x8
	b.ne	LBB0_11
; %bb.5:
	mov	x0, x19
	bl	_con_num_children
Lloh9:
	adrp	x8, _L_STACKED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _L_STACKED@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, x20
Lloh12:
	adrp	x8, _L_TABBED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _L_TABBED@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ccmp	x8, x20, #4, ne
	cset	w8, eq
	cbz	x0, LBB0_14
; %bb.6:
	ldr	x9, [x22]
	cmp	x9, x20
	cset	w9, eq
	orr	w8, w8, w9
	tbnz	w8, #0, LBB0_8
; %bb.7:
	ldr	x8, [x21]
	cmp	x8, x20
	b.ne	LBB0_16
LBB0_8:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DLOG
	mov	x0, #0
	mov	x1, #0
	bl	_con_new
	mov	x21, x0
	str	x19, [x0, #32]
	ldr	x8, [x19, #16]
	stp	x20, x8, [x0, #8]
	mov	x0, x19
	bl	_get_focus_order
	mov	x20, x0
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DLOG
	add	x22, x19, #24
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_TAILQ_EMPTY
	cbnz	w0, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x22
	bl	_TAILQ_FIRST
	mov	x23, x0
	bl	_con_detach
	mov	x0, x23
	mov	x1, x21
	mov	w2, #1
	bl	_con_attach
	b	LBB0_9
LBB0_11:
Lloh19:
	adrp	x8, _L_DEFAULT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _L_DEFAULT@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_13
; %bb.12:
	ldr	x8, [x19, #16]
	str	x8, [x19, #8]
	cmp	x8, x20
	csel	x20, x9, x8, eq
LBB0_13:
	str	x20, [x19, #8]
	b	LBB0_16
LBB0_14:
Lloh22:
	adrp	x9, _L_DEFAULT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _L_DEFAULT@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	w8, #0
	csel	x21, x20, x9, ne
	str	x21, [sp]
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DLOG
	str	x21, [x19, #40]
	str	x20, [sp]
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DLOG
	str	x20, [x19, #8]
	b	LBB0_16
LBB0_15:
	mov	x0, x21
	mov	x1, x20
	bl	_set_focus_order
	mov	x0, x20
	bl	_free
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DLOG
	mov	x0, x21
	mov	x1, x19
	mov	w2, #0
	bl	_con_attach
Lloh31:
	adrp	x8, _croot@GOTPAGE
Lloh32:
	ldr	x8, [x8, _croot@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_tree_flatten
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_con_force_split_parents_redraw
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"con_set_layout(%p, %d), con->type = %d\n"

	.comm	_CT_WORKSPACE,8,3               ; @CT_WORKSPACE
	.comm	_L_SPLITH,8,3                   ; @L_SPLITH
	.comm	_L_SPLITV,8,3                   ; @L_SPLITV
	.comm	_L_STACKED,8,3                  ; @L_STACKED
	.comm	_L_TABBED,8,3                   ; @L_TABBED
	.comm	_L_DEFAULT,8,3                  ; @L_DEFAULT
l_.str.1:                               ; @.str.1
	.asciz	"Setting workspace_layout to %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Setting layout to %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Creating new split container\n"

l_.str.4:                               ; @.str.4
	.asciz	"Moving cons\n"

l_.str.5:                               ; @.str.5
	.asciz	"Attaching new split to ws\n"

	.comm	_croot,4,2                      ; @croot
.subsections_via_symbols
