	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_workspace_encapsulate          ## -- Begin function workspace_encapsulate
	.p2align	4, 0x90
_workspace_encapsulate:                 ## @workspace_encapsulate
	.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	%rdi, %r12
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	4(%r12), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_ELOG
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_2:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_con_new
	movq	%rax, %r14
	movq	%r12, 16(%rax)
	movl	8(%r12), %eax
	movl	%eax, 8(%r14)
	movq	%r12, %rdi
	callq	_get_focus_order
	movq	%rax, %r15
	movl	4(%r12), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	movq	%r14, %rcx
	callq	_DLOG
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_TAILQ_EMPTY
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_con_detach
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_con_attach
	jmp	LBB0_4
LBB0_5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_set_focus_order
	movq	%r15, %rdi
	callq	_free
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_con_attach
LBB0_6:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Workspace %p / %s has no children to encapsulate\n"

L_.str.1:                               ## @.str.1
	.asciz	"Moving children of workspace %p / %s into container %p\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_workspace_encapsulate          ; -- Begin function workspace_encapsulate
	.p2align	2
_workspace_encapsulate:                 ; @workspace_encapsulate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_TAILQ_EMPTY
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w2, [x19, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_ELOG
	mov	x20, #0
	b	LBB0_6
LBB0_2:
	mov	x1, #0
	bl	_con_new
	mov	x20, x0
	str	x19, [x0, #16]
	ldr	w8, [x19, #8]
	str	w8, [x0, #8]
	mov	x0, x19
	bl	_get_focus_order
	mov	x21, x0
	ldr	w2, [x19, #4]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x3, x20
	bl	_DLOG
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_TAILQ_EMPTY
	cbnz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_TAILQ_FIRST
	mov	x22, x0
	bl	_con_detach
	mov	x0, x22
	mov	x1, x20
	mov	w2, #1
	bl	_con_attach
	b	LBB0_3
LBB0_5:
	mov	x0, x20
	mov	x1, x21
	bl	_set_focus_order
	mov	x0, x21
	bl	_free
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	bl	_con_attach
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Workspace %p / %s has no children to encapsulate\n"

l_.str.1:                               ; @.str.1
	.asciz	"Moving children of workspace %p / %s into container %p\n"

.subsections_via_symbols
