	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_vdec_g_selection
_vidioc_vdec_g_selection:               ## @vidioc_vdec_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %rdi
	callq	_fh_to_ctx
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	24(%r14), %r15
	movq	_MTK_Q_DATA_DST@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	8(%rbx), %eax
	cmpl	$130, %eax
	je	LBB0_6
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$128, %eax
	jne	LBB0_1
## %bb.5:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 20(%rbx)
	movl	16(%r14), %eax
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_6:
	movq	_GET_PARAM_CROP_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	16(%rbx), %rdx
	movq	%r14, %rdi
	callq	_vdec_if_get_param
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movl	4(%r15,%r12,8), %eax
	movl	%eax, 20(%rbx)
	movl	(%r15,%r12,8), %eax
	jmp	LBB0_9
LBB0_8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movl	12(%r14), %eax
	movl	%eax, 20(%rbx)
	movl	8(%r14), %eax
LBB0_9:
	movl	%eax, 16(%rbx)
LBB0_10:
	movq	(%r14), %rcx
	movq	_MTK_STATE_HEADER@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jge	LBB0_12
## %bb.11:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movl	4(%r15,%r12,8), %ecx
	movl	%ecx, 20(%rbx)
	movl	(%r15,%r12,8), %ecx
	movl	%ecx, 16(%rbx)
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MTK_Q_DATA_DST,8,3             ## @MTK_Q_DATA_DST
	.comm	_GET_PARAM_CROP_INFO,4,2        ## @GET_PARAM_CROP_INFO
	.comm	_MTK_STATE_HEADER,8,3           ## @MTK_STATE_HEADER
	.no_dead_strip	_vidioc_vdec_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_vdec_g_selection
_vidioc_vdec_g_selection:               ; @vidioc_vdec_g_selection
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x0, x1
	bl	_fh_to_ctx
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x21, [x0, #24]
Lloh3:
	adrp	x8, _MTK_Q_DATA_DST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTK_Q_DATA_DST@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
	ldr	w8, [x19, #8]
	cmp	w8, #130
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #129
	b.eq	LBB0_8
; %bb.3:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.4:
	stp	xzr, xzr, [x19, #24]
	ldr	d0, [x20, #16]
	b	LBB0_9
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_6:
Lloh9:
	adrp	x8, _GET_PARAM_CROP_INFO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GET_PARAM_CROP_INFO@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, x19, #16
	mov	x0, x20
	bl	_vdec_if_get_param
	cbz	w0, LBB0_10
; %bb.7:
	stp	xzr, xzr, [x19, #24]
	ldr	d0, [x21, x22, lsl #3]
	b	LBB0_9
LBB0_8:
	stp	xzr, xzr, [x19, #24]
	ldr	d0, [x20, #8]
LBB0_9:
	str	d0, [x19, #16]
LBB0_10:
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _MTK_STATE_HEADER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MTK_STATE_HEADER@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_12
; %bb.11:
	mov	w0, #0
	stp	xzr, xzr, [x19, #24]
	ldr	d0, [x21, x22, lsl #3]
	str	d0, [x19, #16]
	b	LBB0_13
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MTK_Q_DATA_DST,8,3             ; @MTK_Q_DATA_DST
	.comm	_GET_PARAM_CROP_INFO,4,2        ; @GET_PARAM_CROP_INFO
	.comm	_MTK_STATE_HEADER,8,3           ; @MTK_STATE_HEADER
	.no_dead_strip	_vidioc_vdec_g_selection
.subsections_via_symbols
