// File: /workspace/github_c_makefile_star2_O3/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 0x3d33
movq %rcx, %r12
testq %rcx, %rcx
je 0x3d52
movl %r8d, %r13d
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %r14
movl %r9d, 0x4(%rsp)
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x3c1b
movq %r15, %rdi
callq 0x20d0
movq %r15, %rdi
movq %rax, %rsi
callq 0x398c
testl %eax, %eax
je 0x3d22
movq %r15, %rdi
callq 0x2220
movq %rax, %r15
testq %rax, %rax
jne 0x3c1e
jmp 0x3d22
xorl %r15d, %r15d
testq %rbp, %rbp
je 0x3c51
movq %rbp, %rdi
callq 0x20d0
movq %rbp, %rdi
movq %rax, %rsi
callq 0x398c
testl %eax, %eax
je 0x3c4a
movq %rbp, %rdi
callq 0x2220
movq %rax, %rbp
testq %rax, %rax
jne 0x3c53
xorl %ebp, %ebp
jmp 0x3d06
xorl %ebp, %ebp
testl %r13d, %r13d
jns 0x3c63
movq %r12, %rdi
callq 0x20d0
movq %rax, %r13
movslq %r13d, %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x398c
testl %eax, %eax
je 0x3d06
leal 0x1(%r13), %eax
cmpl $0x1, %eax
adcl $0x1, %r13d
movslq %r13d, %rdi
callq 0x21a0
testq %rax, %rax
je 0x3d06
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)
movq $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)
movl $0x1, %ebx
jmp 0x3d22
testq %r15, %r15
je 0x3d13
movq %r15, %rdi
callq 0x2040
xorl %ebx, %ebx
testq %rbp, %rbp
je 0x3d22
movq %rbp, %rdi
callq 0x2040
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13792(%rip), %rdi     # 0x174cc
leaq 0x132f8(%rip), %rsi     # 0x17039
leaq 0x13995(%rip), %rcx     # 0x176dd
movl $0x33a, %edx            # imm = 0x33A
callq 0x2100
leaq 0x13a06(%rip), %rdi     # 0x1775f
leaq 0x132d9(%rip), %rsi     # 0x17039
leaq 0x13976(%rip), %rcx     # 0x176dd
movl $0x33b, %edx            # imm = 0x33B
callq 0x2100