// File: /workspace/github_c_makefile_star2_O3/mijallen[P]SimpleHTTPServer/lib/libyaml/src/loader.c
// Function: yaml_parser_load
YAML_DECLARE(int)
yaml_parser_load(yaml_parser_t *parser, yaml_document_t *document)
{
    yaml_event_t event;

    assert(parser);     /* Non-NULL parser object is expected. */
    assert(document);   /* Non-NULL document object is expected. */

    memset(document, 0, sizeof(yaml_document_t));
    if (!STACK_INIT(parser, document->nodes, INITIAL_STACK_SIZE))
        goto error;

    if (!parser->stream_start_produced) {
        if (!yaml_parser_parse(parser, &event)) goto error;
        assert(event.type == YAML_STREAM_START_EVENT);
                        /* STREAM-START is expected. */
    }

    if (parser->stream_end_produced) {
        return 1;
    }

    if (!yaml_parser_parse(parser, &event)) goto error;
    if (event.type == YAML_STREAM_END_EVENT) {
        return 1;
    }

    if (!STACK_INIT(parser, parser->aliases, INITIAL_STACK_SIZE))
        goto error;

    parser->document = document;

    if (!yaml_parser_load_document(parser, &event)) goto error;

    yaml_parser_delete_aliases(parser);
    parser->document = NULL;

    return 1;

error:

    yaml_parser_delete_aliases(parser);
    yaml_document_delete(document);
    parser->document = NULL;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
testq %rdi, %rdi
je 0x101e6
movq %rsi, %r14
testq %rsi, %rsi
je 0x10205
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq $0x0, 0x60(%r14)
movl $0x600, %edi            # imm = 0x600
callq 0x2080
movq %rax, (%r14)
testq %rax, %rax
je 0x101b2
movq %rax, 0x10(%r14)
addq $0x600, %rax            # imm = 0x600
movq %rax, 0x8(%r14)
cmpl $0x0, 0xf8(%rbx)
jne 0x10099
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2030
testl %eax, %eax
je 0x101b8
cmpl $0x1, (%rsp)
jne 0x10224
movl $0x1, %ebp
cmpl $0x0, 0xfc(%rbx)
jne 0x101d8
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2030
testl %eax, %eax
je 0x101b8
cmpl $0x2, (%rsp)
je 0x101d8
movl $0x280, %edi            # imm = 0x280
callq 0x2080
movq %rax, 0x1c0(%rbx)
testq %rax, %rax
je 0x101b2
movq %rax, 0x1d0(%rbx)
addq $0x280, %rax            # imm = 0x280
movq %rax, 0x1c8(%rbx)
movq %r14, 0x1d8(%rbx)
cmpl $0x3, (%rsp)
jne 0x10243
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x18(%r14)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%r14)
movl 0x20(%rsp), %eax
movl %eax, 0x30(%r14)
movups 0x38(%rsp), %xmm0
movups %xmm0, 0x38(%r14)
movq 0x48(%rsp), %rax
movq %rax, 0x48(%r14)
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x2030
testl %eax, %eax
je 0x101b8
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x102db
testl %eax, %eax
je 0x101b8
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x2030
testl %eax, %eax
je 0x101b8
cmpl $0x4, 0x68(%rsp)
jne 0x10262
leaq 0x1d8(%rbx), %r14
movl 0x70(%rsp), %eax
movq 0x1d8(%rbx), %rcx
movl %eax, 0x34(%rcx)
movups 0xb8(%rsp), %xmm0
movups %xmm0, 0x50(%rcx)
movq 0xc8(%rsp), %rax
movq %rax, 0x60(%rcx)
movq %rbx, %rdi
callq 0x10281
movl $0x1, %ebp
movq %r14, %rbx
jmp 0x101d1
movl $0x1, (%rbx)
movq %rbx, %rdi
callq 0x10281
movq %r14, %rdi
callq 0x2110
addq $0x1d8, %rbx            # imm = 0x1D8
xorl %ebp, %ebp
movq $0x0, (%rbx)
movl %ebp, %eax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x6e45(%rip), %rdi      # 0x17032
leaq 0x88b8(%rip), %rsi      # 0x18aac
leaq 0x88ba(%rip), %rcx      # 0x18ab5
movl $0x47, %edx
callq 0x2100
leaq 0x86e2(%rip), %rdi      # 0x188ee
leaq 0x8899(%rip), %rsi      # 0x18aac
leaq 0x889b(%rip), %rcx      # 0x18ab5
movl $0x48, %edx
callq 0x2100
leaq 0x88c3(%rip), %rdi      # 0x18aee
leaq 0x887a(%rip), %rsi      # 0x18aac
leaq 0x887c(%rip), %rcx      # 0x18ab5
movl $0x50, %edx
callq 0x2100
leaq 0x88ca(%rip), %rdi      # 0x18b14
leaq 0x885b(%rip), %rsi      # 0x18aac
leaq 0x88eb(%rip), %rcx      # 0x18b43
movl $0xa9, %edx
callq 0x2100
leaq 0x8919(%rip), %rdi      # 0x18b82
leaq 0x883c(%rip), %rsi      # 0x18aac
leaq 0x88cc(%rip), %rcx      # 0x18b43
movl $0xbb, %edx
callq 0x2100