// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_command.c
// Function: parse_arg
static bool parse_arg(CeCommandArg_t* arg, const char* string){
     if(*string == 0) return false;

     int64_t size = 0;
     bool digits_only = true;
     bool decimal = false;
     const char* itr = string;

     while(*itr){
          if(!isdigit((int)(*itr))){
               if(*itr == '.'){
                    decimal = true;
               }else if(*itr == '-' ||
                        *itr == '+'){
                    // ignore
               }else{
                    digits_only = false;
               }
          }
          itr++;
          size++;
     }

     if(decimal && digits_only && size == 1){
         digits_only = false;
     }

     if(digits_only){
          if(decimal){
               arg->type = CE_COMMAND_ARG_DECIMAL;
               arg->decimal = atof(string);
          }else{
               arg->type = CE_COMMAND_ARG_INTEGER;
               arg->integer = atoi(string);
          }
     }else{
          // skip over the first quote if one is there
          if(string[0] == '"') string++;

          arg->type = CE_COMMAND_ARG_STRING;
          arg->string = strdup(string);
          int64_t len = strlen(arg->string);

          // overwrite last quote with null terminator
          if(arg->string[len - 1] == '"') arg->string[len - 1] = 0;
     }

     return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1c175
movb $0x0, -0x1(%rbp)
jmp 0x1c2df
movq $0x0, -0x20(%rbp)
movb $0x1, -0x21(%rbp)
movb $0x0, -0x22(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1c204
callq 0xd700
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x1c1ea
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x1c1c8
movb $0x1, -0x22(%rbp)
jmp 0x1c1e8
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x1c1e0
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x1c1e2
jmp 0x1c1e6
movb $0x0, -0x21(%rbp)
jmp 0x1c1e8
jmp 0x1c1ea
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1c18d
testb $0x1, -0x22(%rbp)
je 0x1c21b
testb $0x1, -0x21(%rbp)
je 0x1c21b
cmpq $0x1, -0x20(%rbp)
jne 0x1c21b
movb $0x0, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
je 0x1c265
testb $0x1, -0x22(%rbp)
je 0x1c245
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movq -0x18(%rbp), %rdi
callq 0xd180
movq -0x10(%rbp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0x1c263
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rdi
callq 0xd5d0
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1c2db
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x1c27d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0x2, (%rax)
movq -0x18(%rbp), %rdi
callq 0xd620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xd200
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x22, %eax
jne 0x1c2d9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x1c2db
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)