	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_vou_s_selection
_sh_vou_s_selection:                    ## @sh_vou_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	xorps	%xmm0, %xmm0
	movups	%xmm0, -184(%rbp)
	movups	%xmm0, -200(%rbp)
	movups	%xmm0, -216(%rbp)
	movq	$0, -168(%rbp)
	movq	_V4L2_SEL_TGT_COMPOSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -224(%rbp)
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -168(%rbp)
	movq	$0, -160(%rbp)
	movq	_MEDIA_BUS_FMT_YUYV8_2X8@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	movq	%rdx, -152(%rbp)
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, -132(%rbp)
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, -128(%rbp)
	movups	%xmm0, -120(%rbp)
	movl	%ecx, -104(%rbp)
	movq	(%rbx), %rcx
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	cmpq	%rax, 8(%rbx)
	jne	LBB0_2
## %bb.4:
	leaq	44(%r14), %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	movl	$576, %eax                      ## imm = 0x240
	movl	$480, %r13d                     ## imm = 0x1E0
	cmovel	%eax, %r13d
	leaq	16(%rbx), %r15
	movq	_VOU_MIN_IMAGE_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VOU_MAX_IMAGE_WIDTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	24(%rbx), %r8
	movq	_VOU_MIN_IMAGE_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	$1, %ecx
	pushq	$0
	pushq	$1
	pushq	%r13
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movq	16(%rbx), %rax
	movq	32(%rbx), %rdx
	addq	%rax, %rdx
	movq	_VOU_MAX_IMAGE_WIDTH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rdx
	jle	LBB0_8
## %bb.7:
	subq	%rax, %rcx
	movq	%rcx, 32(%rbx)
LBB0_8:
	movl	24(%rbx), %eax
	movl	40(%rbx), %ecx
	addl	%eax, %ecx
	cmpl	%r13d, %ecx
	jbe	LBB0_10
## %bb.9:
	movl	%r13d, %ecx
	subl	%eax, %ecx
	movl	%ecx, 40(%rbx)
LBB0_10:
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movups	%xmm1, -56(%rbp)
	movups	%xmm0, -72(%rbp)
	movl	52(%r14), %eax
	movl	%eax, -76(%rbp)
	movl	48(%r14), %eax
	movl	%eax, -80(%rbp)
	movq	-72(%rbp), %r15
	movq	%r15, -184(%rbp)
	movl	-64(%rbp), %r13d
	movl	%r13d, -176(%rbp)
	movq	%r14, %rbx
	addq	$40, %rbx
	movq	_pad@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_set_selection@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-224(%rbp), %r9
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_v4l2_device_call_until_err
	movq	%r15, -144(%rbp)
	movl	%r13d, -136(%rbp)
	movq	_pad@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_set_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-160(%rbp), %r9
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_v4l2_device_call_until_err
	testl	%eax, %eax
	js	LBB0_16
## %bb.11:
	movq	-144(%rbp), %rax
	movl	%eax, %ecx
	movq	_VOU_MAX_IMAGE_WIDTH@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jg	LBB0_14
## %bb.12:
	movl	-136(%rbp), %ecx
	cmpl	-96(%rbp), %ecx                 ## 4-byte Folded Reload
	ja	LBB0_14
## %bb.13:
	movq	-152(%rbp), %rdx
	cmpq	(%r12), %rdx
	jne	LBB0_14
