	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GetChmString
_GetChmString:                          ## @GetChmString
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rdi)
	je	LBB0_14
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_BLOCK_BITS@GOTPCREL(%rip), %r12
	movb	(%r12), %cl
	movl	%esi, %eax
	sarl	%cl, %eax
	cmpl	%eax, (%rdi)
	jle	LBB0_4
## %bb.2:
	movq	8(%rbx), %rax
	jmp	LBB0_8
LBB0_4:
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
	movq	8(%rbx), %rdi
	leal	8(,%rax,8), %esi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_heap_realloc_zero
	jmp	LBB0_7
LBB0_6:
	movl	%esi, %edi
	callq	_heap_alloc_zero
LBB0_7:
	movq	%rax, 8(%rbx)
LBB0_8:
	movb	(%r12), %cl
	movl	%r14d, %edx
	sarl	%cl, %edx
	movslq	%edx, %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_10
LBB0_9:
	movq	_BLOCK_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%r14d, %edx
	movslq	%edx, %rbx
	shlq	$2, %rbx
	addq	(%rax,%rcx,8), %rbx
	movq	%rbx, %rdi
	callq	_debugstr_a
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_TRACE
	jmp	LBB0_15
LBB0_10:
	movq	_BLOCK_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	%r14d, %esi
	movl	16(%rbx), %edi
	movq	_STREAM_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_IStream_Seek
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_WARN
	jmp	LBB0_14
LBB0_12:
	movq	_BLOCK_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_heap_alloc
	movb	(%r12), %cl
	movl	%r14d, %edx
	sarl	%cl, %edx
	movq	8(%rbx), %rcx
	movslq	%edx, %rdx
	movq	%rax, (%rcx,%rdx,8)
	movl	16(%rbx), %edi
	movq	8(%rbx), %rax
	movq	(%rax,%rdx,8), %rsi
	movl	(%r15), %edx
	leaq	-36(%rbp), %rcx
	callq	_IStream_Read
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_WARN
	movb	(%r12), %cl
	movl	%r14d, %eax
	sarl	%cl, %eax
	movq	8(%rbx), %rcx
	cltq
	movq	(%rcx,%rax,8), %rdi
	callq	_heap_free
	movb	(%r12), %cl
	sarl	%cl, %r14d
	movq	8(%rbx), %rax
	movslq	%r14d, %rcx
	movq	$0, (%rax,%rcx,8)
LBB0_14:
	xorl	%ebx, %ebx
LBB0_15:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	8(%rbx), %rax
	movb	(%r12), %cl
	movl	%r14d, %edx
	sarl	%cl, %edx
	movslq	%edx, %rcx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_BLOCK_BITS,4,2                 ## @BLOCK_BITS
	.comm	_BLOCK_MASK,4,2                 ## @BLOCK_MASK
	.comm	_STREAM_SEEK_SET,4,2            ## @STREAM_SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Seek failed: %08x\n"

	.comm	_BLOCK_SIZE,4,2                 ## @BLOCK_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"Read failed: %08x\n"

L_.str.2:                               ## @.str.2
	.asciz	"offset %#x => %s\n"

	.no_dead_strip	_GetChmString
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GetChmString
_GetChmString:                          ; @GetChmString
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	w9, [x0]
Lloh0:
	adrp	x22, _BLOCK_BITS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BLOCK_BITS@GOTPAGEOFF]
	ldr	w8, [x22]
	asr	w8, w1, w8
	cmp	w9, w8
	b.le	LBB0_4
; %bb.2:
	ldr	x0, [x20, #8]
	b	LBB0_8
LBB0_3:
	mov	x21, #0
	b	LBB0_14
LBB0_4:
	add	w8, w8, #1
	str	w8, [x20]
	ldr	x0, [x20, #8]
	lsl	w1, w8, #3
	cbz	x0, LBB0_6
; %bb.5:
	bl	_heap_realloc_zero
	b	LBB0_7
LBB0_6:
	mov	x0, x1
	bl	_heap_alloc_zero
LBB0_7:
	str	x0, [x20, #8]
LBB0_8:
	ldr	w8, [x22]
	asr	w8, w19, w8
	ldr	x9, [x0, w8, sxtw #3]
Lloh2:
	adrp	x23, _BLOCK_MASK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _BLOCK_MASK@GOTPAGEOFF]
	cbz	x9, LBB0_10
LBB0_9:
	sxtw	x8, w8
	ldr	x8, [x0, x8, lsl #3]
	ldr	w9, [x23]
	and	w9, w9, w19
	add	x21, x8, w9, sxtw #2
	mov	x0, x21
	bl	_debugstr_a
	mov	x2, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	b	LBB0_14
LBB0_10:
	ldr	w8, [x23]
	bic	w1, w19, w8
	ldr	w0, [x20, #16]
Lloh6:
	adrp	x8, _STREAM_SEEK_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STREAM_SEEK_SET@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x3, #0
	bl	_IStream_Seek
	mov	x21, x0
	bl	_FAILED
	cbz	x0, LBB0_12
; %bb.11:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_WARN
	mov	x21, #0
	b	LBB0_14
LBB0_12:
Lloh11:
	adrp	x21, _BLOCK_SIZE@GOTPAGE
Lloh12:
	ldr	x21, [x21, _BLOCK_SIZE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_heap_alloc
	ldr	x8, [x20, #8]
	ldr	w9, [x22]
	asr	w9, w19, w9
	sbfiz	x9, x9, #3, #32
	str	x0, [x8, x9]
	ldr	w0, [x20, #16]
	ldr	x8, [x20, #8]
	ldr	x1, [x8, x9]
	ldr	w2, [x21]
	add	x3, sp, #12
	bl	_IStream_Read
	mov	x21, x0
	bl	_FAILED
	cbz	x0, LBB0_15
; %bb.13:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_WARN
	ldr	x8, [x20, #8]
	ldr	w9, [x22]
	asr	w9, w19, w9
	ldr	x0, [x8, w9, sxtw #3]
	bl	_heap_free
	mov	x21, #0
	ldr	x8, [x20, #8]
	ldr	w9, [x22]
	asr	w9, w19, w9
	str	xzr, [x8, w9, sxtw #3]
LBB0_14:
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
	ldr	x0, [x20, #8]
	ldr	w8, [x22]
	asr	w8, w19, w8
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_BLOCK_BITS,4,2                 ; @BLOCK_BITS
	.comm	_BLOCK_MASK,4,2                 ; @BLOCK_MASK
	.comm	_STREAM_SEEK_SET,4,2            ; @STREAM_SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Seek failed: %08x\n"

	.comm	_BLOCK_SIZE,4,2                 ; @BLOCK_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"Read failed: %08x\n"

l_.str.2:                               ; @.str.2
	.asciz	"offset %#x => %s\n"

	.no_dead_strip	_GetChmString
.subsections_via_symbols
