// File: /workspace/github_c_makefile_star2_O1/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 0x10dbe
movq %rsi, %r14
testq %rsi, %rsi
je 0x10ddd
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 0x10d8a
movq %rax, 0x10(%r14)
addq $0x600, %rax            # imm = 0x600
movq %rax, 0x8(%r14)
cmpl $0x0, 0xf8(%rbx)
jne 0x10c69
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2030
testl %eax, %eax
je 0x10d90
cmpl $0x1, (%rsp)
jne 0x10dfc
movl $0x1, %ebp
cmpl $0x0, 0xfc(%rbx)
jne 0x10db0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2030
testl %eax, %eax
je 0x10d90
cmpl $0x2, (%rsp)
je 0x10db0
movl $0x280, %edi            # imm = 0x280
callq 0x2080
movq %rax, 0x1c0(%rbx)
testq %rax, %rax
je 0x10d8a
movq %rax, 0x1d0(%rbx)
addq $0x280, %rax            # imm = 0x280
movq %rax, 0x1c8(%rbx)
movq %r14, 0x1d8(%rbx)
cmpl $0x3, (%rsp)
jne 0x10e1b
movq 0x8(%rsp), %rax
movq %rax, 0x18(%r14)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%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 0x10d90
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x10ea9
testl %eax, %eax
je 0x10d90
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x2030
testl %eax, %eax
je 0x10d90
cmpl $0x4, 0x68(%rsp)
jne 0x10e3a
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 0x10e59
movl $0x1, %ebp
movq %r14, %rbx
jmp 0x10da9
movl $0x1, (%rbx)
movq %rbx, %rdi
callq 0x10e59
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 0x726d(%rip), %rdi      # 0x18032
leaq 0x8c64(%rip), %rsi      # 0x19a30
leaq 0x8c66(%rip), %rcx      # 0x19a39
movl $0x47, %edx
callq 0x2100
leaq 0x8a8e(%rip), %rdi      # 0x19872
leaq 0x8c45(%rip), %rsi      # 0x19a30
leaq 0x8c47(%rip), %rcx      # 0x19a39
movl $0x48, %edx
callq 0x2100
leaq 0x8c6f(%rip), %rdi      # 0x19a72
leaq 0x8c26(%rip), %rsi      # 0x19a30
leaq 0x8c28(%rip), %rcx      # 0x19a39
movl $0x50, %edx
callq 0x2100
leaq 0x8c76(%rip), %rdi      # 0x19a98
leaq 0x8c07(%rip), %rsi      # 0x19a30
leaq 0x8c97(%rip), %rcx      # 0x19ac7
movl $0xa9, %edx
callq 0x2100
leaq 0x8cc5(%rip), %rdi      # 0x19b06
leaq 0x8be8(%rip), %rsi      # 0x19a30
leaq 0x8c78(%rip), %rcx      # 0x19ac7
movl $0xbb, %edx
callq 0x2100