	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_selection
_vidioc_s_selection:                    ## @vidioc_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %rdi
	movq	(%rsi), %r14
	movl	40(%rdx), %esi
	callq	_rga_get_frame
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.18:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_5
## %bb.3:
	movl	40(%rbx), %eax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_7
	jmp	LBB0_5
LBB0_6:
	movl	40(%rbx), %eax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
LBB0_7:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	js	LBB0_9
## %bb.8:
	movq	16(%rbx), %rdx
	testq	%rdx, %rdx
	js	LBB0_9
## %bb.11:
	movq	24(%rbx), %rcx
	addq	%rcx, %rdx
	cmpq	(%r15), %rdx
	jg	LBB0_15
## %bb.12:
	movq	32(%rbx), %rdx
	addq	%rdx, %rax
	cmpq	8(%r15), %rax
	jg	LBB0_15
## %bb.13:
	movq	_MIN_WIDTH@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jl	LBB0_15
## %bb.14:
	movq	_MIN_HEIGHT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jl	LBB0_15
## %bb.16:
	addq	$8, %rbx
	movups	(%rbx), %xmm0
	movups	16(%rbx), %xmm1
	movups	%xmm1, 32(%r15)
	movups	%xmm0, 16(%r15)
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_9:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rcx
	jmp	LBB0_10
LBB0_15:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rcx
LBB0_10:
	movl	$1, %esi
	movq	%r14, %rdx
	callq	_v4l2_dbg
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"doesn't support negative values for top & left.\n"

	.comm	_MIN_WIDTH,8,3                  ## @MIN_WIDTH
	.comm	_MIN_HEIGHT,8,3                 ## @MIN_HEIGHT
L_.str.1:                               ## @.str.1
	.asciz	"unsupported crop value.\n"

	.no_dead_strip	_vidioc_s_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_selection
_vidioc_s_selection:                    ; @vidioc_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	x21, x2
	mov	x0, x1
	ldr	x19, [x1]
	ldr	w1, [x2, #40]
	bl	_rga_get_frame
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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	_PTR_ERR
LBB0_2:
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_14
; %bb.4:
	ldr	w8, [x21, #40]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	w8, [x21, #40]
Lloh2:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
LBB0_6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.7:
	mov	x8, x21
	ldr	x9, [x8, #8]!
	tbnz	x9, #63, LBB0_12
; %bb.8:
	ldr	x11, [x21, #16]
	tbnz	x11, #63, LBB0_12
; %bb.9:
	ldr	x10, [x21, #24]
	ldr	x12, [x20]
	add	x11, x10, x11
	cmp	x11, x12
	b.gt	LBB0_11
; %bb.10:
	ldr	x11, [x21, #32]
	ldr	x12, [x20, #8]
Lloh4:
	adrp	x13, _MIN_WIDTH@GOTPAGE
Lloh5:
	ldr	x13, [x13, _MIN_WIDTH@GOTPAGEOFF]
Lloh6:
	adrp	x14, _MIN_HEIGHT@GOTPAGE
Lloh7:
	ldr	x14, [x14, _MIN_HEIGHT@GOTPAGEOFF]
Lloh8:
	ldr	x13, [x13]
Lloh9:
	ldr	x14, [x14]
	add	x9, x11, x9
	cmp	x9, x12
	ccmp	x10, x13, #8, le
	ccmp	x11, x14, #8, ge
	b.ge	LBB0_16
LBB0_11:
Lloh10:
	adrp	x8, _debug@GOTPAGE
Lloh11:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x3, l_.str.1@PAGE
Lloh14:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh15:
	adrp	x8, _debug@GOTPAGE
Lloh16:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
LBB0_13:
	mov	w1, #1
	mov	x2, x19
	bl	_v4l2_dbg
LBB0_14:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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_16:
	mov	w0, #0
	ldp	q0, q1, [x8]
	stp	q0, q1, [x20, #16]
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"doesn't support negative values for top & left.\n"

	.comm	_MIN_WIDTH,8,3                  ; @MIN_WIDTH
	.comm	_MIN_HEIGHT,8,3                 ; @MIN_HEIGHT
l_.str.1:                               ; @.str.1
	.asciz	"unsupported crop value.\n"

	.no_dead_strip	_vidioc_s_selection
.subsections_via_symbols
