	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function coda_s_selection
_coda_s_selection:                      ## @coda_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_fh_to_ctx
	movq	%rax, %r14
	movl	(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_10
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_11
## %bb.3:
	movl	(%r14), %eax
	movq	_CODA_INST_ENCODER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.4:
	movl	32(%r12), %esi
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_10
## %bb.5:
	movq	%r14, %rdi
	callq	_get_q_data
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%rax, %r15
	leaq	8(%r12), %rbx
	movq	$0, 24(%r12)
	movq	16(%r12), %rdi
	movl	28(%rax), %edx
	movl	$2, %esi
	callq	_clamp
	movq	%rax, 16(%r12)
	movq	8(%r12), %rdi
	movl	24(%r15), %edx
	movl	$2, %esi
	callq	_clamp
	movq	%rax, 8(%r12)
	movq	_V4L2_SEL_FLAG_LE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r12), %rdi
	testl	%eax, 4(%r12)
	je	LBB0_8
## %bb.7:
	movl	$2, %esi
	callq	_round_up
	movq	%rax, 16(%r12)
	movq	8(%r12), %rdi
	movl	$2, %esi
	callq	_round_up
	jmp	LBB0_9
LBB0_10:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_coda_g_selection               ## TAILCALL
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	$2, %esi
	callq	_round_down
	movq	%rax, 16(%r12)
	movq	8(%r12), %rdi
	movl	$2, %esi
	callq	_round_down
LBB0_9:
	movq	%rax, 8(%r12)
	movq	16(%rbx), %rax
	movq	%rax, 16(%r15)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%r15)
	movq	8(%r12), %r8
	movq	16(%r12), %rcx
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	movq	%r14, %rsi
	callq	_coda_dbg
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_CODA_INST_ENCODER,4,2          ## @CODA_INST_ENCODER
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_SEL_FLAG_LE,4,2           ## @V4L2_SEL_FLAG_LE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting crop rectangle: %dx%d\n"

	.no_dead_strip	_coda_s_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function coda_s_selection
_coda_s_selection:                      ; @coda_s_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	x21, x1
	mov	x22, x0
	mov	x0, x1
	bl	_fh_to_ctx
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_8
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.3:
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _CODA_INST_ENCODER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CODA_INST_ENCODER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.4:
	ldr	w1, [x19, #32]
Lloh3:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ne	LBB0_8
; %bb.5:
	mov	x0, x20
	bl	_get_q_data
	cbz	x0, LBB0_9
; %bb.6:
	mov	x21, x0
	str	xzr, [x19, #24]
	ldr	x0, [x19, #16]
	ldr	w2, [x21, #28]
	mov	w1, #2
	bl	_clamp
	mov	x22, x19
	ldr	x8, [x22, #8]!
	str	x0, [x19, #16]
	ldr	w2, [x21, #24]
	mov	x0, x8
	mov	w1, #2
	bl	_clamp
	str	x0, [x22]
	ldur	w8, [x22, #-4]
Lloh6:
	adrp	x9, _V4L2_SEL_FLAG_LE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_SEL_FLAG_LE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ldr	x0, [x19, #16]
	mov	w1, #2
	tst	w9, w8
	b.eq	LBB0_11
; %bb.7:
	bl	_round_up
	str	x0, [x19, #16]
	ldr	x0, [x19, #8]
	mov	w1, #2
	bl	_round_up
	b	LBB0_12
LBB0_8:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	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
	b	_coda_g_selection
LBB0_9:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
LBB0_11:
	bl	_round_down
	str	x0, [x19, #16]
	ldr	x0, [x19, #8]
	mov	w1, #2
	bl	_round_down
LBB0_12:
	str	x0, [x19, #8]
	ldr	q0, [x22]
	ldr	x8, [x22, #16]
	str	x8, [x21, #16]
	str	q0, [x21]
	ldp	x4, x3, [x19, #8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	mov	x1, x20
	bl	_coda_dbg
	mov	w0, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CODA_INST_ENCODER,4,2          ; @CODA_INST_ENCODER
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_SEL_FLAG_LE,4,2           ; @V4L2_SEL_FLAG_LE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting crop rectangle: %dx%d\n"

	.no_dead_strip	_coda_s_selection
.subsections_via_symbols
