	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function artpec6_pmx_select_func
_artpec6_pmx_select_func:               ## @artpec6_pmx_select_func
	.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	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %ecx
	movq	_artpec6_pin_groups@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rcx,%rcx,2), %r15
	cmpl	$0, (%rax,%r15,8)
	jle	LBB0_5
## %bb.1:
	xorl	%r14d, %r14d
	movq	_ARTPEC6_MAX_MUXABLE@GOTPCREL(%rip), %rdx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movslq	(%rax,%r15,8), %rcx
	cmpq	%rcx, %r14
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax,%r15,8), %rcx
	movq	(%rcx,%r14,8), %rcx
	cmpq	(%rdx), %rcx
	jg	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_artpec6_pmx_get_fname
	movl	%eax, %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	movq	_artpec6_pin_groups@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	leaq	16(%rdx,%r15,8), %rcx
	movq	_ARTPEC6_CONFIG_0@GOTPCREL(%rip), %rsi
	cmoveq	%rsi, %rcx
	testl	%eax, %eax
	cmoveq	%rsi, %rcx
	movl	(%rcx), %r12d
	movq	_ARTPEC6_PINMUX_SEL_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	shll	%cl, %r12d
	movq	8(%rdx,%r15,8), %rax
	movq	(%rax,%r14,8), %rdi
	callq	_artpec6_pmx_reg_offset
	movl	%eax, %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	addq	%r13, %rdi
	callq	_readl
	movq	_ARTPEC6_PINMUX_SEL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	orl	%r12d, %edi
	addq	(%rbx), %r13
	movq	%r13, %rsi
	callq	_writel
	movq	_ARTPEC6_MAX_MUXABLE@GOTPCREL(%rip), %rdx
	movq	_artpec6_pin_groups@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_4
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_artpec6_pin_groups,8,3         ## @artpec6_pin_groups
	.comm	_ARTPEC6_MAX_MUXABLE,8,3        ## @ARTPEC6_MAX_MUXABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpio"

	.comm	_ARTPEC6_CONFIG_0,4,2           ## @ARTPEC6_CONFIG_0
	.comm	_ARTPEC6_PINMUX_SEL_SHIFT,4,2   ## @ARTPEC6_PINMUX_SEL_SHIFT
	.comm	_ARTPEC6_PINMUX_SEL_MASK,4,2    ## @ARTPEC6_PINMUX_SEL_MASK
	.no_dead_strip	_artpec6_pmx_select_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function artpec6_pmx_select_func
_artpec6_pmx_select_func:               ; @artpec6_pmx_select_func
	.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
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
	bl	_pinctrl_dev_get_drvdata
Lloh0:
	adrp	x24, _artpec6_pin_groups@GOTPAGE
Lloh1:
	ldr	x24, [x24, _artpec6_pin_groups@GOTPAGEOFF]
	ldr	x8, [x24]
	mov	w9, #24
	umull	x9, w23, w9
	ldr	w9, [x8, x9]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, x0
	mov	x25, #0
	mov	w26, #24
Lloh2:
	adrp	x27, _ARTPEC6_MAX_MUXABLE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _ARTPEC6_MAX_MUXABLE@GOTPAGEOFF]
	mov	w28, w23
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	mul	x9, x28, x26
	ldrsw	x9, [x8, x9]
	cmp	x25, x9
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	madd	x9, x28, x26, x8
	ldr	x9, [x9, #8]
	ldr	x9, [x9, x25, lsl #3]
	ldr	x10, [x27]
	cmp	x9, x10
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_artpec6_pmx_get_fname
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, #0
	ccmp	w0, #0, #4, ne
	ldr	x8, [x24]
	madd	x8, x28, x26, x8
	add	x9, x8, #16
Lloh6:
	adrp	x10, _ARTPEC6_CONFIG_0@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ARTPEC6_CONFIG_0@GOTPAGEOFF]
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _ARTPEC6_PINMUX_SEL_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ARTPEC6_PINMUX_SEL_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w23, w9, w10
	ldr	x8, [x8, #8]
	ldr	x0, [x8, x25, lsl #3]
	bl	_artpec6_pmx_reg_offset
	ldr	x8, [x22]
	mov	w19, w0
	add	x0, x8, x19
	bl	_readl
Lloh11:
	adrp	x8, _ARTPEC6_PINMUX_SEL_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ARTPEC6_PINMUX_SEL_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	bic	w8, w0, w8
	orr	w0, w8, w23
	ldr	x8, [x22]
	add	x1, x8, x19
	bl	_writel
	ldr	x8, [x24]
	b	LBB0_2
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_artpec6_pin_groups,8,3         ; @artpec6_pin_groups
	.comm	_ARTPEC6_MAX_MUXABLE,8,3        ; @ARTPEC6_MAX_MUXABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpio"

	.comm	_ARTPEC6_CONFIG_0,4,2           ; @ARTPEC6_CONFIG_0
	.comm	_ARTPEC6_PINMUX_SEL_SHIFT,4,2   ; @ARTPEC6_PINMUX_SEL_SHIFT
	.comm	_ARTPEC6_PINMUX_SEL_MASK,4,2    ; @ARTPEC6_PINMUX_SEL_MASK
	.no_dead_strip	_artpec6_pmx_select_func
.subsections_via_symbols
