#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 */
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 ow_temp(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;
  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("\nDevice: %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);
      printf("Device: %s  - ", dev);
      printf("Temp: %.3f C  ", tempC / 1000);
      printf("%.3f F\n\n", (tempC / 1000) * 9 / 5 + 32);
    }
    close(fd);
  }
}


x86 assembly (clang, -O0):
<ow_temp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
mov    0xe2e(%rip),%rax
mov    %rax,-0x1d0(%rbp)
mov    0xe28(%rip),%rax
mov    %rax,-0x1c8(%rbp)
mov    0xe23(%rip),%eax
mov    %eax,-0x1c0(%rbp)
lea    -0x1d0(%rbp),%rdi
call   1050 <opendir@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     12a5 <ow_temp+0xd5>
jmp    1223 <ow_temp+0x53>
mov    -0x10(%rbp),%rdi
call   10b0 <readdir@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1297 <ow_temp+0xc7>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2d90(%rip),%rcx
cmp    (%rcx),%rax
jne    1292 <ow_temp+0xc2>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdc4(%rip),%rsi
call   10f0 <strstr@plt>
cmp    $0x0,%rax
je     1292 <ow_temp+0xc2>
lea    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rsi
call   1040 <strcpy@plt>
lea    -0x30(%rbp),%rsi
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1223 <ow_temp+0x53>
mov    -0x10(%rbp),%rdi
call   1090 <closedir@plt>
jmp    12bd <ow_temp+0xed>
lea    0xd89(%rip),%rdi
call   10d0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    142e <ow_temp+0x25e>
lea    -0xb0(%rbp),%rdi
lea    -0x1d0(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    0xd86(%rip),%rsi
call   10e0 <sprintf@plt>
lea    -0xb0(%rbp),%rdi
mov    0x2cff(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
mov    %eax,-0x1d8(%rbp)
cmpl   $0xffffffff,-0x1d8(%rbp)
jne    131b <ow_temp+0x14b>
lea    0xd61(%rip),%rdi
call   10d0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    142e <ow_temp+0x25e>
jmp    1320 <ow_temp+0x150>
mov    -0x1d8(%rbp),%edi
lea    -0x1b0(%rbp),%rsi
mov    $0x100,%edx
call   10a0 <read@plt>
mov    %eax,-0x1d4(%rbp)
cmp    $0x0,%eax
jle    141e <ow_temp+0x24e>
lea    -0x1b6(%rbp),%rax
mov    %rax,-0x1e8(%rbp)
lea    -0x1b0(%rbp),%rdi
lea    0xd26(%rip),%rsi
call   10f0 <strstr@plt>
mov    -0x1e8(%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   1070 <strtof@plt>
movss  %xmm0,-0x1dc(%rbp)
ff
lea    -0x30(%rbp),%rsi
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movss  -0x1dc(%rbp),%xmm0
ff
movss  0xc53(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcd2(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  -0x1dc(%rbp),%xmm0
ff
movss  0xc2d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xc1d(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xc0d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xbfd(%rip),%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc97(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    1320 <ow_temp+0x150>
mov    -0x1d8(%rbp),%edi
call   1080 <close@plt>
jmp    12db <ow_temp+0x10b>
mov    -0x4(%rbp),%eax
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ow_temp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1d8,%rsp
movaps 0xe28(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x736563,0x20(%rsp)
lea    0x10(%rsp),%rdi
call   1050 <opendir@plt>
test   %rax,%rax
jne    120d <ow_temp+0x3d>
lea    0xe2a(%rip),%rdi
jmp    1264 <ow_temp+0x94>
mov    %rax,%rbx
mov    %rax,%rdi
call   10b0 <readdir@plt>
test   %rax,%rax
jne    1280 <ow_temp+0xb0>
mov    %rbx,%rdi
call   1090 <closedir@plt>
lea    0xe30(%rip),%rsi
lea    0x50(%rsp),%rbx
lea    0x10(%rsp),%rdx
lea    0x30(%rsp),%rcx
mov    %rbx,%rdi
call   10e0 <sprintf@plt>
mov    0x2d9e(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10c0 <open@plt>
cmp    $0xffffffff,%eax
jne    12e8 <ow_temp+0x118>
lea    0xe07(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x1,%eax
add    $0x1d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2d51(%rip),%r13
lea    0xd96(%rip),%r14
lea    0x30(%rsp),%r12
lea    0xd8e(%rip),%r15
jmp    12b1 <ow_temp+0xe1>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   10b0 <readdir@plt>
test   %rax,%rax
je     121d <ow_temp+0x4d>
mov    (%rax),%rcx
cmp    0x0(%r13),%rcx
jne    12a0 <ow_temp+0xd0>
mov    0x8(%rax),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     12a0 <ow_temp+0xd0>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    12a0 <ow_temp+0xd0>
mov    %eax,%ebp
lea    0xd0(%rsp),%rbx
lea    0x4a(%rsp),%r15
jmp    1325 <ow_temp+0x155>
nopl   0x0(%rax)
mov    %ebp,%edi
call   1080 <close@plt>
mov    0x2cda(%rip),%rax
mov    (%rax),%esi
lea    0x50(%rsp),%rdi
call   10c0 <open@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
je     125d <ow_temp+0x8d>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x100,%edx
call   10a0 <read@plt>
test   %eax,%eax
lea    0x30(%rsp),%r12
lea    0xd58(%rip),%r13
lea    0xd60(%rip),%r14
jle    1300 <ow_temp+0x130>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xd2e(%rip),%rsi
call   10f0 <strstr@plt>
lea    0x8(%rax),%rsi
mov    %r15,%rdi
mov    $0x5,%edx
call   1030 <strncpy@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1070 <strtof@plt>
movss  %xmm0,0xc(%rsp)
lea    0xd04(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
movss  0xc(%rsp),%xmm0
divss  0xc61(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  0xc(%rsp),%xmm0
mulss  0xc43(%rip),%xmm0
divss  0xc3f(%rip),%xmm0
addss  0xc3b(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x100,%edx
call   10a0 <read@plt>
test   %eax,%eax
jg     1350 <ow_temp+0x180>
jmp    1300 <ow_temp+0x130>

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

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