	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib9000_read_ber
_dib9000_read_ber:                      ## @dib9000_read_ber
	.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), %r12
	movq	%r12, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	leaq	16(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_3
## %bb.5:
	movq	_FE_SYNC_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_dib9000_fw_memmbx_sync
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	movq	_FE_MM_R_FE_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r12), %rdx
	movq	%r12, %rdi
	movl	$32, %ecx
	callq	_dib9000_risc_mem_read
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	8(%r12), %rax
	movl	40(%rax), %ecx
	shll	$16, %ecx
	orl	44(%rax), %ecx
	movl	%ecx, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movq	_EINTR@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movq	_EINTR@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get the lock\n"

	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_FE_SYNC_CHANNEL,4,2            ## @FE_SYNC_CHANNEL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_FE_MM_R_FE_MONITOR,4,2         ## @FE_MM_R_FE_MONITOR
	.no_dead_strip	_dib9000_read_ber
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib9000_read_ber
_dib9000_read_ber:                      ; @dib9000_read_ber
	.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
	ldr	x19, [x0]
	mov	x0, x19
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_4
; %bb.1:
	add	x21, x19, #16
	mov	x0, x21
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _FE_SYNC_CHANNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FE_SYNC_CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib9000_fw_memmbx_sync
	tbnz	x0, #63, LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _FE_MM_R_FE_MONITOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FE_MM_R_FE_MONITOR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x19
	mov	w3, #32
	bl	_dib9000_risc_mem_read
	mov	x0, x21
	bl	_mutex_unlock
	mov	w21, #0
	ldr	x8, [x19, #8]
	ldp	w9, w8, [x8, #40]
	orr	w8, w8, w9, lsl #16
	str	w8, [x20]
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh8:
	adrp	x8, _EINTR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_5:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh13:
	adrp	x8, _EINTR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	mov	x0, x21
	bl	_mutex_unlock
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_9:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get the lock\n"

	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_FE_SYNC_CHANNEL,4,2            ; @FE_SYNC_CHANNEL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_FE_MM_R_FE_MONITOR,4,2         ; @FE_MM_R_FE_MONITOR
	.no_dead_strip	_dib9000_read_ber
.subsections_via_symbols
