	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_seek
_read_seek:                             ## @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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.1:
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r15
	testq	%r12, %r12
	jne	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_xmalloc
	movq	%rax, %r12
LBB0_3:
	movq	_tfile_offset@GOTPCREL(%rip), %r13
	cmpq	%rbx, (%r13)
	je	LBB0_5
## %bb.4:
	movq	_tfile_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_lseek
	cmpl	$-1, %eax
	je	LBB0_6
LBB0_5:
	movq	_tfile_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_read
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	cmpq	%r15, %rax
	jne	LBB0_11
## %bb.8:
	addq	%r15, %rbx
	movq	%rbx, (%r13)
LBB0_9:
	movq	%r12, %rax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	callq	_read_seek.cold.1
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_11:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movq	%rax, %rcx
	movq	%r15, %r8
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function read_seek.cold.1
_read_seek.cold.1:                      ## @read_seek.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_tfile_offset,8,3               ## @tfile_offset
	.comm	_tfile_fd,4,2                   ## @tfile_fd
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: read %ld bytes, expected %ld bytes\n"

	.no_dead_strip	_read_seek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_seek
_read_seek:                             ; @read_seek
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x0
	cbz	x1, LBB0_8
; %bb.1:
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	cbnz	x21, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_xmalloc
	mov	x21, x0
LBB0_3:
Lloh0:
	adrp	x23, _tfile_offset@GOTPAGE
Lloh1:
	ldr	x23, [x23, _tfile_offset@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x24, _tfile_fd@GOTPAGE
Lloh3:
	ldr	x24, [x24, _tfile_fd@GOTPAGEOFF]
	cmp	x8, x22
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x24]
	mov	x1, x22
	mov	w2, #0
	bl	_lseek
	cmn	w0, #1
	b.eq	LBB0_9
LBB0_5:
	ldr	w0, [x24]
	mov	x1, x21
	mov	x2, x20
	bl	_read
	tbnz	x0, #63, LBB0_9
; %bb.6:
	mov	x3, x0
	cmp	x0, x20
	b.ne	LBB0_10
; %bb.7:
	add	x8, x22, x20
	str	x8, [x23]
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x19
	bl	_read_seek.cold.1
LBB0_10:
Lloh4:
	adrp	x8, _stderr@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x4, x20
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function read_seek.cold.1
_read_seek.cold.1:                      ; @read_seek.cold.1
	.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
	bl	_perror
	mov	w0, #1
	bl	_exit
	.cfi_endproc
                                        ; -- End function
	.comm	_tfile_offset,8,3               ; @tfile_offset
	.comm	_tfile_fd,4,2                   ; @tfile_fd
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: read %ld bytes, expected %ld bytes\n"

	.no_dead_strip	_read_seek
.subsections_via_symbols
