	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AM_restoreScaleAndLoc          ## -- Begin function AM_restoreScaleAndLoc
	.p2align	4, 0x90
_AM_restoreScaleAndLoc:                 ## @AM_restoreScaleAndLoc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_old_m_w@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	movq	_m_w@GOTPCREL(%rip), %rax
	movl	%esi, (%rax)
	movq	_old_m_h@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	_m_h@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_followplayer@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_plr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rdx
	movq	8(%rdx), %rcx
	movl	%esi, %edi
	shrl	$31, %edi
	addl	%esi, %edi
	sarl	%edi
	movslq	%edi, %rdi
	subq	%rdi, %rcx
	movq	_m_x@GOTPCREL(%rip), %rdi
	movq	%rcx, (%rdi)
	movq	(%rdx), %rdx
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	movslq	%edi, %rdi
	subq	%rdi, %rdx
	jmp	LBB0_3
LBB0_1:
	movq	_old_m_x@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_m_x@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
	movq	_old_m_y@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
LBB0_3:
	movq	_m_y@GOTPCREL(%rip), %rdi
	movq	%rdx, (%rdi)
	addq	%rsi, %rcx
	movq	_m_x2@GOTPCREL(%rip), %rdi
	movq	%rcx, (%rdi)
	addq	%rdx, %rax
	movq	_m_y2@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_f_w@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FRACBITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_FixedDiv
	movq	_scale_mtof@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_FRACUNIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_FixedDiv
	movq	_scale_ftom@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_old_m_w,4,2                    ## @old_m_w
	.comm	_m_w,4,2                        ## @m_w
	.comm	_old_m_h,4,2                    ## @old_m_h
	.comm	_m_h,4,2                        ## @m_h
	.comm	_followplayer,4,2               ## @followplayer
	.comm	_old_m_x,8,3                    ## @old_m_x
	.comm	_m_x,8,3                        ## @m_x
	.comm	_old_m_y,8,3                    ## @old_m_y
	.comm	_m_y,8,3                        ## @m_y
	.comm	_plr,8,3                        ## @plr
	.comm	_m_x2,8,3                       ## @m_x2
	.comm	_m_y2,8,3                       ## @m_y2
	.comm	_f_w,4,2                        ## @f_w
	.comm	_FRACBITS,4,2                   ## @FRACBITS
	.comm	_scale_mtof,4,2                 ## @scale_mtof
	.comm	_FRACUNIT,4,2                   ## @FRACUNIT
	.comm	_scale_ftom,8,3                 ## @scale_ftom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AM_restoreScaleAndLoc          ; -- Begin function AM_restoreScaleAndLoc
	.p2align	2
_AM_restoreScaleAndLoc:                 ; @AM_restoreScaleAndLoc
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _old_m_w@GOTPAGE
Lloh1:
	ldr	x8, [x8, _old_m_w@GOTPAGEOFF]
Lloh2:
	ldrsw	x1, [x8]
Lloh3:
	adrp	x8, _m_w@GOTPAGE
Lloh4:
	ldr	x8, [x8, _m_w@GOTPAGEOFF]
Lloh5:
	str	w1, [x8]
Lloh6:
	adrp	x8, _old_m_h@GOTPAGE
Lloh7:
	ldr	x8, [x8, _old_m_h@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
Lloh9:
	adrp	x9, _m_h@GOTPAGE
Lloh10:
	ldr	x9, [x9, _m_h@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
Lloh12:
	adrp	x9, _followplayer@GOTPAGE
Lloh13:
	ldr	x9, [x9, _followplayer@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cbz	w9, LBB0_2
; %bb.1:
Lloh15:
	adrp	x9, _plr@GOTPAGE
Lloh16:
	ldr	x9, [x9, _plr@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	ldr	x10, [x9]
	ldr	x9, [x10, #8]
	cmp	w1, #0
	cinc	w11, w1, lt
	asr	w11, w11, #1
	sub	x9, x9, w11, sxtw
Lloh18:
	adrp	x11, _m_x@GOTPAGE
Lloh19:
	ldr	x11, [x11, _m_x@GOTPAGEOFF]
Lloh20:
	str	x9, [x11]
	ldr	x10, [x10]
	cmp	w8, #0
	cinc	w11, w8, lt
	asr	w11, w11, #1
	sub	x10, x10, w11, sxtw
	b	LBB0_3
LBB0_2:
Lloh21:
	adrp	x9, _old_m_x@GOTPAGE
Lloh22:
	ldr	x9, [x9, _old_m_x@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
Lloh24:
	adrp	x10, _m_x@GOTPAGE
Lloh25:
	ldr	x10, [x10, _m_x@GOTPAGEOFF]
Lloh26:
	str	x9, [x10]
Lloh27:
	adrp	x10, _old_m_y@GOTPAGE
Lloh28:
	ldr	x10, [x10, _old_m_y@GOTPAGEOFF]
Lloh29:
	ldr	x10, [x10]
LBB0_3:
Lloh30:
	adrp	x11, _m_y@GOTPAGE
Lloh31:
	ldr	x11, [x11, _m_y@GOTPAGEOFF]
Lloh32:
	str	x10, [x11]
	add	x9, x9, x1
Lloh33:
	adrp	x11, _m_x2@GOTPAGE
Lloh34:
	ldr	x11, [x11, _m_x2@GOTPAGEOFF]
Lloh35:
	str	x9, [x11]
	add	x8, x10, x8
Lloh36:
	adrp	x9, _m_y2@GOTPAGE
Lloh37:
	ldr	x9, [x9, _m_y2@GOTPAGEOFF]
Lloh38:
	adrp	x10, _f_w@GOTPAGE
Lloh39:
	ldr	x10, [x10, _f_w@GOTPAGEOFF]
Lloh40:
	str	x8, [x9]
Lloh41:
	ldr	w8, [x10]
Lloh42:
	adrp	x9, _FRACBITS@GOTPAGE
Lloh43:
	ldr	x9, [x9, _FRACBITS@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	lsl	w0, w8, w9
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_FixedDiv
	mov	x1, x0
Lloh45:
	adrp	x8, _scale_mtof@GOTPAGE
Lloh46:
	ldr	x8, [x8, _scale_mtof@GOTPAGEOFF]
Lloh47:
	str	w1, [x8]
Lloh48:
	adrp	x8, _FRACUNIT@GOTPAGE
Lloh49:
	ldr	x8, [x8, _FRACUNIT@GOTPAGEOFF]
Lloh50:
	ldr	w0, [x8]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_FixedDiv
Lloh51:
	adrp	x8, _scale_ftom@GOTPAGE
Lloh52:
	ldr	x8, [x8, _scale_ftom@GOTPAGEOFF]
Lloh53:
	str	x0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh41
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh40
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_old_m_w,4,2                    ; @old_m_w
	.comm	_m_w,4,2                        ; @m_w
	.comm	_old_m_h,4,2                    ; @old_m_h
	.comm	_m_h,4,2                        ; @m_h
	.comm	_followplayer,4,2               ; @followplayer
	.comm	_old_m_x,8,3                    ; @old_m_x
	.comm	_m_x,8,3                        ; @m_x
	.comm	_old_m_y,8,3                    ; @old_m_y
	.comm	_m_y,8,3                        ; @m_y
	.comm	_plr,8,3                        ; @plr
	.comm	_m_x2,8,3                       ; @m_x2
	.comm	_m_y2,8,3                       ; @m_y2
	.comm	_f_w,4,2                        ; @f_w
	.comm	_FRACBITS,4,2                   ; @FRACBITS
	.comm	_scale_mtof,4,2                 ; @scale_mtof
	.comm	_FRACUNIT,4,2                   ; @FRACUNIT
	.comm	_scale_ftom,8,3                 ; @scale_ftom
.subsections_via_symbols
