	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_voice_set_dai_fmt
_twl4030_voice_set_dai_fmt:             ## @twl4030_voice_set_dai_fmt
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	(%rdi), %r14
	movq	_TWL4030_REG_VOICE_IF@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_twl4030_read_reg_cache
	movq	_SND_SOC_DAIFMT_MASTER_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	cmpl	$130, %ecx
	je	LBB0_3
## %bb.1:
	cmpl	$131, %ecx
	jne	LBB0_7
## %bb.2:
	movq	_TWL4030_VIF_SLAVE_EN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	notq	%r15
	andq	%rax, %r15
	jmp	LBB0_4
LBB0_3:
	movq	_TWL4030_VIF_SLAVE_EN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	orq	%rax, %r15
LBB0_4:
	movq	_SND_SOC_DAIFMT_INV_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	cmpl	$128, %ebx
	je	LBB0_8
## %bb.5:
	cmpl	$129, %ebx
	jne	LBB0_7
## %bb.6:
	movq	_TWL4030_VIF_FORMAT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	notq	%rcx
	andq	%rcx, %r15
	jmp	LBB0_9
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_8:
	movq	_TWL4030_VIF_FORMAT@GOTPCREL(%rip), %rcx
	orq	(%rcx), %r15
LBB0_9:
	xorl	%ebx, %ebx
	cmpq	%rax, %r15
	je	LBB0_11
## %bb.10:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_twl4030_codec_enable
	movl	(%r12), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_twl4030_write
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_twl4030_codec_enable
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TWL4030_REG_VOICE_IF,4,2       ## @TWL4030_REG_VOICE_IF
	.comm	_SND_SOC_DAIFMT_MASTER_MASK,4,2 ## @SND_SOC_DAIFMT_MASTER_MASK
	.comm	_TWL4030_VIF_SLAVE_EN,8,3       ## @TWL4030_VIF_SLAVE_EN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SND_SOC_DAIFMT_INV_MASK,4,2    ## @SND_SOC_DAIFMT_INV_MASK
	.comm	_TWL4030_VIF_FORMAT,8,3         ## @TWL4030_VIF_FORMAT
	.no_dead_strip	_twl4030_voice_set_dai_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_voice_set_dai_fmt
_twl4030_voice_set_dai_fmt:             ; @twl4030_voice_set_dai_fmt
	.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	x20, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x21, _TWL4030_REG_VOICE_IF@GOTPAGE
Lloh1:
	ldr	x21, [x21, _TWL4030_REG_VOICE_IF@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_twl4030_read_reg_cache
Lloh2:
	adrp	x8, _SND_SOC_DAIFMT_MASTER_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SND_SOC_DAIFMT_MASTER_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w20
	cmp	w8, #130
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #131
	b.ne	LBB0_7
; %bb.2:
Lloh5:
	adrp	x8, _TWL4030_VIF_SLAVE_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TWL4030_VIF_SLAVE_EN@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	bic	x8, x0, x8
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _TWL4030_VIF_SLAVE_EN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TWL4030_VIF_SLAVE_EN@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	orr	x8, x8, x0
LBB0_4:
Lloh11:
	adrp	x9, _SND_SOC_DAIFMT_INV_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SND_SOC_DAIFMT_INV_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	and	w9, w9, w20
	cmp	w9, #128
	b.eq	LBB0_8
; %bb.5:
	cmp	w9, #129
	b.ne	LBB0_7
; %bb.6:
Lloh14:
	adrp	x9, _TWL4030_VIF_FORMAT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _TWL4030_VIF_FORMAT@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	bic	x20, x8, x9
	cmp	x20, x0
	b.ne	LBB0_9
	b	LBB0_10
LBB0_7:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_8:
Lloh20:
	adrp	x9, _TWL4030_VIF_FORMAT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TWL4030_VIF_FORMAT@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	orr	x20, x9, x8
	cmp	x20, x0
	b.eq	LBB0_10
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	bl	_twl4030_codec_enable
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_twl4030_write
	mov	x0, x19
	mov	w1, #1
	bl	_twl4030_codec_enable
LBB0_10:
	mov	w0, #0
LBB0_11:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_TWL4030_REG_VOICE_IF,4,2       ; @TWL4030_REG_VOICE_IF
	.comm	_SND_SOC_DAIFMT_MASTER_MASK,4,2 ; @SND_SOC_DAIFMT_MASTER_MASK
	.comm	_TWL4030_VIF_SLAVE_EN,8,3       ; @TWL4030_VIF_SLAVE_EN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SND_SOC_DAIFMT_INV_MASK,4,2    ; @SND_SOC_DAIFMT_INV_MASK
	.comm	_TWL4030_VIF_FORMAT,8,3         ; @TWL4030_VIF_FORMAT
	.no_dead_strip	_twl4030_voice_set_dai_fmt
.subsections_via_symbols
