	.file	"extr_tegra-kbc.c_tegra_kbc_config_pins.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tegra_kbc_config_pins, @function
tegra_kbc_config_pins:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR KBC_MAX_GPIO[rip]
	test	eax, eax
	jle	.L9
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	cmp	eax, 130
	jne	.L5
	mov	eax, DWORD PTR 4[rcx]
	movzx	ecx, BYTE PTR 12[rsp]
	lea	eax, 1[rax+rax]
	sal	eax, cl
	or	ebp, eax
.L5:
	mov	esi, DWORD PTR [rbx]
	add	r15, 1
	add	esi, r13d
	call	writel@PLT
	mov	esi, DWORD PTR [rbx]
	mov	edi, ebp
	add	esi, r12d
	call	writel@PLT
	cmp	DWORD PTR KBC_MAX_GPIO[rip], r15d
	jle	.L13
.L6:
	mov	edx, 2863311531
	mov	eax, r15d
	mov	r13d, r15d
	mov	edi, DWORD PTR [rbx]
	imul	rax, rdx
	mov	edx, r15d
	and	r13d, 7
	shr	rax, 34
	lea	ecx, [rax+rax*2]
	add	ecx, ecx
	sub	edx, ecx
	mov	ecx, DWORD PTR KBC_ROW_CFG0_0[rip]
	lea	r14d, [rdx+rdx*4]
	lea	edx, 0[0+r13*4]
	lea	r13d, [rcx+rax*4]
	mov	eax, DWORD PTR KBC_COL_CFG0_0[rip]
	mov	ecx, r15d
	mov	DWORD PTR 12[rsp], edx
	sar	ecx, 3
	add	edi, r13d
	lea	r12d, [rax+rcx*4]
	call	readl@PLT
	mov	edi, DWORD PTR [rbx]
	mov	ebp, eax
	add	edi, r12d
	call	readl@PLT
	mov	ecx, r14d
	mov	edi, 31
	mov	r8d, 15
	sal	edi, cl
	movzx	ecx, BYTE PTR 12[rsp]
	not	edi
	sal	r8d, cl
	and	edi, ebp
	mov	ebp, r8d
	not	ebp
	and	ebp, eax
	mov	rax, QWORD PTR 8[rbx]
	lea	rcx, [rax+r15*8]
	mov	eax, DWORD PTR [rcx]
	cmp	eax, 128
	jne	.L14
	mov	eax, DWORD PTR 4[rcx]
	mov	ecx, r14d
	lea	eax, 1[rax+rax]
	sal	eax, cl
	or	edi, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	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
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE0:
	.size	tegra_kbc_config_pins, .-tegra_kbc_config_pins
	.comm	KBC_ROW_CFG0_0,4,4
	.comm	KBC_MAX_GPIO,4,4
	.comm	KBC_COL_CFG0_0,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_tegra-kbc.c_tegra_kbc_config_pins.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tegra_kbc_config_pins, %function
tegra_kbc_config_pins:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, .L11
	sub	sp, sp, #12
	ldr	r3, [r9]
	cmp	r3, #0
	ble	.L1
	mov	r7, r0
	mov	r4, #0
	ldr	fp, .L11+4
	ldr	r10, .L11+8
	b	.L6
.L10:
	cmp	ip, #130
	ldreq	r2, [r2, #4]
	lsleq	r2, r2, #1
	orreq	r2, r2, #1
	orreq	r3, r3, r2, lsl r5
.L5:
	ldr	r2, [r7]
	str	r3, [sp]
	add	r1, r1, r2
	bl	writel
	ldr	r3, [sp]
	ldr	r1, [r7]
	mov	r0, r3
	add	r1, r8, r1
	bl	writel
	ldr	r3, [r9]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L1
.L6:
	ldr	r1, .L11+12
	ldr	r2, [fp]
	umull	r3, r1, r4, r1
	ldr	r0, [r7]
	lsr	r1, r1, #2
	add	r3, r1, r1, lsl #1
	add	r1, r2, r1, lsl #2
	ldr	r2, [r10]
	sub	r3, r4, r3, lsl #1
	add	r0, r1, r0
	asr	r8, r4, #3
	add	r8, r2, r8, lsl #2
	str	r1, [sp, #4]
	add	r6, r3, r3, lsl #2
	bl	readl
	ldr	r3, [r7]
	str	r0, [sp]
	add	r0, r8, r3
	bl	readl
	mov	r3, r0
	mov	r0, #31
	ldr	r1, [sp]
	ldr	r2, [r7, #4]
	bic	r0, r1, r0, lsl r6
	mov	r1, #15
	ldr	ip, [r2, r4, lsl #3]
	and	r5, r4, #7
	lsl	r5, r5, #2
	cmp	ip, #128
	bic	r3, r3, r1, lsl r5
	add	r2, r2, r4, lsl #3
	ldr	r1, [sp, #4]
	bne	.L10
	ldr	r2, [r2, #4]
	lsl	r2, r2, #1
	orr	r2, r2, #1
	orr	r0, r0, r2, lsl r6
	b	.L5
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	.align	2
.L11:
	.word	KBC_MAX_GPIO
	.word	KBC_ROW_CFG0_0
	.word	KBC_COL_CFG0_0
	.word	-1431655765
	.size	tegra_kbc_config_pins, .-tegra_kbc_config_pins
	.comm	KBC_ROW_CFG0_0,4,4
	.comm	KBC_MAX_GPIO,4,4
	.comm	KBC_COL_CFG0_0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
