// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_json.c
// Function: obj_parse
static bool _obj_parse(ParsePos_t* pos, CeJsonObj_t* obj, bool verbose){
     ObjParseState_t state = {};
     while(*pos->str){
          switch(state.stage){
          case OBJ_PARSE_STAGE_START:
               _eat_whitespace(pos);
               if(*pos->str == TOKEN_OPEN_BRACE){
                    _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD, pos, verbose);
               }else{
                    printf("Error: %" PRId64 ", %" PRId64 " expected first non-whitespace character is not an open brace.\n",
                           pos->x, pos->y);
                    return false;
               }
               break;
          case OBJ_PARSE_STAGE_FIELD:
               _eat_whitespace(pos);
               if(*pos->str == TOKEN_QUOTE){
                    _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD_NAME_BEGIN, pos, verbose);
               }else if(*pos->str == TOKEN_CLOSE_BRACE){
                    if(verbose) printf("Done parsing obj.\n");
                    return true;
               }else{
                    printf("Error: %" PRId64 ", %" PRId64 " expected field declaration.\n",
                           pos->x, pos->y);
                    return false;
               }
               break;
          case OBJ_PARSE_STAGE_FIELD_NAME_BEGIN:
          {
               _parse_string(pos, &state.field_name);
               if(*pos->str == TOKEN_QUOTE){
                    _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD_NAME_END, pos, verbose);
               }else{
                    printf("Error: %" PRId64 ", %" PRId64 " expected \" to start string.\n", pos->x, pos->y);
                    return false;
               }
          } break;
          case OBJ_PARSE_STAGE_FIELD_NAME_END:
               _eat_whitespace(pos);
               if(*pos->str == TOKEN_COLON){
                    _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD_VALUE_BEGIN, pos, verbose);
               }else{
                    printf("Error: %" PRId64 ", %" PRId64 " expected \" to start string.\n", pos->x, pos->y);
                    return false;
               }
               break;
          case OBJ_PARSE_STAGE_FIELD_VALUE_BEGIN:
          {
               bool boolean = false;
               _eat_whitespace(pos);
               if(*pos->str == TOKEN_OPEN_BRACE){
                    CeJsonObj_t member_obj = {};
                    if(!_obj_parse(pos, &member_obj, verbose)){
                         return false;
                    }
                    if(verbose) printf("adding obj obj field %s\n", state.field_name);
                    ce_json_obj_set_obj(obj, state.field_name, &member_obj);
                    ce_json_obj_free(&member_obj);
                    _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD_VALUE_END, pos, verbose);
               }else if(_starts_number(*pos->str)){
                    double number = 0;
                    bool success = _parse_number(pos, &number);
                    if(success){
                         _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD_VALUE_END, pos, verbose);
                         if(verbose) printf("adding obj number field %s\n", state.field_name);
                         ce_json_obj_set_number(obj, state.field_name, number);
                    }else{
                         printf("Error: %" PRId64 ", %" PRId64 " failed to parse expected number.\n",
                                pos->x, pos->y);
                         return false;
                    }
               }else if(*pos->str == TOKEN_OPEN_BRACKET){
                    CeJsonArray_t array = {};
                    bool success = _array_parse(pos, &array, verbose);
                    if(success){
                         _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD_VALUE_END, pos, verbose);
                         if(verbose) printf("adding obj array field %s\n", state.field_name);
                         ce_json_obj_set_array(obj, state.field_name, &array);
                         ce_json_array_free(&array);
                    }else{
                         printf("Error: %" PRId64 ", %" PRId64 " failed to parse array.\n", pos->x, pos->y);
                         return false;
                    }
               }else if(*pos->str == TOKEN_QUOTE){
                    advance_parse_pos(pos);
                    char* field_string = NULL;
                    bool success = _parse_string(pos, &field_string);
                    if(success){
                         _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD_VALUE_END, pos, verbose);
                         if(verbose) printf("adding obj string field %s\n", state.field_name);
                         ce_json_obj_set_string(obj, state.field_name, field_string);
                         free(field_string);
                    }else{
                         printf("Error: %" PRId64 ", %" PRId64 " failed to parse string.", pos->x, pos->y);
                    }
               }else if(_parse_boolean(pos, &boolean)){
                    _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD_VALUE_END, pos, verbose);
                    if(verbose) printf("adding obj boolean field %s\n", state.field_name);
                    ce_json_obj_set_boolean(obj, state.field_name, boolean);
               }else if(_parse_null(pos)){
                    _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD_VALUE_END, pos, verbose);
                    if(verbose) printf("adding obj null field %s\n", state.field_name);
                    ce_json_obj_set_null(obj, state.field_name);
               }else{
                    printf("Error: %" PRId64 ", %" PRId64 " failed to detect value.\n", pos->x, pos->y);
                    return false;
               }
          } break;
          case OBJ_PARSE_STAGE_FIELD_VALUE_END:
               _eat_whitespace(pos);
               if(*pos->str == TOKEN_CLOSE_BRACE){
                    if(verbose) printf("done parsing obj.\n");
                    return true;
               }else if(*pos->str == TOKEN_COMMA){
                    _transition_obj_stage(&state.stage, OBJ_PARSE_STAGE_FIELD, pos, verbose);
               }else{
                    printf("Error: %" PRId64 ", %" PRId64 " failed to parse next element or end of object with %c.\n",
                           pos->x, pos->y, *pos->str);
                    return false;
               }
               break;
          default:
               printf("Error: reached unknown state %d\n", state.stage);
               return false;
          }

          if(_is_newline(*pos->str)){
               advance_newline_parse_pos(pos);
          }else{
               advance_parse_pos(pos);
          }
     }
     return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0x267a9
movl -0x30(%rbp), %eax
movq %rax, -0x88(%rbp)
subq $0x5, %rax
ja 0x26764
movq -0x88(%rbp), %rax
leaq 0x1e4b8(%rip), %rcx     # 0x44634
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
callq 0x26da0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x7b, %eax
jne 0x261b9
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x1, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
jmp 0x261e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1e52c(%rip), %rdi     # 0x446fc
movb $0x0, %al
callq 0xd230
movb $0x0, -0x1(%rbp)
jmp 0x267ad
jmp 0x2677b
movq -0x10(%rbp), %rdi
callq 0x26da0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x26219
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x2, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
jmp 0x2626c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x7d, %eax
jne 0x26245
testb $0x1, -0x19(%rbp)
je 0x2623c
leaq 0x1e516(%rip), %rdi     # 0x4474b
movb $0x0, %al
callq 0xd230
movb $0x1, -0x1(%rbp)
jmp 0x267ad
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1e502(%rip), %rdi     # 0x4475e
movb $0x0, %al
callq 0xd230
movb $0x0, -0x1(%rbp)
jmp 0x267ad
jmp 0x2677b
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
addq $0x8, %rsi
callq 0x26e70
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x262ad
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x3, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
jmp 0x262d4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1e4c7(%rip), %rdi     # 0x4478b
movb $0x0, %al
callq 0xd230
movb $0x0, -0x1(%rbp)
jmp 0x267ad
jmp 0x2677b
movq -0x10(%rbp), %rdi
callq 0x26da0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x2630d
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x4, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
jmp 0x26334
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1e467(%rip), %rdi     # 0x4478b
movb $0x0, %al
callq 0xd230
movb $0x0, -0x1(%rbp)
jmp 0x267ad
jmp 0x2677b
movb $0x0, -0x31(%rbp)
movq -0x10(%rbp), %rdi
callq 0x26da0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x7b, %eax
jne 0x263dc
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
movq -0x10(%rbp), %rdi
movb -0x19(%rbp), %al
leaq -0x48(%rbp), %rsi
andb $0x1, %al
movzbl %al, %edx
callq 0x26120
testb $0x1, %al
jne 0x2638b
movb $0x0, -0x1(%rbp)
jmp 0x267ad
testb $0x1, -0x19(%rbp)
je 0x263a3
movq -0x28(%rbp), %rsi
leaq 0x1e41c(%rip), %rdi     # 0x447b8
movb $0x0, %al
callq 0xd230
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x25560
leaq -0x48(%rbp), %rdi
callq 0x25b50
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x5, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
jmp 0x266cd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0x26fd0
testb $0x1, %al
jne 0x263f4
jmp 0x26486
xorps %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x27010
andb $0x1, %al
movb %al, -0x51(%rbp)
testb $0x1, -0x51(%rbp)
je 0x2645a
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x5, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
testb $0x1, -0x19(%rbp)
je 0x26446
movq -0x28(%rbp), %rsi
leaq 0x1e392(%rip), %rdi     # 0x447d1
movb $0x0, %al
callq 0xd230
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movsd -0x50(%rbp), %xmm0
callq 0x25920
jmp 0x26481
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1e37c(%rip), %rdi     # 0x447ed
movb $0x0, %al
callq 0xd230
movb $0x0, -0x1(%rbp)
jmp 0x267ad
jmp 0x266cb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0x26543
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
movq -0x10(%rbp), %rdi
movb -0x19(%rbp), %al
leaq -0x68(%rbp), %rsi
andb $0x1, %al
movzbl %al, %edx
callq 0x27090
andb $0x1, %al
movb %al, -0x69(%rbp)
testb $0x1, -0x69(%rbp)
je 0x26517
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x5, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
testb $0x1, -0x19(%rbp)
je 0x264fb
movq -0x28(%rbp), %rsi
leaq 0x1e32b(%rip), %rdi     # 0x4481f
movb $0x0, %al
callq 0xd230
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x25690
leaq -0x68(%rbp), %rdi
callq 0x254d0
jmp 0x2653e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1e30c(%rip), %rdi     # 0x4483a
movb $0x0, %al
callq 0xd230
movb $0x0, -0x1(%rbp)
jmp 0x267ad
jmp 0x266c9
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x265f0
movq -0x10(%rbp), %rdi
callq 0x27510
movq $0x0, -0x78(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x26e70
andb $0x1, %al
movb %al, -0x79(%rbp)
testb $0x1, -0x79(%rbp)
je 0x265cd
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x5, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
testb $0x1, -0x19(%rbp)
je 0x265b1
movq -0x28(%rbp), %rsi
leaq 0x1e2b8(%rip), %rdi     # 0x44862
movb $0x0, %al
callq 0xd230
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x25860
movq -0x78(%rbp), %rdi
callq 0xd090
jmp 0x265eb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1e29a(%rip), %rdi     # 0x4487e
movb $0x0, %al
callq 0xd230
jmp 0x266c7
movq -0x10(%rbp), %rdi
leaq -0x31(%rbp), %rsi
callq 0x27540
testb $0x1, %al
jne 0x26603
jmp 0x2664c
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x5, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
testb $0x1, -0x19(%rbp)
je 0x26635
movq -0x28(%rbp), %rsi
leaq 0x1e278(%rip), %rdi     # 0x448a6
movb $0x0, %al
callq 0xd230
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movb -0x31(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x259e0
jmp 0x266c5
movq -0x10(%rbp), %rdi
callq 0x275d0
testb $0x1, %al
jne 0x2665b
jmp 0x2669c
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x5, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
testb $0x1, -0x19(%rbp)
je 0x2668d
movq -0x28(%rbp), %rsi
leaq 0x1e23d(%rip), %rdi     # 0x448c3
movb $0x0, %al
callq 0xd230
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x25aa0
jmp 0x266c3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x1e22a(%rip), %rdi     # 0x448dd
movb $0x0, %al
callq 0xd230
movb $0x0, -0x1(%rbp)
jmp 0x267ad
jmp 0x266c5
jmp 0x266c7
jmp 0x266c9
jmp 0x266cb
jmp 0x266cd
jmp 0x2677b
movq -0x10(%rbp), %rdi
callq 0x26da0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x7d, %eax
jne 0x26707
testb $0x1, -0x19(%rbp)
je 0x266fe
leaq 0x1e20f(%rip), %rdi     # 0x44906
movb $0x0, %al
callq 0xd230
movb $0x1, -0x1(%rbp)
jmp 0x267ad
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x26732
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movb -0x19(%rbp), %al
movl $0x1, %esi
andb $0x1, %al
movzbl %al, %ecx
callq 0x26e00
jmp 0x26760
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
leaq 0x1e1c6(%rip), %rdi     # 0x44919
movb $0x0, %al
callq 0xd230
movb $0x0, -0x1(%rbp)
jmp 0x267ad
jmp 0x26762
jmp 0x2677b
movl -0x30(%rbp), %esi
leaq 0x1e1f3(%rip), %rdi     # 0x44961
movb $0x0, %al
callq 0xd230
movb $0x0, -0x1(%rbp)
jmp 0x267ad
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0x27620
testb $0x1, %al
jne 0x26790
jmp 0x2679b
movq -0x10(%rbp), %rdi
callq 0x27650
jmp 0x267a4
movq -0x10(%rbp), %rdi
callq 0x27510
jmp 0x2614a
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)