// File: cauimsouza[P]rikudo-solver/src/rikudo_solver/graph.cpp
// Function: Graph::diam_s[abi:cxx11](int, int, int)
std::string Graph::diam_s(int u, int v, int n_vertices){
    std::string s;
    for(int i = 0; i < n_vertices; i++){

        int u_id = -encode(i, u);
        s += std::to_string(u_id);
        if(i > 0){
            int v1_id = encode(i-1, v);
            s += " " + std::to_string(v1_id);
        }
        if(i < n_vertices-1){
            int v2_id = encode(i+1, v);
            s += " " + std::to_string(v2_id);                
        }
        s += " 0\n";
    }
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0xf8(%rbp)
movq %rdi, %rax
movq %rax, -0xf0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe8(%rbp)
movb $0x0, -0x1d(%rbp)
callq 0x3310
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xae61
movq -0xe8(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x14(%rbp), %edx
xorl %ecx, %ecx
callq 0x65f0
negl %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %esi
leaq -0x48(%rbp), %rdi
callq 0xbc40
jmp 0xac8c
movq -0xf8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x32e0
jmp 0xac9e
leaq -0x48(%rbp), %rdi
callq 0x3170
cmpl $0x0, -0x24(%rbp)
jle 0xad7c
movq -0xe8(%rbp), %rdi
movl -0x24(%rbp), %esi
decl %esi
movl -0x18(%rbp), %edx
xorl %ecx, %ecx
callq 0x65f0
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %esi
leaq -0x98(%rbp), %rdi
callq 0xbc40
jmp 0xacdb
leaq 0x84bb(%rip), %rsi      # 0x1319d
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0xc0f0
jmp 0xacf4
movq -0xf8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x32e0
jmp 0xad06
leaq -0x78(%rbp), %rdi
callq 0x3170
leaq -0x98(%rbp), %rdi
callq 0x3170
jmp 0xad7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xae87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3170
jmp 0xae87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xad6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3170
leaq -0x98(%rbp), %rdi
callq 0x3170
jmp 0xae87
movl -0x24(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xae3c
movq -0xe8(%rbp), %rdi
movl -0x24(%rbp), %esi
incl %esi
movl -0x18(%rbp), %edx
xorl %ecx, %ecx
callq 0x65f0
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %esi
leaq -0xe0(%rbp), %rdi
callq 0xbc40
jmp 0xadbd
leaq 0x83d9(%rip), %rsi      # 0x1319d
leaq -0xc0(%rbp), %rdi
leaq -0xe0(%rbp), %rdx
callq 0xc0f0
jmp 0xadd9
movq -0xf8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x32e0
jmp 0xadee
leaq -0xc0(%rbp), %rdi
callq 0x3170
leaq -0xe0(%rbp), %rdi
callq 0x3170
jmp 0xae3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xae2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x3170
leaq -0xe0(%rbp), %rdi
callq 0x3170
jmp 0xae87
movq -0xf8(%rbp), %rdi
leaq 0x82ef(%rip), %rsi      # 0x13139
callq 0x3220
jmp 0xae51
jmp 0xae53
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xac59
movb $0x1, -0x1d(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0xae77
movq -0xf8(%rbp), %rdi
callq 0x3170
movq -0xf0(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0x3170
movq -0x50(%rbp), %rdi
callq 0x3400
nopl (%rax)