	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hfi_session_ftb_done
_hfi_session_ftb_done:                  ## @hfi_session_ftb_done
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rax
	movq	%rsi, %rdi
	movq	(%rsi), %rcx
	movq	_VIDC_SESSION_TYPE_ENC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	movq	16(%rax), %r10
	movq	24(%rax), %r8
	movq	32(%rax), %rcx
	movq	40(%rax), %r11
	movq	48(%rax), %rdx
	movq	_HFI_BUFFER_OUTPUT@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	addq	$56, %rax
	jmp	LBB0_11
LBB0_2:
	movq	_VIDC_SESSION_TYPE_DEC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.4:
	movl	56(%rax), %ecx
	cmpl	$1, %ecx
	je	LBB0_8
## %bb.5:
	testl	%ecx, %ecx
	jne	LBB0_6
## %bb.7:
	movq	_HFI_BUFFER_OUTPUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_3:
	movq	$-1, %rdx
	movq	_HFI_ERR_SESSION_INVALID_PARAMETER@GOTPCREL(%rip), %rax
	xorl	%r10d, %r10d
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	xorl	%r11d, %r11d
	xorl	%esi, %esi
	jmp	LBB0_11
LBB0_8:
	movq	_HFI_BUFFER_OUTPUT2@GOTPCREL(%rip), %rcx
LBB0_9:
	movq	(%rcx), %rsi
	jmp	LBB0_10
LBB0_6:
	xorl	%esi, %esi
LBB0_10:
	movq	16(%rax), %r10
	movq	24(%rax), %r8
	movq	32(%rax), %rcx
	movq	40(%rax), %r11
	movq	48(%rax), %rdx
	addq	$60, %rax
LBB0_11:
	movl	(%rax), %ebx
	movq	_HFI_BUFFER_OUTPUT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_14
## %bb.12:
	movq	_HFI_BUFFER_OUTPUT2@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_14
## %bb.13:
	xorl	%r9d, %r9d
	jmp	LBB0_23
LBB0_14:
	movq	_HFI_BUFFERFLAG_EOS@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	andq	%r10, %r9
	je	LBB0_16
## %bb.15:
	movq	_V4L2_BUF_FLAG_LAST@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
LBB0_16:
	leaq	-130(%r11), %rax
	cmpq	$2, %rax
	jb	LBB0_20
## %bb.17:
	cmpq	$129, %r11
	je	LBB0_21
## %bb.18:
	cmpq	$132, %r11
	jne	LBB0_23
## %bb.19:
	movq	_V4L2_BUF_FLAG_BFRAME@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_20:
	movq	_V4L2_BUF_FLAG_KEYFRAME@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_21:
	movq	_V4L2_BUF_FLAG_PFRAME@GOTPCREL(%rip), %rax
LBB0_22:
	orq	(%rax), %r9
LBB0_23:
	movl	%ebx, 8(%rdi)
	movq	16(%rdi), %rax
	pushq	$0
	pushq	%r10
	callq	*(%rax)
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIDC_SESSION_TYPE_ENC,8,3      ## @VIDC_SESSION_TYPE_ENC
	.comm	_HFI_BUFFER_OUTPUT,8,3          ## @HFI_BUFFER_OUTPUT
	.comm	_VIDC_SESSION_TYPE_DEC,8,3      ## @VIDC_SESSION_TYPE_DEC
	.comm	_HFI_BUFFER_OUTPUT2,8,3         ## @HFI_BUFFER_OUTPUT2
	.comm	_HFI_ERR_SESSION_INVALID_PARAMETER,4,2 ## @HFI_ERR_SESSION_INVALID_PARAMETER
	.comm	_HFI_BUFFERFLAG_EOS,8,3         ## @HFI_BUFFERFLAG_EOS
	.comm	_V4L2_BUF_FLAG_LAST,8,3         ## @V4L2_BUF_FLAG_LAST
	.comm	_V4L2_BUF_FLAG_KEYFRAME,8,3     ## @V4L2_BUF_FLAG_KEYFRAME
	.comm	_V4L2_BUF_FLAG_PFRAME,8,3       ## @V4L2_BUF_FLAG_PFRAME
	.comm	_V4L2_BUF_FLAG_BFRAME,8,3       ## @V4L2_BUF_FLAG_BFRAME
	.comm	_HFI_BUFFERFLAG_TIMESTAMPINVALID,8,3 ## @HFI_BUFFERFLAG_TIMESTAMPINVALID
	.no_dead_strip	_hfi_session_ftb_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hfi_session_ftb_done
_hfi_session_ftb_done:                  ; @hfi_session_ftb_done
	.cfi_startproc
; %bb.0:
	mov	x8, x2
	mov	x0, x1
	ldr	x9, [x1]
Lloh0:
	adrp	x10, _VIDC_SESSION_TYPE_ENC@GOTPAGE
Lloh1:
	ldr	x10, [x10, _VIDC_SESSION_TYPE_ENC@GOTPAGEOFF]
Lloh2:
	ldr	x12, [x10]
Lloh3:
	adrp	x10, _HFI_BUFFER_OUTPUT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _HFI_BUFFER_OUTPUT@GOTPAGEOFF]
Lloh5:
	adrp	x11, _HFI_BUFFER_OUTPUT2@GOTPAGE
