// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_value_init_string
JSON_Value * json_value_init_string(const char *string) {
    char *copy = NULL;
    JSON_Value *value;
    size_t string_len = 0;
    if (string == NULL) {
        return NULL;
    }
    string_len = strlen(string);
    if (!is_valid_utf8(string, string_len)) {
        return NULL;
    }
    copy = parson_strndup(string, string_len);
    if (copy == NULL) {
        return NULL;
    }
    value = json_value_init_string_no_copy(copy);
    if (value == NULL) {
        parson_free(copy);
    }
    return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x414a
movq %rdi, %r14
callq 0x2110
movq %rax, %r15
testq %rax, %rax
jle 0x40f4
leaq (%r14,%r15), %rax
xorl %ebx, %ebx
leaq 0x3420(%rip), %rcx      # 0x7328
movq %r14, %rdx
movzbl (%rdx), %esi
cmpl $0xf5, %esi
setae %dil
movl %esi, %r8d
andb $-0x2, %r8b
cmpb $-0x40, %r8b
sete %r8b
movl %esi, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
sete %r9b
orb %r8b, %r9b
orb %dil, %r9b
movl $0x0, %edi
jne 0x3f91
movl $0x1, %edi
testb %sil, %sil
jns 0x3f91
movl %esi, %r8d
andl $-0x20, %r8d
movl $0x2, %edi
cmpl $0xc0, %r8d
je 0x3f91
movl %esi, %r8d
andl $-0x10, %r8d
movl $0x3, %edi
cmpl $0xe0, %r8d
je 0x3f91
movl %esi, %r8d
andl $-0x8, %r8d
xorl %edi, %edi
cmpl $0xf0, %r8d
sete %dil
shll $0x2, %edi
leal -0x1(%rdi), %r8d
cmpl $0x3, %r8d
ja 0x414c
movslq (%rcx,%r8,4), %r8
addq %rcx, %r8
jmpq *%r8
movzbl 0x1(%rdx), %r8d
movl %r8d, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
jne 0x3fd0
andl $0x1f, %esi
shll $0x6, %esi
andl $0x3f, %r8d
orl %r8d, %esi
jmp 0x409f
cmpl $0x4, %edi
je 0x402e
cmpl $0x3, %edi
jne 0x414c
movzbl 0x1(%rdx), %r8d
movl %r8d, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
jne 0x4025
movzbl 0x2(%rdx), %r9d
movl %r9d, %r10d
andl $-0x40, %r10d
cmpl $0x80, %r10d
jne 0x4025
andl $0xf, %esi
shll $0xc, %esi
andl $0x3f, %r8d
shll $0x6, %r8d
orl %esi, %r8d
andl $0x3f, %r9d
orl %r8d, %r9d
movl %r9d, %esi
jmp 0x409f
cmpl $0x4, %edi
jne 0x414c
movzbl 0x1(%rdx), %r8d
movl %r8d, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
jne 0x414c
movzbl 0x2(%rdx), %r9d
movl %r9d, %r10d
andl $-0x40, %r10d
cmpl $0x80, %r10d
jne 0x414c
movzbl 0x3(%rdx), %r10d
movl %r10d, %r11d
andl $-0x40, %r11d
cmpl $0x80, %r11d
jne 0x414c
andl $0x7, %esi
shll $0xc, %esi
andl $0x3f, %r8d
shll $0x6, %r8d
orl %esi, %r8d
andl $0x3f, %r9d
orl %r8d, %r9d
shll $0x6, %r9d
andl $0x3f, %r10d
orl %r9d, %r10d
movl %r10d, %esi
cmpl $0x2, %edi
jb 0x40b0
cmpl $0x80, %esi
jb 0x414c
cmpl $0x3, %edi
jb 0x40c1
cmpl $0x800, %esi            # imm = 0x800
jb 0x414c
cmpl $0xffff, %esi           # imm = 0xFFFF
ja 0x40d0
cmpl $0x3, %edi
jbe 0x40d8
jmp 0x414c
cmpl $0x10ffff, %esi         # imm = 0x10FFFF
ja 0x414c
andl $0x1ff800, %esi         # imm = 0x1FF800
cmpl $0xd800, %esi           # imm = 0xD800
je 0x414c
movl %edi, %esi
addq %rsi, %rdx
cmpq %rax, %rdx
jb 0x3f0b
leaq 0x1(%r15), %rdi
callq *0x6092(%rip)           # 0xa190
testq %rax, %rax
je 0x411b
movq %rax, %r12
movb $0x0, (%rax,%r15)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2070
jmp 0x411e
xorl %r12d, %r12d
testq %r12, %r12
je 0x414a
movl $0x18, %edi
callq *0x6062(%rip)           # 0xa190
testq %rax, %rax
je 0x415b
movq %rax, %rbx
movq $0x0, (%rax)
movl $0x2, 0x8(%rax)
movq %r12, 0x10(%rax)
jmp 0x415d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %ebx, %ebx
testq %rbx, %rbx
jne 0x414c
movq %r12, %rdi
callq *0x601d(%rip)           # 0xa188
jmp 0x414c