	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function HLPFILE_DoReadHlpFile
_HLPFILE_DoReadHlpFile:                 ## @HLPFILE_DoReadHlpFile
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %eax
	movq	%rdi, %r15
	movq	_OF_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-60(%rbp), %rsi
	movl	%eax, %edi
	callq	_OpenFile
	movq	%rax, %rbx
	movq	_HFILE_ERROR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_25
## %bb.1:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_HLPFILE_ReadFileToBuffer
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	__lclose
	testl	%r14d, %r14d
	je	LBB0_25
## %bb.2:
	movq	%r15, %rdi
	callq	_HLPFILE_SystemCommands
	testl	%eax, %eax
	je	LBB0_25
## %bb.3:
	cmpl	$16, (%r15)
	jg	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_HLPFILE_GetTOMap
	testl	%eax, %eax
	je	LBB0_25
LBB0_5:
	movq	%r15, %rdi
	callq	_HLPFILE_UncompressLZ77_Phrases
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_HLPFILE_Uncompress_Phrases40
LBB0_7:
	movq	%r15, %rdi
	callq	_HLPFILE_Uncompress_Topic
	testl	%eax, %eax
	je	LBB0_25
## %bb.8:
	movq	%r15, %rdi
	callq	_HLPFILE_ReadFont
	testl	%eax, %eax
	je	LBB0_25
## %bb.9:
	movl	$-1, %r13d
	movl	$12, %r12d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=1
	addl	%eax, %ebx
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%ebx, %r12d
	movl	%r14d, %r13d
	cmpl	$-1, %ebx
	je	LBB0_31
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	leal	-12(%r12), %ebx
	cmpl	$17, (%r15)
	jge	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%ebx, %eax
	cltd
	idivl	4(%r15)
                                        ## kill: def $edx killed $edx def $rdx
	movl	%eax, %r14d
	cmpl	%r13d, %eax
	setne	%al
	cmpl	$-1, %r13d
	setne	%cl
	testb	%al, %cl
	cmovnel	%ebx, %r12d
	leal	-12(%rdx), %ebx
	cmovel	%edx, %ebx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%ebx, %r14d
	sarl	$14, %r14d
	andl	$16383, %ebx                    ## imm = 0x3FFF
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_WINE_TRACE
	cmpl	8(%r15), %r14d
	jae	LBB0_28
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	16(%r15), %rax
	movl	%r14d, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	%ebx, %ecx
	leaq	(%rax,%rcx,4), %rdx
	addq	$84, %rdx
	cmpq	24(%r15), %rdx
	jae	LBB0_29
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rcx,4), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_GET_UINT
	cltq
	leaq	(%r12,%rax,4), %rdi
	movq	24(%r15), %rsi
	callq	_min
	cmpl	%r13d, %r14d
	movl	$0, %ecx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmovnel	%ecx, %ebx
	movl	80(%r12), %esi
	leal	-129(%rsi), %ecx
	cmpl	$3, %ecx
	jae	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	leaq	-48(%rbp), %rcx
	callq	_HLPFILE_SkipParagraph
	testl	%eax, %eax
	je	LBB0_25
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=1
	addl	-48(%rbp), %ebx
	jmp	LBB0_23
LBB0_20:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$128, %esi
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%r14d, %esi
	shll	$15, %esi
	addl	%ebx, %esi
	cmpl	$17, (%r15)
	leal	(%r14,%r14,2), %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leal	(%rcx,%rdx,4), %r8d
	cmovgel	%esi, %r8d
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_HLPFILE_AddPage
	testl	%eax, %eax
	jne	LBB0_23
	jmp	LBB0_25
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=1
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_WINE_ERR
LBB0_23:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	(%r15), %r13d
	movq	%r12, %rdi
	movl	$12, %esi
	callq	_GET_UINT
	movl	%eax, %ebx
	cmpl	$16, %r13d
	jg	LBB0_11
## %bb.24:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r12, %rdi
	movl	$12, %esi
	callq	_GET_UINT
	testl	%eax, %eax
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_10
	jmp	LBB0_31
LBB0_25:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_26:
	movl	(%rax), %eax
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_30
LBB0_29:
	leaq	L_.str.2(%rip), %rdi
LBB0_30:
	callq	_WINE_WARN
LBB0_31:
	movq	%r15, %rdi
	callq	_HLPFILE_GetKeywords
	movq	%r15, %rdi
	callq	_HLPFILE_GetMap
	cmpl	$16, (%r15)
	jg	LBB0_33
## %bb.32:
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_33:
	movq	%r15, %rdi
	callq	_HLPFILE_GetContext
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_OF_READ,4,2                    ## @OF_READ
	.comm	_HFILE_ERROR,8,3                ## @HFILE_ERROR
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ref=%08x => [%u/%u]\n"

L_.str.1:                               ## @.str.1
	.asciz	"maplen\n"

L_.str.2:                               ## @.str.2
	.asciz	"extra\n"

L_.str.3:                               ## @.str.3
	.asciz	"buf[0x14] = %x\n"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_HLPFILE_DoReadHlpFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function HLPFILE_DoReadHlpFile
_HLPFILE_DoReadHlpFile:                 ; @HLPFILE_DoReadHlpFile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x8, x1
	mov	x19, x0
