	.file	"extr_pinctrl-stm32.c_stm32_pmx_get_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	stm32_pmx_get_mode
	.type	stm32_pmx_get_mode, @function
stm32_pmx_get_mode:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, esi
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	sar	eax, 31
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	shr	eax, 29
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	lea	r12d, [rsi+rax]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	and	r12d, 7
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	r12d, eax
	lea	eax, 7[rsi]
	mov	ebx, esi
	sal	r12d, 2
	lea	r15, 4[rbp]
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	test	esi, esi
	mov	edi, DWORD PTR [rdi]
	cmovns	eax, esi
	mov	QWORD PTR 8[rsp], rcx
	mov	ecx, DWORD PTR STM32_GPIO_AFRL[rip]
	sar	eax, 3
	lea	r13d, [rcx+rax*4]
	call	clk_enable@PLT
	xor	r8d, r8d
	mov	rdi, r15
	mov	rsi, r8
	call	spin_lock_irqsave@PLT
	movsx	rdi, r13d
	add	rdi, QWORD PTR 8[rbp]
	call	readl_relaxed@PLT
	mov	esi, r12d
	lea	edi, 3[r12]
	mov	r13d, eax
	call	GENMASK@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	ecx, r12d
	mov	rdi, QWORD PTR STM32_GPIO_MODER[rip]
	and	r13d, eax
	lea	r12d, [rbx+rbx]
	add	rdi, QWORD PTR 8[rbp]
	sar	r13d, cl
	mov	DWORD PTR [rdx], r13d
	call	readl_relaxed@PLT
	lea	edi, 1[r12]
	mov	esi, r12d
	mov	r13d, eax
	call	GENMASK@PLT
	mov	ecx, r12d
	xor	r8d, r8d
	mov	rdi, r15
	and	r13d, eax
	mov	rsi, r8
	sar	r13d, cl
	mov	DWORD PTR [r14], r13d
	call	spin_unlock_irqrestore@PLT
	mov	edi, DWORD PTR 0[rbp]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	clk_disable@PLT
	.cfi_endproc
.LFE0:
	.size	stm32_pmx_get_mode, .-stm32_pmx_get_mode
	.comm	STM32_GPIO_MODER,8,8
	.comm	STM32_GPIO_AFRL,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-stm32.c_stm32_pmx_get_mode.c"
	.text
	.align	2
	.global	stm32_pmx_get_mode
	.syntax unified
	.arm
	.fpu softvfp
	.type	stm32_pmx_get_mode, %function
stm32_pmx_get_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	mov	r4, r1
	rsbs	r0, r1, #0
	and	r0, r0, #7
	mov	r7, r6
	and	r5, r1, #7
	rsbpl	r5, r0, #0
	cmp	r4, #0
	add	r1, r1, #7
	movge	r1, r4
	mov	r9, #0
	ldr	ip, .L4
	ldr	r0, [r7], #4
	ldr	ip, [ip]
	asr	r1, r1, #3
	mov	r8, r2
	mov	r10, r3
	lsl	fp, r5, #2
	add	r5, ip, r1, lsl #2
	bl	clk_enable
	mov	r1, r9
	mov	r0, r7
	bl	spin_lock_irqsave
	ldr	r0, [r6, #8]
	lsl	r4, r4, #1
	add	r0, r5, r0
	bl	readl_relaxed
	mov	r1, fp
	mov	r5, r0
	add	r0, fp, #3
	bl	GENMASK
	ldr	r3, .L4+4
	and	r5, r5, r0
	ldr	r3, [r3]
	ldr	r0, [r6, #8]
	asr	r5, r5, fp
	add	r0, r0, r3
	str	r5, [r10]
	bl	readl_relaxed
	mov	r1, r4
	mov	r5, r0
	add	r0, r4, #1
	bl	GENMASK
	and	r5, r5, r0
	asr	r4, r5, r4
	mov	r0, r7
	mov	r1, r9
	str	r4, [r8]
	bl	spin_unlock_irqrestore
	ldr	r0, [r6]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	clk_disable
.L5:
	.align	2
.L4:
	.word	STM32_GPIO_AFRL
	.word	STM32_GPIO_MODER
	.size	stm32_pmx_get_mode, .-stm32_pmx_get_mode
	.comm	STM32_GPIO_MODER,4,4
	.comm	STM32_GPIO_AFRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
