	.file	"extr_pinctrl-rockchip.c_rockchip_get_mux.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"pin %d is unrouted\n"
	.text
	.p2align 4
	.type	rockchip_get_mux, @function
rockchip_get_mux:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	esi, 31
	jg	.L18
	test	esi, esi
	lea	eax, 7[rsi]
	mov	rdx, QWORD PTR 8[rdi]
	mov	rcx, QWORD PTR 16[rdi]
	cmovns	eax, esi
	mov	rbp, rdi
	mov	r12d, esi
	sar	eax, 3
	cdqe
	lea	rax, [rdx+rax*8]
	mov	edx, DWORD PTR [rax]
	test	DWORD PTR IOMUX_UNROUTED[rip], edx
	jne	.L20
	test	DWORD PTR IOMUX_GPIO_ONLY[rip], edx
	jne	.L21
	test	DWORD PTR IOMUX_SOURCE_PMU[rip], edx
	mov	r13, QWORD PTR 8[rcx]
	cmove	r13, QWORD PTR [rcx]
	mov	ecx, r12d
	mov	esi, DWORD PTR 4[rax]
	sar	ecx, 31
	shr	ecx, 29
	mov	DWORD PTR 12[rsp], esi
	lea	eax, [r12+rcx]
	and	eax, 7
	sub	eax, ecx
	test	DWORD PTR IOMUX_WIDTH_4BIT[rip], edx
	je	.L7
	cmp	eax, 3
	jle	.L8
	add	esi, 4
	mov	DWORD PTR 12[rsp], esi
.L8:
	mov	edx, r12d
	mov	DWORD PTR 16[rsp], 15
	sar	edx, 31
	shr	edx, 30
	lea	eax, [r12+rdx]
	and	eax, 3
	sub	eax, edx
	sal	eax, 2
	mov	DWORD PTR 20[rsp], eax
.L9:
	mov	ebx, DWORD PTR 0[rbp]
	mov	edi, r12d
	call	BIT@PLT
	test	ebx, eax
	jne	.L22
