#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*/ time_t;
struct dirent {
  scalar_t__ d_type;
  char *d_name;
};
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
scalar_t__ DT_LNK;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ *opendir(char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read(int, char *, int);
struct dirent *readdir(int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strncpy(char *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ *strstr(char *, char *);
float strtof(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ strtok(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  DIR *dir;
  struct dirent *dirent;
  char dev[16];
  char devPath[128];
  char buf[256];
  char tmpData[6];
  char path[] = "/sys/bus/w1/devices";
  ssize_t numRead;
  time_t timer;
  char *ctime(const time_t *timer);
  char *current;
  dir = opendir(path);
  if (dir != NULL) {
    while (dirent = readdir(dir)) {
      if (dirent->d_type == DT_LNK && strstr(dirent->d_name, "28-") != NULL) {
        strcpy(dev, dirent->d_name);
        printf("Device: %s\n", dev);
      }
    }
    (void)closedir(dir);
  } else {
    perror("Couldn't open the w1 devices directory");
    return 1;
  }
  sprintf(devPath, "%s/%s/w1_slave", path, dev);
  while (1) {
    int fd = open(devPath, O_RDONLY);
    if (fd == -1) {
      perror("Couldn't open the w1 device.");
      return 1;
    }
    while ((numRead = read(fd, buf, 256)) > 0) {
      strncpy(tmpData, strstr(buf, "t=") + 2, 5);
      float tempC = strtof(tmpData, NULL);
      timer = time(NULL);
      current = ctime(&timer);
      strtok(current, "\n\0");
      printf("[Time: %s] ", current);
      printf("Device: %s - ", dev);
      printf("Temp: %.3f C  ", tempC / 1000);
      printf("%.3f F\n", (tempC / 1000) * 9 / 5 + 32);
    }
    close(fd);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xdf7(%rip),%rax
mov    %rax,-0x1d0(%rbp)
mov    0xdf1(%rip),%rax
mov    %rax,-0x1c8(%rbp)
mov    0xdec(%rip),%eax
mov    %eax,-0x1c0(%rbp)
lea    -0x1d0(%rbp),%rdi
call   1050 <opendir@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     12dc <main+0xdc>
jmp    125a <main+0x5a>
mov    -0x10(%rbp),%rdi
call   10d0 <readdir@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     12ce <main+0xce>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2d59(%rip),%rcx
cmp    (%rcx),%rax
jne    12c9 <main+0xc9>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd8d(%rip),%rsi
call   1120 <strstr@plt>
cmp    $0x0,%rax
je     12c9 <main+0xc9>
lea    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rsi
call   1040 <strcpy@plt>
lea    -0x30(%rbp),%rsi
lea    0xd66(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    125a <main+0x5a>
mov    -0x10(%rbp),%rdi
call   10a0 <closedir@plt>
jmp    12f4 <main+0xf4>
lea    0xd51(%rip),%rdi
call   10f0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    14af <main+0x2af>
lea    -0xb0(%rbp),%rdi
lea    -0x1d0(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    0xd4e(%rip),%rsi
call   1110 <sprintf@plt>
lea    -0xb0(%rbp),%rdi
mov    0x2cc8(%rip),%rax
mov    (%rax),%esi
call   10e0 <open@plt>
mov    %eax,-0x1e4(%rbp)
cmpl   $0xffffffff,-0x1e4(%rbp)
jne    1352 <main+0x152>
lea    0xd29(%rip),%rdi
call   10f0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    14af <main+0x2af>
jmp    1357 <main+0x157>
mov    -0x1e4(%rbp),%edi
lea    -0x1b0(%rbp),%rsi
mov    $0x100,%edx
call   10b0 <read@plt>
mov    %eax,-0x1d4(%rbp)
cmp    $0x0,%eax
jle    149f <main+0x29f>
lea    -0x1b6(%rbp),%rax
mov    %rax,-0x1f0(%rbp)
lea    -0x1b0(%rbp),%rdi
lea    0xcee(%rip),%rsi
call   1120 <strstr@plt>
mov    -0x1f0(%rbp),%rdi
mov    %rax,%rsi
add    $0x8,%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
lea    -0x1b6(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1080 <strtof@plt>
movss  %xmm0,-0x1e8(%rbp)
ff
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x1d8(%rbp)
lea    -0x1d8(%rbp),%rdi
call   1060 <ctime@plt>
mov    %rax,-0x1e0(%rbp)
mov    -0x1e0(%rbp),%rdi
lea    0xcbd(%rip),%rsi
call   1100 <strtok@plt>
mov    -0x1e0(%rbp),%rsi
lea    0xc79(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xc73(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movss  -0x1e8(%rbp),%xmm0
ff
movss  0xbd2(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc5b(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movss  -0x1e8(%rbp),%xmm0
ff
movss  0xbac(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xb9c(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xb8c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xb7c(%rip),%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc20(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
jmp    1357 <main+0x157>
mov    -0x1e4(%rbp),%edi
call   1090 <close@plt>
jmp    1312 <main+0x112>
mov    -0x4(%rbp),%eax
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1d8,%rsp
movaps 0xdf8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x736563,0x20(%rsp)
lea    0x10(%rsp),%rdi
call   1050 <opendir@plt>
test   %rax,%rax
jne    123d <main+0x3d>
lea    0xdf9(%rip),%rdi
jmp    1294 <main+0x94>
mov    %rax,%rbx
mov    %rax,%rdi
call   10d0 <readdir@plt>
test   %rax,%rax
jne    12b0 <main+0xb0>
mov    %rbx,%rdi
call   10a0 <closedir@plt>
lea    0xdff(%rip),%rsi
lea    0x50(%rsp),%rbx
lea    0x10(%rsp),%rdx
lea    0x30(%rsp),%rcx
mov    %rbx,%rdi
call   1110 <sprintf@plt>
mov    0x2d6e(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10e0 <open@plt>
cmp    $0xffffffff,%eax
jne    1318 <main+0x118>
lea    0xdd6(%rip),%rdi
call   10f0 <perror@plt>
mov    $0x1,%eax
add    $0x1d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2d21(%rip),%r13
lea    0xd66(%rip),%r14
lea    0x30(%rsp),%r12
lea    0xd5e(%rip),%r15
jmp    12e1 <main+0xe1>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   10d0 <readdir@plt>
test   %rax,%rax
je     124d <main+0x4d>
mov    (%rax),%rcx
cmp    0x0(%r13),%rcx
jne    12d0 <main+0xd0>
mov    0x8(%rax),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
call   1120 <strstr@plt>
test   %rax,%rax
je     12d0 <main+0xd0>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    12d0 <main+0xd0>
mov    %eax,%r12d
lea    0xd0(%rsp),%r14
lea    0xd5d(%rip),%rbx
lea    0x4a(%rsp),%r15
lea    0xc(%rsp),%rbp
lea    0xd5b(%rip),%r13
jmp    1367 <main+0x167>
nopl   (%rax)
mov    %r12d,%edi
call   1090 <close@plt>
mov    0x2c99(%rip),%rax
mov    (%rax),%esi
lea    0x50(%rsp),%rdi
call   10e0 <open@plt>
mov    %eax,%r12d
cmp    $0xffffffff,%eax
je     128d <main+0x8d>
mov    %r12d,%edi
mov    %r14,%rsi
mov    $0x100,%edx
call   10b0 <read@plt>
test   %eax,%eax
mov    %r12d,0x8(%rsp)
jle    1340 <main+0x140>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1120 <strstr@plt>
lea    0x8(%rax),%rsi
mov    %r15,%rdi
mov    $0x5,%edx
call   1030 <strncpy@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1080 <strtof@plt>
movss  %xmm0,0x4(%rsp)
xor    %edi,%edi
call   10c0 <time@plt>
mov    %eax,0xc(%rsp)
mov    %rbp,%rdi
call   1060 <ctime@plt>
mov    %r14,%r12
mov    %r15,%r14
mov    %r13,%r15
mov    %rax,%r13
mov    %rax,%rdi
lea    0xce6(%rip),%rsi
call   1100 <strtok@plt>
lea    0xca9(%rip),%rdi
mov    %r13,%rsi
mov    %r15,%r13
mov    %r14,%r15
mov    %r12,%r14
mov    0x8(%rsp),%r12d
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r13,%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
movss  0x4(%rsp),%xmm0
divss  0xbea(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xc7d(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movss  0x4(%rsp),%xmm0
mulss  0xbc8(%rip),%xmm0
divss  0xbc4(%rip),%xmm0
addss  0xbc0(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc5c(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    %r12d,%edi
mov    %r14,%rsi
mov    $0x100,%edx
call   10b0 <read@plt>
test   %eax,%eax
jg     1380 <main+0x180>
jmp    1340 <main+0x140>

LLVM IR (-O0):
%struct.dirent = type { i64, i8* }
@__const.main.path = [20 x i8] c"/sys/bus/w1/devices\00"
@DT_LNK = global i64 0
@.str = [4 x i8] c"28-\00"
@.str.1 = [12 x i8] c"Device: %s\0A\00"
@.str.2 = [39 x i8] c"Couldn't open the w1 devices directory\00"
@.str.3 = [15 x i8] c"%s/%s/w1_slave\00"
@O_RDONLY = global i32 0
@.str.4 = [29 x i8] c"Couldn't open the w1 device.\00"
@.str.5 = [3 x i8] c"t=\00"
@.str.6 = [3 x i8] c"\0A\00\00"
@.str.7 = [12 x i8] c"[Time: %s] \00"
@.str.8 = [14 x i8] c"Device: %s - \00"
@.str.9 = [15 x i8] c"Temp: %.3f C \00"
@.str.10 = [8 x i8] c"%.3f F\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca %struct.dirent*
%4 = alloca [16 x i8]
%5 = alloca [128 x i8]
%6 = alloca [256 x i8]
%7 = alloca [6 x i8]
%8 = alloca [20 x i8]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca float
store i32 0, i32* %1
%14 = bitcast [20 x i8]* %8 to i8*
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %8, i64 0, i64 0
%16 = call i32* @opendir(i8* %15)
store i32* %16, i32** %2
%17 = load i32*, i32** %2
%18 = icmp ne i32* %17, null
br i1 %18, label %19, label %48
19: ; preds = %0
br label %20
20: ; preds = %44, %19
%21 = load i32*, i32** %2
%22 = call %struct.dirent* @readdir(i32* %21)
store %struct.dirent* %22, %struct.dirent** %3
%23 = icmp ne %struct.dirent* %22, null
br i1 %23, label %24, label %45
24: ; preds = %20
%25 = load %struct.dirent*, %struct.dirent** %3
%26 = getelementptr inbounds %struct.dirent, %struct.dirent* %25, i32 0, i32 0
%27 = load i64, i64* %26
%28 = load i64, i64* @DT_LNK
%29 = icmp eq i64 %27, %28
br i1 %29, label %30, label %44
30: ; preds = %24
%31 = load %struct.dirent*, %struct.dirent** %3
%32 = getelementptr inbounds %struct.dirent, %struct.dirent* %31, i32 0, i32 1
%33 = load i8*, i8** %32
%34 = call i32* @strstr(i8* %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%35 = icmp ne i32* %34, null
br i1 %35, label %36, label %44
36: ; preds = %30
%37 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%38 = load %struct.dirent*, %struct.dirent** %3
%39 = getelementptr inbounds %struct.dirent, %struct.dirent* %38, i32 0, i32 1
%40 = load i8*, i8** %39
%41 = call i32 @strcpy(i8* %37, i8* %40)
%42 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %42)
br label %44
44: ; preds = %36, %30, %24
br label %20
45: ; preds = %20
%46 = load i32*, i32** %2
%47 = call i32 @closedir(i32* %46)
br label %50
48: ; preds = %0
%49 = call i32 @perror(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %1
br label %99
50: ; preds = %45
%51 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%52 = getelementptr inbounds [20 x i8], [20 x i8]* %8, i64 0, i64 0
%53 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%54 = call i32 @sprintf(i8* %51, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %52, i8* %53)
br label %55
55: ; preds = %50, %96
%56 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%57 = load i32, i32* @O_RDONLY
%58 = call i32 @open(i8* %56, i32 %57)
store i32 %58, i32* %12
%59 = load i32, i32* %12
%60 = icmp eq i32 %59, -1
br i1 %60, label %61, label %63
61: ; preds = %55
%62 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %1
br label %99
63: ; preds = %55
br label %64
64: ; preds = %69, %63
%65 = load i32, i32* %12
%66 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%67 = call i32 @read(i32 %65, i8* %66, i32 256)
store i32 %67, i32* %9
%68 = icmp sgt i32 %67, 0
br i1 %68, label %69, label %96
69: ; preds = %64
%70 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%71 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%72 = call i32* @strstr(i8* %71, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%73 = getelementptr inbounds i32, i32* %72, i64 2
%74 = call i32 @strncpy(i8* %70, i32* %73, i32 5)
%75 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%76 = call float @strtof(i8* %75, i32* null)
store float %76, float* %13
%77 = call i32 @time(i32* null)
store i32 %77, i32* %10
%78 = call i8* @ctime(i32* %10)
store i8* %78, i8** %11
%79 = load i8*, i8** %11
%80 = call i32 @strtok(i8* %79, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%81 = load i8*, i8** %11
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %81)
%83 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %83)
%85 = load float, float* %13
%86 = fdiv float %85, 1.000000e+03
%87 = fpext float %86 to double
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), double %87)
%89 = load float, float* %13
%90 = fdiv float %89, 1.000000e+03
%91 = fmul float %90, 9.000000e+00
%92 = fdiv float %91, 5.000000e+00
%93 = fadd float %92, 3.200000e+01
%94 = fpext float %93 to double
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), double %94)
br label %64
96: ; preds = %64
%97 = load i32, i32* %12
%98 = call i32 @close(i32 %97)
br label %55
99: ; preds = %61, %48
%100 = load i32, i32* %1
ret i32 %100
}

LLVM IR (-O2):
%struct.dirent = type { i64, i8* }
@__const.main.path = [20 x i8] c"/sys/bus/w1/devices\00"
@DT_LNK = global i64 0
@.str = [4 x i8] c"28-\00"
@.str.1 = [12 x i8] c"Device: %s\0A\00"
@.str.2 = [39 x i8] c"Couldn't open the w1 devices directory\00"
@.str.3 = [15 x i8] c"%s/%s/w1_slave\00"
@O_RDONLY = global i32 0
@.str.4 = [29 x i8] c"Couldn't open the w1 device.\00"
@.str.5 = [3 x i8] c"t=\00"
@.str.6 = [3 x i8] c"\0A\00\00"
@.str.7 = [12 x i8] c"[Time: %s] \00"
@.str.8 = [14 x i8] c"Device: %s - \00"
@.str.9 = [15 x i8] c"Temp: %.3f C \00"
@.str.10 = [8 x i8] c"%.3f F\0A\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = alloca [128 x i8]
%3 = alloca [256 x i8]
%4 = alloca [6 x i8]
%5 = alloca [20 x i8]
%6 = alloca i32
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%12 = bitcast i32* %6 to i8*
%13 = call i32* @opendir(i8* %11)
%14 = icmp eq i32* %13, null
br i1 %14, label %41, label %15
15: ; preds = %0
%16 = call %struct.dirent* @readdir(i32* %13)
%17 = icmp eq %struct.dirent* %16, null
br i1 %17, label %35, label %18
18: ; preds = %15, %32
%19 = phi %struct.dirent* [ %33, %32 ], [ %16, %15 ]
%20 = getelementptr inbounds %struct.dirent, %struct.dirent* %19, i64 0, i32 0
%21 = load i64, i64* %20
%22 = load i64, i64* @DT_LNK
%23 = icmp eq i64 %21, %22
br i1 %23, label %24, label %32
24: ; preds = %18
%25 = getelementptr inbounds %struct.dirent, %struct.dirent* %19, i64 0, i32 1
%26 = load i8*, i8** %25
%27 = call i32* @strstr(i8* dereferenceable(1) %26, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%28 = icmp eq i32* %27, null
br i1 %28, label %32, label %29
29: ; preds = %24
%30 = call i32 @strcpy(i8* %7, i8* %26)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %32
32: ; preds = %29, %24, %18
%33 = call %struct.dirent* @readdir(i32* %13)
%34 = icmp eq %struct.dirent* %33, null
br i1 %34, label %35, label %18
35: ; preds = %32, %15
%36 = call i32 @closedir(i32* %13)
%37 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %11, i8* %7)
%38 = load i32, i32* @O_RDONLY
%39 = call i32 @open(i8* %8, i32 %38)
%40 = icmp eq i32 %39, -1
br i1 %40, label %47, label %43
41: ; preds = %0
%42 = tail call i32 @perror(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
br label %74
43: ; preds = %35, %69
%44 = phi i32 [ %72, %69 ], [ %39, %35 ]
%45 = call i32 @read(i32 %44, i8* %9, i32 256)
%46 = icmp sgt i32 %45, 0
br i1 %46, label %49, label %69
47: ; preds = %69, %35
%48 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %74
49: ; preds = %43, %49
%50 = call i32* @strstr(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%51 = getelementptr inbounds i32, i32* %50, i64 2
%52 = call i32 @strncpy(i8* %10, i32* %51, i32 5)
%53 = call float @strtof(i8* nocapture %10, i32* null)
%54 = call i32 @time(i32* null)
store i32 %54, i32* %6
%55 = call i8* @ctime(i32* %6)
%56 = call i32 @strtok(i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %55)
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %7)
%59 = fdiv float %53, 1.000000e+03
%60 = fpext float %59 to double
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), double %60)
%62 = fmul float %59, 9.000000e+00
%63 = fdiv float %62, 5.000000e+00
%64 = fadd float %63, 3.200000e+01
%65 = fpext float %64 to double
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), double %65)
%67 = call i32 @read(i32 %44, i8* %9, i32 256)
%68 = icmp sgt i32 %67, 0
br i1 %68, label %49, label %69
69: ; preds = %49, %43
%70 = call i32 @close(i32 %44)
%71 = load i32, i32* @O_RDONLY
%72 = call i32 @open(i8* %8, i32 %71)
%73 = icmp eq i32 %72, -1
br i1 %73, label %47, label %43
74: ; preds = %47, %41
ret i32 1
}