	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function NOTEPAD_InitMenuPopup
_NOTEPAD_InitMenuPopup:                 ## @NOTEPAD_InitMenuPopup
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movl	%esi, %edi
	callq	_UNREFERENCED_PARAMETER
	movq	_Globals@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_GetMenu
	movq	_CMD_WRAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_MF_BYCOMMAND@GOTPCREL(%rip), %rbx
	cmpq	$0, 16(%r15)
	jne	LBB0_1
## %bb.2:
	movq	_MF_UNCHECKED@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_MF_CHECKED@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %edx
	orl	(%rbx), %edx
	movl	%eax, %edi
	callq	_CheckMenuItem
	cmpq	$0, 16(%r15)
	jne	LBB0_8
## %bb.4:
	movl	(%r15), %edi
	callq	_GetMenu
	movq	_CMD_STATUSBAR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cmpq	$0, 8(%r15)
	jne	LBB0_5
## %bb.6:
	movq	_MF_UNCHECKED@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	movq	_MF_CHECKED@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %edx
	orl	(%rbx), %edx
	movl	%eax, %edi
	callq	_CheckMenuItem
LBB0_8:
	movq	_CMD_UNDO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	4(%r15), %edi
	movq	_EM_CANUNDO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessage
	testq	%rax, %rax
	movq	_MF_ENABLED@GOTPCREL(%rip), %r13
	movq	_MF_GRAYED@GOTPCREL(%rip), %r12
	movq	%r13, %rax
	cmoveq	%r12, %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_EnableMenuItem
	movq	_CMD_PASTE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_CF_TEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IsClipboardFormatAvailable
	testq	%rax, %rax
	movq	%r13, %rax
	cmoveq	%r12, %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_EnableMenuItem
	movl	4(%r15), %edi
	movq	_EM_GETSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessage
	movq	%rax, %rbx
	movl	%ebx, %edi
	callq	_HIWORD
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_LOWORD
	cmpq	%rax, %r15
	movq	%r13, %rax
	cmoveq	%r12, %rax
	movl	(%rax), %ebx
	movq	_CMD_CUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	movl	%ebx, %edx
	callq	_EnableMenuItem
	movq	_CMD_COPY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	movl	%ebx, %edx
	callq	_EnableMenuItem
	movq	_CMD_DELETE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	movl	%ebx, %edx
	callq	_EnableMenuItem
	movq	_CMD_SELECT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_Globals@GOTPCREL(%rip), %r15
	movl	4(%r15), %edi
	callq	_GetWindowTextLength
	testq	%rax, %rax
	cmoveq	%r12, %r13
	movl	(%r13), %edx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_EnableMenuItem
	movl	(%r15), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DrawMenuBar                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_Globals,24,3                   ## @Globals
	.comm	_CMD_WRAP,4,2                   ## @CMD_WRAP
	.comm	_MF_BYCOMMAND,4,2               ## @MF_BYCOMMAND
	.comm	_MF_CHECKED,4,2                 ## @MF_CHECKED
	.comm	_MF_UNCHECKED,4,2               ## @MF_UNCHECKED
	.comm	_CMD_STATUSBAR,4,2              ## @CMD_STATUSBAR
	.comm	_CMD_UNDO,4,2                   ## @CMD_UNDO
	.comm	_EM_CANUNDO,4,2                 ## @EM_CANUNDO
	.comm	_MF_ENABLED,4,2                 ## @MF_ENABLED
	.comm	_MF_GRAYED,4,2                  ## @MF_GRAYED
	.comm	_CMD_PASTE,4,2                  ## @CMD_PASTE
	.comm	_CF_TEXT,4,2                    ## @CF_TEXT
	.comm	_EM_GETSEL,4,2                  ## @EM_GETSEL
	.comm	_CMD_CUT,4,2                    ## @CMD_CUT
	.comm	_CMD_COPY,4,2                   ## @CMD_COPY
	.comm	_CMD_DELETE,4,2                 ## @CMD_DELETE
	.comm	_CMD_SELECT_ALL,4,2             ## @CMD_SELECT_ALL
	.no_dead_strip	_NOTEPAD_InitMenuPopup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function NOTEPAD_InitMenuPopup
_NOTEPAD_InitMenuPopup:                 ; @NOTEPAD_InitMenuPopup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	mov	x0, x1
	bl	_UNREFERENCED_PARAMETER
Lloh0:
	adrp	x22, _Globals@GOTPAGE
