	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function collect_child
_collect_child:                         ## @collect_child
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_sessions@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_12
## %bb.1:
	callq	_find_session
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_del_session
	movl	$0, (%rbx)
	movq	_SE_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_session_has_no_tty
	testq	%rax, %rax
	je	LBB0_10
LBB0_4:
	movq	16(%rbx), %rax
	movq	24(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rcx, 24(%rax)
	movq	24(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
LBB0_8:
	movq	%rax, 16(%rcx)
LBB0_9:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_free_session                   ## TAILCALL
LBB0_6:
	movq	%rcx, (%r14)
	testq	%rcx, %rcx
	jne	LBB0_8
	jmp	LBB0_9
LBB0_10:
	movq	%rbx, %rdi
	callq	_start_getty
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.13:
	movl	%eax, (%rbx)
	xorl	%edi, %edi
	callq	_time
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_add_session                    ## TAILCALL
LBB0_11:
	movq	_clean_ttys@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_requested_transition@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sessions,8,3                   ## @sessions
	.comm	_SE_SHUTDOWN,4,2                ## @SE_SHUTDOWN
	.comm	_clean_ttys,4,2                 ## @clean_ttys
	.comm	_requested_transition,4,2       ## @requested_transition
	.no_dead_strip	_collect_child
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function collect_child
_collect_child:                         ; @collect_child
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _sessions@GOTPAGE
Lloh1:
	ldr	x20, [x20, _sessions@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_12
; %bb.1:
	bl	_find_session
	cbz	x0, LBB0_12
; %bb.2:
	mov	x19, x0
	bl	_del_session
	str	wzr, [x19]
	ldr	w8, [x19, #4]
Lloh2:
	adrp	x9, _SE_SHUTDOWN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SE_SHUTDOWN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_session_has_no_tty
	cbz	x0, LBB0_9
LBB0_4:
	ldp	x8, x9, [x19, #16]
	cbz	x8, LBB0_8
; %bb.5:
	str	x9, [x8, #24]
	ldr	x9, [x19, #24]
	cbz	x9, LBB0_7
LBB0_6:
	str	x8, [x9, #16]
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_free_session
LBB0_8:
	str	x9, [x20]
	cbnz	x9, LBB0_6
	b	LBB0_7
LBB0_9:
	mov	x0, x19
	bl	_start_getty
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.10:
	str	w0, [x19]
	mov	x0, #0
	bl	_time
	str	w0, [x19, #8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_add_session
LBB0_11:
Lloh5:
	adrp	x8, _clean_ttys@GOTPAGE
Lloh6:
	ldr	x8, [x8, _clean_ttys@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _requested_transition@GOTPAGE
Lloh9:
	ldr	x9, [x9, _requested_transition@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_sessions,8,3                   ; @sessions
	.comm	_SE_SHUTDOWN,4,2                ; @SE_SHUTDOWN
	.comm	_clean_ttys,4,2                 ; @clean_ttys
	.comm	_requested_transition,4,2       ; @requested_transition
	.no_dead_strip	_collect_child
.subsections_via_symbols
