	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx23885_video_irq              ## -- Begin function cx23885_video_irq
	.p2align	4, 0x90
_cx23885_video_irq:                     ## @cx23885_video_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_VID_A_INT_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_read
	testl	%r15d, %eax
	je	LBB0_1
## %bb.2:
	movq	_VID_A_INT_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_cx_write
	movq	_VID_BC_MSK_OPC_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r15d, %edx
	je	LBB0_3
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movl	$7, %edi
	callq	_dprintk
	movl	16(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn
	movq	_SRAM_CH01@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	8(%r14), %rsi
	movq	%r14, %rdi
	callq	_cx23885_sram_channel_dump
	movq	_VID_BC_MSK_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r15d, %edx
	jne	LBB0_6
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_3:
	movq	_VID_BC_MSK_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r15d, %edx
	je	LBB0_4
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movl	$7, %edi
	callq	_dprintk
LBB0_7:
	movq	_VID_BC_MSK_OF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r15d, %edx
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movl	$7, %edi
	callq	_dprintk
LBB0_9:
	movq	_VID_BC_MSK_RISCI1@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_10
## %bb.11:
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_VID_A_GPCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_read
	leaq	4(%r14), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_cx23885_video_wakeup
	movq	%r14, %rdi
	callq	_spin_unlock
	movl	$1, %ebx
	jmp	LBB0_12
LBB0_10:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_cx23885_vbi_irq
	addl	%eax, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_VID_BC_MSK_OF@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_7
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_VID_A_INT_MSK,4,2              ## @VID_A_INT_MSK
	.comm	_VID_A_INT_STAT,4,2             ## @VID_A_INT_STAT
	.comm	_VID_BC_MSK_OPC_ERR,4,2         ## @VID_BC_MSK_OPC_ERR
	.comm	_VID_BC_MSK_SYNC,4,2            ## @VID_BC_MSK_SYNC
	.comm	_VID_BC_MSK_OF,4,2              ## @VID_BC_MSK_OF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" (VID_BC_MSK_OPC_ERR 0x%08x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: video risc op code error\n"

	.comm	_SRAM_CH01,8,3                  ## @SRAM_CH01
L_.str.2:                               ## @.str.2
	.asciz	" (VID_BC_MSK_SYNC 0x%08x) video lines miss-match\n"

L_.str.3:                               ## @.str.3
	.asciz	" (VID_BC_MSK_OF 0x%08x) fifo overflow\n"

	.comm	_VID_BC_MSK_RISCI1,4,2          ## @VID_BC_MSK_RISCI1
	.comm	_VID_A_GPCNT,4,2                ## @VID_A_GPCNT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx23885_video_irq              ; -- Begin function cx23885_video_irq
	.p2align	2
_cx23885_video_irq:                     ; @cx23885_video_irq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _VID_A_INT_MSK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VID_A_INT_MSK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cx_read
	tst	w0, w19
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _VID_A_INT_STAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VID_A_INT_STAT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_cx_write
Lloh6:
	adrp	x8, _VID_BC_MSK_OPC_ERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VID_BC_MSK_OPC_ERR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x21, _VID_BC_MSK_OF@GOTPAGE
Lloh10:
	ldr	x21, [x21, _VID_BC_MSK_OF@GOTPAGEOFF]
	tst	w2, w19
	b.eq	LBB0_4
; %bb.2:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #7
	bl	_dprintk
	ldr	w1, [x20, #16]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
	ldr	x8, [x20, #8]
Lloh15:
	adrp	x9, _SRAM_CH01@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SRAM_CH01@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
	bl	_cx23885_sram_channel_dump
Lloh18:
	adrp	x8, _VID_BC_MSK_SYNC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VID_BC_MSK_SYNC@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	tst	w2, w19
	b.ne	LBB0_5
	b	LBB0_6
LBB0_3:
	mov	w0, #0
	b	LBB0_12
LBB0_4:
Lloh21:
	adrp	x8, _VID_BC_MSK_SYNC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VID_BC_MSK_SYNC@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	tst	w2, w19
	b.eq	LBB0_13
LBB0_5:
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #7
	bl	_dprintk
LBB0_6:
	ldr	w2, [x21]
	tst	w2, w19
	b.eq	LBB0_8
; %bb.7:
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #7
	bl	_dprintk
LBB0_8:
Lloh28:
	adrp	x8, _VID_BC_MSK_RISCI1@GOTPAGE
Lloh29:
	ldr	x8, [x8, _VID_BC_MSK_RISCI1@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_spin_lock
Lloh31:
	adrp	x8, _VID_A_GPCNT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _VID_A_GPCNT@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_cx_read
	mov	x2, x0
	add	x1, x20, #4
	mov	x0, x20
	bl	_cx23885_video_wakeup
	mov	x0, x20
	bl	_spin_unlock
	mov	w21, #1
	b	LBB0_11
LBB0_10:
	mov	x21, #0
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	bl	_cx23885_vbi_irq
	add	w0, w0, w21
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	w8, [x21]
	tst	w8, w19
	b.ne	LBB0_6
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_VID_A_INT_MSK,4,2              ; @VID_A_INT_MSK
	.comm	_VID_A_INT_STAT,4,2             ; @VID_A_INT_STAT
	.comm	_VID_BC_MSK_OPC_ERR,4,2         ; @VID_BC_MSK_OPC_ERR
	.comm	_VID_BC_MSK_SYNC,4,2            ; @VID_BC_MSK_SYNC
	.comm	_VID_BC_MSK_OF,4,2              ; @VID_BC_MSK_OF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" (VID_BC_MSK_OPC_ERR 0x%08x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: video risc op code error\n"

	.comm	_SRAM_CH01,8,3                  ; @SRAM_CH01
l_.str.2:                               ; @.str.2
	.asciz	" (VID_BC_MSK_SYNC 0x%08x) video lines miss-match\n"

l_.str.3:                               ; @.str.3
	.asciz	" (VID_BC_MSK_OF 0x%08x) fifo overflow\n"

	.comm	_VID_BC_MSK_RISCI1,4,2          ; @VID_BC_MSK_RISCI1
	.comm	_VID_A_GPCNT,4,2                ; @VID_A_GPCNT
.subsections_via_symbols
