SYSTEM_INDEXQWORD$formal$INT64$QWORD$$INT64:
; Temps allocated between rsp+32 and rsp+32
; [377] begin
		sub	rsp,72
; Var buf located in register rcx
; Var len located in register rdx
; Var b located in register r8
; Var $result located in register rax
; Var psrc located in register r9
; Var pend located in register r10
; [378] psrc:=@buf;
		mov	r9,rcx
; [381] if (len < 0) or
		mov	rax,rdx
		cmp	rax,0
		jl	@@j373
; [382] (len > high(PtrInt) div 4) or
		mov	rax,rdx
		mov	r10,2305843009213693951
		cmp	rax,r10
		jg	@@j373
; [383] (psrc+len < psrc) then
		mov	rax,rdx
		shl	rax,3
		add	rax,r9
		cmp	rax,r9
		jnb	@@j374
@@j373:
; [384] pend:=pqword(high(PtrUInt)-sizeof(qword))
		mov	r10,-9
		jmp	@@j383
@@j374:
; [386] pend:=psrc+len;
		shl	rdx,3
		add	rdx,r9
		mov	r10,rdx
; [400] while psrc<pend do
		jmp	@@j383
	ALIGN 8
@@j382:
; [402] if psrc^=b then
		mov	rdx,qword ptr [r9]
		cmp	rdx,r8
		jne	@@j386
; [404] result:=psrc-pqword(@buf);
		mov	rdx,rcx
		mov	r11,r9
		sub	r11,rdx
		mov	rdx,r11
		mov	r11,rdx
		sar	r11,63
		and	r11,7
		add	rdx,r11
		sar	rdx,3
		mov	rax,rdx
; [405] exit;
		jmp	@@j369
@@j386:
; [407] inc(psrc);
		add	r9,8
@@j383:
		mov	rdx,r9
		cmp	rdx,r10
		jb	@@j382
; [409] result:=-1;
		mov	rax,-1
@@j369:
; [410] end;
		add	rsp,72
		ret
_TEXT		ENDS
