// +build !noasm
// +build !gccgo

// Generated by PeachPy 0.2.0 from metro.py

// func Hash64(buffer_base uintptr, buffer_len int64, buffer_cap int64, seed uint64) uint64
TEXT ·Hash64(SB),4,$0-40
	MOVQ seed+24(FP), AX
	MOVQ buffer_base+0(FP), BX
	MOVQ buffer_len+8(FP), CX
	MOVQ $3603962101, DX
	IMULQ DX, AX
	MOVQ $5961697176435608501, DX
	ADDQ DX, AX
	CMPQ CX, $32
	JLT after32
	MOVQ AX, DX
	MOVQ AX, DI
	MOVQ AX, SI
	MOVQ AX, BP
loop_begin:
		MOVQ 0(BX), R8
		MOVQ $3603962101, R9
		IMULQ R9, R8
		ADDQ R8, DX
		RORQ $29, DX
		ADDQ SI, DX
		MOVQ 8(BX), R8
		MOVQ $2729050939, R9
		IMULQ R9, R8
		ADDQ R8, DI
		RORQ $29, DI
		ADDQ BP, DI
		MOVQ 16(BX), R8
		MOVQ $1654206401, R9
		IMULQ R9, R8
		ADDQ R8, SI
		RORQ $29, SI
		ADDQ DX, SI
		MOVQ 24(BX), R8
		MOVQ $817650473, R9
		IMULQ R9, R8
		ADDQ R8, BP
		RORQ $29, BP
		ADDQ DI, BP
		ADDQ $32, BX
		SUBQ $32, CX
		CMPQ CX, $32
		JGE loop_begin
	MOVQ DX, R8
	ADDQ BP, R8
	MOVQ $3603962101, R9
	IMULQ R9, R8
	ADDQ DI, R8
	RORQ $37, R8
	MOVQ $2729050939, R9
	IMULQ R9, R8
	XORQ R8, SI
	MOVQ DI, R8
	ADDQ SI, R8
	MOVQ $2729050939, R9
	IMULQ R9, R8
	ADDQ DX, R8
	RORQ $37, R8
	MOVQ $3603962101, R9
	IMULQ R9, R8
	XORQ R8, BP
	MOVQ DX, R8
	ADDQ SI, R8
	MOVQ $3603962101, R9
	IMULQ R9, R8
	ADDQ BP, R8
	RORQ $37, R8
	MOVQ $2729050939, R9
	IMULQ R9, R8
	XORQ R8, DX
	MOVQ DI, R8
	ADDQ BP, R8
	MOVQ $2729050939, BP
	IMULQ BP, R8
	ADDQ SI, R8
	RORQ $37, R8
	MOVQ $3603962101, SI
	IMULQ SI, R8
	XORQ R8, DI
	XORQ DI, DX
	ADDQ DX, AX
after32:
	CMPQ CX, $16
	JLT after16
	MOVQ 0(BX), DX
	MOVQ $1654206401, DI
	IMULQ DI, DX
	ADDQ AX, DX
	ADDQ $8, BX
	SUBQ $8, CX
	RORQ $29, DX
	MOVQ $817650473, DI
	IMULQ DI, DX
	MOVQ 0(BX), DI
	MOVQ $1654206401, SI
	IMULQ SI, DI
	ADDQ AX, DI
	ADDQ $8, BX
	SUBQ $8, CX
	RORQ $29, DI
	MOVQ $817650473, SI
	IMULQ SI, DI
	MOVQ DX, SI
	MOVQ $3603962101, BP
	IMULQ BP, SI
	RORQ $21, SI
	ADDQ DI, SI
	XORQ SI, DX
	MOVQ DI, SI
	MOVQ $817650473, BP
	IMULQ BP, SI
	RORQ $21, SI
	ADDQ DX, SI
	XORQ SI, DI
	ADDQ DI, AX
after16:
	CMPQ CX, $8
	JLT after8
	MOVQ 0(BX), DX
	MOVQ $817650473, DI
	IMULQ DI, DX
	ADDQ DX, AX
	ADDQ $8, BX
	SUBQ $8, CX
	MOVQ AX, DX
	RORQ $55, DX
	MOVQ $2729050939, DI
	IMULQ DI, DX
	XORQ DX, AX
after8:
	CMPQ CX, $4
	JLT after4
	XORQ DX, DX
	MOVL 0(BX), DX
	MOVQ $817650473, DI
	IMULQ DI, DX
	ADDQ DX, AX
	ADDQ $4, BX
	SUBQ $4, CX
	MOVQ AX, DX
	RORQ $26, DX
	MOVQ $2729050939, DI
	IMULQ DI, DX
	XORQ DX, AX
after4:
	CMPQ CX, $2
	JLT after2
	XORQ DX, DX
	MOVW 0(BX), DX
	MOVQ $817650473, DI
	IMULQ DI, DX
	ADDQ DX, AX
	ADDQ $2, BX
	SUBQ $2, CX
	MOVQ AX, DX
	RORQ $48, DX
	MOVQ $2729050939, DI
	IMULQ DI, DX
	XORQ DX, AX
after2:
	CMPQ CX, $1
	JLT after1
	MOVBQZX 0(BX), BX
	MOVQ $817650473, CX
	IMULQ CX, BX
	ADDQ BX, AX
	MOVQ AX, BX
	RORQ $37, BX
	MOVQ $2729050939, CX
	IMULQ CX, BX
	XORQ BX, AX
after1:
	MOVQ AX, BX
	RORQ $28, BX
	XORQ BX, AX
	MOVQ $3603962101, BX
	IMULQ BX, AX
	MOVQ AX, BX
	RORQ $29, BX
	XORQ BX, AX
	MOVQ AX, ret+32(FP)
	RET

