	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arm_get_next_irq               ## -- Begin function arm_get_next_irq
	.p2align	4, 0x90
_arm_get_next_irq:                      ## @arm_get_next_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	%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
                                        ## kill: def $edi killed $edi def $rdi
	leal	1(%rdi), %eax
	movq	_AML_PIC_NIRQS@GOTPCREL(%rip), %r12
	cltd
	idivl	(%r12)
	movl	%edx, %r14d
	movq	_AML_PIC_IRQS_PER_CNTRL@GOTPCREL(%rip), %r13
	movl	%edx, %ebx
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	_aml8726_pic_sc@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_AML_PIC_STAT_REG
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_CSR_READ_4
	movl	%eax, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	callq	_AML_PIC_BIT
	testl	%r15d, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	incl	%ebx
	movl	%ebx, %eax
	cltd
	idivl	(%r12)
	cmpl	%r14d, %edx
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	%edx, %ebx
	movl	%edx, %eax
	cltd
	idivl	(%r13)
	testl	%edx, %edx
	jne	LBB0_2
	jmp	LBB0_1
LBB0_4:
	movl	$-1, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AML_PIC_NIRQS,4,2              ## @AML_PIC_NIRQS
	.comm	_aml8726_pic_sc,4,2             ## @aml8726_pic_sc
	.comm	_AML_PIC_IRQS_PER_CNTRL,4,2     ## @AML_PIC_IRQS_PER_CNTRL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arm_get_next_irq               ; -- Begin function arm_get_next_irq
	.p2align	2
_arm_get_next_irq:                      ; @arm_get_next_irq
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	add	w8, w0, #1
Lloh0:
	adrp	x21, _AML_PIC_NIRQS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AML_PIC_NIRQS@GOTPAGEOFF]
	ldr	w9, [x21]
	sdiv	w10, w8, w9
	msub	w22, w10, w9, w8
Lloh2:
	adrp	x23, _aml8726_pic_sc@GOTPAGE
Lloh3:
	ldr	x23, [x23, _aml8726_pic_sc@GOTPAGEOFF]
Lloh4:
	adrp	x24, _AML_PIC_IRQS_PER_CNTRL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _AML_PIC_IRQS_PER_CNTRL@GOTPAGEOFF]
	mov	x19, x22
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
	ldr	w20, [x23]
	mov	x0, x19
	bl	_AML_PIC_STAT_REG
	mov	x1, x0
	mov	x0, x20
	bl	_CSR_READ_4
	mov	x20, x0
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	bl	_AML_PIC_BIT
	tst	w0, w20
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	add	w8, w19, #1
	ldr	w9, [x21]
	sdiv	w10, w8, w9
	msub	w19, w10, w9, w8
	cmp	w19, w22
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	w8, [x24]
	sdiv	w9, w19, w8
	msub	w8, w9, w8, w19
	cbnz	w8, LBB0_2
	b	LBB0_1
LBB0_5:
	mov	w19, #-1
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AML_PIC_NIRQS,4,2              ; @AML_PIC_NIRQS
	.comm	_aml8726_pic_sc,4,2             ; @aml8726_pic_sc
	.comm	_AML_PIC_IRQS_PER_CNTRL,4,2     ; @AML_PIC_IRQS_PER_CNTRL
.subsections_via_symbols
