	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kurl_seek                      ## -- Begin function kurl_seek
	.p2align	4, 0x90
_kurl_seek:                             ## @kurl_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
	movl	$-1, %r15d
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	4(%rdi), %r12d
	addl	(%rdi), %r12d
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_9
## %bb.4:
	addl	%r12d, %r14d
	decl	%r14d
LBB0_5:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	js	LBB0_12
LBB0_6:
	movl	%r14d, %edx
	subl	%r12d, %edx
	setl	%cl
	orb	%cl, %al
	jne	LBB0_16
## %bb.7:
	movl	4(%rbx), %r15d
	addl	%edx, %r15d
	cmpl	8(%rbx), %r15d
	jge	LBB0_15
## %bb.8:
	movl	%r15d, 4(%rbx)
	addl	(%rbx), %r15d
	jmp	LBB0_19
LBB0_9:
	movq	_SEEK_END@GOTPCREL(%rip), %r13
	cmpl	%edx, (%r13)
	jne	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	callq	_kurl_isfile
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movl	32(%rbx), %edi
	movl	(%r13), %edx
	movl	%r14d, %esi
	callq	_lseek
	movl	%eax, %r14d
	movb	$1, %al
	testl	%r14d, %r14d
	jns	LBB0_6
LBB0_12:
	movq	_KURL_SEEK_OUT@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_KURL_INV_WHENCE@GOTPCREL(%rip), %rax
LBB0_14:
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	jmp	LBB0_19
LBB0_15:
	movq	_KU_MAX_SKIP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jle	LBB0_20
LBB0_16:
	movl	%r14d, (%rbx)
	movq	$0, 24(%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_prepare
	testq	%rax, %rax
	js	LBB0_18
## %bb.17:
	movq	%rbx, %rdi
	callq	_fill_buffer
	movl	%r14d, %r15d
	testq	%rax, %rax
	jg	LBB0_19
LBB0_18:
	movq	_KURL_SEEK_OUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	movq	$0, 4(%rbx)
	movl	$-1, %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_kurl_read
	addl	%r12d, %eax
	movl	%r14d, %r15d
	cmpl	%r14d, %eax
	jne	LBB0_18
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_KURL_INV_WHENCE,8,3            ## @KURL_INV_WHENCE
	.comm	_KURL_SEEK_OUT,8,3              ## @KURL_SEEK_OUT
	.comm	_KU_MAX_SKIP,4,2                ## @KU_MAX_SKIP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kurl_seek                      ; -- Begin function kurl_seek
	.p2align	2
_kurl_seek:                             ; @kurl_seek
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_19
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldp	w8, w9, [x0]
	add	w21, w9, w8
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_3
; %bb.2:
	mov	w8, #0
	tbz	w19, #31, LBB0_5
	b	LBB0_11
LBB0_3:
Lloh3:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_8
; %bb.4:
	mov	w8, #0
	add	w9, w19, w21
	sub	w19, w9, #1
	tbnz	w19, #31, LBB0_11
LBB0_5:
	subs	w2, w19, w21
	cset	w9, lt
	orr	w8, w8, w9
	tbnz	w8, #0, LBB0_15
; %bb.6:
	ldp	w8, w9, [x20, #4]
	add	w8, w8, w2
	cmp	w8, w9
	b.ge	LBB0_14
; %bb.7:
	str	w8, [x20, #4]
	ldr	w9, [x20]
	add	w19, w9, w8
	b	LBB0_20
LBB0_8:
Lloh6:
	adrp	x22, _SEEK_END@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SEEK_END@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w2
	b.ne	LBB0_12
; %bb.9:
	mov	x0, x20
	bl	_kurl_isfile
	cbz	x0, LBB0_12
; %bb.10:
	ldr	w0, [x20, #32]
	ldr	w2, [x22]
	mov	x1, x19
	bl	_lseek
	mov	x19, x0
	mov	w8, #1
	tbz	w19, #31, LBB0_5
LBB0_11:
Lloh8:
	adrp	x8, _KURL_SEEK_OUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KURL_SEEK_OUT@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh10:
	adrp	x8, _KURL_INV_WHENCE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _KURL_INV_WHENCE@GOTPAGEOFF]
LBB0_13:
	ldr	x8, [x8]
	str	x8, [x20, #16]
	b	LBB0_19
LBB0_14:
Lloh12:
	adrp	x8, _KU_MAX_SKIP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KU_MAX_SKIP@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w2, w8
	b.le	LBB0_17
LBB0_15:
	str	w19, [x20]
	str	xzr, [x20, #24]
	mov	x0, x20
	mov	w1, #1
	bl	_prepare
	tbnz	x0, #63, LBB0_18
; %bb.16:
	mov	x0, x20
	bl	_fill_buffer
	cmp	x0, #1
	b.ge	LBB0_20
	b	LBB0_18
LBB0_17:
	mov	x0, x20
	mov	w1, #0
	bl	_kurl_read
	add	w8, w0, w21
	cmp	w8, w19
	b.eq	LBB0_20
LBB0_18:
Lloh15:
	adrp	x8, _KURL_SEEK_OUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KURL_SEEK_OUT@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x20, #16]
	stp	wzr, wzr, [x20, #4]
LBB0_19:
	mov	w19, #-1
LBB0_20:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_KURL_INV_WHENCE,8,3            ; @KURL_INV_WHENCE
	.comm	_KURL_SEEK_OUT,8,3              ; @KURL_SEEK_OUT
	.comm	_KU_MAX_SKIP,4,2                ; @KU_MAX_SKIP
.subsections_via_symbols
