	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wmemstream_seek
_wmemstream_seek:                       ## @wmemstream_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	cmpl	$130, %edx
	je	LBB0_4
## %bb.1:
	cmpl	$129, %edx
	je	LBB0_5
## %bb.2:
	cmpl	$128, %edx
	jne	LBB0_14
## %bb.3:
	movq	%r14, %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_assert
	jmp	LBB0_11
LBB0_4:
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_assert
	movq	(%rbx), %r14
	cmpq	%r15, %r14
	jne	LBB0_13
	jmp	LBB0_14
LBB0_5:
	testq	%r14, %r14
	js	LBB0_6
## %bb.9:
	movq	_FPOS_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	8(%rbx), %rax
	subq	%rax, %rcx
	cmpq	%r14, %rcx
	jge	LBB0_10
## %bb.16:
	movq	_EOVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	addq	8(%rbx), %r14
	jns	LBB0_11
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %rax
	jmp	LBB0_15
LBB0_10:
	addq	%rax, %r14
LBB0_11:
	movq	%r14, (%rbx)
	cmpq	%r15, %r14
	je	LBB0_14
LBB0_13:
	leaq	16(%rbx), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
LBB0_14:
	movq	%rbx, %rdi
	callq	_wmemstream_update
	movq	(%rbx), %rax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_FPOS_MAX,8,3                   ## @FPOS_MAX
	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_wmemstream_seek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wmemstream_seek
_wmemstream_seek:                       ; @wmemstream_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
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [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_14
; %bb.3:
	lsr	x8, x20, #63
	eor	w0, w8, #0x1
	bl	_assert
	b	LBB0_12
LBB0_4:
	cmp	x20, #0
	cset	w0, eq
	bl	_assert
	ldr	x20, [x19]
	cmp	x20, x21
	b.ne	LBB0_13
	b	LBB0_14
LBB0_5:
	tbnz	x20, #63, LBB0_8
; %bb.6:
Lloh0:
	adrp	x8, _FPOS_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FPOS_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	x8, [x19, #8]
	sub	x9, x9, x8
	cmp	x9, x20
	b.ge	LBB0_11
; %bb.7:
Lloh3:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	ldr	x8, [x19, #8]
	adds	x20, x8, x20
	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	x0, #-1
	b	LBB0_15
LBB0_11:
	add	x20, x8, x20
LBB0_12:
	str	x20, [x19]
	cmp	x20, x21
	b.eq	LBB0_14
LBB0_13:
	add	x0, x19, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
LBB0_14:
	mov	x0, x19
	bl	_wmemstream_update
	ldr	x0, [x19]
LBB0_15:
	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 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,8,3                   ; @FPOS_MAX
	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_wmemstream_seek
.subsections_via_symbols
