	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw5864_h264_isr
_tw5864_h264_isr:                       ## @tw5864_h264_isr
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_TW5864_DSP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tw_readl
	movl	%eax, %ebx
	movq	_TW5864_DSP_ENC_CHN@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	48(%r12), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	8(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movslq	(%r12), %rcx
	leal	1(%rcx), %eax
	movq	_H264_BUF_CNT@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	movq	40(%r12), %r13
	leaq	(%rcx,%rcx,4), %r15
	leaq	(,%r15,8), %rax
	addq	%r13, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	4(%r12), %edx
	jne	LBB0_1
## %bb.2:
	movq	24(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_3
LBB0_1:
	movslq	%ebx, %rax
	movslq	%edx, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(,%rcx,8), %rcx
	addq	%r13, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax,2), %r14
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%r14,8), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_TW5864_VLC_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_tw_readl
	shll	$2, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_TW5864_VLC_CRC_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tw_readl
	movl	%eax, 4(%r13,%r15,8)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%r13,%r15,8)
	xorl	%eax, %eax
	callq	_ktime_get_ns
	movl	%eax, 28(%r13,%r15,8)
	movl	20(%rbx,%r14,8), %eax
	movl	%eax, 24(%r13,%r15,8)
	movq	(%rbx,%r14,8), %rax
	movq	%rax, 8(%r13,%r15,8)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	leaq	32(%r12), %rdi
	callq	_tasklet_schedule
	leaq	(%rbx,%r14,8), %r15
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_spin_lock
	incl	20(%rbx,%r14,8)
	movq	(%rbx,%r14,8), %rax
	incq	%rax
	cmpq	8(%rbx,%r14,8), %rax
	movl	$0, %ecx
	cmovlq	%rax, %rcx
	movq	%rcx, (%rbx,%r14,8)
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_3:
	movq	$0, 16(%r12)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_TW5864_VLC_STREAM_BASE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%rbx), %esi
	callq	_tw_writel
	movq	_TW5864_MV_STREAM_BASE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%rbx), %esi
	callq	_tw_writel
	movq	_TW5864_VLC_DSP_INTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_tw_writel
	movq	_TW5864_PCI_INTR_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TW5864_VLC_DONE_INTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tw_writel                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TW5864_DSP,4,2                 ## @TW5864_DSP
	.comm	_TW5864_DSP_ENC_CHN,4,2         ## @TW5864_DSP_ENC_CHN
	.comm	_H264_BUF_CNT,4,2               ## @H264_BUF_CNT
	.comm	_TW5864_VLC_LENGTH,4,2          ## @TW5864_VLC_LENGTH
	.comm	_TW5864_VLC_CRC_REG,4,2         ## @TW5864_VLC_CRC_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Skipped frame on input %d because all buffers busy\n"

	.comm	_TW5864_VLC_STREAM_BASE_ADDR,4,2 ## @TW5864_VLC_STREAM_BASE_ADDR
	.comm	_TW5864_MV_STREAM_BASE_ADDR,4,2 ## @TW5864_MV_STREAM_BASE_ADDR
	.comm	_TW5864_VLC_DSP_INTR,4,2        ## @TW5864_VLC_DSP_INTR
	.comm	_TW5864_PCI_INTR_STATUS,4,2     ## @TW5864_PCI_INTR_STATUS
	.comm	_TW5864_VLC_DONE_INTR,4,2       ## @TW5864_VLC_DONE_INTR
	.no_dead_strip	_tw5864_h264_isr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw5864_h264_isr
_tw5864_h264_isr:                       ; @tw5864_h264_isr
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
Lloh0:
	adrp	x8, _TW5864_DSP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TW5864_DSP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_tw_readl
