	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lochnagar_aif_set_mux
_lochnagar_aif_set_mux:                 ## @lochnagar_aif_set_mux
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ecx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movq	(%rax), %r13
	movq	24(%rsi), %r15
	movl	(%r15), %edx
	movl	12(%r15), %esi
	movq	%r13, %rdi
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	movl	16(%r12), %edx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movl	4(%r15), %ecx
	movl	8(%r15), %esi
	movq	%r13, %rdi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_4
## %bb.12:
	movl	%eax, %ebx
	movl	(%r14), %edi
	movl	16(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movl	%ebx, %ecx
	callq	_dev_err
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.5:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_LN_PTYPE_MUX@GOTPCREL(%rip), %rsi
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	movslq	%eax, %rcx
	cmpq	%rcx, %r13
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rcx
	movq	8(%r12), %rdx
	movq	(%rdx,%r13,8), %rdx
	movq	(%rcx,%rdx,8), %r15
	movq	(%r15), %rcx
	cmpq	(%rsi), %rcx
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rax
	movq	%rsi, %r14
	movl	(%rax), %edi
	movl	8(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	movl	12(%r15), %esi
	movq	_LOCHNAGAR2_GPIO_SRC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_LN2_OP_AIF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r12), %eax
	movq	%r14, %rsi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_13:
	movl	%eax, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	8(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set %s source: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to set %s enable: %d\n"

	.comm	_LN_PTYPE_MUX,8,3               ## @LN_PTYPE_MUX
L_.str.2:                               ## @.str.2
	.asciz	"Set pin %s to AIF\n"

	.comm	_LOCHNAGAR2_GPIO_SRC_MASK,4,2   ## @LOCHNAGAR2_GPIO_SRC_MASK
	.comm	_LN2_OP_AIF,4,2                 ## @LN2_OP_AIF
L_.str.3:                               ## @.str.3
	.asciz	"Failed to set %s to AIF: %d\n"

	.no_dead_strip	_lochnagar_aif_set_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lochnagar_aif_set_mux
_lochnagar_aif_set_mux:                 ; @lochnagar_aif_set_mux
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x3, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	x21, [x8]
	ldr	x23, [x1, #24]
	ldr	w1, [x23, #12]
	ldr	w2, [x23]
	mov	x0, x21
	bl	_regmap_update_bits
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
	ldr	w0, [x20]
	ldr	w2, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldp	w2, w1, [x23, #4]
	mov	x0, x21
	mov	x3, x2
	bl	_regmap_update_bits
	cbz	w0, LBB0_6
; %bb.3:
	mov	x22, x0
	ldr	w0, [x20]
	ldr	w2, [x19, #16]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x3, x22
	bl	_dev_err
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.7:
	mov	x24, #0
Lloh4:
	adrp	x25, _LN_PTYPE_MUX@GOTPAGE
Lloh5:
	ldr	x25, [x25, _LN_PTYPE_MUX@GOTPAGEOFF]
Lloh6:
	adrp	x26, _LOCHNAGAR2_GPIO_SRC_MASK@GOTPAGE
Lloh7:
	ldr	x26, [x26, _LOCHNAGAR2_GPIO_SRC_MASK@GOTPAGEOFF]
Lloh8:
	adrp	x23, l_.str.2@PAGE
Lloh9:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh10:
	adrp	x27, _LN2_OP_AIF@GOTPAGE
Lloh11:
	ldr	x27, [x27, _LN2_OP_AIF@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x24, lsl #3]
	ldr	x10, [x20, #8]
	ldr	x28, [x10, x9, lsl #3]
	ldr	x9, [x28]
	ldr	x10, [x25]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x20]
	ldr	w2, [x28, #8]
	mov	x1, x23
	bl	_dev_dbg
	ldr	w1, [x28, #12]
	ldr	w2, [x26]
	ldr	w3, [x27]
	mov	x0, x21
	bl	_regmap_update_bits
	cbnz	w0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x19]
	b	LBB0_8
LBB0_12:
	mov	w22, #0
	b	LBB0_5
LBB0_13:
	mov	x22, x0
	ldr	w0, [x20]
	ldr	w2, [x28, #8]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set %s source: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to set %s enable: %d\n"

	.comm	_LN_PTYPE_MUX,8,3               ; @LN_PTYPE_MUX
l_.str.2:                               ; @.str.2
	.asciz	"Set pin %s to AIF\n"

	.comm	_LOCHNAGAR2_GPIO_SRC_MASK,4,2   ; @LOCHNAGAR2_GPIO_SRC_MASK
	.comm	_LN2_OP_AIF,4,2                 ; @LN2_OP_AIF
l_.str.3:                               ; @.str.3
	.asciz	"Failed to set %s to AIF: %d\n"

	.no_dead_strip	_lochnagar_aif_set_mux
.subsections_via_symbols
