	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AM_updateLightLev              ## -- Begin function AM_updateLightLev
	.p2align	4, 0x90
_AM_updateLightLev:                     ## @AM_updateLightLev
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_amclock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	_AM_updateLightLev.nexttic(%rip), %eax
	jle	LBB0_4
## %bb.1:
	movslq	_AM_updateLightLev.litelevelscnt(%rip), %rcx
	leal	1(%rcx), %edx
	movl	%edx, _AM_updateLightLev.litelevelscnt(%rip)
	leaq	_AM_updateLightLev.litelevels(%rip), %rsi
	movl	(%rsi,%rcx,4), %ecx
	movq	_lightlev@GOTPCREL(%rip), %rsi
	movl	%ecx, (%rsi)
	cmpl	$8, %edx
	jne	LBB0_3
## %bb.2:
	movl	$0, _AM_updateLightLev.litelevelscnt(%rip)
LBB0_3:
	cltq
	imulq	$715827883, %rax, %rax          ## imm = 0x2AAAAAAB
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	addl	%ecx, %eax
	leal	(%rax,%rax,2), %eax
	addl	%eax, %eax
	addl	$6, %eax
	movl	%eax, _AM_updateLightLev.nexttic(%rip)
LBB0_4:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_AM_updateLightLev.nexttic,4,2 ## @AM_updateLightLev.nexttic
	.section	__TEXT,__const
	.p2align	4                               ## @AM_updateLightLev.litelevels
_AM_updateLightLev.litelevels:
	.long	0                               ## 0x0
	.long	4                               ## 0x4
	.long	7                               ## 0x7
	.long	10                              ## 0xa
	.long	12                              ## 0xc
	.long	14                              ## 0xe
	.long	15                              ## 0xf
	.long	15                              ## 0xf

.zerofill __DATA,__bss,_AM_updateLightLev.litelevelscnt,4,2 ## @AM_updateLightLev.litelevelscnt
	.comm	_amclock,4,2                    ## @amclock
	.comm	_lightlev,4,2                   ## @lightlev
	.comm	_nexttic,4,2                    ## @nexttic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AM_updateLightLev              ; -- Begin function AM_updateLightLev
	.p2align	2
_AM_updateLightLev:                     ; @AM_updateLightLev
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _amclock@GOTPAGE
Lloh1:
	ldr	x8, [x8, _amclock@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	adrp	x8, _AM_updateLightLev.nexttic@PAGE
	ldr	w10, [x8, _AM_updateLightLev.nexttic@PAGEOFF]
	cmp	w9, w10
	b.le	LBB0_4
; %bb.1:
	adrp	x10, _AM_updateLightLev.litelevelscnt@PAGE
	ldrsw	x11, [x10, _AM_updateLightLev.litelevelscnt@PAGEOFF]
	add	w12, w11, #1
	str	w12, [x10, _AM_updateLightLev.litelevelscnt@PAGEOFF]
Lloh3:
	adrp	x13, _AM_updateLightLev.litelevels@PAGE
Lloh4:
	add	x13, x13, _AM_updateLightLev.litelevels@PAGEOFF
	ldr	w11, [x13, x11, lsl #2]
Lloh5:
	adrp	x13, _lightlev@GOTPAGE
Lloh6:
	ldr	x13, [x13, _lightlev@GOTPAGEOFF]
Lloh7:
	str	w11, [x13]
	cmp	w12, #8
	b.ne	LBB0_3
; %bb.2:
	str	wzr, [x10, _AM_updateLightLev.litelevelscnt@PAGEOFF]
LBB0_3:
	mov	w10, #43691
	movk	w10, #10922, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	mov	w10, #6
	orr	w11, wzr, #0x6
	madd	w9, w9, w10, w11
	str	w9, [x8, _AM_updateLightLev.nexttic@PAGEOFF]
LBB0_4:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_AM_updateLightLev.nexttic,4,2 ; @AM_updateLightLev.nexttic
	.section	__TEXT,__const
	.p2align	2                               ; @AM_updateLightLev.litelevels
_AM_updateLightLev.litelevels:
	.long	0                               ; 0x0
	.long	4                               ; 0x4
	.long	7                               ; 0x7
	.long	10                              ; 0xa
	.long	12                              ; 0xc
	.long	14                              ; 0xe
	.long	15                              ; 0xf
	.long	15                              ; 0xf

.zerofill __DATA,__bss,_AM_updateLightLev.litelevelscnt,4,2 ; @AM_updateLightLev.litelevelscnt
	.comm	_amclock,4,2                    ; @amclock
	.comm	_lightlev,4,2                   ; @lightlev
	.comm	_nexttic,4,2                    ; @nexttic
.subsections_via_symbols
