	.file	"extr_nau8824.c_nau8824_set_fmt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nau8824_set_fmt, @function
nau8824_set_fmt:
.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	rdi, QWORD PTR [rdi]
	mov	ebx, esi
	call	snd_soc_component_get_drvdata@PLT
	mov	esi, DWORD PTR HZ[rip]
	mov	rdi, rax
	mov	rbp, rax
	call	nau8824_sema_acquire@PLT
	mov	eax, DWORD PTR SND_SOC_DAIFMT_MASTER_MASK[rip]
	and	eax, ebx
	cmp	eax, 135
	je	.L13
	mov	r12d, DWORD PTR NAU8824_I2S_MS_MASTER[rip]
	cmp	eax, 136
	je	.L2
.L3:
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	xor	r12d, r12d
.L2:
	mov	eax, DWORD PTR SND_SOC_DAIFMT_INV_MASK[rip]
	and	eax, ebx
	cmp	eax, 129
	je	.L14
	mov	ecx, DWORD PTR NAU8824_I2S_BP_INV[rip]
	cmp	eax, 131
	jne	.L3
.L5:
	and	ebx, DWORD PTR SND_SOC_DAIFMT_FORMAT_MASK[rip]
	add	ebx, -128
	cmp	ebx, 6
	ja	.L3
	lea	rdx, .L7[rip]
	movsx	rax, DWORD PTR [rdx+rbx*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L11-.L7
	.long	.L3-.L7
	.long	.L10-.L7
	.long	.L3-.L7
	.long	.L9-.L7
	.long	.L8-.L7
	.long	.L6-.L7
	.text
	.p2align 4,,10
	.p2align 3
.L14:
	xor	ecx, ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR NAU8824_I2S_PCMB_EN[rip]
	or	ecx, DWORD PTR NAU8824_I2S_DF_PCM_AB[rip]
.L12:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR NAU8824_I2S_DF_MASK[rip]
	mov	esi, DWORD PTR NAU8824_REG_PORT0_I2S_PCM_CTRL_1[rip]
	or	edx, DWORD PTR NAU8824_I2S_BP_MASK[rip]
	or	edx, eax
	call	regmap_update_bits@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR NAU8824_I2S_MS_MASK[rip]
	mov	ecx, r12d
	mov	esi, DWORD PTR NAU8824_REG_PORT0_I2S_PCM_CTRL_2[rip]
	call	regmap_update_bits@PLT
	mov	rdi, rbp
	call	nau8824_sema_release@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	eax, DWORD PTR NAU8824_I2S_PCMB_EN[rip]
	mov	edx, DWORD PTR NAU8824_I2S_DF_PCM_AB[rip]
	or	edx, eax
	or	ecx, edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR NAU8824_I2S_PCMB_EN[rip]
	or	ecx, DWORD PTR NAU8824_I2S_DF_I2S[rip]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR NAU8824_I2S_PCMB_EN[rip]
	or	ecx, DWORD PTR NAU8824_I2S_DF_LEFT[rip]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	mov	eax, DWORD PTR NAU8824_I2S_PCMB_EN[rip]
	or	ecx, DWORD PTR NAU8824_I2S_DF_RIGTH[rip]
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	nau8824_set_fmt, .-nau8824_set_fmt
	.comm	SND_SOC_DAIFMT_MASTER_MASK,4,4
	.comm	SND_SOC_DAIFMT_INV_MASK,4,4
	.comm	SND_SOC_DAIFMT_FORMAT_MASK,4,4
	.comm	NAU8824_REG_PORT0_I2S_PCM_CTRL_2,4,4
	.comm	NAU8824_REG_PORT0_I2S_PCM_CTRL_1,4,4
	.comm	NAU8824_I2S_PCMB_EN,4,4
	.comm	NAU8824_I2S_MS_MASTER,4,4
	.comm	NAU8824_I2S_MS_MASK,4,4
	.comm	NAU8824_I2S_DF_RIGTH,4,4
	.comm	NAU8824_I2S_DF_PCM_AB,4,4
	.comm	NAU8824_I2S_DF_MASK,4,4
	.comm	NAU8824_I2S_DF_LEFT,4,4
	.comm	NAU8824_I2S_DF_I2S,4,4
	.comm	NAU8824_I2S_BP_MASK,4,4
	.comm	NAU8824_I2S_BP_INV,4,4
	.comm	HZ,4,4
	.comm	EINVAL,4,4
	.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_nau8824.c_nau8824_set_fmt.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nau8824_set_fmt, %function
nau8824_set_fmt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r0, [r0]
	mov	r4, r1
	bl	snd_soc_component_get_drvdata
	ldr	r3, .L17
	mov	r5, r0
	ldr	r1, [r3]
	bl	nau8824_sema_acquire
	ldr	r3, .L17+4
	ldr	r3, [r3]
	and	r3, r3, r4
	cmp	r3, #135
	beq	.L13
	cmp	r3, #136
	bne	.L3
	ldr	r3, .L17+8
	ldr	r6, [r3]
.L2:
	ldr	r3, .L17+12
	ldr	r3, [r3]
	and	r3, r3, r4
	cmp	r3, #129
	beq	.L14
	cmp	r3, #131
	bne	.L3
	ldr	r3, .L17+16
	ldr	r3, [r3]
.L5:
	ldr	r2, .L17+20
	ldr	r1, [r2]
	and	r4, r4, r1
	sub	r4, r4, #128
	cmp	r4, #6
	ldrls	pc, [pc, r4, asl #2]
	b	.L3
.L7:
	.word	.L11
	.word	.L3
	.word	.L10
	.word	.L3
	.word	.L9
	.word	.L8
	.word	.L6
.L3:
	ldr	r3, .L17+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L14:
	mov	r3, #0
	b	.L5
.L13:
	mov	r6, #0
	b	.L2
.L6:
	ldr	r2, .L17+28
	ldr	r1, .L17+32
	ldr	r2, [r2]
	ldr	r0, [r1]
	orr	r3, r3, r2
.L12:
	ldr	r1, .L17+36
	ldr	r2, .L17+40
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	ip, .L17+44
	orr	r2, r1, r2
	orr	r2, r2, r0
	ldr	r1, [ip]
	ldr	r0, [r5]
	bl	regmap_update_bits
	ldr	r2, .L17+48
	ldr	r1, .L17+52
	mov	r3, r6
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r5]
	bl	regmap_update_bits
	mov	r0, r5
	bl	nau8824_sema_release
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r1, .L17+32
	ldr	r2, .L17+28
	ldr	r0, [r1]
	ldr	r2, [r2]
	orr	r2, r0, r2
	orr	r3, r2, r3
	b	.L12
.L9:
	ldr	r2, .L17+56
	ldr	r1, .L17+32
	ldr	r2, [r2]
	ldr	r0, [r1]
	orr	r3, r3, r2
	b	.L12
.L10:
	ldr	r2, .L17+60
	ldr	r1, .L17+32
	ldr	r2, [r2]
	ldr	r0, [r1]
	orr	r3, r3, r2
	b	.L12
.L11:
	ldr	r2, .L17+64
	ldr	r1, .L17+32
	ldr	r2, [r2]
	ldr	r0, [r1]
	orr	r3, r3, r2
	b	.L12
.L18:
	.align	2
.L17:
	.word	HZ
	.word	SND_SOC_DAIFMT_MASTER_MASK
	.word	NAU8824_I2S_MS_MASTER
	.word	SND_SOC_DAIFMT_INV_MASK
	.word	NAU8824_I2S_BP_INV
	.word	SND_SOC_DAIFMT_FORMAT_MASK
	.word	EINVAL
	.word	NAU8824_I2S_DF_PCM_AB
	.word	NAU8824_I2S_PCMB_EN
	.word	NAU8824_I2S_DF_MASK
	.word	NAU8824_I2S_BP_MASK
	.word	NAU8824_REG_PORT0_I2S_PCM_CTRL_1
	.word	NAU8824_I2S_MS_MASK
	.word	NAU8824_REG_PORT0_I2S_PCM_CTRL_2
	.word	NAU8824_I2S_DF_I2S
	.word	NAU8824_I2S_DF_LEFT
	.word	NAU8824_I2S_DF_RIGTH
	.size	nau8824_set_fmt, .-nau8824_set_fmt
	.comm	SND_SOC_DAIFMT_MASTER_MASK,4,4
	.comm	SND_SOC_DAIFMT_INV_MASK,4,4
	.comm	SND_SOC_DAIFMT_FORMAT_MASK,4,4
	.comm	NAU8824_REG_PORT0_I2S_PCM_CTRL_2,4,4
	.comm	NAU8824_REG_PORT0_I2S_PCM_CTRL_1,4,4
	.comm	NAU8824_I2S_PCMB_EN,4,4
	.comm	NAU8824_I2S_MS_MASTER,4,4
	.comm	NAU8824_I2S_MS_MASK,4,4
	.comm	NAU8824_I2S_DF_RIGTH,4,4
	.comm	NAU8824_I2S_DF_PCM_AB,4,4
	.comm	NAU8824_I2S_DF_MASK,4,4
	.comm	NAU8824_I2S_DF_LEFT,4,4
	.comm	NAU8824_I2S_DF_I2S,4,4
	.comm	NAU8824_I2S_BP_MASK,4,4
	.comm	NAU8824_I2S_BP_INV,4,4
	.comm	HZ,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
