// File: /workspace/github_c_makefile_star2_O2/mijallen[P]SimpleHTTPServer/lib/libyaml/src/api.c
// Function: yaml_scalar_event_initialize
YAML_DECLARE(int)
yaml_scalar_event_initialize(yaml_event_t *event,
        yaml_char_t *anchor, yaml_char_t *tag,
        yaml_char_t *value, int length,
        int plain_implicit, int quoted_implicit,
        yaml_scalar_style_t style)
{
    yaml_mark_t mark = { 0, 0, 0 };
    yaml_char_t *anchor_copy = NULL;
    yaml_char_t *tag_copy = NULL;
    yaml_char_t *value_copy = NULL;

    assert(event);      /* Non-NULL event object is expected. */
    assert(value);      /* Non-NULL anchor is expected. */

    if (anchor) {
        if (!yaml_check_utf8(anchor, strlen((char *)anchor))) goto error;
        anchor_copy = yaml_strdup(anchor);
        if (!anchor_copy) goto error;
    }

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

    if (length < 0) {
        length = strlen((char *)value);
    }

    if (!yaml_check_utf8(value, length)) goto error;
    value_copy = yaml_malloc(length+1);
    if (!value_copy) goto error;
    memcpy(value_copy, value, length);
    value_copy[length] = '\0';

    SCALAR_EVENT_INIT(*event, anchor_copy, tag_copy, value_copy, length,
            plain_implicit, quoted_implicit, style, mark, mark);

    return 1;

error:
    yaml_free(anchor_copy);
    yaml_free(tag_copy);
    yaml_free(value_copy);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3b61
movq %rcx, %r12
testq %rcx, %rcx
je 0x3b80
movl %r9d, %r15d
movl %r8d, %r13d
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x3a63
movq %rbx, %rdi
callq 0x20d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x37d7
testl %eax, %eax
je 0x3a5e
movl %r15d, 0x4(%rsp)
movq %rbx, %rdi
callq 0x2230
movq %rax, %r15
testq %rax, %rax
jne 0x3a6b
xorl %r15d, %r15d
jmp 0x3a97
movl %r15d, 0x4(%rsp)
xorl %r15d, %r15d
testq %rbp, %rbp
je 0x3aba
movq %rbp, %rdi
callq 0x20d0
movq %rbp, %rdi
movq %rax, %rsi
callq 0x37d7
testl %eax, %eax
je 0x3a97
movq %rbp, %rdi
callq 0x2230
movq %rax, %rbp
testq %rax, %rax
jne 0x3abc
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x2040
movq %rbp, %rdi
callq 0x2040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
testl %r13d, %r13d
jns 0x3acc
movq %r12, %rdi
callq 0x20d0
movq %rax, %r13
movslq %r13d, %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x37d7
testl %eax, %eax
je 0x3a99
incl %r13d
movslq %r13d, %rdi
callq 0x2080
testq %rax, %rax
je 0x3a99
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2170
movb $0x0, (%r13,%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, 0x20(%r14)
andq $0x0, 0x30(%r14)
movl $0x6, (%r14)
movups %xmm0, 0x58(%r14)
movups %xmm0, 0x48(%r14)
movups %xmm0, 0x38(%r14)
movq %r15, 0x8(%r14)
movq %rbp, 0x10(%r14)
movq %r13, 0x18(%r14)
movq %rbx, 0x20(%r14)
movl 0x4(%rsp), %eax
movl %eax, 0x28(%r14)
movl 0x40(%rsp), %eax
movl %eax, 0x2c(%r14)
movl 0x48(%rsp), %eax
movl %eax, 0x30(%r14)
pushq $0x1
popq %rax
jmp 0x3aab
leaq 0x12964(%rip), %rdi     # 0x164cc
leaq 0x124ca(%rip), %rsi     # 0x16039
leaq 0x12b67(%rip), %rcx     # 0x166dd
movl $0x33a, %edx            # imm = 0x33A
callq 0x2100
leaq 0x12bd8(%rip), %rdi     # 0x1675f
leaq 0x124ab(%rip), %rsi     # 0x16039
leaq 0x12b48(%rip), %rcx     # 0x166dd
movl $0x33b, %edx            # imm = 0x33B
callq 0x2100