	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function memstream_seek
_memstream_seek:                        ## @memstream_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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	cmpl	$130, %edx
	je	LBB0_4
## %bb.1:
	cmpl	$129, %edx
	je	LBB0_5
## %bb.2:
	cmpl	$128, %edx
	jne	LBB0_12
## %bb.3:
	movl	%r14d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	jmp	LBB0_11
LBB0_4:
	xorl	%edi, %edi
	testl	%r14d, %r14d
	sete	%dil
	callq	_assert
	jmp	LBB0_12
LBB0_5:
	testl	%r14d, %r14d
	js	LBB0_6
## %bb.9:
	movq	_FPOS_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	4(%rbx), %eax
	subl	%eax, %ecx
	cmpl	%r14d, %ecx
	jge	LBB0_10
## %bb.14:
	movq	_EOVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	addl	4(%rbx), %r14d
	jns	LBB0_11
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
	jmp	LBB0_13
LBB0_10:
	addl	%eax, %r14d
LBB0_11:
	movl	%r14d, (%rbx)
LBB0_12:
	movq	%rbx, %rdi
	callq	_memstream_update
	movl	(%rbx), %eax
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_FPOS_MAX,4,2                   ## @FPOS_MAX
	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_memstream_seek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function memstream_seek
_memstream_seek:                        ; @memstream_seek
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, 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_13
; %bb.3:
	mvn	w8, w20
	lsr	w0, w8, #31
	bl	_assert
	str	w20, [x19]
	b	LBB0_13
LBB0_4:
	cmp	w20, #0
	cset	w0, eq
	bl	_assert
	b	LBB0_13
LBB0_5:
	tbnz	w20, #31, LBB0_8
; %bb.6:
Lloh0:
	adrp	x8, _FPOS_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FPOS_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldr	w8, [x19, #4]
	sub	w9, w9, w8
	cmp	w9, w20
	b.ge	LBB0_11
; %bb.7:
Lloh3:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	ldr	w8, [x19, #4]
	adds	w8, w8, w20
	b.pl	LBB0_12
; %bb.9:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _errno@GOTPAGE
Lloh8:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
	mov	w0, #-1
	b	LBB0_14
LBB0_11:
	add	w8, w8, w20
LBB0_12:
	str	w8, [x19]
LBB0_13:
	mov	x0, x19
	bl	_memstream_update
	ldr	w0, [x19]
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_FPOS_MAX,4,2                   ; @FPOS_MAX
	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_memstream_seek
.subsections_via_symbols
