// File: /workspace/github_c_makefile_star2_O2/mijallen[P]SimpleHTTPServer/lib/libyaml/tests/run-emitter.c
// Function: compare_events
int compare_events(yaml_event_t *event1, yaml_event_t *event2)
{
    int k;

    if (event1->type != event2->type)
        return 0;

    switch (event1->type)
    {
        case YAML_STREAM_START_EVENT:
            return 1;
            /* return (event1->data.stream_start.encoding ==
                    event2->data.stream_start.encoding); */

        case YAML_DOCUMENT_START_EVENT:
            if ((event1->data.document_start.version_directive && !event2->data.document_start.version_directive)
                    || (!event1->data.document_start.version_directive && event2->data.document_start.version_directive)
                    || (event1->data.document_start.version_directive && event2->data.document_start.version_directive
                        && (event1->data.document_start.version_directive->major != event2->data.document_start.version_directive->major
                            || event1->data.document_start.version_directive->minor != event2->data.document_start.version_directive->minor)))
                return 0;
            if ((event1->data.document_start.tag_directives.end - event1->data.document_start.tag_directives.start) !=
                    (event2->data.document_start.tag_directives.end - event2->data.document_start.tag_directives.start))
                return 0;
            for (k = 0; k < (event1->data.document_start.tag_directives.end - event1->data.document_start.tag_directives.start); k ++) {
                if ((strcmp((char *)event1->data.document_start.tag_directives.start[k].handle,
                                (char *)event2->data.document_start.tag_directives.start[k].handle) != 0)
                        || (strcmp((char *)event1->data.document_start.tag_directives.start[k].prefix,
                            (char *)event2->data.document_start.tag_directives.start[k].prefix) != 0))
                    return 0;
            }
            /* if (event1->data.document_start.implicit != event2->data.document_start.implicit)
                return 0; */
            return 1;

        case YAML_DOCUMENT_END_EVENT:
            return 1;
            /* return (event1->data.document_end.implicit ==
                    event2->data.document_end.implicit); */

        case YAML_ALIAS_EVENT:
            return (strcmp((char *)event1->data.alias.anchor,
                        (char *)event2->data.alias.anchor) == 0);

        case YAML_SCALAR_EVENT:
            if ((event1->data.scalar.anchor && !event2->data.scalar.anchor)
                    || (!event1->data.scalar.anchor && event2->data.scalar.anchor)
                    || (event1->data.scalar.anchor && event2->data.scalar.anchor
                        && strcmp((char *)event1->data.scalar.anchor,
                            (char *)event2->data.scalar.anchor) != 0))
                return 0;
            if ((event1->data.scalar.tag && !event2->data.scalar.tag
                        && strcmp((char *)event1->data.scalar.tag, "!") != 0)
                    || (!event1->data.scalar.tag && event2->data.scalar.tag
                        && strcmp((char *)event2->data.scalar.tag, "!") != 0)
                    || (event1->data.scalar.tag && event2->data.scalar.tag
                        && strcmp((char *)event1->data.scalar.tag,
                            (char *)event2->data.scalar.tag) != 0))
                return 0;
            if ((event1->data.scalar.length != event2->data.scalar.length)
                    || memcmp(event1->data.scalar.value, event2->data.scalar.value,
                        event1->data.scalar.length) != 0)
                return 0;
            if ((event1->data.scalar.plain_implicit != event2->data.scalar.plain_implicit)
                    || (event2->data.scalar.quoted_implicit != event2->data.scalar.quoted_implicit)
                    /* || (event2->data.scalar.style != event2->data.scalar.style) */)
                return 0;
            return 1;

        case YAML_SEQUENCE_START_EVENT:
            if ((event1->data.sequence_start.anchor && !event2->data.sequence_start.anchor)
                    || (!event1->data.sequence_start.anchor && event2->data.sequence_start.anchor)
                    || (event1->data.sequence_start.anchor && event2->data.sequence_start.anchor
                        && strcmp((char *)event1->data.sequence_start.anchor,
                            (char *)event2->data.sequence_start.anchor) != 0))
                return 0;
            if ((event1->data.sequence_start.tag && !event2->data.sequence_start.tag)
                    || (!event1->data.sequence_start.tag && event2->data.sequence_start.tag)
                    || (event1->data.sequence_start.tag && event2->data.sequence_start.tag
                        && strcmp((char *)event1->data.sequence_start.tag,
                            (char *)event2->data.sequence_start.tag) != 0))
                return 0;
            if ((event1->data.sequence_start.implicit != event2->data.sequence_start.implicit)
                    /* || (event2->data.sequence_start.style != event2->data.sequence_start.style) */)
                return 0;
            return 1;

        case YAML_MAPPING_START_EVENT:
            if ((event1->data.mapping_start.anchor && !event2->data.mapping_start.anchor)
                    || (!event1->data.mapping_start.anchor && event2->data.mapping_start.anchor)
                    || (event1->data.mapping_start.anchor && event2->data.mapping_start.anchor
                        && strcmp((char *)event1->data.mapping_start.anchor,
                            (char *)event2->data.mapping_start.anchor) != 0))
                return 0;
            if ((event1->data.mapping_start.tag && !event2->data.mapping_start.tag)
                    || (!event1->data.mapping_start.tag && event2->data.mapping_start.tag)
                    || (event1->data.mapping_start.tag && event2->data.mapping_start.tag
                        && strcmp((char *)event1->data.mapping_start.tag,
                            (char *)event2->data.mapping_start.tag) != 0))
                return 0;
            if ((event1->data.mapping_start.implicit != event2->data.mapping_start.implicit)
                    /* || (event2->data.mapping_start.style != event2->data.mapping_start.style) */)
                return 0;
            return 1;

        default:
            return 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x162f
movb $0x1, %bpl
addl $-0x3, %eax
cmpl $0x6, %eax
ja 0x1631
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xbd4(%rip), %rcx       # 0x202c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
testq %rdi, %rdi
je 0x1506
testq %rsi, %rsi
je 0x162f
callq 0x1140
testl %eax, %eax
jne 0x162f
jmp 0x150f
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
testq %rdi, %rdi
je 0x153b
testq %rsi, %rsi
je 0x162f
callq 0x1140
testl %eax, %eax
jne 0x162f
jmp 0x1544
movq 0x8(%r14), %rcx
movq 0x8(%rbx), %rax
testq %rcx, %rcx
je 0x1570
testq %rax, %rax
je 0x162f
movl (%rcx), %edx
cmpl (%rax), %edx
jne 0x162f
movl 0x4(%rcx), %ecx
cmpl 0x4(%rax), %ecx
je 0x1579
jmp 0x162f
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0x1140
testl %eax, %eax
sete %bpl
jmp 0x1631
testq %rsi, %rsi
jne 0x162f
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
testq %rdi, %rdi
je 0x15e6
testq %rsi, %rsi
je 0x162f
callq 0x1140
testl %eax, %eax
jne 0x162f
jmp 0x15eb
testq %rsi, %rsi
jne 0x162f
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
testq %rdi, %rdi
je 0x15f7
testq %rsi, %rsi
je 0x1609
callq 0x1140
testl %eax, %eax
jne 0x162f
jmp 0x1614
testq %rax, %rax
jne 0x162f
movq 0x10(%r14), %r15
movq 0x18(%r14), %rax
subq %r15, %rax
movq 0x10(%rbx), %r14
movq 0x18(%rbx), %rcx
subq %r14, %rcx
cmpq %rcx, %rax
jne 0x162f
sarq $0x4, %rax
xorl %ebx, %ebx
testq %rax, %rax
cmovgq %rax, %rbx
shlq $0x4, %rbx
pushq $-0x10
popq %r12
leaq 0x10(%r12), %r13
cmpq %r13, %rbx
sete %bpl
je 0x1631
movq 0x10(%r15,%r12), %rdi
movq 0x10(%r14,%r12), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1631
movq 0x18(%r15,%r12), %rdi
movq 0x18(%r14,%r12), %rsi
callq 0x1140
movq %r13, %r12
testl %eax, %eax
je 0x15ad
jmp 0x1631
testq %rsi, %rsi
jne 0x162f
movl 0x18(%r14), %eax
cmpl 0x18(%rbx), %eax
jmp 0x14fd
testq %rsi, %rsi
je 0x1614
cmpb $0x21, (%rsi)
jne 0x162f
cmpb $0x0, 0x1(%rsi)
jne 0x162f
jmp 0x1614
cmpb $0x21, (%rdi)
jne 0x162f
cmpb $0x0, 0x1(%rdi)
jne 0x162f
movq 0x20(%r14), %rdx
cmpq 0x20(%rbx), %rdx
jne 0x162f
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x11d0
testl %eax, %eax
je 0x1644
xorl %ebp, %ebp
movzbl %bpl, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x28(%r14), %eax
cmpl 0x28(%rbx), %eax
jmp 0x14fd