Lloh6:
	ldr	x11, [x11, _HFI_BUFFER_OUTPUT2@GOTPAGEOFF]
	cmp	x9, x12
	b.ne	LBB0_2
; %bb.1:
	ldp	x6, x4, [x8, #16]
	ldp	x3, x9, [x8, #32]
	ldr	x2, [x8, #48]
	add	x8, x8, #56
	ldr	x1, [x10]
	b	LBB0_10
LBB0_2:
Lloh7:
	adrp	x12, _VIDC_SESSION_TYPE_DEC@GOTPAGE
Lloh8:
	ldr	x12, [x12, _VIDC_SESSION_TYPE_DEC@GOTPAGEOFF]
Lloh9:
	ldr	x12, [x12]
	cmp	x9, x12
	b.ne	LBB0_6
; %bb.3:
	ldp	x6, x4, [x8, #16]
	ldp	x3, x9, [x8, #32]
	ldr	x2, [x8, #48]
	ldr	w12, [x8, #56]
	cmp	w12, #1
	b.eq	LBB0_7
; %bb.4:
	cbnz	w12, LBB0_8
; %bb.5:
	ldr	x1, [x10]
	b	LBB0_9
LBB0_6:
	mov	x6, #0
	mov	x4, #0
	mov	x3, #0
	mov	x9, #0
	mov	x1, #0
	mov	x2, #-1
Lloh10:
	adrp	x8, _HFI_ERR_SESSION_INVALID_PARAMETER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HFI_ERR_SESSION_INVALID_PARAMETER@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	ldr	x1, [x11]
	b	LBB0_9
LBB0_8:
	mov	x1, #0
LBB0_9:
	add	x8, x8, #60
LBB0_10:
	ldr	w8, [x8]
	ldr	x10, [x10]
	ldr	x11, [x11]
	cmp	x1, x10
	ccmp	x1, x11, #4, ne
	b.ne	LBB0_15
; %bb.11:
Lloh12:
	adrp	x10, _HFI_BUFFERFLAG_EOS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _HFI_BUFFERFLAG_EOS@GOTPAGEOFF]
Lloh14:
	adrp	x11, _V4L2_BUF_FLAG_LAST@GOTPAGE
Lloh15:
	ldr	x11, [x11, _V4L2_BUF_FLAG_LAST@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
Lloh17:
	ldr	x11, [x11]
	tst	x10, x6
	csel	x5, xzr, x11, eq
	sub	x10, x9, #130
	cmp	x10, #2
	b.lo	LBB0_16
; %bb.12:
	cmp	x9, #129
	b.eq	LBB0_17
; %bb.13:
	cmp	x9, #132
	b.ne	LBB0_19
; %bb.14:
Lloh18:
	adrp	x9, _V4L2_BUF_FLAG_BFRAME@GOTPAGE
Lloh19:
	ldr	x9, [x9, _V4L2_BUF_FLAG_BFRAME@GOTPAGEOFF]
	b	LBB0_18
LBB0_15:
	mov	x5, #0
	b	LBB0_19
LBB0_16:
Lloh20:
	adrp	x9, _V4L2_BUF_FLAG_KEYFRAME@GOTPAGE
Lloh21:
	ldr	x9, [x9, _V4L2_BUF_FLAG_KEYFRAME@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh22:
	adrp	x9, _V4L2_BUF_FLAG_PFRAME@GOTPAGE
Lloh23:
	ldr	x9, [x9, _V4L2_BUF_FLAG_PFRAME@GOTPAGEOFF]
LBB0_18:
	ldr	x9, [x9]
	orr	x5, x9, x5
LBB0_19:
	str	w8, [x0, #8]
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	mov	w7, #0
	br	x8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_VIDC_SESSION_TYPE_ENC,8,3      ; @VIDC_SESSION_TYPE_ENC
	.comm	_HFI_BUFFER_OUTPUT,8,3          ; @HFI_BUFFER_OUTPUT
	.comm	_VIDC_SESSION_TYPE_DEC,8,3      ; @VIDC_SESSION_TYPE_DEC
	.comm	_HFI_BUFFER_OUTPUT2,8,3         ; @HFI_BUFFER_OUTPUT2
	.comm	_HFI_ERR_SESSION_INVALID_PARAMETER,4,2 ; @HFI_ERR_SESSION_INVALID_PARAMETER
	.comm	_HFI_BUFFERFLAG_EOS,8,3         ; @HFI_BUFFERFLAG_EOS
	.comm	_V4L2_BUF_FLAG_LAST,8,3         ; @V4L2_BUF_FLAG_LAST
	.comm	_V4L2_BUF_FLAG_KEYFRAME,8,3     ; @V4L2_BUF_FLAG_KEYFRAME
	.comm	_V4L2_BUF_FLAG_PFRAME,8,3       ; @V4L2_BUF_FLAG_PFRAME
	.comm	_V4L2_BUF_FLAG_BFRAME,8,3       ; @V4L2_BUF_FLAG_BFRAME
	.comm	_HFI_BUFFERFLAG_TIMESTAMPINVALID,8,3 ; @HFI_BUFFERFLAG_TIMESTAMPINVALID
	.no_dead_strip	_hfi_session_ftb_done
.subsections_via_symbols
