	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function OnColorButton
_OnColorButton:                         ## @OnColorButton
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	$0, -48(%rbp)
	movq	_HKEY_CURRENT_USER@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	leaq	L_.str(%rip), %rdi
	callq	_TEXT
	movq	_REG_OPTION_NON_VOLATILE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_KEY_QUERY_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	subq	$8, %rsp
	leaq	-48(%rbp), %r10
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	pushq	$0
	pushq	%r10
	pushq	$0
	callq	_RegCreateKeyEx
	addq	$32, %rsp
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_2
## %bb.1:
	movq	_REG_BINARY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -120(%rbp)
	movl	$8, -52(%rbp)
	movq	-48(%rbp), %rbx
	leaq	L_.str.1(%rip), %rdi
	callq	_TEXT
	movl	(%r14), %r8d
	leaq	-120(%rbp), %rcx
	leaq	-52(%rbp), %r9
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_RegQueryValueEx
	movq	-48(%rbp), %rdi
	callq	_RegCloseKey
	movq	$0, -48(%rbp)
LBB0_2:
	movl	$64, -120(%rbp)
	movl	%r15d, -64(%rbp)
	movq	$0, -72(%rbp)
	movq	_g_GlobalData@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%eax, -112(%rbp)
	movq	_CC_ANYCOLOR@GOTPCREL(%rip), %rax
	movq	_CC_FULLOPEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	(%r14), %rax
	movq	%rax, -80(%rbp)
	movq	_CC_RGBINIT@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -116(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -104(%rbp)
	movq	$0, -88(%rbp)
	leaq	-120(%rbp), %rdi
	callq	_ChooseColor
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	-112(%rbp), %eax
	movl	%eax, (%rbx)
	movq	_TRUE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%eax, 8(%r14)
	movl	%r15d, %edi
	callq	_GetParent
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_PropSheet_Changed
	movq	_IDC_BACKGROUND_PREVIEW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_GetDlgItem
	movl	(%rbx), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_InvalidateRect
	movl	(%r12), %ebx
	leaq	L_.str(%rip), %rdi
	callq	_TEXT
	movq	_KEY_SET_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	-48(%rbp), %r8
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_RegOpenKeyEx
	cmpq	(%r13), %rax
	jne	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rbx
	leaq	L_.str.1(%rip), %rdi
	callq	_TEXT
	movq	_REG_BINARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%r14), %r8d
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$8, %r9d
	callq	_RegSetValueEx
	movq	-48(%rbp), %rdi
	callq	_RegCloseKey
LBB0_5:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR_SUCCESS,8,3              ## @ERROR_SUCCESS
	.comm	_HKEY_CURRENT_USER,4,2          ## @HKEY_CURRENT_USER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Control Panel\\Appearance"

	.comm	_REG_OPTION_NON_VOLATILE,4,2    ## @REG_OPTION_NON_VOLATILE
	.comm	_KEY_QUERY_VALUE,4,2            ## @KEY_QUERY_VALUE
	.comm	_REG_BINARY,4,2                 ## @REG_BINARY
L_.str.1:                               ## @.str.1
	.asciz	"CustomColors"

	.comm	_g_GlobalData,4,2               ## @g_GlobalData
	.comm	_CC_ANYCOLOR,4,2                ## @CC_ANYCOLOR
	.comm	_CC_FULLOPEN,4,2                ## @CC_FULLOPEN
	.comm	_CC_RGBINIT,4,2                 ## @CC_RGBINIT
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_IDC_BACKGROUND_PREVIEW,4,2     ## @IDC_BACKGROUND_PREVIEW
	.comm	_KEY_SET_VALUE,4,2              ## @KEY_SET_VALUE
	.no_dead_strip	_OnColorButton
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function OnColorButton
_OnColorButton:                         ; @OnColorButton
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	stur	xzr, [x29, #-56]
Lloh0:
	adrp	x22, _HKEY_CURRENT_USER@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HKEY_CURRENT_USER@GOTPAGEOFF]
	ldr	w21, [x22]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TEXT
	mov	x1, x0
Lloh4:
	adrp	x8, _REG_OPTION_NON_VOLATILE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _REG_OPTION_NON_VOLATILE@GOTPAGEOFF]
Lloh6:
	ldr	w4, [x8]
Lloh7:
	adrp	x8, _KEY_QUERY_VALUE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _KEY_QUERY_VALUE@GOTPAGEOFF]
Lloh9:
	ldr	w5, [x8]
	str	xzr, [sp]
	sub	x7, x29, #56
	mov	x0, x21
	mov	w2, #0
	mov	x3, #0
	mov	x6, #0
	bl	_RegCreateKeyEx
