	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ub_bd_open
_ub_bd_open:                            ## @ub_bd_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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	24(%r12), %r15
	movq	_ub_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	leaq	4(%r15), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ub_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_2:
	incl	(%r15)
	movq	_ub_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	cmpq	$0, 16(%r12)
	jne	LBB0_4
## %bb.3:
	cmpq	$0, (%r12)
	je	LBB0_8
LBB0_4:
	movq	%rbx, %rdi
	callq	_check_disk_change
	cmpq	$0, 16(%r12)
	je	LBB0_8
## %bb.5:
	cmpq	$0, 8(%r12)
	je	LBB0_8
## %bb.6:
	movq	_FMODE_NDELAY@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_7
LBB0_8:
	xorl	%ebx, %ebx
	cmpq	$0, (%r12)
	je	LBB0_12
## %bb.9:
	movq	_FMODE_WRITE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_12
## %bb.10:
	movq	_EROFS@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_7:
	movq	_ENOMEDIUM@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_ub_put
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ub_lock,4,2                    ## @ub_lock
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_FMODE_NDELAY,4,2               ## @FMODE_NDELAY
	.comm	_ENOMEDIUM,4,2                  ## @ENOMEDIUM
	.comm	_FMODE_WRITE,4,2                ## @FMODE_WRITE
	.comm	_EROFS,4,2                      ## @EROFS
	.no_dead_strip	_ub_bd_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ub_bd_open
_ub_bd_open:                            ; @ub_bd_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	x20, x1
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x22, [x8]
	ldr	x19, [x22, #24]
Lloh0:
	adrp	x0, _ub_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ub_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	add	x0, x19, #4
	bl	_atomic_read
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, _ub_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _ub_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_2:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
Lloh7:
	adrp	x0, _ub_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _ub_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x22]
	cbz	x8, LBB0_7
LBB0_4:
	mov	x0, x21
	bl	_check_disk_change
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_7
; %bb.6:
Lloh9:
	adrp	x8, _FMODE_NDELAY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FMODE_NDELAY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_11
LBB0_7:
	ldr	x8, [x22]
	cbz	x8, LBB0_10
; %bb.8:
Lloh12:
	adrp	x8, _FMODE_WRITE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FMODE_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
Lloh15:
	adrp	x8, _EROFS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	mov	w20, #0
	b	LBB0_13
LBB0_11:
Lloh17:
	adrp	x8, _ENOMEDIUM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEDIUM@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_ub_put
LBB0_13:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ub_lock,4,2                    ; @ub_lock
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_FMODE_NDELAY,4,2               ; @FMODE_NDELAY
	.comm	_ENOMEDIUM,4,2                  ; @ENOMEDIUM
	.comm	_FMODE_WRITE,4,2                ; @FMODE_WRITE
	.comm	_EROFS,4,2                      ; @EROFS
	.no_dead_strip	_ub_bd_open
.subsections_via_symbols
