	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx8801_irq
_cx8801_irq:                            ## @cx8801_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
	movq	_MAX_IRQ_LOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %r13
	movq	(%rsi), %r15
	movq	_MO_PCI_INTSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_read
	movq	_PCI_INT_AUDINT@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	orl	(%r15), %ebx
	andl	%eax, %ebx
	je	LBB0_3
## %bb.6:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_MO_PCI_INTSTAT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_MAX_IRQ_LOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$3, %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movl	%ebx, %r8d
	callq	_dprintk
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_cx_write
	testl	%ebx, (%r15)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_cx88_core_irq
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	testl	%ebx, (%r14)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_cx8801_aud_irq
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	leal	1(%r13), %ecx
	movq	_MAX_IRQ_LOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	movq	_MO_PCI_INTSTAT@GOTPCREL(%rip), %r12
	jge	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r12), %edi
	callq	_cx_read
	movl	(%r14), %ebx
	orl	(%r15), %ebx
	incl	%r13d
	andl	%eax, %ebx
	jne	LBB0_7
## %bb.5:
	movl	$1, %ebx
	jmp	LBB0_15
LBB0_1:
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	cmpl	%eax, %ecx
	je	LBB0_14
	jmp	LBB0_15
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_12:
	movl	$1, %ebx
	cmpl	%eax, %ecx
	jne	LBB0_15
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	_MO_PCI_INTMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PCI_INT_AUDINT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cx_clear
LBB0_15:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IRQ_RETVAL                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_IRQ_LOOP,4,2               ## @MAX_IRQ_LOOP
	.comm	_MO_PCI_INTSTAT,4,2             ## @MO_PCI_INTSTAT
	.comm	_PCI_INT_AUDINT,4,2             ## @PCI_INT_AUDINT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cx8801_irq loop %d/%d, status %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"IRQ loop detected, disabling interrupts\n"

	.comm	_MO_PCI_INTMSK,4,2              ## @MO_PCI_INTMSK
	.no_dead_strip	_cx8801_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx8801_irq
_cx8801_irq:                            ; @cx8801_irq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x24, _MAX_IRQ_LOOP@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MAX_IRQ_LOOP@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x19, x1
	ldr	x21, [x1]
Lloh2:
	adrp	x25, _MO_PCI_INTSTAT@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MO_PCI_INTSTAT@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_cx_read
	ldr	w8, [x21]
Lloh4:
	adrp	x26, _PCI_INT_AUDINT@GOTPAGE
Lloh5:
	ldr	x26, [x26, _PCI_INT_AUDINT@GOTPAGEOFF]
	ldr	w9, [x26]
	orr	w8, w9, w8
	ands	w23, w8, w0
	b.eq	LBB0_11
; %bb.2:
	mov	w20, #0
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x24]
	mov	w0, #3
	mov	x1, x22
	mov	x2, x20
	mov	x4, x23
	bl	_dprintk
	ldr	w0, [x25]
	mov	x1, x23
	bl	_cx_write
	ldr	w8, [x21]
	tst	w8, w23
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x1, x23
	bl	_cx88_core_irq
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	tst	w8, w23
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_cx8801_aud_irq
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	ldr	w8, [x24]
	cmp	w20, w8
	b.ge	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x25]
	bl	_cx_read
	ldr	w8, [x21]
	ldr	w9, [x26]
	orr	w8, w9, w8
	ands	w23, w8, w0
	b.ne	LBB0_3
; %bb.9:
	mov	w19, #1
	b	LBB0_14
LBB0_10:
	mov	w20, #0
	mov	w19, #0
	cmp	w20, w8
	b.eq	LBB0_13
	b	LBB0_14
LBB0_11:
	mov	w19, #0
	b	LBB0_14
LBB0_12:
	mov	w19, #1
	cmp	w20, w8
	b.ne	LBB0_14
LBB0_13:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh10:
	adrp	x8, _MO_PCI_INTMSK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MO_PCI_INTMSK@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _PCI_INT_AUDINT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PCI_INT_AUDINT@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_cx_clear
LBB0_14:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_IRQ_RETVAL
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_IRQ_LOOP,4,2               ; @MAX_IRQ_LOOP
	.comm	_MO_PCI_INTSTAT,4,2             ; @MO_PCI_INTSTAT
	.comm	_PCI_INT_AUDINT,4,2             ; @PCI_INT_AUDINT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cx8801_irq loop %d/%d, status %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"IRQ loop detected, disabling interrupts\n"

	.comm	_MO_PCI_INTMSK,4,2              ; @MO_PCI_INTMSK
	.no_dead_strip	_cx8801_irq
.subsections_via_symbols
