	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	callq	_DXVA_CONTEXT
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	_CUR_FRAME@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r13
	movl	(%r13), %edx
	movl	4(%r13), %esi
	callq	_memcpy
	movl	(%r13), %eax
	andl	$127, %eax
	movl	$128, %edi
	subl	%eax, %edi
	callq	_FFMIN
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_memset
	addl	%ebx, (%r13)
LBB0_2:
	movl	$0, (%rsp)
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r13, %r8
	movl	$4, %r9d
	callq	_ff_dxva2_commit_buffer
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CUR_FRAME,8,3                  ## @CUR_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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x0
	ldr	x22, [x0, #8]
	bl	_DXVA_CONTEXT
	mov	x21, x0
Lloh0:
	adrp	x8, _CUR_FRAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CUR_FRAME@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh2:
	ldr	x8, [x8]
	ldr	x22, [x9, x8, lsl #3]
	ldp	w2, w1, [x22]
	bl	_memcpy
	ldr	w8, [x22]
	and	w8, w8, #0x7f
	mov	w9, #128
	sub	w0, w9, w8
	bl	_FFMIN
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
	mov	w1, #0
	mov	x2, x0
	bl	_memset
	ldr	w8, [x22]
	add	w8, w8, w23
	str	w8, [x22]
LBB0_2:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x4, x22
	mov	w5, #4
	mov	w6, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ff_dxva2_commit_buffer
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CUR_FRAME,8,3                  ; @CUR_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
