// File: /workspace/github_c_makefile_star2_O1/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 0x3ce5
movq %rcx, %r12
testq %rcx, %rcx
je 0x3d04
movl %r9d, %r14d
movl %r8d, %ebp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
testq %rsi, %rsi
je 0x3bbd
movq %rbx, %rdi
callq 0x20d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x391b
testl %eax, %eax
je 0x3bb8
movl %r14d, 0x4(%rsp)
movq %rbx, %rdi
callq 0x2220
movq %rax, %r14
testq %rax, %rax
jne 0x3bc5
xorl %r14d, %r14d
jmp 0x3bf1
movl %r14d, 0x4(%rsp)
xorl %r14d, %r14d
testq %r13, %r13
je 0x3c19
movq %r13, %rdi
callq 0x20d0
movq %r13, %rdi
movq %rax, %rsi
callq 0x391b
testl %eax, %eax
je 0x3bf1
movq %r13, %rdi
callq 0x2220
movq %rax, %r13
testq %rax, %rax
jne 0x3c1c
xorl %r13d, %r13d
testq %r14, %r14
je 0x3c01
movq %r14, %rdi
callq 0x2040
xorl %ebx, %ebx
testq %r13, %r13
je 0x3cd4
movq %r13, %rdi
callq 0x2040
jmp 0x3cd4
xorl %r13d, %r13d
testl %ebp, %ebp
jns 0x3c2b
movq %r12, %rdi
callq 0x20d0
movq %rax, %rbp
movslq %ebp, %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x391b
testl %eax, %eax
je 0x3bf4
leal 0x1(%rbp), %eax
cmpl $0x1, %eax
adcl $0x1, %ebp
movslq %ebp, %rdi
callq 0x21a0
testq %rax, %rax
je 0x3bf4
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2170
movb $0x0, (%rbp,%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movups %xmm0, 0x40(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x50(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, 0x20(%r15)
movq $0x0, 0x60(%r15)
movl $0x6, (%r15)
movups %xmm0, 0x38(%r15)
movups %xmm0, 0x48(%r15)
movups %xmm0, 0x58(%r15)
movq %r14, 0x8(%r15)
movq %r13, 0x10(%r15)
movq %rbp, 0x18(%r15)
movq %rbx, 0x20(%r15)
movl 0x4(%rsp), %eax
movl %eax, 0x28(%r15)
movl 0x40(%rsp), %eax
movl %eax, 0x2c(%r15)
movl 0x48(%rsp), %eax
movl %eax, 0x30(%r15)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x147e0(%rip), %rdi     # 0x184cc
leaq 0x14346(%rip), %rsi     # 0x18039
leaq 0x149e3(%rip), %rcx     # 0x186dd
movl $0x33a, %edx            # imm = 0x33A
callq 0x2100
leaq 0x14a54(%rip), %rdi     # 0x1875f
leaq 0x14327(%rip), %rsi     # 0x18039
leaq 0x149c4(%rip), %rcx     # 0x186dd
movl $0x33b, %edx            # imm = 0x33B
callq 0x2100