	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fimc_cap_s_selection
_fimc_cap_s_selection:                  ## @fimc_cap_s_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	movq	8(%rax), %rdi
	movups	12(%rbx), %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movl	28(%rbx), %edx
	movq	_V4L2_SEL_TGT_COMPOSE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_5
## %bb.4:
	leaq	4(%rdi), %r15
	jmp	LBB0_7
LBB0_5:
	movq	_V4L2_SEL_TGT_CROP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_1
## %bb.6:
	movq	%rdi, %r15
LBB0_7:
	leaq	12(%rbx), %r12
	leaq	-48(%rbp), %rsi
	callq	_fimc_capture_try_selection
	movl	8(%rbx), %eax
	movq	_V4L2_SEL_FLAG_LE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.8:
	leaq	-48(%rbp), %rdi
	movq	%r12, %rsi
	callq	_enclosed_rectangle
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	movl	8(%rbx), %eax
LBB0_10:
	movq	_V4L2_SEL_FLAG_GE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.11:
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_enclosed_rectangle
	testl	%eax, %eax
	je	LBB0_12
LBB0_13:
	movaps	-48(%rbp), %xmm0
	movups	%xmm0, (%r12)
	movq	%r14, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	24(%rbx), %esi
	movl	20(%rbx), %edx
	movl	12(%rbx), %r8d
	movl	16(%rbx), %ecx
	movq	%r15, %rdi
	callq	_set_frame_crop
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_ST_CAPT_APPLY_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_12:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$16, %rsp
	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	_V4L2_SEL_TGT_COMPOSE,4,2       ## @V4L2_SEL_TGT_COMPOSE
	.comm	_V4L2_SEL_TGT_CROP,4,2          ## @V4L2_SEL_TGT_CROP
	.comm	_V4L2_SEL_FLAG_LE,4,2           ## @V4L2_SEL_FLAG_LE
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_V4L2_SEL_FLAG_GE,4,2           ## @V4L2_SEL_FLAG_GE
	.comm	_ST_CAPT_APPLY_CFG,4,2          ## @ST_CAPT_APPLY_CFG
	.no_dead_strip	_fimc_cap_s_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fimc_cap_s_selection
_fimc_cap_s_selection:                  ; @fimc_cap_s_selection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	bl	_video_drvdata
	mov	x19, x0
	ldr	x0, [x0, #8]
	ldur	q0, [x20, #12]
	str	q0, [sp]
	ldr	x8, [x20]
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_11
; %bb.1:
	ldr	w2, [x20, #28]
Lloh3:
	adrp	x8, _V4L2_SEL_TGT_COMPOSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_SEL_TGT_COMPOSE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_3
; %bb.2:
	add	x21, x0, #4
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _V4L2_SEL_TGT_CROP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_SEL_TGT_CROP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_11
; %bb.4:
	mov	x21, x0
LBB0_5:
	add	x22, x20, #12
	mov	x1, sp
	bl	_fimc_capture_try_selection
	ldr	w8, [x20, #8]
Lloh9:
	adrp	x9, _V4L2_SEL_FLAG_LE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_SEL_FLAG_LE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	mov	x0, sp
	mov	x1, x22
	bl	_enclosed_rectangle
	cbz	w0, LBB0_12
; %bb.7:
	ldr	w8, [x20, #8]
LBB0_8:
Lloh12:
	adrp	x9, _V4L2_SEL_FLAG_GE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_SEL_FLAG_GE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	mov	x1, sp
	mov	x0, x22
	bl	_enclosed_rectangle
	cbz	w0, LBB0_12
LBB0_10:
	ldr	q0, [sp]
	str	q0, [x22]
	add	x22, x19, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldp	w2, w1, [x20, #20]
	ldp	w4, w3, [x20, #12]
	mov	x0, x21
	bl	_set_frame_crop
	mov	x0, x22
	bl	_spin_unlock_irqrestore
Lloh15:
	adrp	x8, _ST_CAPT_APPLY_CFG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ST_CAPT_APPLY_CFG@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
	mov	w0, #0
	b	LBB0_14
LBB0_11:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh20:
	adrp	x8, _ERANGE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	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
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_SEL_TGT_COMPOSE,4,2       ; @V4L2_SEL_TGT_COMPOSE
	.comm	_V4L2_SEL_TGT_CROP,4,2          ; @V4L2_SEL_TGT_CROP
	.comm	_V4L2_SEL_FLAG_LE,4,2           ; @V4L2_SEL_FLAG_LE
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_V4L2_SEL_FLAG_GE,4,2           ; @V4L2_SEL_FLAG_GE
	.comm	_ST_CAPT_APPLY_CFG,4,2          ; @ST_CAPT_APPLY_CFG
	.no_dead_strip	_fimc_cap_s_selection
.subsections_via_symbols
