	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8785_write
_wm8785_write:                          ## @wm8785_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
	movq	_OXYGEN_SPI_CODEC_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$3, %eax
	shll	%cl, %eax
	movq	_OXYGEN_SPI_TRIGGER@GOTPCREL(%rip), %r8
	movq	_OXYGEN_SPI_DATA_LENGTH_2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	orl	(%r8), %ecx
	movq	_OXYGEN_SPI_CLOCK_160@GOTPCREL(%rip), %rbx
	orl	(%rbx), %ecx
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	(%rdi), %r15
	orl	%ecx, %eax
	movq	_OXYGEN_SPI_CEN_LATCH_CLOCK_LO@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%esi, %edx
	shll	$9, %edx
	orl	%r14d, %edx
	movl	%eax, %esi
	callq	_oxygen_write_spi
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%ebx, %eax
	jle	LBB0_2
## %bb.1:
	movq	(%r15), %rax
	movslq	%ebx, %rcx
	movl	%r14d, (%rax,%rcx,4)
LBB0_2:
	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
	.no_dead_strip	_wm8785_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8785_write
_wm8785_write:                          ; @wm8785_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_CODEC_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _OXYGEN_SPI_CODEC_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mov	w10, #3
	lsl	w9, w10, w9
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _OXYGEN_SPI_CEN_LATCH_CLOCK_LO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _OXYGEN_SPI_CEN_LATCH_CLOCK_LO@GOTPAGEOFF]
Lloh14:
	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.le	LBB0_2
; %bb.1:
	ldr	x8, [x21]
	str	w19, [x8, w20, sxtw #2]
LBB0_2:
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.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
	.no_dead_strip	_wm8785_write
.subsections_via_symbols
