	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aspeed_pinmux_set_mux          ## -- Begin function aspeed_pinmux_set_mux
	.p2align	4, 0x90
_aspeed_pinmux_set_mux:                 ## @aspeed_pinmux_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
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %r13
	movq	8(%rax), %rax
	movl	%ebx, %ecx
	shlq	$4, %rcx
	cmpl	$0, (%rax,%rcx)
	jle	LBB0_14
## %bb.1:
	leaq	(%rax,%rcx), %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r14d
	movq	(%r13), %r15
	leaq	(%rax,%rcx), %r12
	addq	$8, %r12
	xorl	%ebx, %ebx
	leaq	L_.str(%rip), %rdi
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rsi
	callq	_aspeed_sig_expr_enable
	testl	%eax, %eax
	jne	LBB0_15
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	leaq	L_.str(%rip), %rdi
	jge	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	(%r12), %rax
	movslq	(%rax,%rbx,4), %rsi
	movq	16(%r13), %rax
	movq	(%rax,%rsi,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%r15,%r14,4), %edx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_pr_debug
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r12
	testq	%r12, %r12
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$8, %r12
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15,%r14,4), %esi
	movq	%rbx, %rdi
	callq	_aspeed_find_expr_by_name
	movq	%r13, %rdi
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rsi
	callq	_aspeed_disable_sig
	testl	%eax, %eax
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=2
	movq	(%r12), %rbx
	addq	$8, %r12
	testq	%rbx, %rbx
	jne	LBB0_9
LBB0_11:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_get_defined_functions
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_get_defined_signals
	movq	%rax, %r12
	movl	(%r15,%r14,4), %esi
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%rax, %r8
	movq	%r13, %r9
	callq	_pr_warn
	movq	%r12, %rdi
	callq	_kfree
	movq	%r13, %rdi
	callq	_kfree
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Muxing pin %d for %s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"No function %s found on pin %s (%d). Found signal(s) %s for function(s) %s\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aspeed_pinmux_set_mux          ; -- Begin function aspeed_pinmux_set_mux
	.p2align	2
_aspeed_pinmux_set_mux:                 ; @aspeed_pinmux_set_mux
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	bl	_pinctrl_dev_get_drvdata
	ldr	x8, [x0, #8]
	add	x23, x8, w21, uxtw #4
	ldr	w9, [x23]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x19, x0
	mov	x27, #0
	mov	w9, w21
	mov	w24, w20
	ldr	x25, [x0]
	add	x8, x8, x9, lsl #4
	add	x26, x8, #8
Lloh0:
	adrp	x28, l_.str@PAGE
Lloh1:
	add	x28, x28, l_.str@PAGEOFF
	str	x23, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x0
	mov	x0, x19
	bl	_aspeed_sig_expr_enable
	ldr	x23, [sp, #8]                   ; 8-byte Folded Reload
	cbnz	w0, LBB0_14
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	ldrsw	x8, [x23]
	cmp	x27, x8
	b.ge	LBB0_13
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x26]
	ldrsw	x21, [x8, x27, lsl #2]
	ldr	x8, [x19, #16]
	ldr	x22, [x8, x21, lsl #3]
	ldr	w2, [x25, x24, lsl #2]
	mov	x0, x28
	mov	x1, x21
	bl	_pr_debug
	cbz	x22, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x23, [x8]
	cbz	x23, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x8, #8
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x25, x24, lsl #2]
	mov	x0, x23
	bl	_aspeed_find_expr_by_name
	cbnz	x0, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x19
	mov	x1, x23
	bl	_aspeed_disable_sig
	cbnz	w0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	x23, [x20], #8
	cbnz	x23, LBB0_8
LBB0_11:
	mov	x0, x22
	bl	_get_defined_functions
	mov	x19, x0
	mov	x0, x22
	bl	_get_defined_signals
	mov	x20, x0
	ldr	w1, [x25, x24, lsl #2]
	ldr	w2, [x22]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_pr_warn
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
	bl	_kfree
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Muxing pin %d for %s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"No function %s found on pin %s (%d). Found signal(s) %s for function(s) %s\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
.subsections_via_symbols
