#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 */
double fabs(double);
void getmet(double lat, double *met) {
  static const double metprm[][10] = {
      {1013.25, 299.65, 26.31, 6.30E-3, 2.77, 0.00, 0.00, 0.00, 0.00E-3, 0.00},
      {1017.25, 294.15, 21.79, 6.05E-3, 3.15, -3.75, 7.00, 8.85, 0.25E-3, 0.33},
      {1015.75, 283.15, 11.66, 5.58E-3, 2.57, -2.25, 11.00, 7.24, 0.32E-3,
       0.46},
      {1011.75, 272.15, 6.78, 5.39E-3, 1.81, -1.75, 15.00, 5.36, 0.81E-3, 0.74},
      {1013.00, 263.65, 4.11, 4.53E-3, 1.55, -0.50, 14.50, 3.39, 0.62E-3,
       0.30}};
  int i, j;
  double a;
  lat = fabs(lat);
  if (lat <= 15.0)
    for (i = 0; i < 10; i++)
      met[i] = metprm[0][i];
  else if (lat >= 75.0)
    for (i = 0; i < 10; i++)
      met[i] = metprm[4][i];
  else {
    j = (int)(lat / 15.0);
    a = (lat - j * 15.0) / 15.0;
    for (i = 0; i < 10; i++)
      met[i] = (1.0 - a) * metprm[j - 1][i] + a * metprm[j][i];
  }
}


