	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function WINHELP_DeleteWindow
_WINHELP_DeleteWindow:                  ## @WINHELP_DeleteWindow
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_Globals@GOTPCREL(%rip), %r14
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.1:
	cmpq	%rbx, %rcx
	je	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rax
	movq	48(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rbx, %rcx
	jne	LBB0_3
## %bb.5:
	addq	$48, %rax
	jmp	LBB0_6
LBB0_2:
	leaq	8(%r14), %rax
LBB0_6:
	movq	48(%rbx), %rcx
	movq	%rcx, (%rax)
LBB0_7:
	cmpl	$4, (%r14)
	jl	LBB0_8
## %bb.9:
	movq	40(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_lstrcmpiA
	testl	%eax, %eax
	sete	%r15b
	cmpq	%rbx, 24(%r14)
	jne	LBB0_13
	jmp	LBB0_11
LBB0_8:
	xorl	%r15d, %r15d
	cmpq	%rbx, 24(%r14)
	jne	LBB0_13
LBB0_11:
	movq	8(%r14), %rax
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	32(%rax), %edi
	callq	_SetActiveWindow
LBB0_13:
	cmpq	%rbx, 16(%r14)
	jne	LBB0_15
## %bb.14:
	movq	$0, 16(%r14)
LBB0_15:
	movl	32(%rbx), %edi
	movq	_CTL_ID_TEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetDlgItem
	movq	_GWLP_WNDPROC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	24(%rbx), %edx
	movl	%eax, %edi
	callq	_SetWindowLongPtrA
	movq	%rbx, %rdi
	callq	_WINHELP_DeleteButtons
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	callq	_WINHELP_DeletePageLinks
LBB0_17:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.18:
	callq	_DestroyWindow
LBB0_19:
	movl	8(%rbx), %edi
	callq	_DeleteObject
	movq	%rbx, %rdi
	callq	_WINHELP_DeleteBackSet
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movl	(%rax), %edi
	callq	_HLPFILE_FreeHlpFile
LBB0_21:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_HeapFree
	testb	%r15b, %r15b
	je	LBB0_23
## %bb.22:
	xorl	%eax, %eax
	callq	_MACRO_Exit
LBB0_23:
	cmpq	$0, 8(%r14)
	je	LBB0_25
## %bb.24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PostQuitMessage                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_Globals,32,3                   ## @Globals
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"main"

	.comm	_CTL_ID_TEXT,4,2                ## @CTL_ID_TEXT
	.comm	_GWLP_WNDPROC,4,2               ## @GWLP_WNDPROC
	.no_dead_strip	_WINHELP_DeleteWindow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function WINHELP_DeleteWindow
_WINHELP_DeleteWindow:                  ; @WINHELP_DeleteWindow
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
Lloh0:
	adrp	x20, _Globals@GOTPAGE
Lloh1:
	ldr	x20, [x20, _Globals@GOTPAGEOFF]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.1:
	cmp	x8, x19
	b.eq	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x8
	ldr	x8, [x8, #48]
	cbz	x8, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x8, x19
	b.ne	LBB0_2
; %bb.4:
	add	x8, x9, #48
	b	LBB0_6
LBB0_5:
	add	x8, x20, #8
LBB0_6:
	ldr	x9, [x19, #48]
	str	x9, [x8]
LBB0_7:
	ldr	w8, [x20]
	cmp	w8, #4
	b.lt	LBB0_9
; %bb.8:
	ldr	x8, [x19, #40]
	ldr	w0, [x8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_lstrcmpiA
	cmp	w0, #0
	cset	w21, eq
	b	LBB0_10
LBB0_9:
	mov	w21, #0
LBB0_10:
	ldr	x8, [x20, #24]
	cmp	x8, x19
	b.ne	LBB0_13
; %bb.11:
	ldr	x8, [x20, #8]
	str	x8, [x20, #24]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	w0, [x8, #32]
	bl	_SetActiveWindow
LBB0_13:
	ldr	x8, [x20, #16]
	cmp	x8, x19
	b.ne	LBB0_15
; %bb.14:
	str	xzr, [x20, #16]
LBB0_15:
	ldr	w0, [x19, #32]
Lloh4:
	adrp	x8, _CTL_ID_TEXT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CTL_ID_TEXT@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_GetDlgItem
Lloh7:
	adrp	x8, _GWLP_WNDPROC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GWLP_WNDPROC@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x19, #24]
	bl	_SetWindowLongPtrA
	mov	x0, x19
	bl	_WINHELP_DeleteButtons
	ldr	x0, [x19]
	cbz	x0, LBB0_17
; %bb.16:
	bl	_WINHELP_DeletePageLinks
LBB0_17:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_19
; %bb.18:
	bl	_DestroyWindow
LBB0_19:
	ldr	w0, [x19, #8]
	bl	_DeleteObject
	mov	x0, x19
	bl	_WINHELP_DeleteBackSet
	ldr	x8, [x19]
	cbz	x8, LBB0_21
; %bb.20:
	ldr	w0, [x8]
	bl	_HLPFILE_FreeHlpFile
LBB0_21:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x19
	bl	_HeapFree
	cbz	w21, LBB0_23
; %bb.22:
	bl	_MACRO_Exit
LBB0_23:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_25
; %bb.24:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_25:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PostQuitMessage
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_Globals,32,3                   ; @Globals
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"main"

	.comm	_CTL_ID_TEXT,4,2                ; @CTL_ID_TEXT
	.comm	_GWLP_WNDPROC,4,2               ; @GWLP_WNDPROC
	.no_dead_strip	_WINHELP_DeleteWindow
.subsections_via_symbols