Lloh3:
	adrp	x8, _TW5864_DSP_ENC_CHN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TW5864_DSP_ENC_CHN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w21, w8, w0
	ldr	x25, [x19, #48]
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldp	w23, w8, [x19]
                                        ; kill: def $w23 killed $w23 def $x23
	sxtw	x23, w23
	add	w9, w23, #1
Lloh6:
	adrp	x10, _H264_BUF_CNT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _H264_BUF_CNT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	sdiv	w11, w9, w10
	msub	w24, w11, w10, w9
	ldr	x26, [x19, #40]
	mov	w27, #40
	madd	x22, x23, x27, x26
	cmp	w24, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	x0, [x19, #24]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_3
LBB0_2:
	smaddl	x28, w24, w27, x26
	mov	w8, #24
	smaddl	x25, w21, w8, x25
Lloh11:
	adrp	x8, _TW5864_VLC_LENGTH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TW5864_VLC_LENGTH@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_tw_readl
	lsl	w8, w0, #2
	str	w8, [x22]
Lloh14:
	adrp	x8, _TW5864_VLC_CRC_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TW5864_VLC_CRC_REG@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_tw_readl
	madd	x21, x23, x27, x26
	str	w0, [x21, #4]
	str	x25, [x21, #32]
	bl	_ktime_get_ns
	ldr	w8, [x25, #20]
	stp	w8, w0, [x21, #24]
	ldr	x8, [x25]
	str	x8, [x21, #8]
	mov	x0, x19
	str	w24, [x0], #32
	bl	_tasklet_schedule
	add	x21, x25, #16
	mov	x0, x21
	bl	_spin_lock
	ldr	w8, [x25, #20]
	add	w8, w8, #1
	str	w8, [x25, #20]
	ldp	x8, x9, [x25]
	add	x10, x8, #1
	cmp	x10, x9
	csinc	x8, xzr, x8, ge
	str	x8, [x25]
	mov	x0, x21
	bl	_spin_unlock
	mov	x22, x28
LBB0_3:
	str	xzr, [x19, #16]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh17:
	adrp	x8, _TW5864_VLC_STREAM_BASE_ADDR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TW5864_VLC_STREAM_BASE_ADDR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w1, [x22, #20]
	bl	_tw_writel
Lloh20:
	adrp	x8, _TW5864_MV_STREAM_BASE_ADDR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TW5864_MV_STREAM_BASE_ADDR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	w1, [x22, #16]
	bl	_tw_writel
Lloh23:
	adrp	x8, _TW5864_VLC_DSP_INTR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TW5864_VLC_DSP_INTR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_tw_writel
Lloh26:
	adrp	x8, _TW5864_PCI_INTR_STATUS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TW5864_PCI_INTR_STATUS@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x8, _TW5864_VLC_DONE_INTR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TW5864_VLC_DONE_INTR@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_tw_writel
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_TW5864_DSP,4,2                 ; @TW5864_DSP
	.comm	_TW5864_DSP_ENC_CHN,4,2         ; @TW5864_DSP_ENC_CHN
	.comm	_H264_BUF_CNT,4,2               ; @H264_BUF_CNT
	.comm	_TW5864_VLC_LENGTH,4,2          ; @TW5864_VLC_LENGTH
	.comm	_TW5864_VLC_CRC_REG,4,2         ; @TW5864_VLC_CRC_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Skipped frame on input %d because all buffers busy\n"

	.comm	_TW5864_VLC_STREAM_BASE_ADDR,4,2 ; @TW5864_VLC_STREAM_BASE_ADDR
	.comm	_TW5864_MV_STREAM_BASE_ADDR,4,2 ; @TW5864_MV_STREAM_BASE_ADDR
	.comm	_TW5864_VLC_DSP_INTR,4,2        ; @TW5864_VLC_DSP_INTR
	.comm	_TW5864_PCI_INTR_STATUS,4,2     ; @TW5864_PCI_INTR_STATUS
	.comm	_TW5864_VLC_DONE_INTR,4,2       ; @TW5864_VLC_DONE_INTR
	.no_dead_strip	_tw5864_h264_isr
.subsections_via_symbols
