	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cciss_open
_cciss_open:                            ## @cciss_open
	.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	%rdi, %rbx
	movq	8(%rdi), %rdi
	callq	_get_host
	movq	%rax, %r14
	movq	8(%rbx), %rdi
	callq	_get_drv
	movq	%rax, %r15
	movq	8(%r14), %rdi
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	cmpq	$0, 16(%r15)
	je	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_3:
	cmpq	$0, (%r15)
	je	LBB0_4
LBB0_10:
	incl	8(%r15)
	incl	(%r14)
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%rbx), %edi
	callq	_MINOR
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	(%rbx), %edi
	callq	_MINOR
	testb	$15, %al
	jne	LBB0_6
## %bb.7:
	movl	12(%r15), %edi
	movq	_CTLR_LUNID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_8
LBB0_6:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_8:
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cciss_open %s\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_CTLR_LUNID,4,2                 ## @CTLR_LUNID
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_cciss_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cciss_open
_cciss_open:                            ; @cciss_open
	.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	x21, x0
	ldr	x0, [x0, #8]
	bl	_get_host
	mov	x19, x0
	ldr	x0, [x21, #8]
	bl	_get_drv
	mov	x20, x0
	ldr	x0, [x19, #8]
	ldr	x8, [x21, #8]
	ldr	w2, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	ldr	x8, [x20]
	cbz	x8, LBB0_6
LBB0_4:
	mov	w0, #0
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_5:
	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
LBB0_6:
	ldr	w0, [x21]
	bl	_MINOR
	cbz	w0, LBB0_10
; %bb.7:
	ldr	w0, [x21]
	bl	_MINOR
	tst	w0, #0xf
	b.ne	LBB0_9
; %bb.8:
	ldr	w0, [x20, #12]
Lloh4:
	adrp	x8, _CTLR_LUNID@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CTLR_LUNID@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_memcmp
	cbz	x0, LBB0_10
LBB0_9:
Lloh7:
	adrp	x8, _ENXIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_2
LBB0_10:
Lloh9:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_capable
	cbnz	w0, LBB0_4
; %bb.11:
Lloh12:
	adrp	x8, _EPERM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cciss_open %s\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_CTLR_LUNID,4,2                 ; @CTLR_LUNID
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_cciss_open
.subsections_via_symbols
