	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8766_write
_wm8766_write:                          ## @wm8766_write
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	(%rdi), %r15
	movq	_OXYGEN_SPI_TRIGGER@GOTPCREL(%rip), %rax
	movq	_OXYGEN_SPI_DATA_LENGTH_2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_OXYGEN_SPI_CLOCK_160@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_OXYGEN_SPI_CEN_LATCH_CLOCK_LO@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%ebx, %edx
	shll	$9, %edx
	orl	%r14d, %edx
	callq	_oxygen_write_spi
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%ebx, %eax
	jbe	LBB0_7
## %bb.1:
	movq	_WM8766_LDA1@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	ja	LBB0_3
## %bb.2:
	movq	_WM8766_RDA1@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jae	LBB0_5
LBB0_3:
	movq	_WM8766_LDA2@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	ja	LBB0_6
## %bb.4:
	movq	_WM8766_MASTDA@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jb	LBB0_6
LBB0_5:
	movq	_WM8766_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
LBB0_6:
	movq	(%r15), %rax
	movl	%ebx, %ecx
	movl	%r14d, (%rax,%rcx,4)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OXYGEN_SPI_TRIGGER,4,2         ## @OXYGEN_SPI_TRIGGER
	.comm	_OXYGEN_SPI_DATA_LENGTH_2,4,2   ## @OXYGEN_SPI_DATA_LENGTH_2
	.comm	_OXYGEN_SPI_CLOCK_160,4,2       ## @OXYGEN_SPI_CLOCK_160
	.comm	_OXYGEN_SPI_CODEC_SHIFT,4,2     ## @OXYGEN_SPI_CODEC_SHIFT
	.comm	_OXYGEN_SPI_CEN_LATCH_CLOCK_LO,4,2 ## @OXYGEN_SPI_CEN_LATCH_CLOCK_LO
	.comm	_WM8766_LDA1,4,2                ## @WM8766_LDA1
	.comm	_WM8766_RDA1,4,2                ## @WM8766_RDA1
	.comm	_WM8766_LDA2,4,2                ## @WM8766_LDA2
	.comm	_WM8766_MASTDA,4,2              ## @WM8766_MASTDA
	.comm	_WM8766_UPDATE,4,2              ## @WM8766_UPDATE
	.no_dead_strip	_wm8766_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8766_write
_wm8766_write:                          ; @wm8766_write
	.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, x2
	mov	x20, x1
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _OXYGEN_SPI_TRIGGER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OXYGEN_SPI_TRIGGER@GOTPAGEOFF]
Lloh2:
	adrp	x9, _OXYGEN_SPI_DATA_LENGTH_2@GOTPAGE
Lloh3:
	ldr	x9, [x9, _OXYGEN_SPI_DATA_LENGTH_2@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _OXYGEN_SPI_CLOCK_160@GOTPAGE
Lloh7:
	ldr	x9, [x9, _OXYGEN_SPI_CLOCK_160@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _OXYGEN_SPI_CEN_LATCH_CLOCK_LO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _OXYGEN_SPI_CEN_LATCH_CLOCK_LO@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w1, w8, w9
	orr	w2, w2, w20, lsl #9
	bl	_oxygen_write_spi
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, w20
	b.ls	LBB0_5
; %bb.1:
Lloh12:
	adrp	x8, _WM8766_LDA1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WM8766_LDA1@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _WM8766_RDA1@GOTPAGE
Lloh16:
	ldr	x9, [x9, _WM8766_RDA1@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #0, ls
	b.hs	LBB0_3
; %bb.2:
Lloh18:
	adrp	x8, _WM8766_LDA2@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WM8766_LDA2@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _WM8766_MASTDA@GOTPAGE
Lloh22:
	ldr	x9, [x9, _WM8766_MASTDA@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #0, ls
	b.lo	LBB0_4
LBB0_3:
Lloh24:
	adrp	x8, _WM8766_UPDATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WM8766_UPDATE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	bic	w19, w19, w8
LBB0_4:
	ldr	x8, [x21]
	str	w19, [x8, w20, uxtw #2]
LBB0_5:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_OXYGEN_SPI_TRIGGER,4,2         ; @OXYGEN_SPI_TRIGGER
	.comm	_OXYGEN_SPI_DATA_LENGTH_2,4,2   ; @OXYGEN_SPI_DATA_LENGTH_2
	.comm	_OXYGEN_SPI_CLOCK_160,4,2       ; @OXYGEN_SPI_CLOCK_160
	.comm	_OXYGEN_SPI_CODEC_SHIFT,4,2     ; @OXYGEN_SPI_CODEC_SHIFT
	.comm	_OXYGEN_SPI_CEN_LATCH_CLOCK_LO,4,2 ; @OXYGEN_SPI_CEN_LATCH_CLOCK_LO
	.comm	_WM8766_LDA1,4,2                ; @WM8766_LDA1
	.comm	_WM8766_RDA1,4,2                ; @WM8766_RDA1
	.comm	_WM8766_LDA2,4,2                ; @WM8766_LDA2
	.comm	_WM8766_MASTDA,4,2              ; @WM8766_MASTDA
	.comm	_WM8766_UPDATE,4,2              ; @WM8766_UPDATE
	.no_dead_strip	_wm8766_write
.subsections_via_symbols
