#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*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ F_OK;
int /*<<< orphan*/ TEMP_LOG(int, char *, int, char *, char const *);
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ assert(int);
int ds18b20_decode_temp(char *);
int /*<<< orphan*/ ds18b20_verify_crc(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char const *);
int TEMP_ds18b20_read(const char *address) {
  char path[(128)] = {0};
  char buf[(512)] = {0};
  char *p_ret;
  FILE *fp;
  int i_ret;
  assert(strlen(address) <= 16);
  strcpy(path, "/sys/bus/w1/devices/");
  strcat(path, address);
  strcat(path, "/w1_slave");
  if (access(path, F_OK) < 0) {
    TEMP_LOG((2),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/cugfeng/Home_Automation/refs/heads/"
             "master/temperature/source/ds18b20.c",
             111, "Address (%s) does not exist!\n", address);
    return -1;
  }
  fp = fopen(path, "r");
  if (fp == NULL) {
    TEMP_LOG((2),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/cugfeng/Home_Automation/refs/heads/"
             "master/temperature/source/ds18b20.c",
             117, "Open file (%s) failed!\n", path);
    return -1;
  }
  memset(buf, 0, sizeof(buf));
  p_ret = fgets(buf, sizeof(buf), fp);
  if (p_ret == NULL) {
    TEMP_LOG((2),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/cugfeng/Home_Automation/refs/heads/"
             "master/temperature/source/ds18b20.c",
             124, "Read from file (%s) failed!\n", path);
    i_ret = -1;
    goto close_exit;
  }
  if (ds18b20_verify_crc(buf) == (0)) {
    i_ret = -1;
    goto close_exit;
  }
  memset(buf, 0, sizeof(buf));
  p_ret = fgets(buf, sizeof(buf), fp);
  if (p_ret == NULL) {
    TEMP_LOG((2),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/cugfeng/Home_Automation/refs/heads/"
             "master/temperature/source/ds18b20.c",
             137, "Read from file (%s) failed!\n", path);
    i_ret = -1;
    goto close_exit;
  }
  i_ret = ds18b20_decode_temp(buf);
  if (i_ret < 0) {
    TEMP_LOG((2),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/cugfeng/Home_Automation/refs/heads/"
             "master/temperature/source/ds18b20.c",
             144, "Decode temperature from buffer (%s) failed!\n", buf);
    i_ret = -1;
    goto close_exit;
  }
close_exit:
  fclose(fp);
  return i_ret;
}


