	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_vou_configure_geometry
_sh_vou_configure_geometry:             ## @sh_vou_configure_geometry
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	_vou_fmt@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rdi), %eax
	movl	$864, %eax                      ## imm = 0x360
	movl	$858, %r15d                     ## imm = 0x35A
	cmovel	%eax, %r15d
	movl	4(%rdi), %edi
	movl	8(%r13), %eax
	movl	%eax, %r12d
	shrl	$31, %r12d
	addl	%eax, %r12d
	sarl	%r12d
	movq	16(%r13), %xmm0                 ## xmm0 = mem[0],zero
	movdqa	%xmm0, %xmm1
	psrld	$31, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$1, %xmm1
	movq	_VOU_MAX_IMAGE_WIDTH@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	28(%r13), %eax
	movl	24(%r13), %r14d
	addl	%eax, %r14d
	movd	%xmm1, %ebx
	pextrd	$1, %xmm1, %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	addl	%ecx, %ebx
	movl	12(%r13), %edx
	pextrd	$1, %xmm1, 8(%rsp)
	movl	%ebx, 24(%rsp)
	movl	%r14d, 16(%rsp)
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	$20, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_VOUISR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r13), %edx
	shll	$16, %edx
	orl	%r12d, %edx
	movq	%r13, %rdi
	callq	_sh_vou_reg_ab_write
	movq	_VOUVPR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$16, %r15d
	orl	$20, %r15d
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_sh_vou_reg_ab_write
	movq	_VOUDPR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	28(%r13), %edx
	shll	$16, %edx
	orl	-48(%rbp), %edx                 ## 4-byte Folded Reload
	movq	%r13, %rdi
	callq	_sh_vou_reg_ab_write
	movq	_VOUDSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$16, %r14d
	orl	%ebx, %r14d
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_sh_vou_reg_ab_write
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_vou_scale_h_fld@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movl	-4(%rax,%rcx,4), %eax
	shll	$4, %eax
	orl	$32768, %eax                    ## imm = 0x8000
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_2:
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.4:
	movq	_vou_scale_v_fld@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	orl	-4(%rax,%rcx,4), %r15d
	orl	$16384, %r15d                   ## imm = 0x4000
	jmp	LBB0_5
LBB0_3:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_5:
	movslq	-60(%rbp), %rbx                 ## 4-byte Folded Reload
	movl	4(%r13), %edi
	shlq	$4, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	12(%r14,%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_VOUVCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_sh_vou_reg_ab_write
	movq	_VOUDFR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14,%rbx), %eax
	movl	8(%r14,%rbx), %edx
	shll	$8, %eax
	orl	(%r14,%rbx), %eax
	shll	$16, %edx
	orl	%eax, %edx
	movq	%r13, %rdi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sh_vou_reg_ab_write            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_vou_fmt,8,3                    ## @vou_fmt
	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_VOU_MAX_IMAGE_WIDTH,4,2        ## @VOU_MAX_IMAGE_WIDTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"image %ux%u, black %u:%u, offset %u:%u, display %ux%u\n"

	.comm	_VOUISR,4,2                     ## @VOUISR
	.comm	_VOUVPR,4,2                     ## @VOUVPR
	.comm	_VOUDPR,4,2                     ## @VOUDPR
	.comm	_VOUDSR,4,2                     ## @VOUDSR
	.comm	_vou_scale_h_fld,8,3            ## @vou_scale_h_fld
	.comm	_vou_scale_v_fld,8,3            ## @vou_scale_v_fld
L_.str.1:                               ## @.str.1
	.asciz	"0x%08x: scaling 0x%x\n"

	.comm	_VOUVCR,4,2                     ## @VOUVCR
	.comm	_VOUDFR,4,2                     ## @VOUDFR
	.no_dead_strip	_sh_vou_configure_geometry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_vou_configure_geometry
