// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_app.c
// Function: extract_destination_from_range_response
static CeDestination_t _extract_destination_from_range_response(CeJsonObj_t* obj){
     CeDestination_t dest = {};
     CeJsonFindResult_t result_find = ce_json_obj_find(obj, "result");
     if(result_find.type != CE_JSON_TYPE_ARRAY){
          return dest;
     }

     CeJsonArray_t* result_array = ce_json_obj_get_array(obj, &result_find);
     if(result_array == NULL || result_array->count == 0 ||
        result_array->values[0].type != CE_JSON_TYPE_OBJECT){
          return dest;
     }

     CeJsonFindResult_t range_find = ce_json_obj_find(&result_array->values[0].obj, "range");
     if(range_find.type != CE_JSON_TYPE_OBJECT){
          return dest;
     }

     CeJsonObj_t* range_obj = ce_json_obj_get_obj(&result_array->values[0].obj, &range_find);
     if(range_obj == NULL){
          return dest;
     }

     CeJsonFindResult_t start_find = ce_json_obj_find(range_obj, "start");
     if(range_find.type != CE_JSON_TYPE_OBJECT){
          return dest;
     }

     CeJsonObj_t* start_obj = ce_json_obj_get_obj(range_obj, &start_find);
     if(start_obj == NULL){
          return dest;
     }

     CeJsonFindResult_t character_find = ce_json_obj_find(start_obj, "character");
     if(character_find.type != CE_JSON_TYPE_NUMBER){
          return dest;
     }

     double* character_number = ce_json_obj_get_number(start_obj, &character_find);
     if(character_number == NULL){
          return dest;
     }

     dest.point.x = (int64_t)(*character_number);

     CeJsonFindResult_t line_find = ce_json_obj_find(start_obj, "line");
     if(line_find.type != CE_JSON_TYPE_NUMBER){
          return dest;
     }

     double* line_number = ce_json_obj_get_number(start_obj, &line_find);
     if(line_number == NULL){
          return dest;
     }

     dest.point.y = (int64_t)(*line_number);

     CeJsonFindResult_t uri_find = ce_json_obj_find(&result_array->values[0].obj, "uri");
     if(uri_find.type != CE_JSON_TYPE_STRING){
          return dest;
     }

     const char* uri = ce_json_obj_get_string(&result_array->values[0].obj, &uri_find);
     if(uri == NULL){
          return dest;
     }

     strncpy(dest.filepath, uri, MAX_PATH_LEN - 1);

#if defined(PLATFORM_WINDOWS)
     _convert_uri_to_windows_path(dest.filepath);
#else
     _convert_uri_to_linux_path(dest.filepath);
#endif
     return dest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0xa8(%rbp)
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
movq %rsi, -0x8(%rbp)
xorl %esi, %esi
movl $0x410, %edx            # imm = 0x410
callq 0xd290
movq -0x8(%rbp), %rdi
leaq 0x2c2d3(%rip), %rsi     # 0x43b6a
callq 0x25e70
movl %eax, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
cmpl $0x2, -0x18(%rbp)
je 0x178ae
jmp 0x17a98
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x25f60
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x178dd
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x178dd
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpl $0x1, (%rax)
je 0x178e2
jmp 0x17a98
movq -0x20(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
leaq 0x2c2a9(%rip), %rsi     # 0x43b9d
callq 0x25e70
movl %eax, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
cmpl $0x1, -0x30(%rbp)
je 0x1790b
jmp 0x17a98
movq -0x20(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rsi
callq 0x25f10
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1792f
jmp 0x17a98
movq -0x38(%rbp), %rdi
leaq 0x2ad2b(%rip), %rsi     # 0x42665
callq 0x25e70
movl %eax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
cmpl $0x1, -0x30(%rbp)
je 0x17951
jmp 0x17a98
movq -0x38(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x25f10
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x1796e
jmp 0x17a98
movq -0x50(%rbp), %rdi
leaq 0x2c22a(%rip), %rsi     # 0x43ba3
callq 0x25e70
movl %eax, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
cmpl $0x4, -0x60(%rbp)
je 0x17990
jmp 0x17a98
movq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x26000
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x179ad
jmp 0x17a98
movq -0xa8(%rbp), %rax
movq -0x68(%rbp), %rcx
cvttsd2si (%rcx), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rdi
leaq 0x2b2a3(%rip), %rsi     # 0x42c6e
callq 0x25e70
movl %eax, -0x78(%rbp)
movq %rdx, -0x70(%rbp)
cmpl $0x4, -0x78(%rbp)
je 0x179e2
jmp 0x17a98
movq -0x50(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x26000
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x179ff
jmp 0x17a98
movq -0xa8(%rbp), %rax
movq -0x80(%rbp), %rcx
cvttsd2si (%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
leaq 0x2c18f(%rip), %rsi     # 0x43bb4
callq 0x25e70
movl %eax, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
cmpl $0x3, -0x90(%rbp)
je 0x17a42
jmp 0x17a98
movq -0x20(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
leaq -0x90(%rbp), %rsi
callq 0x25fb0
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
jne 0x17a6c
jmp 0x17a98
movq -0xa8(%rbp), %rdi
addq $0x10, %rdi
movq -0x98(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0xd0b0
movq -0xa8(%rbp), %rdi
addq $0x10, %rdi
callq 0x16e50
movq -0xa0(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)