	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_knet_seek                      ## -- Begin function knet_seek
	.p2align	4, 0x90
_knet_seek:                             ## @knet_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%edx, %ecx
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	cmpq	%r14, (%rbx)
	je	LBB0_23
LBB0_2:
	movq	8(%rbx), %rax
	movq	_KNF_TYPE_LOCAL@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	jne	LBB0_5
## %bb.3:
	movl	32(%rbx), %edi
	movq	%r14, %rsi
	callq	_lseek
	cmpl	$-1, %eax
	je	LBB0_14
## %bb.4:
	cltq
	movq	%rax, (%rbx)
	jmp	LBB0_22
LBB0_5:
	movq	_KNF_TYPE_FTP@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	jne	LBB0_8
## %bb.6:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_11
LBB0_7:
	addq	%r14, (%rbx)
	jmp	LBB0_21
LBB0_8:
	movq	_KNF_TYPE_HTTP@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	jne	LBB0_13
## %bb.9:
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_15
## %bb.10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_ESPIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_14
LBB0_11:
	cmpl	%edx, %ecx
	jne	LBB0_17
LBB0_20:
	movq	%r14, (%rbx)
	jmp	LBB0_21
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_14:
	movl	$-1, %eax
	jmp	LBB0_23
LBB0_15:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	je	LBB0_7
## %bb.19:
	cmpl	%edx, %ecx
	jne	LBB0_21
	jmp	LBB0_20
LBB0_17:
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_21
## %bb.18:
	movq	16(%rbx), %rax
	addq	%r14, %rax
	movq	%rax, (%rbx)
LBB0_21:
	movq	$0, 24(%rbx)
LBB0_22:
	movl	%r14d, %eax
LBB0_23:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_KNF_TYPE_LOCAL,8,3             ## @KNF_TYPE_LOCAL
	.comm	_KNF_TYPE_FTP,8,3               ## @KNF_TYPE_FTP
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_KNF_TYPE_HTTP,8,3              ## @KNF_TYPE_HTTP
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[knet_seek] SEEK_END is not supported for HTTP. Offset is unchanged.\n"

	.comm	_ESPIPE,4,2                     ## @ESPIPE
	.comm	_errno,4,2                      ## @errno
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"[knet_seek] %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_knet_seek                      ; -- Begin function knet_seek
	.p2align	2
_knet_seek:                             ; @knet_seek
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
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.1:
	ldr	x9, [x20]
	cmp	x9, x19
	b.ne	LBB0_3
; %bb.2:
	mov	w19, #0
	b	LBB0_18
LBB0_3:
	ldr	x9, [x20, #8]
Lloh3:
	adrp	x10, _KNF_TYPE_LOCAL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _KNF_TYPE_LOCAL@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.4:
	ldr	w0, [x20, #32]
	mov	x1, x19
	bl	_lseek
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_17
; %bb.5:
	sxtw	x8, w0
	str	x8, [x20]
	b	LBB0_18
LBB0_6:
Lloh6:
	adrp	x10, _KNF_TYPE_FTP@GOTPAGE
Lloh7:
	ldr	x10, [x10, _KNF_TYPE_FTP@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.7:
Lloh9:
	adrp	x9, _SEEK_CUR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SEEK_CUR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w9, w2
	b.ne	LBB0_14
; %bb.8:
	ldr	x8, [x20]
LBB0_9:
	add	x8, x8, x19
	str	x8, [x20]
LBB0_10:
	str	xzr, [x20, #24]
	b	LBB0_18
LBB0_11:
Lloh12:
	adrp	x10, _KNF_TYPE_HTTP@GOTPAGE
Lloh13:
	ldr	x10, [x10, _KNF_TYPE_HTTP@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_16
; %bb.12:
Lloh15:
	adrp	x9, _SEEK_END@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SEEK_END@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w9, w2
	b.ne	LBB0_19
; %bb.13:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh23:
	adrp	x8, _ESPIPE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ESPIPE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _errno@GOTPAGE
Lloh27:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh28:
	str	w8, [x9]
	b	LBB0_17
LBB0_14:
	cmp	w8, w2
	b.ne	LBB0_21
; %bb.15:
	str	x19, [x20]
	str	xzr, [x20, #24]
	b	LBB0_18
LBB0_16:
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x8, _errno@GOTPAGE
Lloh33:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh34:
	str	w0, [x8]
Lloh35:
	adrp	x8, _stderr@GOTPAGE
Lloh36:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh37:
	ldr	w19, [x8]
	bl	_strerror
	str	x0, [sp]
Lloh38:
	adrp	x1, l_.str.1@PAGE
Lloh39:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fprintf
LBB0_17:
	mov	w19, #-1
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_19:
Lloh40:
	adrp	x9, _SEEK_CUR@GOTPAGE
Lloh41:
	ldr	x9, [x9, _SEEK_CUR@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	cmp	w9, w2
	b.ne	LBB0_23
; %bb.20:
	ldr	x8, [x20]
	add	x8, x8, x19
	str	x8, [x20]
	str	xzr, [x20, #24]
	b	LBB0_18
LBB0_21:
Lloh43:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_10
; %bb.22:
	ldr	x8, [x20, #16]
	b	LBB0_9
LBB0_23:
	cmp	w8, w2
	b.ne	LBB0_10
; %bb.24:
	str	x19, [x20]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_KNF_TYPE_LOCAL,8,3             ; @KNF_TYPE_LOCAL
	.comm	_KNF_TYPE_FTP,8,3               ; @KNF_TYPE_FTP
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_KNF_TYPE_HTTP,8,3              ; @KNF_TYPE_HTTP
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[knet_seek] SEEK_END is not supported for HTTP. Offset is unchanged.\n"

	.comm	_ESPIPE,4,2                     ; @ESPIPE
	.comm	_errno,4,2                      ; @errno
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"[knet_seek] %s\n"

.subsections_via_symbols
