// File: /workspace/github_c_makefile_star2_O0/mijallen[P]SimpleHTTPServer/lib/libyaml/src/api.c
// Function: yaml_document_add_mapping
YAML_DECLARE(int)
yaml_document_add_mapping(yaml_document_t *document,
        yaml_char_t *tag, yaml_mapping_style_t style)
{
    struct {
        yaml_error_type_t error;
    } context;
    yaml_mark_t mark = { 0, 0, 0 };
    yaml_char_t *tag_copy = NULL;
    struct {
        yaml_node_pair_t *start;
        yaml_node_pair_t *end;
        yaml_node_pair_t *top;
    } pairs = { NULL, NULL, NULL };
    yaml_node_t node;

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

    if (!tag) {
        tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG;
    }

    if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
    tag_copy = yaml_strdup(tag);
    if (!tag_copy) goto error;

    if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error;

    MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end,
            style, mark, mark);
    if (!PUSH(&context, document->nodes, node)) goto error;

    return document->nodes.top - document->nodes.start;

error:
    STACK_DEL(&context, pairs);
    yaml_free(tag_copy);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2120
movq $0x0, -0x40(%rbp)
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2120
cmpq $0x0, -0x10(%rbp)
je 0x6157
jmp 0x6176
leaq 0x267a0(%rip), %rdi     # 0x2c8fe
leaq 0x24f0c(%rip), %rsi     # 0x2b071
movl $0x518, %edx            # imm = 0x518
leaq 0x259bb(%rip), %rcx     # 0x2bb2c
callq 0x2100
cmpq $0x0, -0x18(%rbp)
jne 0x6188
leaq 0x259fe(%rip), %rax     # 0x2bb82
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20d0
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x4940
cmpl $0x0, %eax
jne 0x61b5
jmp 0x6323
movq -0x18(%rbp), %rdi
callq 0x20c0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x61ce
jmp 0x6323
movl $0x80, %edi
callq 0x2080
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x6200
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x50(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x6212
jmp 0x620d
movl $0x1, -0x20(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x6212
jmp 0x6323
leaq -0xb8(%rbp), %rdi
xorl %esi, %esi
movl $0x60, %edx
callq 0x2120
movl $0x3, -0xb8(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x62c7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
callq 0x20e0
cmpl $0x0, %eax
je 0x62f3
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq %rdi, %rcx
addq $0x60, %rcx
movq %rcx, 0x10(%rax)
leaq -0xb8(%rbp), %rsi
movl $0x60, %edx
callq 0x2180
movb $0x1, %al
testb $0x1, %al
jne 0x6302
jmp 0x6300
movl $0x1, -0x20(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x6302
jmp 0x6323
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl $0x60, %ecx
cqto
idivq %rcx
movl %eax, -0x4(%rbp)
jmp 0x6354
movq -0x58(%rbp), %rdi
callq 0x2140
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x40(%rbp), %rdi
callq 0x2140
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq