	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_cleanup                     ## -- Begin function do_cleanup
	.p2align	4, 0x90
_do_cleanup:                            ## @do_cleanup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_debug
	movq	_is_child@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.1:
	testb	$1, _do_cleanup.called(%rip)
	jne	LBB0_8
## %bb.2:
	movb	$1, _do_cleanup.called(%rip)
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.3:
	cmpl	$0, 16(%rbx)
	je	LBB0_8
## %bb.4:
	movl	(%rbx), %edi
	callq	_auth_sock_cleanup_proc
	movq	_auth_info_file@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_6
## %bb.5:
	movl	(%rbx), %edi
	callq	_temporarily_use_uid
	movq	(%r15), %rdi
	callq	_unlink
	xorl	%eax, %eax
	callq	_restore_uid
	movq	(%r15), %rdi
	callq	_free
	movq	$0, (%r15)
LBB0_6:
	movq	_use_privsep@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.7:
	xorl	%eax, %eax
	callq	_mm_is_monitor
	testq	%rax, %rax
	je	LBB0_8
LBB0_9:
	movq	_session_pty_cleanup2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_session_destroy_all            ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_do_cleanup.called,1,2 ## @do_cleanup.called
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"do_cleanup"

	.comm	_is_child,8,3                   ## @is_child
	.comm	_auth_info_file,8,3             ## @auth_info_file
	.comm	_use_privsep,4,2                ## @use_privsep
	.comm	_session_pty_cleanup2,4,2       ## @session_pty_cleanup2
	.comm	_options,24,3                   ## @options
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_cleanup                     ; -- Begin function do_cleanup
	.p2align	2
_do_cleanup:                            ; @do_cleanup
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
Lloh2:
	adrp	x8, _is_child@GOTPAGE
Lloh3:
	ldr	x8, [x8, _is_child@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbnz	x8, LBB0_9
; %bb.1:
	adrp	x8, _do_cleanup.called@PAGE
	ldrb	w9, [x8, _do_cleanup.called@PAGEOFF]
	tbnz	w9, #0, LBB0_9
; %bb.2:
	mov	w9, #1
	strb	w9, [x8, _do_cleanup.called@PAGEOFF]
	cbz	x20, LBB0_9
; %bb.3:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_9
; %bb.4:
	ldr	w0, [x20]
	bl	_auth_sock_cleanup_proc
Lloh5:
	adrp	x21, _auth_info_file@GOTPAGE
Lloh6:
	ldr	x21, [x21, _auth_info_file@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x20]
	bl	_temporarily_use_uid
	ldr	x0, [x21]
	bl	_unlink
	bl	_restore_uid
	ldr	x0, [x21]
	bl	_free
	str	xzr, [x21]
LBB0_6:
Lloh7:
	adrp	x8, _use_privsep@GOTPAGE
Lloh8:
	ldr	x8, [x8, _use_privsep@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.7:
	bl	_mm_is_monitor
	cbz	x0, LBB0_9
LBB0_8:
Lloh10:
	adrp	x8, _session_pty_cleanup2@GOTPAGE
Lloh11:
	ldr	x8, [x8, _session_pty_cleanup2@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_session_destroy_all
LBB0_9:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_do_cleanup.called,1,2 ; @do_cleanup.called
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"do_cleanup"

	.comm	_is_child,8,3                   ; @is_child
	.comm	_auth_info_file,8,3             ; @auth_info_file
	.comm	_use_privsep,4,2                ; @use_privsep
	.comm	_session_pty_cleanup2,4,2       ; @session_pty_cleanup2
	.comm	_options,24,3                   ; @options
.subsections_via_symbols