## %bb.15:
	leaq	-72(%rbp), %rbx
	movq	%rax, -72(%rbp)
	movl	%ecx, -64(%rbp)
	movl	(%r14), %esi
	leaq	-88(%rbp), %rdi
	callq	_vou_adjust_input
	movups	(%rbx), %xmm0
	movups	16(%rbx), %xmm1
	movups	%xmm0, 8(%r14)
	movups	%xmm1, 24(%r14)
	movl	-76(%rbp), %eax
	movl	%eax, 52(%r14)
	movl	-80(%rbp), %eax
	movl	%eax, 48(%r14)
	movl	4(%r14), %esi
	movl	-88(%rbp), %ecx
	movl	-84(%rbp), %edx
	movq	%r14, %rdi
	callq	_sh_vou_configure_geometry
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_14:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_SEL_TGT_COMPOSE,8,3       ## @V4L2_SEL_TGT_COMPOSE
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_MEDIA_BUS_FMT_YUYV8_2X8,8,3    ## @MEDIA_BUS_FMT_YUYV8_2X8
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_VOU_MIN_IMAGE_WIDTH,4,2        ## @VOU_MIN_IMAGE_WIDTH
	.comm	_VOU_MAX_IMAGE_WIDTH,8,3        ## @VOU_MAX_IMAGE_WIDTH
	.comm	_VOU_MIN_IMAGE_HEIGHT,4,2       ## @VOU_MIN_IMAGE_HEIGHT
	.comm	_pad,4,2                        ## @pad
	.comm	_set_selection,4,2              ## @set_selection
	.comm	_set_fmt,4,2                    ## @set_fmt
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sh_vou_s_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_vou_s_selection
_sh_vou_s_selection:                    ; @sh_vou_s_selection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #288
	.cfi_def_cfa_offset 288
	stp	x28, x27, [sp, #192]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #208]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #224]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #240]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #256]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #272]            ; 16-byte Folded Spill
	add	x29, sp, #272
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	add	x21, sp, #128
	bl	_video_drvdata
	str	xzr, [sp, #184]
	movi.2d	v0, #0000000000000000
	stur	q0, [x21, #40]
	stur	q0, [x21, #24]
Lloh0:
	adrp	x8, _V4L2_SEL_TGT_COMPOSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_SEL_TGT_COMPOSE@GOTPAGEOFF]
	stur	q0, [sp, #136]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #128]
Lloh3:
	adrp	x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [sp, #184]
	mov	x22, x20
	ldr	x10, [x22], #16
Lloh6:
	adrp	x23, _MEDIA_BUS_FMT_YUYV8_2X8@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MEDIA_BUS_FMT_YUYV8_2X8@GOTPAGEOFF]
	ldr	x11, [x23]
	stp	xzr, x11, [sp, #16]
Lloh8:
	adrp	x11, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh9:
	ldr	x11, [x11, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
Lloh11:
	adrp	x12, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh12:
	ldr	x12, [x12, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh13:
	ldr	w12, [x12]
	stp	w11, w12, [sp, #44]
	stp	xzr, xzr, [sp, #56]
	str	w9, [sp, #72]
Lloh14:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x10, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	x9, [x20, #8]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.2:
	mov	x19, x0
	add	x0, x0, #44
	bl	_vb2_is_busy
	cbz	x0, LBB0_7
; %bb.3:
Lloh17:
	adrp	x8, _EBUSY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #272]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #256]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #240]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #224]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #208]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #192]            ; 16-byte Folded Reload
	add	sp, sp, #288
	ret
LBB0_7:
	ldr	w8, [x19]
Lloh21:
	adrp	x9, _V4L2_STD_525_60@GOTPAGE
Lloh22:
	ldr	x9, [x9, _V4L2_STD_525_60@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #480
	mov	w9, #576
	csel	w21, w9, w8, eq
Lloh24:
	adrp	x8, _VOU_MIN_IMAGE_WIDTH@GOTPAGE
Lloh25:
	ldr	x8, [x8, _VOU_MIN_IMAGE_WIDTH@GOTPAGEOFF]
Lloh26:
	adrp	x24, _VOU_MAX_IMAGE_WIDTH@GOTPAGE
Lloh27:
	ldr	x24, [x24, _VOU_MAX_IMAGE_WIDTH@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	x2, [x24]
	add	x4, x20, #24
Lloh29:
	adrp	x8, _VOU_MIN_IMAGE_HEIGHT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _VOU_MIN_IMAGE_HEIGHT@GOTPAGEOFF]
Lloh31:
	ldr	w5, [x8]
	str	wzr, [sp]
	mov	x0, x22
	mov	w3, #1
	mov	x6, x21
	mov	w7, #1
	bl	_v4l_bound_align_image
	ldr	x8, [x20, #16]
	ldr	x10, [x20, #32]
	ldr	x9, [x24]
	add	x10, x10, x8
	cmp	x10, x9
	b.le	LBB0_9
; %bb.8:
	sub	x8, x9, x8
	str	x8, [x20, #32]
LBB0_9:
	ldr	w8, [x20, #24]
	ldr	w9, [x20, #40]
	add	w9, w9, w8
	cmp	w9, w21
	b.ls	LBB0_11
; %bb.10:
	sub	w8, w21, w8
	str	w8, [x20, #40]
LBB0_11:
	ldp	q0, q1, [x22]
	stp	q0, q1, [sp, #96]
	ldr	d0, [x19, #48]
	str	d0, [sp, #88]
	ldr	x22, [sp, #96]
	str	x22, [sp, #168]
	ldr	w25, [sp, #104]
	str	w25, [sp, #176]
	add	x20, x19, #40
Lloh32:
	adrp	x26, _pad@GOTPAGE
Lloh33:
	ldr	x26, [x26, _pad@GOTPAGEOFF]
	ldr	w2, [x26]
Lloh34:
	adrp	x8, _set_selection@GOTPAGE
Lloh35:
	ldr	x8, [x8, _set_selection@GOTPAGEOFF]
Lloh36:
	ldr	w3, [x8]
	add	x5, sp, #128
	mov	x0, x20
	mov	w1, #0
	mov	x4, #0
	bl	_v4l2_device_call_until_err
	str	x22, [sp, #32]
	str	w25, [sp, #40]
	ldr	w2, [x26]
Lloh37:
	adrp	x8, _set_fmt@GOTPAGE
Lloh38:
	ldr	x8, [x8, _set_fmt@GOTPAGEOFF]
Lloh39:
	ldr	w3, [x8]
	add	x5, sp, #16
	mov	x0, x20
	mov	w1, #0
	mov	x4, #0
	bl	_v4l2_device_call_until_err
	tbnz	w0, #31, LBB0_6
; %bb.12:
	ldr	x8, [sp, #32]
	ldr	x9, [x24]
	cmp	x9, w8, uxtw
	b.lt	LBB0_16
; %bb.13:
	ldr	w9, [sp, #40]
	cmp	w9, w21
	b.hi	LBB0_16
; %bb.14:
	ldr	x10, [sp, #24]
	ldr	x11, [x23]
	cmp	x10, x11
	b.ne	LBB0_16
; %bb.15:
	add	x10, sp, #80
	add	x20, x10, #16
	str	x8, [sp, #96]
	str	w9, [sp, #104]
	ldr	w1, [x19]
	add	x0, sp, #80
	bl	_vou_adjust_input
	ldp	q1, q0, [x20]
	stur	q1, [x19, #8]
	stur	q0, [x19, #24]
	ldr	d0, [sp, #88]
	str	d0, [x19, #48]
	ldr	w1, [x19, #4]
	ldp	w3, w2, [sp, #80]
	mov	x0, x19
	bl	_sh_vou_configure_geometry
	mov	w0, #0
	b	LBB0_6
LBB0_16:
Lloh40:
	adrp	x8, _EIO@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh28
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_SEL_TGT_COMPOSE,8,3       ; @V4L2_SEL_TGT_COMPOSE
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_MEDIA_BUS_FMT_YUYV8_2X8,8,3    ; @MEDIA_BUS_FMT_YUYV8_2X8
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_VOU_MIN_IMAGE_WIDTH,4,2        ; @VOU_MIN_IMAGE_WIDTH
	.comm	_VOU_MAX_IMAGE_WIDTH,8,3        ; @VOU_MAX_IMAGE_WIDTH
	.comm	_VOU_MIN_IMAGE_HEIGHT,4,2       ; @VOU_MIN_IMAGE_HEIGHT
	.comm	_pad,4,2                        ; @pad
	.comm	_set_selection,4,2              ; @set_selection
	.comm	_set_fmt,4,2                    ; @set_fmt
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sh_vou_s_selection
.subsections_via_symbols
