	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_pfc_func_set_mux
_sh_pfc_func_set_mux:                   ## @sh_pfc_func_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, %r12d
	movq	%rdi, %r14
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r15
	movq	8(%r15), %rax
	movq	(%rax), %r13
	movl	%r12d, %ebx
	movl	(%r14), %edi
	shlq	$5, %rbx
	movl	24(%r13,%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	cmpl	$0, (%r13,%rbx)
	je	LBB0_1
## %bb.6:
	leaq	(%rbx,%r13), %rcx
	addq	%rbx, %r13
	addq	$16, %r13
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %r15
	movq	(%r13), %rax
	movl	(%rax,%r14,4), %esi
	movq	%rbx, %rdi
	callq	_sh_pfc_get_pin_index
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	cltq
	shlq	$4, %rax
	cmpq	$0, 8(%rcx,%rax)
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-8(%r13), %rax
	movl	(%rax,%r14,4), %esi
	movq	_PINMUX_TYPE_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_sh_pfc_config_mux
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_10
## %bb.2:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%r14
	movq	%r15, %rcx
	movl	(%r15), %eax
	cmpq	%rax, %r14
	jb	LBB0_7
## %bb.3:
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_sh_pfc_get_pin_index
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	cltq
	shlq	$4, %rax
	movl	$1, (%rcx,%rax)
	movq	-8(%r13), %rdx
	movl	(%rdx,%rbx,4), %edx
	movl	%edx, 4(%rcx,%rax)
	movq	%r15, %rax
	incq	%rbx
	movl	(%r15), %eax
	cmpq	%rax, %rbx
	jb	LBB0_5
	jmp	LBB0_10
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_10
LBB0_8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configuring pin group %s\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PINMUX_TYPE_FUNCTION,4,2       ## @PINMUX_TYPE_FUNCTION
	.no_dead_strip	_sh_pfc_func_set_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_pfc_func_set_mux
_sh_pfc_func_set_mux:                   ; @sh_pfc_func_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	x22, x0
	bl	_pinctrl_dev_get_drvdata
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	w9, w21
	ldr	w0, [x22]
	add	x22, x8, x9, lsl #5
	ldr	w2, [x22, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x22]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x25, #0
	add	x23, x22, #16
	add	x24, x22, #8
Lloh2:
	adrp	x26, _PINMUX_TYPE_FUNCTION@GOTPAGE
Lloh3:
	ldr	x26, [x26, _PINMUX_TYPE_FUNCTION@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	w1, [x8, x25, lsl #2]
	mov	x0, x19
	bl	_sh_pfc_get_pin_index
	ldr	x8, [x20]
	add	x8, x8, w0, sxtw #4
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
	ldr	w1, [x8, x25, lsl #2]
	ldr	w2, [x26]
	mov	x0, x19
	bl	_sh_pfc_config_mux
	mov	x21, x0
	tbnz	w0, #31, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x25, x25, #1
	ldr	w8, [x22]
	cmp	x25, x8
	b.lo	LBB0_2
; %bb.5:
	cbz	w8, LBB0_10
; %bb.6:
	mov	x25, #0
	mov	w26, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	lsl	x27, x25, #2
	ldr	w1, [x8, x27]
	mov	x0, x19
	bl	_sh_pfc_get_pin_index
	ldr	x8, [x20]
	add	x8, x8, w0, sxtw #4
	str	w26, [x8]
	ldr	x9, [x24]
	ldr	w9, [x9, x27]
	str	w9, [x8, #4]
	add	x25, x25, #1
	ldr	w8, [x22]
	cmp	x25, x8
	b.lo	LBB0_7
	b	LBB0_10
LBB0_8:
	mov	w21, #0
	b	LBB0_10
LBB0_9:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configuring pin group %s\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PINMUX_TYPE_FUNCTION,4,2       ; @PINMUX_TYPE_FUNCTION
	.no_dead_strip	_sh_pfc_func_set_mux
.subsections_via_symbols
