#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 */
scalar_t__ exp_close();
int exp_open();
int /*<<< orphan*/ print_help();
int print_summary();
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ putchar(char);
int read_board_temp();
int read_board_version();
int read_humidity();
double read_pressure();
double read_sensor_temp(int);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  if (argc == 1) {
    print_help();
  } else if ((!strcmp(argv[1], "--help")) | (!strcmp(argv[1], "-h"))) {
    print_help();
  } else if ((!strcmp(argv[1], "--summary")) | (!strcmp(argv[1], "-s"))) {
    return print_summary();
  }
  int r = exp_open();
  int i;
  char *p;
  for (i = 1; i < argc; i++) {
    for (p = argv[i]; *p != '\0'; p++) {
      if (*p == '\\') {
        switch (*++p) {
        case 'n':
          putchar('\n');
          break;
        case 't':
          putchar('\t');
          break;
        default:
          putchar('\\');
          putchar(*p);
          break;
        }
      } else if (*p == '%') {
        switch (*++p) {
        case 'v':
          printf("%d", read_board_version());
          break;
        case 'h':
          printf("%d", read_humidity());
          break;
        case 'p':
          printf("%.1f", read_pressure());
          break;
        case 'b':
          printf("%d", read_board_temp());
          break;
        case 'r':
          printf("%.1f", read_sensor_temp(1));
          break;
        case 'o':
          printf("%.1f", read_sensor_temp(2));
          break;
        default:
          putchar('%');
          putchar(*p);
          break;
        }
      } else {
        putchar(*p);
      }
    }
    if (i < (argc - 1)) {
      putchar(' ');
    }
  }
  r += exp_close();
  return r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11ec <main+0x2c>
