// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1d46c
jmp 0x1d48b
leaq 0xdbf7(%rip), %rdi      # 0x2b06a
leaq 0xf642(%rip), %rsi      # 0x2cabc
movl $0x47, %edx
leaq 0xf63f(%rip), %rcx      # 0x2cac5
callq 0x2100
cmpq $0x0, -0x18(%rbp)
je 0x1d494
jmp 0x1d4b3
leaq 0xf463(%rip), %rdi      # 0x2c8fe
leaq 0xf61a(%rip), %rsi      # 0x2cabc
movl $0x48, %edx
leaq 0xf617(%rip), %rcx      # 0x2cac5
callq 0x2100
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x68, %edx
callq 0x2120
movl $0x600, %edi            # imm = 0x600
callq 0x2080
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x1d507
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x600, %rcx            # imm = 0x600
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x1d51c
jmp 0x1d517
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
xorl %eax, %eax
testb $0x1, %al
jne 0x1d51c
jmp 0x1d657
movq -0x10(%rbp), %rax
cmpl $0x0, 0xf8(%rax)
jne 0x1d569
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x2030
cmpl $0x0, %eax
jne 0x1d540
jmp 0x1d657
cmpl $0x1, -0x80(%rbp)
jne 0x1d548
jmp 0x1d567
leaq 0xf5af(%rip), %rdi      # 0x2cafe
leaq 0xf566(%rip), %rsi      # 0x2cabc
movl $0x50, %edx
leaq 0xf563(%rip), %rcx      # 0x2cac5
callq 0x2100
jmp 0x1d569
movq -0x10(%rbp), %rax
cmpl $0x0, 0xfc(%rax)
je 0x1d582
movl $0x1, -0x4(%rbp)
jmp 0x1d67f
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x2030
cmpl $0x0, %eax
jne 0x1d599
jmp 0x1d657
cmpl $0x2, -0x80(%rbp)
jne 0x1d5ab
movl $0x1, -0x4(%rbp)
jmp 0x1d67f
movl $0x280, %edi            # imm = 0x280
callq 0x2080
movq -0x10(%rbp), %rcx
movq %rax, 0x1c0(%rcx)
cmpq $0x0, %rax
je 0x1d601
movq -0x10(%rbp), %rax
movq 0x1c0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1d0(%rax)
movq -0x10(%rbp), %rax
movq 0x1c0(%rax), %rcx
addq $0x280, %rcx            # imm = 0x280
movq -0x10(%rbp), %rax
movq %rcx, 0x1c8(%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x1d613
jmp 0x1d611
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
xorl %eax, %eax
testb $0x1, %al
jne 0x1d613
jmp 0x1d657
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1d8(%rax)
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1d690
cmpl $0x0, %eax
jne 0x1d636
jmp 0x1d657
movq -0x10(%rbp), %rdi
callq 0x1d810
movq -0x10(%rbp), %rax
movq $0x0, 0x1d8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x1d67f
movq -0x10(%rbp), %rdi
callq 0x1d810
movq -0x18(%rbp), %rdi
callq 0x2110
movq -0x10(%rbp), %rax
movq $0x0, 0x1d8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)