x86 assembly (clang, -O0):
<getmet>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xf07(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed6(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1176 <getmet+0x76>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1171 <getmet+0x71>
movslq -0x14(%rbp),%rcx
lea    0xedf(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113c <getmet+0x3c>
jmp    12b7 <getmet+0x1b7>
movsd  -0x8(%rbp),%xmm0
movsd  0xe85(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11d2 <getmet+0xd2>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    11cd <getmet+0xcd>
movslq -0x14(%rbp),%rcx
lea    0xe87(%rip),%rax
movsd  0x140(%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1194 <getmet+0x94>
jmp    12b2 <getmet+0x1b2>
movsd  -0x8(%rbp),%xmm0
movsd  0xe21(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
cvtsi2sdl -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xded(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xddd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    12ad <getmet+0x1ad>
movsd  0xdcb(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0xdd6(%rip),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x20(%rbp),%xmm1
movslq -0x18(%rbp),%rcx
lea    0xdb6(%rip),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1233 <getmet+0x133>
jmp    12b2 <getmet+0x1b2>
jmp    12b7 <getmet+0x1b7>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getmet>:
andpd  0xef8(%rip),%xmm0
movsd  0xf00(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1203 <getmet+0x103>
ucomisd 0xef6(%rip),%xmm0
jae    123a <getmet+0x13a>
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
cvttsd2si %xmm2,%eax
cvttpd2dq %xmm2,%xmm2
cvtdq2pd %xmm2,%xmm2
mulsd  %xmm1,%xmm2
subsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
movsd  0xed0(%rip),%xmm1
subsd  %xmm0,%xmm1
lea    -0x1(%rax),%ecx
movslq %ecx,%rcx
movslq %eax,%rdx
lea    (%rcx,%rcx,4),%rax
shl    $0x4,%rax
lea    0xec4(%rip),%rcx
lea    (%rdx,%rdx,4),%rdx
shl    $0x4,%rdx
unpcklpd %xmm0,%xmm0
movapd (%rdx,%rcx,1),%xmm2
mulpd  %xmm0,%xmm2
unpcklpd %xmm1,%xmm1
movapd (%rax,%rcx,1),%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm3,(%rdi)
movapd 0x10(%rdx,%rcx,1),%xmm2
mulpd  %xmm0,%xmm2
movapd 0x10(%rax,%rcx,1),%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm3,0x10(%rdi)
movapd 0x20(%rdx,%rcx,1),%xmm2
mulpd  %xmm0,%xmm2
movapd 0x20(%rax,%rcx,1),%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm3,0x20(%rdi)
movapd 0x30(%rdx,%rcx,1),%xmm2
mulpd  %xmm0,%xmm2
movapd 0x30(%rax,%rcx,1),%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm3,0x30(%rdi)
mulpd  0x40(%rdx,%rcx,1),%xmm0
mulpd  0x40(%rax,%rcx,1),%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,0x40(%rdi)
ret
movaps 0xe66(%rip),%xmm0
movups %xmm0,0x40(%rdi)
movaps 0xe4b(%rip),%xmm0
movups %xmm0,0x30(%rdi)
movaps 0xe30(%rip),%xmm0
movups %xmm0,0x20(%rdi)
movaps 0xe15(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movaps 0xdfa(%rip),%xmm0
movups %xmm0,(%rdi)
ret
movaps 0xf6f(%rip),%xmm0
movups %xmm0,0x40(%rdi)
movaps 0xf54(%rip),%xmm0
movups %xmm0,0x30(%rdi)
movaps 0xf39(%rip),%xmm0
movups %xmm0,0x20(%rdi)
movaps 0xf1e(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movaps 0xf03(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
@getmet.metprm = internal constant [5 x [10 x double]] [[10 x double] [double 1.013250e+03, double 2.996500e+02, double 2.631000e+01, double 6.300000e-03, double 2.770000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00], [10 x double] [double 1.017250e+03, double 2.941500e+02, double 2.179000e+01, double 6.050000e-03, double 3.150000e+00, double -3.750000e+00, double 7.000000e+00, double 8.850000e+00, double 2.500000e-04, double 3.300000e-01], [10 x double] [double 1.015750e+03, double 2.831500e+02, double 1.166000e+01, double 5.580000e-03, double 2.570000e+00, double -2.250000e+00, double 1.100000e+01, double 7.240000e+00, double 3.200000e-04, double 4.600000e-01], [10 x double] [double 1.011750e+03, double 2.721500e+02, double 6.780000e+00, double 5.390000e-03, double 1.810000e+00, double -1.750000e+00, double 1.500000e+01, double 5.360000e+00, double 8.100000e-04, double 0x3FE7AE147AE147AE], [10 x double] [double 1.013000e+03, double 2.636500e+02, double 4.110000e+00, double 4.530000e-03, double 1.550000e+00, double -5.000000e-01, double 1.450000e+01, double 3.390000e+00, double 6.200000e-04, double 3.000000e-01]]
define void @getmet(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
store double %0, double* %3
store double* %1, double** %4
%8 = load double, double* %3
%9 = call double @llvm.fabs.f64(double %8)
store double %9, double* %3
%10 = load double, double* %3
%11 = fcmp ole double %10, 1.500000e+01
br i1 %11, label %12, label %29
12: ; preds = %2
store i32 0, i32* %5
br label %13
13: ; preds = %25, %12
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 10
br i1 %15, label %16, label %28
16: ; preds = %13
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [10 x double], [10 x double]* getelementptr inbounds ([5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 0), i64 0, i64 %18
%20 = load double, double* %19
%21 = load double*, double** %4
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds double, double* %21, i64 %23
store double %20, double* %24
br label %25
25: ; preds = %16
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %13
28: ; preds = %13
br label %92
29: ; preds = %2
%30 = load double, double* %3
%31 = fcmp oge double %30, 7.500000e+01
br i1 %31, label %32, label %49
32: ; preds = %29
store i32 0, i32* %5
br label %33
33: ; preds = %45, %32
%34 = load i32, i32* %5
%35 = icmp slt i32 %34, 10
br i1 %35, label %36, label %48
36: ; preds = %33
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [10 x double], [10 x double]* getelementptr inbounds ([5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 4), i64 0, i64 %38
%40 = load double, double* %39
%41 = load double*, double** %4
%42 = load i32, i32* %5
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %41, i64 %43
store double %40, double* %44
br label %45
45: ; preds = %36
%46 = load i32, i32* %5
%47 = add nsw i32 %46, 1
store i32 %47, i32* %5
br label %33
48: ; preds = %33
br label %91
49: ; preds = %29
%50 = load double, double* %3
%51 = fdiv double %50, 1.500000e+01
%52 = fptosi double %51 to i32
store i32 %52, i32* %6
%53 = load double, double* %3
%54 = load i32, i32* %6
%55 = sitofp i32 %54 to double
%56 = fneg double %55
%57 = call double @llvm.fmuladd.f64(double %56, double 1.500000e+01, double %53)
%58 = fdiv double %57, 1.500000e+01
store double %58, double* %7
store i32 0, i32* %5
br label %59
59: ; preds = %87, %49
%60 = load i32, i32* %5
%61 = icmp slt i32 %60, 10
br i1 %61, label %62, label %90
62: ; preds = %59
%63 = load double, double* %7
%64 = fsub double 1.000000e+00, %63
%65 = load i32, i32* %6
%66 = sub nsw i32 %65, 1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %67
%69 = load i32, i32* %5
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [10 x double], [10 x double]* %68, i64 0, i64 %70
%72 = load double, double* %71
%73 = load double, double* %7
%74 = load i32, i32* %6
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %75
%77 = load i32, i32* %5
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [10 x double], [10 x double]* %76, i64 0, i64 %78
%80 = load double, double* %79
%81 = fmul double %73, %80
%82 = call double @llvm.fmuladd.f64(double %64, double %72, double %81)
%83 = load double*, double** %4
%84 = load i32, i32* %5
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %83, i64 %85
store double %82, double* %86
br label %87
87: ; preds = %62
%88 = load i32, i32* %5
%89 = add nsw i32 %88, 1
store i32 %89, i32* %5
br label %59
90: ; preds = %59
br label %91
91: ; preds = %90, %48
br label %92
92: ; preds = %91, %28
ret void
}

LLVM IR (-O2):
@getmet.metprm = internal unnamed_addr constant [5 x [10 x double]] [[10 x double] [double 1.013250e+03, double 2.996500e+02, double 2.631000e+01, double 6.300000e-03, double 2.770000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00], [10 x double] [double 1.017250e+03, double 2.941500e+02, double 2.179000e+01, double 6.050000e-03, double 3.150000e+00, double -3.750000e+00, double 7.000000e+00, double 8.850000e+00, double 2.500000e-04, double 3.300000e-01], [10 x double] [double 1.015750e+03, double 2.831500e+02, double 1.166000e+01, double 5.580000e-03, double 2.570000e+00, double -2.250000e+00, double 1.100000e+01, double 7.240000e+00, double 3.200000e-04, double 4.600000e-01], [10 x double] [double 1.011750e+03, double 2.721500e+02, double 6.780000e+00, double 5.390000e-03, double 1.810000e+00, double -1.750000e+00, double 1.500000e+01, double 5.360000e+00, double 8.100000e-04, double 0x3FE7AE147AE147AE], [10 x double] [double 1.013000e+03, double 2.636500e+02, double 4.110000e+00, double 4.530000e-03, double 1.550000e+00, double -5.000000e-01, double 1.450000e+01, double 3.390000e+00, double 6.200000e-04, double 3.000000e-01]]
define void @getmet(double %0, double* nocapture writeonly %1) {
%3 = bitcast double* %1 to i8*
%4 = tail call double @llvm.fabs.f64(double %0)
%5 = fcmp ugt double %4, 1.500000e+01
br i1 %5, label %7, label %6
6: ; preds = %2
br label %74
7: ; preds = %2
%8 = fcmp ult double %4, 7.500000e+01
br i1 %8, label %10, label %9
9: ; preds = %7
br label %74
10: ; preds = %7
%11 = fdiv double %4, 1.500000e+01
%12 = fptosi double %11 to i32
%13 = sitofp i32 %12 to double
%14 = fneg double %13
%15 = tail call double @llvm.fmuladd.f64(double %14, double 1.500000e+01, double %4)
%16 = fdiv double %15, 1.500000e+01
%17 = fsub double 1.000000e+00, %16
%18 = add nsw i32 %12, -1
%19 = sext i32 %18 to i64
%20 = sext i32 %12 to i64
%21 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %19, i64 0
%22 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %20, i64 0
%23 = bitcast double* %21 to <2 x double>*
%24 = load <2 x double>, <2 x double>* %23
%25 = bitcast double* %22 to <2 x double>*
%26 = load <2 x double>, <2 x double>* %25
%27 = insertelement <2 x double> poison, double %16, i64 0
%28 = shufflevector <2 x double> %27, <2 x double> poison, <2 x i32> zeroinitializer
%29 = fmul <2 x double> %28, %26
%30 = insertelement <2 x double> poison, double %17, i64 0
%31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %31, <2 x double> %24, <2 x double> %29)
%33 = bitcast double* %1 to <2 x double>*
store <2 x double> %32, <2 x double>* %33
%34 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %19, i64 2
%35 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %20, i64 2
%36 = getelementptr inbounds double, double* %1, i64 2
%37 = bitcast double* %34 to <2 x double>*
%38 = load <2 x double>, <2 x double>* %37
%39 = bitcast double* %35 to <2 x double>*
%40 = load <2 x double>, <2 x double>* %39
%41 = fmul <2 x double> %28, %40
%42 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %31, <2 x double> %38, <2 x double> %41)
%43 = bitcast double* %36 to <2 x double>*
store <2 x double> %42, <2 x double>* %43
%44 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %19, i64 4
%45 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %20, i64 4
%46 = getelementptr inbounds double, double* %1, i64 4
%47 = bitcast double* %44 to <2 x double>*
%48 = load <2 x double>, <2 x double>* %47
%49 = bitcast double* %45 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = fmul <2 x double> %28, %50
%52 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %31, <2 x double> %48, <2 x double> %51)
%53 = bitcast double* %46 to <2 x double>*
store <2 x double> %52, <2 x double>* %53
%54 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %19, i64 6
%55 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %20, i64 6
%56 = getelementptr inbounds double, double* %1, i64 6
%57 = bitcast double* %54 to <2 x double>*
%58 = load <2 x double>, <2 x double>* %57
%59 = bitcast double* %55 to <2 x double>*
%60 = load <2 x double>, <2 x double>* %59
%61 = fmul <2 x double> %28, %60
%62 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %31, <2 x double> %58, <2 x double> %61)
%63 = bitcast double* %56 to <2 x double>*
store <2 x double> %62, <2 x double>* %63
%64 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %19, i64 8
%65 = getelementptr inbounds [5 x [10 x double]], [5 x [10 x double]]* @getmet.metprm, i64 0, i64 %20, i64 8
%66 = getelementptr inbounds double, double* %1, i64 8
%67 = bitcast double* %64 to <2 x double>*
%68 = load <2 x double>, <2 x double>* %67
%69 = bitcast double* %65 to <2 x double>*
%70 = load <2 x double>, <2 x double>* %69
%71 = fmul <2 x double> %28, %70
%72 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %31, <2 x double> %68, <2 x double> %71)
%73 = bitcast double* %66 to <2 x double>*
store <2 x double> %72, <2 x double>* %73
br label %74
74: ; preds = %6, %9, %10
ret void
}