Lloh0:
	adrp	x9, _OF_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OF_READ@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	add	x1, sp, #12
	mov	x0, x8
	bl	_OpenFile
Lloh3:
	adrp	x8, _HFILE_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HFILE_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_25
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_HLPFILE_ReadFileToBuffer
	mov	x21, x0
	mov	x0, x20
	bl	__lclose
	cbz	w21, LBB0_25
; %bb.2:
	mov	x0, x19
	bl	_HLPFILE_SystemCommands
	cbz	w0, LBB0_25
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, #16
	b.gt	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_HLPFILE_GetTOMap
	cbz	w0, LBB0_25
LBB0_5:
	mov	x0, x19
	bl	_HLPFILE_UncompressLZ77_Phrases
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_HLPFILE_Uncompress_Phrases40
LBB0_7:
	mov	x0, x19
	bl	_HLPFILE_Uncompress_Topic
	cbz	w0, LBB0_25
; %bb.8:
	mov	x0, x19
	bl	_HLPFILE_ReadFont
	cbz	w0, LBB0_25
; %bb.9:
	mov	w27, #0
	mov	w28, #-1
Lloh6:
	adrp	x21, l_.str@PAGE
Lloh7:
	add	x21, x21, l_.str@PAGEOFF
Lloh8:
	adrp	x20, l_.str.1@PAGE
Lloh9:
	add	x20, x20, l_.str.1@PAGEOFF
	mov	w23, #12
Lloh10:
	adrp	x22, l_.str.3@PAGE
Lloh11:
	add	x22, x22, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w26, w26, w23
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x23, x26
	mov	x28, x24
	cmn	w26, #1
	b.eq	LBB0_30
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19]
	sub	w8, w23, #12
	cmp	w9, #17
	b.ge	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w9, [x19, #4]
	sdiv	w24, w8, w9
	msub	w9, w24, w9, w8
	cmp	w24, w28
	cset	w10, ne
	cmn	w28, #1
	cset	w11, ne
	sub	w12, w9, #12
	tst	w11, w10
	csel	w23, w8, w23, ne
	csel	w25, w12, w9, ne
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	asr	w24, w8, #14
	and	w25, w8, #0x3fff
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	mov	x3, x25
	bl	_WINE_TRACE
	ldr	w8, [x19, #8]
	cmp	w24, w8
	b.hs	LBB0_29
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldp	x8, x9, [x19, #16]
	ldr	x8, [x8, w24, uxtw #3]
	add	x25, x8, w25, uxtw #2
	add	x8, x25, #84
	cmp	x8, x9
	b.hs	LBB0_28
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x25
	mov	w1, #0
	bl	_GET_UINT
	add	x0, x25, w0, sxtw #2
	ldr	x1, [x19, #24]
	bl	_min
	mov	x2, x0
	cmp	w24, w28
	csel	w27, w27, wzr, eq
	ldr	w1, [x25, #80]
	sub	w8, w1, #129
	cmp	w8, #3
	b.hs	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x25
	bl	_HLPFILE_SkipParagraph
	cbz	w0, LBB0_25
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [sp, #8]
	add	w27, w8, w27
	b	LBB0_23
LBB0_20:                                ;   in Loop: Header=BB0_12 Depth=1
	cmp	w1, #128
	b.ne	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x19]
	mov	w9, #12
	madd	w9, w24, w9, w23
	add	w10, w27, w24, lsl #15
	cmp	w8, #17
	csel	w4, w9, w10, lt
	mov	x0, x19
	mov	x1, x25
	mov	x3, x23
	bl	_HLPFILE_AddPage
	cbnz	w0, LBB0_23
	b	LBB0_25
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x22
	bl	_WINE_ERR
LBB0_23:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w28, [x19]
	mov	x0, x25
	mov	w1, #12
	bl	_GET_UINT
	mov	x26, x0
	cmp	w28, #16
	b.gt	LBB0_11
; %bb.24:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x25
	mov	w1, #12
	bl	_GET_UINT
	cbnz	w0, LBB0_10
	b	LBB0_30
LBB0_25:
Lloh12:
	adrp	x8, _FALSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_26:
	ldr	w0, [x8]
LBB0_27:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_28:
Lloh14:
	adrp	x20, l_.str.2@PAGE
Lloh15:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_29:
	mov	x0, x20
	bl	_WINE_WARN
LBB0_30:
	mov	x0, x19
	bl	_HLPFILE_GetKeywords
	mov	x0, x19
	bl	_HLPFILE_GetMap
	ldr	w8, [x19]
	cmp	w8, #16
	b.gt	LBB0_32
; %bb.31:
Lloh16:
	adrp	x8, _TRUE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_26
LBB0_32:
	mov	x0, x19
	bl	_HLPFILE_GetContext
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_OF_READ,4,2                    ; @OF_READ
	.comm	_HFILE_ERROR,8,3                ; @HFILE_ERROR
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ref=%08x => [%u/%u]\n"

l_.str.1:                               ; @.str.1
	.asciz	"maplen\n"

l_.str.2:                               ; @.str.2
	.asciz	"extra\n"

l_.str.3:                               ; @.str.3
	.asciz	"buf[0x14] = %x\n"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_HLPFILE_DoReadHlpFile
.subsections_via_symbols
