	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx_set_mux
_zx_set_mux:                            ## @zx_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_pinctrl_dev_get_drvdata
	movq	16(%rax), %rcx
	movq	(%rcx), %rcx
	movl	%ebx, %r12d
	shlq	$4, %r12
	movq	8(%rcx,%r12), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movb	(%r13), %cl
	movl	$-1, %eax
	shll	%cl, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r14d, %esi
	movq	24(%r13), %r14
	movl	4(%r13), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	8(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_pinmux_generic_get_function
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%r14), %rdi
	addq	$16, %r14
	testq	%rdi, %rdi
	jne	LBB0_6
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_4:
	movl	-48(%rbp), %r15d                ## 4-byte Reload
LBB0_8:
	notl	%r15d
	movl	(%r14), %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	addq	$8, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	cmpq	$0, 16(%r13)
	je	LBB0_12
## %bb.9:
	movl	%r15d, %r14d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r12), %r15d
	leal	15(%r15), %eax
	testl	%r15d, %r15d
	cmovnsl	%r15d, %eax
	movl	%eax, %r12d
	sarl	$4, %r12d
	shll	$2, %r12d
	andl	$-16, %eax
	subl	%eax, %r15d
	addl	%r15d, %r15d
	movq	_AON_MUX_FLAG@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.10:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %edi
	addl	%r12d, %edi
	callq	_readl
	movl	$3, %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	notl	%edx
	andl	$3, %ebx
	shll	%cl, %ebx
	andl	%eax, %edx
	orl	%edx, %ebx
	addl	(%r13), %r12d
	jmp	LBB0_13
LBB0_12:
	movl	4(%r14), %edi
	movl	-56(%rbp), %r12d                ## 4-byte Reload
	addl	%r12d, %edi
	callq	_readl
	andl	%r15d, %ebx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	shll	%cl, %r15d
	notl	%r15d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	andl	%eax, %r15d
	orl	%r15d, %ebx
	addl	4(%r14), %r12d
LBB0_13:
	movl	%ebx, %edi
	jmp	LBB0_14
LBB0_11:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	addl	%r13d, %edi
	callq	_readl
	andl	%r14d, %ebx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	shll	%cl, %r14d
	notl	%r14d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	andl	%eax, %r14d
	orl	%r14d, %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	addl	4(%r14), %r13d
	movl	%ebx, %edi
	movl	%r13d, %esi
	callq	_writel
	movl	(%r14), %edi
	addl	%r12d, %edi
	callq	_readl
	movl	$3, %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	notl	%edx
	movq	_NONAON_MVAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%r15d, %ecx
	shll	%cl, %edi
	andl	%eax, %edx
	orl	%edx, %edi
	addl	(%r14), %r12d
LBB0_14:
	movl	%r12d, %esi
	callq	_writel
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AON_MUX_FLAG,4,2               ## @AON_MUX_FLAG
	.comm	_NONAON_MVAL,4,2                ## @NONAON_MVAL
	.no_dead_strip	_zx_set_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx_set_mux
_zx_set_mux:                            ; @zx_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	x21, x2
	mov	x20, x1
	mov	x22, x0
	bl	_pinctrl_dev_get_drvdata
	ldr	x8, [x0, #16]
	ldr	x25, [x8]
	add	x8, x25, w21, uxtw #4
	ldr	x26, [x8, #8]
	cbz	x26, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x27, [x26, #24]
	ldp	w28, w23, [x26]
	ldr	w24, [x26, #8]
	mov	x0, x22
	mov	x1, x20
	bl	_pinmux_generic_get_function
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	mov	w8, #-1
	lsl	w22, w8, w28
	ldr	x0, [x27, #8]
	cbz	x0, LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x27, #16
	ldr	x0, [x27, #24]
	mov	x27, x8
	cbnz	x0, LBB0_3
	b	LBB0_7
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_6:
	mov	x8, x27
LBB0_7:
	mvn	w27, w22
	ldr	w22, [x8]
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x26, #16]
	cbz	x8, LBB0_10
; %bb.8:
	mov	w8, w21
	lsl	x8, x8, #4
	ldr	w8, [x25, x8]
	add	w9, w8, #15
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w10, w9, #4
	lsl	w21, w10, #2
	and	w9, w9, #0x7ffffff0
	sub	w8, w8, w9
	lsl	w25, w8, #1
Lloh3:
	adrp	x8, _AON_MUX_FLAG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AON_MUX_FLAG@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_11
; %bb.9:
	ldr	w8, [x19]
	add	w0, w8, w21
	bl	_readl
	mov	w8, #3
	lsl	w8, w8, w25
	bic	w8, w0, w8
	and	w9, w22, #0x3
	lsl	w9, w9, w25
	orr	w0, w8, w9
	b	LBB0_12
LBB0_10:
	ldr	w8, [x19, #4]
	add	w0, w8, w23
	bl	_readl
	lsl	w8, w27, w24
	bic	w8, w0, w8
	and	w9, w22, w27
	lsl	w9, w9, w24
	orr	w0, w8, w9
	ldr	w8, [x19, #4]
	add	w1, w8, w23
	b	LBB0_13
LBB0_11:
	ldr	w8, [x19, #4]
	add	w0, w8, w23
	bl	_readl
	lsl	w8, w27, w24
	bic	w8, w0, w8
	and	w9, w22, w27
	lsl	w9, w9, w24
	orr	w0, w8, w9
	ldr	w8, [x19, #4]
	add	w1, w8, w23
	bl	_writel
	ldr	w8, [x19]
	add	w0, w8, w21
	bl	_readl
	mov	w8, #3
	lsl	w8, w8, w25
Lloh6:
	adrp	x9, _NONAON_MVAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NONAON_MVAL@GOTPAGEOFF]
	bic	w8, w0, w8
Lloh8:
	ldr	w9, [x9]
	lsl	w9, w9, w25
	orr	w0, w9, w8
LBB0_12:
	ldr	w8, [x19]
	add	w1, w8, w21
LBB0_13:
	bl	_writel
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AON_MUX_FLAG,4,2               ; @AON_MUX_FLAG
	.comm	_NONAON_MVAL,4,2                ; @NONAON_MVAL
	.no_dead_strip	_zx_set_mux
.subsections_via_symbols
