	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function InitMonitorDialog
_InitMonitorDialog:                     ## @InitMonitorDialog
	.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	%rdi, %r14
	movq	16(%rdi), %rdi
	movq	$0, 16(%r14)
	testq	%rdi, %rdi
	je	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rbx
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_LocalFree
	movq	%rbx, %rdi
	testq	%rbx, %rbx
	jne	LBB0_1
LBB0_2:
	movq	$0, 8(%r14)
	movl	$0, (%r14)
	movq	56(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_LocalFree
LBB0_4:
	movl	24(%r14), %ebx
	movq	_DESK_EXT_DISPLAYDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RegisterClipboardFormat
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_QueryDeskCplString
	movq	%rax, 56(%r14)
	cmpq	$0, 48(%r14)
	je	LBB0_5
## %bb.6:
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	movl	$4, -48(%rbp)
	leaq	-48(%rbp), %rdx
	movq	%rax, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_EnumDisplayDevices
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	leaq	16(%r14), %r13
	movl	$1, %r12d
	leaq	-48(%rbp), %r15
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	$4, -48(%rbp)
	movq	56(%r14), %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_EnumDisplayDevices
	incl	%r12d
	testq	%rax, %rax
	je	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	_LMEM_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$16, %esi
	callq	_LocalAlloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$8, %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_CopyMemory
	movq	$0, (%rbx)
	movq	%rbx, (%r13)
	incl	(%r14)
	movq	%rbx, %r13
	jmp	LBB0_11
LBB0_12:
	movq	48(%r14), %rax
	movl	(%rax), %edi
	callq	*8(%rax)
	jmp	LBB0_13
LBB0_5:
	xorl	%eax, %eax
LBB0_13:
	movq	%rax, 32(%r14)
	movq	%rax, 40(%r14)
	movl	(%r14), %eax
	cmpl	$1, %eax
	je	LBB0_17
## %bb.14:
	testl	%eax, %eax
	jne	LBB0_18
## %bb.15:
	movl	24(%r14), %ebx
	movq	_DESK_EXT_MONITORNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RegisterClipboardFormat
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_QueryDeskCplString
	movq	%rax, %rbx
	movl	4(%r14), %edi
	movq	_IDC_MONITORNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_SetDlgItemText
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.16:
	movl	%ebx, %edi
	callq	_LocalFree
	jmp	LBB0_24
LBB0_17:
	movq	16(%r14), %rax
	movq	%rax, 8(%r14)
	movl	4(%r14), %edi
	movq	_IDC_MONITORNAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	8(%rax), %rdx
	callq	_SetDlgItemText
	jmp	LBB0_24
LBB0_18:
	movl	4(%r14), %edi
	movq	_IDC_MONITORLIST@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_LB_RESETCONTENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_SendDlgItemMessage
	movq	16(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.19:
	movq	_LB_ADDSTRING@GOTPCREL(%rip), %r13
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_24
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %edi
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	8(%rbx), %r8d
	xorl	%ecx, %ecx
	callq	_SendDlgItemMessage
	testq	%rax, %rax
	js	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%rax, %r15
	movl	4(%r14), %edi
	movl	(%r12), %esi
	movq	_LB_SETITEMDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	callq	_SendDlgItemMessage
	cmpq	$0, 8(%r14)
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	4(%r14), %edi
	movl	(%r12), %esi
	movq	_LB_SETCURSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	callq	_SendDlgItemMessage
	movq	%rbx, 8(%r14)
	jmp	LBB0_23
LBB0_24:
	movl	4(%r14), %edi
	movq	_IDC_MONITORNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetDlgItem
	cmpl	$2, (%r14)
	movq	_SW_SHOW@GOTPCREL(%rip), %r15
	movq	_SW_HIDE@GOTPCREL(%rip), %rbx
	movq	%rbx, %rcx
	cmovlq	%r15, %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_ShowWindow
	movl	4(%r14), %edi
	movq	_IDC_MONITORLIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetDlgItem
	cmpl	$2, (%r14)
	cmovgeq	%r15, %rbx
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_ShowWindow
	movq	%r14, %rdi
	callq	_UpdateRefreshFrequencyList
	movq	%r14, %rdi
	callq	_UpdateMonitorSelection
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DESK_EXT_DISPLAYDEVICE,4,2     ## @DESK_EXT_DISPLAYDEVICE
	.comm	_LMEM_FIXED,4,2                 ## @LMEM_FIXED
	.comm	_DESK_EXT_MONITORNAME,4,2       ## @DESK_EXT_MONITORNAME
	.comm	_IDC_MONITORNAME,4,2            ## @IDC_MONITORNAME
	.comm	_IDC_MONITORLIST,4,2            ## @IDC_MONITORLIST
	.comm	_LB_RESETCONTENT,4,2            ## @LB_RESETCONTENT
	.comm	_LB_ADDSTRING,4,2               ## @LB_ADDSTRING
	.comm	_LB_SETITEMDATA,4,2             ## @LB_SETITEMDATA
	.comm	_LB_SETCURSEL,4,2               ## @LB_SETCURSEL
	.comm	_SW_SHOW,4,2                    ## @SW_SHOW
	.comm	_SW_HIDE,4,2                    ## @SW_HIDE
	.no_dead_strip	_InitMonitorDialog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function InitMonitorDialog
_InitMonitorDialog:                     ; @InitMonitorDialog
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	mov	x22, x0
	ldr	x0, [x22, #16]!
	str	xzr, [x22]
	cbz	x0, LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x0]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_LocalFree
	mov	x0, x20
	cbnz	x20, LBB0_1
LBB0_2:
	str	xzr, [x19, #8]
	str	wzr, [x19]
	ldr	x0, [x19, #56]
	cbz	x0, LBB0_4
; %bb.3:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_LocalFree
LBB0_4:
	ldr	w20, [x19, #24]
Lloh0:
	adrp	x8, _DESK_EXT_DISPLAYDEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DESK_EXT_DISPLAYDEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RegisterClipboardFormat
	mov	x1, x0
	mov	x0, x20
	bl	_QueryDeskCplString
	str	x0, [x19, #56]
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_12
; %bb.5:
	cbz	x0, LBB0_11
; %bb.6:
	mov	w23, #4
	str	w23, [sp, #8]
	add	x2, sp, #8
	mov	w1, #0
	mov	w3, #0
	bl	_EnumDisplayDevices
	cbz	x0, LBB0_11
; %bb.7:
	mov	w20, #1
Lloh3:
	adrp	x24, _LMEM_FIXED@GOTPAGE
Lloh4:
	ldr	x24, [x24, _LMEM_FIXED@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	str	w23, [sp, #8]
	ldr	x0, [x19, #56]
	add	x2, sp, #8
	mov	x1, x20
	mov	w3, #0
	bl	_EnumDisplayDevices
	add	w20, w20, #1
	cbz	x0, LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	mov	w1, #16
	bl	_LocalAlloc
	cbz	x0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x21, x0
	add	x0, x0, #8
	add	x1, sp, #8
	mov	w2, #4
	bl	_CopyMemory
	str	xzr, [x21]
	str	x21, [x22]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	x22, x21
	b	LBB0_8
LBB0_11:
	ldr	x8, [x19, #48]
	ldr	x9, [x8, #8]
	ldr	w0, [x8]
	blr	x9
	b	LBB0_13
LBB0_12:
	mov	x0, #0
LBB0_13:
	stp	x0, x0, [x19, #32]
	ldr	w8, [x19]
Lloh5:
	adrp	x23, _IDC_MONITORNAME@GOTPAGE
Lloh6:
	ldr	x23, [x23, _IDC_MONITORNAME@GOTPAGEOFF]
Lloh7:
	adrp	x22, _IDC_MONITORLIST@GOTPAGE
Lloh8:
	ldr	x22, [x22, _IDC_MONITORLIST@GOTPAGEOFF]
	cmp	w8, #1
	b.eq	LBB0_17
; %bb.14:
	cbnz	w8, LBB0_18
; %bb.15:
	ldr	w20, [x19, #24]
Lloh9:
	adrp	x8, _DESK_EXT_MONITORNAME@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DESK_EXT_MONITORNAME@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_RegisterClipboardFormat
	mov	x1, x0
	mov	x0, x20
	bl	_QueryDeskCplString
	mov	x20, x0
	ldr	w0, [x19, #4]
	ldr	w1, [x23]
	mov	x2, x20
	bl	_SetDlgItemText
	cbz	x20, LBB0_24
; %bb.16:
	mov	x0, x20
	bl	_LocalFree
	b	LBB0_24
LBB0_17:
	ldr	x8, [x19, #16]
	str	x8, [x19, #8]
	ldr	w0, [x19, #4]
	ldr	w1, [x23]
	ldr	x2, [x8, #8]
	bl	_SetDlgItemText
	b	LBB0_24
LBB0_18:
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
Lloh12:
	adrp	x8, _LB_RESETCONTENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LB_RESETCONTENT@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	w3, #0
	mov	w4, #0
	bl	_SendDlgItemMessage
	ldr	x20, [x19, #16]
	cbz	x20, LBB0_24
; %bb.19:
Lloh15:
	adrp	x24, _LB_ADDSTRING@GOTPAGE
Lloh16:
	ldr	x24, [x24, _LB_ADDSTRING@GOTPAGEOFF]
Lloh17:
	adrp	x25, _LB_SETITEMDATA@GOTPAGE
Lloh18:
	ldr	x25, [x25, _LB_SETITEMDATA@GOTPAGEOFF]
Lloh19:
	adrp	x26, _LB_SETCURSEL@GOTPAGE
Lloh20:
	ldr	x26, [x26, _LB_SETCURSEL@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	x20, [x20]
	cbz	x20, LBB0_24
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	ldr	w2, [x24]
	ldr	w4, [x20, #8]
	mov	w3, #0
	bl	_SendDlgItemMessage
	tbnz	x0, #63, LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x21, x0
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	ldr	w2, [x25]
	mov	x3, x21
	mov	x4, x20
	bl	_SendDlgItemMessage
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_20
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	ldr	w2, [x26]
	mov	x3, x21
	mov	w4, #0
	bl	_SendDlgItemMessage
	str	x20, [x19, #8]
	b	LBB0_20
LBB0_24:
	ldr	w0, [x19, #4]
	ldr	w1, [x23]
	bl	_GetDlgItem
Lloh21:
	adrp	x20, _SW_SHOW@GOTPAGE
Lloh22:
	ldr	x20, [x20, _SW_SHOW@GOTPAGEOFF]
	ldr	w8, [x19]
Lloh23:
	adrp	x21, _SW_HIDE@GOTPAGE
Lloh24:
	ldr	x21, [x21, _SW_HIDE@GOTPAGEOFF]
	cmp	w8, #2
	csel	x8, x20, x21, lt
	ldr	w1, [x8]
	bl	_ShowWindow
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	bl	_GetDlgItem
	ldr	w8, [x19]
	cmp	w8, #1
	csel	x8, x20, x21, gt
	ldr	w1, [x8]
	bl	_ShowWindow
	mov	x0, x19
	bl	_UpdateRefreshFrequencyList
	mov	x0, x19
	bl	_UpdateMonitorSelection
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DESK_EXT_DISPLAYDEVICE,4,2     ; @DESK_EXT_DISPLAYDEVICE
	.comm	_LMEM_FIXED,4,2                 ; @LMEM_FIXED
	.comm	_DESK_EXT_MONITORNAME,4,2       ; @DESK_EXT_MONITORNAME
	.comm	_IDC_MONITORNAME,4,2            ; @IDC_MONITORNAME
	.comm	_IDC_MONITORLIST,4,2            ; @IDC_MONITORLIST
	.comm	_LB_RESETCONTENT,4,2            ; @LB_RESETCONTENT
	.comm	_LB_ADDSTRING,4,2               ; @LB_ADDSTRING
	.comm	_LB_SETITEMDATA,4,2             ; @LB_SETITEMDATA
	.comm	_LB_SETCURSEL,4,2               ; @LB_SETCURSEL
	.comm	_SW_SHOW,4,2                    ; @SW_SHOW
	.comm	_SW_HIDE,4,2                    ; @SW_HIDE
	.no_dead_strip	_InitMonitorDialog
.subsections_via_symbols