.L12:
	mov	esi, DWORD PTR 12[rsp]
	lea	rdx, 8[rsp]
	mov	rdi, r13
	call	regmap_read@PLT
	test	eax, eax
	jne	.L1
	mov	ecx, DWORD PTR 20[rsp]
	mov	eax, DWORD PTR 8[rsp]
	shr	eax, cl
	and	eax, DWORD PTR 16[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR 16[rcx]
	mov	edx, esi
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
.L18:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L23
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	eax, DWORD PTR RK_FUNC_GPIO[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	test	DWORD PTR IOMUX_WIDTH_3BIT[rip], edx
	je	.L10
	cmp	eax, 4
	jle	.L11
	add	esi, 4
	mov	DWORD PTR 12[rsp], esi
.L11:
	movsx	rdx, eax
	mov	ecx, eax
	mov	DWORD PTR 16[rsp], 7
	imul	rdx, rdx, 1717986919
	sar	ecx, 31
	sar	rdx, 33
	sub	edx, ecx
	lea	edx, [rdx+rdx*4]
	sub	eax, edx
	lea	eax, [rax+rax*2]
	mov	DWORD PTR 20[rsp], eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	lea	rcx, 20[rsp]
	lea	rdx, 12[rsp]
	mov	esi, r12d
	mov	rdi, rbp
	lea	r8, 16[rsp]
	call	rockchip_get_recalced_mux@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	add	eax, eax
	mov	DWORD PTR 16[rsp], 3
	mov	DWORD PTR 20[rsp], eax
	jmp	.L9
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rockchip_get_mux, .-rockchip_get_mux
	.comm	RK_FUNC_GPIO,4,4
	.comm	IOMUX_WIDTH_4BIT,4,4
	.comm	IOMUX_WIDTH_3BIT,4,4
	.comm	IOMUX_UNROUTED,4,4
	.comm	IOMUX_SOURCE_PMU,4,4
	.comm	IOMUX_GPIO_ONLY,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pinctrl-rockchip.c_rockchip_get_mux.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"pin %d is unrouted\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rockchip_get_mux, %function
rockchip_get_mux:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L25
	sub	sp, sp, #36
	cmp	r1, #31
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bgt	.L18
	cmp	r1, #0
	add	r3, r1, #7
	movge	r3, r1
	mov	r5, r0
	ldr	r2, [r0, #4]
	ldr	r0, .L25+4
	mov	r4, r1
	asr	r1, r3, #3
	ldr	r0, [r0]
	ldr	r1, [r2, r1, lsl #3]
	bic	r3, r3, #7
	tst	r1, r0
	add	r3, r2, r3
	ldr	r0, [r5, #8]
	bne	.L20
	ldr	r2, .L25+8
	ldr	r2, [r2]
	tst	r1, r2
	bne	.L21
	ldr	r2, .L25+12
	ldr	ip, [r0]
	ldr	lr, [r2]
	ldr	r2, .L25+16
	tst	r1, lr
	ldr	r6, [r0, #4]
	moveq	r6, ip
	ldr	ip, [r2]
	rsbs	r2, r4, #0
	ldr	r0, [r3, #4]
	and	r2, r2, #7
	and	r3, r4, #7
	rsbpl	r3, r2, #0
	tst	r1, ip
	str	r0, [sp, #16]
	bne	.L22
	ldr	r2, .L25+20
	ldr	r2, [r2]
	tst	r1, r2
	beq	.L10
	cmp	r3, #4
	addgt	r0, r0, #4
	strgt	r0, [sp, #16]
	mov	r0, #7
	ldr	r1, .L25+24
	asr	r2, r3, #31
	smull	ip, r1, r3, r1
	rsb	r2, r2, r1, asr #1
	add	r2, r2, r2, lsl #2
	sub	r3, r3, r2
	add	r3, r3, r3, lsl #1
	str	r3, [sp, #24]
	str	r0, [sp, #20]
.L9:
	mov	r0, r4
	ldr	r7, [r5]
	bl	BIT
	tst	r7, r0
	bne	.L23
.L12:
	add	r2, sp, #12
	mov	r0, r6
	ldr	r1, [sp, #16]
	bl	regmap_read
	cmp	r0, #0
	ldreq	r2, [sp, #12]
	ldreq	r3, [sp, #24]
	ldreq	r0, [sp, #20]
	andeq	r0, r0, r2, lsr r3
	b	.L1
.L20:
	mov	r2, r4
	ldr	r0, [r0, #8]
	ldr	r1, .L25+28
	bl	dev_err
.L18:
	ldr	r3, .L25+32
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L21:
	ldr	r3, .L25+36
	ldr	r0, [r3]
	b	.L1
.L22:
	mov	r1, #15
	cmp	r3, #3
	addgt	r0, r0, #4
	strgt	r0, [sp, #16]
	rsbs	r2, r4, #0
	and	r2, r2, #3
	and	r3, r4, #3
	rsbpl	r3, r2, #0
	lsl	r3, r3, #2
	str	r3, [sp, #24]
	str	r1, [sp, #20]
	b	.L9
.L23:
	add	r3, sp, #20
	str	r3, [sp]
	mov	r1, r4
	mov	r0, r5
	add	r3, sp, #24
	add	r2, sp, #16
	bl	rockchip_get_recalced_mux
	b	.L12
.L10:
	mov	r2, #3
	lsl	r3, r3, #1
	str	r3, [sp, #24]
	str	r2, [sp, #20]
	b	.L9
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	.LC1
	.word	IOMUX_UNROUTED
	.word	IOMUX_GPIO_ONLY
	.word	IOMUX_SOURCE_PMU
	.word	IOMUX_WIDTH_4BIT
	.word	IOMUX_WIDTH_3BIT
	.word	1717986919
	.word	.LC0
	.word	EINVAL
	.word	RK_FUNC_GPIO
	.size	rockchip_get_mux, .-rockchip_get_mux
	.comm	RK_FUNC_GPIO,4,4
	.comm	IOMUX_WIDTH_4BIT,4,4
	.comm	IOMUX_WIDTH_3BIT,4,4
	.comm	IOMUX_UNROUTED,4,4
	.comm	IOMUX_SOURCE_PMU,4,4
	.comm	IOMUX_GPIO_ONLY,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
