#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int scanf(char *, float *, float *, char *);
int /*<<< orphan*/ stderr;
int main() {
  float lat;
  float lng;
  char info[80];
  int started = 0;
  puts("data=[");
  while (scanf("%f,%f,%79[^\n]", &lat, &lng, info) == 3) {
    if (started) {
      printf(",\n");
    } else {
      started = 1;
    }
    if (lat < -90 || lat > 90 || lng < -180 || lng > 180) {
      fprintf(stderr, "Ошибка данных\n");
      return 2;
    }
    printf("{lat: %f, lng: %f, info: '%s'", lat, lng, info);
  }
  puts("\n]");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x64(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
lea    -0x60(%rbp),%rcx
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1060 <scanf@plt>
cmp    $0x3,%eax
jne    1241 <main+0x101>
cmpl   $0x0,-0x64(%rbp)
je     11a0 <main+0x60>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11a7 <main+0x67>
movl   $0x1,-0x64(%rbp)
movss  0xe51(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
ja     11f7 <main+0xb7>
movss  -0x8(%rbp),%xmm0
movss  0xe3e(%rip),%xmm1
ucomiss %xmm1,%xmm0
ja     11f7 <main+0xb7>
movss  0xe31(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
ja     11f7 <main+0xb7>
movss  -0xc(%rbp),%xmm0
movss  0xe1e(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1218 <main+0xd8>
mov    0x2de2(%rip),%rax
mov    (%rax),%edi
lea    0xe21(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1254 <main+0x114>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    -0x60(%rbp),%rsi
lea    0xe0e(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
jmp    1162 <main+0x22>
lea    0xdda(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb6(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1060 <scanf@plt>
cmp    $0x3,%eax
jne    1277 <main+0x137>
movss  0xc(%rsp),%xmm0
movss  0xe74(%rip),%xmm1
ucomiss %xmm0,%xmm1
ja     125b <main+0x11b>
ucomiss 0xe68(%rip),%xmm0
ja     125b <main+0x11b>
movss  0x8(%rsp),%xmm1
movss  0xe58(%rip),%xmm2
ucomiss %xmm1,%xmm2
ja     125b <main+0x11b>
ucomiss 0xe4c(%rip),%xmm1
ja     125b <main+0x11b>
lea    0xe73(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0xe3e(%rip),%r15
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%r13
lea    0xe74(%rip),%rbp
nopw   0x0(%rax,%rax,1)
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x2,%al
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   1060 <scanf@plt>
cmp    $0x3,%eax
jne    1277 <main+0x137>
mov    %rbp,%rdi
call   1030 <puts@plt>
movss  0xc(%rsp),%xmm0
movss  0xdcf(%rip),%xmm1
ucomiss %xmm0,%xmm1
ja     125b <main+0x11b>
ucomiss 0xdc7(%rip),%xmm0
ja     125b <main+0x11b>
movss  0x8(%rsp),%xmm1
movss  0xdbb(%rip),%xmm2
ucomiss %xmm1,%xmm2
ja     125b <main+0x11b>
ucomiss 0xdb3(%rip),%xmm1
jbe    11f0 <main+0xb0>
mov    0x2d7e(%rip),%rax
mov    (%rax),%edi
lea    0xdba(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x2,%eax
jmp    1285 <main+0x145>
lea    0xda4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"data=[\00"
@.str.1 = [14 x i8] c"%f,%f,%79[^\0A]\00"
@.str.2 = [3 x i8] c",\0A\00"
@stderr = global i32 0
@.str.3 = [27 x i8] c"\D0\9E\D1\88\D0\B8\D0\B1\D0\BA\D0\B0 \D0\B4\D0\B0\D0\BD\D0\BD\D1\8B\D1\85\0A\00"
@.str.4 = [30 x i8] c"{lat: %f, lng: %f, info: '%s'\00"
@.str.5 = [3 x i8] c"\0A]\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca [80 x i8]
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
%6 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %32, %0
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3, i8* %8)
%10 = icmp eq i32 %9, 3
br i1 %10, label %11, label %39
11: ; preds = %7
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %17
16: ; preds = %11
store i32 1, i32* %5
br label %17
17: ; preds = %16, %14
%18 = load float, float* %2
%19 = fcmp olt float %18, -9.000000e+01
br i1 %19, label %29, label %20
20: ; preds = %17
%21 = load float, float* %2
%22 = fcmp ogt float %21, 9.000000e+01
br i1 %22, label %29, label %23
23: ; preds = %20
%24 = load float, float* %3
%25 = fcmp olt float %24, -1.800000e+02
br i1 %25, label %29, label %26
26: ; preds = %23
%27 = load float, float* %3
%28 = fcmp ogt float %27, 1.800000e+02
br i1 %28, label %29, label %32
29: ; preds = %26, %23, %20, %17
%30 = load i32, i32* @stderr
%31 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
store i32 2, i32* %1
br label %41
32: ; preds = %26
%33 = load float, float* %2
%34 = fpext float %33 to double
%35 = load float, float* %3
%36 = fpext float %35 to double
%37 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), double %34, double %36, i8* %37)
br label %7
39: ; preds = %7
%40 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %1
br label %41
41: ; preds = %39, %29
%42 = load i32, i32* %1
ret i32 %42
}

LLVM IR (-O2):
@.str = [7 x i8] c"data=[\00"
@.str.1 = [14 x i8] c"%f,%f,%79[^\0A]\00"
@stderr = global i32 0
@.str.3 = [27 x i8] c"\D0\9E\D1\88\D0\B8\D0\B1\D0\BA\D0\B0 \D0\B4\D0\B0\D0\BD\D0\BD\D1\8B\D1\85\0A\00"
@.str.4 = [30 x i8] c"{lat: %f, lng: %f, info: '%s'\00"
@.str.5 = [3 x i8] c"\0A]\00"
@str = [2 x i8] c",\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca [80 x i8]
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, i8* %6)
%9 = icmp eq i32 %8, 3
br i1 %9, label %10, label %42
10: ; preds = %0
%11 = load float, float* %1
%12 = fcmp olt float %11, -9.000000e+01
%13 = fcmp ogt float %11, 9.000000e+01
%14 = or i1 %12, %13
%15 = load float, float* %2
%16 = fcmp olt float %15, -1.800000e+02
%17 = select i1 %14, i1 true, i1 %16
%18 = fcmp ogt float %15, 1.800000e+02
%19 = select i1 %17, i1 true, i1 %18
br i1 %19, label %31, label %34
20: ; preds = %34
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%22 = load float, float* %1
%23 = fcmp olt float %22, -9.000000e+01
%24 = fcmp ogt float %22, 9.000000e+01
%25 = or i1 %23, %24
%26 = load float, float* %2
%27 = fcmp olt float %26, -1.800000e+02
%28 = select i1 %25, i1 true, i1 %27
%29 = fcmp ogt float %26, 1.800000e+02
%30 = select i1 %28, i1 true, i1 %29
br i1 %30, label %31, label %34
31: ; preds = %20, %10
%32 = load i32, i32* @stderr
%33 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %44
34: ; preds = %10, %20
%35 = phi float [ %26, %20 ], [ %15, %10 ]
%36 = phi float [ %22, %20 ], [ %11, %10 ]
%37 = fpext float %36 to double
%38 = fpext float %35 to double
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), double %37, double %38, i8* %6)
%40 = call i32 @scanf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, i8* %6)
%41 = icmp eq i32 %40, 3
br i1 %41, label %20, label %42
42: ; preds = %34, %0
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %44
44: ; preds = %42, %31
%45 = phi i32 [ 2, %31 ], [ 0, %42 ]
ret i32 %45
}