#include <string>
#include <cstring>
#include <cstdlib>
#include <stdio.h>
#include <iostream>

#include "parse_graph.cuh"

#define SSSP_INF 1073741824

uint parse_graph::parse(
		std::ifstream& inFile,
		std::vector<initial_vertex>& initGraph,
		const long long arbparam,
		const bool nondirected ) {

	const bool firstColumnSourceIndex = true;

	std::string line;
	char delim[3] = " \t";	//In most benchmarks, the delimiter is usually the space character or the tab character.
	char* pch;
	uint nEdges = 0;

	unsigned int Additionalargc=0;
	char* Additionalargv[ 61 ];

	// Read the input graph line-by-line.
	while( std::getline( inFile, line ) ) {
		if( line[0] < '0' || line[0] > '9' )	// Skipping any line blank or starting with a character rather than a number.
			continue;
		char cstrLine[256];
		std::strcpy( cstrLine, line.c_str() );
		uint firstIndex, secondIndex;

		pch = strtok(cstrLine, delim);
		if( pch != NULL )
			firstIndex = atoi( pch );
		else
			continue;
		pch = strtok( NULL, delim );
		if( pch != NULL )
			secondIndex = atoi( pch );
		else
			continue;

		uint theMax = std::max( firstIndex, secondIndex );
		// some input source is src dst weight , some is reversed
		uint srcVertexIndex = firstColumnSourceIndex ? firstIndex : secondIndex;
		uint dstVertexIndex = firstColumnSourceIndex ? secondIndex : firstIndex;
		if( initGraph.size() <= theMax )
			initGraph.resize(theMax+1);
		{ //This is just a block
		        // Add the neighbor. A neighbor wraps edges
			neighbor nbrToAdd;
			nbrToAdd.srcIndex = srcVertexIndex;

			Additionalargc=0;
			Additionalargv[ Additionalargc ] = strtok( NULL, delim );
			while( Additionalargv[ Additionalargc ] != NULL ){
				Additionalargc++;
				Additionalargv[ Additionalargc ] = strtok( NULL, delim );
			}
			initGraph.at(srcVertexIndex).vertexValue.distance = ( srcVertexIndex != arbparam ) ? SSSP_INF : 0;
			initGraph.at(dstVertexIndex).vertexValue.distance = ( dstVertexIndex != arbparam ) ? SSSP_INF : 0;
			nbrToAdd.edgeValue.weight = ( Additionalargc > 0 ) ? atoi(Additionalargv[0]) : 1;

			initGraph.at(dstVertexIndex).nbrs.push_back( nbrToAdd );
			nEdges++;
		}
		if( nondirected ) {
		    // Add the edge going the other way
			uint tmp = srcVertexIndex;
			srcVertexIndex = dstVertexIndex;
			dstVertexIndex = tmp;
			//swap src and dest and add as before
			
			neighbor nbrToAdd;
			nbrToAdd.srcIndex = srcVertexIndex;

			Additionalargc=0;
			Additionalargv[ Additionalargc ] = strtok( NULL, delim );
			while( Additionalargv[ Additionalargc ] != NULL ){
				Additionalargc++;
				Additionalargv[ Additionalargc ] = strtok( NULL, delim );
			}
			initGraph.at(srcVertexIndex).vertexValue.distance = ( srcVertexIndex != arbparam ) ? SSSP_INF : 0;
			initGraph.at(dstVertexIndex).vertexValue.distance = ( dstVertexIndex != arbparam ) ? SSSP_INF : 0;
			nbrToAdd.edgeValue.weight = ( Additionalargc > 0 ) ? atoi(Additionalargv[0]) : 1;
			initGraph.at(dstVertexIndex).nbrs.push_back( nbrToAdd );
			nEdges++;
		}
	}

	return nEdges;

}



	.file	"tmpxft_0038c4a6_00000000-6_parse_graph.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4138:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4138:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4161:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4161:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._ZNSt6vectorI14initial_vertexSaIS0_EE2atEm.str1.1,"aMS",@progbits,1
.LC0:
	.string	"vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"
	.section	.text._ZNSt6vectorI14initial_vertexSaIS0_EE2atEm,"axG",@progbits,_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm,comdat
	.align 2
	.weak	_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm
	.type	_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm, @function
_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm:
.LFB4496:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	subq	%rax, %rdx
	sarq	$5, %rdx
	cmpq	%rdx, %rsi
	jb	.L5
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	_ZSt24__throw_out_of_range_fmtPKcz@PLT
.L5:
	.cfi_def_cfa_offset 8
	salq	$5, %rsi
	addq	%rsi, %rax
	ret
	.cfi_endproc
.LFE4496:
	.size	_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm, .-_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm
	.section	.text._ZNSt12_Vector_baseI8neighborSaIS0_EED2Ev,"axG",@progbits,_ZNSt12_Vector_baseI8neighborSaIS0_EED5Ev,comdat
	.align 2
	.weak	_ZNSt12_Vector_baseI8neighborSaIS0_EED2Ev
	.type	_ZNSt12_Vector_baseI8neighborSaIS0_EED2Ev, @function
_ZNSt12_Vector_baseI8neighborSaIS0_EED2Ev:
.LFB4654:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L10
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L10:
	ret
	.cfi_endproc
.LFE4654:
	.size	_ZNSt12_Vector_baseI8neighborSaIS0_EED2Ev, .-_ZNSt12_Vector_baseI8neighborSaIS0_EED2Ev
	.weak	_ZNSt12_Vector_baseI8neighborSaIS0_EED1Ev
	.set	_ZNSt12_Vector_baseI8neighborSaIS0_EED1Ev,_ZNSt12_Vector_baseI8neighborSaIS0_EED2Ev
	.section	.rodata._ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_.str1.1,"aMS",@progbits,1
