	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap2_set_gpio_debounce
_omap2_set_gpio_debounce:               ## @omap2_set_gpio_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r12d, %r12d
	testl	%edx, %edx
	setne	%r13b
	cmpl	$0, 48(%rdi)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	movl	$0, %r15d
	testl	%edx, %edx
	je	LBB0_6
## %bb.4:
	movl	%edx, %edi
	movl	%esi, %r15d
	movl	$31, %esi
	callq	_DIV_ROUND_UP
	movl	%r15d, %esi
	movl	%eax, %r15d
	decl	%r15d
	movq	_OMAP4_GPIO_DEBOUNCINGTIME_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %r15d
	jne	LBB0_5
LBB0_6:
	movb	%r13b, %r12b
	movl	%esi, %edi
	callq	_BIT
	movq	%rax, %r13
	movl	24(%rbx), %edi
	callq	_clk_enable
	movq	32(%rbx), %rax
	movq	8(%rax), %rsi
	addq	40(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writel_relaxed
	movq	32(%rbx), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_omap_gpio_rmw
	movq	%rax, %r12
	movq	%rax, 16(%rbx)
	movl	24(%rbx), %edi
	callq	_clk_disable
	movq	%rbx, %rdi
	callq	_omap_gpio_dbck_enable
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.7:
	movl	%r15d, (%rbx)
	movq	%r12, 8(%rbx)
	jmp	LBB0_8
LBB0_1:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_OMAP4_GPIO_DEBOUNCINGTIME_MASK,4,2 ## @OMAP4_GPIO_DEBOUNCINGTIME_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_omap2_set_gpio_debounce
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap2_set_gpio_debounce
_omap2_set_gpio_debounce:               ; @omap2_set_gpio_debounce
	.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
	cmp	w2, #0
	cset	w21, ne
	ldr	w8, [x0, #48]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x22, x1
	mov	x19, x0
	cbz	w2, LBB0_6
; %bb.2:
	mov	x0, x2
	mov	w1, #31
	bl	_DIV_ROUND_UP
	sub	w20, w0, #1
Lloh0:
	adrp	x8, _OMAP4_GPIO_DEBOUNCINGTIME_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OMAP4_GPIO_DEBOUNCINGTIME_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bics	wzr, w20, w8
	b.eq	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	mov	w20, #0
LBB0_7:
	mov	x0, x22
	bl	_BIT
	mov	x22, x0
	ldr	w0, [x19, #24]
	bl	_clk_enable
	ldp	x9, x8, [x19, #32]
	ldr	x9, [x9, #8]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel_relaxed
	ldp	x9, x8, [x19, #32]
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	x1, x22
	mov	x2, x21
	bl	_omap_gpio_rmw
	mov	x21, x0
	str	x0, [x19, #16]
	ldr	w0, [x19, #24]
	bl	_clk_disable
	mov	x0, x19
	bl	_omap_gpio_dbck_enable
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.8:
	mov	w0, #0
	str	w20, [x19]
	str	x21, [x19, #8]
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_OMAP4_GPIO_DEBOUNCINGTIME_MASK,4,2 ; @OMAP4_GPIO_DEBOUNCINGTIME_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_omap2_set_gpio_debounce
.subsections_via_symbols
