	.file	"extr_ews.c_snd_ice1712_ews_cs8404_spdif_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_ice1712_ews_cs8404_spdif_write, @function
snd_ice1712_ews_cs8404_spdif_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR 8[rdi]
	mov	edi, DWORD PTR [rdi]
	mov	BYTE PTR 12[rsp], sil
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	snd_i2c_lock@PLT
	mov	eax, DWORD PTR 4[rbx]
	cmp	eax, 131
	jle	.L9
	cmp	eax, 132
	jne	.L4
	mov	rdx, QWORD PTR EWS_I2C_88D[rip]
	mov	rax, QWORD PTR 0[rbp]
	lea	r12, 22[rsp]
	mov	rsi, r12
	mov	edi, DWORD PTR [rax+rdx*4]
	mov	edx, 2
	call	snd_i2c_readbytes@PLT
	cmp	eax, 2
	je	.L10
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, DWORD PTR [rbx]
	call	snd_i2c_unlock@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	cmp	eax, 127
	jle	.L4
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR EWS_I2C_CS8404[rip]
	lea	rsi, 12[rsp]
	mov	edi, DWORD PTR [rax+rdx*4]
	mov	edx, 1
	call	snd_i2c_sendbytes@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	movzx	eax, BYTE PTR 12[rsp]
	cmp	BYTE PTR 23[rsp], al
	je	.L4
	mov	BYTE PTR 23[rsp], al
	mov	rdx, QWORD PTR EWS_I2C_88D[rip]
	mov	rsi, r12
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [rax+rdx*4]
	mov	edx, 2
	call	snd_i2c_sendbytes@PLT
	jmp	.L4
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	snd_ice1712_ews_cs8404_spdif_write, .-snd_ice1712_ews_cs8404_spdif_write
	.comm	EWS_I2C_CS8404,8,8
	.comm	EWS_I2C_88D,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ews.c_snd_ice1712_ews_cs8404_spdif_write.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_ice1712_ews_cs8404_spdif_write, %function
snd_ice1712_ews_cs8404_spdif_write:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r3, .L12
	sub	sp, sp, #16
	strb	r1, [sp, #7]
	ldr	r0, [r0]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r5, [r4, #8]
	bl	snd_i2c_lock
	ldr	r3, [r4, #4]
	cmp	r3, #131
	ble	.L9
	cmp	r3, #132
	bne	.L4
	ldr	r6, .L12+4
	ldr	r3, [r5]
	ldr	r2, [r6]
	add	r1, sp, #8
	ldr	r0, [r3, r2, lsl #2]
	mov	r2, #2
	bl	snd_i2c_readbytes
	cmp	r0, #2
	beq	.L10
.L4:
	ldr	r0, [r4]
	bl	snd_i2c_unlock
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	cmp	r3, #127
	ble	.L4
	ldr	r2, .L12+8
	ldr	r3, [r5]
	ldr	r1, [r2]
	mov	r2, #1
	ldr	r0, [r3, r1, lsl #2]
	add	r1, sp, #7
	bl	snd_i2c_sendbytes
	b	.L4
.L10:
	ldrb	r3, [sp, #7]	@ zero_extendqisi2
	ldrb	r2, [sp, #9]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L4
	strb	r3, [sp, #9]
	ldr	r1, [r6]
	ldr	r3, [r5]
	mov	r2, r0
	ldr	r0, [r3, r1, lsl #2]
	add	r1, sp, #8
	bl	snd_i2c_sendbytes
	b	.L4
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	EWS_I2C_88D
	.word	EWS_I2C_CS8404
	.size	snd_ice1712_ews_cs8404_spdif_write, .-snd_ice1712_ews_cs8404_spdif_write
	.comm	EWS_I2C_CS8404,4,4
	.comm	EWS_I2C_88D,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
