#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 atof(char *);
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
double pow(double, int);
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  double dT = 0.1;
  double temperature, temperature_lb, temperature_ub;
  int points;
  double B;
  int i;
  double current_a;
  if (argc < 5)
    usage(argv[0]);
  else {
    ++argv;
    --argc;
  };
  temperature_lb = atof(*argv);
  ++argv;
  --argc;
  temperature_ub = atof(*argv);
  ++argv;
  --argc;
  points = atoi(*argv);
  ++argv;
  --argc;
  if ((temperature_lb > temperature_ub) || (temperature_lb < 0) ||
      (temperature_ub < 0)) {
    fprintf(stderr, "%s: invalid temperature range specified\n", argv[0]);
    usage(argv[0]);
  }
  if (points < 1) {
    fprintf(stderr, "%s: invalid number of data points\n", argv[0]);
    usage(argv[0]);
  }
  for (temperature = temperature_lb; temperature <= temperature_ub;
       temperature += dT) {
    for (i = 0, B = 0; i < argc; i++) {
      current_a = atof(*(argv + i));
      B += current_a * (pow((298.15 / temperature - 1), i));
    }
    printf("%f %f\n", temperature, B);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xe72(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    11ae <main+0x3e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1060 <usage@plt>
jmp    11c3 <main+0x53>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
ja     125f <main+0xef>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
ja     125f <main+0xef>
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1287 <main+0x117>
mov    0x2d7a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xda2(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1060 <usage@plt>
cmpl   $0x1,-0x34(%rbp)
jge    12b9 <main+0x149>
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd99(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1060 <usage@plt>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1385 <main+0x215>
movl   $0x0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    135b <main+0x1eb>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xcf6(%rip),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  0xce1(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x44(%rbp),%edi
call   1070 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12e6 <main+0x176>
movsd  -0x20(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
lea    0xcf8(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    12c3 <main+0x153>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    %rsi,%r12
mov    %edi,%r14d
cmp    $0x4,%edi
jg     1192 <main+0x22>
mov    (%r12),%rdi
call   1060 <usage@plt>
jmp    119a <main+0x2a>
add    $0x8,%r12
add    $0xffffffff,%r14d
mov    (%r12),%rdi
call   1030 <atof@plt>
movsd  %xmm0,0x8(%rsp)
mov    0x8(%r12),%rdi
call   1030 <atof@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x10(%r12),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebp
xorpd  %xmm0,%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     1224 <main+0xb4>
ucomisd 0x8(%rsp),%xmm0
ja     1224 <main+0xb4>
movsd  0x8(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     1224 <main+0xb4>
test   %ebp,%ebp
jg     120f <main+0x9f>
mov    0x2dee(%rip),%rax
mov    (%rax),%edi
mov    0x18(%r12),%rdx
lea    0xe41(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x18(%r12),%rdi
call   1060 <usage@plt>
movsd  0x10(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
jae    124e <main+0xde>
xor    %edi,%edi
call   1090 <exit@plt>
mov    0x2db5(%rip),%rax
mov    (%rax),%edi
mov    0x18(%r12),%rdx
lea    0xddf(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x18(%r12),%rdi
call   1060 <usage@plt>
test   %ebp,%ebp
jle    11eb <main+0x7b>
jmp    120f <main+0x9f>
lea    -0x3(%r14),%eax
mov    %eax,%ebx
lea    0xe09(%rip),%r15
jmp    128e <main+0x11e>
nopl   (%rax)
mov    %r15,%rdi
movsd  0x8(%rsp),%xmm0
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xd94(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
ucomisd %xmm1,%xmm0
jb     121d <main+0xad>
xorpd  %xmm1,%xmm1
cmp    $0x4,%r14d
jl     1260 <main+0xf0>
movsd  0xd60(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
addsd  0xd5a(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
xorpd  %xmm1,%xmm1
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movsd  %xmm1,0x28(%rsp)
mov    0x18(%r12,%rbp,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x18(%rsp),%xmm0
mov    %ebp,%edi
call   1070 <pow@plt>
movsd  0x28(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm0
addsd  %xmm0,%xmm1
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    12c0 <main+0x150>
jmp    1260 <main+0xf0>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"%s: invalid temperature range specified\0A\00"
@.str.1 = [35 x i8] c"%s: invalid number of data points\0A\00"
@.str.2 = [7 x i8] c"%f %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca double
%12 = alloca i32
%13 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.000000e-01, double* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 5
br i1 %15, label %16, label %21
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 @usage(i8* %19)
br label %26
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i32 1
store i8** %23, i8*** %5
%24 = load i32, i32* %4
%25 = add nsw i32 %24, -1
store i32 %25, i32* %4
br label %26
26: ; preds = %21, %16
%27 = load i8**, i8*** %5
%28 = load i8*, i8** %27
%29 = call double @atof(i8* %28)
store double %29, double* %8
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i32 1
store i8** %31, i8*** %5
%32 = load i32, i32* %4
%33 = add nsw i32 %32, -1
store i32 %33, i32* %4
%34 = load i8**, i8*** %5
%35 = load i8*, i8** %34
%36 = call double @atof(i8* %35)
store double %36, double* %9
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i32 1
store i8** %38, i8*** %5
%39 = load i32, i32* %4
%40 = add nsw i32 %39, -1
store i32 %40, i32* %4
%41 = load i8**, i8*** %5
%42 = load i8*, i8** %41
%43 = call i32 @atoi(i8* %42)
store i32 %43, i32* %10
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i32 1
store i8** %45, i8*** %5
%46 = load i32, i32* %4
%47 = add nsw i32 %46, -1
store i32 %47, i32* %4
%48 = load double, double* %8
%49 = load double, double* %9
%50 = fcmp ogt double %48, %49
br i1 %50, label %57, label %51
51: ; preds = %26
%52 = load double, double* %8
%53 = fcmp olt double %52, 0.000000e+00
br i1 %53, label %57, label %54
54: ; preds = %51
%55 = load double, double* %9
%56 = fcmp olt double %55, 0.000000e+00
br i1 %56, label %57, label %67
57: ; preds = %54, %51, %26
%58 = load i32, i32* @stderr
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 0
%61 = load i8*, i8** %60
%62 = call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %61)
%63 = load i8**, i8*** %5
%64 = getelementptr inbounds i8*, i8** %63, i64 0
%65 = load i8*, i8** %64
%66 = call i32 @usage(i8* %65)
br label %67
67: ; preds = %57, %54
%68 = load i32, i32* %10
%69 = icmp slt i32 %68, 1
br i1 %69, label %70, label %80
70: ; preds = %67
%71 = load i32, i32* @stderr
%72 = load i8**, i8*** %5
%73 = getelementptr inbounds i8*, i8** %72, i64 0
%74 = load i8*, i8** %73
%75 = call i32 @fprintf(i32 %71, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %74)
%76 = load i8**, i8*** %5
%77 = getelementptr inbounds i8*, i8** %76, i64 0
%78 = load i8*, i8** %77
%79 = call i32 @usage(i8* %78)
br label %80
80: ; preds = %70, %67
%81 = load double, double* %8
store double %81, double* %7
br label %82
82: ; preds = %113, %80
%83 = load double, double* %7
%84 = load double, double* %9
%85 = fcmp ole double %83, %84
br i1 %85, label %86, label %117
86: ; preds = %82
store i32 0, i32* %12
store double 0.000000e+00, double* %11
br label %87
87: ; preds = %106, %86
%88 = load i32, i32* %12
%89 = load i32, i32* %4
%90 = icmp slt i32 %88, %89
br i1 %90, label %91, label %109
91: ; preds = %87
%92 = load i8**, i8*** %5
%93 = load i32, i32* %12
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i8*, i8** %92, i64 %94
%96 = load i8*, i8** %95
%97 = call double @atof(i8* %96)
store double %97, double* %13
%98 = load double, double* %13
%99 = load double, double* %7
%100 = fdiv double 2.981500e+02, %99
%101 = fsub double %100, 1.000000e+00
%102 = load i32, i32* %12
%103 = call double @pow(double %101, i32 %102)
%104 = load double, double* %11
%105 = call double @llvm.fmuladd.f64(double %98, double %103, double %104)
store double %105, double* %11
br label %106
106: ; preds = %91
%107 = load i32, i32* %12
%108 = add nsw i32 %107, 1
store i32 %108, i32* %12
br label %87
109: ; preds = %87
%110 = load double, double* %7
%111 = load double, double* %11
%112 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %110, double %111)
br label %113
113: ; preds = %109
%114 = load double, double* %6
%115 = load double, double* %7
%116 = fadd double %115, %114
store double %116, double* %7
br label %82
117: ; preds = %82
%118 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"%s: invalid temperature range specified\0A\00"
@.str.1 = [35 x i8] c"%s: invalid number of data points\0A\00"
@.str.2 = [7 x i8] c"%f %f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 5
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @usage(i8* %5)
br label %10
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = add nsw i32 %0, -1
br label %10
10: ; preds = %7, %4
%11 = phi i8** [ %1, %4 ], [ %8, %7 ]
%12 = phi i32 [ %0, %4 ], [ %9, %7 ]
%13 = load i8*, i8** %11
%14 = tail call double @atof(i8* %13)
%15 = getelementptr inbounds i8*, i8** %11, i64 1
%16 = load i8*, i8** %15
%17 = tail call double @atof(i8* %16)
%18 = getelementptr inbounds i8*, i8** %11, i64 2
%19 = load i8*, i8** %18
%20 = tail call i32 @atoi(i8* %19)
%21 = getelementptr inbounds i8*, i8** %11, i64 3
%22 = add i32 %12, -3
%23 = fcmp ogt double %14, %17
%24 = fcmp olt double %14, 0.000000e+00
%25 = or i1 %24, %23
%26 = fcmp olt double %17, 0.000000e+00
%27 = or i1 %26, %25
br i1 %27, label %28, label %34
28: ; preds = %10
%29 = load i32, i32* @stderr
%30 = load i8*, i8** %21
%31 = tail call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %30)
%32 = load i8*, i8** %21
%33 = tail call i32 @usage(i8* %32)
br label %34
34: ; preds = %10, %28
%35 = icmp slt i32 %20, 1
br i1 %35, label %36, label %42
36: ; preds = %34
%37 = load i32, i32* @stderr
%38 = load i8*, i8** %21
%39 = tail call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %38)
%40 = load i8*, i8** %21
%41 = tail call i32 @usage(i8* %40)
br label %42
42: ; preds = %36, %34
%43 = fcmp ugt double %14, %17
br i1 %43, label %68, label %44
44: ; preds = %42
%45 = icmp sgt i32 %12, 3
%46 = zext i32 %22 to i64
br label %47
47: ; preds = %44, %63
%48 = phi double [ %14, %44 ], [ %66, %63 ]
br i1 %45, label %49, label %63
49: ; preds = %47
%50 = fdiv double 2.981500e+02, %48
%51 = fadd double %50, -1.000000e+00
br label %52
52: ; preds = %49, %52
%53 = phi i64 [ 0, %49 ], [ %61, %52 ]
%54 = phi double [ 0.000000e+00, %49 ], [ %60, %52 ]
%55 = getelementptr inbounds i8*, i8** %21, i64 %53
%56 = load i8*, i8** %55
%57 = tail call double @atof(i8* %56)
%58 = trunc i64 %53 to i32
%59 = tail call double @pow(double %51, i32 %58)
%60 = tail call double @llvm.fmuladd.f64(double %57, double %59, double %54)
%61 = add nuw nsw i64 %53, 1
%62 = icmp eq i64 %61, %46
br i1 %62, label %63, label %52
63: ; preds = %52, %47
%64 = phi double [ 0.000000e+00, %47 ], [ %60, %52 ]
%65 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %48, double %64)
%66 = fadd double %48, 1.000000e-01
%67 = fcmp ugt double %66, %17
br i1 %67, label %68, label %47
68: ; preds = %63, %42
%69 = tail call i32 @exit(i32 0)
unreachable
}