	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_lun_remove              ## -- Begin function kernel_lun_remove
	.p2align	4, 0x90
_kernel_lun_remove:                     ## @kernel_lun_remove
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	-40(%rbp), %r14
	movq	%r14, %rdi
	movl	$20, %esi
	callq	_bzero
	movl	-24(%rbp), %edi
	movl	4(%rbx), %esi
	movl	$4, %edx
	callq	_strlcpy
	movq	_CTL_LUNREQ_RM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -32(%rbp)
	movq	_ctl_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CTL_LUN_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	movl	-40(%rbp), %esi
	cmpl	$128, %esi
	je	LBB0_6
## %bb.3:
	cmpl	$129, %esi
	je	LBB0_10
## %bb.4:
	cmpl	$130, %esi
	jne	LBB0_7
## %bb.5:
	movl	-36(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_log_warn
	jmp	LBB0_9
LBB0_6:
	movl	-36(%rbp), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_log_warnx
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
LBB0_8:
	callq	_log_warnx
LBB0_9:
	movl	$1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTL_LUNREQ_RM,4,2              ## @CTL_LUNREQ_RM
	.comm	_ctl_fd,4,2                     ## @ctl_fd
	.comm	_CTL_LUN_REQ,4,2                ## @CTL_LUN_REQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error issuing CTL_LUN_REQ ioctl"

L_.str.1:                               ## @.str.1
	.asciz	"LUN removal error: %s"

L_.str.2:                               ## @.str.2
	.asciz	"LUN removal warning: %s"

L_.str.3:                               ## @.str.3
	.asciz	"unknown LUN removal status: %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_lun_remove              ; -- Begin function kernel_lun_remove
	.p2align	2
_kernel_lun_remove:                     ; @kernel_lun_remove
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #20
	bl	_bzero
	ldr	w0, [sp, #24]
	ldr	w1, [x19, #4]
	mov	w2, #4
	bl	_strlcpy
Lloh0:
	adrp	x8, _CTL_LUNREQ_RM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTL_LUNREQ_RM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19]
	stp	w9, w8, [sp, #16]
Lloh3:
	adrp	x8, _ctl_fd@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ctl_fd@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _CTL_LUN_REQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CTL_LUN_REQ@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.1:
	ldr	w1, [sp, #8]
	cmp	w1, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w1, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	w1, #130
	b.ne	LBB0_8
; %bb.4:
	ldr	w1, [sp, #12]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_5:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log_warn
	b	LBB0_10
LBB0_6:
	ldr	w1, [sp, #12]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_log_warnx
LBB0_7:
	mov	w0, #0
	b	LBB0_11
LBB0_8:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	bl	_log_warnx
LBB0_10:
	mov	w0, #1
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CTL_LUNREQ_RM,4,2              ; @CTL_LUNREQ_RM
	.comm	_ctl_fd,4,2                     ; @ctl_fd
	.comm	_CTL_LUN_REQ,4,2                ; @CTL_LUN_REQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error issuing CTL_LUN_REQ ioctl"

l_.str.1:                               ; @.str.1
	.asciz	"LUN removal error: %s"

l_.str.2:                               ; @.str.2
	.asciz	"LUN removal warning: %s"

l_.str.3:                               ; @.str.3
	.asciz	"unknown LUN removal status: %d"

.subsections_via_symbols
