	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_pinctrl_setup_debounce
_sunxi_pinctrl_setup_debounce:          ## @sunxi_pinctrl_setup_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_of_clk_get_parent_count
	xorl	%r12d, %r12d
	cmpl	$3, %eax
	jne	LBB0_12
## %bb.1:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_of_find_property
	testl	%eax, %eax
	je	LBB0_12
## %bb.2:
	movl	16(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_devm_clk_get
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	jmp	LBB0_4
LBB0_5:
	movl	16(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_devm_clk_get
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.13:
	movq	%r15, %rdi
LBB0_4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_6:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.7:
	xorl	%r15d, %r15d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%r15d
	movq	(%r14), %rax
	xorl	%r12d, %r12d
	cmpl	(%rax), %r15d
	jge	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	leaq	-44(%rbp), %rcx
	callq	_of_property_read_u32_index
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	-44(%rbp), %esi
	testl	%esi, %esi
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_USEC_PER_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DIV_ROUND_CLOSEST
	movq	%rax, %r12
	movq	%rbx, %rdi
	movq	%rax, %rsi
	leaq	-48(%rbp), %rdx
	callq	_sunxi_pinctrl_get_debounce_div
	movl	%eax, %ebx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	leaq	-52(%rbp), %rdx
	callq	_sunxi_pinctrl_get_debounce_div
	movl	-52(%rbp), %ecx
	xorl	%edx, %edx
	cmpl	-48(%rbp), %ecx
	setb	%dl
	cmovbl	%eax, %ebx
	shll	$4, %ebx
	orl	%edx, %ebx
	movq	(%r14), %rdi
	movq	8(%r14), %r12
	movl	%r15d, %esi
	callq	_sunxi_irq_debounce_reg_from_bank
	addq	%rax, %r12
	movl	%ebx, %edi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_writel
	jmp	LBB0_11
LBB0_14:
	movl	%eax, %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"input-debounce"

L_.str.1:                               ## @.str.1
	.asciz	"losc"

L_.str.2:                               ## @.str.2
	.asciz	"hosc"

	.comm	_USEC_PER_SEC,4,2               ## @USEC_PER_SEC
	.no_dead_strip	_sunxi_pinctrl_setup_debounce
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_pinctrl_setup_debounce
_sunxi_pinctrl_setup_debounce:          ; @sunxi_pinctrl_setup_debounce
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_of_clk_get_parent_count
	cmp	w0, #3
	b.ne	LBB0_9
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, #0
	bl	_of_find_property
	cbz	w0, LBB0_10
; %bb.2:
	ldr	w0, [x20, #16]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_devm_clk_get
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	b	LBB0_6
LBB0_4:
	ldr	w0, [x20, #16]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_devm_clk_get
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x22
LBB0_6:
	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
	b	_PTR_ERR
LBB0_7:
	ldr	x8, [x20]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.8:
	mov	w23, #0
Lloh6:
	adrp	x24, l_.str@PAGE
Lloh7:
	add	x24, x24, l_.str@PAGEOFF
Lloh8:
	adrp	x27, _USEC_PER_SEC@GOTPAGE
Lloh9:
	ldr	x27, [x27, _USEC_PER_SEC@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #0
	add	w23, w23, #1
	ldr	x8, [x20]
	ldr	w8, [x8]
	cmp	w23, w8
	b.ge	LBB0_10
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #4
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_of_property_read_u32_index
	cbnz	w0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [sp, #4]
	cbz	w1, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x27]
	bl	_DIV_ROUND_CLOSEST
	mov	x25, x0
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x25
	bl	_sunxi_pinctrl_get_debounce_div
	mov	x26, x0
	add	x2, sp, #12
	mov	x0, x22
	mov	x1, x25
	bl	_sunxi_pinctrl_get_debounce_div
	ldp	w9, w8, [sp, #8]
	cmp	w8, w9
	csel	w8, w0, w26, lo
	cset	w25, lo
	bfi	w25, w8, #4, #28
	ldp	x0, x26, [x20]
	mov	x1, x23
	bl	_sunxi_irq_debounce_reg_from_bank
	add	x1, x0, x26
	mov	x0, x25
	bl	_writel
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"input-debounce"

l_.str.1:                               ; @.str.1
	.asciz	"losc"

l_.str.2:                               ; @.str.2
	.asciz	"hosc"

	.comm	_USEC_PER_SEC,4,2               ; @USEC_PER_SEC
	.no_dead_strip	_sunxi_pinctrl_setup_debounce
.subsections_via_symbols
