	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function SP_func_pendulum
LCPI0_0:
	.long	0x41000000                      ## float 8
LCPI0_1:
	.long	0x40400000                      ## float 3
LCPI0_2:
	.long	0x447a0000                      ## float 1000
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_SP_func_pendulum
	.p2align	4, 0x90
_SP_func_pendulum:                      ## @SP_func_pendulum
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	leaq	-20(%rbp), %rdx
	callq	_G_SpawnFloat
	leaq	60(%rbx), %rdx
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_G_SpawnInt
	leaq	L_.str.4(%rip), %rdi
	leaq	L_.str.5(%rip), %rsi
	leaq	-24(%rbp), %rdx
	callq	_G_SpawnFloat
	movl	56(%rbx), %esi
	movq	%rbx, %rdi
	callq	_trap_SetBrushModel
	movq	48(%rbx), %rax
	movl	8(%rax), %edi
	callq	_fabs
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	maxss	%xmm0, %xmm1
	movq	_M_PI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax), %ecx
	incl	%ecx
                                        ## kill: def $eax killed $eax killed $rax
	addl	%eax, %eax
	xorl	%r14d, %r14d
	cmpl	$3, %ecx
	movq	_g_gravity@GOTPCREL(%rip), %rcx
	xorps	%xmm0, %xmm0
	cvtsi2ssl	(%rcx), %xmm0
	cmovbl	%eax, %r14d
	mulss	LCPI0_1(%rip), %xmm1
	divss	%xmm1, %xmm0
	cvttss2si	%xmm0, %edi
	callq	_sqrt
	imull	%r14d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	LCPI0_2(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	movaps	%xmm1, -48(%rbp)                ## 16-byte Spill
	cvttss2si	%xmm1, %r14d
	movl	%r14d, 32(%rbx)
	movq	%rbx, %rdi
	callq	_InitMover
	movl	28(%rbx), %edi
	movl	36(%rbx), %esi
	callq	_VectorCopy
	movl	28(%rbx), %edi
	movl	40(%rbx), %esi
	callq	_VectorCopy
	movl	20(%rbx), %esi
	movl	24(%rbx), %edi
	callq	_VectorCopy
	movl	%r14d, (%rbx)
	cvttps2dq	-48(%rbp), %xmm0        ## 16-byte Folded Reload
	cvtdq2ps	%xmm0, %xmm0
	mulss	-24(%rbp), %xmm0
	movss	%xmm0, 4(%rbx)
	movq	_TR_SINE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movss	-20(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movq	8(%rbx), %rax
	movss	%xmm0, 8(%rax)
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"speed"

L_.str.1:                               ## @.str.1
	.asciz	"30"

L_.str.2:                               ## @.str.2
	.asciz	"dmg"

L_.str.3:                               ## @.str.3
	.asciz	"2"

L_.str.4:                               ## @.str.4
	.asciz	"phase"

L_.str.5:                               ## @.str.5
	.asciz	"0"

	.comm	_M_PI,4,2                       ## @M_PI
	.comm	_g_gravity,4,2                  ## @g_gravity
	.comm	_TR_SINE,4,2                    ## @TR_SINE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SP_func_pendulum               ; -- Begin function SP_func_pendulum
	.p2align	2
_SP_func_pendulum:                      ; @SP_func_pendulum
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	d9, d8, [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 b8, -40
	.cfi_offset b9, -48
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	bl	_G_SpawnFloat
	add	x2, x19, #60
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_G_SpawnInt
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x2, sp, #12
	bl	_G_SpawnFloat
	ldr	w1, [x19, #56]
	mov	x0, x19
	bl	_trap_SetBrushModel
	ldr	x8, [x19, #48]
	ldr	w0, [x8, #8]
	bl	_fabs
	fmov	s1, #8.00000000
	fmax	s0, s0, s1
Lloh12:
	adrp	x8, _M_PI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _M_PI@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	lsl	w9, w8, #1
	mov	w10, #1
	bfi	w10, w8, #1, #31
	cmp	w10, #3
	csel	w20, w9, wzr, lo
Lloh15:
	adrp	x8, _g_gravity@GOTPAGE
Lloh16:
	ldr	x8, [x8, _g_gravity@GOTPAGEOFF]
Lloh17:
	ldr	s1, [x8]
	scvtf	s1, s1
	fmov	s2, #3.00000000
	fmul	s0, s0, s2
	fdiv	s0, s1, s0
	fcvtzs	w0, s0
	bl	_sqrt
	mul	w8, w20, w0
	scvtf	s0, w8
	mov	w8, #1148846080
	fmov	s1, w8
	fdiv	s8, s1, s0
	fcvtzs	w20, s8
	str	w20, [x19, #32]
	mov	x0, x19
	bl	_InitMover
	ldr	w0, [x19, #28]
	ldr	w1, [x19, #36]
	bl	_VectorCopy
	ldr	w0, [x19, #28]
	ldr	w1, [x19, #40]
	bl	_VectorCopy
	ldp	w1, w0, [x19, #20]
	bl	_VectorCopy
	str	w20, [x19]
	fcvtzs	s0, s8
	scvtf	s0, s0
	ldr	s1, [sp, #12]
	fmul	s0, s1, s0
Lloh18:
	adrp	x8, _TR_SINE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TR_SINE@GOTPAGEOFF]
	str	s0, [x19, #4]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	s0, [sp, #8]
	ldr	x8, [x19, #8]
	str	s0, [x8, #8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"speed"

l_.str.1:                               ; @.str.1
	.asciz	"30"

l_.str.2:                               ; @.str.2
	.asciz	"dmg"

l_.str.3:                               ; @.str.3
	.asciz	"2"

l_.str.4:                               ; @.str.4
	.asciz	"phase"

l_.str.5:                               ; @.str.5
	.asciz	"0"

	.comm	_M_PI,4,2                       ; @M_PI
	.comm	_g_gravity,4,2                  ; @g_gravity
	.comm	_TR_SINE,4,2                    ; @TR_SINE
.subsections_via_symbols
