	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function session_process_buf
_session_process_buf:                   ## @session_process_buf
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_to_venus_buffer
	movq	%rax, %rbx
	movl	8(%r15), %r12d
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	4(%rbx), %eax
	movl	%eax, -44(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -48(%rbp)
	movl	28(%r15), %edi
	movl	%edi, -52(%rbp)
	movq	_NSEC_PER_USEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_do_div
	movl	$0, -60(%rbp)
	movl	24(%r15), %eax
	movl	%eax, -56(%rbp)
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_6
## %bb.1:
	leaq	8(%r15), %rdi
	movq	_HFI_BUFFER_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	xorl	%esi, %esi
	callq	_vb2_get_plane_payload
	movq	%rax, -72(%rbp)
	movq	16(%r15), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -80(%rbp)
	movq	_V4L2_BUF_FLAG_LAST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r15)
	jne	LBB0_3
## %bb.2:
	testq	%rax, %rax
	jne	LBB0_4
LBB0_3:
	movq	_HFI_BUFFERFLAG_EOS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -60(%rbp)
LBB0_4:
	movq	(%r14), %rax
	movq	_VIDC_SESSION_TYPE_DEC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_put_ts_metadata
	jmp	LBB0_11
LBB0_6:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_11
## %bb.7:
	movq	(%r14), %rax
	movq	_VIDC_SESSION_TYPE_ENC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.9:
	movq	_HFI_BUFFER_OUTPUT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	leaq	8(%r14), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
LBB0_11:
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	callq	_hfi_session_process_buf
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NSEC_PER_USEC,4,2              ## @NSEC_PER_USEC
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_HFI_BUFFER_INPUT,4,2           ## @HFI_BUFFER_INPUT
	.comm	_V4L2_BUF_FLAG_LAST,4,2         ## @V4L2_BUF_FLAG_LAST
	.comm	_HFI_BUFFERFLAG_EOS,4,2         ## @HFI_BUFFERFLAG_EOS
	.comm	_VIDC_SESSION_TYPE_DEC,8,3      ## @VIDC_SESSION_TYPE_DEC
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_VIDC_SESSION_TYPE_ENC,8,3      ## @VIDC_SESSION_TYPE_ENC
	.comm	_HFI_BUFFER_OUTPUT,4,2          ## @HFI_BUFFER_OUTPUT
	.no_dead_strip	_session_process_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function session_process_buf
_session_process_buf:                   ; @session_process_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_to_venus_buffer
	mov	x22, x0
	mov	x21, x20
	ldr	w23, [x21, #8]!
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	d0, [x22]
	str	d0, [sp, #40]
	ldr	w0, [x21, #20]
	str	w0, [sp, #36]
Lloh0:
	adrp	x8, _NSEC_PER_USEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NSEC_PER_USEC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_do_div
	ldr	w8, [x21, #16]
	stp	wzr, w8, [sp, #28]
Lloh3:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_6
; %bb.1:
Lloh6:
	adrp	x8, _HFI_BUFFER_INPUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HFI_BUFFER_INPUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	x0, x21
	mov	w1, #0
	bl	_vb2_get_plane_payload
	str	x0, [sp, #16]
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _V4L2_BUF_FLAG_LAST@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_BUF_FLAG_LAST@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	cbnz	x0, LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _HFI_BUFFERFLAG_EOS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HFI_BUFFERFLAG_EOS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [sp, #28]
	orr	w8, w9, w8
	str	w8, [sp, #28]
LBB0_4:
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _VIDC_SESSION_TYPE_DEC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _VIDC_SESSION_TYPE_DEC@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_put_ts_metadata
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_8
; %bb.7:
	mov	x8, x19
	ldr	x9, [x8], #8
Lloh21:
	adrp	x10, _VIDC_SESSION_TYPE_ENC@GOTPAGE
Lloh22:
	ldr	x10, [x10, _VIDC_SESSION_TYPE_ENC@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
Lloh24:
	adrp	x11, _HFI_BUFFER_OUTPUT@GOTPAGE
Lloh25:
	ldr	x11, [x11, _HFI_BUFFER_OUTPUT@GOTPAGEOFF]
	cmp	x9, x10
	csel	x8, x11, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #24]
	stp	xzr, xzr, [sp, #8]
LBB0_8:
	add	x1, sp, #8
	mov	x0, x19
	bl	_hfi_session_process_buf
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_NSEC_PER_USEC,4,2              ; @NSEC_PER_USEC
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_HFI_BUFFER_INPUT,4,2           ; @HFI_BUFFER_INPUT
	.comm	_V4L2_BUF_FLAG_LAST,4,2         ; @V4L2_BUF_FLAG_LAST
	.comm	_HFI_BUFFERFLAG_EOS,4,2         ; @HFI_BUFFERFLAG_EOS
	.comm	_VIDC_SESSION_TYPE_DEC,8,3      ; @VIDC_SESSION_TYPE_DEC
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_VIDC_SESSION_TYPE_ENC,8,3      ; @VIDC_SESSION_TYPE_ENC
	.comm	_HFI_BUFFER_OUTPUT,4,2          ; @HFI_BUFFER_OUTPUT
	.no_dead_strip	_session_process_buf
.subsections_via_symbols
