#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
float find_latitude(char *);
float find_longitude(char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ make_windseries(float **, float *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read_metdata(char *, float **);
int /*<<< orphan*/ read_wind(char *, float **);
int /*<<< orphan*/ sort_stations(float, float, float **, float *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ write_data(char *, float **);
void main(void) {
  FILE *fp;
  int i;
  char windfile[200] = "WIND_CBR8.TXT";
  char filelist[200] = "filelist_data80-92.txt";
  char metfile[200];
  char indir[200] = "/home/tempbvm/cbr8/metdata/data80-92/";
  char outdir[200] = "/home/tempbvm/cbr8/metdata/wind80-92/";
  float WIND[65][15];
  float METDATA[4749][4];
  char readfile[200];
  char writefile[200];
  float latcell, loncell;
  float CELLWIND[12];
  read_wind(windfile, WIND);
  if ((fp = fopen(filelist, "r")) == NULL) {
    printf("Cannot open file %s \n", filelist);
    exit(0);
  }
  for (i = 0; i < 4858; i++) {
    fscanf(fp, "%s", metfile);
    strcpy(readfile, indir);
    strcat(readfile, metfile);
    printf("%s\n", readfile);
    strcpy(writefile, outdir);
    strcat(writefile, metfile);
    printf("%s\n", writefile);
    read_metdata(readfile, METDATA);
    latcell = find_latitude(metfile);
    printf("latcell %6.4f\n", latcell);
    loncell = find_longitude(metfile);
    printf("loncell %6.4f\n", loncell);
    sort_stations(latcell, loncell, WIND, CELLWIND);
    make_windseries(METDATA, CELLWIND);
    write_data(writefile, METDATA);
  }
  fclose(fp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x13e10,%rsp
lea    -0xe0(%rbp),%rdi
lea    0xdf7(%rip),%rsi
mov    $0xc8,%edx
call   10c0 <memcpy@plt>
lea    -0x1b0(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0xc8,%edx
call   10c0 <memcpy@plt>
lea    -0x350(%rbp),%rdi
lea    0xf67(%rip),%rsi
mov    $0xc8,%edx
call   10c0 <memcpy@plt>
lea    -0x420(%rbp),%rdi
lea    0x101f(%rip),%rsi
mov    $0xc8,%edx
call   10c0 <memcpy@plt>
lea    -0xe0(%rbp),%rdi
lea    -0x1360(%rbp),%rsi
call   1110 <read_wind@plt>
lea    -0x1b0(%rbp),%rdi
lea    0x10bc(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    12ab <main+0xbb>
lea    -0x1b0(%rbp),%rsi
lea    0x109d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
xor    %edi,%edi
call   1100 <exit@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x12fa,-0xc(%rbp)
jge    1412 <main+0x222>
mov    -0x8(%rbp),%rdi
lea    -0x280(%rbp),%rdx
lea    0x107f(%rip),%rsi
call   1090 <fscanf@plt>
lea    -0x13d00(%rbp),%rdi
lea    -0x350(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x13d00(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   10f0 <strcat@plt>
lea    -0x13d00(%rbp),%rsi
lea    0x1049(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x13dd0(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x13dd0(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   10f0 <strcat@plt>
lea    -0x13dd0(%rbp),%rsi
lea    0x100e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x13d00(%rbp),%rdi
lea    -0x13c30(%rbp),%rsi
call   1060 <read_metdata@plt>
lea    -0x280(%rbp),%rdi
call   1080 <find_latitude@plt>
movss  %xmm0,-0x13dd4(%rbp)
ff
movss  -0x13dd4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xfd1(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
lea    -0x280(%rbp),%rdi
call   1030 <find_longitude@plt>
movss  %xmm0,-0x13dd8(%rbp)
ff
movss  -0x13dd8(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xfb2(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movss  -0x13dd4(%rbp),%xmm0
ff
movss  -0x13dd8(%rbp),%xmm1
ff
lea    -0x1360(%rbp),%rdi
lea    -0x13e10(%rbp),%rsi
call   10d0 <sort_stations@plt>
lea    -0x13c30(%rbp),%rdi
lea    -0x13e10(%rbp),%rsi
call   10b0 <make_windseries@plt>
lea    -0x13dd0(%rbp),%rdi
lea    -0x13c30(%rbp),%rsi
call   10a0 <write_data@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12b2 <main+0xc2>
mov    -0x8(%rbp),%rdi
call   1050 <fclose@plt>
add    $0x13e10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x13e08,%rsp
lea    0xde8(%rip),%rsi
lea    0x520(%rsp),%rbx
mov    $0xc8,%edx
mov    %rbx,%rdi
call   10d0 <memcpy@plt>
lea    0xe9c(%rip),%rsi
lea    0x1e0(%rsp),%rbp
mov    $0xc8,%edx
mov    %rbp,%rdi
call   10d0 <memcpy@plt>
lea    0xf50(%rip),%rsi
lea    0x110(%rsp),%rdi
mov    $0xc8,%edx
call   10d0 <memcpy@plt>
lea    0x1007(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0xc8,%edx
call   10d0 <memcpy@plt>
lea    0x5f0(%rsp),%rsi
mov    %rbx,%rdi
call   1120 <read_wind@plt>
lea    0x10a9(%rip),%rsi
mov    %rbp,%rdi
call   10f0 <fopen@plt>
test   %rax,%rax
je     13cb <main+0x1cb>
mov    %rax,%r14
mov    $0x12fa,%r15d
nopl   0x0(%rax)
mov    %r14,%rdi
lea    0x1096(%rip),%rsi
lea    0x450(%rsp),%r13
mov    %r13,%rdx
call   10a0 <fscanf@plt>
lea    0x380(%rsp),%rbp
mov    %rbp,%rdi
lea    0x110(%rsp),%rsi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
call   1100 <strcat@plt>
mov    %rbp,%rdi
call   1050 <puts@plt>
lea    0x2b0(%rsp),%rbx
mov    %rbx,%rdi
lea    0x40(%rsp),%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1100 <strcat@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
lea    0x1530(%rsp),%r12
mov    %r12,%rsi
call   1070 <read_metdata@plt>
mov    %r13,%rdi
call   1090 <find_latitude@plt>
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0x100a(%rip),%rdi
mov    $0x1,%al
call   1080 <printf@plt>
mov    %r13,%rdi
call   1030 <find_longitude@plt>
movss  %xmm0,0x8(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xff9(%rip),%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
lea    0x5f0(%rsp),%rdi
lea    0x10(%rsp),%r13
mov    %r13,%rsi
call   10e0 <sort_stations@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   10c0 <make_windseries@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   10b0 <write_data@plt>
add    $0xffffffff,%r15d
jne    12b0 <main+0xb0>
mov    %r14,%rdi
call   1060 <fclose@plt>
add    $0x13e08,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xf68(%rip),%rdi
lea    0x1e0(%rsp),%rsi
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
call   1110 <exit@plt>

LLVM IR (-O0):
@__const.main.windfile = [200 x i8] c"WIND_CBR8.TXT\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.filelist = [200 x i8] c"filelist_data80-92.txt\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.indir = [200 x i8] c"/home/tempbvm/cbr8/metdata/data80-92/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.outdir = [200 x i8] c"/home/tempbvm/cbr8/metdata/wind80-92/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [2 x i8] c"r\00"
@.str.1 = [22 x i8] c"Cannot open file %s \0A\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [15 x i8] c"latcell %6.4f\0A\00"
@.str.5 = [15 x i8] c"loncell %6.4f\0A\00"
define void @main() {
%1 = alloca i32*
%2 = alloca i32
%3 = alloca [200 x i8]
%4 = alloca [200 x i8]
%5 = alloca [200 x i8]
%6 = alloca [200 x i8]
%7 = alloca [200 x i8]
%8 = alloca [65 x [15 x float]]
%9 = alloca [4749 x [4 x float]]
%10 = alloca [200 x i8]
%11 = alloca [200 x i8]
%12 = alloca float
%13 = alloca float
%14 = alloca [12 x float]
%15 = bitcast [200 x i8]* %3 to i8*
%16 = bitcast [200 x i8]* %4 to i8*
%17 = bitcast [200 x i8]* %6 to i8*
%18 = bitcast [200 x i8]* %7 to i8*
%19 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%20 = getelementptr inbounds [65 x [15 x float]], [65 x [15 x float]]* %8, i64 0, i64 0
%21 = bitcast [15 x float]* %20 to float**
%22 = call i32 @read_wind(i8* %19, float** %21)
%23 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%24 = call i32* @fopen(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %24, i32** %1
%25 = icmp eq i32* %24, null
br i1 %25, label %26, label %30
26: ; preds = %0
%27 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %27)
%29 = call i32 @exit(i32 0)
unreachable
30: ; preds = %0
store i32 0, i32* %2
br label %31
31: ; preds = %82, %30
%32 = load i32, i32* %2
%33 = icmp slt i32 %32, 4858
br i1 %33, label %34, label %85
34: ; preds = %31
%35 = load i32*, i32** %1
%36 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%37 = call i32 @fscanf(i32* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %36)
%38 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%39 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%40 = call i32 @strcpy(i8* %38, i8* %39)
%41 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%42 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%43 = call i32 @strcat(i8* %41, i8* %42)
%44 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %44)
%46 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%47 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%48 = call i32 @strcpy(i8* %46, i8* %47)
%49 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%50 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%51 = call i32 @strcat(i8* %49, i8* %50)
%52 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %52)
%54 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%55 = getelementptr inbounds [4749 x [4 x float]], [4749 x [4 x float]]* %9, i64 0, i64 0
%56 = bitcast [4 x float]* %55 to float**
%57 = call i32 @read_metdata(i8* %54, float** %56)
%58 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%59 = call float @find_latitude(i8* %58)
store float %59, float* %12
%60 = load float, float* %12
%61 = fpext float %60 to double
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), double %61)
%63 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%64 = call float @find_longitude(i8* %63)
store float %64, float* %13
%65 = load float, float* %13
%66 = fpext float %65 to double
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), double %66)
%68 = load float, float* %12
%69 = load float, float* %13
%70 = getelementptr inbounds [65 x [15 x float]], [65 x [15 x float]]* %8, i64 0, i64 0
%71 = bitcast [15 x float]* %70 to float**
%72 = getelementptr inbounds [12 x float], [12 x float]* %14, i64 0, i64 0
%73 = call i32 @sort_stations(float %68, float %69, float** %71, float* %72)
%74 = getelementptr inbounds [4749 x [4 x float]], [4749 x [4 x float]]* %9, i64 0, i64 0
%75 = bitcast [4 x float]* %74 to float**
%76 = getelementptr inbounds [12 x float], [12 x float]* %14, i64 0, i64 0
%77 = call i32 @make_windseries(float** %75, float* %76)
%78 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%79 = getelementptr inbounds [4749 x [4 x float]], [4749 x [4 x float]]* %9, i64 0, i64 0
%80 = bitcast [4 x float]* %79 to float**
%81 = call i32 @write_data(i8* %78, float** %80)
br label %82
82: ; preds = %34
%83 = load i32, i32* %2
%84 = add nsw i32 %83, 1
store i32 %84, i32* %2
br label %31
85: ; preds = %31
%86 = load i32*, i32** %1
%87 = call i32 @fclose(i32* %86)
ret void
}

LLVM IR (-O2):
@__const.main.windfile = [200 x i8] c"WIND_CBR8.TXT\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.filelist = [200 x i8] c"filelist_data80-92.txt\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.indir = [200 x i8] c"/home/tempbvm/cbr8/metdata/data80-92/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.outdir = [200 x i8] c"/home/tempbvm/cbr8/metdata/wind80-92/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [2 x i8] c"r\00"
@.str.1 = [22 x i8] c"Cannot open file %s \0A\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.4 = [15 x i8] c"latcell %6.4f\0A\00"
@.str.5 = [15 x i8] c"loncell %6.4f\0A\00"
define void @main() {
%1 = alloca [200 x i8]
%2 = alloca [200 x i8]
%3 = alloca [200 x i8]
%4 = alloca [200 x i8]
%5 = alloca [200 x i8]
%6 = alloca [65 x [15 x float]]
%7 = alloca [4749 x [4 x float]]
%8 = alloca [200 x i8]
%9 = alloca [200 x i8]
%10 = alloca [12 x float]
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%12 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%16 = bitcast [65 x [15 x float]]* %6 to i8*
%17 = bitcast [4749 x [4 x float]]* %7 to i8*
%18 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%19 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%20 = bitcast [12 x float]* %10 to i8*
%21 = bitcast [65 x [15 x float]]* %6 to float**
%22 = call i32 @read_wind(i8* %11, float** %21)
%23 = call i32* @fopen(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %28, label %25
25: ; preds = %0
%26 = bitcast [4749 x [4 x float]]* %7 to float**
%27 = getelementptr inbounds [12 x float], [12 x float]* %10, i64 0, i64 0
br label %31
28: ; preds = %0
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%30 = call i32 @exit(i32 0)
unreachable
31: ; preds = %25, %31
%32 = phi i32 [ 0, %25 ], [ %50, %31 ]
%33 = call i32 @fscanf(i32* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%34 = call i32 @strcpy(i8* %18, i8* %14)
%35 = call i32 @strcat(i8* %18, i8* %13)
%36 = call i32 @puts(i8* %18)
%37 = call i32 @strcpy(i8* %19, i8* %15)
%38 = call i32 @strcat(i8* %19, i8* %13)
%39 = call i32 @puts(i8* %19)
%40 = call i32 @read_metdata(i8* %18, float** %26)
%41 = call float @find_latitude(i8* %13)
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), double %42)
%44 = call float @find_longitude(i8* %13)
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), double %45)
%47 = call i32 @sort_stations(float %41, float %44, float** %21, float* %27)
%48 = call i32 @make_windseries(float** %26, float* %27)
%49 = call i32 @write_data(i8* %19, float** %26)
%50 = add nuw nsw i32 %32, 1
%51 = icmp eq i32 %50, 4858
br i1 %51, label %52, label %31
52: ; preds = %31
%53 = call i32 @fclose(i32* %23)
ret void
}