	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function video_layout_view_fit_bounds
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_video_layout_view_fit_bounds
	.p2align	4, 0x90
_video_layout_view_fit_bounds:          ## @video_layout_view_fit_bounds
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	%rdi, %r15
	movq	_video_layout_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movl	%r14d, %eax
	cltd
	idivl	40(%r12)
	movl	%eax, %edi
	shrq	$32, %r15
	movl	%r15d, %eax
	cltd
	idivl	44(%r12)
	movl	%eax, %esi
	callq	_MIN
	cvtsi2ssl	40(%r12), %xmm1
	cvtsi2ssl	44(%r12), %xmm2
	mulss	%xmm0, %xmm1
	mulss	%xmm0, %xmm2
	movss	%xmm1, 16(%r12)
	movss	%xmm2, 20(%r12)
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r14d, %xmm0
	subss	%xmm1, %xmm0
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	movss	%xmm0, 24(%r12)
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r15d, %xmm0
	subss	%xmm2, %xmm0
	mulss	%xmm1, %xmm0
	movss	%xmm0, 28(%r12)
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.1:
	xorl	%edi, %edi
	movq	_VIDEO_LAYOUT_C_SCREEN@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %eax
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdi
	movslq	%eax, %rcx
	cmpq	%rcx, %rdi
	jge	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	movq	32(%r12), %rcx
	movq	%rdi, %rsi
	shlq	$4, %rsi
	movl	(%rcx,%rsi), %edx
	testl	%edx, %edx
	jle	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rsi), %r10
	addq	$8, %r10
	xorl	%r11d, %r11d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%r11
	movslq	%edx, %rax
	cmpq	%rax, %r11
	jge	LBB0_12
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	movq	(%r10), %rdi
	leaq	(%r11,%r11,2), %rsi
	shlq	$4, %rsi
	movsd	32(%rdi,%rsi), %xmm0            ## xmm0 = mem[0],zero
	cvtdq2ps	%xmm0, %xmm0
	movsd	16(%r12), %xmm1                 ## xmm1 = mem[0],zero
	movsd	24(%r12), %xmm2                 ## xmm2 = mem[0],zero
	mulps	%xmm1, %xmm0
	addps	%xmm2, %xmm0
	movss	%xmm0, 4(%rdi,%rsi)
	extractps	$1, %xmm0, 8(%rdi,%rsi)
	xorps	%xmm2, %xmm2
	cvtsi2ssl	40(%rdi,%rsi), %xmm2
	mulss	%xmm1, %xmm2
	cvttss2si	%xmm2, %ecx
	movl	%ecx, 12(%rdi,%rsi)
	xorps	%xmm2, %xmm2
	cvtsi2ssl	44(%rdi,%rsi), %xmm2
	movshdup	%xmm1, %xmm1                    ## xmm1 = xmm1[1,1,3,3]
	mulss	%xmm2, %xmm1
	cvttss2si	%xmm1, %eax
	movl	%eax, 16(%rdi,%rsi)
	movl	(%rdi,%rsi), %r13d
	testl	%r13d, %r13d
	jle	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	leaq	(%rdi,%rsi), %r15
	leaq	(%rdi,%rsi), %rdx
	addq	$4, %rdx
	movl	$44, %edi
	movl	$1, %r9d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	20(%rdx), %rsi
	movl	-12(%rsi,%rdi), %r8d
	imull	%ecx, %r8d
	xorps	%xmm1, %xmm1
	cvtsi2ss	%r8d, %xmm1
	addss	%xmm0, %xmm1
	movss	%xmm1, -36(%rsi,%rdi)
	movl	-8(%rsi,%rdi), %ebx
	imull	%eax, %ebx
	xorps	%xmm1, %xmm1
	cvtsi2ss	%ebx, %xmm1
	movshdup	%xmm0, %xmm0                    ## xmm0 = xmm0[1,1,3,3]
	addss	%xmm1, %xmm0
	movss	%xmm0, -32(%rsi,%rdi)
	imull	-4(%rsi,%rdi), %ecx
	movl	%ecx, -28(%rsi,%rdi)
	imull	(%rsi,%rdi), %eax
	movl	%eax, -24(%rsi,%rdi)
	movq	-44(%rsi,%rdi), %rax
	cmpq	(%r14), %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	movq	8(%r12), %rax
	movq	-20(%rsi,%rdi), %rcx
	shlq	$4, %rcx
	movups	-36(%rsi,%rdi), %xmm0
	movups	%xmm0, (%rax,%rcx)
	movl	(%r15), %r13d
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=3
	movslq	%r13d, %rax
	cmpq	%rax, %r9
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=3
	movl	8(%rdx), %ecx
	movl	12(%rdx), %eax
	movsd	(%rdx), %xmm0                   ## xmm0 = mem[0],zero
	addq	$48, %rdi
	incq	%r9
	jmp	LBB0_6
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_video_layout_state,8,3         ## @video_layout_state
	.comm	_VIDEO_LAYOUT_C_SCREEN,8,3      ## @VIDEO_LAYOUT_C_SCREEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_video_layout_view_fit_bounds   ; -- Begin function video_layout_view_fit_bounds
	.p2align	2
