	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_kbc_start
_tegra_kbc_start:                       ## @tegra_kbc_start
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	36(%rdi), %edi
	callq	_clk_prepare_enable
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	32(%rbx), %edi
	callq	_reset_control_assert
	movl	$100, %edi
	callq	_udelay
	movl	32(%rbx), %edi
	callq	_reset_control_deassert
	movl	$100, %edi
	callq	_udelay
	movq	%rbx, %rdi
	callq	_tegra_kbc_config_pins
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_tegra_kbc_setup_wakekeys
	movl	(%rbx), %edi
	movq	_KBC_RPT_DLY_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movl	28(%rbx), %edi
	movq	_KBC_MAX_DEBOUNCE_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, %edi
	callq	_KBC_DEBOUNCE_CNT_SHIFT
	movl	%eax, %r15d
	movl	$1, %edi
	callq	_KBC_FIFO_TH_CNT_SHIFT
	orl	%eax, %r15d
	movq	_KBC_CONTROL_FIFO_CNT_INT_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_KBC_CONTROL_KBC_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_KBC_CONTROL_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writel
	movq	_KBC_INIT_DLY_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	shll	$5, %eax
	andl	$33554400, %eax                 ## imm = 0x1FFFFE0
	movl	%eax, %edi
	callq	_usecs_to_jiffies
	movl	%eax, 24(%rbx)
	movq	$0, 16(%rbx)
	movq	_KBC_INT_0@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	cmpl	$16, %eax
	jb	LBB0_4
## %bb.2:
	movq	_KBC_KP_ENT0_0@GOTPCREL(%rip), %r12
	movq	_KBC_KP_ENT1_0@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	(%r13), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	cmpl	$15, %eax
	ja	LBB0_3
LBB0_4:
	movq	(%r15), %rsi
	addq	8(%rbx), %rsi
	movl	$7, %edi
	callq	_writel
	movl	4(%rbx), %edi
	callq	_enable_irq
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KBC_RPT_DLY_0,8,3              ## @KBC_RPT_DLY_0
	.comm	_KBC_MAX_DEBOUNCE_CNT,4,2       ## @KBC_MAX_DEBOUNCE_CNT
	.comm	_KBC_CONTROL_FIFO_CNT_INT_EN,4,2 ## @KBC_CONTROL_FIFO_CNT_INT_EN
	.comm	_KBC_CONTROL_KBC_EN,4,2         ## @KBC_CONTROL_KBC_EN
	.comm	_KBC_CONTROL_0,8,3              ## @KBC_CONTROL_0
	.comm	_KBC_INIT_DLY_0,8,3             ## @KBC_INIT_DLY_0
	.comm	_KBC_INT_0,8,3                  ## @KBC_INT_0
	.comm	_KBC_KP_ENT0_0,8,3              ## @KBC_KP_ENT0_0
	.comm	_KBC_KP_ENT1_0,8,3              ## @KBC_KP_ENT1_0
	.no_dead_strip	_tegra_kbc_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_kbc_start
_tegra_kbc_start:                       ; @tegra_kbc_start
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0, #36]
	bl	_clk_prepare_enable
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x19, #32]
	bl	_reset_control_assert
	mov	w0, #100
	bl	_udelay
	ldr	w0, [x19, #32]
	bl	_reset_control_deassert
	mov	w0, #100
	bl	_udelay
	mov	x0, x19
	bl	_tegra_kbc_config_pins
	mov	x0, x19
	mov	w1, #0
	bl	_tegra_kbc_setup_wakekeys
	ldr	w0, [x19]
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _KBC_RPT_DLY_0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KBC_RPT_DLY_0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x19, #28]
Lloh3:
	adrp	x8, _KBC_MAX_DEBOUNCE_CNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KBC_MAX_DEBOUNCE_CNT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_min
	bl	_KBC_DEBOUNCE_CNT_SHIFT
	mov	x20, x0
	mov	w0, #1
	bl	_KBC_FIFO_TH_CNT_SHIFT
Lloh6:
	adrp	x8, _KBC_CONTROL_FIFO_CNT_INT_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KBC_CONTROL_FIFO_CNT_INT_EN@GOTPAGEOFF]
	orr	w9, w0, w20
Lloh8:
	ldr	w8, [x8]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _KBC_CONTROL_KBC_EN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _KBC_CONTROL_KBC_EN@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _KBC_CONTROL_0@GOTPAGE
Lloh13:
	ldr	x9, [x9, _KBC_CONTROL_0@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x9, _KBC_INIT_DLY_0@GOTPAGE
Lloh16:
	ldr	x9, [x9, _KBC_INIT_DLY_0@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ubfiz	w0, w0, #5, #20
	bl	_usecs_to_jiffies
	str	w0, [x19, #24]
	str	xzr, [x19, #16]
	ldr	x8, [x19, #8]
Lloh18:
	adrp	x20, _KBC_INT_0@GOTPAGE
Lloh19:
	ldr	x20, [x20, _KBC_INT_0@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
	cmp	w0, #16
	b.lo	LBB0_4
; %bb.2:
Lloh20:
	adrp	x21, _KBC_KP_ENT0_0@GOTPAGE
Lloh21:
	ldr	x21, [x21, _KBC_KP_ENT0_0@GOTPAGEOFF]
Lloh22:
	adrp	x22, _KBC_KP_ENT1_0@GOTPAGE
Lloh23:
	ldr	x22, [x22, _KBC_KP_ENT1_0@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
	cmp	w0, #15
	b.hi	LBB0_3
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #7
	bl	_writel
	ldr	w0, [x19, #4]
	bl	_enable_irq
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_KBC_RPT_DLY_0,8,3              ; @KBC_RPT_DLY_0
	.comm	_KBC_MAX_DEBOUNCE_CNT,4,2       ; @KBC_MAX_DEBOUNCE_CNT
	.comm	_KBC_CONTROL_FIFO_CNT_INT_EN,4,2 ; @KBC_CONTROL_FIFO_CNT_INT_EN
	.comm	_KBC_CONTROL_KBC_EN,4,2         ; @KBC_CONTROL_KBC_EN
	.comm	_KBC_CONTROL_0,8,3              ; @KBC_CONTROL_0
	.comm	_KBC_INIT_DLY_0,8,3             ; @KBC_INIT_DLY_0
	.comm	_KBC_INT_0,8,3                  ; @KBC_INT_0
	.comm	_KBC_KP_ENT0_0,8,3              ; @KBC_KP_ENT0_0
	.comm	_KBC_KP_ENT1_0,8,3              ; @KBC_KP_ENT1_0
	.no_dead_strip	_tegra_kbc_start
.subsections_via_symbols
