	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function commit_bitstream_and_slice_buffer
_commit_bitstream_and_slice_buffer:     ## @commit_bitstream_and_slice_buffer
	.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	%rdx, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	callq	_DXVA_CONTEXT
	movq	%rax, %rsi
	movq	16(%rbx), %rax
	movq	(%rax), %r14
	movq	(%rbx), %rax
	movq	_PICT_FRAME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%cl
	movl	12(%rbx), %eax
	sarl	%cl, %eax
	imull	8(%rbx), %eax
	movl	(%r14), %r9d
	testl	%r9d, %r9d
	je	LBB0_1
## %bb.2:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
                                        ## implicit-def: $r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	subq	8(%rax,%r15), %rcx
	movq	%rcx, 8(%rax,%r15)
	shlq	$2, %rsi
	addq	16(%r14), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	leaq	(%r13,%rbx,4), %r13
	incq	%r12
	movl	(%r14), %r9d
	addq	$16, %r15
	cmpq	%r9, %r12
	jae	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%r15), %esi
	movl	4(%rax,%r15), %ecx
	leal	7(%rcx), %ebx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %ebx
	sarl	$3, %ebx
	movl	$0, (%rax,%r15)
	decl	%r9d
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%r9, %r12
	jae	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%rax,%r15), %rcx
	jmp	LBB0_5
LBB0_6:
	shll	$4, %r9d
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_7
LBB0_1:
	xorl	%r9d, %r9d
LBB0_7:
	movq	8(%r14), %r8
	movl	%eax, (%rsp)
	movq	%r12, %rdi
	movq	%r15, %rdx
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_ff_dxva2_commit_buffer
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PICT_FRAME,8,3                 ## @PICT_FRAME
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.comm	_AV_PIX_FMT_DXVA2_VLD,8,3       ## @AV_PIX_FMT_DXVA2_VLD
	.comm	_D3D11_VIDEO_DECODER_BUFFER_BITSTREAM,4,2 ## @D3D11_VIDEO_DECODER_BUFFER_BITSTREAM
	.comm	_D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL,4,2 ## @D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL
	.comm	_DXVA2_BitStreamDateBufferType,4,2 ## @DXVA2_BitStreamDateBufferType
	.comm	_DXVA2_SliceControlBufferType,4,2 ## @DXVA2_SliceControlBufferType
	.no_dead_strip	_commit_bitstream_and_slice_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function commit_bitstream_and_slice_buffer
_commit_bitstream_and_slice_buffer:     ; @commit_bitstream_and_slice_buffer
	.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, x2
	mov	x20, x0
	ldr	x22, [x0, #8]
	bl	_DXVA_CONTEXT
	mov	x21, x0
	ldr	x8, [x22, #16]
	ldr	x25, [x8]
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _PICT_FRAME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PICT_FRAME@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ne
	ldp	w9, w10, [x22, #8]
	asr	w8, w10, w8
	mul	w22, w8, w9
	ldr	w8, [x25]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x26, #0
	mov	x27, #0
                                        ; implicit-def: $x23
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	asr	w24, w11, #3
	ldr	x11, [x10, #8]
	sub	x8, x8, x11
	str	x8, [x10, #8]
	ldr	x8, [x25, #16]
	add	x1, x8, x9, lsl #2
	mov	x0, x23
	mov	x2, x24
	bl	_memcpy
	add	x23, x23, x24, lsl #2
	add	x27, x27, #1
	ldr	w8, [x25]
	add	x26, x26, #16
	cmp	x27, x8
	b.hs	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25, #8]
	add	x10, x9, x26
	ldp	w9, w11, [x10]
	add	w12, w11, #7
	cmp	w11, #0
	csel	w11, w12, w11, lt
	str	wzr, [x10]
	sub	w12, w8, #1
	mov	x8, x22
	cmp	x27, x12
	b.hs	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x10, #24]
	b	LBB0_2
LBB0_5:
	lsl	w5, w8, #4
	b	LBB0_7
LBB0_6:
	mov	w5, #0
LBB0_7:
	ldr	x4, [x25, #8]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x6, x22
	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	_ff_dxva2_commit_buffer
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PICT_FRAME,8,3                 ; @PICT_FRAME
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.comm	_AV_PIX_FMT_DXVA2_VLD,8,3       ; @AV_PIX_FMT_DXVA2_VLD
	.comm	_D3D11_VIDEO_DECODER_BUFFER_BITSTREAM,4,2 ; @D3D11_VIDEO_DECODER_BUFFER_BITSTREAM
	.comm	_D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL,4,2 ; @D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL
	.comm	_DXVA2_BitStreamDateBufferType,4,2 ; @DXVA2_BitStreamDateBufferType
	.comm	_DXVA2_SliceControlBufferType,4,2 ; @DXVA2_SliceControlBufferType
	.no_dead_strip	_commit_bitstream_and_slice_buffer
.subsections_via_symbols
