	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adnp_irq_setup
_adnp_irq_setup:                        ## @adnp_irq_setup
	.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
	movq	%rdi, %r12
	movl	(%rdi), %ebx
	movl	$1, %r15d
	movl	%ebx, %ecx
	shlq	%cl, %r15
	addq	$64, %rdi
	callq	_mutex_init
	movl	68(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %esi
	movl	$6, %edx
	callq	_devm_kcalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	leaq	68(%r12), %r13
	leaq	(%rax,%r15,4), %rcx
	movq	%rcx, 16(%r12)
	leal	(%r15,%r15), %ecx
	leaq	(%rax,%rcx,4), %rcx
	movq	%rcx, 24(%r12)
	movl	$3, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	leaq	(%rax,%rdx,4), %rcx
	movq	%rcx, 32(%r12)
	leal	(,%r15,4), %ecx
	leaq	(%rax,%rcx,4), %rdx
	movl	$5, %esi
	movl	%ebx, %ecx
	shll	%cl, %esi
	movq	%rdx, 40(%r12)
	leaq	(%rax,%rsi,4), %rax
	movq	%rax, 48(%r12)
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_GPIO_PLR
	leaq	(%rax,%rbx), %rsi
	leaq	(,%rbx,4), %rdx
	addq	16(%r12), %rdx
	movq	%r12, %rdi
	callq	_adnp_read
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_GPIO_IER
	leaq	(%rax,%rbx), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_adnp_write
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rax
	movl	$0, (%rax,%rbx,4)
	incq	%rbx
	cmpq	%r15, %rbx
	jne	LBB0_2
## %bb.5:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	68(%r12), %ebx
	movq	56(%r12), %rax
	movl	(%rax), %r15d
	movq	_adnp_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rax
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_dev_name
	movq	%r12, (%rsp)
	movl	%ebx, %edi
	movl	%r15d, %esi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	movl	%eax, %r9d
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_11
## %bb.6:
	movl	%eax, %r14d
	movl	68(%r12), %edi
	movq	56(%r12), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %r14d
	jmp	LBB0_10
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_handle_simple_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQ_TYPE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_adnp_irq_chip@GOTPCREL(%rip), %rsi
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gpiochip_irqchip_add_nested
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r15d, %r14d
	jmp	LBB0_10
LBB0_13:
	movq	56(%r12), %rax
	movl	(%rax), %edx
	movq	_adnp_irq_chip@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_gpiochip_set_nested_irqchip
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_adnp_irq,4,2                   ## @adnp_irq
	.comm	_IRQF_TRIGGER_RISING,4,2        ## @IRQF_TRIGGER_RISING
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't request IRQ#%d: %d\n"

	.comm	_adnp_irq_chip,4,2              ## @adnp_irq_chip
	.comm	_handle_simple_irq,4,2          ## @handle_simple_irq
	.comm	_IRQ_TYPE_NONE,4,2              ## @IRQ_TYPE_NONE
L_.str.1:                               ## @.str.1
	.asciz	"could not connect irqchip to gpiochip\n"

	.no_dead_strip	_adnp_irq_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adnp_irq_setup
_adnp_irq_setup:                        ; @adnp_irq_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	w22, [x0], #64
	mov	w8, #1
	lsl	x21, x8, x22
	bl	_mutex_init
	mov	x20, x19
	ldr	w0, [x20, #68]!
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x1, x21
	mov	w2, #6
	bl	_devm_kcalloc
	stur	x0, [x20, #-60]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x23, #0
	add	x8, x0, x21, lsl #2
	lsl	w9, w21, #1
	add	x9, x0, w9, uxtw #2
	stp	x8, x9, [x19, #16]
	mov	w8, #3
	lsl	w8, w8, w22
	add	x8, x0, w8, uxtw #2
	lsl	w9, w21, #2
	add	x9, x0, w9, uxtw #2
	stp	x8, x9, [x19, #32]
	mov	w8, #5
	lsl	w8, w8, w22
	add	x8, x0, w8, uxtw #2
	str	x8, [x19, #48]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_GPIO_PLR
	add	x1, x0, x23
	ldr	x8, [x19, #16]
	add	x2, x8, x23, lsl #2
	mov	x0, x19
	bl	_adnp_read
	tbnz	w0, #31, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_GPIO_IER
	add	x1, x0, x23
	mov	x0, x19
	mov	w2, #0
	bl	_adnp_write
	tbnz	w0, #31, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #8]
	str	wzr, [x8, x23, lsl #2]
	add	x23, x23, #1
	cmp	x23, x21
	b.ne	LBB0_2
; %bb.5:
	ldr	w21, [x19, #68]
	ldr	x8, [x19, #56]
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _adnp_irq@GOTPAGE
Lloh4:
	ldr	x8, [x8, _adnp_irq@GOTPAGEOFF]
Lloh5:
	adrp	x9, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
Lloh8:
	ldr	w8, [x9]
Lloh9:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w24, w9, w8
	mov	x0, x21
	bl	_dev_name
	mov	x5, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, #0
	mov	x3, x23
	mov	x4, x24
	mov	x6, x19
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_10
; %bb.6:
	mov	x22, x0
	ldr	w0, [x19, #68]
	ldr	x8, [x19, #56]
	ldr	w8, [x8]
	stp	x8, x22, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_7:
	mov	x22, x0
	b	LBB0_9
LBB0_8:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
LBB0_10:
Lloh17:
	adrp	x8, _handle_simple_irq@GOTPAGE
Lloh18:
	ldr	x8, [x8, _handle_simple_irq@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
Lloh20:
	adrp	x8, _IRQ_TYPE_NONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IRQ_TYPE_NONE@GOTPAGEOFF]
Lloh22:
	ldr	w4, [x8]
Lloh23:
	adrp	x1, _adnp_irq_chip@GOTPAGE
Lloh24:
	ldr	x1, [x1, _adnp_irq_chip@GOTPAGEOFF]
	mov	x0, x20
	mov	w2, #0
	bl	_gpiochip_irqchip_add_nested
	mov	x22, x0
	cbz	w0, LBB0_12
; %bb.11:
	ldr	w0, [x20]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_12:
	ldr	x8, [x19, #56]
	ldr	w2, [x8]
Lloh27:
	adrp	x1, _adnp_irq_chip@GOTPAGE
Lloh28:
	ldr	x1, [x1, _adnp_irq_chip@GOTPAGEOFF]
	mov	x0, x20
	bl	_gpiochip_set_nested_irqchip
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_adnp_irq,4,2                   ; @adnp_irq
	.comm	_IRQF_TRIGGER_RISING,4,2        ; @IRQF_TRIGGER_RISING
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't request IRQ#%d: %d\n"

	.comm	_adnp_irq_chip,4,2              ; @adnp_irq_chip
	.comm	_handle_simple_irq,4,2          ; @handle_simple_irq
	.comm	_IRQ_TYPE_NONE,4,2              ; @IRQ_TYPE_NONE
l_.str.1:                               ; @.str.1
	.asciz	"could not connect irqchip to gpiochip\n"

	.no_dead_strip	_adnp_irq_setup
.subsections_via_symbols
