	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_gpio_set_debounce
_tegra_gpio_set_debounce:               ## @tegra_gpio_set_debounce
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r13d
	callq	_gpiochip_get_data
	movq	%rax, %rbx
	movq	(%rax), %r14
	movl	%r13d, %edi
	callq	_GPIO_BANK
	movq	%rax, %r15
	movl	%r12d, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_UP
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %edi
	movl	$255, %esi
	callq	_min
	movl	%eax, %ebx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %edi
	callq	_GPIO_PORT
	shlq	$4, %r15
	leaq	(%r14,%r15), %rcx
	addq	$8, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, %r12d
	leaq	(,%r12,4), %r13
	movq	8(%r14,%r15), %rdi
	addq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	(%r14,%r15), %rax
	cmpl	%ebx, (%rax,%r12,4)
	jae	LBB0_4
## %bb.3:
	addq	%r15, %r14
	movl	%ebx, %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_GPIO_DBC_CNT
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_tegra_gpio_writel
	movq	(%r14), %rax
	movl	%r15d, (%rax,%r12,4)
LBB0_4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %r13
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movl	$1, %r14d
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_1:
	xorl	%r14d, %r14d
LBB0_5:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_GPIO_MSK_DBC_EN
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	%r13d, %edx
	movl	%r14d, %ecx
	callq	_tegra_gpio_mask_write
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_tegra_gpio_set_debounce
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_gpio_set_debounce
_tegra_gpio_set_debounce:               ; @tegra_gpio_set_debounce
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	bl	_gpiochip_get_data
	mov	x20, x0
	ldr	x23, [x0]
	mov	x0, x19
	bl	_GPIO_BANK
	mov	x22, x0
	mov	x0, x21
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	cbz	w0, LBB0_4
; %bb.1:
	mov	w1, #255
	bl	_min
	mov	x21, x0
	mov	x0, x19
	bl	_GPIO_PORT
	add	x24, x23, x22, lsl #4
	mov	x22, x24
	ldr	x8, [x22, #8]!
	mov	w23, w0
	lsl	x25, x23, #2
	add	x0, x8, x25
	bl	_spin_lock_irqsave
	ldr	x8, [x24]
	ldr	w8, [x8, x25]
	cmp	w8, w21
	b.hs	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_GPIO_DBC_CNT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_tegra_gpio_writel
	ldr	x8, [x24]
	str	w21, [x8, x23, lsl #2]
LBB0_3:
	ldr	x8, [x22]
	add	x0, x8, x23, lsl #2
	bl	_spin_unlock_irqrestore
	mov	w21, #1
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	bl	_GPIO_MSK_DBC_EN
	mov	x1, x0
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	_tegra_gpio_mask_write
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_tegra_gpio_set_debounce
.subsections_via_symbols
