	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_rpc_fetch_set_pos           ## -- Begin function do_rpc_fetch_set_pos
	.p2align	4, 0x90
_do_rpc_fetch_set_pos:                  ## @do_rpc_fetch_set_pos
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_fetch@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_ADD_CNT
	movl	(%r15), %edi
	callq	_START_TIMER
	movq	_inbuf@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.4:
	movl	%ebx, %ebx
	movq	(%rax), %rcx
	addq	%rbx, %rcx
	cmpq	8(%rax), %rcx
	jle	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	callq	_strdup
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_6:
	movq	16(%rax), %rax
	movq	_RPC_BUFFER_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movq	$0, (%r14)
	movq	(%r12), %rax
	addq	(%rax), %rbx
	movq	%rbx, 24(%rax)
	movl	$1, %ebx
LBB0_7:
	movl	(%r15), %edi
	callq	_END_TIMER
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fetch,4,2                      ## @fetch
	.comm	_inbuf,8,3                      ## @inbuf
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Trying to fetch from empty buffer\n"

L_.str.1:                               ## @.str.1
	.asciz	"Trying to set bad position\n"

	.comm	_RPC_BUFFER_MAGIC,8,3           ## @RPC_BUFFER_MAGIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_rpc_fetch_set_pos           ; -- Begin function do_rpc_fetch_set_pos
	.p2align	2
_do_rpc_fetch_set_pos:                  ; @do_rpc_fetch_set_pos
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _fetch@GOTPAGE
Lloh1:
	ldr	x21, [x21, _fetch@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_ADD_CNT
	ldr	w0, [x21]
	bl	_START_TIMER
Lloh2:
	adrp	x22, _inbuf@GOTPAGE
Lloh3:
	ldr	x22, [x22, _inbuf@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_4
; %bb.1:
	tbnz	w20, #31, LBB0_3
; %bb.2:
	mov	w20, w20
	ldp	x9, x10, [x8]
	add	x9, x9, x20
	cmp	x9, x10
	b.le	LBB0_6
LBB0_3:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
LBB0_5:
	bl	_strdup
	mov	w20, #0
	str	x0, [x19]
	b	LBB0_7
LBB0_6:
	ldr	x8, [x8, #16]
Lloh8:
	adrp	x9, _RPC_BUFFER_MAGIC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RPC_BUFFER_MAGIC@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	str	xzr, [x19]
	ldr	x8, [x22]
	ldr	x9, [x8]
	add	x9, x9, x20
	str	x9, [x8, #24]
	mov	w20, #1
LBB0_7:
	ldr	w0, [x21]
	bl	_END_TIMER
	mov	x0, x20
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_fetch,4,2                      ; @fetch
	.comm	_inbuf,8,3                      ; @inbuf
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Trying to fetch from empty buffer\n"

l_.str.1:                               ; @.str.1
	.asciz	"Trying to set bad position\n"

	.comm	_RPC_BUFFER_MAGIC,8,3           ; @RPC_BUFFER_MAGIC
.subsections_via_symbols
