	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_irq_handler               ## -- Begin function ivtv_irq_handler
	.p2align	4, 0x90
_ivtv_irq_handler:                      ## @ivtv_irq_handler
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	leaq	12(%rsi), %r12
	movq	%r12, %rdi
	callq	_spin_lock
	movq	_IVTV_REG_IRQSTATUS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_read_reg
	movl	%eax, %r15d
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, %r15d
	je	LBB0_1
## %bb.4:
	movl	(%rbx), %esi
	movl	%r15d, %edi
	callq	_write_reg
	testl	$9632767, %r15d                 ## imm = 0x92FBFF
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_IVTV_DEBUG_HI_IRQ
	jmp	LBB0_6
LBB0_1:
	movq	_IVTV_IRQ_DEC_VSYNC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_62
## %bb.2:
	movl	4(%r13), %ebx
	movq	_IVTV_REG_DEC_LINE_FIELD@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_read_reg
	xorl	%ebx, %eax
	testb	$1, %al
	jne	LBB0_3
LBB0_62:
	movq	%r12, %rdi
	callq	_spin_unlock
	jmp	LBB0_63
LBB0_3:
	movl	(%r14), %edi
	callq	_read_reg
	sarl	$16, %eax
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_IVTV_DEBUG_YUV
LBB0_6:
	movq	_IVTV_IRQ_DEC_DMA_COMPLETE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_IVTV_DEBUG_HI_IRQ
LBB0_8:
	movq	_IVTV_IRQ_DMA_READ@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_ivtv_irq_dma_read
LBB0_10:
	movq	_IVTV_IRQ_ENC_DMA_COMPLETE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.11:
	movq	%r13, %rdi
	callq	_ivtv_irq_enc_dma_complete
LBB0_12:
	movq	_IVTV_IRQ_ENC_PIO_COMPLETE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	callq	_ivtv_irq_enc_pio_complete
LBB0_14:
	movq	_IVTV_IRQ_DMA_ERR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_16
## %bb.15:
	movq	%r13, %rdi
	callq	_ivtv_irq_dma_err
LBB0_16:
	movq	_IVTV_IRQ_ENC_START_CAP@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_18
## %bb.17:
	movq	%r13, %rdi
	callq	_ivtv_irq_enc_start_cap
LBB0_18:
	movq	_IVTV_IRQ_ENC_VBI_CAP@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_20
## %bb.19:
	movq	%r13, %rdi
	callq	_ivtv_irq_enc_vbi_cap
LBB0_20:
	movq	_IVTV_IRQ_DEC_VBI_RE_INSERT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_22
## %bb.21:
	movq	%r13, %rdi
	callq	_ivtv_irq_dec_vbi_reinsert
LBB0_22:
	movq	_IVTV_IRQ_ENC_EOS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_24
## %bb.23:
	leaq	L_.str.3(%rip), %rdi
	callq	_IVTV_DEBUG_IRQ
	movq	_IVTV_F_I_EOS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r13), %rsi
	callq	_set_bit
	leaq	40(%r13), %rdi
	callq	_wake_up
LBB0_24:
	movq	_IVTV_IRQ_DEC_DATA_REQ@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_26
## %bb.25:
	movq	%r13, %rdi
	callq	_ivtv_irq_dec_data_req
LBB0_26:
	movl	(%r13), %eax
	notl	%eax
	movq	_IVTV_IRQ_DEC_VSYNC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_28
## %bb.27:
	movq	%r13, %rdi
	callq	_ivtv_irq_vsync
LBB0_28:
	movq	_IVTV_IRQ_ENC_VIM_RST@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_30
## %bb.29:
	leaq	L_.str.4(%rip), %rdi
	callq	_IVTV_DEBUG_IRQ
LBB0_30:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_IVTV_IRQ_DEC_AUD_MODE_CHG@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_32
## %bb.31:
	leaq	L_.str.5(%rip), %rdi
	callq	_IVTV_DEBUG_INFO
LBB0_32:
	movq	_IVTV_IRQ_DMA@GOTPCREL(%rip), %rbx
	testl	%r15d, (%rbx)
	je	LBB0_48
## %bb.33:
	movq	_IVTV_F_I_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r13), %r12
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_48
## %bb.34:
	movl	8(%r13), %eax
	incl	%eax
	movl	%eax, 8(%r13)
	movq	_IVTV_MAX_STREAMS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_35
## %bb.36:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	cltd
	idivl	%ecx
	movq	32(%r13), %rbx
	movslq	%edx, %r12
	movq	_IVTV_F_S_DMA_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rax
	shlq	$4, %rax
	leaq	(%rbx,%rax), %rsi
	addq	$8, %rsi
	callq	_test_and_clear_bit
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_41
## %bb.37:
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	movq	_IVTV_MAX_STREAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r14d
	jge	LBB0_44
## %bb.39:                              ##   in Loop: Header=BB0_38 Depth=1
	movl	8(%r13), %eax
	addl	%r14d, %eax
	cltd
	idivl	%ecx
	movq	32(%r13), %rbx
	movslq	%edx, %r12
	movq	_IVTV_F_S_DMA_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rax
	shlq	$4, %rax
	leaq	(%rbx,%rax), %rsi
	addq	$8, %rsi
	callq	_test_and_clear_bit
	incl	%r14d
	testq	%rax, %rax
	je	LBB0_38
## %bb.40:
	decl	%r14d
LBB0_41:
	shlq	$4, %r12
	leaq	(%rbx,%r12), %rdi
	movq	(%rbx,%r12), %rax
	movq	_IVTV_DEC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_42
## %bb.43:
	callq	_ivtv_dma_enc_start
	jmp	LBB0_44
LBB0_35:
	xorl	%r14d, %r14d
	jmp	LBB0_45
LBB0_42:
	callq	_ivtv_dma_dec_start
LBB0_44:
	movq	_IVTV_IRQ_DMA@GOTPCREL(%rip), %rbx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_45:
	movq	_IVTV_MAX_STREAMS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_48
## %bb.46:
	movq	_IVTV_F_I_UDMA_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_48
## %bb.47:
	movq	%r13, %rdi
	callq	_ivtv_udma_start
LBB0_48:
	testl	%r15d, (%rbx)
	je	LBB0_58
## %bb.49:
	movq	_IVTV_F_I_PIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r13), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_50
LBB0_58:
	movq	_IVTV_F_I_HAVE_WORK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r13), %rsi
	callq	_test_and_clear_bit
	testq	%rax, %rax
	je	LBB0_60
## %bb.59:
	leaq	20(%r13), %rdi
	addq	$16, %r13
	movq	%r13, %rsi
	callq	_kthread_queue_work
LBB0_60:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	testl	%r15d, %r15d
	jne	LBB0_61
LBB0_63:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_64
LBB0_61:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_64:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_50:
	movl	8(%r13), %eax
	incl	%eax
	movl	%eax, 8(%r13)
	movq	_IVTV_MAX_STREAMS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_58
## %bb.51:
	cltd
	idivl	%ecx
	movq	32(%r13), %rbx
	movslq	%edx, %r12
	movq	_IVTV_F_S_PIO_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rax
	shlq	$4, %rax
	leaq	(%rbx,%rax), %rsi
	addq	$8, %rsi
	callq	_test_and_clear_bit
	testq	%rax, %rax
	jne	LBB0_55
## %bb.52:
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_53:                                ## =>This Inner Loop Header: Depth=1
	movq	_IVTV_MAX_STREAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r14d
	jge	LBB0_58
## %bb.54:                              ##   in Loop: Header=BB0_53 Depth=1
	movl	8(%r13), %eax
	addl	%r14d, %eax
	cltd
	idivl	%ecx
	movq	32(%r13), %rbx
	movslq	%edx, %r12
	movq	_IVTV_F_S_PIO_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rax
	shlq	$4, %rax
	leaq	(%rbx,%rax), %rsi
	addq	$8, %rsi
	callq	_test_and_clear_bit
	incl	%r14d
	testq	%rax, %rax
	je	LBB0_53
LBB0_55:
	shlq	$4, %r12
	movq	(%rbx,%r12), %rax
	movq	_IVTV_DEC_STREAM_TYPE_VBI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_57
