	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function taskdialog_get_reference_rect
_taskdialog_get_reference_rect:         ## @taskdialog_get_reference_rect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_GetActiveWindow
	movq	%rax, %rdi
LBB0_2:
	movq	_MONITOR_DEFAULTTOPRIMARY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MonitorFromWindow
	movl	$20, -40(%rbp)
	leaq	-40(%rbp), %rsi
	movl	%eax, %edi
	callq	_GetMonitorInfoW
	movq	(%r14), %rax
	movq	_TDF_POSITION_RELATIVE_TO_WINDOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.3:
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rsi
	callq	_GetWindowRect
	jmp	LBB0_6
LBB0_5:
	movups	-36(%rbp), %xmm0
	movups	%xmm0, (%rbx)
LBB0_6:
	leaq	12(%rbx), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_pixels_to_dialogunits
	leaq	4(%rbx), %rsi
	addq	$8, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_pixels_to_dialogunits
	leaq	-36(%rbp), %rsi
	leaq	-24(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pixels_to_dialogunits
	leaq	-32(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pixels_to_dialogunits
	movl	-32(%rbp), %eax
	subl	-36(%rbp), %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MONITOR_DEFAULTTOPRIMARY,4,2   ## @MONITOR_DEFAULTTOPRIMARY
	.comm	_TDF_POSITION_RELATIVE_TO_WINDOW,4,2 ## @TDF_POSITION_RELATIVE_TO_WINDOW
	.no_dead_strip	_taskdialog_get_reference_rect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function taskdialog_get_reference_rect
_taskdialog_get_reference_rect:         ; @taskdialog_get_reference_rect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x0, [x8, #8]
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_GetActiveWindow
LBB0_2:
Lloh0:
	adrp	x8, _MONITOR_DEFAULTTOPRIMARY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MONITOR_DEFAULTTOPRIMARY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_MonitorFromWindow
	mov	w8, #20
	str	w8, [sp, #8]
	add	x1, sp, #8
	bl	_GetMonitorInfoW
	ldr	x8, [x19]
	ldr	w9, [x8]
Lloh3:
	adrp	x10, _TDF_POSITION_RELATIVE_TO_WINDOW@GOTPAGE
Lloh4:
	ldr	x10, [x10, _TDF_POSITION_RELATIVE_TO_WINDOW@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.3:
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_5
; %bb.4:
	mov	x1, x20
	bl	_GetWindowRect
	b	LBB0_6
LBB0_5:
	ldur	q0, [sp, #12]
	str	q0, [x20]
LBB0_6:
	add	x2, x20, #12
	mov	x0, x19
	mov	x1, x20
	bl	_pixels_to_dialogunits
	add	x1, x20, #4
	add	x2, x20, #8
	mov	x0, x19
	bl	_pixels_to_dialogunits
	add	x20, sp, #8
	orr	x1, x20, #0x4
	add	x2, x20, #16
	mov	x0, x19
	bl	_pixels_to_dialogunits
	add	x1, x20, #8
	add	x2, x20, #12
	mov	x0, x19
	bl	_pixels_to_dialogunits
	ldp	w9, w8, [sp, #12]
	sub	w0, w8, w9
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MONITOR_DEFAULTTOPRIMARY,4,2   ; @MONITOR_DEFAULTTOPRIMARY
	.comm	_TDF_POSITION_RELATIVE_TO_WINDOW,4,2 ; @TDF_POSITION_RELATIVE_TO_WINDOW
	.no_dead_strip	_taskdialog_get_reference_rect
.subsections_via_symbols
