	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv88e6xxx_g1_irq_thread_work
_mv88e6xxx_g1_irq_thread_work:          ## @mv88e6xxx_g1_irq_thread_work
	.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
	movq	%rdi, %r12
	callq	_mv88e6xxx_reg_lock
	movq	_MV88E6XXX_G1_STS@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_mv88e6xxx_g1_read
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mv88e6xxx_reg_unlock
	testl	%ebx, %ebx
	je	LBB0_1
LBB0_13:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_1:
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	incl	%ebx
	cmpl	%eax, %ebx
	jae	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-44(%rbp), %ecx
	btl	%ebx, %ecx
	jae	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	4(%r12), %edi
	movl	%ebx, %esi
	callq	_irq_find_mapping
	movl	%eax, %edi
	callq	_handle_nested_irq
	incl	%r15d
	movl	(%r12), %eax
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_mv88e6xxx_reg_lock
	movq	_MV88E6XXX_G1_CTL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_mv88e6xxx_g1_read
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %esi
	movq	%r12, %rdi
	leaq	-44(%rbp), %rdx
	callq	_mv88e6xxx_g1_read
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mv88e6xxx_reg_unlock
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	xorl	%esi, %esi
	callq	_GENMASK
	andl	-48(%rbp), %eax
	movl	%eax, -48(%rbp)
	testl	%eax, -44(%rbp)
	jne	LBB0_2
LBB0_11:
	testl	%r15d, %r15d
	jne	LBB0_12
	jmp	LBB0_13
LBB0_8:
	movq	%r12, %rdi
	callq	_mv88e6xxx_reg_unlock
	testl	%r15d, %r15d
	je	LBB0_13
LBB0_12:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV88E6XXX_G1_STS,4,2           ## @MV88E6XXX_G1_STS
	.comm	_MV88E6XXX_G1_CTL1,4,2          ## @MV88E6XXX_G1_CTL1
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.no_dead_strip	_mv88e6xxx_g1_irq_thread_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv88e6xxx_g1_irq_thread_work
_mv88e6xxx_g1_irq_thread_work:          ; @mv88e6xxx_g1_irq_thread_work
	.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
	bl	_mv88e6xxx_reg_lock
Lloh0:
	adrp	x21, _MV88E6XXX_G1_STS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MV88E6XXX_G1_STS@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_mv88e6xxx_g1_read
	mov	x20, x0
	mov	x0, x19
	bl	_mv88e6xxx_reg_unlock
	cbz	w20, LBB0_2
LBB0_1:
Lloh2:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_14
LBB0_2:
	mov	w22, #0
Lloh4:
	adrp	x23, _MV88E6XXX_G1_CTL1@GOTPAGE
Lloh5:
	ldr	x23, [x23, _MV88E6XXX_G1_CTL1@GOTPAGEOFF]
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [x19]
	cbz	w8, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w20, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w20, w20, #1
	cmp	w20, w8
	b.hs	LBB0_8
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [sp, #12]
	lsr	w9, w9, w20
	tbz	w9, #0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w0, [x19, #4]
	mov	x1, x20
	bl	_irq_find_mapping
	bl	_handle_nested_irq
	add	w22, w22, #1
	ldr	w8, [x19]
	b	LBB0_5
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_mv88e6xxx_reg_lock
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x19
	bl	_mv88e6xxx_g1_read
	cbnz	w0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_mv88e6xxx_g1_read
	mov	x20, x0
	mov	x0, x19
	bl	_mv88e6xxx_reg_unlock
	cbnz	w20, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19]
	mov	w1, #0
	bl	_GENMASK
	ldp	w8, w9, [sp, #8]
	and	w8, w8, w0
	str	w8, [sp, #8]
	tst	w9, w8
	b.ne	LBB0_3
LBB0_11:
	cbnz	w22, LBB0_13
	b	LBB0_1
LBB0_12:
	mov	x0, x19
	bl	_mv88e6xxx_reg_unlock
	cbz	w22, LBB0_1
LBB0_13:
Lloh6:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MV88E6XXX_G1_STS,4,2           ; @MV88E6XXX_G1_STS
	.comm	_MV88E6XXX_G1_CTL1,4,2          ; @MV88E6XXX_G1_CTL1
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.no_dead_strip	_mv88e6xxx_g1_irq_thread_work
.subsections_via_symbols
