	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vol_cdev_open
_vol_cdev_open:                         ## @vol_cdev_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_iminor
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_imajor
	movl	%eax, %edi
	callq	_ubi_major2num
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	decl	%r15d
	movq	_FMODE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	jne	LBB0_2
## %bb.3:
	movq	_UBI_READONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_UBI_READWRITE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r12d
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	_dbg_gen
	movl	%ebx, %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_ubi_open_volume
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_5:
	movq	%rbx, 8(%r14)
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FMODE_WRITE,4,2                ## @FMODE_WRITE
	.comm	_UBI_READWRITE,4,2              ## @UBI_READWRITE
	.comm	_UBI_READONLY,4,2               ## @UBI_READONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open device %d, volume %d, mode %d"

	.no_dead_strip	_vol_cdev_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vol_cdev_open
_vol_cdev_open:                         ; @vol_cdev_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	x19, x1
	mov	x20, x0
	bl	_iminor
	mov	x21, x0
	mov	x0, x20
	bl	_imajor
	bl	_ubi_major2num
	mov	x20, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
	sub	w21, w21, #1
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _FMODE_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FMODE_WRITE@GOTPAGEOFF]
Lloh2:
	adrp	x10, _UBI_READONLY@GOTPAGE
Lloh3:
	ldr	x10, [x10, _UBI_READONLY@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x11, _UBI_READWRITE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _UBI_READWRITE@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w22, [x8]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_dbg_gen
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_ubi_open_volume
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x21
	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	_PTR_ERR
LBB0_3:
	mov	w20, #0
	str	x21, [x19, #8]
LBB0_4:
	mov	x0, x20
	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 AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FMODE_WRITE,4,2                ; @FMODE_WRITE
	.comm	_UBI_READWRITE,4,2              ; @UBI_READWRITE
	.comm	_UBI_READONLY,4,2               ; @UBI_READONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open device %d, volume %d, mode %d"

	.no_dead_strip	_vol_cdev_open
.subsections_via_symbols
