	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_kbc_config_pins
_tegra_kbc_config_pins:                 ## @tegra_kbc_config_pins
	.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
	movq	_KBC_MAX_GPIO@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.1:
	movq	%rdi, %r12
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rax,%rsi,8), %eax
	addl	%eax, %eax
	incl	%eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%r12d, %r15d
	orl	%eax, %r15d
	movq	%rsi, %r14
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, %r12
	addl	(%rdx), %ebx
	movl	%ebx, %esi
	callq	_writel
	addl	(%r12), %r13d
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_writel
	incq	%r14
	movq	_KBC_MAX_GPIO@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	addl	$4, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addl	$5, %ecx
	cmpq	%rax, %r14
	movq	%r14, %rsi
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movl	$2863311531, %eax               ## imm = 0xAAAAAAAB
	imulq	%rax, %rbx
	shrq	$34, %rbx
	movl	%ebx, %eax
	shll	$5, %eax
	movq	%r12, %r15
	movl	%ebx, %r14d
	subl	%eax, %r14d
	addl	%ebx, %r14d
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	addl	%ecx, %r14d
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	andl	$28, %edx
	movl	$31, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	$15, %r12d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ecx
	shll	%cl, %r12d
	shll	$2, %ebx
	movq	_KBC_ROW_CFG0_0@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movl	%esi, %r13d
	shrl	%r13d
	andl	$1073741820, %r13d              ## imm = 0x3FFFFFFC
	movq	_KBC_COL_CFG0_0@GOTPCREL(%rip), %rax
	addl	(%rax), %r13d
	movl	(%r15), %edi
	addl	%ebx, %edi
	callq	_readl
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	(%r15), %edi
	addl	%r13d, %edi
	callq	_readl
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	notl	%edi
	andl	-48(%rbp), %edi                 ## 4-byte Folded Reload
	notl	%r12d
	andl	%eax, %r12d
	movq	%r15, %rdx
	movq	8(%r15), %rax
	movl	(%rax,%rsi,8), %ecx
	cmpl	$130, %ecx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$128, %ecx
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rax,%rsi,8), %eax
	addl	%eax, %eax
	incl	%eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	orl	%eax, %edi
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rsi, %r14
	movl	%r12d, %r15d
	jmp	LBB0_7
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KBC_MAX_GPIO,4,2               ## @KBC_MAX_GPIO
	.comm	_KBC_ROW_CFG0_0,4,2             ## @KBC_ROW_CFG0_0
	.comm	_KBC_COL_CFG0_0,4,2             ## @KBC_COL_CFG0_0
	.no_dead_strip	_tegra_kbc_config_pins
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_kbc_config_pins
_tegra_kbc_config_pins:                 ; @tegra_kbc_config_pins
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _KBC_MAX_GPIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KBC_MAX_GPIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x22, #0
	mov	w23, #0
	mov	x24, #0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, x22
	ldr	w8, [x8, #4]
	mov	w9, #1
	bfi	w9, w8, #1, #31
	lsl	w8, w9, w21
	orr	w20, w8, w20
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	add	w1, w8, w27
	bl	_writel
	ldr	w8, [x19]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	add	w1, w8, w9
	mov	x0, x20
	bl	_writel
	add	x24, x24, #1
Lloh3:
	adrp	x8, _KBC_MAX_GPIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KBC_MAX_GPIO@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	add	w23, w23, #4
	add	x22, x22, #8
	cmp	x24, x8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w8, #43691
	movk	w8, #43690, lsl #16
	umull	x8, w24, w8
	lsr	x8, x8, #34
	mov	w9, #6
	msub	w9, w8, w9, w24
	add	w10, w9, w9, lsl #2
	and	w21, w23, #0x1c
	mov	w9, #31
	str	w10, [sp, #8]                   ; 4-byte Folded Spill
	lsl	w25, w9, w10
	mov	w9, #15
	lsl	w26, w9, w21
Lloh6:
	adrp	x9, _KBC_ROW_CFG0_0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _KBC_ROW_CFG0_0@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w27, w9, w8, lsl #2
	ubfx	x8, x24, #1, #31
	and	w8, w8, #0x3ffffffc
Lloh9:
	adrp	x9, _KBC_COL_CFG0_0@GOTPAGE
Lloh10:
	ldr	x9, [x9, _KBC_COL_CFG0_0@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	add	w28, w9, w8
	ldr	w8, [x19]
	add	w0, w8, w27
	bl	_readl
	mov	x20, x0
	ldr	w8, [x19]
	str	w28, [sp, #12]                  ; 4-byte Folded Spill
	add	w0, w8, w28
	bl	_readl
	mov	x8, x0
	bic	w0, w20, w25
	bic	w20, w8, w26
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x22]
	cmp	w9, #130
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w9, #128
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, x22
	ldr	w8, [x8, #4]
	mov	w9, #1
	bfi	w9, w8, #1, #31
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	lsl	w8, w9, w8
	orr	w0, w8, w0
	b	LBB0_3
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_KBC_MAX_GPIO,4,2               ; @KBC_MAX_GPIO
	.comm	_KBC_ROW_CFG0_0,4,2             ; @KBC_ROW_CFG0_0
	.comm	_KBC_COL_CFG0_0,4,2             ; @KBC_COL_CFG0_0
	.no_dead_strip	_tegra_kbc_config_pins
.subsections_via_symbols
