	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coda_bitstream_flush           ## -- Begin function coda_bitstream_flush
	.p2align	4, 0x90
_coda_bitstream_flush:                  ## @coda_bitstream_flush
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_CODA_INST_DECODER@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, 32(%rdi)
	je	LBB0_5
## %bb.2:
	movq	_CODA_COMMAND_DEC_BUF_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_coda_command_sync
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	leaq	16(%rbx), %rdi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	callq	_kfifo_init
	movq	%rbx, %rdi
	callq	_coda_kfifo_sync_to_device_full
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %r15d
	movq	24(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_v4l2_err
	movl	%r15d, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CODA_INST_DECODER,8,3          ## @CODA_INST_DECODER
	.comm	_CODA_COMMAND_DEC_BUF_FLUSH,4,2 ## @CODA_COMMAND_DEC_BUF_FLUSH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to flush bitstream\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coda_bitstream_flush           ; -- Begin function coda_bitstream_flush
	.p2align	2
_coda_bitstream_flush:                  ; @coda_bitstream_flush
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CODA_INST_DECODER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CODA_INST_DECODER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #32]
	cbz	w8, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _CODA_COMMAND_DEC_BUF_FLUSH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CODA_COMMAND_DEC_BUF_FLUSH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_coda_command_sync
	tbnz	w0, #31, LBB0_6
; %bb.3:
	add	x0, x19, #16
	ldp	w2, w1, [x19, #8]
	bl	_kfifo_init
	mov	x0, x19
	bl	_coda_kfifo_sync_to_device_full
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x20, x0
	ldr	x0, [x19, #24]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_v4l2_err
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CODA_INST_DECODER,8,3          ; @CODA_INST_DECODER
	.comm	_CODA_COMMAND_DEC_BUF_FLUSH,4,2 ; @CODA_COMMAND_DEC_BUF_FLUSH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to flush bitstream\n"

.subsections_via_symbols