## %bb.56:
	movq	_IVTV_DEC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_58
LBB0_57:
	addq	%r12, %rbx
	movq	%rbx, %rdi
	callq	_ivtv_dma_enc_start
	jmp	LBB0_58
	.cfi_endproc
                                        ## -- End function
	.comm	_IVTV_REG_IRQSTATUS,4,2         ## @IVTV_REG_IRQSTATUS
	.comm	_IVTV_IRQ_DEC_VSYNC,4,2         ## @IVTV_IRQ_DEC_VSYNC
	.comm	_IVTV_REG_DEC_LINE_FIELD,4,2    ## @IVTV_REG_DEC_LINE_FIELD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VSync interrupt missed %d\n"

	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
L_.str.1:                               ## @.str.1
	.asciz	"======= valid IRQ bits: 0x%08x ======\n"

	.comm	_IVTV_IRQ_DEC_DMA_COMPLETE,4,2  ## @IVTV_IRQ_DEC_DMA_COMPLETE
L_.str.2:                               ## @.str.2
	.asciz	"DEC DMA COMPLETE\n"

	.comm	_IVTV_IRQ_DMA_READ,4,2          ## @IVTV_IRQ_DMA_READ
	.comm	_IVTV_IRQ_ENC_DMA_COMPLETE,4,2  ## @IVTV_IRQ_ENC_DMA_COMPLETE
	.comm	_IVTV_IRQ_ENC_PIO_COMPLETE,4,2  ## @IVTV_IRQ_ENC_PIO_COMPLETE
	.comm	_IVTV_IRQ_DMA_ERR,4,2           ## @IVTV_IRQ_DMA_ERR
	.comm	_IVTV_IRQ_ENC_START_CAP,4,2     ## @IVTV_IRQ_ENC_START_CAP
	.comm	_IVTV_IRQ_ENC_VBI_CAP,4,2       ## @IVTV_IRQ_ENC_VBI_CAP
	.comm	_IVTV_IRQ_DEC_VBI_RE_INSERT,4,2 ## @IVTV_IRQ_DEC_VBI_RE_INSERT
	.comm	_IVTV_IRQ_ENC_EOS,4,2           ## @IVTV_IRQ_ENC_EOS
L_.str.3:                               ## @.str.3
	.asciz	"ENC EOS\n"

	.comm	_IVTV_F_I_EOS,4,2               ## @IVTV_F_I_EOS
	.comm	_IVTV_IRQ_DEC_DATA_REQ,4,2      ## @IVTV_IRQ_DEC_DATA_REQ
	.comm	_IVTV_IRQ_ENC_VIM_RST,4,2       ## @IVTV_IRQ_ENC_VIM_RST
L_.str.4:                               ## @.str.4
	.asciz	"VIM RST\n"

	.comm	_IVTV_IRQ_DEC_AUD_MODE_CHG,4,2  ## @IVTV_IRQ_DEC_AUD_MODE_CHG
L_.str.5:                               ## @.str.5
	.asciz	"Stereo mode changed\n"

	.comm	_IVTV_IRQ_DMA,4,2               ## @IVTV_IRQ_DMA
	.comm	_IVTV_F_I_DMA,4,2               ## @IVTV_F_I_DMA
	.comm	_IVTV_MAX_STREAMS,4,2           ## @IVTV_MAX_STREAMS
	.comm	_IVTV_F_S_DMA_PENDING,4,2       ## @IVTV_F_S_DMA_PENDING
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,8,3   ## @IVTV_DEC_STREAM_TYPE_MPG
	.comm	_IVTV_F_I_UDMA_PENDING,4,2      ## @IVTV_F_I_UDMA_PENDING
	.comm	_IVTV_F_I_PIO,4,2               ## @IVTV_F_I_PIO
	.comm	_IVTV_F_S_PIO_PENDING,4,2       ## @IVTV_F_S_PIO_PENDING
	.comm	_IVTV_DEC_STREAM_TYPE_VBI,8,3   ## @IVTV_DEC_STREAM_TYPE_VBI
	.comm	_IVTV_F_I_HAVE_WORK,4,2         ## @IVTV_F_I_HAVE_WORK
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_irq_handler               ; -- Begin function ivtv_irq_handler
	.p2align	2
