	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_ca0106_spi_write           ## -- Begin function snd_ca0106_spi_write
	.p2align	4, 0x90
_snd_ca0106_spi_write:                  ## @snd_ca0106_spi_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	%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	$1, %ebx
	cmpl	$65535, %esi                    ## imm = 0xFFFF
	ja	LBB0_6
## %bb.1:
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_SPI@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_snd_ca0106_ptr_read
	andl	$-262144, %eax                  ## imm = 0xFFFC0000
	orl	%eax, %r13d
	movl	%r13d, %r12d
	orl	$131072, %r12d                  ## imm = 0x20000
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	%r12d, %ecx
	callq	_snd_ca0106_ptr_write
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_snd_ca0106_ptr_read
	orl	$196608, %r13d                  ## imm = 0x30000
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	callq	_snd_ca0106_ptr_write
	movl	$100, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_snd_ca0106_ptr_read
	testl	$65536, %eax                    ## imm = 0x10000
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%ebx
	jne	LBB0_2
## %bb.4:
	movl	$1, %ebx
	jmp	LBB0_6
LBB0_5:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	%r12d, %ecx
	callq	_snd_ca0106_ptr_write
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_snd_ca0106_ptr_read
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI,4,2                        ## @SPI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_ca0106_spi_write           ; -- Begin function snd_ca0106_spi_write
	.p2align	2
_snd_ca0106_spi_write:                  ; @snd_ca0106_spi_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
	lsr	w8, w1, #16
	cbnz	w8, LBB0_4
; %bb.1:
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _SPI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x1, x20
	mov	w2, #0
	bl	_snd_ca0106_ptr_read
	and	w8, w0, #0xfffc0000
	orr	w22, w8, w21
	orr	w21, w22, #0x20000
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	x3, x21
	bl	_snd_ca0106_ptr_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_snd_ca0106_ptr_read
	orr	w3, w22, #0x30000
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_snd_ca0106_ptr_write
	mov	w22, #100
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_snd_ca0106_ptr_read
	tbz	w0, #16, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	w22, w22, #1
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #1
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	x3, x21
	bl	_snd_ca0106_ptr_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_snd_ca0106_ptr_read
	mov	w0, #0
LBB0_6:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI,4,2                        ; @SPI
.subsections_via_symbols