_sh_vou_configure_geometry:             ; @sh_vou_configure_geometry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x21, x3
	mov	x22, x2
	str	w1, [sp, #60]                   ; 4-byte Folded Spill
	mov	x19, x0
Lloh0:
	adrp	x8, _vou_fmt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vou_fmt@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
Lloh3:
	adrp	x8, _V4L2_STD_525_60@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_STD_525_60@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldp	w9, w0, [x0]
	tst	w8, w9
	mov	w8, #858
	mov	w9, #864
	csel	w8, w9, w8, eq
	ldp	w9, w2, [x19, #8]
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w23, w9, #1
	ldp	w9, w10, [x19, #16]
	cmp	w9, #0
	cinc	w9, w9, lt
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w26, w10, #1
Lloh6:
	adrp	x10, _VOU_MAX_IMAGE_WIDTH@GOTPAGE
Lloh7:
	ldr	x10, [x10, _VOU_MAX_IMAGE_WIDTH@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	sub	w27, w8, w10
	ldp	w8, w10, [x19, #24]
	add	w28, w10, w8
	add	w20, w26, w9, asr #1
	mov	w24, #20
	stp	x10, x26, [sp, #16]
	stp	x27, x24, [sp]
	stp	x28, x20, [sp, #32]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x23
	bl	_dev_dbg
Lloh11:
	adrp	x8, _VOUISR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VOUISR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w8, [x19, #12]
	orr	w2, w23, w8, lsl #16
	mov	x0, x19
	bl	_sh_vou_reg_ab_write
Lloh14:
	adrp	x8, _VOUVPR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VOUVPR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bfi	w24, w27, #16, #16
	mov	x0, x19
	mov	x2, x24
	bl	_sh_vou_reg_ab_write
Lloh17:
	adrp	x8, _VOUDPR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VOUDPR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w8, [x19, #28]
	orr	w2, w26, w8, lsl #16
	mov	x0, x19
	bl	_sh_vou_reg_ab_write
Lloh20:
	adrp	x8, _VOUDSR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VOUDSR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	orr	w2, w20, w28, lsl #16
	mov	x0, x19
	bl	_sh_vou_reg_ab_write
	cbz	w22, LBB0_2
; %bb.1:
Lloh23:
	adrp	x8, _vou_scale_h_fld@GOTPAGE
Lloh24:
	ldr	x8, [x8, _vou_scale_h_fld@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	sub	w9, w22, #1
	ldr	w8, [x8, w9, sxtw #2]
	lsl	w8, w8, #4
	orr	w22, w8, #0x8000
LBB0_2:
	cbz	w21, LBB0_4
; %bb.3:
Lloh26:
	adrp	x8, _vou_scale_v_fld@GOTPAGE
Lloh27:
	ldr	x8, [x8, _vou_scale_v_fld@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	sub	w9, w21, #1
	ldr	w8, [x8, w9, sxtw #2]
	orr	w8, w22, w8
	orr	w22, w8, #0x4000
LBB0_4:
	ldr	w0, [x19, #4]
	ldr	w8, [sp, #60]                   ; 4-byte Folded Reload
	add	x20, x25, w8, sxtw #4
	ldr	w2, [x20, #12]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x22
	bl	_dev_dbg
Lloh31:
	adrp	x8, _VOUVCR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _VOUVCR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_sh_vou_reg_ab_write
Lloh34:
	adrp	x8, _VOUDFR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _VOUDFR@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	ldp	w8, w9, [x20]
	orr	w8, w8, w9, lsl #8
	ldr	w9, [x20, #8]
	orr	w2, w8, w9, lsl #16
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_sh_vou_reg_ab_write
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_vou_fmt,8,3                    ; @vou_fmt
	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_VOU_MAX_IMAGE_WIDTH,4,2        ; @VOU_MAX_IMAGE_WIDTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"image %ux%u, black %u:%u, offset %u:%u, display %ux%u\n"

	.comm	_VOUISR,4,2                     ; @VOUISR
	.comm	_VOUVPR,4,2                     ; @VOUVPR
	.comm	_VOUDPR,4,2                     ; @VOUDPR
	.comm	_VOUDSR,4,2                     ; @VOUDSR
	.comm	_vou_scale_h_fld,8,3            ; @vou_scale_h_fld
	.comm	_vou_scale_v_fld,8,3            ; @vou_scale_v_fld
l_.str.1:                               ; @.str.1
	.asciz	"0x%08x: scaling 0x%x\n"

	.comm	_VOUVCR,4,2                     ; @VOUVCR
	.comm	_VOUDFR,4,2                     ; @VOUDFR
	.no_dead_strip	_sh_vou_configure_geometry
.subsections_via_symbols