Lloh10:
	adrp	x23, _ERROR_SUCCESS@GOTPAGE
Lloh11:
	ldr	x23, [x23, _ERROR_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _REG_BINARY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_BINARY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x8]
	mov	w8, #8
	stp	w8, w9, [sp, #20]
	ldur	x21, [x29, #-56]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TEXT
	mov	x1, x0
	ldr	w4, [x19]
	add	x3, sp, #24
	add	x5, sp, #20
	mov	x0, x21
	mov	x2, #0
	bl	_RegQueryValueEx
	ldur	x0, [x29, #-56]
	bl	_RegCloseKey
	stur	xzr, [x29, #-56]
LBB0_2:
	mov	w8, #64
	str	w20, [sp, #80]
	str	xzr, [sp, #72]
Lloh17:
	adrp	x21, _g_GlobalData@GOTPAGE
Lloh18:
	ldr	x21, [x21, _g_GlobalData@GOTPAGEOFF]
	ldr	w9, [x21]
	str	w9, [sp, #32]
Lloh19:
	adrp	x9, _CC_ANYCOLOR@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CC_ANYCOLOR@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _CC_FULLOPEN@GOTPAGE
Lloh23:
	ldr	x10, [x10, _CC_FULLOPEN@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh25:
	adrp	x10, _CC_RGBINIT@GOTPAGE
Lloh26:
	ldr	x10, [x10, _CC_RGBINIT@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	orr	w9, w9, w10
	ldr	x10, [x19]
	stp	w8, w9, [sp, #24]
	stp	xzr, x10, [sp, #56]
	stp	xzr, xzr, [sp, #40]
	add	x0, sp, #24
	bl	_ChooseColor
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w8, [sp, #32]
	str	w8, [x21]
Lloh28:
	adrp	x21, _TRUE@GOTPAGE
Lloh29:
	ldr	x21, [x21, _TRUE@GOTPAGEOFF]
	ldr	w8, [x21]
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_GetParent
	mov	x1, x20
	bl	_PropSheet_Changed
Lloh30:
	adrp	x8, _IDC_BACKGROUND_PREVIEW@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IDC_BACKGROUND_PREVIEW@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_GetDlgItem
	ldr	w2, [x21]
	mov	x1, #0
	bl	_InvalidateRect
	ldr	w20, [x22]
Lloh33:
	adrp	x0, l_.str@PAGE
Lloh34:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TEXT
	mov	x1, x0
Lloh35:
	adrp	x8, _KEY_SET_VALUE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _KEY_SET_VALUE@GOTPAGEOFF]
Lloh37:
	ldr	w3, [x8]
	sub	x4, x29, #56
	mov	x0, x20
	mov	w2, #0
	bl	_RegOpenKeyEx
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
	ldur	x20, [x29, #-56]
Lloh38:
	adrp	x0, l_.str.1@PAGE
Lloh39:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TEXT
	mov	x1, x0
Lloh40:
	adrp	x8, _REG_BINARY@GOTPAGE
Lloh41:
	ldr	x8, [x8, _REG_BINARY@GOTPAGEOFF]
Lloh42:
	ldr	w3, [x8]
	ldr	w4, [x19]
	mov	x0, x20
	mov	w2, #0
	mov	w5, #8
	bl	_RegSetValueEx
	ldur	x0, [x29, #-56]
	bl	_RegCloseKey
LBB0_5:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR_SUCCESS,8,3              ; @ERROR_SUCCESS
	.comm	_HKEY_CURRENT_USER,4,2          ; @HKEY_CURRENT_USER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Control Panel\\Appearance"

	.comm	_REG_OPTION_NON_VOLATILE,4,2    ; @REG_OPTION_NON_VOLATILE
	.comm	_KEY_QUERY_VALUE,4,2            ; @KEY_QUERY_VALUE
	.comm	_REG_BINARY,4,2                 ; @REG_BINARY
l_.str.1:                               ; @.str.1
	.asciz	"CustomColors"

	.comm	_g_GlobalData,4,2               ; @g_GlobalData
	.comm	_CC_ANYCOLOR,4,2                ; @CC_ANYCOLOR
	.comm	_CC_FULLOPEN,4,2                ; @CC_FULLOPEN
	.comm	_CC_RGBINIT,4,2                 ; @CC_RGBINIT
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_IDC_BACKGROUND_PREVIEW,4,2     ; @IDC_BACKGROUND_PREVIEW
	.comm	_KEY_SET_VALUE,4,2              ; @KEY_SET_VALUE
	.no_dead_strip	_OnColorButton
.subsections_via_symbols
