	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_pinctrl_irq_request_resources
_sunxi_pinctrl_irq_request_resources:   ## @sunxi_pinctrl_irq_request_resources
	.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
	movq	%rdi, %r14
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rsi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_sunxi_pinctrl_desc_find_function_by_pin
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	24(%rbx), %edi
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movq	16(%rbx), %rdx
	movq	(%rcx,%rax,8), %rsi
	subq	(%rdx), %rsi
	callq	_gpiochip_lock_as_irq
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movl	12(%rbx), %ebx
	movq	%r14, %rdi
	callq	_irqd_to_hwirq
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_5
LBB0_4:
	movl	8(%rbx), %edi
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rsi
	movl	(%r12), %edx
	callq	_sunxi_pmx_set
	xorl	%r15d, %r15d
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"irq"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"unable to lock HW IRQ %lu for IRQ\n"

	.no_dead_strip	_sunxi_pinctrl_irq_request_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_pinctrl_irq_request_resources
_sunxi_pinctrl_irq_request_resources:   ; @sunxi_pinctrl_irq_request_resources
	.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
	bl	_irq_data_get_irq_chip_data
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x9, [x19]
	ldr	x1, [x8, x9, lsl #3]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	bl	_sunxi_pinctrl_desc_find_function_by_pin
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	ldr	w0, [x20, #24]
	ldr	x8, [x20]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x20, #16]
	ldr	x9, [x9]
	sub	x1, x8, x9
	bl	_gpiochip_lock_as_irq
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w20, [x20, #12]
	mov	x0, x19
	bl	_irqd_to_hwirq
	mov	x2, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_5
LBB0_3:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20, #8]
	ldr	x8, [x20]
	ldr	x9, [x19]
	ldr	x1, [x8, x9, lsl #3]
	ldr	w2, [x22]
	bl	_sunxi_pmx_set
LBB0_5:
	mov	x0, x21
	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	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"irq"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"unable to lock HW IRQ %lu for IRQ\n"

	.no_dead_strip	_sunxi_pinctrl_irq_request_resources
.subsections_via_symbols
