	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SearchCHM_File
_SearchCHM_File:                        ## @SearchCHM_File
	.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
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_heap_alloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	$0, -96(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_STGM_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-96(%rbp), %r9
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_IStorage_OpenStream
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%r14, %rdi
	callq	_debugstr_w
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_FIXME
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_2
LBB0_7:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leaq	-144(%rbp), %r14
	movq	%r14, %rdi
	callq	_strbuf_init
	leaq	-112(%rbp), %rdi
	callq	_strbuf_init
	leaq	-128(%rbp), %rdi
	callq	_strbuf_init
	movq	-96(%rbp), %rsi
	leaq	-60(%rbp), %r15
	movq	%r15, %rdi
	callq	_stream_init
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_next_node
	testq	%rax, %rax
	je	LBB0_8
## %bb.15:
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	-144(%rbp), %rbx
	leaq	-128(%rbp), %r14
	leaq	-60(%rbp), %r15
	leaq	-112(%rbp), %r12
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	leal	(%rbx,%r12), %r14d
	addl	%r12d, %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_heap_realloc
	movq	%rbx, %rdx
	movq	%rax, %rbx
	movslq	%r12d, %rdi
	addq	%rax, %rdi
	movq	%r15, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movslq	%r14d, %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movb	$0, (%rbx,%rax)
	movl	%r14d, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	-144(%rbp), %rbx
	leaq	-128(%rbp), %r14
	leaq	-60(%rbp), %r15
	leaq	-112(%rbp), %r12
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	%rbx, %rdi
	callq	_strbuf_zero
	movq	%r12, %rdi
	callq	_strbuf_zero
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_next_node
	testq	%rax, %rax
	je	LBB0_9
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_get_node_name
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_next_content
	testq	%rax, %rax
	je	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	-112(%rbp), %r13d
	cmpl	$2, %r13d
	jl	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-104(%rbp), %r15
	incq	%r15
	leal	-1(%r13), %ebx
	movq	-120(%rbp), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edx
	callq	__strnicmp
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_MultiByteToWideChar
	movl	%eax, %r12d
	leal	1(%r12), %edi
	callq	_heap_alloc
	movq	%rbx, %r14
	movq	%rax, %rbx
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movq	%rbx, %r8
	movl	%r12d, %r9d
	callq	_MultiByteToWideChar
	movslq	%r12d, %rax
	movq	%rbx, %rcx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movb	$0, (%rbx,%rax)
	movq	%r14, %rbx
	jmp	LBB0_20
LBB0_9:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	jle	LBB0_12
## %bb.10:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movsbl	(%r15,%rbx), %edi
	callq	_tolower
	movb	%al, (%r15,%rbx)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_11
	jmp	LBB0_12
LBB0_8:
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_12:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_14:
	leaq	-144(%rbp), %rdi
	callq	_strbuf_free
	leaq	-112(%rbp), %rdi
	callq	_strbuf_free
	leaq	-128(%rbp), %rdi
	callq	_strbuf_free
LBB0_2:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_heap_free
	movq	-96(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_IStream_Release
LBB0_4:
	testl	%ebx, %ebx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_6
## %bb.5:
	movq	%rax, %rdi
	callq	_heap_free
	xorl	%eax, %eax
LBB0_6:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLOCK_SIZE,4,2                 ## @BLOCK_SIZE
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_STGM_READ,4,2                  ## @STGM_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not open '%s' stream: %08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"title"

	.comm	_CP_ACP,4,2                     ## @CP_ACP
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_SearchCHM_File
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SearchCHM_File
_SearchCHM_File:                        ; @SearchCHM_File
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLOCK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_heap_alloc
	mov	x19, x0
	str	xzr, [sp, #24]
Lloh3:
	adrp	x8, _FALSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
Lloh6:
	adrp	x8, _STGM_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STGM_READ@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	add	x5, sp, #24
	mov	x0, x22
	mov	x1, x21
	mov	x2, #0
	mov	w4, #0
	bl	_IStorage_OpenStream
	mov	x22, x0
	bl	_FAILED
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_debugstr_w
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	bl	_FIXME
	mov	x21, #0
	b	LBB0_16
LBB0_2:
	add	x0, sp, #48
	bl	_strbuf_init
	add	x0, sp, #64
	bl	_strbuf_init
	add	x0, sp, #32
	bl	_strbuf_init
	ldr	x1, [sp, #24]
	add	x0, sp, #20
	bl	_stream_init
	add	x0, sp, #20
	add	x1, sp, #48
	bl	_next_node
	cbz	x0, LBB0_14
; %bb.3:
	str	x23, [sp, #8]                   ; 8-byte Folded Spill
	str	w20, [sp, #16]                  ; 4-byte Folded Spill
	mov	w26, #0
	mov	x21, #0
Lloh11:
	adrp	x27, _CP_ACP@GOTPAGE
Lloh12:
	ldr	x27, [x27, _CP_ACP@GOTPAGEOFF]
Lloh13:
	adrp	x22, l_.str.1@PAGE
Lloh14:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x25, w26
	add	x28, x24, x25
	add	w1, w20, w26
	mov	x0, x19
	bl	_heap_realloc
	mov	x19, x0
	add	x0, x0, x25
	mov	x1, x23
	mov	x2, x24
	bl	_memcpy
	strb	wzr, [x19, x28]
	mov	x26, x28
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #48
	bl	_strbuf_zero
	add	x0, sp, #64
	bl	_strbuf_zero
	add	x0, sp, #20
	add	x1, sp, #48
	bl	_next_node
	cbz	x0, LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #48
	add	x1, sp, #32
	bl	_get_node_name
	add	x0, sp, #20
	add	x1, sp, #64
	bl	_next_content
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #64]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x20, w8
	ldr	x8, [sp, #72]
	add	x23, x8, #1
	sub	x24, x20, #1
	ldr	x0, [sp, #40]
	mov	x1, x22
	mov	w2, #-1
	bl	__strnicmp
	cbnz	w0, LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x27]
	mov	w1, #0
	mov	x2, x23
	mov	x3, x24
	mov	x4, #0
	mov	w5, #0
	bl	_MultiByteToWideChar
	mov	x25, x0
	add	w0, w0, #1
	bl	_heap_alloc
	mov	x21, x0
	ldr	w0, [x27]
	mov	w1, #0
	mov	x2, x23
	mov	x3, x24
	mov	x4, x21
	mov	x5, x25
	bl	_MultiByteToWideChar
	strb	wzr, [x21, w25, sxtw]
	b	LBB0_4
LBB0_10:
	cmp	w26, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x20, #0
	mov	w22, w26
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x19, x20]
	bl	_tolower
	strb	w0, [x19, x20]
	add	x20, x20, #1
	cmp	x22, x20
	b.ne	LBB0_12
LBB0_13:
	ldr	w20, [sp, #16]                  ; 4-byte Folded Reload
	ldr	x23, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_15
LBB0_14:
	mov	x21, #0
LBB0_15:
	mov	x0, x19
	mov	x1, x23
	bl	_strstr
Lloh15:
	adrp	x8, _TRUE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, w20, w8, eq
	add	x0, sp, #48
	bl	_strbuf_free
	add	x0, sp, #64
	bl	_strbuf_free
	add	x0, sp, #32
	bl	_strbuf_free
LBB0_16:
	mov	x0, x19
	bl	_heap_free
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_18
; %bb.17:
	bl	_IStream_Release
LBB0_18:
	cbnz	w20, LBB0_20
; %bb.19:
	mov	x0, x21
	bl	_heap_free
	mov	x21, #0
LBB0_20:
	mov	x0, x21
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BLOCK_SIZE,4,2                 ; @BLOCK_SIZE
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_STGM_READ,4,2                  ; @STGM_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not open '%s' stream: %08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"title"

	.comm	_CP_ACP,4,2                     ; @CP_ACP
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_SearchCHM_File
.subsections_via_symbols