mov    $0x0,%al
call   10b0 <print_help@plt>
jmp    12bf <main+0xff>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe59(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe3c(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     124f <main+0x8f>
mov    $0x0,%al
call   10b0 <print_help@plt>
jmp    12ba <main+0xfa>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe00(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xde6(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     12b5 <main+0xf5>
mov    $0x0,%al
call   10a0 <print_summary@plt>
mov    %eax,-0x4(%rbp)
jmp    14ef <main+0x32f>
jmp    12ba <main+0xfa>
jmp    12bf <main+0xff>
mov    $0x0,%al
call   1040 <exp_open@plt>
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14d5 <main+0x315>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     14a7 <main+0x2e7>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    137a <main+0x1ba>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl 0x1(%rax),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x6e,%eax
je     1341 <main+0x181>
jmp    1330 <main+0x170>
mov    -0x2c(%rbp),%eax
sub    $0x74,%eax
je     1350 <main+0x190>
jmp    135f <main+0x19f>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1375 <main+0x1b5>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    1375 <main+0x1b5>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    1491 <main+0x2d1>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    1480 <main+0x2c0>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl 0x1(%rax),%eax
add    $0xffffff9e,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x14,%eax
ja     1465 <main+0x2a5>
mov    -0x38(%rbp),%rax
lea    0xc46(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1070 <read_board_version@plt>
cvtsi2sd %eax,%xmm0
lea    0xc96(%rip),%rdi
call   1080 <printf@plt>
jmp    147b <main+0x2bb>
mov    $0x0,%al
call   10d0 <read_humidity@plt>
cvtsi2sd %eax,%xmm0
lea    0xc7a(%rip),%rdi
call   1080 <printf@plt>
jmp    147b <main+0x2bb>
mov    $0x0,%al
call   10c0 <read_pressure@plt>
lea    0xc65(%rip),%rdi
call   1080 <printf@plt>
jmp    147b <main+0x2bb>
mov    $0x0,%al
call   10e0 <read_board_temp@plt>
cvtsi2sd %eax,%xmm0
lea    0xc46(%rip),%rdi
call   1080 <printf@plt>
jmp    147b <main+0x2bb>
mov    $0x1,%edi
call   1050 <read_sensor_temp@plt>
lea    0xc2e(%rip),%rdi
call   1080 <printf@plt>
jmp    147b <main+0x2bb>
mov    $0x2,%edi
call   1050 <read_sensor_temp@plt>
lea    0xc13(%rip),%rdi
call   1080 <printf@plt>
jmp    147b <main+0x2bb>
mov    $0x25,%edi
call   1030 <putchar@plt>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    148c <main+0x2cc>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    1491 <main+0x2d1>
jmp    1496 <main+0x2d6>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    12ec <main+0x12c>
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14c2 <main+0x302>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    14c7 <main+0x307>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12d0 <main+0x110>
mov    $0x0,%al
call   1060 <exp_close@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
cmp    $0x1,%edi
jne    11e8 <main+0x28>
xor    %eax,%eax
call   10b0 <print_help@plt>
xor    %eax,%eax
call   1040 <exp_open@plt>
mov    %eax,%ebx
jmp    13ce <main+0x20e>
mov    %rsi,%rbp
mov    %edi,%r12d
mov    0x8(%rsi),%rbx
lea    0xe5b(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
mov    %eax,%r14d
lea    0xe50(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %r14d,%r14d
je     125b <main+0x9b>
test   %eax,%eax
je     125b <main+0x9b>
lea    0xe3b(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
mov    %eax,%r14d
lea    0xe33(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %r14d,%r14d
je     1246 <main+0x86>
test   %eax,%eax
jne    1262 <main+0xa2>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10a0 <print_summary@plt>
xor    %eax,%eax
call   10b0 <print_help@plt>
xor    %eax,%eax
call   1040 <exp_open@plt>
mov    %eax,%ebx
cmp    $0x2,%r12d
jl     13ce <main+0x20e>
mov    %ebx,0xc(%rsp)
lea    -0x1(%r12),%eax
mov    %rax,0x18(%rsp)
mov    %r12d,%eax
mov    %rax,0x10(%rsp)
mov    $0x1,%r14d
lea    0xd68(%rip),%r15
lea    0xdcc(%rip),%r12
lea    0xdc8(%rip),%rbx
mov    %rbp,0x20(%rsp)
jmp    12c4 <main+0x104>
nopl   (%rax)
add    $0x1,%r14
cmp    0x10(%rsp),%r14
mov    0x20(%rsp),%rbp
je     13ca <main+0x20a>
mov    0x0(%rbp,%r14,8),%r13
jmp    12d9 <main+0x119>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13
movzbl 0x0(%r13),%eax
cmp    $0x25,%al
je     1300 <main+0x140>
cmp    $0x5c,%al
je     1330 <main+0x170>
test   %al,%al
je     13b0 <main+0x1f0>
movsbl %al,%edi
jmp    12d0 <main+0x110>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl 0x1(%r13),%eax
add    $0x1,%r13
add    $0xffffff9e,%eax
cmp    $0x14,%eax
ja     1354 <main+0x194>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
xor    %eax,%eax
call   10e0 <read_board_temp@plt>
jmp    1397 <main+0x1d7>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl 0x1(%r13),%eax
add    $0x1,%r13
cmp    $0x74,%eax
je     134a <main+0x18a>
cmp    $0x6e,%eax
je     12cb <main+0x10b>
mov    $0x5c,%edi
jmp    1359 <main+0x199>
mov    $0x9,%edi
jmp    12d0 <main+0x110>
mov    $0x25,%edi
call   1030 <putchar@plt>
movsbl 0x0(%r13),%edi
jmp    12d0 <main+0x110>
xor    %eax,%eax
call   10d0 <read_humidity@plt>
jmp    1397 <main+0x1d7>
mov    $0x2,%edi
jmp    1386 <main+0x1c6>
xor    %eax,%eax
call   10c0 <read_pressure@plt>
jmp    138b <main+0x1cb>
mov    $0x1,%edi
call   1050 <read_sensor_temp@plt>
mov    %rbx,%rdi
jmp    13a1 <main+0x1e1>
xor    %eax,%eax
call   1070 <read_board_version@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    %r12,%rdi
call   1080 <printf@plt>
add    $0x1,%r13
jmp    12d9 <main+0x119>
nop
cmp    0x18(%rsp),%r14
jae    12b0 <main+0xf0>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    12b0 <main+0xf0>
mov    0xc(%rsp),%ebx
xor    %eax,%eax
call   1060 <exp_close@plt>
add    %ebx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"--help\00"
@.str.1 = [3 x i8] c"-h\00"
@.str.2 = [10 x i8] c"--summary\00"
@.str.3 = [3 x i8] c"-s\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [5 x i8] c"%.1f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (...) @print_help()
br label %53
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 @strcmp(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp ne i32 %24, 0
%26 = xor i1 %25, true
%27 = zext i1 %26 to i32
%28 = or i32 %20, %27
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %13
%31 = call i32 (...) @print_help()
br label %52
32: ; preds = %13
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i32 @strcmp(i8* %35, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%37 = icmp ne i32 %36, 0
%38 = xor i1 %37, true
%39 = zext i1 %38 to i32
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 1
%42 = load i8*, i8** %41
%43 = call i32 @strcmp(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%44 = icmp ne i32 %43, 0
%45 = xor i1 %44, true
%46 = zext i1 %45 to i32
%47 = or i32 %39, %46
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %32
%50 = call i32 (...) @print_summary()
store i32 %50, i32* %3
br label %154
51: ; preds = %32
br label %52
52: ; preds = %51, %30
br label %53
53: ; preds = %52, %11
%54 = call i32 (...) @exp_open()
store i32 %54, i32* %6
store i32 1, i32* %7
br label %55
55: ; preds = %144, %53
%56 = load i32, i32* %7
%57 = load i32, i32* %4
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %147
59: ; preds = %55
%60 = load i8**, i8*** %5
%61 = load i32, i32* %7
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8*, i8** %60, i64 %62
%64 = load i8*, i8** %63
store i8* %64, i8** %8
br label %65
65: ; preds = %133, %59
%66 = load i8*, i8** %8
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = icmp ne i32 %68, 0
br i1 %69, label %70, label %136
70: ; preds = %65
%71 = load i8*, i8** %8
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp eq i32 %73, 92
br i1 %74, label %75, label %90
75: ; preds = %70
%76 = load i8*, i8** %8
%77 = getelementptr inbounds i8, i8* %76, i32 1
store i8* %77, i8** %8
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
switch i32 %79, label %84 [
i32 110, label %80
i32 116, label %82
]
80: ; preds = %75
%81 = call i32 @putchar(i8 signext 10)
br label %89
82: ; preds = %75
%83 = call i32 @putchar(i8 signext 9)
br label %89
84: ; preds = %75
%85 = call i32 @putchar(i8 signext 92)
%86 = load i8*, i8** %8
%87 = load i8, i8* %86
%88 = call i32 @putchar(i8 signext %87)
br label %89
89: ; preds = %84, %82, %80
br label %132
90: ; preds = %70
%91 = load i8*, i8** %8
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = icmp eq i32 %93, 37
br i1 %94, label %95, label %127
95: ; preds = %90
%96 = load i8*, i8** %8
%97 = getelementptr inbounds i8, i8* %96, i32 1
store i8* %97, i8** %8
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
switch i32 %99, label %121 [
i32 118, label %100
i32 104, label %104
i32 112, label %108
i32 98, label %111
i32 114, label %115
i32 111, label %118
]
100: ; preds = %95
%101 = call i32 (...) @read_board_version()
%102 = sitofp i32 %101 to double
%103 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), double %102)
br label %126
104: ; preds = %95
%105 = call i32 (...) @read_humidity()
%106 = sitofp i32 %105 to double
%107 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), double %106)
br label %126
108: ; preds = %95
%109 = call double (...) @read_pressure()
%110 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), double %109)
br label %126
111: ; preds = %95
%112 = call i32 (...) @read_board_temp()
%113 = sitofp i32 %112 to double
%114 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), double %113)
br label %126
115: ; preds = %95
%116 = call double @read_sensor_temp(i32 1)
%117 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), double %116)
br label %126
118: ; preds = %95
%119 = call double @read_sensor_temp(i32 2)
%120 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), double %119)
br label %126
121: ; preds = %95
%122 = call i32 @putchar(i8 signext 37)
%123 = load i8*, i8** %8
%124 = load i8, i8* %123
%125 = call i32 @putchar(i8 signext %124)
br label %126
126: ; preds = %121, %118, %115, %111, %108, %104, %100
br label %131
127: ; preds = %90
%128 = load i8*, i8** %8
%129 = load i8, i8* %128
%130 = call i32 @putchar(i8 signext %129)
br label %131
131: ; preds = %127, %126
br label %132
132: ; preds = %131, %89
br label %133
133: ; preds = %132
%134 = load i8*, i8** %8
%135 = getelementptr inbounds i8, i8* %134, i32 1
store i8* %135, i8** %8
br label %65
136: ; preds = %65
%137 = load i32, i32* %7
%138 = load i32, i32* %4
%139 = sub nsw i32 %138, 1
%140 = icmp slt i32 %137, %139
br i1 %140, label %141, label %143
141: ; preds = %136
%142 = call i32 @putchar(i8 signext 32)
br label %143
143: ; preds = %141, %136
br label %144
144: ; preds = %143
%145 = load i32, i32* %7
%146 = add nsw i32 %145, 1
store i32 %146, i32* %7
br label %55
147: ; preds = %55
%148 = call i64 (...) @exp_close()
%149 = load i32, i32* %6
%150 = sext i32 %149 to i64
%151 = add nsw i64 %150, %148
%152 = trunc i64 %151 to i32
store i32 %152, i32* %6
%153 = load i32, i32* %6
store i32 %153, i32* %3
br label %154
154: ; preds = %147, %49
%155 = load i32, i32* %3
ret i32 %155
}

