// File: /workspace/github_c_makefile_star2_O3/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 0x161d
movb $0x1, %bpl
addl $-0x3, %eax
cmpl $0x6, %eax
ja 0x161f
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
movq 0x8(%rbx), %rsi
testq %rdi, %rdi
je 0x1505
testq %rsi, %rsi
je 0x161d
callq 0x1140
testl %eax, %eax
jne 0x161d
jmp 0x150e
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
testq %rdi, %rdi
je 0x153a
testq %rsi, %rsi
je 0x161d
callq 0x1140
testl %eax, %eax
jne 0x161d
jmp 0x1543
movq 0x8(%r14), %rcx
movq 0x8(%rbx), %rax
testq %rcx, %rcx
je 0x156f
testq %rax, %rax
je 0x161d
movl (%rcx), %edx
cmpl (%rax), %edx
jne 0x161d
movl 0x4(%rcx), %ecx
cmpl 0x4(%rax), %ecx
je 0x1578
jmp 0x161d
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0x1140
testl %eax, %eax
sete %bpl
jmp 0x161f
testq %rsi, %rsi
jne 0x161d
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
testq %rdi, %rdi
je 0x15d4
testq %rsi, %rsi
je 0x161d
callq 0x1140
testl %eax, %eax
jne 0x161d
jmp 0x15d9
testq %rsi, %rsi
jne 0x161d
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
testq %rdi, %rdi
je 0x15e5
testq %rsi, %rsi
je 0x15f7
callq 0x1140
testl %eax, %eax
jne 0x161d
jmp 0x1602
testq %rax, %rax
jne 0x161d
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 0x161d
sarq $0x4, %r14
testq %r14, %r14
jle 0x161f
movl $0x8, %ebx
movq -0x8(%r15,%rbx), %rdi
movq -0x8(%r12,%rbx), %rsi
callq 0x1140
testl %eax, %eax
jne 0x161d
movq (%r15,%rbx), %rdi
movq (%r12,%rbx), %rsi
callq 0x1140
testl %eax, %eax
jne 0x161d
addq $0x10, %rbx
decq %r14
jne 0x15a5
jmp 0x161f
testq %rsi, %rsi
jne 0x161d
movl 0x18(%r14), %eax
cmpl 0x18(%rbx), %eax
jmp 0x14fc
testq %rsi, %rsi
je 0x1602
cmpb $0x21, (%rsi)
jne 0x161d
cmpb $0x0, 0x1(%rsi)
jne 0x161d
jmp 0x1602
cmpb $0x21, (%rdi)
jne 0x161d
cmpb $0x0, 0x1(%rdi)
jne 0x161d
movq 0x20(%r14), %rdx
cmpq 0x20(%rbx), %rdx
jne 0x161d
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x11d0
testl %eax, %eax
je 0x162c
xorl %ebp, %ebp
movzbl %bpl, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x28(%r14), %eax
cmpl 0x28(%rbx), %eax
jmp 0x14fc