	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_venc_g_selection
_vidioc_venc_g_selection:               ## @vidioc_venc_g_selection
	.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, %rbx
	movq	%rsi, %rdi
	callq	_fh_to_ctx
	movl	20(%rbx), %esi
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jne	LBB0_7
## %bb.1:
	movq	%rax, %rdi
	callq	_mtk_venc_get_q_data
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movl	(%rbx), %ecx
	leal	-128(%rcx), %edx
	cmpl	$2, %edx
	jae	LBB0_3
## %bb.5:
	movq	$0, 12(%rbx)
	movl	12(%rax), %ecx
	movl	%ecx, 8(%rbx)
	movl	8(%rax), %eax
	jmp	LBB0_6
LBB0_3:
	cmpl	$130, %ecx
	jne	LBB0_7
## %bb.4:
	movq	$0, 12(%rbx)
	movl	4(%rax), %ecx
	movl	%ecx, 8(%rbx)
	movl	(%rax), %eax
LBB0_6:
	movl	%eax, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vidioc_venc_g_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_venc_g_selection
_vidioc_venc_g_selection:               ; @vidioc_venc_g_selection
	.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
	mov	x19, x2
	mov	x0, x1
	bl	_fh_to_ctx
	ldr	w1, [x19, #20]
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ne	LBB0_6
; %bb.1:
	bl	_mtk_venc_get_q_data
	cbz	x0, LBB0_6
; %bb.2:
	mov	x8, x0
	ldr	w9, [x19]
	sub	w10, w9, #128
	cmp	w10, #2
	b.hs	LBB0_4
; %bb.3:
	mov	w0, #0
	stp	wzr, wzr, [x19, #12]
	ldr	d0, [x8, #8]
	stur	d0, [x19, #4]
	b	LBB0_7
LBB0_4:
	cmp	w9, #130
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	stp	wzr, wzr, [x19, #12]
	ldr	d0, [x8]
	stur	d0, [x19, #4]
	b	LBB0_7
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vidioc_venc_g_selection
.subsections_via_symbols
