	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ingenic_pinconf_set
_ingenic_pinconf_set:                   ## @ingenic_pinconf_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, %r13d
	movq	%rdx, %r12
	movl	%esi, %ebx
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %r15
	movq	_PINS_PER_GPIO_CHIP@GOTPCREL(%rip), %rcx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%r13d, %r13d
	je	LBB0_19
## %bb.1:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rdi
	callq	_pinconf_to_config_param
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_2
## %bb.4:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leal	65(%rcx), %eax
	movsbl	%al, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_unreachable
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	cmpq	%r13, %r14
	je	LBB0_18
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%r13,8), %rdi
	callq	_pinconf_to_config_param
	cmpl	$128, %eax
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$129, %eax
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$130, %eax
	jne	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_dev_dbg
	movq	%r15, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_ingenic_set_bias
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r15), %rax
	movq	8(%rax), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %r12d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_BIT
	testl	%r12d, %eax
	je	LBB0_12
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	callq	_dev_dbg
	movq	%r15, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	$1, %edx
	callq	_ingenic_set_bias
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %ebx
	movq	%r15, %r12
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	callq	_dev_dbg
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	$1, %edx
	callq	_ingenic_set_bias
	movq	%r12, %r15
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_9:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_18:
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PINS_PER_GPIO_CHIP,4,2         ## @PINS_PER_GPIO_CHIP
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disable pull-over for pin P%c%u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"set pull-up for pin P%c%u\n"

L_.str.2:                               ## @.str.2
	.asciz	"set pull-down for pin P%c%u\n"

	.no_dead_strip	_ingenic_pinconf_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ingenic_pinconf_set
_ingenic_pinconf_set:                   ; @ingenic_pinconf_set
	.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	x23, x3
	mov	x19, x2
	mov	x20, x1
	bl	_pinctrl_dev_get_drvdata
	cbz	w23, LBB0_16
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _PINS_PER_GPIO_CHIP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PINS_PER_GPIO_CHIP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	udiv	w27, w20, w8
	msub	w22, w27, w8, w20
	mov	w28, w23
	mov	x23, x28
	mov	x24, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	bl	_pinconf_to_config_param
	sub	w8, w0, #128
	cmp	w8, #3
	b.hs	LBB0_17
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #8
	subs	x23, x23, #1
	b.ne	LBB0_2
; %bb.4:
	add	w8, w27, #65
	sxtb	w23, w8
Lloh3:
	adrp	x25, l_.str.2@PAGE
Lloh4:
	add	x25, x25, l_.str.2@PAGEOFF
Lloh5:
	adrp	x26, l_.str@PAGE
Lloh6:
	add	x26, x26, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	bl	_unreachable
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x19, x19, #8
	subs	x28, x28, #1
	b.eq	LBB0_16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	bl	_pinconf_to_config_param
	cmp	w0, #128
	b.eq	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w0, #129
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w0, #130
	b.ne	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x21]
	mov	x1, x26
	mov	x2, x23
	mov	x3, x22
	bl	_dev_dbg
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_ingenic_set_bias
	b	LBB0_6
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8, #8]
	ldr	w24, [x8, x27, lsl #2]
	mov	x0, x22
	bl	_BIT
	tst	w0, w24
	b.eq	LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x21]
	mov	x1, x25
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	w24, [x8, x27, lsl #2]
	mov	x0, x22
	bl	_BIT
	tst	w0, w24
	b.eq	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x21]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x2, x23
	mov	x3, x22
	bl	_dev_dbg
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_ingenic_set_bias
	b	LBB0_6
LBB0_16:
	mov	w0, #0
	b	LBB0_20
LBB0_17:
Lloh9:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	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 AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PINS_PER_GPIO_CHIP,4,2         ; @PINS_PER_GPIO_CHIP
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disable pull-over for pin P%c%u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"set pull-up for pin P%c%u\n"

l_.str.2:                               ; @.str.2
	.asciz	"set pull-down for pin P%c%u\n"

	.no_dead_strip	_ingenic_pinconf_set
.subsections_via_symbols
