	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calculate_ss
_calculate_ss:                          ## @calculate_ss
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.2:
	movq	%rdi, %r15
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.3:
	movq	%rsi, %rbx
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	(%r15), %edi
	movl	$1000000, %esi                  ## imm = 0xF4240
	callq	_dc_fixpt_from_fraction
	movl	12(%r15), %esi
	movl	%eax, %edi
	callq	_dc_fixpt_add_int
	movl	%eax, %r12d
	movq	$0, 8(%r14)
	movl	(%rbx), %edi
	imull	$100, 8(%rbx), %esi
	callq	_dc_fixpt_from_fraction
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_dc_fixpt_mul
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_dc_fixpt_floor
	movq	%rax, 24(%r14)
	movq	%rax, %rdi
	callq	_dc_fixpt_from_int
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_dc_fixpt_sub
	movl	%eax, %edi
	movl	$10, %esi
	callq	_dc_fixpt_mul_int
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_dc_fixpt_floor
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_dc_fixpt_from_int
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_dc_fixpt_sub
	movl	%eax, %edi
	movl	$65536, %esi                    ## imm = 0x10000
	callq	_dc_fixpt_mul_int
	movl	%eax, %edi
	callq	_dc_fixpt_floor
	movq	%rax, 8(%r14)
	imull	$1000, 4(%r15), %edi            ## imm = 0x3E8
	movl	12(%rbx), %esi
	imull	8(%r15), %esi
	callq	_dc_fixpt_from_fraction
	xorl	%ecx, %ecx
	cmpq	$0, 16(%rbx)
	setne	%cl
	leal	(%rcx,%rcx), %esi
	addl	$2, %esi
	movl	%eax, %edi
	callq	_dc_fixpt_div_int
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_dc_fixpt_div
	movl	%eax, %edi
	movl	$655360, %esi                   ## imm = 0xA0000
	callq	_dc_fixpt_mul_int
	movl	%eax, %edi
	callq	_dc_fixpt_floor
	movq	%rax, (%r14)
	movl	$1, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calculate_ss
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calculate_ss
_calculate_ss:                          ; @calculate_ss
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	mov	w0, #0
	cbz	x1, LBB0_5
; %bb.1:
	mov	x19, x2
	cbz	x2, LBB0_5
; %bb.2:
	mov	w0, #0
	cbz	x21, LBB0_5
; %bb.3:
	mov	x20, x1
	ldr	x8, [x1]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w0, [x21]
	mov	w1, #16960
	movk	w1, #15, lsl #16
	bl	_dc_fixpt_from_fraction
	ldr	w1, [x21, #12]
	mov	w0, w0
	bl	_dc_fixpt_add_int
	mov	x22, x0
	str	xzr, [x19, #8]
	ldr	w0, [x20]
	ldr	w8, [x20, #8]
	mov	w9, #100
	mul	w1, w8, w9
	bl	_dc_fixpt_from_fraction
	mov	w8, w22
	mov	w1, w0
	mov	x0, x8
	bl	_dc_fixpt_mul
	mov	w22, w0
	mov	x0, x22
	bl	_dc_fixpt_floor
	str	x0, [x19, #24]
	bl	_dc_fixpt_from_int
	mov	x1, x0
	mov	x0, x22
	bl	_dc_fixpt_sub
	mov	w0, w0
	mov	w1, #10
	bl	_dc_fixpt_mul_int
	mov	w23, w0
	mov	x0, x23
	bl	_dc_fixpt_floor
	str	x0, [x19, #16]
	bl	_dc_fixpt_from_int
	mov	x1, x0
	mov	x0, x23
	bl	_dc_fixpt_sub
	mov	w0, w0
	mov	w1, #65536
	bl	_dc_fixpt_mul_int
	mov	w0, w0
	bl	_dc_fixpt_floor
	str	x0, [x19, #8]
	mov	w8, #1000
	ldp	w9, w10, [x21, #4]
	mul	w0, w9, w8
	ldr	w8, [x20, #12]
	mul	w1, w8, w10
	bl	_dc_fixpt_from_fraction
	ldr	x8, [x20, #16]
	mov	w0, w0
	cmp	x8, #0
	mov	w8, #4
	mov	w9, #2
	csel	w1, w9, w8, eq
	bl	_dc_fixpt_div_int
	mov	w1, w0
	mov	x0, x22
	bl	_dc_fixpt_div
	mov	w0, w0
	mov	w1, #655360
	bl	_dc_fixpt_mul_int
	mov	w0, w0
	bl	_dc_fixpt_floor
	str	x0, [x19]
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calculate_ss
.subsections_via_symbols
