#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*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int scanf(char *, float *, float *, char *);
int main() {
  float latitude;
  float longitude;
  char info[80];
  int started = 0;
  puts("Data=[");
  while (scanf("%f,%f,%79[^\n]", &latitude, &longitude, info) == 3) {
    if (started)
      printf(", \n");
    else
      started = 1;
    printf("{latitude: %f, longitude: %f, info: '%s'}", latitude, longitude,
           info);
  }
  printf("\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   1050 <scanf@plt>
cmp    $0x3,%eax
jne    11c0 <main+0x90>
cmpl   $0x0,-0x64(%rbp)
je     1190 <main+0x60>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1197 <main+0x67>
movl   $0x1,-0x64(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    -0x60(%rbp),%rsi
lea    0xe65(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
jmp    1152 <main+0x22>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%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   1050 <scanf@plt>
cmp    $0x3,%eax
jne    121f <main+0xef>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe8c(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x2,%al
call   1040 <printf@plt>
lea    0xe68(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
jne    121f <main+0xef>
lea    0xe82(%rip),%r14
lea    0xe51(%rip),%r15
lea    0x10(%rsp),%rbx
lea    0xe37(%rip),%r12
lea    0xc(%rsp),%r13
lea    0x8(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x2,%al
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
je     11e0 <main+0xb0>
lea    0xdec(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@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 = [4 x i8] c", \0A\00"
@.str.3 = [42 x i8] c"{latitude: %f, longitude: %f, info: '%s'}\00"
@.str.4 = [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 = %17, %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 %24
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 ([4 x i8], [4 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 = fpext float %18 to double
%20 = load float, float* %3
%21 = fpext float %20 to double
%22 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), double %19, double %21, i8* %22)
br label %7
24: ; preds = %7
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Data=[\00"
@.str.1 = [14 x i8] c"%f,%f,%79[^\0A]\00"
@.str.3 = [42 x i8] c"{latitude: %f, longitude: %f, info: '%s'}\00"
@.str.4 = [3 x i8] c"\0A]\00"
@str = [3 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 %27
10: ; preds = %0
%11 = load float, float* %1
%12 = fpext float %11 to double
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), double %12, double %14, i8* %6)
%16 = call i32 @scanf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, i8* %6)
%17 = icmp eq i32 %16, 3
br i1 %17, label %18, label %27
18: ; preds = %10, %18
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%20 = load float, float* %1
%21 = fpext float %20 to double
%22 = load float, float* %2
%23 = fpext float %22 to double
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), double %21, double %23, i8* %6)
%25 = call i32 @scanf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, i8* %6)
%26 = icmp eq i32 %25, 3
br i1 %26, label %18, label %27
27: ; preds = %18, %10, %0
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}