// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Correct.cpp
// Function: debug_whole_graph(Graph*)
void debug_whole_graph(Graph* g)
{
    long long i, j, k;
    for (i = 0; i < (long long)g->g_nodes.length; i++)
    {
        if(g->g_nodes.list[i].deletion_edges.length!= 0 &&
        g->g_nodes.list[i].deletion_edges.length!= 1)
        {
            fprintf(stderr, "g->g_nodes.list[i].deletion_edges.length: %lu\n",
            (unsigned long)g->g_nodes.list[i].deletion_edges.length);
        }
    }

    for (i = g->s_start_nodeID; i < (long long)g->s_end_nodeID; i++)
    {
        if(g->g_nodes.list[i].mismatch_edges.length > 4 
        || 
        g->g_nodes.list[i].mismatch_edges.length < 1)
        {
            fprintf(stderr, "g->s_end_nodeID: %lu, g->g_nodes.list[%lld].mismatch_edges.length: %lu\n",
            (unsigned long)g->s_end_nodeID, i, (unsigned long)g->g_nodes.list[i].mismatch_edges.length);
        }
    }

    char current[1000];
    char compare[1000];
    long long total_weight = 0;
    for (i = g->s_start_nodeID; i < (long long)g->s_end_nodeID; i++)
    {
        total_weight = 0;
        for (j = 0; j < (long long)G_Node(*g, i).insertion_edges.length; j++)
        {
            
            total_weight = total_weight + G_Node(*g, i).insertion_edges.list[j].weight;

            extract_path(g, i, j, current);

            for (k = j + 1; k < (long long)G_Node(*g, i).insertion_edges.length; k++)
            {
                extract_path(g, i, k, compare);
                if(strcmp(current, compare)==0)
                {
                    fprintf(stderr,"error\n");
                }
            }
        }

        if(total_weight != (long long)G_Node(*g, i).num_insertions)
        {
            fprintf(stderr,"error\n");
        }
    }

        

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7f8, %rsp            # imm = 0x7F8
movq %rdi, %rbx
pushq $0x50
popq %r15
leaq 0x1c4302(%rip), %r14    # 0x1e3a6c
xorl %r12d, %r12d
cmpq 0x60(%rbx), %r12
jge 0x1f7a0
movq 0x18(%rbx), %rax
movq (%rax,%r15), %rdx
cmpq $0x2, %rdx
jae 0x1f78a
incq %r12
subq $-0x80, %r15
jmp 0x1f76d
movq 0x23384f(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x22b0
jmp 0x1f781
movq 0xa8(%rbx), %r14
movq %r14, %r12
shlq $0x7, %r12
orq $0x30, %r12
leaq 0x1c42e2(%rip), %r15    # 0x1e3a9b
movq 0xb0(%rbx), %rdx
cmpq %rdx, %r14
jge 0x1f7f9
movq 0x18(%rbx), %rax
movq (%rax,%r12), %r8
leaq -0x5(%r8), %rax
cmpq $-0x5, %rax
jbe 0x1f7e0
incq %r14
subq $-0x80, %r12
jmp 0x1f7b9
movq 0x2337f9(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x22b0
jmp 0x1f7d7
movq 0xa8(%rbx), %r13
leaq 0x410(%rsp), %r15
leaq 0x20(%rsp), %r12
cmpq %rdx, %r13
jge 0x1f8f7
movq 0x18(%rbx), %rax
movq %r13, %r14
shlq $0x7, %r14
xorl %ebp, %ebp
xorl %edx, %edx
leaq (%rax,%r14), %rcx
cmpq 0x70(%rax,%r14), %rbp
jge 0x1f8c4
movq %rdx, 0x18(%rsp)
movq 0x60(%rcx), %rax
imulq $0x38, %rbp, %rcx
movq 0x10(%rax,%rcx), %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r15, %rcx
callq 0x52d7d
incq %rbp
movq %rbp, 0x10(%rsp)
movq 0x18(%rbx), %rax
cmpq 0x70(%rax,%r14), %rbp
jge 0x1f8b0
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r12, %rcx
callq 0x52d7d
movq %r15, %rdi
movq %r12, %rsi
callq 0x2290
testl %eax, %eax
je 0x1f892
incq %rbp
jmp 0x1f863
movq 0x233747(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x1c40ca(%rip), %rdi    # 0x1e396d
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x1f88d
movq 0x18(%rsp), %rdx
addq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rbp
jmp 0x1f825
cmpq 0x10(%rcx), %rdx
jne 0x1f8d9
incq %r13
movq 0xb0(%rbx), %rdx
jmp 0x1f80d
movq 0x233700(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x1c4083(%rip), %rdi    # 0x1e396d
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x1f8ca
addq $0x7f8, %rsp            # imm = 0x7F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq