	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UpdateDisplayMenu
_UpdateDisplayMenu:                     ## @UpdateDisplayMenu
	.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
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_FMT_NAME_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_Globals@GOTPCREL(%rip), %rax
	movl	8(%rax), %edi
	movq	_DISPLAY_MENU_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetSubMenu
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_GetMenuItemCount
	cmpl	$2, %eax
	jl	LBB0_3
## %bb.1:
	movq	_MF_BYPOSITION@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	movl	%r15d, %edi
	movl	$1, %esi
	callq	_DeleteMenu
	movl	%r15d, %edi
	callq	_GetMenuItemCount
	cmpl	$1, %eax
	jg	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	callq	_CountClipboardFormats
	testq	%rax, %rax
	je	LBB0_16
## %bb.4:
	movq	_Globals@GOTPCREL(%rip), %rax
	movl	4(%rax), %edi
	callq	_OpenClipboard
	testl	%eax, %eax
	je	LBB0_16
## %bb.5:
	movq	_MF_SEPARATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_AppendMenuW
	xorl	%edi, %edi
	callq	_EnumClipboardFormats
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%rax, %rbx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_EnumClipboardFormats
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_IsClipboardFormatSupported
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_Globals@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r14, %rdi
	callq	_ARRAYSIZE
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movq	%r14, %rcx
	movl	%eax, %r8d
	callq	_RetrieveClipboardFormatName
	movq	_MF_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CMD_AUTOMATIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%rbx, %rdx
	movl	%r15d, %edi
	movq	%r14, %rcx
	callq	_AppendMenuW
	jmp	LBB0_9
LBB0_10:
	xorl	%edi, %edi
	callq	_EnumClipboardFormats
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	movq	%rax, %rbx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%rbx, %rdi
	callq	_EnumClipboardFormats
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_IsClipboardFormatSupported
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_Globals@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r14, %rdi
	callq	_ARRAYSIZE
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movq	%r14, %rcx
	movl	%eax, %r8d
	callq	_RetrieveClipboardFormatName
	movq	_MF_GRAYED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MF_STRING@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_AppendMenuW
	jmp	LBB0_14
LBB0_15:
	xorl	%eax, %eax
	callq	_CloseClipboard
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_FMT_NAME_LEN,4,2           ## @MAX_FMT_NAME_LEN
	.comm	_Globals,12,2                   ## @Globals
	.comm	_DISPLAY_MENU_POS,4,2           ## @DISPLAY_MENU_POS
	.comm	_MF_BYPOSITION,4,2              ## @MF_BYPOSITION
	.comm	_MF_SEPARATOR,4,2               ## @MF_SEPARATOR
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_MF_STRING,4,2                  ## @MF_STRING
	.comm	_CMD_AUTOMATIC,8,3              ## @CMD_AUTOMATIC
	.comm	_MF_GRAYED,4,2                  ## @MF_GRAYED
	.no_dead_strip	_UpdateDisplayMenu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UpdateDisplayMenu
_UpdateDisplayMenu:                     ; @UpdateDisplayMenu
	.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, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAX_FMT_NAME_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_FMT_NAME_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, #1
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x24, _Globals@GOTPAGE
Lloh9:
	ldr	x24, [x24, _Globals@GOTPAGEOFF]
	ldr	w0, [x24, #8]
Lloh10:
	adrp	x8, _DISPLAY_MENU_POS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DISPLAY_MENU_POS@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_GetSubMenu
	mov	x20, x0
	bl	_GetMenuItemCount
	cmp	w0, #2
	b.lt	LBB0_3
; %bb.1:
Lloh13:
	adrp	x21, _MF_BYPOSITION@GOTPAGE
Lloh14:
	ldr	x21, [x21, _MF_BYPOSITION@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #1
	bl	_DeleteMenu
	mov	x0, x20
	bl	_GetMenuItemCount
	cmp	w0, #1
	b.gt	LBB0_2
LBB0_3:
	bl	_CountClipboardFormats
	cbz	x0, LBB0_16
; %bb.4:
	ldr	w0, [x24, #4]
	bl	_OpenClipboard
	cbz	w0, LBB0_16
; %bb.5:
Lloh15:
	adrp	x8, _MF_SEPARATOR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MF_SEPARATOR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, #0
	mov	x3, #0
	bl	_AppendMenuW
	mov	x0, #0
	bl	_EnumClipboardFormats
Lloh18:
	adrp	x25, _TRUE@GOTPAGE
Lloh19:
	ldr	x25, [x25, _TRUE@GOTPAGEOFF]
Lloh20:
	adrp	x26, _MF_STRING@GOTPAGE
Lloh21:
	ldr	x26, [x26, _MF_STRING@GOTPAGEOFF]
	cbz	x0, LBB0_10
; %bb.6:
	mov	x21, x0
Lloh22:
	adrp	x27, _CMD_AUTOMATIC@GOTPAGE
Lloh23:
	ldr	x27, [x27, _CMD_AUTOMATIC@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	bl	_EnumClipboardFormats
	mov	x21, x0
	cbz	x0, LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_IsClipboardFormatSupported
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w22, [x24]
	ldr	w23, [x25]
	mov	x0, x19
	bl	_ARRAYSIZE
	mov	x4, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	mov	x3, x19
	bl	_RetrieveClipboardFormatName
	ldr	w1, [x26]
	ldr	x8, [x27]
	add	x2, x8, x21
	mov	x0, x20
	mov	x3, x19
	bl	_AppendMenuW
	b	LBB0_7
LBB0_10:
	mov	x0, #0
	bl	_EnumClipboardFormats
	cbz	x0, LBB0_15
; %bb.11:
	mov	x21, x0
Lloh24:
	adrp	x27, _MF_GRAYED@GOTPAGE
Lloh25:
	ldr	x27, [x27, _MF_GRAYED@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x21
	bl	_EnumClipboardFormats
	mov	x21, x0
	cbz	x0, LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_IsClipboardFormatSupported
	cbnz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w22, [x24]
	ldr	w23, [x25]
	mov	x0, x19
	bl	_ARRAYSIZE
	mov	x4, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	mov	x3, x19
	bl	_RetrieveClipboardFormatName
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w1, w9, w8
	mov	x0, x20
	mov	x2, #0
	mov	x3, x19
	bl	_AppendMenuW
	b	LBB0_12
LBB0_15:
	bl	_CloseClipboard
LBB0_16:
	ldur	x8, [x29, #-88]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	sub	sp, x29, #80
	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_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_FMT_NAME_LEN,4,2           ; @MAX_FMT_NAME_LEN
	.comm	_Globals,12,2                   ; @Globals
	.comm	_DISPLAY_MENU_POS,4,2           ; @DISPLAY_MENU_POS
	.comm	_MF_BYPOSITION,4,2              ; @MF_BYPOSITION
	.comm	_MF_SEPARATOR,4,2               ; @MF_SEPARATOR
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_MF_STRING,4,2                  ; @MF_STRING
	.comm	_CMD_AUTOMATIC,8,3              ; @CMD_AUTOMATIC
	.comm	_MF_GRAYED,4,2                  ; @MF_GRAYED
	.no_dead_strip	_UpdateDisplayMenu
.subsections_via_symbols
