	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cleanup
_cleanup:                               ## @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	_debug@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_warnx
	movq	$0, (%rbx)
	movq	_targ_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TARGIOCDEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_ioctl
LBB0_2:
	movq	_targ_fd@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_TARGIOCDISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_ioctl
	movl	(%rbx), %edi
	callq	_close
	movq	_pending_queue@GOTPCREL(%rip), %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %rbx
	movq	_periph_links@GOTPCREL(%rip), %r15
	movq	_pending_queue@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movq	%rbx, %rdi
	callq	_free_ccb
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
LBB0_5:
	movq	_work_queue@GOTPCREL(%rip), %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rax, %rbx
	movq	_periph_links@GOTPCREL(%rip), %r15
	movq	_work_queue@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movq	%rbx, %rdi
	callq	_free_ccb
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
LBB0_8:
	movq	_kq_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	cmpl	$-1, %edi
	je	LBB0_9
## %bb.10:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,8,3                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cleanup called"

	.comm	_targ_fd,4,2                    ## @targ_fd
	.comm	_TARGIOCDEBUG,4,2               ## @TARGIOCDEBUG
	.comm	_TARGIOCDISABLE,4,2             ## @TARGIOCDISABLE
	.comm	_pending_queue,4,2              ## @pending_queue
	.comm	_periph_links,4,2               ## @periph_links
	.comm	_work_queue,4,2                 ## @work_queue
	.comm	_kq_fd,4,2                      ## @kq_fd
	.no_dead_strip	_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cleanup
_cleanup:                               ; @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
Lloh0:
	adrp	x19, _debug@GOTPAGE
Lloh1:
	ldr	x19, [x19, _debug@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh2:
	adrp	x20, _targ_fd@GOTPAGE
Lloh3:
	ldr	x20, [x20, _targ_fd@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	str	xzr, [x19]
	ldr	w0, [x20]
Lloh6:
	adrp	x8, _TARGIOCDEBUG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TARGIOCDEBUG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_ioctl
LBB0_2:
	ldr	w0, [x20]
Lloh9:
	adrp	x8, _TARGIOCDISABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TARGIOCDISABLE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_ioctl
	ldr	w0, [x20]
	bl	_close
Lloh12:
	adrp	x0, _pending_queue@GOTPAGE
Lloh13:
	ldr	x0, [x0, _pending_queue@GOTPAGEOFF]
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
Lloh14:
	adrp	x21, _periph_links@GOTPAGE
Lloh15:
	ldr	x21, [x21, _periph_links@GOTPAGEOFF]
Lloh16:
	adrp	x19, _pending_queue@GOTPAGE
Lloh17:
	ldr	x19, [x19, _pending_queue@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_TAILQ_REMOVE
	mov	x0, x20
	bl	_free_ccb
	mov	x0, x19
	bl	_TAILQ_FIRST
	mov	x20, x0
	cbnz	x0, LBB0_4
LBB0_5:
Lloh18:
	adrp	x0, _work_queue@GOTPAGE
Lloh19:
	ldr	x0, [x0, _work_queue@GOTPAGEOFF]
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_8
; %bb.6:
	mov	x20, x0
Lloh20:
	adrp	x21, _periph_links@GOTPAGE
Lloh21:
	ldr	x21, [x21, _periph_links@GOTPAGEOFF]
Lloh22:
	adrp	x19, _work_queue@GOTPAGE
Lloh23:
	ldr	x19, [x19, _work_queue@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_TAILQ_REMOVE
	mov	x0, x20
	bl	_free_ccb
	mov	x0, x19
	bl	_TAILQ_FIRST
	mov	x20, x0
	cbnz	x0, LBB0_7
LBB0_8:
Lloh24:
	adrp	x8, _kq_fd@GOTPAGE
Lloh25:
	ldr	x8, [x8, _kq_fd@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.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
	b	_close
LBB0_10:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,8,3                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cleanup called"

	.comm	_targ_fd,4,2                    ; @targ_fd
	.comm	_TARGIOCDEBUG,4,2               ; @TARGIOCDEBUG
	.comm	_TARGIOCDISABLE,4,2             ; @TARGIOCDISABLE
	.comm	_pending_queue,4,2              ; @pending_queue
	.comm	_periph_links,4,2               ; @periph_links
	.comm	_work_queue,4,2                 ; @work_queue
	.comm	_kq_fd,4,2                      ; @kq_fd
	.no_dead_strip	_cleanup
.subsections_via_symbols