LLVM IR (-O2):
@.str = [7 x i8] c"--help\00"
@.str.1 = [3 x i8] c"-h\00"
@.str.2 = [10 x i8] c"--summary\00"
@.str.3 = [3 x i8] c"-s\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [5 x i8] c"%.1f\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 (...) @print_help()
%6 = tail call i32 (...) @exp_open()
br label %92
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
%14 = or i1 %11, %13
br i1 %14, label %15, label %17
15: ; preds = %7
%16 = tail call i32 (...) @print_help()
br label %25
17: ; preds = %7
%18 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
%22 = or i1 %19, %21
br i1 %22, label %23, label %25
23: ; preds = %17
%24 = tail call i32 (...) @print_summary()
br label %97
25: ; preds = %15, %17
%26 = tail call i32 (...) @exp_open()
%27 = icmp sgt i32 %0, 1
br i1 %27, label %28, label %92
28: ; preds = %25
%29 = add nsw i32 %0, -1
%30 = zext i32 %29 to i64
%31 = zext i32 %0 to i64
br label %32
32: ; preds = %28, %89
%33 = phi i64 [ 1, %28 ], [ %90, %89 ]
%34 = getelementptr inbounds i8*, i8** %1, i64 %33
%35 = load i8*, i8** %34
br label %36
36: ; preds = %82, %32
%37 = phi i8* [ %35, %32 ], [ %84, %82 ]
%38 = load i8, i8* %37
switch i8 %38, label %80 [
i8 0, label %85
i8 92, label %39
i8 37, label %51
]
39: ; preds = %36
%40 = getelementptr inbounds i8, i8* %37, i64 1
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
switch i32 %42, label %47 [
i32 110, label %43
i32 116, label %45
]
43: ; preds = %39
%44 = tail call i32 @putchar(i8 signext 10)
br label %82
45: ; preds = %39
%46 = tail call i32 @putchar(i8 signext 9)
br label %82
47: ; preds = %39
%48 = tail call i32 @putchar(i8 signext 92)
%49 = load i8, i8* %40
%50 = tail call i32 @putchar(i8 signext %49)
br label %82
51: ; preds = %36
%52 = getelementptr inbounds i8, i8* %37, i64 1
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
switch i32 %54, label %76 [
i32 118, label %55
i32 104, label %59
i32 112, label %63
i32 98, label %66
i32 114, label %70
i32 111, label %73
]
55: ; preds = %51
%56 = tail call i32 (...) @read_board_version()
%57 = sitofp i32 %56 to double
%58 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), double %57)
br label %82
59: ; preds = %51
%60 = tail call i32 (...) @read_humidity()
%61 = sitofp i32 %60 to double
%62 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), double %61)
br label %82
63: ; preds = %51
%64 = tail call double (...) @read_pressure()
%65 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), double %64)
br label %82
66: ; preds = %51
%67 = tail call i32 (...) @read_board_temp()
%68 = sitofp i32 %67 to double
%69 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), double %68)
br label %82
70: ; preds = %51
%71 = tail call double @read_sensor_temp(i32 1)
%72 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), double %71)
br label %82
73: ; preds = %51
%74 = tail call double @read_sensor_temp(i32 2)
%75 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), double %74)
br label %82
76: ; preds = %51
%77 = tail call i32 @putchar(i8 signext 37)
%78 = load i8, i8* %52
%79 = tail call i32 @putchar(i8 signext %78)
br label %82
80: ; preds = %36
%81 = tail call i32 @putchar(i8 signext %38)
br label %82
82: ; preds = %47, %45, %43, %55, %59, %63, %66, %70, %73, %76, %80
%83 = phi i8* [ %40, %47 ], [ %40, %45 ], [ %40, %43 ], [ %52, %76 ], [ %52, %73 ], [ %52, %70 ], [ %52, %66 ], [ %52, %63 ], [ %52, %59 ], [ %52, %55 ], [ %37, %80 ]
%84 = getelementptr inbounds i8, i8* %83, i64 1
br label %36
85: ; preds = %36
%86 = icmp ult i64 %33, %30
br i1 %86, label %87, label %89
87: ; preds = %85
%88 = tail call i32 @putchar(i8 signext 32)
br label %89
89: ; preds = %85, %87
%90 = add nuw nsw i64 %33, 1
%91 = icmp eq i64 %90, %31
br i1 %91, label %92, label %32
92: ; preds = %89, %4, %25
%93 = phi i32 [ %6, %4 ], [ %26, %25 ], [ %26, %89 ]
%94 = tail call i64 (...) @exp_close()
%95 = trunc i64 %94 to i32
%96 = add i32 %93, %95
br label %97
97: ; preds = %92, %23
%98 = phi i32 [ %96, %92 ], [ %24, %23 ]
ret i32 %98
}