	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw5864_handle_frame_task
_tw5864_handle_frame_task:              ## @tw5864_handle_frame_task
	.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	%rdi, %r15
	movq	_H264_BUF_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	addq	$16, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	(%r15), %rbx
	cmpq	8(%r15), %rbx
	je	LBB0_8
## %bb.1:
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.2:
	decl	%r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %r14
	leaq	(%r14,%rbx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movq	24(%r15), %rdi
	movl	4(%r14,%rbx,8), %esi
	movq	_H264_VLC_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	callq	_dma_sync_single_for_cpu
	movq	24(%r15), %rdi
	movl	(%r14,%rbx,8), %esi
	movq	_H264_MV_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %ecx
	callq	_dma_sync_single_for_cpu
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_tw5864_handle_frame
	movq	24(%r15), %rdi
	movl	4(%r14,%rbx,8), %esi
	movq	_H264_VLC_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %ecx
	callq	_dma_sync_single_for_device
	movq	24(%r15), %rdi
	movl	(%r14,%rbx,8), %esi
	movq	_H264_MV_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %ecx
	callq	_dma_sync_single_for_device
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_lock_irqsave
	movq	(%r15), %rax
	incq	%rax
	movq	_H264_BUF_CNT@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rbx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ebx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, (%r15)
	subl	$1, %r13d
	setb	%al
	cmpq	8(%r15), %rbx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	%al, %al
	je	LBB0_3
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_H264_BUF_CNT,4,2               ## @H264_BUF_CNT
	.comm	_H264_VLC_BUF_SIZE,4,2          ## @H264_VLC_BUF_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_H264_MV_BUF_SIZE,4,2           ## @H264_MV_BUF_SIZE
	.no_dead_strip	_tw5864_handle_frame_task
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw5864_handle_frame_task
_tw5864_handle_frame_task:              ; @tw5864_handle_frame_task
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _H264_BUF_CNT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _H264_BUF_CNT@GOTPAGEOFF]
	ldr	w21, [x22]
	add	x20, x0, #16
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldp	x8, x9, [x19]
	cmp	x8, x9
	ccmp	w21, #0, #4, ne
	b.eq	LBB0_3
; %bb.1:
	sub	w23, w21, #1
Lloh2:
	adrp	x24, _H264_VLC_BUF_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _H264_VLC_BUF_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x25, _DMA_FROM_DEVICE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh6:
	adrp	x26, _H264_MV_BUF_SIZE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _H264_MV_BUF_SIZE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #32]
	add	x21, x9, x8, lsl #3
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x0, [x19, #24]
	ldr	w1, [x21, #4]
	ldr	w2, [x24]
	ldr	w3, [x25]
	bl	_dma_sync_single_for_cpu
	ldr	x0, [x19, #24]
	ldr	w1, [x21]
	ldr	w2, [x26]
	ldr	w3, [x25]
	bl	_dma_sync_single_for_cpu
	mov	x0, x21
	bl	_tw5864_handle_frame
	ldr	x0, [x19, #24]
	ldr	w1, [x21, #4]
	ldr	w2, [x24]
	ldr	w3, [x25]
	bl	_dma_sync_single_for_device
	ldr	x0, [x19, #24]
	ldr	w1, [x21]
	ldr	w2, [x26]
	ldr	w3, [x25]
	bl	_dma_sync_single_for_device
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldp	x8, x9, [x19]
	add	x8, x8, #1
	ldrsw	x10, [x22]
	udiv	x11, x8, x10
	msub	x8, x11, x10, x8
	str	x8, [x19]
	cmp	x8, x9
	ccmp	w23, #0, #4, ne
	sub	w23, w23, #1
	b.ne	LBB0_2
LBB0_3:
	mov	x0, x20
	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	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_H264_BUF_CNT,4,2               ; @H264_BUF_CNT
	.comm	_H264_VLC_BUF_SIZE,4,2          ; @H264_VLC_BUF_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_H264_MV_BUF_SIZE,4,2           ; @H264_MV_BUF_SIZE
	.no_dead_strip	_tw5864_handle_frame_task
.subsections_via_symbols
