	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_set_dai_fmt
_twl4030_set_dai_fmt:                   ## @twl4030_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, %r15d
	movq	(%rdi), %r14
	movq	_TWL4030_REG_AUDIO_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	%r15d, %ecx
	cmpl	$130, %ecx
	je	LBB0_3
## %bb.1:
	cmpl	$131, %ecx
	jne	LBB0_11
## %bb.2:
	movq	_TWL4030_AIF_SLAVE_EN@GOTPCREL(%rip), %rcx
	movq	_TWL4030_CLK256FS_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	jmp	LBB0_4
LBB0_3:
	movq	_TWL4030_AIF_SLAVE_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	%eax, %ebx
	movq	_TWL4030_CLK256FS_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
LBB0_4:
	movq	_TWL4030_AIF_FORMAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_SND_SOC_DAIFMT_FORMAT_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %r15d
	cmpl	$128, %r15d
	je	LBB0_5
## %bb.6:
	cmpl	$129, %r15d
	jne	LBB0_11
## %bb.7:
	movq	_TWL4030_AIF_FORMAT_TDM@GOTPCREL(%rip), %rdx
	jmp	LBB0_8
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_5:
	movq	_TWL4030_AIF_FORMAT_CODEC@GOTPCREL(%rip), %rdx
LBB0_8:
	notl	%ecx
	andl	%ecx, %ebx
	orl	(%rdx), %ebx
	xorl	%r15d, %r15d
	cmpl	%eax, %ebx
	je	LBB0_10
## %bb.9:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_twl4030_codec_enable
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_twl4030_write
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_twl4030_codec_enable
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TWL4030_REG_AUDIO_IF,4,2       ## @TWL4030_REG_AUDIO_IF
	.comm	_SND_SOC_DAIFMT_MASTER_MASK,4,2 ## @SND_SOC_DAIFMT_MASTER_MASK
	.comm	_TWL4030_AIF_SLAVE_EN,4,2       ## @TWL4030_AIF_SLAVE_EN
	.comm	_TWL4030_CLK256FS_EN,4,2        ## @TWL4030_CLK256FS_EN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TWL4030_AIF_FORMAT,4,2         ## @TWL4030_AIF_FORMAT
	.comm	_SND_SOC_DAIFMT_FORMAT_MASK,4,2 ## @SND_SOC_DAIFMT_FORMAT_MASK
	.comm	_TWL4030_AIF_FORMAT_CODEC,4,2   ## @TWL4030_AIF_FORMAT_CODEC
	.comm	_TWL4030_AIF_FORMAT_TDM,4,2     ## @TWL4030_AIF_FORMAT_TDM
	.no_dead_strip	_twl4030_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_set_dai_fmt
_twl4030_set_dai_fmt:                   ; @twl4030_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_AUDIO_IF@GOTPAGE
Lloh1:
	ldr	x21, [x21, _TWL4030_REG_AUDIO_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_AIF_SLAVE_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TWL4030_AIF_SLAVE_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _TWL4030_CLK256FS_EN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TWL4030_CLK256FS_EN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _TWL4030_AIF_SLAVE_EN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TWL4030_AIF_SLAVE_EN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh14:
	adrp	x9, _TWL4030_CLK256FS_EN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _TWL4030_CLK256FS_EN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
LBB0_4:
Lloh17:
	adrp	x9, _TWL4030_AIF_FORMAT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _TWL4030_AIF_FORMAT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _SND_SOC_DAIFMT_FORMAT_MASK@GOTPAGE
Lloh21:
	ldr	x10, [x10, _SND_SOC_DAIFMT_FORMAT_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	and	w10, w10, w20
	cmp	w10, #128
	b.eq	LBB0_8
; %bb.5:
	cmp	w10, #129
	b.ne	LBB0_7
; %bb.6:
Lloh23:
	adrp	x10, _TWL4030_AIF_FORMAT_TDM@GOTPAGE
Lloh24:
	ldr	x10, [x10, _TWL4030_AIF_FORMAT_TDM@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_8:
Lloh28:
	adrp	x10, _TWL4030_AIF_FORMAT_CODEC@GOTPAGE
Lloh29:
	ldr	x10, [x10, _TWL4030_AIF_FORMAT_CODEC@GOTPAGEOFF]
LBB0_9:
	bic	w8, w8, w9
	ldr	w9, [x10]
	orr	w20, w9, w8
	cmp	w20, w0
	b.eq	LBB0_11
; %bb.10:
	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_11:
	mov	w0, #0
LBB0_12:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_TWL4030_REG_AUDIO_IF,4,2       ; @TWL4030_REG_AUDIO_IF
	.comm	_SND_SOC_DAIFMT_MASTER_MASK,4,2 ; @SND_SOC_DAIFMT_MASTER_MASK
	.comm	_TWL4030_AIF_SLAVE_EN,4,2       ; @TWL4030_AIF_SLAVE_EN
	.comm	_TWL4030_CLK256FS_EN,4,2        ; @TWL4030_CLK256FS_EN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TWL4030_AIF_FORMAT,4,2         ; @TWL4030_AIF_FORMAT
	.comm	_SND_SOC_DAIFMT_FORMAT_MASK,4,2 ; @SND_SOC_DAIFMT_FORMAT_MASK
	.comm	_TWL4030_AIF_FORMAT_CODEC,4,2   ; @TWL4030_AIF_FORMAT_CODEC
	.comm	_TWL4030_AIF_FORMAT_TDM,4,2     ; @TWL4030_AIF_FORMAT_TDM
	.no_dead_strip	_twl4030_set_dai_fmt
.subsections_via_symbols
