	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function deregister_disk
_deregister_disk:                       ## @deregister_disk
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	_CAP_SYS_RAWIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	8(%r12), %rax
	movq	24(%r12), %rcx
	movslq	%r13d, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	(%rcx,%rdx,8), %rbx
	testl	%r14d, %r14d
	je	LBB0_4
LBB0_5:
	cmpl	%r15d, (%rsi)
	jg	LBB0_18
## %bb.6:
	movq	(%rcx), %rdx
LBB0_7:
	movq	(%r12), %rcx
	movq	(%rax,%rcx,8), %rax
	cmpq	%rbx, %rdx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_22
## %bb.8:
	movq	8(%rbx), %r15
	movq	_GENHD_FL_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_cciss_destroy_ld_sysfs_entry
	movq	%rbx, %rdi
	callq	_del_gendisk
LBB0_10:
	testq	%r15, %r15
	je	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	callq	_blk_cleanup_queue
LBB0_12:
	testl	%r14d, %r14d
	je	LBB0_19
## %bb.13:
	movq	_CISS_MAX_LUN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.14:
	movq	24(%r12), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rcx,%rdx,8)
	je	LBB0_16
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_15
	jmp	LBB0_21
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	(%rcx), %rdx
	cmpq	%rbx, %rdx
	je	LBB0_5
## %bb.17:
	cmpl	$0, (%rsi)
	jle	LBB0_7
LBB0_18:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_38
LBB0_22:
	movq	%rsi, %r15
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_set_capacity
	movq	%r15, %rdi
	callq	_cciss_clear_drive_info
	jmp	LBB0_23
LBB0_19:
	decl	16(%r12)
	jmp	LBB0_37
LBB0_16:
	movq	$0, (%rcx,%rdx,8)
LBB0_21:
	movq	%rbx, %rdi
	callq	_put_disk
LBB0_23:
	decl	16(%r12)
	xorl	%eax, %eax
	testl	%r14d, %r14d
	je	LBB0_38
## %bb.24:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_38
## %bb.25:
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	leaq	1(%rax), %r8
	testq	%rax, %rax
	je	LBB0_26
## %bb.27:
	movq	%r8, %rdi
	andq	$-2, %rdi
	movl	$-1, %eax
	xorl	%edx, %edx
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_28 Depth=1
	addq	$2, %rdx
	cmpq	%rdx, %rdi
	je	LBB0_33
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	cmpq	$0, 8(%rbx)
	cmovnel	%edx, %eax
LBB0_30:                                ##   in Loop: Header=BB0_28 Depth=1
	movq	8(%rcx,%rdx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_28 Depth=1
	leal	1(%rdx), %esi
	cmpq	$0, 8(%rbx)
	cmovnel	%esi, %eax
	jmp	LBB0_32
LBB0_26:
	movl	$-1, %eax
	xorl	%edx, %edx
LBB0_33:
	testb	$1, %r8b
	je	LBB0_36
## %bb.34:
	movq	(%rcx,%rdx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_36
## %bb.35:
	cmpq	$0, 8(%rcx)
	cmovel	%eax, %edx
	movl	%edx, %eax
LBB0_36:
	cltq
	movq	%rax, (%r12)
LBB0_37:
	xorl	%eax, %eax
LBB0_38:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_SYS_RAWIO,4,2              ## @CAP_SYS_RAWIO
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GENHD_FL_UP,4,2                ## @GENHD_FL_UP
	.comm	_CISS_MAX_LUN,4,2               ## @CISS_MAX_LUN
	.no_dead_strip	_deregister_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function deregister_disk
_deregister_disk:                       ; @deregister_disk
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CAP_SYS_RAWIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_RAWIO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_14
; %bb.1:
	ldr	x8, [x19, #8]
	sbfiz	x9, x23, #3, #32
	ldr	x21, [x8, x9]
	ldr	x10, [x19, #24]
	ldr	x22, [x10, x9]
	cbz	w20, LBB0_15
LBB0_2:
	ldr	w9, [x21]
	cmp	w9, w24
	b.gt	LBB0_17
; %bb.3:
	ldr	x9, [x10]
LBB0_4:
	ldr	x10, [x19]
	ldr	x25, [x8, x10, lsl #3]
	cmp	x9, x22
	b.eq	LBB0_20
; %bb.5:
	ldr	x24, [x22, #8]
	ldr	w8, [x22]
Lloh3:
	adrp	x9, _GENHD_FL_UP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GENHD_FL_UP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x23
	mov	w2, #0
	bl	_cciss_destroy_ld_sysfs_entry
	mov	x0, x22
	bl	_del_gendisk
LBB0_7:
	cbz	x24, LBB0_9
; %bb.8:
	mov	x0, x24
	bl	_blk_cleanup_queue
LBB0_9:
	cbz	w20, LBB0_21
; %bb.10:
Lloh6:
	adrp	x8, _CISS_MAX_LUN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CISS_MAX_LUN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.11:
	ldr	x9, [x19, #24]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cmp	x10, x22
	b.eq	LBB0_22
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_12
	b	LBB0_23
LBB0_14:
Lloh9:
	adrp	x8, _EPERM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_18
LBB0_15:
	ldr	x9, [x10]
	cmp	x9, x22
	b.eq	LBB0_2
; %bb.16:
	ldr	w10, [x21]
	cmp	w10, #1
	b.lt	LBB0_4
LBB0_17:
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	x0, x22
	mov	w1, #0
	bl	_set_capacity
	mov	x0, x21
	bl	_cciss_clear_drive_info
	b	LBB0_24
LBB0_21:
	mov	w0, #0
	ldr	w8, [x19, #16]
	sub	w8, w8, #1
	str	w8, [x19, #16]
	b	LBB0_19
LBB0_22:
	str	xzr, [x9]
LBB0_23:
	mov	x0, x22
	bl	_put_disk
LBB0_24:
	mov	w0, #0
	ldr	w8, [x19, #16]
	sub	w8, w8, #1
	str	w8, [x19, #16]
	cbz	w20, LBB0_19
; %bb.25:
	cmp	x21, x25
	b.ne	LBB0_19
; %bb.26:
	mov	x8, #0
	ldp	x10, x9, [x19]
	add	x11, x10, #1
	mov	w10, #-1
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	add	x8, x8, #1
	cmp	x11, x8
	b.eq	LBB0_30
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9, x8, lsl #3]
	cbz	x12, LBB0_27
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	x12, [x12, #8]
	cmp	x12, #0
	csel	w10, w10, w8, eq
	b	LBB0_27
LBB0_30:
	mov	w0, #0
	sxtw	x8, w10
	str	x8, [x19]
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_SYS_RAWIO,4,2              ; @CAP_SYS_RAWIO
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GENHD_FL_UP,4,2                ; @GENHD_FL_UP
	.comm	_CISS_MAX_LUN,4,2               ; @CISS_MAX_LUN
	.no_dead_strip	_deregister_disk
.subsections_via_symbols
