	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fimc_m2m_g_selection
_fimc_m2m_g_selection:                  ## @fimc_m2m_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rsi, %rdi
	callq	_fh_to_ctx
	movl	20(%r14), %esi
	movq	%rax, %rdi
	callq	_ctx_get_frame
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.13:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movl	(%r14), %eax
	leal	-131(%rax), %ecx
	cmpl	$3, %ecx
	jb	LBB0_6
## %bb.2:
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	ja	LBB0_5
## %bb.3:
	movl	20(%r14), %ecx
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_7
	jmp	LBB0_5
LBB0_6:
	movl	20(%r14), %ecx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_5
LBB0_7:
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_5
## %bb.8:
	movl	$27, %ecx
	btl	%eax, %ecx
	jae	LBB0_9
## %bb.10:
	movq	$0, 12(%r14)
	movl	4(%rbx), %eax
	movl	%eax, 8(%r14)
	movl	(%rbx), %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_11
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_9:
	movups	8(%rbx), %xmm0
	movups	%xmm0, 4(%r14)
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	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
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.no_dead_strip	_fimc_m2m_g_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fimc_m2m_g_selection
_fimc_m2m_g_selection:                  ; @fimc_m2m_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]
	bl	_ctx_get_frame
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	ldr	w8, [x19]
	sub	w9, w8, #131
	cmp	w9, #3
	b.lo	LBB0_5
; %bb.3:
	sub	w9, w8, #128
	cmp	w9, #2
	b.hi	LBB0_10
; %bb.4:
	ldr	w9, [x19, #20]
Lloh0:
	adrp	x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	w9, [x19, #20]
Lloh2:
	adrp	x10, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
LBB0_6:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_10
; %bb.7:
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_10
; %bb.8:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #27
	tst	w8, w9
	b.eq	LBB0_12
; %bb.9:
	mov	w0, #0
	stp	wzr, wzr, [x19, #12]
	ldr	d0, [x20]
	stur	d0, [x19, #4]
	b	LBB0_11
LBB0_10:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	w0, #0
	ldur	q0, [x20, #8]
	stur	q0, [x19, #4]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.no_dead_strip	_fimc_m2m_g_selection
.subsections_via_symbols
