	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gemini_pinconf_group_set
_gemini_pinconf_group_set:              ## @gemini_pinconf_group_set
	.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	%ecx, %r15d
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	callq	_pinctrl_dev_get_drvdata
	movq	16(%rax), %rdx
	movq	_gemini_3512_pin_groups@GOTPCREL(%rip), %rcx
	movl	%ebx, %r13d
	shlq	$3, %r13
	movq	(%rcx), %rcx
	addq	%r13, %rcx
	testq	%rdx, %rdx
	cmoveq	%rdx, %rcx
	movq	_gemini_3516_pin_groups@GOTPCREL(%rip), %rdx
	addq	(%rdx), %r13
	cmpq	$0, 8(%rax)
	cmoveq	%rcx, %r13
	cmpl	$0, 4(%r13)
	je	LBB0_3
## %bb.1:
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.4:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15,%r12,8), %rdi
	callq	_pinconf_to_config_param
	movl	%eax, %ebx
	movq	(%r15,%r12,8), %rdi
	callq	_pinconf_to_config_argument
	cmpl	$128, %ebx
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r15d
	movl	%eax, %ebx
	addl	$-4, %ebx
	roll	$30, %ebx
	cmpl	$4, %ebx
	jae	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r13), %edx
	bsfl	%edx, %eax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	cmpl	$1, %edx
	movl	$0, %ecx
	sbbl	%ecx, %ecx
	orb	%al, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	movl	4(%r14), %edi
	movq	_GLOBAL_IODRIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	movl	(%r14), %edi
	movl	(%r13), %edx
	movl	4(%r13), %r8d
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %ecx
	movl	%ebx, %r9d
	callq	_dev_dbg
	incq	%r12
	cmpq	%r12, -64(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_5
	jmp	LBB0_12
LBB0_3:
	movl	(%rax), %edi
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_2:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_12
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	jmp	LBB0_10
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
LBB0_10:
	callq	_dev_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
LBB0_12:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gemini_3512_pin_groups,8,3     ## @gemini_3512_pin_groups
	.comm	_gemini_3516_pin_groups,8,3     ## @gemini_3516_pin_groups
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pin config group \"%s\" does not support drive strength setting\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"invalid drive strength %d mA\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_GLOBAL_IODRIVE,4,2             ## @GLOBAL_IODRIVE
L_.str.2:                               ## @.str.2
	.asciz	"set group %s to %d mA drive strength mask %08x val %08x\n"

L_.str.3:                               ## @.str.3
	.asciz	"invalid config param %04x\n"

	.no_dead_strip	_gemini_pinconf_group_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gemini_pinconf_group_set
_gemini_pinconf_group_set:              ; @gemini_pinconf_group_set
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	bl	_pinctrl_dev_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _gemini_3512_pin_groups@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gemini_3512_pin_groups@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	mov	w9, w22
	lsl	x9, x9, #3
	add	x8, x8, x9
	ldp	x11, x10, [x0, #8]
Lloh3:
	adrp	x12, _gemini_3516_pin_groups@GOTPAGE
Lloh4:
	ldr	x12, [x12, _gemini_3516_pin_groups@GOTPAGEOFF]
	cmp	x10, #0
	csel	x8, xzr, x8, eq
Lloh5:
	ldr	x10, [x12]
	add	x9, x10, x9
	cmp	x11, #0
	csel	x24, x8, x9, eq
	ldr	w8, [x24, #4]
	cbz	w8, LBB0_7
; %bb.1:
	cbz	w21, LBB0_6
; %bb.2:
	mov	w25, w21
Lloh6:
	adrp	x26, _GLOBAL_IODRIVE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _GLOBAL_IODRIVE@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str.2@PAGE
Lloh9:
	add	x21, x21, l_.str.2@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	bl	_pinconf_to_config_param
	mov	x23, x0
	ldr	x0, [x19]
	bl	_pinconf_to_config_argument
	cmp	w23, #128
	b.ne	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	sub	w8, w0, #4
	ror	w8, w8, #2
	cmp	w8, #4
	b.hs	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x24, #4]
	rbit	w9, w2
	clz	w9, w9
	cmp	w2, #0
	csinv	w9, w9, wzr, ne
	lsl	w23, w8, w9
	ldr	w0, [x20, #4]
	ldr	w1, [x26]
	mov	x3, x23
	bl	_regmap_update_bits
	ldr	w0, [x20]
	ldp	w2, w4, [x24]
	mov	x1, x21
	mov	x3, x22
	mov	x5, x23
	bl	_dev_dbg
	add	x19, x19, #8
	subs	x25, x25, #1
	b.ne	LBB0_3
LBB0_6:
	mov	w0, #0
	b	LBB0_12
LBB0_7:
	ldr	w0, [x20]
	ldr	w2, [x24]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	ldr	w0, [x20]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x23
	b	LBB0_10
LBB0_9:
	ldr	w0, [x20]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
LBB0_10:
	bl	_dev_err
Lloh18:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_gemini_3512_pin_groups,8,3     ; @gemini_3512_pin_groups
	.comm	_gemini_3516_pin_groups,8,3     ; @gemini_3516_pin_groups
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pin config group \"%s\" does not support drive strength setting\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"invalid drive strength %d mA\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_GLOBAL_IODRIVE,4,2             ; @GLOBAL_IODRIVE
l_.str.2:                               ; @.str.2
	.asciz	"set group %s to %d mA drive strength mask %08x val %08x\n"

l_.str.3:                               ; @.str.3
	.asciz	"invalid config param %04x\n"

	.no_dead_strip	_gemini_pinconf_group_set
.subsections_via_symbols
