	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ApplyPaletteChange             ## -- Begin function ApplyPaletteChange
	.p2align	4, 0x90
_ApplyPaletteChange:                    ## @ApplyPaletteChange
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_obj_fade_vals@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movl	(%rax,%rcx,4), %eax
	movq	_OBP0_REG@GOTPCREL(%rip), %rdx
	movl	%eax, (%rdx)
	movq	_bgp_fade_vals@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %eax
	movq	_BGP_REG@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_obj_fade_vals,8,3              ## @obj_fade_vals
	.comm	_OBP0_REG,4,2                   ## @OBP0_REG
	.comm	_bgp_fade_vals,8,3              ## @bgp_fade_vals
	.comm	_BGP_REG,4,2                    ## @BGP_REG
	.comm	_CGB_TYPE,8,3                   ## @CGB_TYPE
	.comm	__cpu,8,3                       ## @_cpu
	.comm	_custom_bg_pal,4,2              ## @custom_bg_pal
	.comm	_custom_bg_pal_fade_step1,4,2   ## @custom_bg_pal_fade_step1
	.comm	_custom_bg_pal_fade_step2,4,2   ## @custom_bg_pal_fade_step2
	.comm	_custom_bg_pal_fade_step3,4,2   ## @custom_bg_pal_fade_step3
	.comm	_custom_bg_pal_fade_step4,4,2   ## @custom_bg_pal_fade_step4
	.comm	_custom_spr1_pal,4,2            ## @custom_spr1_pal
	.comm	_custom_spr1_pal_fade_step1,4,2 ## @custom_spr1_pal_fade_step1
	.comm	_custom_spr1_pal_fade_step2,4,2 ## @custom_spr1_pal_fade_step2
	.comm	_custom_spr1_pal_fade_step3,4,2 ## @custom_spr1_pal_fade_step3
	.comm	_custom_spr1_pal_fade_step4,4,2 ## @custom_spr1_pal_fade_step4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ApplyPaletteChange             ; -- Begin function ApplyPaletteChange
	.p2align	2
_ApplyPaletteChange:                    ; @ApplyPaletteChange
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _obj_fade_vals@GOTPAGE
Lloh1:
	ldr	x8, [x8, _obj_fade_vals@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sbfiz	x9, x0, #2, #32
	ldr	w8, [x8, x9]
Lloh3:
	adrp	x10, _OBP0_REG@GOTPAGE
Lloh4:
	ldr	x10, [x10, _OBP0_REG@GOTPAGEOFF]
Lloh5:
	str	w8, [x10]
Lloh6:
	adrp	x8, _bgp_fade_vals@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bgp_fade_vals@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w8, [x8, x9]
Lloh9:
	adrp	x9, _BGP_REG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BGP_REG@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
	ret
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_obj_fade_vals,8,3              ; @obj_fade_vals
	.comm	_OBP0_REG,4,2                   ; @OBP0_REG
	.comm	_bgp_fade_vals,8,3              ; @bgp_fade_vals
	.comm	_BGP_REG,4,2                    ; @BGP_REG
	.comm	_CGB_TYPE,8,3                   ; @CGB_TYPE
	.comm	__cpu,8,3                       ; @_cpu
	.comm	_custom_bg_pal,4,2              ; @custom_bg_pal
	.comm	_custom_bg_pal_fade_step1,4,2   ; @custom_bg_pal_fade_step1
	.comm	_custom_bg_pal_fade_step2,4,2   ; @custom_bg_pal_fade_step2
	.comm	_custom_bg_pal_fade_step3,4,2   ; @custom_bg_pal_fade_step3
	.comm	_custom_bg_pal_fade_step4,4,2   ; @custom_bg_pal_fade_step4
	.comm	_custom_spr1_pal,4,2            ; @custom_spr1_pal
	.comm	_custom_spr1_pal_fade_step1,4,2 ; @custom_spr1_pal_fade_step1
	.comm	_custom_spr1_pal_fade_step2,4,2 ; @custom_spr1_pal_fade_step2
	.comm	_custom_spr1_pal_fade_step3,4,2 ; @custom_spr1_pal_fade_step3
	.comm	_custom_spr1_pal_fade_step4,4,2 ; @custom_spr1_pal_fade_step4
.subsections_via_symbols