_video_layout_view_fit_bounds:          ; @video_layout_view_fit_bounds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	fmov	d0, x0
	str	q0, [sp]                        ; 16-byte Folded Spill
Lloh0:
	adrp	x8, _video_layout_state@GOTPAGE
Lloh1:
	ldr	x8, [x8, _video_layout_state@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x19, [x8]
	ldp	w8, w9, [x19, #40]
	fmov	w10, s0
	sdiv	w0, w10, w8
	mov.s	w8, v0[1]
	sdiv	w1, w8, w9
	bl	_MIN
                                        ; kill: def $s0 killed $s0 def $q0
	ldr	d1, [x19, #40]
	scvtf.2s	v1, v1
	fmul.2s	v0, v1, v0[0]
	ldr	q1, [sp]                        ; 16-byte Folded Reload
	scvtf.2s	v1, v1
	fsub.2s	v1, v1, v0
	movi.2s	v2, #63, lsl #24
	fmul.2s	v1, v1, v2
	stp	d0, d1, [x19, #16]
	ldr	w12, [x19]
	cmp	w12, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x8, #0
	mov	w9, #48
Lloh3:
	adrp	x10, _VIDEO_LAYOUT_C_SCREEN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _VIDEO_LAYOUT_C_SCREEN@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w12, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #1
	cmp	x8, w12, sxtw
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
	ldr	x11, [x19, #32]
	add	x11, x11, x8, lsl #4
	ldr	w0, [x11]
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x12, #0
	add	x13, x11, #8
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	w0, [x11]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x12, x12, #1
	cmp	x12, w0, sxtw
	b.ge	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
	ldr	x1, [x13]
	madd	x14, x12, x9, x1
	ldp	d0, d1, [x14, #32]
	scvtf.2s	v2, v0
	ldp	d3, d0, [x19, #16]
	fmla.2s	v0, v3, v2
	mov	x15, x14
	str	d0, [x15, #4]!
	scvtf.2s	v1, v1
	fmul.2s	v1, v3, v1
	fcvtzs.2s	v1, v1
	mov	x16, x14
	str	d1, [x16, #12]!
	ldr	w17, [x14]
	cmp	w17, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, #0
	madd	x1, x12, x9, x1
	add	x1, x1, #24
	mov	w2, #1
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x3, [x1]
	add	x3, x3, x0
	ldp	d2, d3, [x3, #32]
	mul.2s	v2, v1, v2
	scvtf.2s	v2, v2
	fadd.2s	v0, v0, v2
	mul.2s	v1, v3, v1
	stp	d0, d1, [x3, #8]
	ldr	x4, [x3]
	ldr	x5, [x10]
	cmp	x4, x5
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=3
	ldr	x17, [x19, #8]
	ldr	x4, [x3, #24]
	ldur	q0, [x3, #8]
	str	q0, [x17, x4, lsl #4]
	ldr	w17, [x14]
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=3
	cmp	x2, w17, sxtw
	b.ge	LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=3
	ldr	d1, [x16]
	ldr	d0, [x15]
	add	x0, x0, #48
	add	x2, x2, #1
	b	LBB0_10
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_video_layout_state,8,3         ; @video_layout_state
	.comm	_VIDEO_LAYOUT_C_SCREEN,8,3      ; @VIDEO_LAYOUT_C_SCREEN
.subsections_via_symbols
