	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ice1712_ews_cs8404_spdif_write
_snd_ice1712_ews_cs8404_spdif_write:    ## @snd_ice1712_ews_cs8404_spdif_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movb	%r14b, -35(%rbp)
	movq	8(%rdi), %r15
	movl	(%rdi), %edi
	callq	_snd_i2c_lock
	movl	4(%rbx), %eax
	leal	-128(%rax), %ecx
	cmpl	$4, %ecx
	jae	LBB0_1
## %bb.7:
	movq	(%r15), %rax
	movq	_EWS_I2C_CS8404@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	-35(%rbp), %rsi
	movl	$1, %edx
LBB0_5:
	callq	_snd_i2c_sendbytes
LBB0_6:
	movl	(%rbx), %edi
	callq	_snd_i2c_unlock
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$132, %eax
	jne	LBB0_6
## %bb.2:
	movq	(%r15), %rax
	movq	_EWS_I2C_88D@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	-34(%rbp), %rsi
	movl	$2, %edx
	callq	_snd_i2c_readbytes
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.3:
	cmpb	%r14b, -33(%rbp)
	je	LBB0_6
## %bb.4:
	movb	%r14b, -33(%rbp)
	movq	(%r15), %rax
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	-34(%rbp), %rsi
	movl	$2, %edx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_EWS_I2C_CS8404,8,3             ## @EWS_I2C_CS8404
	.comm	_EWS_I2C_88D,8,3                ## @EWS_I2C_88D
	.no_dead_strip	_snd_ice1712_ews_cs8404_spdif_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ice1712_ews_cs8404_spdif_write
_snd_ice1712_ews_cs8404_spdif_write:    ; @snd_ice1712_ews_cs8404_spdif_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	strb	w1, [sp, #15]
	ldr	x21, [x0, #8]
	ldr	w0, [x0]
	bl	_snd_i2c_lock
	ldr	w8, [x19, #4]
	sub	w9, w8, #128
	cmp	w9, #4
	b.hs	LBB0_4
; %bb.1:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _EWS_I2C_CS8404@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EWS_I2C_CS8404@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	add	x1, sp, #15
	mov	w2, #1
LBB0_2:
	bl	_snd_i2c_sendbytes
LBB0_3:
	ldr	w0, [x19]
	bl	_snd_i2c_unlock
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	cmp	w8, #132
	b.ne	LBB0_3
; %bb.5:
	ldr	x8, [x21]
Lloh3:
	adrp	x22, _EWS_I2C_88D@GOTPAGE
Lloh4:
	ldr	x22, [x22, _EWS_I2C_88D@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	w0, [x8, x9, lsl #2]
	add	x1, sp, #13
	mov	w2, #2
	bl	_snd_i2c_readbytes
	cmp	w0, #2
	b.ne	LBB0_3
; %bb.6:
	ldrb	w8, [sp, #14]
	cmp	w8, w20
	b.eq	LBB0_3
; %bb.7:
	strb	w20, [sp, #14]
	ldr	x8, [x21]
	ldr	x9, [x22]
	ldr	w0, [x8, x9, lsl #2]
	add	x1, sp, #13
	mov	w2, #2
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EWS_I2C_CS8404,8,3             ; @EWS_I2C_CS8404
	.comm	_EWS_I2C_88D,8,3                ; @EWS_I2C_88D
	.no_dead_strip	_snd_ice1712_ews_cs8404_spdif_write
.subsections_via_symbols
