	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib0090_fw_write_reg
_dib0090_fw_write_reg:                  ## @dib0090_fw_write_reg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	%r15d, %eax
	sarl	$8, %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movzbl	%r15b, %eax
	movl	%eax, 4(%rcx)
	leaq	16(%rbx), %r13
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	%r12d, 40(%rbx)
	movq	$0, 32(%rbx)
	movq	(%rbx), %rax
	movq	%rax, 16(%rbx)
	movl	$2, 24(%rbx)
	movl	48(%rbx), %edi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not acquire lock\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"DiB0090 I2C write failed\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_dib0090_fw_write_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib0090_fw_write_reg
_dib0090_fw_write_reg:                  ; @dib0090_fw_write_reg
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_4
; %bb.1:
	asr	w8, w22, #8
	ldr	x9, [x20]
	and	w10, w22, #0xff
	stp	w8, w10, [x9]
	add	x22, x20, #16
	mov	x0, x22
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	w21, [x20, #40]
	str	xzr, [x20, #32]
	ldr	x8, [x20]
	str	x8, [x20, #16]
	mov	w8, #2
	str	w8, [x20, #24]
	ldr	w0, [x20, #48]
	mov	x1, x22
	mov	w2, #1
	bl	_i2c_transfer
	mov	w20, #0
	cmp	w0, #1
	b.eq	LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
Lloh2:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not acquire lock\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"DiB0090 I2C write failed\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_dib0090_fw_write_reg
.subsections_via_symbols