Lloh1:
	ldr	x22, [x22, _Globals@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_GetMenu
Lloh2:
	adrp	x8, _CMD_WRAP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMD_WRAP@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x20, _MF_BYCOMMAND@GOTPAGE
Lloh6:
	ldr	x20, [x20, _MF_BYCOMMAND@GOTPAGEOFF]
	ldr	w8, [x20]
	ldr	x9, [x22, #16]
Lloh7:
	adrp	x21, _MF_CHECKED@GOTPAGE
Lloh8:
	ldr	x21, [x21, _MF_CHECKED@GOTPAGEOFF]
Lloh9:
	adrp	x23, _MF_UNCHECKED@GOTPAGE
Lloh10:
	ldr	x23, [x23, _MF_UNCHECKED@GOTPAGEOFF]
	cmp	x9, #0
	csel	x9, x23, x21, eq
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_CheckMenuItem
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x22]
	bl	_GetMenu
Lloh11:
	adrp	x8, _CMD_STATUSBAR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CMD_STATUSBAR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w8, [x20]
	ldr	x9, [x22, #8]
	cmp	x9, #0
	csel	x9, x23, x21, eq
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_CheckMenuItem
LBB0_2:
Lloh14:
	adrp	x8, _CMD_UNDO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CMD_UNDO@GOTPAGEOFF]
Lloh16:
	ldr	w20, [x8]
	ldr	w0, [x22, #4]
Lloh17:
	adrp	x8, _EM_CANUNDO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EM_CANUNDO@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #0
	bl	_SendMessage
Lloh20:
	adrp	x23, _MF_ENABLED@GOTPAGE
Lloh21:
	ldr	x23, [x23, _MF_ENABLED@GOTPAGEOFF]
Lloh22:
	adrp	x24, _MF_GRAYED@GOTPAGE
Lloh23:
	ldr	x24, [x24, _MF_GRAYED@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x24, x23, eq
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_EnableMenuItem
Lloh24:
	adrp	x8, _CMD_PASTE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CMD_PASTE@GOTPAGEOFF]
Lloh26:
	ldr	w20, [x8]
Lloh27:
	adrp	x8, _CF_TEXT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CF_TEXT@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_IsClipboardFormatAvailable
	cmp	x0, #0
	csel	x8, x24, x23, eq
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_EnableMenuItem
	ldr	w0, [x22, #4]
Lloh30:
	adrp	x8, _EM_GETSEL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EM_GETSEL@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #0
	bl	_SendMessage
	mov	x20, x0
	bl	_HIWORD
	mov	x21, x0
	mov	x0, x20
	bl	_LOWORD
	cmp	x21, x0
	csel	x8, x24, x23, eq
	ldr	w20, [x8]
Lloh33:
	adrp	x8, _CMD_CUT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CMD_CUT@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_EnableMenuItem
Lloh36:
	adrp	x8, _CMD_COPY@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CMD_COPY@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_EnableMenuItem
Lloh39:
	adrp	x8, _CMD_DELETE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CMD_DELETE@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_EnableMenuItem
Lloh42:
	adrp	x8, _CMD_SELECT_ALL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _CMD_SELECT_ALL@GOTPAGEOFF]
Lloh44:
	ldr	w20, [x8]
	ldr	w0, [x22, #4]
	bl	_GetWindowTextLength
	cmp	x0, #0
	csel	x8, x24, x23, eq
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_EnableMenuItem
	ldr	w0, [x22]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_DrawMenuBar
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_Globals,24,3                   ; @Globals
	.comm	_CMD_WRAP,4,2                   ; @CMD_WRAP
	.comm	_MF_BYCOMMAND,4,2               ; @MF_BYCOMMAND
	.comm	_MF_CHECKED,4,2                 ; @MF_CHECKED
	.comm	_MF_UNCHECKED,4,2               ; @MF_UNCHECKED
	.comm	_CMD_STATUSBAR,4,2              ; @CMD_STATUSBAR
	.comm	_CMD_UNDO,4,2                   ; @CMD_UNDO
	.comm	_EM_CANUNDO,4,2                 ; @EM_CANUNDO
	.comm	_MF_ENABLED,4,2                 ; @MF_ENABLED
	.comm	_MF_GRAYED,4,2                  ; @MF_GRAYED
	.comm	_CMD_PASTE,4,2                  ; @CMD_PASTE
	.comm	_CF_TEXT,4,2                    ; @CF_TEXT
	.comm	_EM_GETSEL,4,2                  ; @EM_GETSEL
	.comm	_CMD_CUT,4,2                    ; @CMD_CUT
	.comm	_CMD_COPY,4,2                   ; @CMD_COPY
	.comm	_CMD_DELETE,4,2                 ; @CMD_DELETE
	.comm	_CMD_SELECT_ALL,4,2             ; @CMD_SELECT_ALL
	.no_dead_strip	_NOTEPAD_InitMenuPopup
.subsections_via_symbols
