	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpbe_display_s_selection
_vpbe_display_s_selection:              ## @vpbe_display_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	callq	_video_drvdata
	movq	%rax, %r13
	movq	48(%rax), %r14
	movq	(%r14), %r12
	movq	8(%r14), %rbx
	movq	32(%r15), %rax
	movq	%rax, -48(%rbp)
	movups	16(%r15), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	40(%r13), %r8d
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, %rdx
	callq	_v4l2_dbg
	movq	(%r15), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.1:
	movq	8(%r15), %rax
	movq	_V4L2_SEL_TGT_CROP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.2:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	cmpq	$0, -64(%rbp)
	jns	LBB0_4
## %bb.3:
	movq	$0, -64(%rbp)
LBB0_4:
	movq	%r13, %r12
	addq	$36, %r12
	cmpq	$0, -56(%rbp)
	jns	LBB0_6
## %bb.5:
	movq	$0, -56(%rbp)
LBB0_6:
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	_vpbe_disp_check_window_params
	movl	32(%r13), %esi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	*32(%rbx)
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %edx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_vpbe_disp_calculate_scale_factor
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_vpbe_disp_adj_position
	movl	32(%r13), %esi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	*(%rbx)
	testl	%eax, %eax
	js	LBB0_13
## %bb.7:
	movl	32(%r13), %esi
	movq	(%r13), %rdx
	movq	8(%r13), %rcx
	movq	%rbx, %rdi
	callq	*24(%rbx)
	movq	16(%r13), %rsi
	movq	24(%r13), %rdx
	movq	%rbx, %rdi
	callq	*8(%rbx)
	testl	%eax, %eax
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	js	LBB0_14
## %bb.8:
	addq	$16, %r15
	movq	(%r13), %rax
	movq	_ZOOM_X1@GOTPCREL(%rip), %rcx
	movl	$1, %esi
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	cmpq	%rax, 8(%r13)
	jne	LBB0_12
## %bb.10:
	movq	16(%r13), %rax
	movq	_H_EXP_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movq	24(%r13), %rax
	movq	_V_EXP_OFF@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	setne	%sil
LBB0_12:
	movq	%rbx, %rdi
	callq	*16(%rbx)
	movaps	-64(%rbp), %xmm0
	movups	%xmm0, (%r15)
	movq	-48(%rbp), %rax
	movq	%rax, 16(%r15)
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_13:
	leaq	L_.str.1(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.2(%rip), %rsi
LBB0_15:
	callq	_v4l2_err
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VIDIOC_S_SELECTION, layer id = %d\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_V4L2_SEL_TGT_CROP,8,3          ## @V4L2_SEL_TGT_CROP
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Error in set layer config:\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error in set vid expansion:\n"

	.comm	_ZOOM_X1,8,3                    ## @ZOOM_X1
	.comm	_H_EXP_OFF,8,3                  ## @H_EXP_OFF
	.comm	_V_EXP_OFF,8,3                  ## @V_EXP_OFF
	.no_dead_strip	_vpbe_display_s_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpbe_display_s_selection
_vpbe_display_s_selection:              ; @vpbe_display_s_selection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x2
	bl	_video_drvdata
	mov	x20, x0
	ldr	x23, [x0, #48]
	ldp	x19, x22, [x23]
	ldr	q0, [x21, #16]
	str	q0, [sp]
	ldr	x8, [x21, #32]
	str	x8, [sp, #16]
Lloh0:
	adrp	x8, _debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w4, [x0, #40]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x22
	bl	_v4l2_dbg
	ldr	x8, [x21]
Lloh5:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.1:
	ldr	x8, [x21, #8]
Lloh8:
	adrp	x9, _V4L2_SEL_TGT_CROP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_SEL_TGT_CROP@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.2:
	add	x24, x20, #36
	ldr	x8, [sp]
	tbnz	x8, #63, LBB0_10
; %bb.3:
	ldr	x8, [sp, #8]
	tbnz	x8, #63, LBB0_11
LBB0_4:
	mov	x1, sp
	mov	x0, x23
	bl	_vpbe_disp_check_window_params
	ldr	x8, [x19, #32]
	ldr	w1, [x20, #32]
	mov	x0, x19
	mov	x2, x24
	blr	x8
	ldp	w3, w2, [sp, #16]
	mov	x0, x23
	mov	x1, x20
	bl	_vpbe_disp_calculate_scale_factor
	ldp	x2, x3, [sp]
	mov	x0, x23
	mov	x1, x20
	bl	_vpbe_disp_adj_position
	ldr	x8, [x19]
	ldr	w1, [x20, #32]
	mov	x0, x19
	mov	x2, x24
	blr	x8
	tbnz	w0, #31, LBB0_12
; %bb.5:
	ldr	x8, [x19, #24]
	ldr	w1, [x20, #32]
	ldp	x2, x3, [x20]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #8]
	ldp	x1, x2, [x20, #16]
	mov	x0, x19
	blr	x8
	tbnz	w0, #31, LBB0_15
; %bb.6:
	add	x21, x21, #16
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _ZOOM_X1@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ZOOM_X1@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.7:
	ldr	x9, [x20, #8]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.8:
	ldr	x8, [x20, #16]
Lloh14:
	adrp	x9, _H_EXP_OFF@GOTPAGE
Lloh15:
	ldr	x9, [x9, _H_EXP_OFF@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.9:
	ldr	x8, [x20, #24]
Lloh17:
	adrp	x9, _V_EXP_OFF@GOTPAGE
Lloh18:
	ldr	x9, [x9, _V_EXP_OFF@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w1, ne
	b	LBB0_14
LBB0_10:
	str	xzr, [sp]
	ldr	x8, [sp, #8]
	tbz	x8, #63, LBB0_4
LBB0_11:
	str	xzr, [sp, #8]
	b	LBB0_4
LBB0_12:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_13:
	mov	w1, #1
LBB0_14:
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	mov	w0, #0
	ldr	q0, [sp]
	str	q0, [x21]
	ldr	x8, [sp, #16]
	str	x8, [x21, #16]
	b	LBB0_18
LBB0_15:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_16:
	mov	x0, x22
	bl	_v4l2_err
LBB0_17:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VIDIOC_S_SELECTION, layer id = %d\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_V4L2_SEL_TGT_CROP,8,3          ; @V4L2_SEL_TGT_CROP
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Error in set layer config:\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error in set vid expansion:\n"

	.comm	_ZOOM_X1,8,3                    ; @ZOOM_X1
	.comm	_H_EXP_OFF,8,3                  ; @H_EXP_OFF
	.comm	_V_EXP_OFF,8,3                  ; @V_EXP_OFF
	.no_dead_strip	_vpbe_display_s_selection
.subsections_via_symbols
