	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CenterWindow
_CenterWindow:                          ## @CenterWindow
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_GetParent
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_GetDesktopWindow
LBB0_2:
	leaq	-40(%rbp), %rsi
	movq	%rax, %rdi
	callq	_GetWindowRect
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_GetWindowRect
	movq	_HWND_TOP@GOTPCREL(%rip), %rax
	movl	-36(%rbp), %ecx
	addl	-24(%rbp), %ecx
	movl	-40(%rbp), %edi
	subl	%ecx, %edi
	addl	-20(%rbp), %edi
	movl	(%rax), %esi
	movl	%edi, %edx
	shrl	$31, %edx
	addl	%edi, %edx
	sarl	%edx
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %ecx
	addl	-16(%rbp), %ecx
	subl	%ecx, %eax
	addl	-12(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movq	_SWP_NOSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_SetWindowPos
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HWND_TOP,4,2                   ## @HWND_TOP
	.comm	_SWP_NOSIZE,4,2                 ## @SWP_NOSIZE
	.no_dead_strip	_CenterWindow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CenterWindow
_CenterWindow:                          ; @CenterWindow
	.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	x19, x0
	bl	_GetParent
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_GetDesktopWindow
LBB0_2:
	add	x1, sp, #16
	bl	_GetWindowRect
	mov	x1, sp
	mov	x0, x19
	bl	_GetWindowRect
Lloh0:
	adrp	x8, _HWND_TOP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HWND_TOP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	w8, w9, [sp, #16]
	ldp	w10, w11, [sp]
	add	w9, w9, w10
	sub	w8, w8, w9
	add	w8, w8, w11
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w2, w8, #1
	ldp	w8, w9, [sp, #24]
	ldp	w10, w11, [sp, #8]
	add	w9, w9, w10
	sub	w8, w8, w9
	add	w8, w8, w11
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w3, w8, #1
Lloh3:
	adrp	x8, _SWP_NOSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SWP_NOSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
	mov	x0, x19
	mov	w4, #0
	mov	w5, #0
	bl	_SetWindowPos
	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	_HWND_TOP,4,2                   ; @HWND_TOP
	.comm	_SWP_NOSIZE,4,2                 ; @SWP_NOSIZE
	.no_dead_strip	_CenterWindow
.subsections_via_symbols
