// File: /workspace/github_cpp_makefile_star2_O3/EnderGed[P]fast-random-walk/WeightedGraph.cpp
// Function: WeightedGraph::toString[abi:cxx11]() const
std::string WeightedGraph::toString() const
{
	unsigned const maxDigitsNode = hasDigits(getNumNodes() - 1);
	unsigned const maxDigitsWeight = hasDigits(std::numeric_limits<uint>::max());

	char asString[max(maxDigitsNode, maxDigitsWeight)];

	std::string res;
	res.reserve((maxDigitsNode * 2 + maxDigitsWeight + 6) * getNumTransitions());

	for(uint node = 0; node < numNodes; ++node)
	{
		uint const numTrans = getNumTransitions(node);

		for(uint trans = 0; trans < numTrans; ++trans)
		{
			// Determine weight
			uint const weight = trans ? getWeight(node, trans) - getWeight(node, trans - 1) : getWeight(node, trans);

			// Add source node
			unsigned len = writeInt(asString, node);
			res.append(asString, len);

			// Add " -"
			res.append(" -", 2);

			// Add weight
			len = writeInt(asString, weight);
			res.append(asString, len);

			// Add "-> "
			res.append("-> ", 3);

			// Add destination node
			len = writeInt(asString, getNode(node, trans));
			res.append(asString, len);

			// Add new line symbol
			res.append(1, '\n');
		}
	}

	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rsi), %eax
decl %eax
cvtsi2sd %rax, %xmm0
callq 0x20c0
callq 0x2060
cvttsd2si %xmm0, %rax
cmpl $0xb, %eax
movl $0xa, %ecx
cmovael %eax, %ecx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %r15
subq %rcx, %r15
movq %r15, %rsp
leaq 0x10(%rbx), %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leal 0x10(,%rax,2), %esi
movq 0x10(%r14), %rax
movl 0x8(%r14), %ecx
imulq (%rax,%rcx,8), %rsi
movq %rbx, %rdi
callq 0x2260
movl 0x8(%r14), %eax
testl %eax, %eax
je 0x444a
xorl %r12d, %r12d
movq %r14, -0x30(%rbp)
movq 0x10(%r14), %rdx
movq 0x8(%rdx,%r12,8), %rcx
subq (%rdx,%r12,8), %rcx
testl %ecx, %ecx
je 0x443c
movl %ecx, %eax
movq %rax, -0x40(%rbp)
xorl %r14d, %r14d
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rax
movq (%rax,%r12,8), %rax
shlq $0x2, %rax
addq 0x20(%rcx), %rax
testq %r14, %r14
je 0x4386
movl (%rax,%r14,4), %r13d
subl -0x4(%rax,%r14,4), %r13d
jmp 0x4389
movl (%rax), %r13d
movq %r15, %rdi
movl %r12d, %esi
callq 0x3ab5
movl %eax, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2050
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x1e91(%rip), %rsi      # 0x6241
callq 0x2050
movq %r15, %rdi
movl %r13d, %esi
callq 0x3ab5
movl %eax, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2050
movl $0x3, %edx
movq %rbx, %rdi
leaq 0x1caa(%rip), %rsi      # 0x6086
callq 0x2050
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rax
movq (%rax,%r12,8), %rax
shlq $0x2, %rax
addq 0x18(%rcx), %rax
movl (%rax,%r14,4), %esi
movq %r15, %rdi
callq 0x3ab5
movl %eax, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2050
movq 0x8(%rbx), %rsi
movl $0x1, %ecx
movq %rbx, %rdi
xorl %edx, %edx
movl $0xa, %r8d
callq 0x22b0
incq %r14
cmpq %r14, -0x40(%rbp)
jne 0x4362
movq -0x30(%rbp), %r14
movl 0x8(%r14), %eax
incq %r12
movl %eax, %ecx
cmpq %rcx, %r12
jb 0x4344
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x445e
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x38(%rbp), %rdi
je 0x446f
callq 0x2160
movq %r14, %rdi
callq 0x2290
nop