	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _chm_fetch_bytes
__chm_fetch_bytes:                      ## @_chm_fetch_bytes
	.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
	movq	%rcx, %r14
	movq	(%rdi), %rax
	movq	_CHM_NULL_FD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%r14d, %r14d
	jmp	LBB0_5
LBB0_2:
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_CHM_ACQUIRE_LOCK
	movq	$0, -48(%rbp)
	movq	(%rbx), %rdi
	movq	_FILE_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %rdx
	xorl	%esi, %esi
	callq	_SetFilePointerEx
	movq	(%rbx), %rdi
	movq	_FILE_BEGIN@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_SetFilePointerEx
	movq	(%rbx), %rdi
	leaq	-48(%rbp), %rcx
	movq	%r15, %rsi
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	callq	_ReadFile
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	-48(%rbp), %r14
LBB0_4:
	movq	(%rbx), %rdi
	movl	(%r13), %ecx
	movq	-56(%rbp), %rsi
	xorl	%edx, %edx
	callq	_SetFilePointerEx
	movl	8(%rbx), %edi
	callq	_CHM_RELEASE_LOCK
LBB0_5:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHM_NULL_FD,8,3                ## @CHM_NULL_FD
	.comm	_FILE_CURRENT,4,2               ## @FILE_CURRENT
	.comm	_FILE_BEGIN,4,2                 ## @FILE_BEGIN
	.no_dead_strip	__chm_fetch_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _chm_fetch_bytes
__chm_fetch_bytes:                      ; @_chm_fetch_bytes
	.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	x8, [x0]
Lloh0:
	adrp	x9, _CHM_NULL_FD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHM_NULL_FD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x20, #0
	b	LBB0_3
LBB0_2:
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_CHM_ACQUIRE_LOCK
	str	xzr, [sp]
	ldr	x0, [x19]
Lloh3:
	adrp	x8, _FILE_CURRENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FILE_CURRENT@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x2, sp, #8
	mov	x1, #0
	bl	_SetFilePointerEx
	ldr	x0, [x19]
Lloh6:
	adrp	x23, _FILE_BEGIN@GOTPAGE
Lloh7:
	ldr	x23, [x23, _FILE_BEGIN@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x1, x22
	mov	x2, #0
	bl	_SetFilePointerEx
	ldr	x0, [x19]
	mov	x3, sp
	mov	x1, x21
	mov	x2, x20
	mov	x4, #0
	bl	_ReadFile
	ldp	x8, x1, [sp]
	cmp	x0, #0
	csel	x20, xzr, x8, eq
	ldr	x0, [x19]
	ldr	w3, [x23]
	mov	x2, #0
	bl	_SetFilePointerEx
	ldr	w0, [x19, #8]
	bl	_CHM_RELEASE_LOCK
LBB0_3:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CHM_NULL_FD,8,3                ; @CHM_NULL_FD
	.comm	_FILE_CURRENT,4,2               ; @FILE_CURRENT
	.comm	_FILE_BEGIN,4,2                 ; @FILE_BEGIN
	.no_dead_strip	__chm_fetch_bytes
.subsections_via_symbols
