	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_set_pull
_rockchip_set_pull:                     ## @rockchip_set_pull
	.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, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	movq	8(%r12), %r13
	movl	(%r12), %edi
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	callq	_dev_dbg
	movl	(%r13), %eax
	movq	_RK3066B@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%r14d, %r14d
	cmovel	%r14d, %ebx
	jmp	LBB0_15
LBB0_2:
	leaq	-64(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	*8(%r13)
	movl	(%r13), %eax
	addl	$-128, %eax
	cmpl	$7, %eax
	ja	LBB0_14
## %bb.3:
	movl	$159, %ecx
	btl	%eax, %ecx
	jae	LBB0_4
## %bb.7:
	movq	(%rbx), %rax
	leal	7(%r15), %ecx
	testl	%r15d, %r15d
	cmovnsl	%r15d, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rcx
	movslq	(%rax,%rcx,4), %r13
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_rockchip_pull_list@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax,%r13,8), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_11
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	(%rax,%r13,8), %rdi
	cmpl	%r14d, (%rdi,%rbx,4)
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_11:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %ebx
	negl	%ebx
	testl	%eax, %eax
	jle	LBB0_13
## %bb.12:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_13:
	movq	_RK3188_PULL_BITS_PER_PIN@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$-1, %esi
	shll	%cl, %esi
	notl	%esi
	movb	-44(%rbp), %al
	leal	16(%rax), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	movl	%esi, %edx
	sarl	$16, %edx
	movl	%eax, %ecx
	shll	%cl, %ebx
	orl	%esi, %edx
	orl	%esi, %ebx
	movq	-64(%rbp), %rdi
	movl	-48(%rbp), %esi
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_4:
	movl	-44(%rbp), %edi
	addl	$16, %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_PIN_CONFIG_BIAS_DISABLE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_6
## %bb.5:
	movl	-44(%rbp), %edi
	callq	_BIT
	orl	%eax, %ebx
LBB0_6:
	movq	-64(%rbp), %rdi
	movl	-48(%rbp), %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_14:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %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	"setting pull of GPIO%d-%d to %d\n"

	.comm	_RK3066B,4,2                    ## @RK3066B
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PIN_CONFIG_BIAS_DISABLE,4,2    ## @PIN_CONFIG_BIAS_DISABLE
	.comm	_rockchip_pull_list,8,3         ## @rockchip_pull_list
L_.str.1:                               ## @.str.1
	.asciz	"unsupported pull setting %d\n"

	.comm	_RK3188_PULL_BITS_PER_PIN,4,2   ## @RK3188_PULL_BITS_PER_PIN
L_.str.2:                               ## @.str.2
	.asciz	"unsupported pinctrl type\n"

	.no_dead_strip	_rockchip_set_pull
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_set_pull
_rockchip_set_pull:                     ; @rockchip_set_pull
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0, #16]
	ldr	x23, [x22, #8]
	ldr	w0, [x22]
	ldr	w2, [x21, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	mov	x4, x19
	bl	_dev_dbg
	ldr	w8, [x23]
Lloh2:
	adrp	x9, _RK3066B@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RK3066B@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w19, #0
	csneg	w20, wzr, w8, eq
	b	LBB0_15
LBB0_2:
	ldr	x8, [x23, #8]
	add	x2, sp, #24
	add	x3, sp, #20
	add	x4, sp, #16
	mov	x0, x21
	mov	x1, x20
	blr	x8
	ldr	w8, [x23]
	sub	w8, w8, #128
	cmp	w8, #7
	b.hi	LBB0_14
; %bb.3:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #159
	tst	w8, w9
	b.eq	LBB0_11
; %bb.4:
	ldr	x8, [x21]
	add	w9, w20, #7
	cmp	w20, #0
	csel	w9, w9, w20, lt
	asr	w9, w9, #3
	ldrsw	x23, [x8, w9, sxtw #2]
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
Lloh11:
	adrp	x24, _rockchip_pull_list@GOTPAGE
Lloh12:
	ldr	x24, [x24, _rockchip_pull_list@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x0, [x8, x23, lsl #3]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x20, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x0, [x8, x23, lsl #3]
	ldr	w8, [x0, x20, lsl #2]
	cmp	w8, w19
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x20, #1
	bl	_ARRAY_SIZE
	cmp	x20, w0, sxtw
	b.lt	LBB0_6
LBB0_8:
	neg	w20, w21
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.9:
	ldr	w0, [x22]
	str	x19, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_15
LBB0_10:
Lloh15:
	adrp	x8, _RK3188_PULL_BITS_PER_PIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RK3188_PULL_BITS_PER_PIN@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w8, w8
	ldp	w9, w1, [sp, #16]
	add	w10, w9, #16
	lsl	w8, w8, w10
	orr	w2, w8, w8, asr #16
	lsl	w9, w20, w9
	orr	w3, w8, w9
	ldr	x0, [sp, #24]
	bl	_regmap_update_bits
	mov	x20, x0
	b	LBB0_15
LBB0_11:
	ldr	w8, [sp, #16]
	add	w0, w8, #16
	bl	_BIT
	mov	x20, x0
Lloh18:
	adrp	x8, _PIN_CONFIG_BIAS_DISABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PIN_CONFIG_BIAS_DISABLE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_13
; %bb.12:
	ldr	w0, [sp, #16]
	bl	_BIT
	orr	w20, w0, w20
LBB0_13:
	ldr	x0, [sp, #24]
	ldr	w1, [sp, #20]
	mov	x2, x20
	bl	_regmap_write
	mov	x20, x0
	b	LBB0_15
LBB0_14:
	ldr	w0, [x22]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_15:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting pull of GPIO%d-%d to %d\n"

	.comm	_RK3066B,4,2                    ; @RK3066B
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PIN_CONFIG_BIAS_DISABLE,4,2    ; @PIN_CONFIG_BIAS_DISABLE
	.comm	_rockchip_pull_list,8,3         ; @rockchip_pull_list
l_.str.1:                               ; @.str.1
	.asciz	"unsupported pull setting %d\n"

	.comm	_RK3188_PULL_BITS_PER_PIN,4,2   ; @RK3188_PULL_BITS_PER_PIN
l_.str.2:                               ; @.str.2
	.asciz	"unsupported pinctrl type\n"

	.no_dead_strip	_rockchip_set_pull
.subsections_via_symbols