_ivtv_irq_handler:                      ; @ivtv_irq_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	add	x19, x1, #12
	mov	x0, x19
	bl	_spin_lock
Lloh0:
	adrp	x23, _IVTV_REG_IRQSTATUS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IVTV_REG_IRQSTATUS@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_read_reg
	ldr	w8, [x20]
Lloh2:
	adrp	x22, _IVTV_IRQ_DEC_VSYNC@GOTPAGE
Lloh3:
	ldr	x22, [x22, _IVTV_IRQ_DEC_VSYNC@GOTPAGEOFF]
	bics	w21, w0, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w1, [x23]
	mov	x0, x21
	bl	_write_reg
	mov	w8, #64511
	movk	w8, #146, lsl #16
	tst	w21, w8
	b.eq	LBB0_7
; %bb.2:
	str	x21, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IVTV_DEBUG_HI_IRQ
	b	LBB0_7
LBB0_3:
	mvn	w8, w8
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	w24, [x20, #4]
Lloh6:
	adrp	x23, _IVTV_REG_DEC_LINE_FIELD@GOTPAGE
Lloh7:
	ldr	x23, [x23, _IVTV_REG_DEC_LINE_FIELD@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_read_reg
	eor	w8, w0, w24
	tbnz	w8, #0, LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock
Lloh8:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_54
LBB0_6:
	ldr	w0, [x23]
	bl	_read_reg
	asr	w1, w0, #16
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_YUV
LBB0_7:
Lloh12:
	adrp	x8, _IVTV_IRQ_DEC_DMA_COMPLETE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IVTV_IRQ_DEC_DMA_COMPLETE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.8:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IVTV_DEBUG_HI_IRQ
LBB0_9:
Lloh17:
	adrp	x8, _IVTV_IRQ_DMA_READ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IVTV_IRQ_DMA_READ@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_ivtv_irq_dma_read
LBB0_11:
Lloh20:
	adrp	x8, _IVTV_IRQ_ENC_DMA_COMPLETE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IVTV_IRQ_ENC_DMA_COMPLETE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_ivtv_irq_enc_dma_complete
LBB0_13:
Lloh23:
	adrp	x8, _IVTV_IRQ_ENC_PIO_COMPLETE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IVTV_IRQ_ENC_PIO_COMPLETE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_15
; %bb.14:
	mov	x0, x20
	bl	_ivtv_irq_enc_pio_complete
LBB0_15:
Lloh26:
	adrp	x8, _IVTV_IRQ_DMA_ERR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IVTV_IRQ_DMA_ERR@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_ivtv_irq_dma_err
LBB0_17:
Lloh29:
	adrp	x8, _IVTV_IRQ_ENC_START_CAP@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IVTV_IRQ_ENC_START_CAP@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_19
; %bb.18:
	mov	x0, x20
	bl	_ivtv_irq_enc_start_cap
LBB0_19:
Lloh32:
	adrp	x8, _IVTV_IRQ_ENC_VBI_CAP@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IVTV_IRQ_ENC_VBI_CAP@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_21
; %bb.20:
	mov	x0, x20
	bl	_ivtv_irq_enc_vbi_cap
LBB0_21:
Lloh35:
	adrp	x8, _IVTV_IRQ_DEC_VBI_RE_INSERT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _IVTV_IRQ_DEC_VBI_RE_INSERT@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_23
; %bb.22:
	mov	x0, x20
	bl	_ivtv_irq_dec_vbi_reinsert
LBB0_23:
Lloh38:
	adrp	x8, _IVTV_IRQ_ENC_EOS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _IVTV_IRQ_ENC_EOS@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_25
; %bb.24:
Lloh41:
	adrp	x0, l_.str.3@PAGE
Lloh42:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_IVTV_DEBUG_IRQ
Lloh43:
	adrp	x8, _IVTV_F_I_EOS@GOTPAGE
Lloh44:
	ldr	x8, [x8, _IVTV_F_I_EOS@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	add	x1, x20, #24
	bl	_set_bit
	add	x0, x20, #40
	bl	_wake_up
LBB0_25:
Lloh46:
	adrp	x8, _IVTV_IRQ_DEC_DATA_REQ@GOTPAGE
Lloh47:
	ldr	x8, [x8, _IVTV_IRQ_DEC_DATA_REQ@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_27
; %bb.26:
	mov	x0, x20
	bl	_ivtv_irq_dec_data_req
LBB0_27:
	ldr	w8, [x20]
	ldr	w9, [x22]
	bics	wzr, w9, w8
	b.eq	LBB0_29
; %bb.28:
	mov	x0, x20
	bl	_ivtv_irq_vsync
LBB0_29:
Lloh49:
	adrp	x8, _IVTV_IRQ_ENC_VIM_RST@GOTPAGE
Lloh50:
	ldr	x8, [x8, _IVTV_IRQ_ENC_VIM_RST@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_31
; %bb.30:
Lloh52:
	adrp	x0, l_.str.4@PAGE
Lloh53:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_IVTV_DEBUG_IRQ
LBB0_31:
Lloh54:
	adrp	x8, _IVTV_IRQ_DEC_AUD_MODE_CHG@GOTPAGE
Lloh55:
	ldr	x8, [x8, _IVTV_IRQ_DEC_AUD_MODE_CHG@GOTPAGEOFF]
Lloh56:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_33
; %bb.32:
Lloh57:
	adrp	x0, l_.str.5@PAGE
Lloh58:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_IVTV_DEBUG_INFO
LBB0_33:
Lloh59:
	adrp	x23, _IVTV_IRQ_DMA@GOTPAGE
Lloh60:
	ldr	x23, [x23, _IVTV_IRQ_DMA@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w21
	b.eq	LBB0_49
; %bb.34:
Lloh61:
	adrp	x8, _IVTV_F_I_DMA@GOTPAGE
Lloh62:
	ldr	x8, [x8, _IVTV_F_I_DMA@GOTPAGEOFF]
Lloh63:
	ldr	w0, [x8]
	add	x22, x20, #24
	mov	x1, x22
	bl	_test_bit
	cbnz	x0, LBB0_49
; %bb.35:
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
Lloh64:
	adrp	x24, _IVTV_MAX_STREAMS@GOTPAGE
Lloh65:
	ldr	x24, [x24, _IVTV_MAX_STREAMS@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w9, #1
	b.lt	LBB0_38
; %bb.36:
	sdiv	w10, w8, w9
	msub	w28, w10, w9, w8
	ldr	x26, [x20, #32]
Lloh66:
	adrp	x27, _IVTV_F_S_DMA_PENDING@GOTPAGE
Lloh67:
	ldr	x27, [x27, _IVTV_F_S_DMA_PENDING@GOTPAGEOFF]
	ldr	w0, [x27]
	add	x8, x26, w28, sxtw #4
	add	x1, x8, #8
	bl	_test_and_clear_bit
	cbz	x0, LBB0_39
; %bb.37:
	mov	w25, #0
	sxtw	x8, w28
	b	LBB0_43
LBB0_38:
	mov	w25, #0
	b	LBB0_46
LBB0_39:
	mov	w25, #1
LBB0_40:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	cmp	w25, w8
	b.ge	LBB0_46
; %bb.41:                               ;   in Loop: Header=BB0_40 Depth=1
	ldr	w9, [x20, #8]
	add	w9, w25, w9
	sdiv	w10, w9, w8
	msub	w28, w10, w8, w9
	ldr	x26, [x20, #32]
	ldr	w0, [x27]
	add	x8, x26, w28, sxtw #4
	add	x1, x8, #8
	bl	_test_and_clear_bit
	add	w25, w25, #1
	cbz	x0, LBB0_40
; %bb.42:
	sxtw	x8, w28
	sub	w25, w25, #1
LBB0_43:
	add	x0, x26, x8, lsl #4
	ldr	x8, [x0]
Lloh68:
	adrp	x9, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGE
Lloh69:
	ldr	x9, [x9, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGEOFF]
Lloh70:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_45
; %bb.44:
	bl	_ivtv_dma_enc_start
	b	LBB0_46
LBB0_45:
	bl	_ivtv_dma_dec_start
LBB0_46:
	ldr	w8, [x24]
	cmp	w25, w8
	b.ne	LBB0_49
; %bb.47:
Lloh71:
	adrp	x8, _IVTV_F_I_UDMA_PENDING@GOTPAGE
Lloh72:
	ldr	x8, [x8, _IVTV_F_I_UDMA_PENDING@GOTPAGEOFF]
Lloh73:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_49
; %bb.48:
	mov	x0, x20
	bl	_ivtv_udma_start
LBB0_49:
	ldr	w8, [x23]
	tst	w8, w21
	b.eq	LBB0_51
; %bb.50:
Lloh74:
	adrp	x8, _IVTV_F_I_PIO@GOTPAGE
Lloh75:
	ldr	x8, [x8, _IVTV_F_I_PIO@GOTPAGEOFF]
Lloh76:
	ldr	w0, [x8]
	add	x1, x20, #24
	bl	_test_bit
	cbz	x0, LBB0_55
LBB0_51:
Lloh77:
	adrp	x8, _IVTV_F_I_HAVE_WORK@GOTPAGE
Lloh78:
	ldr	x8, [x8, _IVTV_F_I_HAVE_WORK@GOTPAGEOFF]
Lloh79:
	ldr	w0, [x8]
	add	x1, x20, #24
	bl	_test_and_clear_bit
	cbz	x0, LBB0_53
; %bb.52:
	add	x0, x20, #20
	add	x1, x20, #16
	bl	_kthread_queue_work
LBB0_53:
	mov	x0, x19
	bl	_spin_unlock
Lloh80:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh81:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh82:
	adrp	x9, _IRQ_HANDLED@GOTPAGE
Lloh83:
	ldr	x9, [x9, _IRQ_HANDLED@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x8, x9, eq
LBB0_54:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_55:
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
Lloh84:
	adrp	x22, _IVTV_MAX_STREAMS@GOTPAGE
Lloh85:
	ldr	x22, [x22, _IVTV_MAX_STREAMS@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w9, #1
	b.lt	LBB0_51
; %bb.56:
	sdiv	w10, w8, w9
	msub	w25, w10, w9, w8
	ldr	x23, [x20, #32]
Lloh86:
	adrp	x24, _IVTV_F_S_PIO_PENDING@GOTPAGE
Lloh87:
	ldr	x24, [x24, _IVTV_F_S_PIO_PENDING@GOTPAGEOFF]
	ldr	w0, [x24]
	add	x8, x23, w25, sxtw #4
	add	x1, x8, #8
	bl	_test_and_clear_bit
	cbz	x0, LBB0_58
; %bb.57:
	sxtw	x8, w25
	b	LBB0_62
LBB0_58:
	mov	w25, #1
LBB0_59:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmp	w25, w8
	b.ge	LBB0_51
; %bb.60:                               ;   in Loop: Header=BB0_59 Depth=1
	ldr	w9, [x20, #8]
	add	w9, w25, w9
	sdiv	w10, w9, w8
	msub	w26, w10, w8, w9
	ldr	x23, [x20, #32]
	ldr	w0, [x24]
	add	x8, x23, w26, sxtw #4
	add	x1, x8, #8
	bl	_test_and_clear_bit
	add	w25, w25, #1
	cbz	x0, LBB0_59
; %bb.61:
	sxtw	x8, w26
LBB0_62:
	add	x0, x23, x8, lsl #4
	ldr	x8, [x0]
Lloh88:
	adrp	x9, _IVTV_DEC_STREAM_TYPE_VBI@GOTPAGE
Lloh89:
	ldr	x9, [x9, _IVTV_DEC_STREAM_TYPE_VBI@GOTPAGEOFF]
Lloh90:
	ldr	x9, [x9]
Lloh91:
	adrp	x10, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGE
Lloh92:
	ldr	x10, [x10, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGEOFF]
Lloh93:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #8, ne
	b.ge	LBB0_51
; %bb.63:
	bl	_ivtv_dma_enc_start
	b	LBB0_51
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGot	Lloh82, Lloh83
	.loh AdrpLdrGot	Lloh80, Lloh81
	.loh AdrpLdrGot	Lloh84, Lloh85
	.loh AdrpLdrGot	Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh91, Lloh92, Lloh93
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.cfi_endproc
                                        ; -- End function
	.comm	_IVTV_REG_IRQSTATUS,4,2         ; @IVTV_REG_IRQSTATUS
	.comm	_IVTV_IRQ_DEC_VSYNC,4,2         ; @IVTV_IRQ_DEC_VSYNC
	.comm	_IVTV_REG_DEC_LINE_FIELD,4,2    ; @IVTV_REG_DEC_LINE_FIELD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VSync interrupt missed %d\n"

	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
l_.str.1:                               ; @.str.1
	.asciz	"======= valid IRQ bits: 0x%08x ======\n"

	.comm	_IVTV_IRQ_DEC_DMA_COMPLETE,4,2  ; @IVTV_IRQ_DEC_DMA_COMPLETE
l_.str.2:                               ; @.str.2
	.asciz	"DEC DMA COMPLETE\n"

	.comm	_IVTV_IRQ_DMA_READ,4,2          ; @IVTV_IRQ_DMA_READ
	.comm	_IVTV_IRQ_ENC_DMA_COMPLETE,4,2  ; @IVTV_IRQ_ENC_DMA_COMPLETE
	.comm	_IVTV_IRQ_ENC_PIO_COMPLETE,4,2  ; @IVTV_IRQ_ENC_PIO_COMPLETE
	.comm	_IVTV_IRQ_DMA_ERR,4,2           ; @IVTV_IRQ_DMA_ERR
	.comm	_IVTV_IRQ_ENC_START_CAP,4,2     ; @IVTV_IRQ_ENC_START_CAP
	.comm	_IVTV_IRQ_ENC_VBI_CAP,4,2       ; @IVTV_IRQ_ENC_VBI_CAP
	.comm	_IVTV_IRQ_DEC_VBI_RE_INSERT,4,2 ; @IVTV_IRQ_DEC_VBI_RE_INSERT
	.comm	_IVTV_IRQ_ENC_EOS,4,2           ; @IVTV_IRQ_ENC_EOS
l_.str.3:                               ; @.str.3
	.asciz	"ENC EOS\n"

	.comm	_IVTV_F_I_EOS,4,2               ; @IVTV_F_I_EOS
	.comm	_IVTV_IRQ_DEC_DATA_REQ,4,2      ; @IVTV_IRQ_DEC_DATA_REQ
	.comm	_IVTV_IRQ_ENC_VIM_RST,4,2       ; @IVTV_IRQ_ENC_VIM_RST
l_.str.4:                               ; @.str.4
	.asciz	"VIM RST\n"

	.comm	_IVTV_IRQ_DEC_AUD_MODE_CHG,4,2  ; @IVTV_IRQ_DEC_AUD_MODE_CHG
l_.str.5:                               ; @.str.5
	.asciz	"Stereo mode changed\n"

	.comm	_IVTV_IRQ_DMA,4,2               ; @IVTV_IRQ_DMA
	.comm	_IVTV_F_I_DMA,4,2               ; @IVTV_F_I_DMA
	.comm	_IVTV_MAX_STREAMS,4,2           ; @IVTV_MAX_STREAMS
	.comm	_IVTV_F_S_DMA_PENDING,4,2       ; @IVTV_F_S_DMA_PENDING
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,8,3   ; @IVTV_DEC_STREAM_TYPE_MPG
	.comm	_IVTV_F_I_UDMA_PENDING,4,2      ; @IVTV_F_I_UDMA_PENDING
	.comm	_IVTV_F_I_PIO,4,2               ; @IVTV_F_I_PIO
	.comm	_IVTV_F_S_PIO_PENDING,4,2       ; @IVTV_F_S_PIO_PENDING
	.comm	_IVTV_DEC_STREAM_TYPE_VBI,8,3   ; @IVTV_DEC_STREAM_TYPE_VBI
	.comm	_IVTV_F_I_HAVE_WORK,4,2         ; @IVTV_F_I_HAVE_WORK
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
.subsections_via_symbols
