// File: /workspace/github_c_makefile_star2_O0/mijallen[P]SimpleHTTPServer/lib/libyaml/tests/run-emitter.c
// Function: copy_event
int copy_event(yaml_event_t *event_to, yaml_event_t *event_from)
{
    switch (event_from->type)
    {
        case YAML_STREAM_START_EVENT:
            return yaml_stream_start_event_initialize(event_to,
                    event_from->data.stream_start.encoding);

        case YAML_STREAM_END_EVENT:
            return yaml_stream_end_event_initialize(event_to);

        case YAML_DOCUMENT_START_EVENT:
            return yaml_document_start_event_initialize(event_to,
                    event_from->data.document_start.version_directive,
                    event_from->data.document_start.tag_directives.start,
                    event_from->data.document_start.tag_directives.end,
                    event_from->data.document_start.implicit);

        case YAML_DOCUMENT_END_EVENT:
            return yaml_document_end_event_initialize(event_to,
                    event_from->data.document_end.implicit);

        case YAML_ALIAS_EVENT:
            return yaml_alias_event_initialize(event_to,
                    event_from->data.alias.anchor);

        case YAML_SCALAR_EVENT:
            return yaml_scalar_event_initialize(event_to,
                    event_from->data.scalar.anchor,
                    event_from->data.scalar.tag,
                    event_from->data.scalar.value,
                    event_from->data.scalar.length,
                    event_from->data.scalar.plain_implicit,
                    event_from->data.scalar.quoted_implicit,
                    event_from->data.scalar.style);

        case YAML_SEQUENCE_START_EVENT:
            return yaml_sequence_start_event_initialize(event_to,
                    event_from->data.sequence_start.anchor,
                    event_from->data.sequence_start.tag,
                    event_from->data.sequence_start.implicit,
                    event_from->data.sequence_start.style);

        case YAML_SEQUENCE_END_EVENT:
            return yaml_sequence_end_event_initialize(event_to);

        case YAML_MAPPING_START_EVENT:
            return yaml_mapping_start_event_initialize(event_to,
                    event_from->data.mapping_start.anchor,
                    event_from->data.mapping_start.tag,
                    event_from->data.mapping_start.implicit,
                    event_from->data.mapping_start.style);

        case YAML_MAPPING_END_EVENT:
            return yaml_mapping_end_event_initialize(event_to);

        default:
            assert(1);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x9, %eax
ja 0x14fc
movq -0x20(%rbp), %rax
leaq 0x1c62(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x11f0
movl %eax, -0x4(%rbp)
jmp 0x1505
movq -0x10(%rbp), %rdi
callq 0x1060
movl %eax, -0x4(%rbp)
jmp 0x1505
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movl 0x20(%rax), %r8d
callq 0x1260
movl %eax, -0x4(%rbp)
jmp 0x1505
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x1170
movl %eax, -0x4(%rbp)
jmp 0x1505
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1180
movl %eax, -0x4(%rbp)
jmp 0x1505
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, %r8d
movq -0x18(%rbp), %rax
movl 0x28(%rax), %r9d
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %r10d
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x1070
movl %eax, -0x4(%rbp)
jmp 0x1505
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %r8d
callq 0x1030
movl %eax, -0x4(%rbp)
jmp 0x1505
movq -0x10(%rbp), %rdi
callq 0x1130
movl %eax, -0x4(%rbp)
jmp 0x1505
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %r8d
callq 0x11d0
movl %eax, -0x4(%rbp)
jmp 0x1505
movq -0x10(%rbp), %rdi
callq 0x10e0
movl %eax, -0x4(%rbp)
jmp 0x1505
jmp 0x14fe
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop