// File: /workspace/github_c_makefile_star2_O0/mijallen[P]SimpleHTTPServer/lib/libyaml/src/emitter.c
// Function: yaml_emitter_need_more_events
static int
yaml_emitter_need_more_events(yaml_emitter_t *emitter)
{
    int level = 0;
    int accumulate = 0;
    yaml_event_t *event;

    if (QUEUE_EMPTY(emitter, emitter->events))
        return 1;

    switch (emitter->events.head->type) {
        case YAML_DOCUMENT_START_EVENT:
            accumulate = 1;
            break;
        case YAML_SEQUENCE_START_EVENT:
            accumulate = 2;
            break;
        case YAML_MAPPING_START_EVENT:
            accumulate = 3;
            break;
        default:
            return 0;
    }

    if (emitter->events.tail - emitter->events.head > accumulate)
        return 0;

    for (event = emitter->events.head; event != emitter->events.tail; event ++) {
        switch (event->type) {
            case YAML_STREAM_START_EVENT:
            case YAML_DOCUMENT_START_EVENT:
            case YAML_SEQUENCE_START_EVENT:
            case YAML_MAPPING_START_EVENT:
                level += 1;
                break;
            case YAML_STREAM_END_EVENT:
            case YAML_DOCUMENT_END_EVENT:
            case YAML_SEQUENCE_END_EVENT:
            case YAML_MAPPING_END_EVENT:
                level -= 1;
                break;
            default:
                break;
        }
        if (!level)
            return 0;
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc8(%rcx), %rax
jne 0x1f06a
movl $0x1, -0x4(%rbp)
jmp 0x1f1af
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
subl $0x3, %eax
je 0x1f095
jmp 0x1f081
movl -0x24(%rbp), %eax
subl $0x7, %eax
je 0x1f09e
jmp 0x1f08b
movl -0x24(%rbp), %eax
subl $0x9, %eax
je 0x1f0a7
jmp 0x1f0b0
movl $0x1, -0x18(%rbp)
jmp 0x1f0bc
movl $0x2, -0x18(%rbp)
jmp 0x1f0bc
movl $0x3, -0x18(%rbp)
jmp 0x1f0bc
movl $0x0, -0x4(%rbp)
jmp 0x1f1af
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xc0(%rcx), %rcx
subq %rcx, %rax
movl $0x68, %ecx
cqto
idivq %rcx
movslq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jle 0x1f0f4
movl $0x0, -0x4(%rbp)
jmp 0x1f1af
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc8(%rcx), %rax
je 0x1f1a8
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
subl $0x1, %eax
je 0x1f16e
jmp 0x1f128
movl -0x28(%rbp), %eax
subl $0x2, %eax
je 0x1f179
jmp 0x1f132
movl -0x28(%rbp), %eax
subl $0x3, %eax
je 0x1f16e
jmp 0x1f13c
movl -0x28(%rbp), %eax
subl $0x4, %eax
je 0x1f179
jmp 0x1f146
movl -0x28(%rbp), %eax
subl $0x7, %eax
je 0x1f16e
jmp 0x1f150
movl -0x28(%rbp), %eax
subl $0x8, %eax
je 0x1f179
jmp 0x1f15a
movl -0x28(%rbp), %eax
subl $0x9, %eax
je 0x1f16e
jmp 0x1f164
movl -0x28(%rbp), %eax
subl $0xa, %eax
je 0x1f179
jmp 0x1f184
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1f186
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1f186
jmp 0x1f186
cmpl $0x0, -0x14(%rbp)
jne 0x1f195
movl $0x0, -0x4(%rbp)
jmp 0x1f1af
jmp 0x1f197
movq -0x20(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x20(%rbp)
jmp 0x1f103
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)