.LC1:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_,"axG",@progbits,_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
	.type	_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_, @function
_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_:
.LFB4671:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rcx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r14
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	subq	%r14, %rbx
	sarq	$3, %rbx
	cmpq	%rcx, %rbx
	jne	.L13
	leaq	.LC1(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L13:
	cmpq	%r14, (%rsp)
	movl	$1, %eax
	movq	%rsi, %r15
	movq	%rdi, %r13
	cmovne	%rbx, %rax
	movq	%rsi, %rbp
	addq	%rax, %rbx
	setc	%al
	subq	%r14, %r15
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L23
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L18
	movabsq	$1152921504606846975, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L17
.L23:
	movq	%rcx, %rbx
.L17:
	leaq	0(,%rbx,8), %rdi
	movq	%rdx, 8(%rsp)
	call	_Znwm@PLT
	movq	8(%rsp), %rdx
	movq	%rax, %r12
.L18:
	movq	(%rdx), %rax
	movq	%rax, (%r12,%r15)
	testq	%r15, %r15
	jle	.L19
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L19:
	movq	(%rsp), %rax
	leaq	8(%r12,%r15), %rdx
	subq	%rbp, %rax
	testq	%rax, %rax
	jle	.L20
	movq	%rdx, %rdi
	movq	%rbp, %rsi
	movq	%rax, %rcx
	rep movsb
.L20:
	leaq	(%rdx,%rax), %rbp
	testq	%r14, %r14
	je	.L21
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L21:
	leaq	(%r12,%rbx,8), %rax
	movq	%r12, 0(%r13)
	movq	%rbp, 8(%r13)
	movq	%rax, 16(%r13)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4671:
	.size	_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_, .-_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
	.section	.text._ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_,"axG",@progbits,_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_,comdat
	.align 2
	.weak	_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_
	.type	_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_, @function
_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_:
.LFB4497:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movq	8(%rdi), %rsi
	cmpq	16(%rdi), %rsi
	je	.L31
	movq	(%rdx), %rax
	addq	$8, %rsi
	movq	%rax, -8(%rsi)
	movq	%rsi, 8(%rdi)
	ret
.L31:
	jmp	_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
	.cfi_endproc
.LFE4497:
	.size	_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_, .-_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_
	.section	.text._ZNSt27__uninitialized_default_n_1ILb0EE18__uninit_default_nIP14initial_vertexmEET_S4_T0_,"axG",@progbits,_ZNSt27__uninitialized_default_n_1ILb0EE18__uninit_default_nIP14initial_vertexmEET_S4_T0_,comdat
	.weak	_ZNSt27__uninitialized_default_n_1ILb0EE18__uninit_default_nIP14initial_vertexmEET_S4_T0_
	.type	_ZNSt27__uninitialized_default_n_1ILb0EE18__uninit_default_nIP14initial_vertexmEET_S4_T0_, @function
_ZNSt27__uninitialized_default_n_1ILb0EE18__uninit_default_nIP14initial_vertexmEET_S4_T0_:
.LFB4902:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
.L35:
	testq	%rdx, %rdx
	je	.L37
	xorl	%ecx, %ecx
	decq	%rdx
	addq	$32, %rax
	movq	%rcx, -24(%rax)
	movq	%rcx, -8(%rax)
	movq	%rcx, -16(%rax)
	jmp	.L35
.L37:
	salq	$5, %rsi
	leaq	(%rdi,%rsi), %rax
	ret
	.cfi_endproc
.LFE4902:
	.size	_ZNSt27__uninitialized_default_n_1ILb0EE18__uninit_default_nIP14initial_vertexmEET_S4_T0_, .-_ZNSt27__uninitialized_default_n_1ILb0EE18__uninit_default_nIP14initial_vertexmEET_S4_T0_
	.section	.rodata._ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm.str1.1,"aMS",@progbits,1
.LC2:
	.string	"vector::_M_default_append"
	.section	.text._ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm,comdat
	.align 2
	.weak	_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm
	.type	_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm, @function
_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm:
.LFB4661:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	je	.L52
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	8(%rdi), %rax
	movq	(%rdi), %rcx
	movq	%rax, 8(%rsp)
	movq	16(%rdi), %rax
	movq	8(%rsp), %rdx
	subq	%rdx, %rax
	sarq	$5, %rax
	cmpq	%rsi, %rax
	jb	.L40
	movq	%rdx, %rdi
	call	_ZNSt27__uninitialized_default_n_1ILb0EE18__uninit_default_nIP14initial_vertexmEET_S4_T0_
	movq	%rax, 8(%r15)
	jmp	.L38
.L40:
	movabsq	$288230376151711743, %rax
	movq	8(%rsp), %r13
	subq	%rcx, %r13
	movq	%r13, %r14
	sarq	$5, %r14
	subq	%r14, %rax
	cmpq	%rsi, %rax
	jnb	.L41
	leaq	.LC2(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L41:
	cmpq	%r14, %rsi
	movq	%r14, %r12
	movq	%rcx, 16(%rsp)
	movabsq	$288230376151711743, %rax
	cmovnb	%rsi, %r12
	addq	%r14, %r12
	cmpq	%rax, %r12
	cmova	%rax, %r12
	salq	$5, %r12
	movq	%r12, %rdi
	call	_Znwm@PLT
	movq	%rbx, %rsi
	leaq	(%rax,%r13), %rdi
	movq	%rax, %rbp
	call	_ZNSt27__uninitialized_default_n_1ILb0EE18__uninit_default_nIP14initial_vertexmEET_S4_T0_
	movq	16(%rsp), %rcx
	movq	%rbp, %rax
	movq	%rcx, %r13
.L42:
	cmpq	%r13, 8(%rsp)
	je	.L55
	movl	0(%r13), %esi
	movq	%rax, 16(%rsp)
	leaq	8(%r13), %rdi
	addq	$32, %r13
	movq	%rcx, 24(%rsp)
	movl	%esi, (%rax)
	movq	-24(%r13), %rsi
	movq	%rsi, 8(%rax)
	movq	-16(%r13), %rsi
	movq	%rsi, 16(%rax)
	movq	-8(%r13), %rsi
	movq	%rsi, 24(%rax)
	xorl	%eax, %eax
	movq	%rax, -8(%r13)
	movq	%rax, -16(%r13)
	movq	%rax, -24(%r13)
	call	_ZNSt12_Vector_baseI8neighborSaIS0_EED2Ev
	movq	16(%rsp), %rax
	movq	24(%rsp), %rcx
	addq	$32, %rax
	jmp	.L42
.L55:
	testq	%rcx, %rcx
	je	.L44
	movq	16(%r15), %rsi
	movq	%rcx, %rdi
	subq	%rcx, %rsi
	call	_ZdlPvm@PLT
.L44:
	addq	%r14, %rbx
	movq	%rbp, (%r15)
	salq	$5, %rbx
	addq	%rbp, %rbx
	addq	%r12, %rbp
	movq	%rbx, 8(%r15)
	movq	%rbp, 16(%r15)
.L38:
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L52:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE4661:
	.size	_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm, .-_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm
	.text
	.globl	_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb
	.type	_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb, @function
_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb:
.LFB4133:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4133
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$888, %rsp
	.cfi_def_cfa_offset 944
	movq	%rdi, 64(%rsp)
	movq	%rdx, 40(%rsp)
	movb	%cl, 79(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 872(%rsp)
	xorl	%eax, %eax
	leaq	104(%rsp), %rax
	movb	$0, 104(%rsp)
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	movq	%rax, 96(%rsp)
	leaq	88(%rsp), %rax
	movw	$2336, 613(%rsp)
	movb	$0, 615(%rsp)
	movq	%rax, 24(%rsp)
.L57:
	movq	24(%rsp), %rsi
	movq	64(%rsp), %rdi
.LEHB0:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L91
	movq	88(%rsp), %rsi
	movb	(%rsi), %al
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L57
	leaq	616(%rsp), %rdi
	movl	$256, %edx
	call	__strcpy_chk@PLT
	movq	%rax, %rdi
	leaq	613(%rsp), %rax
	movq	%rax, %rsi
	movq	%rax, 8(%rsp)
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L57
	call	atoi@PLT
	movq	8(%rsp), %rsi
	xorl	%edi, %edi
	movl	%eax, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L57
	call	atoi@PLT
	movq	8(%rbx), %rdx
	movq	(%rbx), %r14
	cmpl	%eax, %r12d
	movl	%eax, %ecx
	movl	%eax, %ebp
	cmovnb	%r12d, %ecx
	movq	%rdx, %rax
	subq	%r14, %rax
	sarq	$5, %rax
	movl	%ecx, %esi
	cmpq	%rax, %rsi
	jb	.L60
	leal	1(%rcx), %esi
	cmpq	%rsi, %rax
	jnb	.L61
	subq	%rax, %rsi
	movq	%rbx, %rdi
	call	_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm
	jmp	.L60
.L61:
	cmpq	%rax, %rsi
	jnb	.L60
	salq	$5, %rsi
	addq	%rsi, %r14
	cmpq	%r14, %rdx
	je	.L60
	movq	%r14, %r15
.L63:
	leaq	8(%r15), %rdi
	movq	%rdx, 16(%rsp)
	addq	$32, %r15
	call	_ZNSt12_Vector_baseI8neighborSaIS0_EED2Ev
	movq	16(%rsp), %rdx
	cmpq	%r15, %rdx
	jne	.L63
	movq	%r14, 8(%rbx)
.L60:
	movq	8(%rsp), %rsi
	xorl	%edi, %edi
	movl	%r12d, 84(%rsp)
	xorl	%r15d, %r15d
	call	strtok@PLT
	leaq	120(%rsp), %rdx
	movq	%rax, 120(%rsp)
	movq	%rax, %r14
.L64:
	cmpq	$0, (%rdx,%r15,8)
	leaq	1(%r15), %rcx
	je	.L92
	movq	8(%rsp), %rsi
	xorl	%edi, %edi
	movq	%rdx, 32(%rsp)
	movq	%rcx, 16(%rsp)
	call	strtok@PLT
	movq	16(%rsp), %rcx
	movq	32(%rsp), %rdx
	movq	%rcx, %r15
	movq	%rax, (%rdx,%rcx,8)
	jmp	.L64
.L92:
	movq	40(%rsp), %rdx
	movl	%r12d, %eax
	movq	%rbx, %rdi
	movq	%rax, 16(%rsp)
	movq	16(%rsp), %rsi
	cmpq	%rdx, %rax
	setne	%al
	movzbl	%al, %eax
	sall	$30, %eax
	movl	%eax, 32(%rsp)
	call	_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm
	movl	32(%rsp), %ecx
	movq	40(%rsp), %rdx
	movl	%ebp, %esi
	movq	%rbx, %rdi
	movl	%ecx, (%rax)
	movl	%ebp, %eax
	cmpq	%rdx, %rax
	movq	%rax, 48(%rsp)
	setne	%al
	movzbl	%al, %eax
	sall	$30, %eax
	movl	%eax, %r12d
	call	_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm
	movl	%r12d, (%rax)
	movl	$1, %eax
	testl	%r15d, %r15d
	je	.L66
	movq	%r14, %rdi
	call	atoi@PLT
.L66:
	movl	%ebp, %esi
	movq	%rbx, %rdi
	movl	%eax, 80(%rsp)
	call	_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm
	leaq	80(%rsp), %rcx
	leaq	8(%rax), %rdi
	movq	%rcx, %rsi
	movq	%rcx, 56(%rsp)
	call	_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_
	cmpb	$0, 79(%rsp)
	leal	1(%r13), %eax
	je	.L67
	movq	8(%rsp), %rsi
	xorl	%edi, %edi
	movl	%ebp, 84(%rsp)
	xorl	%r14d, %r14d
	leaq	120(%rsp), %r15
	call	strtok@PLT
	movq	%rax, 120(%rsp)
	movq	%rax, %rbp
.L68:
	cmpq	$0, (%r15,%r14,8)
	leaq	1(%r14), %rcx
	je	.L93
	leaq	613(%rsp), %rsi
	xorl	%edi, %edi
	movq	%rcx, 8(%rsp)
	call	strtok@PLT
	movq	8(%rsp), %rcx
	movq	%rax, (%r15,%rcx,8)
	movq	%rcx, %r14
	jmp	.L68
.L93:
	movq	48(%rsp), %rsi
	movq	%rbx, %rdi
	call	_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm
	movl	%r12d, (%rax)
	movq	16(%rsp), %rsi
	movq	%rbx, %rdi
	call	_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm
	movl	32(%rsp), %edx
	movl	%edx, (%rax)
	movl	$1, %eax
	testl	%r14d, %r14d
	je	.L70
	movq	%rbp, %rdi
	call	atoi@PLT
.L70:
	movq	16(%rsp), %rsi
	movq	%rbx, %rdi
	movl	%eax, 80(%rsp)
	call	_ZNSt6vectorI14initial_vertexSaIS0_EE2atEm
	movq	56(%rsp), %rsi
	leaq	8(%rax), %rdi
	call	_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_
.LEHE0:
	leal	2(%r13), %eax
.L67:
	movl	%eax, %r13d
	jmp	.L57
.L91:
	movq	24(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	je	.L75
	jmp	.L89
.L78:
	endbr64
	movq	%rax, %rbx
.L73:
	movq	24(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	872(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L89
	movq	%rbx, %rdi
.LEHB1:
	call	_Unwind_Resume@PLT
.LEHE1:
.L89:
	call	__stack_chk_fail@PLT
.L75:
	addq	$888, %rsp
	.cfi_def_cfa_offset 56
	movl	%r13d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4133:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4133:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4133-.LLSDACSB4133
.LLSDACSB4133:
	.uleb128 .LEHB0-.LFB4133
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L78-.LFB4133
	.uleb128 0
	.uleb128 .LEHB1-.LFB4133
	.uleb128 .LEHE1-.LEHB1
	.uleb128 0
	.uleb128 0
.LLSDACSE4133:
	.text
	.size	_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb, .-_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <string>
#include <cstring>
#include <cstdlib>
#include <stdio.h>
#include <iostream>

#include "parse_graph.cuh"

#define SSSP_INF 1073741824

uint parse_graph::parse(
		std::ifstream& inFile,
		std::vector<initial_vertex>& initGraph,
		const long long arbparam,
		const bool nondirected ) {

	const bool firstColumnSourceIndex = true;

	std::string line;
	char delim[3] = " \t";	//In most benchmarks, the delimiter is usually the space character or the tab character.
	char* pch;
	uint nEdges = 0;

	unsigned int Additionalargc=0;
	char* Additionalargv[ 61 ];

	// Read the input graph line-by-line.
	while( std::getline( inFile, line ) ) {
		if( line[0] < '0' || line[0] > '9' )	// Skipping any line blank or starting with a character rather than a number.
			continue;
		char cstrLine[256];
		std::strcpy( cstrLine, line.c_str() );
		uint firstIndex, secondIndex;

		pch = strtok(cstrLine, delim);
		if( pch != NULL )
			firstIndex = atoi( pch );
		else
			continue;
		pch = strtok( NULL, delim );
		if( pch != NULL )
			secondIndex = atoi( pch );
		else
			continue;

		uint theMax = std::max( firstIndex, secondIndex );
		// some input source is src dst weight , some is reversed
		uint srcVertexIndex = firstColumnSourceIndex ? firstIndex : secondIndex;
		uint dstVertexIndex = firstColumnSourceIndex ? secondIndex : firstIndex;
		if( initGraph.size() <= theMax )
			initGraph.resize(theMax+1);
		{ //This is just a block
		        // Add the neighbor. A neighbor wraps edges
			neighbor nbrToAdd;
			nbrToAdd.srcIndex = srcVertexIndex;

			Additionalargc=0;
			Additionalargv[ Additionalargc ] = strtok( NULL, delim );
			while( Additionalargv[ Additionalargc ] != NULL ){
				Additionalargc++;
				Additionalargv[ Additionalargc ] = strtok( NULL, delim );
			}
			initGraph.at(srcVertexIndex).vertexValue.distance = ( srcVertexIndex != arbparam ) ? SSSP_INF : 0;
			initGraph.at(dstVertexIndex).vertexValue.distance = ( dstVertexIndex != arbparam ) ? SSSP_INF : 0;
			nbrToAdd.edgeValue.weight = ( Additionalargc > 0 ) ? atoi(Additionalargv[0]) : 1;

			initGraph.at(dstVertexIndex).nbrs.push_back( nbrToAdd );
			nEdges++;
		}
		if( nondirected ) {
		    // Add the edge going the other way
			uint tmp = srcVertexIndex;
			srcVertexIndex = dstVertexIndex;
			dstVertexIndex = tmp;
			//swap src and dest and add as before
			
			neighbor nbrToAdd;
			nbrToAdd.srcIndex = srcVertexIndex;

			Additionalargc=0;
			Additionalargv[ Additionalargc ] = strtok( NULL, delim );
			while( Additionalargv[ Additionalargc ] != NULL ){
				Additionalargc++;
				Additionalargv[ Additionalargc ] = strtok( NULL, delim );
			}
			initGraph.at(srcVertexIndex).vertexValue.distance = ( srcVertexIndex != arbparam ) ? SSSP_INF : 0;
			initGraph.at(dstVertexIndex).vertexValue.distance = ( dstVertexIndex != arbparam ) ? SSSP_INF : 0;
			nbrToAdd.edgeValue.weight = ( Additionalargc > 0 ) ? atoi(Additionalargv[0]) : 1;
			initGraph.at(dstVertexIndex).nbrs.push_back( nbrToAdd );
			nEdges++;
		}
	}

	return nEdges;

}



	.text
	.file	"parse_graph.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb # -- Begin function _ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb
	.type	_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb,@function
_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb: # @_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$856, %rsp                      # imm = 0x358
	.cfi_def_cfa_offset 912
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%ecx, 20(%rsp)                  # 4-byte Spill
	movq	%rdx, 104(%rsp)                 # 8-byte Spill
	movq	%rsi, 24(%rsp)                  # 8-byte Spill
	movq	%rdi, %r12
	leaq	72(%rsp), %r13
	movq	%r13, -16(%r13)
	movq	$0, -8(%r13)
	xorl	%ebx, %ebx
	movb	%bl, (%r13)
	leaq	5(%rsp), %rax
	movw	$2336, (%rax)                   # imm = 0x920
	movb	%bl, 2(%rax)
	leaq	56(%rsp), %rbp
.LBB0_1:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_2 Depth 2
                                        #       Child Loop BB0_12 Depth 3
                                        #       Child Loop BB0_30 Depth 3
	leaq	112(%rsp), %r14
.LBB0_2:                                #   Parent Loop BB0_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_12 Depth 3
                                        #       Child Loop BB0_30 Depth 3
	movq	(%r12), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
.Ltmp0:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp1:
# %bb.3:                                # %.noexc
                                        #   in Loop: Header=BB0_2 Depth=2
.Ltmp2:
	movsbl	%al, %edx
	movq	%r12, %rdi
	movq	%rbp, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp3:
# %bb.4:                                #   in Loop: Header=BB0_2 Depth=2
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB0_46
# %bb.5:                                #   in Loop: Header=BB0_2 Depth=2
	movq	56(%rsp), %rsi
	movb	(%rsi), %al
	addb	$-58, %al
	cmpb	$-10, %al
	jb	.LBB0_2
# %bb.6:                                #   in Loop: Header=BB0_2 Depth=2
	movq	%r14, %rdi
	callq	strcpy
	movq	%r14, %rdi
	leaq	5(%rsp), %r15
	movq	%r15, %rsi
	callq	strtok
	testq	%rax, %rax
	je	.LBB0_2
# %bb.7:                                #   in Loop: Header=BB0_2 Depth=2
	movq	%rax, %rdi
	callq	atoi
	movl	%eax, %r14d
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	strtok
	testq	%rax, %rax
	je	.LBB0_1
# %bb.8:                                #   in Loop: Header=BB0_2 Depth=2
	movq	%rax, %rdi
	callq	atoi
	cmpl	%eax, %r14d
	movl	%eax, 16(%rsp)                  # 4-byte Spill
	movl	%eax, %esi
	cmoval	%r14d, %esi
	movq	24(%rsp), %rcx                  # 8-byte Reload
	movq	8(%rcx), %rax
	subq	(%rcx), %rax
	sarq	$5, %rax
	cmpq	%rsi, %rax
	ja	.LBB0_10
# %bb.9:                                #   in Loop: Header=BB0_2 Depth=2
	incl	%esi
.Ltmp5:
	movq	24(%rsp), %rdi                  # 8-byte Reload
	callq	_ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm
.Ltmp6:
.LBB0_10:                               #   in Loop: Header=BB0_2 Depth=2
	movq	%rbx, 32(%rsp)                  # 8-byte Spill
	movl	%r14d, 12(%rsp)
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	leaq	5(%rsp), %rbx
	movq	%rbx, %rsi
	callq	strtok
	movq	%rax, 368(%rsp)
	testq	%rax, %rax
	je	.LBB0_13
# %bb.11:                               # %.lr.ph.preheader
                                        #   in Loop: Header=BB0_2 Depth=2
	xorl	%r13d, %r13d
.LBB0_12:                               # %.lr.ph
                                        #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	incl	%r13d
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	strtok
	movq	%rax, 368(%rsp,%r13,8)
	testq	%rax, %rax
	jne	.LBB0_12
.LBB0_13:                               # %._crit_edge
                                        #   in Loop: Header=BB0_2 Depth=2
	movl	%r14d, %esi
	xorl	%ebx, %ebx
	movq	104(%rsp), %rcx                 # 8-byte Reload
	cmpq	%rcx, %rsi
	setne	%al
	movq	24(%rsp), %rdx                  # 8-byte Reload
	movq	(%rdx), %r15
	movq	8(%rdx), %rdx
	subq	%r15, %rdx
	sarq	$5, %rdx
	cmpq	%rsi, %rdx
	jbe	.LBB0_14
# %bb.18:                               #   in Loop: Header=BB0_2 Depth=2
	movb	%al, %bl
	shll	$30, %ebx
	movq	%rsi, %r14
	shlq	$5, %r14
	movl	%ebx, (%r15,%r14)
	movl	16(%rsp), %edi                  # 4-byte Reload
	xorl	%r8d, %r8d
	cmpq	%rcx, %rdi
	setne	%al
	cmpq	%rdi, %rdx
	jbe	.LBB0_19
# %bb.20:                               #   in Loop: Header=BB0_2 Depth=2
	movq	%rsi, 88(%rsp)                  # 8-byte Spill
	movb	%al, %r8b
	shll	$30, %r8d
	movq	%rdi, 96(%rsp)                  # 8-byte Spill
	shlq	$5, %rdi
	movl	%r8d, 44(%rsp)                  # 4-byte Spill
	movq	%rdi, 48(%rsp)                  # 8-byte Spill
	movl	%r8d, (%r15,%rdi)
	testl	%r13d, %r13d
	je	.LBB0_21
# %bb.22:                               #   in Loop: Header=BB0_2 Depth=2
	movq	368(%rsp), %rdi
	callq	atoi
	jmp	.LBB0_23
.LBB0_21:                               #   in Loop: Header=BB0_2 Depth=2
	movl	$1, %eax
.LBB0_23:                               #   in Loop: Header=BB0_2 Depth=2
	movl	%eax, 8(%rsp)
	movq	48(%rsp), %rax                  # 8-byte Reload
	leaq	(%r15,%rax), %rdi
	addq	$8, %rdi
	movq	8(%rdi), %rsi
	cmpq	16(%rdi), %rsi
	je	.LBB0_25
# %bb.24:                               #   in Loop: Header=BB0_2 Depth=2
	movq	8(%rsp), %rax
	movq	%rax, (%rsi)
	addq	$8, 8(%rdi)
	movl	20(%rsp), %eax                  # 4-byte Reload
	jmp	.LBB0_26
.LBB0_25:                               #   in Loop: Header=BB0_2 Depth=2
.Ltmp11:
	leaq	8(%rsp), %rdx
	callq	_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
.Ltmp12:
	movl	20(%rsp), %eax                  # 4-byte Reload
.LBB0_26:                               # %_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_.exit
                                        #   in Loop: Header=BB0_2 Depth=2
	testb	%al, %al
	je	.LBB0_27
# %bb.28:                               #   in Loop: Header=BB0_2 Depth=2
	movl	16(%rsp), %eax                  # 4-byte Reload
	movl	%eax, 12(%rsp)
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	leaq	5(%rsp), %r15
	movq	%r15, %rsi
	callq	strtok
	movq	%rax, 368(%rsp)
	testq	%rax, %rax
	je	.LBB0_31
# %bb.29:                               # %.lr.ph136.preheader
                                        #   in Loop: Header=BB0_2 Depth=2
	xorl	%r13d, %r13d
.LBB0_30:                               # %.lr.ph136
                                        #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	incl	%r13d
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	strtok
	movq	%rax, 368(%rsp,%r13,8)
	testq	%rax, %rax
	jne	.LBB0_30
.LBB0_31:                               # %._crit_edge137
                                        #   in Loop: Header=BB0_2 Depth=2
	movq	24(%rsp), %rax                  # 8-byte Reload
	movq	(%rax), %r15
	movq	8(%rax), %rdx
	subq	%r15, %rdx
	sarq	$5, %rdx
	movq	96(%rsp), %rsi                  # 8-byte Reload
	cmpq	%rsi, %rdx
	jbe	.LBB0_32
# %bb.36:                               #   in Loop: Header=BB0_2 Depth=2
	movl	44(%rsp), %eax                  # 4-byte Reload
	movq	48(%rsp), %rcx                  # 8-byte Reload
	movl	%eax, (%r15,%rcx)
	movq	88(%rsp), %rax                  # 8-byte Reload
	movq	%rax, %rsi
	cmpq	%rax, %rdx
	jbe	.LBB0_32
# %bb.37:                               #   in Loop: Header=BB0_2 Depth=2
	movl	%ebx, (%r15,%r14)
	testl	%r13d, %r13d
	je	.LBB0_38
# %bb.39:                               #   in Loop: Header=BB0_2 Depth=2
	movq	368(%rsp), %rdi
	callq	atoi
	jmp	.LBB0_40
.LBB0_38:                               #   in Loop: Header=BB0_2 Depth=2
	movl	$1, %eax
.LBB0_40:                               #   in Loop: Header=BB0_2 Depth=2
	leaq	72(%rsp), %r13
	movq	32(%rsp), %rbx                  # 8-byte Reload
	movl	%eax, 8(%rsp)
	leaq	(%r15,%r14), %rdi
	addq	$8, %rdi
	movq	8(%rdi), %rsi
	cmpq	16(%rdi), %rsi
	je	.LBB0_42
# %bb.41:                               #   in Loop: Header=BB0_2 Depth=2
	movq	8(%rsp), %rax
	movq	%rax, (%rsi)
	addq	$8, 8(%rdi)
	leaq	112(%rsp), %r14
	jmp	.LBB0_43
.LBB0_42:                               #   in Loop: Header=BB0_2 Depth=2
.Ltmp17:
	leaq	8(%rsp), %rdx
	callq	_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
.Ltmp18:
	leaq	112(%rsp), %r14
.LBB0_43:                               # %_ZNSt6vectorI8neighborSaIS0_EE9push_backERKS0_.exit88
                                        #   in Loop: Header=BB0_2 Depth=2
	addl	$2, %ebx
	jmp	.LBB0_2
.LBB0_27:                               #   in Loop: Header=BB0_1 Depth=1
	movq	32(%rsp), %rbx                  # 8-byte Reload
	incl	%ebx
	leaq	72(%rsp), %r13
	jmp	.LBB0_1
.LBB0_46:
	movq	56(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB0_48
# %bb.47:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB0_48:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movl	%ebx, %eax
	addq	$856, %rsp                      # imm = 0x358
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB0_19:
	.cfi_def_cfa_offset 912
	movq	%rdi, %rsi
.LBB0_14:                               # %.invoke
.Ltmp8:
	movl	$.L.str.2, %edi
	xorl	%eax, %eax
	callq	_ZSt24__throw_out_of_range_fmtPKcz
.Ltmp9:
# %bb.17:                               # %.cont
.LBB0_32:                               # %.invoke199
.Ltmp14:
	movl	$.L.str.2, %edi
	xorl	%eax, %eax
	callq	_ZSt24__throw_out_of_range_fmtPKcz
.Ltmp15:
# %bb.35:                               # %.cont200
.LBB0_44:                               # %.loopexit98
.Ltmp19:
	jmp	.LBB0_50
.LBB0_33:                               # %.loopexit
.Ltmp13:
	jmp	.LBB0_16
.LBB0_15:
.Ltmp7:
	jmp	.LBB0_16
.LBB0_45:                               # %.loopexit.split-lp99
.Ltmp16:
	jmp	.LBB0_16
.LBB0_34:                               # %.loopexit.split-lp
.Ltmp10:
.LBB0_16:
	movq	%rax, %rbx
	leaq	72(%rsp), %r13
	jmp	.LBB0_51
.LBB0_49:
.Ltmp4:
.LBB0_50:
	movq	%rax, %rbx
.LBB0_51:
	movq	56(%rsp), %rdi
	cmpq	%r13, %rdi
	je	.LBB0_53
# %bb.52:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i89
	callq	_ZdlPv
.LBB0_53:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit91
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb, .Lfunc_end0-_ZN11parse_graph5parseERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorI14initial_vertexSaIS6_EExb
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 1 <<
	.uleb128 .Ltmp3-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp3
	.uleb128 .Ltmp4-.Lfunc_begin0           #     jumps to .Ltmp4
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp5-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp6-.Ltmp5                  #   Call between .Ltmp5 and .Ltmp6
	.uleb128 .Ltmp7-.Lfunc_begin0           #     jumps to .Ltmp7
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Ltmp12-.Ltmp11                #   Call between .Ltmp11 and .Ltmp12
	.uleb128 .Ltmp13-.Lfunc_begin0          #     jumps to .Ltmp13
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp17-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp18-.Ltmp17                #   Call between .Ltmp17 and .Ltmp18
	.uleb128 .Ltmp19-.Lfunc_begin0          #     jumps to .Ltmp19
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 5 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp15-.Ltmp14                #   Call between .Ltmp14 and .Ltmp15
	.uleb128 .Ltmp16-.Lfunc_begin0          #     jumps to .Ltmp16
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp15-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Lfunc_end0-.Ltmp15            #   Call between .Ltmp15 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm,"axG",@progbits,_ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm,comdat
	.weak	_ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm # -- Begin function _ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm,@function
_ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm: # @_ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movq	8(%rdi), %r15
	movq	%r15, %rcx
	subq	%r14, %rcx
	sarq	$5, %rcx
	movq	%rsi, %rax
	subq	%rcx, %rax
	jbe	.LBB1_1
# %bb.9:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm # TAILCALL
.LBB1_1:
	.cfi_def_cfa_offset 48
	jae	.LBB1_8
# %bb.2:
	shlq	$5, %rsi
	addq	%rsi, %r14
	cmpq	%r14, %r15
	je	.LBB1_8
# %bb.3:                                # %.lr.ph.i.i.i.i.preheader
	movq	%r14, %r12
.LBB1_4:                                # %.lr.ph.i.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	.LBB1_6
# %bb.5:                                #   in Loop: Header=BB1_4 Depth=1
	callq	_ZdlPv
.LBB1_6:                                # %_ZSt8_DestroyI14initial_vertexEvPT_.exit.i.i.i.i
                                        #   in Loop: Header=BB1_4 Depth=1
	addq	$32, %r12
	cmpq	%r15, %r12
	jne	.LBB1_4
# %bb.7:                                # %_ZSt8_DestroyIP14initial_vertexS0_EvT_S2_RSaIT0_E.exit.i
	movq	%r14, 8(%rbx)
.LBB1_8:                                # %_ZNSt6vectorI14initial_vertexSaIS0_EE15_M_erase_at_endEPS0_.exit
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm, .Lfunc_end1-_ZNSt6vectorI14initial_vertexSaIS0_EE6resizeEm
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm,comdat
	.weak	_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm # -- Begin function _ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm,@function
_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm: # @_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm
	.cfi_startproc
# %bb.0:
	testq	%rsi, %rsi
	je	.LBB2_17
# %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %rbp
	movq	16(%rdi), %rax
	subq	%rbp, %rax
	sarq	$5, %rax
	cmpq	%rsi, %rax
	jae	.LBB2_2
# %bb.5:
	movq	(%rbx), %r15
	movq	%rbp, %r12
	subq	%r15, %r12
	sarq	$5, %r12
	movl	$.L.str, %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc
	testq	%rax, %rax
	movq	%rax, (%rsp)                    # 8-byte Spill
	je	.LBB2_6
# %bb.7:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv
	movq	%rax, %r13
	jmp	.LBB2_8
.LBB2_2:                                # %.lr.ph.i.i.i.preheader
	xorps	%xmm0, %xmm0
.LBB2_3:                                # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movups	%xmm0, 8(%rbp)
	movq	$0, 24(%rbp)
	addq	$32, %rbp
	decq	%r14
	jne	.LBB2_3
# %bb.4:                                # %_ZSt27__uninitialized_default_n_aIP14initial_vertexmS0_ET_S2_T0_RSaIT1_E.exit
	movq	%rbp, 8(%rbx)
	jmp	.LBB2_16
.LBB2_6:
	xorl	%r13d, %r13d
.LBB2_8:                                # %_ZNSt12_Vector_baseI14initial_vertexSaIS0_EE11_M_allocateEm.exit
	shlq	$5, %r12
	leaq	(%r12,%r13), %rax
	addq	$8, %rax
	addq	%r13, %r12
	xorps	%xmm0, %xmm0
	movq	%r14, %rcx
.LBB2_9:                                # %.lr.ph.i.i.i30
                                        # =>This Inner Loop Header: Depth=1
	movups	%xmm0, (%rax)
	movq	$0, 16(%rax)
	addq	$32, %rax
	decq	%rcx
	jne	.LBB2_9
# %bb.10:                               # %_ZSt27__uninitialized_default_n_aIP14initial_vertexmS0_ET_S2_T0_RSaIT1_E.exit35
	cmpq	%rbp, %r15
	je	.LBB2_13
# %bb.11:                               # %.lr.ph.i.i.i37.preheader
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
.LBB2_12:                               # %.lr.ph.i.i.i37
                                        # =>This Inner Loop Header: Depth=1
	leaq	(%r15,%rax), %rcx
	addq	$32, %rcx
	movb	-28(%rcx), %dl
	movb	%dl, 4(%r13,%rax)
	movl	-32(%rcx), %edx
	movl	%edx, (%r13,%rax)
	movq	-24(%rcx), %rdx
	movq	%rdx, 8(%r13,%rax)
	movq	-16(%rcx), %rdx
	movq	%rdx, 16(%r13,%rax)
	movq	-8(%rcx), %rdx
	movq	%rdx, 24(%r13,%rax)
	movups	%xmm0, -24(%rcx)
	movq	$0, -8(%rcx)
	addq	$32, %rax
	cmpq	%rbp, %rcx
	jne	.LBB2_12
.LBB2_13:                               # %_ZNSt6vectorI14initial_vertexSaIS0_EE11_S_relocateEPS0_S3_S3_RS1_.exit
	testq	%r15, %r15
	je	.LBB2_15
# %bb.14:
	movq	%r15, %rdi
	callq	_ZdlPv
.LBB2_15:                               # %_ZNSt12_Vector_baseI14initial_vertexSaIS0_EE13_M_deallocateEPS0_m.exit41
	movq	%r13, (%rbx)
	shlq	$5, %r14
	addq	%r14, %r12
	movq	%r12, 8(%rbx)
	movq	(%rsp), %rax                    # 8-byte Reload
	shlq	$5, %rax
	addq	%r13, %rax
	movq	%rax, 16(%rbx)
.LBB2_16:
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
	.cfi_restore %rbp
.LBB2_17:
	retq
.Lfunc_end2:
	.size	_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm, .Lfunc_end2-_ZNSt6vectorI14initial_vertexSaIS0_EE17_M_default_appendEm
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc,@function
_ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc: # @_ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$288230376151711743, %rcx       # imm = 0x3FFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$5, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB3_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB3_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end3:
	.size	_ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc, .Lfunc_end3-_ZNKSt6vectorI14initial_vertexSaIS0_EE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorI8neighborE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorI8neighborE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorI8neighborE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorI8neighborE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorI8neighborE8allocateEmPKv,@function
_ZNSt15__new_allocatorI8neighborE8allocateEmPKv: # @_ZNSt15__new_allocatorI8neighborE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB4_1
# %bb.3:
	shlq	$3, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB4_1:
	.cfi_def_cfa_offset 16
	shrq	$61, %rsi
	je	.LBB4_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB4_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end4:
	.size	_ZNSt15__new_allocatorI8neighborE8allocateEmPKv, .Lfunc_end4-_ZNSt15__new_allocatorI8neighborE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv,@function
_ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv: # @_ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$58, %rax
	jne	.LBB5_1
# %bb.3:
	shlq	$5, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB5_1:
	.cfi_def_cfa_offset 16
	shrq	$59, %rsi
	je	.LBB5_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB5_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end5:
	.size	_ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv, .Lfunc_end5-_ZNSt15__new_allocatorI14initial_vertexE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_,"axG",@progbits,_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_,comdat
	.weak	_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_ # -- Begin function _ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_,@function
_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_: # @_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.3, %edx
	callq	_ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$3, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB6_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorI8neighborE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB6_3
.LBB6_1:
	xorl	%ebp, %ebp
.LBB6_3:                                # %_ZNSt12_Vector_baseI8neighborSaIS0_EE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, (%rbp,%r14,8)
	testq	%r12, %r12
	jle	.LBB6_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB6_5:                                # %_ZNSt6vectorI8neighborSaIS0_EE11_S_relocateEPS0_S3_S3_RS1_.exit
	addq	%rbp, %r12
	addq	$8, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB6_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB6_7:                                # %_ZNSt6vectorI8neighborSaIS0_EE11_S_relocateEPS0_S3_S3_RS1_.exit16
	testq	%r13, %r13
	je	.LBB6_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB6_9:                                # %_ZNSt12_Vector_baseI8neighborSaIS0_EE13_M_deallocateEPS0_m.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,8), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_, .Lfunc_end6-_ZNSt6vectorI8neighborSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc,@function
_ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc: # @_ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$1152921504606846975, %rcx      # imm = 0xFFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$3, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB7_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB7_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end7:
	.size	_ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc, .Lfunc_end7-_ZNKSt6vectorI8neighborSaIS0_EE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"vector::_M_default_append"
	.size	.L.str, 26

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"
	.size	.L.str.2, 74

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"vector::_M_realloc_insert"
	.size	.L.str.3, 26

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym _Unwind_Resume
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
