// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x1678
movb $0x1, %bpl
addl $-0x3, %eax
cmpl $0x6, %eax
ja 0x167a
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xbd5(%rip), %rcx       # 0x202c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x1479
cmpq $0x0, 0x8(%rbx)
je 0x1678
testq %rdi, %rdi
jne 0x1489
cmpq $0x0, 0x8(%rbx)
jne 0x1678
testq %rdi, %rdi
je 0x149f
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x149f
callq 0x1140
testl %eax, %eax
jne 0x1678
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x14b8
cmpq $0x0, 0x10(%rbx)
je 0x1678
testq %rdi, %rdi
jne 0x14c8
cmpq $0x0, 0x10(%rbx)
jne 0x1678
testq %rdi, %rdi
je 0x14de
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x14de
callq 0x1140
testl %eax, %eax
jne 0x1678
movl 0x18(%r14), %eax
cmpl 0x18(%rbx), %eax
jmp 0x165b
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x1503
cmpq $0x0, 0x8(%rbx)
je 0x1678
testq %rdi, %rdi
jne 0x1513
cmpq $0x0, 0x8(%rbx)
jne 0x1678
testq %rdi, %rdi
je 0x1529
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x1529
callq 0x1140
testl %eax, %eax
jne 0x1678
movq 0x10(%r14), %r15
testq %r15, %r15
je 0x1542
cmpq $0x0, 0x10(%rbx)
je 0x1661
testq %r15, %r15
jne 0x1564
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x155f
leaq 0xaf6(%rip), %rsi       # 0x2048
callq 0x1140
testl %eax, %eax
jne 0x1678
testq %r15, %r15
je 0x157d
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x157d
movq %r15, %rdi
callq 0x1140
testl %eax, %eax
jne 0x1678
movq 0x20(%r14), %rdx
cmpq 0x20(%rbx), %rdx
jne 0x1678
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x11d0
testl %eax, %eax
jne 0x1678
movl 0x28(%r14), %eax
cmpl 0x28(%rbx), %eax
jmp 0x165b
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x15c5
cmpq $0x0, 0x8(%rbx)
je 0x1678
testq %rax, %rax
jne 0x15d5
cmpq $0x0, 0x8(%rbx)
jne 0x1678
testq %rax, %rax
je 0x15f4
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x15f4
movl (%rax), %edx
cmpl (%rcx), %edx
jne 0x1678
movl 0x4(%rax), %eax
cmpl 0x4(%rcx), %eax
jne 0x1678
movq 0x10(%r14), %r15
movq 0x18(%r14), %r14
subq %r15, %r14
movq 0x10(%rbx), %r12
movq 0x18(%rbx), %rax
subq %r12, %rax
cmpq %rax, %r14
jne 0x1678
sarq $0x4, %r14
testq %r14, %r14
jle 0x167a
movl $0x8, %ebx
movq -0x8(%r15,%rbx), %rdi
movq -0x8(%r12,%rbx), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1678
movq (%r15,%rbx), %rdi
movq (%r12,%rbx), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1678
addq $0x10, %rbx
decq %r14
jne 0x161d
jmp 0x167a
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0x1140
testl %eax, %eax
sete %bpl
jmp 0x167a
leaq 0x9e0(%rip), %rsi       # 0x2048
movq %r15, %rdi
callq 0x1140
testl %eax, %eax
je 0x153d
xorl %ebp, %ebp
movzbl %bpl, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq