	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function OnInitMenu
_OnInitMenu:                            ## @OnInitMenu
	.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	$2104, %rsp                     ## imm = 0x838
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -2104(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -2112(%rbp)               ## 8-byte Spill
	callq	_GetMenu
	movq	_FAVORITES_MENU_POSITION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_GetSubMenu
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	movl	%eax, %r14d
	movl	_OnInitMenu.s_nFavoriteMenuSubPos(%rip), %esi
	testl	%esi, %esi
	js	LBB0_18
## %bb.2:
	movq	_MF_BYPOSITION@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	movl	%r14d, %edi
	callq	_RemoveMenu
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	_OnInitMenu.s_nFavoriteMenuSubPos(%rip), %esi
	jmp	LBB0_4
LBB0_18:
	movl	%r14d, %edi
	callq	_GetMenuItemCount
	movl	%eax, _OnInitMenu.s_nFavoriteMenuSubPos(%rip)
LBB0_5:
	movq	_HKEY_CURRENT_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_s_szFavoritesRegKey@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-2104(%rbp), %rdx
	callq	_RegOpenKeyW
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_14
## %bb.6:
	xorl	%ebx, %ebx
	leaq	-1072(%rbp), %r15
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rax
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	cmpq	%rax, %r12
	jne	LBB0_14
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_COUNT_OF
	movq	%rax, -2136(%rbp)
	movq	$1024, -2128(%rbp)              ## imm = 0x400
	movq	-2104(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	leaq	-2136(%rbp), %rcx
	xorl	%r8d, %r8d
	leaq	-2120(%rbp), %r9
	leaq	-2128(%rbp), %rax
	pushq	%rax
	leaq	-2096(%rbp), %rax
	pushq	%rax
	callq	_RegEnumValueW
	addq	$16, %rsp
	movq	%rax, %r12
	movq	(%r13), %rax
	cmpq	%rax, %r12
	jne	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-2120(%rbp), %rax
	movq	_REG_SZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, -2112(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_MF_SEPARATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_AppendMenu
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -2112(%rbp)               ## 8-byte Spill
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_ID_FAVORITES_MIN@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%r14d, %edi
	callq	_GetMenuItemCount
	movslq	%eax, %rdx
	addq	%r13, %rdx
	movl	%r14d, %edi
	xorl	%esi, %esi
	movq	%r15, %rcx
	callq	_AppendMenu
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	jmp	LBB0_13
LBB0_14:
	movq	-2104(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_RegCloseKey
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.17:
	addq	$2104, %rsp                     ## imm = 0x838
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @OnInitMenu.s_nFavoriteMenuSubPos
_OnInitMenu.s_nFavoriteMenuSubPos:
	.long	4294967295                      ## 0xffffffff

	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_FAVORITES_MENU_POSITION,4,2    ## @FAVORITES_MENU_POSITION
	.comm	_MF_BYPOSITION,4,2              ## @MF_BYPOSITION
	.comm	_HKEY_CURRENT_USER,4,2          ## @HKEY_CURRENT_USER
	.comm	_s_szFavoritesRegKey,4,2        ## @s_szFavoritesRegKey
	.comm	_ERROR_SUCCESS,8,3              ## @ERROR_SUCCESS
	.comm	_REG_SZ,8,3                     ## @REG_SZ
	.comm	_MF_SEPARATOR,4,2               ## @MF_SEPARATOR
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_ID_FAVORITES_MIN,8,3           ## @ID_FAVORITES_MIN
	.no_dead_strip	_OnInitMenu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function OnInitMenu
_OnInitMenu:                            ; @OnInitMenu
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #2096
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	str	xzr, [sp, #24]
Lloh3:
	adrp	x8, _FALSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
	bl	_GetMenu
Lloh6:
	adrp	x8, _FAVORITES_MENU_POSITION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FAVORITES_MENU_POSITION@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_GetSubMenu
	cbz	w0, LBB0_15
; %bb.1:
	mov	x19, x0
	adrp	x20, _OnInitMenu.s_nFavoriteMenuSubPos@PAGE
	ldr	w1, [x20, _OnInitMenu.s_nFavoriteMenuSubPos@PAGEOFF]
	tbnz	w1, #31, LBB0_5
; %bb.2:
Lloh9:
	adrp	x21, _MF_BYPOSITION@GOTPAGE
Lloh10:
	ldr	x21, [x21, _MF_BYPOSITION@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21]
	mov	x0, x19
	bl	_RemoveMenu
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x20, _OnInitMenu.s_nFavoriteMenuSubPos@PAGEOFF]
	b	LBB0_3
LBB0_5:
	mov	x0, x19
	bl	_GetMenuItemCount
	str	w0, [x20, _OnInitMenu.s_nFavoriteMenuSubPos@PAGEOFF]
LBB0_6:
Lloh11:
	adrp	x8, _HKEY_CURRENT_USER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HKEY_CURRENT_USER@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _s_szFavoritesRegKey@GOTPAGE
Lloh15:
	ldr	x8, [x8, _s_szFavoritesRegKey@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x2, sp, #24
	bl	_RegOpenKeyW
Lloh17:
	adrp	x23, _ERROR_SUCCESS@GOTPAGE
Lloh18:
	ldr	x23, [x23, _ERROR_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.7:
	mov	x20, #0
	mov	w24, #1024
Lloh19:
	adrp	x25, _REG_SZ@GOTPAGE
Lloh20:
	ldr	x25, [x25, _REG_SZ@GOTPAGEOFF]
Lloh21:
	adrp	x27, _TRUE@GOTPAGE
Lloh22:
	ldr	x27, [x27, _TRUE@GOTPAGEOFF]
Lloh23:
	adrp	x28, _ID_FAVORITES_MIN@GOTPAGE
Lloh24:
	ldr	x28, [x28, _ID_FAVORITES_MIN@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x8, x21
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x20, x20, #1
	cmp	x21, x8
	b.ne	LBB0_15
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #1056
	bl	_COUNT_OF
	stp	x24, x0, [sp, #8]
	ldr	x0, [sp, #24]
	add	x2, sp, #1056
	add	x3, sp, #16
	mov	x5, sp
	add	x6, sp, #32
	add	x7, sp, #8
	mov	x1, x20
	mov	x4, #0
	bl	_RegEnumValueW
	mov	x21, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [sp]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	cbnz	x22, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh25:
	adrp	x8, _MF_SEPARATOR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MF_SEPARATOR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	x3, #0
	bl	_AppendMenu
	ldr	x22, [x27]
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	x26, [x28]
	mov	x0, x19
	bl	_GetMenuItemCount
	add	x2, x26, w0, sxtw
	add	x3, sp, #1056
	mov	x0, x19
	mov	w1, #0
	bl	_AppendMenu
	ldr	x8, [x23]
	b	LBB0_9
LBB0_15:
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_17
; %bb.16:
	bl	_RegCloseKey
LBB0_17:
	ldur	x8, [x29, #-96]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	add	sp, sp, #2096
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @OnInitMenu.s_nFavoriteMenuSubPos
_OnInitMenu.s_nFavoriteMenuSubPos:
	.long	4294967295                      ; 0xffffffff

	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_FAVORITES_MENU_POSITION,4,2    ; @FAVORITES_MENU_POSITION
	.comm	_MF_BYPOSITION,4,2              ; @MF_BYPOSITION
	.comm	_HKEY_CURRENT_USER,4,2          ; @HKEY_CURRENT_USER
	.comm	_s_szFavoritesRegKey,4,2        ; @s_szFavoritesRegKey
	.comm	_ERROR_SUCCESS,8,3              ; @ERROR_SUCCESS
	.comm	_REG_SZ,8,3                     ; @REG_SZ
	.comm	_MF_SEPARATOR,4,2               ; @MF_SEPARATOR
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_ID_FAVORITES_MIN,8,3           ; @ID_FAVORITES_MIN
	.no_dead_strip	_OnInitMenu
.subsections_via_symbols
