	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx8802_mpeg_irq
_cx8802_mpeg_irq:                       ## @cx8802_mpeg_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	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_MO_TS_INTSTAT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_cx_read
	movl	%eax, %r13d
	movq	_MO_TS_INTMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_read
	movl	%eax, %ebx
	andl	%r13d, %ebx
	je	LBB0_9
## %bb.1:
	movl	%eax, %r15d
	movl	(%r12), %edi
	movl	%r13d, %esi
	callq	_cx_write
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_3
## %bb.2:
	cmpl	$256, %ebx                      ## imm = 0x100
	jae	LBB0_3
## %bb.4:
	testl	$65536, %r13d                   ## imm = 0x10000
	jne	LBB0_5
LBB0_6:
	testb	$1, %r13b
	jne	LBB0_7
LBB0_8:
	andl	$2031872, %r13d                 ## imm = 0x1F0100
	je	LBB0_9
LBB0_10:
	leaq	L_.str.4(%rip), %rsi
	xorl	%edi, %edi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r14, %rdi
	callq	_spin_lock
	movq	%r14, %rdi
	callq	_cx8802_stop_dma
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
LBB0_3:
	movq	_cx88_mpeg_irqs@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_ARRAY_SIZE
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	movl	%r13d, %ecx
	movl	%r15d, %r8d
	callq	_cx88_print_irqbits
	testl	$65536, %r13d                   ## imm = 0x10000
	je	LBB0_6
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_warn
	movq	_MO_TS_DMACNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$17, %esi
	callq	_cx_clear
	movq	8(%r14), %rdi
	movq	_cx88_sram_channels@GOTPCREL(%rip), %rax
	movq	_SRAM_CH28@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	shlq	$2, %rsi
	addq	(%rax), %rsi
	callq	_cx88_sram_channel_dump
	testb	$1, %r13b
	je	LBB0_8
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_MO_TS_GPCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_read
	movq	8(%r14), %rdi
	leaq	4(%r14), %rsi
	movl	%eax, %edx
	callq	_cx88_wakeup
	movq	%r14, %rdi
	callq	_spin_unlock
	andl	$2031872, %r13d                 ## imm = 0x1F0100
	jne	LBB0_10
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_MO_TS_INTSTAT,4,2              ## @MO_TS_INTSTAT
	.comm	_MO_TS_INTMSK,4,2               ## @MO_TS_INTMSK
	.comm	_debug,8,3                      ## @debug
L_.str.1:                               ## @.str.1
	.asciz	"irq mpeg "

	.comm	_cx88_mpeg_irqs,4,2             ## @cx88_mpeg_irqs
L_.str.2:                               ## @.str.2
	.asciz	"mpeg risc op code error\n"

	.comm	_MO_TS_DMACNTRL,4,2             ## @MO_TS_DMACNTRL
	.comm	_cx88_sram_channels,8,3         ## @cx88_sram_channels
	.comm	_SRAM_CH28,8,3                  ## @SRAM_CH28
L_.str.3:                               ## @.str.3
	.asciz	"wake up\n"

	.comm	_MO_TS_GPCNT,4,2                ## @MO_TS_GPCNT
L_.str.4:                               ## @.str.4
	.asciz	"general errors: 0x%08x\n"

	.no_dead_strip	_cx8802_mpeg_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx8802_mpeg_irq
_cx8802_mpeg_irq:                       ; @cx8802_mpeg_irq
	.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
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_dprintk
Lloh2:
	adrp	x22, _MO_TS_INTSTAT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MO_TS_INTSTAT@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_cx_read
	mov	x20, x0
Lloh4:
	adrp	x8, _MO_TS_INTMSK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MO_TS_INTMSK@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_cx_read
	ands	w23, w0, w20
	b.eq	LBB0_8
; %bb.1:
	mov	x21, x0
	ldr	w0, [x22]
	mov	x1, x20
	bl	_cx_write
Lloh7:
	adrp	x8, _debug@GOTPAGE
Lloh8:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbnz	x8, LBB0_9
; %bb.2:
	cmp	w23, #256
	b.hs	LBB0_9
; %bb.3:
	tbnz	w20, #16, LBB0_10
LBB0_4:
	tbz	w20, #0, LBB0_6
LBB0_5:
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	mov	x0, x19
	bl	_spin_lock
Lloh12:
	adrp	x8, _MO_TS_GPCNT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MO_TS_GPCNT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_cx_read
	mov	x2, x0
	ldr	x0, [x19, #8]
	add	x1, x19, #4
	bl	_cx88_wakeup
	mov	x0, x19
	bl	_spin_unlock
LBB0_6:
	mov	w8, #256
	movk	w8, #31, lsl #16
	ands	w8, w20, w8
	b.eq	LBB0_8
; %bb.7:
	str	x8, [sp]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #0
	bl	_dprintk
	mov	x0, x19
	bl	_spin_lock
	mov	x0, x19
	bl	_cx8802_stop_dma
	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
	add	sp, sp, #80
	b	_spin_unlock
LBB0_8:
	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_9:
Lloh17:
	adrp	x8, _cx88_mpeg_irqs@GOTPAGE
Lloh18:
	ldr	x8, [x8, _cx88_mpeg_irqs@GOTPAGEOFF]
Lloh19:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x2, x0
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	mov	x3, x20
	mov	x4, x21
	bl	_cx88_print_irqbits
	tbz	w20, #16, LBB0_4
LBB0_10:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_warn
Lloh24:
	adrp	x8, _MO_TS_DMACNTRL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MO_TS_DMACNTRL@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	w1, #17
	bl	_cx_clear
Lloh27:
	adrp	x8, _cx88_sram_channels@GOTPAGE
Lloh28:
	ldr	x8, [x8, _cx88_sram_channels@GOTPAGEOFF]
	ldr	x0, [x19, #8]
Lloh29:
	ldr	x8, [x8]
Lloh30:
	adrp	x9, _SRAM_CH28@GOTPAGE
Lloh31:
	ldr	x9, [x9, _SRAM_CH28@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	bl	_cx88_sram_channel_dump
	tbnz	w20, #0, LBB0_5
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_MO_TS_INTSTAT,4,2              ; @MO_TS_INTSTAT
	.comm	_MO_TS_INTMSK,4,2               ; @MO_TS_INTMSK
	.comm	_debug,8,3                      ; @debug
l_.str.1:                               ; @.str.1
	.asciz	"irq mpeg "

	.comm	_cx88_mpeg_irqs,4,2             ; @cx88_mpeg_irqs
l_.str.2:                               ; @.str.2
	.asciz	"mpeg risc op code error\n"

	.comm	_MO_TS_DMACNTRL,4,2             ; @MO_TS_DMACNTRL
	.comm	_cx88_sram_channels,8,3         ; @cx88_sram_channels
	.comm	_SRAM_CH28,8,3                  ; @SRAM_CH28
l_.str.3:                               ; @.str.3
	.asciz	"wake up\n"

	.comm	_MO_TS_GPCNT,4,2                ; @MO_TS_GPCNT
l_.str.4:                               ; @.str.4
	.asciz	"general errors: 0x%08x\n"

	.no_dead_strip	_cx8802_mpeg_irq
.subsections_via_symbols
