// File: /workspace/github_c_makefile_star2_O0/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: remove_comments
static void remove_comments(char *string, const char *start_token, const char *end_token) {
    int in_string = 0, escaped = 0;
    size_t i;
    char *ptr = NULL, current_char;
    size_t start_token_len = strlen(start_token);
    size_t end_token_len = strlen(end_token);
    if (start_token_len == 0 || end_token_len == 0) {
        return;
    }
    while ((current_char = *string) != '\0') {
        if (current_char == '\\' && !escaped) {
            escaped = 1;
            string++;
            continue;
        } else if (current_char == '\"' && !escaped) {
            in_string = !in_string;
        } else if (!in_string && strncmp(string, start_token, start_token_len) == 0) {
            for(i = 0; i < start_token_len; i++) {
                string[i] = ' ';
            }
            string = string + start_token_len;
            ptr = strstr(string, end_token);
            if (!ptr) {
                return;
            }
            for (i = 0; i < (ptr - string) + end_token_len; i++) {
                string[i] = ' ';
            }
            string = ptr + end_token_len - 1;
        }
        escaped = 0;
        string++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1100
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1100
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x2a92
cmpq $0x0, -0x48(%rbp)
jne 0x2a97
jmp 0x2bd3
jmp 0x2a99
movq -0x8(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x2bd3
movsbl -0x31(%rbp), %eax
cmpl $0x5c, %eax
jne 0x2ad2
cmpl $0x0, -0x20(%rbp)
jne 0x2ad2
movl $0x1, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x2a99
movsbl -0x31(%rbp), %eax
cmpl $0x22, %eax
jne 0x2af7
cmpl $0x0, -0x20(%rbp)
jne 0x2af7
cmpl $0x0, -0x1c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2bb9
cmpl $0x0, -0x1c(%rbp)
jne 0x2bb7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x1080
cmpl $0x0, %eax
jne 0x2bb7
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2b47
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x20, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2b23
movq -0x8(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x12b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x2b6d
jmp 0x2bd3
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rdx
subq %rdx, %rcx
addq -0x48(%rbp), %rcx
cmpq %rcx, %rax
jae 0x2ba7
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x20, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2b75
movq -0x30(%rbp), %rax
addq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x2bb9
jmp 0x2bbb
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x2a99
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)