	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function splitfs_seek
_splitfs_seek:                          ## @splitfs_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
	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, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %r13
	cmpl	$130, %edx
	je	LBB0_7
## %bb.1:
	cmpl	$129, %edx
	je	LBB0_6
## %bb.2:
	cmpl	$128, %edx
	jne	LBB0_4
## %bb.3:
	subl	(%r13), %ebx
LBB0_7:
	testl	%ebx, %ebx
	jg	LBB0_8
	jmp	LBB0_14
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_panic
	testl	%ebx, %ebx
	jle	LBB0_14
LBB0_8:
	movq	_SEEK_BUF@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_21
## %bb.9:
	movq	%rax, %r15
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_errno@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, -48(%rbp)
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_min
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rax, %rdx
	leaq	-48(%rbp), %rcx
	callq	_splitfs_read
	movq	%rax, (%r13)
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_min
	cmpq	$0, (%r13)
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	subl	-48(%rbp), %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	subl	%eax, %ebx
	jg	LBB0_10
LBB0_13:
	movq	%r15, %rdi
	callq	_free
	movl	$-1, %eax
	cmpq	$0, (%r13)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_20
LBB0_14:
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.16:
	movl	4(%r13), %eax
	addl	%ebx, %eax
	jns	LBB0_18
## %bb.17:
	leaq	L_.str.1(%rip), %rdi
	callq	_panic
LBB0_18:
	movl	8(%r13), %edi
	movl	%ebx, %esi
	movl	$130, %edx
	callq	_lseek
	testl	%eax, %eax
	js	LBB0_4
## %bb.19:
	movl	%eax, %ecx
	subl	4(%r13), %eax
	addl	(%r13), %eax
	movl	%eax, (%r13)
	movl	%ecx, 4(%r13)
	jmp	LBB0_20
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_21:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$-1, %eax
	jmp	LBB0_20
LBB0_15:
	movl	(%r13), %eax
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"splitfs_seek: SEEK_END not supported"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_errno,8,3                      ## @errno
	.comm	_SEEK_BUF,4,2                   ## @SEEK_BUF
	.comm	_ENOMEM,8,3                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"splitfs_seek: can't seek past the beginning of the slice"

	.no_dead_strip	_splitfs_seek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function splitfs_seek
_splitfs_seek:                          ; @splitfs_seek
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0]
	cmp	w2, #130
	b.eq	LBB0_4
; %bb.1:
	cmp	w2, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w2, #128
	b.ne	LBB0_17
; %bb.3:
	ldr	w8, [x22]
	sub	w19, w19, w8
LBB0_4:
	cmp	w19, #1
	b.ge	LBB0_6
	b	LBB0_12
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
	cmp	w19, #1
	b.lt	LBB0_12
LBB0_6:
Lloh2:
	adrp	x23, _SEEK_BUF@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SEEK_BUF@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_malloc
	cbz	x0, LBB0_18
; %bb.7:
	mov	x21, x0
Lloh4:
	adrp	x24, _errno@GOTPAGE
Lloh5:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [sp, #8]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_min
	mov	x2, x0
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x21
	bl	_splitfs_read
	str	x0, [x24]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_min
	ldr	w8, [sp, #8]
	sub	w8, w0, w8
	ldr	x9, [x24]
	cmp	x9, #0
	ccmp	w8, #0, #4, eq
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	sub	w19, w19, w8
	cmp	w19, #0
	b.gt	LBB0_8
LBB0_10:
	mov	x0, x21
	bl	_free
	ldr	x8, [x24]
	cbz	x8, LBB0_12
; %bb.11:
	mov	w0, #-1
	b	LBB0_21
LBB0_12:
	cbz	w19, LBB0_20
; %bb.13:
	ldr	w8, [x22, #4]
	cmn	w8, w19
	b.pl	LBB0_15
; %bb.14:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_15:
	ldr	w0, [x22, #8]
	mov	x1, x19
	mov	w2, #130
	bl	_lseek
	tbnz	w0, #31, LBB0_17
; %bb.16:
	mov	x8, x0
	ldp	w10, w9, [x22]
	sub	w9, w0, w9
	add	w0, w9, w10
	stp	w0, w8, [x22]
	b	LBB0_21
LBB0_17:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_19:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _errno@GOTPAGE
Lloh13:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh14:
	str	x8, [x9]
	mov	w0, #-1
	b	LBB0_21
LBB0_20:
	ldr	w0, [x22]
LBB0_21:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"splitfs_seek: SEEK_END not supported"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_errno,8,3                      ; @errno
	.comm	_SEEK_BUF,4,2                   ; @SEEK_BUF
	.comm	_ENOMEM,8,3                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"splitfs_seek: can't seek past the beginning of the slice"

	.no_dead_strip	_splitfs_seek
.subsections_via_symbols
