	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw9807_set_dac
_dw9807_set_dac:                        ## @dw9807_set_dac
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_DW9807_MSB_ADDR@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -19(%rbp)
	movl	%esi, %eax
	shrl	$8, %eax
	andb	$3, %al
	movb	%al, -18(%rbp)
	movb	%sil, -17(%rbp)
	movq	_dw9807_i2c_check@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DW9807_CTRL_DELAY_US@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MAX_RETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	imull	%r8d, %r9d
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_readx_poll_timeout
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_2:
	leaq	-19(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_i2c_master_send
	movl	%eax, %r14d
	xorl	%eax, %eax
	testl	%r14d, %r14d
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_dev_err
	movl	%r14d, %eax
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DW9807_MSB_ADDR,4,2            ## @DW9807_MSB_ADDR
	.comm	_dw9807_i2c_check,4,2           ## @dw9807_i2c_check
	.comm	_DW9807_CTRL_DELAY_US,4,2       ## @DW9807_CTRL_DELAY_US
	.comm	_MAX_RETRY,4,2                  ## @MAX_RETRY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot do the write operation because VCM is busy\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"I2C write MSB fail ret=%d\n"

	.no_dead_strip	_dw9807_set_dac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw9807_set_dac
_dw9807_set_dac:                        ; @dw9807_set_dac
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _DW9807_MSB_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DW9807_MSB_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	strb	w8, [sp, #13]
	ubfx	w8, w1, #8, #2
	strb	w8, [sp, #14]
	strb	w1, [sp, #15]
Lloh3:
	adrp	x8, _dw9807_i2c_check@GOTPAGE
Lloh4:
	ldr	x8, [x8, _dw9807_i2c_check@GOTPAGEOFF]
Lloh5:
	adrp	x9, _DW9807_CTRL_DELAY_US@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DW9807_CTRL_DELAY_US@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	ldr	w4, [x9]
Lloh9:
	adrp	x8, _MAX_RETRY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_RETRY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mul	w5, w8, w4
	mov	x1, x19
	mov	w3, #1
	bl	_readx_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_2:
	add	x1, sp, #13
	mov	x0, x19
	mov	w2, #3
	bl	_i2c_master_send
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	w20, #0
	b	LBB0_5
LBB0_4:
	mov	x20, x0
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DW9807_MSB_ADDR,4,2            ; @DW9807_MSB_ADDR
	.comm	_dw9807_i2c_check,4,2           ; @dw9807_i2c_check
	.comm	_DW9807_CTRL_DELAY_US,4,2       ; @DW9807_CTRL_DELAY_US
	.comm	_MAX_RETRY,4,2                  ; @MAX_RETRY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot do the write operation because VCM is busy\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"I2C write MSB fail ret=%d\n"

	.no_dead_strip	_dw9807_set_dac
.subsections_via_symbols
