	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function set_scaling_params
LCPI0_0:
	.quad	0x406e000000000000              ## double 240
LCPI0_1:
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__literal16,16byte_literals
	.p2align	3
LCPI0_2:
	.quad	0x4074000000000000              ## double 320
	.quad	0x4070000000000000              ## double 256
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_set_scaling_params:                    ## @set_scaling_params
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_g_vertices@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$0, 28(%rax)
	movl	$0, 8(%rax)
	movq	$0, (%rax)
	movq	_currentConfig@GOTPCREL(%rip), %rdx
	movsd	(%rdx), %xmm0                   ## xmm0 = mem[0],zero
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	movsd	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero
	addsd	%xmm2, %xmm1
	cvttsd2si	%xmm1, %r8d
	movq	_Pico@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	48(%rcx), %ecx
	andl	$1, %ecx
	leal	4(%rcx), %r10d
	shll	$6, %r10d
	leaq	16(%rdx), %rsi
	addq	$8, %rdx
	xorl	%edi, %edi
	testl	%ecx, %ecx
	sete	%dil
	leaq	LCPI0_2(%rip), %rcx
	mulsd	(%rcx,%rdi,8), %xmm0
	cmoveq	%rsi, %rdx
	mulsd	(%rdx), %xmm0
	addsd	%xmm2, %xmm0
	cvttsd2si	%xmm0, %ecx
	movl	%ecx, %edx
	andl	$1, %edx
	addl	%ecx, %edx
	movl	%r8d, %esi
	andl	$1, %esi
	addl	%r8d, %esi
	cmpl	$480, %edx                      ## imm = 0x1E0
	jl	LBB0_2
## %bb.1:
	addl	$-480, %edx                     ## imm = 0xFE20
	shrl	%edx
	movl	%edx, %r9d
	notl	%edx
	addl	%edx, %r10d
	xorl	%r8d, %r8d
	movl	$480, %edx                      ## imm = 0x1E0
	jmp	LBB0_3
LBB0_2:
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	movl	$240, %r8d
	subl	%ecx, %r8d
	xorl	%r9d, %r9d
LBB0_3:
	movl	%r9d, 12(%rax)
	movl	%r10d, 32(%rax)
	cmpl	$272, %esi                      ## imm = 0x110
	jl	LBB0_5
## %bb.4:
	addl	$-272, %esi                     ## imm = 0xFEF0
	shrl	%esi
	movl	$240, %ecx
	subl	%esi, %ecx
	xorl	%edi, %edi
	movl	%esi, %r11d
	movl	$272, %esi                      ## imm = 0x110
	jmp	LBB0_6
LBB0_5:
	movl	%esi, %ecx
	shrl	$31, %ecx
	addl	%esi, %ecx
	andl	$-2, %ecx
	shll	$8, %ecx
	movl	$69632, %edi                    ## imm = 0x11000
	subl	%ecx, %edi
	movl	$240, %ecx
	xorl	%r11d, %r11d
LBB0_6:
	movl	%r11d, 16(%rax)
	movl	%ecx, 36(%rax)
	movl	%edx, 20(%rax)
	movl	%esi, 24(%rax)
	cmpl	$321, %edx                      ## imm = 0x141
	jl	LBB0_8
## %bb.7:
	incl	%r9d
	movl	%r9d, 12(%rax)
	movl	$1, (%rax)
	decl	%r10d
	movl	%r10d, 32(%rax)
	decl	%edx
	movl	%edx, 20(%rax)
LBB0_8:
	addl	%r8d, %edi
	addl	%edi, %edi
	movq	_fbimg_offs@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_vertices,8,3                 ## @g_vertices
	.comm	_currentConfig,24,3             ## @currentConfig
	.comm	_Pico,8,3                       ## @Pico
	.comm	_fbimg_offs,4,2                 ## @fbimg_offs
	.no_dead_strip	_set_scaling_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_scaling_params
_set_scaling_params:                    ; @set_scaling_params
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _g_vertices@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_vertices@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	wzr, [x8, #28]
	str	wzr, [x8, #8]
	str	xzr, [x8]
Lloh3:
	adrp	x9, _currentConfig@GOTPAGE
Lloh4:
	ldr	x9, [x9, _currentConfig@GOTPAGEOFF]
	add	x10, x9, #8
	ldr	d0, [x9], #16
	mov	x11, #4642648265865560064
	fmov	d1, x11
	fmov	d2, #0.50000000
	fmadd	d1, d0, d1, d2
	fcvtzs	w11, d1
Lloh5:
	adrp	x12, _Pico@GOTPAGE
Lloh6:
	ldr	x12, [x12, _Pico@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x12]
	ldr	w12, [x12, #48]
	tst	w12, #0x1
	mov	x12, #4644337115725824000
	fmov	d1, x12
	mov	x12, #4643211215818981376
	fmov	d3, x12
	fcsel	d1, d3, d1, eq
	mov	w12, #320
	mov	w13, #256
	fmul	d0, d0, d1
	csel	x9, x9, x10, eq
	ldr	d1, [x9]
	fmadd	d0, d0, d1, d2
	fcvtzs	w9, d0
	csel	w10, w13, w12, eq
	and	w12, w9, #0x1
	add	w9, w12, w9
	and	w12, w11, #0x1
	add	w13, w12, w11
	cmp	w9, #0
	cinc	w11, w9, lt
	mov	w12, #240
	sub	w14, w12, w11, asr #1
	sub	w11, w9, #480
	lsr	w11, w11, #1
	mvn	w12, w11
	add	w15, w10, w12
	mov	w16, #480
	cmp	w9, #480
	csel	w12, wzr, w11, lt
	csel	w11, w10, w15, lt
	csel	w10, w9, w16, lt
	csel	w9, w14, wzr, lt
	cmp	w13, #0
	cinc	w14, w13, lt
	lsl	w14, w14, #8
	and	w14, w14, #0xfffffe00
	mov	w15, #4096
	movk	w15, #1, lsl #16
	sub	w14, w15, w14
	mov	w15, #240
	sub	w16, w13, #272
	lsr	w16, w16, #1
	sub	w17, w15, w16
	cmp	w13, #272
	csel	w16, wzr, w16, lt
	stp	w12, w16, [x8, #12]
	mov	w16, #272
	csel	w15, w15, w17, lt
	stp	w11, w15, [x8, #32]
	csel	w15, w13, w16, lt
	csel	w13, w14, wzr, lt
	stp	w10, w15, [x8, #20]
	cmp	w10, #321
	b.lt	LBB0_2
; %bb.1:
	add	w12, w12, #1
	str	w12, [x8, #12]
	mov	w12, #1
	str	w12, [x8]
	sub	w11, w11, #1
	str	w11, [x8, #32]
	sub	w10, w10, #1
	str	w10, [x8, #20]
LBB0_2:
	add	w8, w13, w9
	lsl	w8, w8, #1
Lloh8:
	adrp	x9, _fbimg_offs@GOTPAGE
Lloh9:
	ldr	x9, [x9, _fbimg_offs@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_g_vertices,8,3                 ; @g_vertices
	.comm	_currentConfig,24,3             ; @currentConfig
	.comm	_Pico,8,3                       ; @Pico
	.comm	_fbimg_offs,4,2                 ; @fbimg_offs
	.no_dead_strip	_set_scaling_params
.subsections_via_symbols
