	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calculate_display_rect
_calculate_display_rect:                ## @calculate_display_rect
	.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
	movl	%r9d, %r13d
	movl	%r8d, %r14d
	movl	%ecx, %r12d
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %r15
	movl	16(%rbp), %ebx
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_av_make_q
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_av_cmp_q
	testq	%rax, %rax
	jg	LBB0_2
## %bb.1:
	movl	$1, %edi
	movl	$1, %esi
	callq	_av_make_q
	movq	%rax, %r15
LBB0_2:
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_av_make_q
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_av_mul_q
	movq	%rax, %r15
	movq	%rax, %rbx
	shrq	$32, %rbx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_av_rescale
	andl	$-2, %eax
	movl	%r14d, %r13d
	cmpl	%r12d, %eax
	jle	LBB0_4
## %bb.3:
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_av_rescale
	movl	%eax, %r13d
	andl	$-2, %r13d
	movl	%r12d, %eax
LBB0_4:
	subl	%eax, %r12d
	movl	%r12d, %ecx
	shrl	$31, %ecx
	addl	%r12d, %ecx
	sarl	%ecx
	subl	%r13d, %r14d
	movl	%r14d, %edx
	shrl	$31, %edx
	addl	%r14d, %edx
	sarl	%edx
	addl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%ecx, (%rbx)
	addl	-48(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%edx, 4(%rbx)
	movl	%eax, %edi
	movl	$1, %esi
	callq	_FFMAX
	movq	%rax, 16(%rbx)
	movl	%r13d, %edi
	movl	$1, %esi
	callq	_FFMAX
	movq	%rax, 8(%rbx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calculate_display_rect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calculate_display_rect
_calculate_display_rect:                ; @calculate_display_rect
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x25, x7
	mov	x24, x6
	mov	x26, x5
	mov	x22, x4
	mov	x23, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w0, #0
	mov	w1, #1
	bl	_av_make_q
	mov	x1, x0
	mov	x0, x25
	bl	_av_cmp_q
	cmp	x0, #0
	b.gt	LBB0_2
; %bb.1:
	mov	w0, #1
	mov	w1, #1
	bl	_av_make_q
	mov	x25, x0
LBB0_2:
	mov	x0, x26
	mov	x1, x24
	bl	_av_make_q
	mov	x1, x0
	mov	x0, x25
	bl	_av_mul_q
	mov	x25, x0
	lsr	x26, x0, #32
	mov	x0, x22
	mov	x1, x25
	mov	x2, x26
	bl	_av_rescale
	and	w0, w0, #0xfffffffe
	mov	x24, x22
	cmp	w0, w23
	b.le	LBB0_4
; %bb.3:
	mov	x0, x23
	mov	x1, x26
	mov	x2, x25
	bl	_av_rescale
	and	w24, w0, #0xfffffffe
	mov	x0, x23
LBB0_4:
	sub	w8, w23, w0
	cmp	w8, #0
	cinc	w8, w8, lt
	sub	w9, w22, w24
	cmp	w9, #0
	cinc	w9, w9, lt
	add	w8, w21, w8, asr #1
	add	w9, w20, w9, asr #1
	stp	w8, w9, [x19]
	mov	w1, #1
	bl	_FFMAX
	str	x0, [x19, #16]
	mov	x0, x24
	mov	w1, #1
	bl	_FFMAX
	str	x0, [x19, #8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calculate_display_rect
.subsections_via_symbols
