// File: /workspace/github_c_makefile_star2_O0/mijallen[P]SimpleHTTPServer/lib/libyaml/tests/run-dumper.c
// Function: compare_nodes
int compare_nodes(yaml_document_t *document1, int index1,
        yaml_document_t *document2, int index2)
{
    yaml_node_t *node1 = yaml_document_get_node(document1, index1);
    yaml_node_t *node2 = yaml_document_get_node(document2, index2);
    int k;

    assert(node1);
    assert(node2);

    if (node1->type != node2->type)
        return 0;

    if (strcmp((char *)node1->tag, (char *)node2->tag) != 0) return 0;

    switch (node1->type) {
        case YAML_SCALAR_NODE:
            if (node1->data.scalar.length != node2->data.scalar.length)
                return 0;
            if (strncmp((char *)node1->data.scalar.value, (char *)node2->data.scalar.value,
                        node1->data.scalar.length) != 0) return 0;
            break;
        case YAML_SEQUENCE_NODE:
            if ((node1->data.sequence.items.top - node1->data.sequence.items.start) !=
                    (node2->data.sequence.items.top - node2->data.sequence.items.start))
                return 0;
            for (k = 0; k < (node1->data.sequence.items.top - node1->data.sequence.items.start); k ++) {
                if (!compare_nodes(document1, node1->data.sequence.items.start[k],
                            document2, node2->data.sequence.items.start[k])) return 0;
            }
            break;
        case YAML_MAPPING_NODE:
            if ((node1->data.mapping.pairs.top - node1->data.mapping.pairs.start) !=
                    (node2->data.mapping.pairs.top - node2->data.mapping.pairs.start))
                return 0;
            for (k = 0; k < (node1->data.mapping.pairs.top - node1->data.mapping.pairs.start); k ++) {
                if (!compare_nodes(document1, node1->data.mapping.pairs.start[k].key,
                            document2, node2->data.mapping.pairs.start[k].key)) return 0;
                if (!compare_nodes(document1, node1->data.mapping.pairs.start[k].value,
                            document2, node2->data.mapping.pairs.start[k].value)) return 0;
            }
            break;
        default:
            assert(0);
            break;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x11f0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x11f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x162f
jmp 0x164e
leaq 0x1a15(%rip), %rdi      # 0x304b
leaq 0x19c9(%rip), %rsi      # 0x3006
movl $0x56, %edx
leaq 0x1a08(%rip), %rcx      # 0x3051
callq 0x1120
cmpq $0x0, -0x38(%rbp)
je 0x1657
jmp 0x1676
leaq 0x1a35(%rip), %rdi      # 0x3093
leaq 0x19a1(%rip), %rsi      # 0x3006
movl $0x57, %edx
leaq 0x19e0(%rip), %rcx      # 0x3051
callq 0x1120
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x38(%rbp), %rcx
cmpl (%rcx), %eax
je 0x1690
movl $0x0, -0x4(%rbp)
jmp 0x18fc
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1170
cmpl $0x0, %eax
je 0x16b6
movl $0x0, -0x4(%rbp)
jmp 0x18fc
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
subl $0x1, %eax
je 0x16e1
jmp 0x16c6
movl -0x40(%rbp), %eax
subl $0x2, %eax
je 0x1732
jmp 0x16d0
movl -0x40(%rbp), %eax
subl $0x3, %eax
je 0x17e6
jmp 0x18d6
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x16ff
movl $0x0, -0x4(%rbp)
jmp 0x18fc
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x1040
cmpl $0x0, %eax
je 0x172d
movl $0x0, -0x4(%rbp)
jmp 0x18fc
jmp 0x18f5
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
sarq $0x2, %rax
movq -0x38(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x38(%rbp), %rdx
movq 0x10(%rdx), %rdx
subq %rdx, %rcx
sarq $0x2, %rcx
cmpq %rcx, %rax
je 0x1771
movl $0x0, -0x4(%rbp)
jmp 0x18fc
movl $0x0, -0x3c(%rbp)
movslq -0x3c(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x30(%rbp), %rdx
movq 0x10(%rdx), %rdx
subq %rdx, %rcx
sarq $0x2, %rcx
cmpq %rcx, %rax
jge 0x17e1
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
callq 0x15f0
cmpl $0x0, %eax
jne 0x17d4
movl $0x0, -0x4(%rbp)
jmp 0x18fc
jmp 0x17d6
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1778
jmp 0x18f5
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq -0x38(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x38(%rbp), %rdx
movq 0x10(%rdx), %rdx
subq %rdx, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
je 0x1825
movl $0x0, -0x4(%rbp)
jmp 0x18fc
movl $0x0, -0x3c(%rbp)
movslq -0x3c(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x30(%rbp), %rdx
movq 0x10(%rdx), %rdx
subq %rdx, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jge 0x18d4
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,8), %esi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,8), %ecx
callq 0x15f0
cmpl $0x0, %eax
jne 0x1889
movl $0x0, -0x4(%rbp)
jmp 0x18fc
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %esi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %ecx
callq 0x15f0
cmpl $0x0, %eax
jne 0x18c4
movl $0x0, -0x4(%rbp)
jmp 0x18fc
jmp 0x18c6
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x182c
jmp 0x18f5
leaq 0x1727(%rip), %rdi      # 0x3004
leaq 0x1722(%rip), %rsi      # 0x3006
movl $0x7a, %edx
leaq 0x1761(%rip), %rcx      # 0x3051
callq 0x1120
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)