	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FadeUpdate                     ## -- Begin function FadeUpdate
	.p2align	4, 0x90
_FadeUpdate:                            ## @FadeUpdate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_fade_running@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.1:
	movq	_fade_frame@GOTPCREL(%rip), %rbx
	movq	_fade_frames_per_step@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	_fade_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_8:
	callq	_ApplyPaletteChange
	incl	(%rbx)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movq	_fade_direction@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_FADE_IN@GOTPCREL(%rip), %rsi
	movq	_fade_timer@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cmpq	(%rsi), %rdx
	jne	LBB0_6
## %bb.4:
	incl	%edi
	movl	%edi, (%rcx)
	cmpl	$5, %edi
	jne	LBB0_8
## %bb.5:
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movl	$5, %edi
	jmp	LBB0_8
LBB0_6:
	decl	%edi
	movl	%edi, (%rcx)
	jne	LBB0_8
## %bb.7:
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	xorl	%edi, %edi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_fade_running,8,3               ## @fade_running
	.comm	_fade_frame,4,2                 ## @fade_frame
	.comm	_fade_frames_per_step,4,2       ## @fade_frames_per_step
	.comm	_fade_direction,8,3             ## @fade_direction
	.comm	_FADE_IN,8,3                    ## @FADE_IN
	.comm	_fade_timer,4,2                 ## @fade_timer
	.comm	_FALSE,8,3                      ## @FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FadeUpdate                     ; -- Begin function FadeUpdate
	.p2align	2
_FadeUpdate:                            ; @FadeUpdate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _fade_running@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fade_running@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_7
; %bb.1:
Lloh2:
	adrp	x19, _fade_frame@GOTPAGE
Lloh3:
	ldr	x19, [x19, _fade_frame@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh4:
	adrp	x10, _fade_frames_per_step@GOTPAGE
Lloh5:
	ldr	x10, [x10, _fade_frames_per_step@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _fade_timer@GOTPAGE
Lloh8:
	ldr	x8, [x8, _fade_timer@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_3:
Lloh10:
	adrp	x9, _fade_direction@GOTPAGE
Lloh11:
	ldr	x9, [x9, _fade_direction@GOTPAGEOFF]
Lloh12:
	adrp	x10, _FADE_IN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _FADE_IN@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x9]
Lloh15:
	ldr	x12, [x10]
Lloh16:
	adrp	x9, _fade_timer@GOTPAGE
Lloh17:
	ldr	x9, [x9, _fade_timer@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	x11, x12
	b.ne	LBB0_8
; %bb.4:
	add	w0, w10, #1
	str	w0, [x9]
	cmp	w0, #5
	b.ne	LBB0_6
LBB0_5:
Lloh18:
	adrp	x9, _FALSE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	str	x9, [x8]
LBB0_6:
	bl	_ApplyPaletteChange
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	subs	w0, w10, #1
	str	w0, [x9]
	b.ne	LBB0_6
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_fade_running,8,3               ; @fade_running
	.comm	_fade_frame,4,2                 ; @fade_frame
	.comm	_fade_frames_per_step,4,2       ; @fade_frames_per_step
	.comm	_fade_direction,8,3             ; @fade_direction
	.comm	_FADE_IN,8,3                    ; @FADE_IN
	.comm	_fade_timer,4,2                 ; @fade_timer
	.comm	_FALSE,8,3                      ; @FALSE
.subsections_via_symbols
