	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_pinctrl_gpio_to_irq
_sunxi_pinctrl_gpio_to_irq:             ## @sunxi_pinctrl_gpio_to_irq
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_gpiochip_get_data
	cmpl	%r15d, (%rbx)
	jbe	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	8(%rax), %rax
	movl	(%rax), %esi
	addl	%r15d, %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_sunxi_pinctrl_desc_find_function_by_pin
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_IRQ_PER_BANK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	imull	(%rax), %r12d
	addl	4(%rax), %r12d
	movl	16(%rbx), %edx
	movl	20(%rbx), %edi
	movl	%r15d, %ecx
	addq	8(%rbx), %rcx
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %r8d
	callq	_dev_dbg
	movl	(%r14), %edi
	movl	%r12d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_irq_find_mapping               ## TAILCALL
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"irq"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IRQ_PER_BANK,4,2               ## @IRQ_PER_BANK
L_.str.1:                               ## @.str.1
	.asciz	"%s: request IRQ for GPIO %d, return %d\n"

	.no_dead_strip	_sunxi_pinctrl_gpio_to_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_pinctrl_gpio_to_irq
_sunxi_pinctrl_gpio_to_irq:             ; @sunxi_pinctrl_gpio_to_irq
	.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	x20, x1
	mov	x21, x0
	bl	_gpiochip_get_data
	ldr	w8, [x21]
	cmp	w8, w20
	b.ls	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	add	w1, w8, w20
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	bl	_sunxi_pinctrl_desc_find_function_by_pin
	cbz	x0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _IRQ_PER_BANK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IRQ_PER_BANK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldp	w9, w10, [x0]
	madd	w22, w8, w9, w10
	ldp	w2, w0, [x21, #16]
	ldr	x8, [x21, #8]
	add	x3, x8, w20, uxtw
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, x22
	bl	_dev_dbg
	ldr	w0, [x19]
	mov	x1, x22
	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
	b	_irq_find_mapping
LBB0_3:
Lloh7:
	adrp	x8, _ENXIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"irq"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IRQ_PER_BANK,4,2               ; @IRQ_PER_BANK
l_.str.1:                               ; @.str.1
	.asciz	"%s: request IRQ for GPIO %d, return %d\n"

	.no_dead_strip	_sunxi_pinctrl_gpio_to_irq
.subsections_via_symbols
