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

/* Variables and functions */
int /*<<< orphan*/ LED(int /*<<< orphan*/, int, int, int);
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ init_d();
char is_sensor(char *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ server(int, char *, char *, char *, char *, char *, char *, char *,
                  int, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int arrgc, char *argv[]) {
  char str1[4096], a[5], str[100];
  int i;
  time_t timep;
  FILE *logfp = NULL;
  logfp = fopen("run.log", "at+");
  if (logfp == NULL) {
    printf("Can't open log file.");
    exit(1);
  } else
    printf("Program will run silently.\nAnd the log is in ./run.log.\n");
  init_d();
  while (1) {
    if (server(80, "42.96.164.52", "api.yeelink.net",
               "31054cd8bd56c3f756544c3daed9793e", "14565", "25008", "GET", "",
               1, str1) != 0)
      return -1;
    else
      a[0] = is_sensor(str1);
    (int)a;
    a[1] = a[0] - 48;
    if (a[1] == 0)
      LED(0, 1, 1, 0);
    else
      LED(0, 1, 1, 1);
    time(&timep);
    sprintf(str, ">>%s[RE]:%d", ctime(&timep), a[1]);
    for (i = 0; i < sizeof(str); i++) {
      if (str[i] == '\n')
        str[i] = ' ';
      else
        ;
    }
    printf("%s\n", str);
    if (fprintf(logfp, "%s", str) < 0) {
      fclose(logfp);
      logfp = fopen("error.log", "wt+");
      fprintf(logfp, "ERROR! %s", ctime(&timep));
      fclose(logfp);
      exit(1);
    }
  }
  fclose(logfp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x1090(%rbp)
lea    0xe15(%rip),%rdi
lea    0xe16(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x1090(%rbp)
cmpq   $0x0,-0x1090(%rbp)
jne    1224 <main+0x64>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <init_d@plt>
lea    -0x1010(%rbp),%rax
mov    $0x50,%edi
lea    0xe0e(%rip),%rsi
lea    0xe14(%rip),%rdx
lea    0xe1d(%rip),%rcx
lea    0xe37(%rip),%r8
lea    0xe36(%rip),%r9
lea    0xe35(%rip),%r11
lea    0xde3(%rip),%r10
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
movl   $0x1,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   10a0 <server@plt>
cmp    $0x0,%rax
je     12a9 <main+0xe9>
mov    $0xffffffff,%eax
add    $0x10c0,%rsp
pop    %rbp
ret
lea    -0x1010(%rbp),%rdi
call   1080 <is_sensor@plt>
mov    %al,-0x1015(%rbp)
movsbl -0x1015(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1014(%rbp)
movsbl -0x1014(%rbp),%eax
cmp    $0x0,%eax
jne    12f0 <main+0x130>
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%edi
mov    %edx,%esi
call   10c0 <LED@plt>
jmp    1300 <main+0x140>
xor    %edi,%edi
mov    $0x1,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   10c0 <LED@plt>
lea    -0x1088(%rbp),%rdi
call   1090 <time@plt>
lea    -0x1080(%rbp),%rax
mov    %rax,-0x1098(%rbp)
lea    -0x1088(%rbp),%rdi
call   1040 <ctime@plt>
mov    -0x1098(%rbp),%rdi
mov    %rax,%rdx
lea    0xd71(%rip),%rsi
movsbl -0x1014(%rbp),%ecx
call   10d0 <sprintf@plt>
movl   $0x0,-0x1084(%rbp)
movslq -0x1084(%rbp),%rax
cmp    $0x64,%rax
jae    13a8 <main+0x1e8>
movslq -0x1084(%rbp),%rax
movsbl -0x1080(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    138a <main+0x1ca>
movslq -0x1084(%rbp),%rax
movb   $0x20,-0x1080(%rbp,%rax,1)
20
jmp    138f <main+0x1cf>
jmp    138f <main+0x1cf>
jmp    1394 <main+0x1d4>
mov    -0x1084(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1084(%rbp)
jmp    134d <main+0x18d>
lea    -0x1080(%rbp),%rsi
lea    0xcfe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1090(%rbp),%rdi
lea    -0x1080(%rbp),%rdx
lea    0xcfb(%rip),%rsi
call   1070 <fprintf@plt>
cmp    $0x0,%rax
jge    144d <main+0x28d>
mov    -0x1090(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xcc4(%rip),%rdi
lea    0xcc7(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x1090(%rbp)
mov    -0x1090(%rbp),%rax
mov    %rax,-0x10a0(%rbp)
lea    -0x1088(%rbp),%rdi
call   1040 <ctime@plt>
mov    -0x10a0(%rbp),%rdi
mov    %rax,%rdx
lea    0xc94(%rip),%rsi
call   1070 <fprintf@plt>
mov    -0x1090(%rbp),%rdi
call   1030 <fclose@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
jmp    1239 <main+0x79>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1088,%rsp
lea    0xe38(%rip),%rdi
lea    0xe39(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1495 <main+0x2c5>
mov    %rax,%r14
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <init_d@plt>
lea    0x80(%rsp),%rbx
lea    0xc(%rsp),%r12
lea    0x10(%rsp),%r13
lea    0xe84(%rip),%rbp
jmp    124f <main+0x7f>
xchg   %ax,%ax
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
call   1080 <fprintf@plt>
test   %rax,%rax
js     1449 <main+0x279>
mov    $0x50,%edi
lea    0xde6(%rip),%rsi
lea    0xdec(%rip),%rdx
lea    0xdf5(%rip),%rcx
lea    0xe0f(%rip),%r8
lea    0xe0e(%rip),%r9
push   %rbx
push   $0x1
lea    0xdaa(%rip),%rax
push   %rax
lea    0xe02(%rip),%rax
push   %rax
call   10b0 <server@plt>
add    $0x20,%rsp
test   %rax,%rax
jne    1432 <main+0x262>
mov    %rbx,%rdi
call   1090 <is_sensor@plt>
mov    %eax,%r15d
xor    %ecx,%ecx
add    $0xd0,%r15b
setne  %cl
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   10d0 <LED@plt>
mov    %r12,%rdi
call   10a0 <time@plt>
mov    %r12,%rdi
call   1050 <ctime@plt>
movsbl %r15b,%ecx
mov    %r13,%rdi
lea    0xdb0(%rip),%rsi
mov    %rax,%rdx
call   10e0 <sprintf@plt>
xor    %eax,%eax
movdqa 0xd0f(%rip),%xmm3
movdqa 0xd17(%rip),%xmm4
jmp    130e <main+0x13e>
nopl   0x0(%rax,%rax,1)
add    $0x8,%rax
cmp    $0x60,%rax
je     13d0 <main+0x200>
movq   0x10(%rsp,%rax,1),%xmm1
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
movd   %xmm0,%ecx
test   $0x1,%cl
je     132a <main+0x15a>
movb   $0x20,0x10(%rsp,%rax,1)
movdqa %xmm0,%xmm2
pslld  $0x8,%xmm2
movd   %xmm2,%ecx
shr    $0x10,%ecx
test   $0x1,%cl
je     1344 <main+0x174>
movb   $0x20,0x11(%rsp,%rax,1)
pshuflw $0x55,%xmm1,%xmm2
pcmpeqb %xmm3,%xmm2
pextrw $0x2,%xmm2,%ecx
test   $0x1,%cl
je     135c <main+0x18c>
movb   $0x20,0x12(%rsp,%rax,1)
movdqa %xmm0,%xmm2
psllq  $0x18,%xmm2
pextrw $0x3,%xmm2,%ecx
test   $0x1,%cl
je     1374 <main+0x1a4>
movb   $0x20,0x13(%rsp,%rax,1)
pshufd $0x55,%xmm1,%xmm1
pcmpeqb %xmm4,%xmm1
pextrw $0x4,%xmm1,%ecx
test   $0x1,%cl
je     138c <main+0x1bc>
movb   $0x20,0x14(%rsp,%rax,1)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%ecx
test   $0x1,%cl
je     13a4 <main+0x1d4>
movb   $0x20,0x15(%rsp,%rax,1)
pextrw $0x3,%xmm0,%ecx
test   $0x1,%cl
je     13b3 <main+0x1e3>
movb   $0x20,0x16(%rsp,%rax,1)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%ecx
test   $0x1,%cl
je     1300 <main+0x130>
movb   $0x20,0x17(%rsp,%rax,1)
jmp    1300 <main+0x130>
cmpb   $0xa,0x70(%rsp)
je     1400 <main+0x230>
cmpb   $0xa,0x71(%rsp)
je     140c <main+0x23c>
cmpb   $0xa,0x72(%rsp)
je     1418 <main+0x248>
cmpb   $0xa,0x73(%rsp)
jne    1230 <main+0x60>
jmp    1428 <main+0x258>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x20,0x70(%rsp)
cmpb   $0xa,0x71(%rsp)
jne    13de <main+0x20e>
movb   $0x20,0x71(%rsp)
cmpb   $0xa,0x72(%rsp)
jne    13e5 <main+0x215>
movb   $0x20,0x72(%rsp)
cmpb   $0xa,0x73(%rsp)
jne    1230 <main+0x60>
movb   $0x20,0x73(%rsp)
jmp    1230 <main+0x60>
mov    $0xffffffff,%eax
add    $0x1088,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r14,%rdi
call   1040 <fclose@plt>
lea    0xc43(%rip),%rdi
lea    0xc46(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,%rbx
lea    0xc(%rsp),%rdi
call   1050 <ctime@plt>
lea    0xc31(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
lea    0xb90(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"run.log\00"
@.str.1 = [4 x i8] c"at+\00"
@.str.2 = [21 x i8] c"Can't open log file.\00"
@.str.3 = [57 x i8] c"Program will run silently.\0AAnd the log is in ./run.log.\0A\00"
@.str.4 = [13 x i8] c"42.96.164.52\00"
@.str.5 = [16 x i8] c"api.yeelink.net\00"
@.str.6 = [33 x i8] c"31054cd8bd56c3f756544c3daed9793e\00"
@.str.7 = [6 x i8] c"14565\00"
@.str.8 = [6 x i8] c"25008\00"
@.str.9 = [4 x i8] c"GET\00"
@.str.10 = [1 x i8] zeroinitializer
@.str.11 = [12 x i8] c">>%s[RE]:%d\00"
@.str.12 = [4 x i8] c"%s\0A\00"
@.str.13 = [3 x i8] c"%s\00"
@.str.14 = [10 x i8] c"error.log\00"
@.str.15 = [4 x i8] c"wt+\00"
@.str.16 = [10 x i8] c"ERROR! %s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4096 x i8]
%7 = alloca [5 x i8]
%8 = alloca [100 x i8]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %11
%12 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i32* %12, i32** %11
%13 = load i32*, i32** %11
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
br label %20
20: ; preds = %18
%21 = call i32 (...) @init_d()
br label %22
22: ; preds = %20, %92
%23 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%24 = call i64 @server(i32 80, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.10, i64 0, i64 0), i32 1, i8* %23)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %22
ret i32 -1
27: ; preds = %22
%28 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%29 = call signext i8 @is_sensor(i8* %28)
%30 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
store i8 %29, i8* %30
br label %31
31: ; preds = %27
%32 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%33 = ptrtoint i8* %32 to i32
%34 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = sub nsw i32 %36, 48
%38 = trunc i32 %37 to i8
%39 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 1
store i8 %38, i8* %39
%40 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 1
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %31
%45 = call i32 @LED(i32 0, i32 1, i32 1, i32 0)
br label %48
46: ; preds = %31
%47 = call i32 @LED(i32 0, i32 1, i32 1, i32 1)
br label %48
48: ; preds = %46, %44
%49 = call i32 @time(i32* %10)
%50 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%51 = call i8* @ctime(i32* %10)
%52 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 1
%53 = load i8, i8* %52
%54 = call i32 @sprintf(i8* %50, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i8* %51, i8 signext %53)
store i32 0, i32* %9
br label %55
55: ; preds = %72, %48
%56 = load i32, i32* %9
%57 = sext i32 %56 to i64
%58 = icmp ult i64 %57, 100
br i1 %58, label %59, label %75
59: ; preds = %55
%60 = load i32, i32* %9
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 %61
%63 = load i8, i8* %62
%64 = sext i8 %63 to i32
%65 = icmp eq i32 %64, 10
br i1 %65, label %66, label %70
66: ; preds = %59
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 %68
store i8 32, i8* %69
br label %71
70: ; preds = %59
br label %71
71: ; preds = %70, %66
br label %72
72: ; preds = %71
%73 = load i32, i32* %9
%74 = add nsw i32 %73, 1
store i32 %74, i32* %9
br label %55
75: ; preds = %55
%76 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %76)
%78 = load i32*, i32** %11
%79 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%80 = call i64 @fprintf(i32* %78, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %79)
%81 = icmp slt i64 %80, 0
br i1 %81, label %82, label %92
82: ; preds = %75
%83 = load i32*, i32** %11
%84 = call i32 @fclose(i32* %83)
%85 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
store i32* %85, i32** %11
%86 = load i32*, i32** %11
%87 = call i8* @ctime(i32* %10)
%88 = call i64 @fprintf(i32* %86, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0), i8* %87)
%89 = load i32*, i32** %11
%90 = call i32 @fclose(i32* %89)
%91 = call i32 @exit(i32 1)
unreachable
92: ; preds = %75
br label %22
}

LLVM IR (-O2):
@.str = [8 x i8] c"run.log\00"
@.str.1 = [4 x i8] c"at+\00"
@.str.2 = [21 x i8] c"Can't open log file.\00"
@.str.4 = [13 x i8] c"42.96.164.52\00"
@.str.5 = [16 x i8] c"api.yeelink.net\00"
@.str.6 = [33 x i8] c"31054cd8bd56c3f756544c3daed9793e\00"
@.str.7 = [6 x i8] c"14565\00"
@.str.8 = [6 x i8] c"25008\00"
@.str.9 = [4 x i8] c"GET\00"
@.str.10 = [1 x i8] zeroinitializer
@.str.11 = [12 x i8] c">>%s[RE]:%d\00"
@.str.13 = [3 x i8] c"%s\00"
@.str.14 = [10 x i8] c"error.log\00"
@.str.15 = [4 x i8] c"wt+\00"
@.str.16 = [10 x i8] c"ERROR! %s\00"
@str = [56 x i8] c"Program will run silently.\0AAnd the log is in ./run.log.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4096 x i8]
%4 = alloca [100 x i8]
%5 = alloca i32
%6 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%8 = bitcast i32* %5 to i8*
%9 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
%16 = tail call i32 (...) @init_d()
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 96
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 97
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 98
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 99
br label %21
21: ; preds = %97, %14
%22 = call i64 @server(i32 80, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.10, i64 0, i64 0), i32 1, i8* %6)
%23 = icmp eq i64 %22, 0
br i1 %23, label %25, label %24
24: ; preds = %21
ret i32 -1
25: ; preds = %21
%26 = call signext i8 @is_sensor(i8* %6)
%27 = add i8 %26, -48
%28 = icmp ne i8 %27, 0
%29 = zext i1 %28 to i32
%30 = call i32 @LED(i32 0, i32 1, i32 1, i32 %29)
%31 = call i32 @time(i32* %5)
%32 = call i8* @ctime(i32* %5)
%33 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i8* %32, i8 signext %27)
br label %34
34: ; preds = %78, %25
%35 = phi i64 [ 0, %25 ], [ %79, %78 ]
%36 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %35
%37 = bitcast i8* %36 to <8 x i8>*
%38 = load <8 x i8>, <8 x i8>* %37
%39 = icmp eq <8 x i8> %38, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
%40 = extractelement <8 x i1> %39, i64 0
br i1 %40, label %41, label %43
41: ; preds = %34
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %35
store i8 32, i8* %42
br label %43
43: ; preds = %41, %34
%44 = extractelement <8 x i1> %39, i64 1
br i1 %44, label %45, label %48
45: ; preds = %43
%46 = or i64 %35, 1
%47 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %46
store i8 32, i8* %47
br label %48
48: ; preds = %45, %43
%49 = extractelement <8 x i1> %39, i64 2
br i1 %49, label %50, label %53
50: ; preds = %48
%51 = or i64 %35, 2
%52 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %51
store i8 32, i8* %52
br label %53
53: ; preds = %50, %48
%54 = extractelement <8 x i1> %39, i64 3
br i1 %54, label %55, label %58
55: ; preds = %53
%56 = or i64 %35, 3
%57 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %56
store i8 32, i8* %57
br label %58
58: ; preds = %55, %53
%59 = extractelement <8 x i1> %39, i64 4
br i1 %59, label %60, label %63
60: ; preds = %58
%61 = or i64 %35, 4
%62 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %61
store i8 32, i8* %62
br label %63
63: ; preds = %60, %58
%64 = extractelement <8 x i1> %39, i64 5
br i1 %64, label %65, label %68
65: ; preds = %63
%66 = or i64 %35, 5
%67 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %66
store i8 32, i8* %67
br label %68
68: ; preds = %65, %63
%69 = extractelement <8 x i1> %39, i64 6
br i1 %69, label %70, label %73
70: ; preds = %68
%71 = or i64 %35, 6
%72 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %71
store i8 32, i8* %72
br label %73
73: ; preds = %70, %68
%74 = extractelement <8 x i1> %39, i64 7
br i1 %74, label %75, label %78
75: ; preds = %73
%76 = or i64 %35, 7
%77 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %76
store i8 32, i8* %77
br label %78
78: ; preds = %75, %73
%79 = add nuw i64 %35, 8
%80 = icmp eq i64 %79, 96
br i1 %80, label %81, label %34
81: ; preds = %78
%82 = load i8, i8* %17
%83 = icmp eq i8 %82, 10
br i1 %83, label %84, label %85
84: ; preds = %81
store i8 32, i8* %17
br label %85
85: ; preds = %84, %81
%86 = load i8, i8* %18
%87 = icmp eq i8 %86, 10
br i1 %87, label %88, label %89
88: ; preds = %85
store i8 32, i8* %18
br label %89
89: ; preds = %88, %85
%90 = load i8, i8* %19
%91 = icmp eq i8 %90, 10
br i1 %91, label %92, label %93
92: ; preds = %89
store i8 32, i8* %19
br label %93
93: ; preds = %92, %89
%94 = load i8, i8* %20
%95 = icmp eq i8 %94, 10
br i1 %95, label %96, label %97
96: ; preds = %93
store i8 32, i8* %20
br label %97
97: ; preds = %96, %93
%98 = call i32 @puts(i8* %7)
%99 = call i64 @fprintf(i32* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %7)
%100 = icmp slt i64 %99, 0
br i1 %100, label %101, label %21
101: ; preds = %97
%102 = call i32 @fclose(i32* %9)
%103 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
%104 = call i8* @ctime(i32* %5)
%105 = call i64 @fprintf(i32* %103, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0), i8* %104)
%106 = call i32 @fclose(i32* %103)
%107 = call i32 @exit(i32 1)
unreachable
}