	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TOOLTIPS_CheckTool
_TOOLTIPS_CheckTool:                    ## @TOOLTIPS_CheckTool
	.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	%rsi, %r12
	movq	%rdi, %r13
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_GetCursorPos
	movl	8(%r13), %edi
	movq	_TTM_WINDOWFROMPOINT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	callq	_SendMessageW
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	leaq	-44(%rbp), %r15
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_ScreenToClient
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_TOOLTIPS_GetToolFromPoint
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.2:
	movl	%eax, %r15d
	movl	8(%r13), %edi
	movq	_GWL_STYLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetWindowLongW
	testq	%r12, %r12
	je	LBB0_6
## %bb.3:
	movq	_TTS_ALWAYSTIP@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	jne	LBB0_6
## %bb.4:
	movq	(%r13), %rax
	movslq	%r15d, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rdx
	movq	_TTF_IDISHWND@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	xorl	%edi, %edi
	andl	(%rax,%rcx,8), %esi
	setne	%dil
	movq	8(%rdx,%rdi,8), %rbx
	movq	%rbx, %rdi
	callq	_TOOLTIPS_IsWindowActive
	testl	%eax, %eax
	je	LBB0_5
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_TRACE
	movl	%r15d, %r14d
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	callq	_GetParent
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_GetActiveWindow
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_TRACE
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_WINDOWFROMPOINT,4,2        ## @TTM_WINDOWFROMPOINT
	.comm	_GWL_STYLE,4,2                  ## @GWL_STYLE
	.comm	_TTS_ALWAYSTIP,4,2              ## @TTS_ALWAYSTIP
	.comm	_TTF_IDISHWND,4,2               ## @TTF_IDISHWND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not active: hwnd %p, parent %p, active %p\n"

L_.str.1:                               ## @.str.1
	.asciz	"tool %d\n"

	.no_dead_strip	_TOOLTIPS_CheckTool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TOOLTIPS_CheckTool
_TOOLTIPS_CheckTool:                    ; @TOOLTIPS_CheckTool
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
	add	x0, sp, #28
	bl	_GetCursorPos
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x8, _TTM_WINDOWFROMPOINT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTM_WINDOWFROMPOINT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x3, sp, #28
	mov	w2, #0
	bl	_SendMessageW
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	add	x1, sp, #28
	bl	_ScreenToClient
	add	x2, sp, #28
	mov	x0, x20
	mov	x1, x19
	bl	_TOOLTIPS_GetToolFromPoint
	mov	x19, x0
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.2:
	ldr	w0, [x20, #8]
Lloh3:
	adrp	x8, _GWL_STYLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GWL_STYLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_GetWindowLongW
	cbz	x21, LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _TTS_ALWAYSTIP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TTS_ALWAYSTIP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w0
	cbnz	w8, LBB0_5
; %bb.4:
	ldr	x8, [x20]
	mov	w9, #24
	smaddl	x8, w19, w9, x8
	add	x9, x8, #16
	ldr	w10, [x8], #8
Lloh9:
	adrp	x11, _TTF_IDISHWND@GOTPAGE
Lloh10:
	ldr	x11, [x11, _TTF_IDISHWND@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	tst	w11, w10
	csel	x8, x8, x9, eq
	ldr	x20, [x8]
	mov	x0, x20
	bl	_TOOLTIPS_IsWindowActive
	cbz	w0, LBB0_6
LBB0_5:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	b	LBB0_8
LBB0_6:
	mov	x0, x20
	bl	_GetParent
	mov	x19, x0
	bl	_GetActiveWindow
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TRACE
LBB0_7:
	mov	w19, #-1
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_WINDOWFROMPOINT,4,2        ; @TTM_WINDOWFROMPOINT
	.comm	_GWL_STYLE,4,2                  ; @GWL_STYLE
	.comm	_TTS_ALWAYSTIP,4,2              ; @TTS_ALWAYSTIP
	.comm	_TTF_IDISHWND,4,2               ; @TTF_IDISHWND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not active: hwnd %p, parent %p, active %p\n"

l_.str.1:                               ; @.str.1
	.asciz	"tool %d\n"

	.no_dead_strip	_TOOLTIPS_CheckTool
.subsections_via_symbols
