	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function memory_read_seek
_memory_read_seek:                      ## @memory_read_seek
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_SEEK_END@GOTPCREL(%rip), %rdi
	movq	%rsi, %rax
	cmpl	%ecx, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_4
## %bb.2:
	leaq	8(%rsi), %rax
LBB0_3:
	addq	(%rax), %rdx
LBB0_4:
	testq	%rdx, %rdx
	js	LBB0_5
## %bb.7:
	movq	%rdx, 8(%rsi)
	movq	40(%rsi), %rax
	movq	%rax, 32(%rsi)
	testq	%rax, %rax
	je	LBB0_16
## %bb.8:
	xorl	%r8d, %r8d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rcx
	addq	%r8, %rcx
	movq	%rcx, %rdi
	subq	%rdx, %rdi
	jg	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%rax), %r8
	addq	%r8, %rcx
	cmpq	%rdx, %rcx
	jg	LBB0_12
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	16(%rax), %rax
	movq	%rax, 32(%rsi)
	movq	%rcx, %r8
	testq	%rax, %rax
	jne	LBB0_9
LBB0_16:
	cmpq	(%rsi), %rdx
	je	LBB0_14
## %bb.17:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_10:
	movq	24(%rax), %rcx
	addq	%rdx, %rcx
	subq	%r8, %rcx
	movq	%rcx, 16(%rsi)
	movq	8(%rax), %rdi
	jmp	LBB0_13
LBB0_12:
	movq	$0, 16(%rsi)
	addq	%r8, %rdi
LBB0_13:
	movq	%rdi, 24(%rsi)
LBB0_14:
	movq	%rdx, %rax
	popq	%rbp
	retq
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_6:
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n\n\nInternal failure: negative seek\n\n\n"

L_.str.1:                               ## @.str.1
	.asciz	"\n\n\nInternal failure: over-sized seek\n\n\n"

	.no_dead_strip	_memory_read_seek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function memory_read_seek
_memory_read_seek:                      ; @memory_read_seek
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	mov	x8, x1
	cmp	w9, w3
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ne	LBB0_4
; %bb.2:
	add	x8, x1, #8
LBB0_3:
	ldr	x8, [x8]
	add	x2, x8, x2
LBB0_4:
	tbnz	x2, #63, LBB0_16
; %bb.5:
	str	x2, [x1, #8]
	ldr	x8, [x1, #40]
	str	x8, [x1, #32]
	cbz	x8, LBB0_10
; %bb.6:
	mov	x9, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8]
	add	x12, x10, x9
	subs	x10, x12, x2
	b.gt	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x11, [x8, #8]
	add	x9, x11, x12
	cmp	x9, x2
	b.gt	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x8, #16]
	str	x8, [x1, #32]
	cbnz	x8, LBB0_7
LBB0_10:
	ldr	x8, [x1]
	cmp	x2, x8
	b.eq	LBB0_15
; %bb.11:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_12:
	ldr	x10, [x8, #24]
	add	x10, x10, x2
	sub	x9, x10, x9
	str	x9, [x1, #16]
	ldr	x8, [x8, #8]
	b	LBB0_14
LBB0_13:
	str	xzr, [x1, #16]
	add	x8, x10, x11
LBB0_14:
	str	x8, [x1, #24]
LBB0_15:
	mov	x0, x2
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
LBB0_17:
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n\n\nInternal failure: negative seek\n\n\n"

l_.str.1:                               ; @.str.1
	.asciz	"\n\n\nInternal failure: over-sized seek\n\n\n"

	.no_dead_strip	_memory_read_seek
.subsections_via_symbols