// func Hash64Str(buffer_base uintptr, buffer_len int64, seed uint64) uint64
TEXT ·Hash64Str(SB),4,$0-32
	MOVQ seed+16(FP), AX
	MOVQ buffer_base+0(FP), BX
	MOVQ buffer_len+8(FP), CX
	MOVQ $3603962101, DX
	IMULQ DX, AX
	MOVQ $5961697176435608501, DX
	ADDQ DX, AX
	CMPQ CX, $32
	JLT after32
	MOVQ AX, DX
	MOVQ AX, DI
	MOVQ AX, SI
	MOVQ AX, BP
loop_begin:
		MOVQ 0(BX), R8
		MOVQ $3603962101, R9
		IMULQ R9, R8
		ADDQ R8, DX
		RORQ $29, DX
		ADDQ SI, DX
		MOVQ 8(BX), R8
		MOVQ $2729050939, R9
		IMULQ R9, R8
		ADDQ R8, DI
		RORQ $29, DI
		ADDQ BP, DI
		MOVQ 16(BX), R8
		MOVQ $1654206401, R9
		IMULQ R9, R8
		ADDQ R8, SI
		RORQ $29, SI
		ADDQ DX, SI
		MOVQ 24(BX), R8
		MOVQ $817650473, R9
		IMULQ R9, R8
		ADDQ R8, BP
		RORQ $29, BP
		ADDQ DI, BP
		ADDQ $32, BX
		SUBQ $32, CX
		CMPQ CX, $32
		JGE loop_begin
	MOVQ DX, R8
	ADDQ BP, R8
	MOVQ $3603962101, R9
	IMULQ R9, R8
	ADDQ DI, R8
	RORQ $37, R8
	MOVQ $2729050939, R9
	IMULQ R9, R8
	XORQ R8, SI
	MOVQ DI, R8
	ADDQ SI, R8
	MOVQ $2729050939, R9
	IMULQ R9, R8
	ADDQ DX, R8
	RORQ $37, R8
	MOVQ $3603962101, R9
	IMULQ R9, R8
	XORQ R8, BP
	MOVQ DX, R8
	ADDQ SI, R8
	MOVQ $3603962101, R9
	IMULQ R9, R8
	ADDQ BP, R8
	RORQ $37, R8
	MOVQ $2729050939, R9
	IMULQ R9, R8
	XORQ R8, DX
	MOVQ DI, R8
	ADDQ BP, R8
	MOVQ $2729050939, BP
	IMULQ BP, R8
	ADDQ SI, R8
	RORQ $37, R8
	MOVQ $3603962101, SI
	IMULQ SI, R8
	XORQ R8, DI
	XORQ DI, DX
	ADDQ DX, AX
after32:
	CMPQ CX, $16
	JLT after16
	MOVQ 0(BX), DX
	MOVQ $1654206401, DI
	IMULQ DI, DX
	ADDQ AX, DX
	ADDQ $8, BX
	SUBQ $8, CX
	RORQ $29, DX
	MOVQ $817650473, DI
	IMULQ DI, DX
	MOVQ 0(BX), DI
	MOVQ $1654206401, SI
	IMULQ SI, DI
	ADDQ AX, DI
	ADDQ $8, BX
	SUBQ $8, CX
	RORQ $29, DI
	MOVQ $817650473, SI
	IMULQ SI, DI
	MOVQ DX, SI
	MOVQ $3603962101, BP
	IMULQ BP, SI
	RORQ $21, SI
	ADDQ DI, SI
	XORQ SI, DX
	MOVQ DI, SI
	MOVQ $817650473, BP
	IMULQ BP, SI
	RORQ $21, SI
	ADDQ DX, SI
	XORQ SI, DI
	ADDQ DI, AX
after16:
	CMPQ CX, $8
	JLT after8
	MOVQ 0(BX), DX
	MOVQ $817650473, DI
	IMULQ DI, DX
	ADDQ DX, AX
	ADDQ $8, BX
	SUBQ $8, CX
	MOVQ AX, DX
	RORQ $55, DX
	MOVQ $2729050939, DI
	IMULQ DI, DX
	XORQ DX, AX
after8:
	CMPQ CX, $4
	JLT after4
	XORQ DX, DX
	MOVL 0(BX), DX
	MOVQ $817650473, DI
	IMULQ DI, DX
	ADDQ DX, AX
	ADDQ $4, BX
	SUBQ $4, CX
	MOVQ AX, DX
	RORQ $26, DX
	MOVQ $2729050939, DI
	IMULQ DI, DX
	XORQ DX, AX
after4:
	CMPQ CX, $2
	JLT after2
	XORQ DX, DX
	MOVW 0(BX), DX
	MOVQ $817650473, DI
	IMULQ DI, DX
	ADDQ DX, AX
	ADDQ $2, BX
	SUBQ $2, CX
	MOVQ AX, DX
	RORQ $48, DX
	MOVQ $2729050939, DI
	IMULQ DI, DX
	XORQ DX, AX
after2:
	CMPQ CX, $1
	JLT after1
	MOVBQZX 0(BX), BX
	MOVQ $817650473, CX
	IMULQ CX, BX
	ADDQ BX, AX
	MOVQ AX, BX
	RORQ $37, BX
	MOVQ $2729050939, CX
	IMULQ CX, BX
	XORQ BX, AX
after1:
	MOVQ AX, BX
	RORQ $28, BX
	XORQ BX, AX
	MOVQ $3603962101, BX
	IMULQ BX, AX
	MOVQ AX, BX
	RORQ $29, BX
	XORQ BX, AX
	MOVQ AX, ret+24(FP)
	RET