x86 assembly (clang, -O0):
<TEMP_ds18b20_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2b0,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1070 <memset@plt>
lea    -0x290(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1070 <memset@plt>
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x10,%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   10b0 <assert@plt>
lea    -0x90(%rbp),%rdi
lea    0xde4(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   10e0 <strcat@plt>
lea    -0x90(%rbp),%rdi
lea    0xdd6(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x90(%rbp),%rdi
mov    0x2d86(%rip),%rax
mov    (%rax),%esi
call   10c0 <access@plt>
cmp    $0x0,%rax
jge    1290 <TEMP_ds18b20_read+0xd0>
mov    -0x10(%rbp),%r8
mov    $0x2,%edi
lea    0xdac(%rip),%rsi
mov    $0x6f,%edx
lea    0xe41(%rip),%rcx
call   1080 <TEMP_LOG@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    145e <TEMP_ds18b20_read+0x29e>
lea    -0x90(%rbp),%rdi
lea    0xe40(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x2a0(%rbp)
cmpq   $0x0,-0x2a0(%rbp)
jne    12e8 <TEMP_ds18b20_read+0x128>
lea    -0x90(%rbp),%r8
mov    $0x2,%edi
lea    0xd54(%rip),%rsi
mov    $0x75,%edx
lea    0xe09(%rip),%rcx
call   1080 <TEMP_LOG@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    145e <TEMP_ds18b20_read+0x29e>
lea    -0x290(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1070 <memset@plt>
lea    -0x290(%rbp),%rdi
mov    -0x2a0(%rbp),%rdx
mov    $0x200,%esi
call   1090 <fgets@plt>
mov    %rax,-0x298(%rbp)
cmpq   $0x0,-0x298(%rbp)
jne    135b <TEMP_ds18b20_read+0x19b>
lea    -0x90(%rbp),%r8
mov    $0x2,%edi
lea    0xce4(%rip),%rsi
mov    $0x7c,%edx
lea    0xdb1(%rip),%rcx
call   1080 <TEMP_LOG@plt>
movl   $0xffffffff,-0x2a4(%rbp)
ff ff ff
jmp    1449 <TEMP_ds18b20_read+0x289>
lea    -0x290(%rbp),%rdi
call   1050 <ds18b20_verify_crc@plt>
cmp    $0x0,%eax
jne    137f <TEMP_ds18b20_read+0x1bf>
movl   $0xffffffff,-0x2a4(%rbp)
ff ff ff
jmp    1449 <TEMP_ds18b20_read+0x289>
lea    -0x290(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1070 <memset@plt>
lea    -0x290(%rbp),%rdi
mov    -0x2a0(%rbp),%rdx
mov    $0x200,%esi
call   1090 <fgets@plt>
mov    %rax,-0x298(%rbp)
cmpq   $0x0,-0x298(%rbp)
jne    13f2 <TEMP_ds18b20_read+0x232>
lea    -0x90(%rbp),%r8
mov    $0x2,%edi
lea    0xc4d(%rip),%rsi
mov    $0x89,%edx
lea    0xd1a(%rip),%rcx
call   1080 <TEMP_LOG@plt>
movl   $0xffffffff,-0x2a4(%rbp)
ff ff ff
jmp    1449 <TEMP_ds18b20_read+0x289>
lea    -0x290(%rbp),%rdi
call   10a0 <ds18b20_decode_temp@plt>
mov    %eax,-0x2a4(%rbp)
cmpl   $0x0,-0x2a4(%rbp)
jge    1444 <TEMP_ds18b20_read+0x284>
lea    -0x290(%rbp),%r8
mov    $0x2,%edi
lea    0xbfb(%rip),%rsi
mov    $0x90,%edx
lea    0xce5(%rip),%rcx
call   1080 <TEMP_LOG@plt>
movl   $0xffffffff,-0x2a4(%rbp)
ff ff ff
jmp    1449 <TEMP_ds18b20_read+0x289>
jmp    1449 <TEMP_ds18b20_read+0x289>
mov    -0x2a0(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x2a4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TEMP_ds18b20_read>:
push   %rbp
push   %rbx
sub    $0x288,%rsp
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0x80(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   1070 <memset@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
xor    %edi,%edi
cmp    $0x11,%eax
setl   %dil
call   10b0 <assert@plt>
lea    0xdd9(%rip),%rsi
mov    %rsp,%rbp
mov    %rbp,%rdi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10e0 <strcat@plt>
lea    0xdd1(%rip),%rsi
mov    %rbp,%rdi
call   10e0 <strcat@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%esi
mov    %rbp,%rdi
call   10c0 <access@plt>
test   %rax,%rax
js     1334 <TEMP_ds18b20_read+0x174>
lea    0xe71(%rip),%rsi
mov    %rsp,%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1351 <TEMP_ds18b20_read+0x191>
mov    %rax,%rbx
lea    0x80(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1070 <memset@plt>
mov    %rbp,%rdi
mov    $0x200,%esi
mov    %rbx,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     1378 <TEMP_ds18b20_read+0x1b8>
lea    0x80(%rsp),%rdi
call   1050 <ds18b20_verify_crc@plt>
mov    $0xffffffff,%ebp
test   %eax,%eax
je     13ba <TEMP_ds18b20_read+0x1fa>
lea    0x80(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1070 <memset@plt>
mov    %rbp,%rdi
mov    $0x200,%esi
mov    %rbx,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     1395 <TEMP_ds18b20_read+0x1d5>
lea    0x80(%rsp),%rdi
call   10a0 <ds18b20_decode_temp@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    13ba <TEMP_ds18b20_read+0x1fa>
lea    0xd06(%rip),%rsi
lea    0xdf5(%rip),%rcx
lea    0x80(%rsp),%r8
mov    $0x2,%edi
mov    $0x90,%edx
jmp    13b0 <TEMP_ds18b20_read+0x1f0>
lea    0xce4(%rip),%rsi
lea    0xd7e(%rip),%rcx
mov    $0x2,%edi
mov    $0x6f,%edx
mov    %rbx,%r8
jmp    136c <TEMP_ds18b20_read+0x1ac>
lea    0xcc7(%rip),%rsi
lea    0xd81(%rip),%rcx
mov    %rsp,%r8
mov    $0x2,%edi
mov    $0x75,%edx
call   1080 <TEMP_LOG@plt>
mov    $0xffffffff,%ebp
jmp    13c2 <TEMP_ds18b20_read+0x202>
lea    0xca0(%rip),%rsi
lea    0xd72(%rip),%rcx
mov    %rsp,%r8
mov    $0x2,%edi
mov    $0x7c,%edx
jmp    13b0 <TEMP_ds18b20_read+0x1f0>
lea    0xc83(%rip),%rsi
lea    0xd55(%rip),%rcx
mov    %rsp,%r8
mov    $0x2,%edi
mov    $0x89,%edx
call   1080 <TEMP_LOG@plt>
mov    $0xffffffff,%ebp
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    %ebp,%eax
add    $0x288,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"/sys/bus/w1/devices/\00"
@.str.1 = [10 x i8] c"/w1_slave\00"
@F_OK = global i32 0
@.str.2 = [161 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cugfeng/Home_Automation/refs/heads/master/temperature/source/ds18b20.c\00"
@.str.3 = [30 x i8] c"Address (%s) does not exist!\0A\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [24 x i8] c"Open file (%s) failed!\0A\00"
@.str.6 = [29 x i8] c"Read from file (%s) failed!\0A\00"
@.str.7 = [45 x i8] c"Decode temperature from buffer (%s) failed!\0A\00"
define i32 @TEMP_ds18b20_read(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [128 x i8]
%5 = alloca [512 x i8]
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
store i8* %0, i8** %3
%9 = bitcast [128 x i8]* %4 to i8*
%10 = bitcast [512 x i8]* %5 to i8*
%11 = load i8*, i8** %3
%12 = call i32 @strlen(i8* %11)
%13 = icmp sle i32 %12, 16
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%18 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%19 = load i8*, i8** %3
%20 = call i32 @strcat(i8* %18, i8* %19)
%21 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%22 = call i32 @strcat(i8* %21, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%23 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%24 = load i32, i32* @F_OK
%25 = call i64 @access(i8* %23, i32 %24)
%26 = icmp slt i64 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %1
%28 = load i8*, i8** %3
%29 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 111, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %28)
store i32 -1, i32* %2
br label %78
30: ; preds = %1
%31 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%32 = call i32* @fopen(i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %32, i32** %7
%33 = load i32*, i32** %7
%34 = icmp eq i32* %33, null
br i1 %34, label %35, label %38
35: ; preds = %30
%36 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%37 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 117, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %36)
store i32 -1, i32* %2
br label %78
38: ; preds = %30
%39 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%40 = call i32 @memset(i8* %39, i32 0, i32 512)
%41 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%42 = load i32*, i32** %7
%43 = call i8* @fgets(i8* %41, i32 512, i32* %42)
store i8* %43, i8** %6
%44 = load i8*, i8** %6
%45 = icmp eq i8* %44, null
br i1 %45, label %46, label %49
46: ; preds = %38
%47 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%48 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 124, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %47)
store i32 -1, i32* %8
br label %74
49: ; preds = %38
%50 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%51 = call i32 @ds18b20_verify_crc(i8* %50)
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %54
53: ; preds = %49
store i32 -1, i32* %8
br label %74
54: ; preds = %49
%55 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%56 = call i32 @memset(i8* %55, i32 0, i32 512)
%57 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%58 = load i32*, i32** %7
%59 = call i8* @fgets(i8* %57, i32 512, i32* %58)
store i8* %59, i8** %6
%60 = load i8*, i8** %6
%61 = icmp eq i8* %60, null
br i1 %61, label %62, label %65
62: ; preds = %54
%63 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%64 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 137, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %63)
store i32 -1, i32* %8
br label %74
65: ; preds = %54
%66 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%67 = call i32 @ds18b20_decode_temp(i8* %66)
store i32 %67, i32* %8
%68 = load i32, i32* %8
%69 = icmp slt i32 %68, 0
br i1 %69, label %70, label %73
70: ; preds = %65
%71 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%72 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 144, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i8* %71)
store i32 -1, i32* %8
br label %74
73: ; preds = %65
br label %74
74: ; preds = %73, %70, %62, %53, %46
%75 = load i32*, i32** %7
%76 = call i32 @fclose(i32* %75)
%77 = load i32, i32* %8
store i32 %77, i32* %2
br label %78
78: ; preds = %74, %35, %27
%79 = load i32, i32* %2
ret i32 %79
}

LLVM IR (-O2):
@.str = [21 x i8] c"/sys/bus/w1/devices/\00"
@.str.1 = [10 x i8] c"/w1_slave\00"
@F_OK = global i32 0
@.str.2 = [161 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cugfeng/Home_Automation/refs/heads/master/temperature/source/ds18b20.c\00"
@.str.3 = [30 x i8] c"Address (%s) does not exist!\0A\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [24 x i8] c"Open file (%s) failed!\0A\00"
@.str.6 = [29 x i8] c"Read from file (%s) failed!\0A\00"
@.str.7 = [45 x i8] c"Decode temperature from buffer (%s) failed!\0A\00"
define i32 @TEMP_ds18b20_read(i8* %0) {
%2 = alloca [128 x i8]
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%6 = tail call i32 @strlen(i8* %0)
%7 = icmp slt i32 %6, 17
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @strcat(i8* %4, i8* %0)
%12 = call i32 @strcat(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* @F_OK
%14 = call i64 @access(i8* %4, i32 %13)
%15 = icmp slt i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %1
%17 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 111, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %0)
br label %46
18: ; preds = %1
%19 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 117, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %4)
br label %46
23: ; preds = %18
%24 = call i32 @memset(i8* %5, i32 0, i32 512)
%25 = call i8* @fgets(i8* %5, i32 512, i32* %19)
%26 = icmp eq i8* %25, null
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 124, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %4)
br label %43
29: ; preds = %23
%30 = call i32 @ds18b20_verify_crc(i8* %5)
%31 = icmp eq i32 %30, 0
br i1 %31, label %43, label %32
32: ; preds = %29
%33 = call i32 @memset(i8* %5, i32 0, i32 512)
%34 = call i8* @fgets(i8* %5, i32 512, i32* %19)
%35 = icmp eq i8* %34, null
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 137, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %4)
br label %43
38: ; preds = %32
%39 = call i32 @ds18b20_decode_temp(i8* %5)
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = call i32 @TEMP_LOG(i32 2, i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0), i32 144, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i8* %5)
br label %43
43: ; preds = %29, %38, %41, %36, %27
%44 = phi i32 [ -1, %27 ], [ -1, %36 ], [ -1, %41 ], [ %39, %38 ], [ -1, %29 ]
%45 = call i32 @fclose(i32* %19)
br label %46
46: ; preds = %43, %21, %16
%47 = phi i32 [ -1, %16 ], [ -1, %21 ], [ %44, %43 ]
ret i32 %47
}