#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*/ FILE;

/* Variables and functions */
int atoi(char *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ localtime(unsigned long *);
char *malloc(int);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *popen(char *, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
unsigned long time(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  FILE *wget = NULL;
  FILE *fb2rss = NULL;
  FILE *git = NULL;
  FILE *diff = NULL;
  char *s = malloc(sizeof(*s) * 256);
  int d;
  diff = popen("touch posts.xml", "r");
  pclose(diff);
  diff = popen("touch posts.1.xml", "r");
  while (1) {
    wget = popen(
        "wget -U \"Mozzila/5.0\" "
        "\"https://www.facebook.com/1stawesomeplatoon/posts\" -Oposts.html",
        "r");
    if (!wget) {
      fprintf(stderr, "error: wget isn't available\n");
      return 0;
    }
    pclose(wget);
    fprintf(stderr, "converting...\n");
    fb2rss = popen("./fb2rss posts.html -oposts.1.xml", "r");
    if (!fb2rss) {
      fprintf(stderr, "error: fb2rss isn't available\n");
      return 0;
    }
    pclose(fb2rss);
    diff = popen("diff posts.1.xml posts.xml", "r");
    if (!diff) {
      fprintf(stderr, "error: diff isn't available\n");
      return 0;
    }
    d = 0;
    while (fgets(s, 256, diff)) {
      d++;
    }
    pclose(diff);
    if (d > 5) {
      diff = popen("mv posts.1.xml posts.xml", "r");
      pclose(diff);
      fprintf(stderr, "commiting...\n");
      git = popen("git commit -a -m \"auto-commit by wrapper\"", "r");
      if (!git) {
        fprintf(stderr, "error: git isn't available\n");
        return 0;
      }
      pclose(git);
      fprintf(stderr, "pushing...\n");
      git = popen("git push", "r");
      if (!git) {
        fprintf(stderr, "error: git isn't available\n");
        return 0;
      }
      pclose(git);
      fprintf(stderr, "done!\n");
    }
    unsigned long now = time(0);
    strftime(s, 256, "%M", localtime(&now));
    int minutes = atoi(s);
    int wait_time = 30 - (minutes % 30);
    wait_time *= 60;
    strftime(s, 256, "%S", localtime(&now));
    wait_time -= atoi(s);
    fprintf(stderr, "waiting %d\n", wait_time);
    sleep(wait_time);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    $0x100,%edi
call   1080 <malloc@plt>
mov    %rax,-0x38(%rbp)
lea    0xe15(%rip),%rdi
lea    0xe1e(%rip),%rsi
call   10a0 <popen@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   1040 <pclose@plt>
lea    0xe07(%rip),%rdi
lea    0xdfe(%rip),%rsi
call   10a0 <popen@plt>
mov    %rax,-0x30(%rbp)
lea    0xe02(%rip),%rdi
lea    0xde7(%rip),%rsi
call   10a0 <popen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1260 <main+0xc0>
mov    0x2d9c(%rip),%rax
mov    (%rax),%edi
lea    0xe2d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1515 <main+0x375>
mov    -0x18(%rbp),%rdi
call   1040 <pclose@plt>
mov    0x2d70(%rip),%rax
mov    (%rax),%edi
lea    0xe1e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
lea    0xe1f(%rip),%rdi
lea    0xd82(%rip),%rsi
call   10a0 <popen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    12c5 <main+0x125>
mov    0x2d37(%rip),%rax
mov    (%rax),%edi
lea    0xe16(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1515 <main+0x375>
mov    -0x20(%rbp),%rdi
call   1040 <pclose@plt>
lea    0xe12(%rip),%rdi
lea    0xd34(%rip),%rsi
call   10a0 <popen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1313 <main+0x173>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
lea    0xe02(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1515 <main+0x375>
movl   $0x0,-0x3c(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    $0x100,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1344 <main+0x1a4>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    131a <main+0x17a>
mov    -0x30(%rbp),%rdi
call   1040 <pclose@plt>
cmpl   $0x5,-0x3c(%rbp)
jle    1458 <main+0x2b8>
lea    0xdc1(%rip),%rdi
lea    0xcab(%rip),%rsi
call   10a0 <popen@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   1040 <pclose@plt>
mov    0x2c62(%rip),%rax
mov    (%rax),%edi
lea    0xdb1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
lea    0xdb1(%rip),%rdi
lea    0xc74(%rip),%rsi
call   10a0 <popen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    13d3 <main+0x233>
mov    0x2c29(%rip),%rax
mov    (%rax),%edi
lea    0xdb0(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1515 <main+0x375>
mov    -0x28(%rbp),%rdi
call   1040 <pclose@plt>
mov    0x2bfd(%rip),%rax
mov    (%rax),%edi
lea    0xda0(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
lea    0xd9e(%rip),%rdi
lea    0xc0f(%rip),%rsi
call   10a0 <popen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1438 <main+0x298>
mov    0x2bc4(%rip),%rax
mov    (%rax),%edi
lea    0xd4b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1515 <main+0x375>
mov    -0x28(%rbp),%rdi
call   1040 <pclose@plt>
mov    0x2b98(%rip),%rax
mov    (%rax),%edi
lea    0xd50(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
xor    %edi,%edi
call   1070 <time@plt>
mov    %rax,-0x48(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x60(%rbp)
lea    -0x48(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,%ecx
mov    $0x100,%esi
lea    0xd22(%rip),%rdx
call   1090 <strftime@plt>
mov    -0x38(%rbp),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    $0x1e,%ecx
cltd
idiv   %ecx
mov    $0x1e,%eax
sub    %edx,%eax
mov    %eax,-0x50(%rbp)
imul   $0x3c,-0x50(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    -0x48(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x58(%rbp),%rdi
mov    %eax,%ecx
mov    $0x100,%esi
lea    0xcd5(%rip),%rdx
call   1090 <strftime@plt>
mov    -0x38(%rbp),%rdi
call   10b0 <atoi@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    0x2aeb(%rip),%rax
mov    (%rax),%edi
mov    -0x50(%rbp),%edx
lea    0xcad(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%edi
call   10c0 <sleep@plt>
jmp    121b <main+0x7b>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x100,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
lea    0xe41(%rip),%rdi
lea    0xe4a(%rip),%rbp
mov    %rbp,%rsi
call   10a0 <popen@plt>
mov    %rax,%rdi
call   1040 <pclose@plt>
lea    0xe35(%rip),%rdi
mov    %rbp,%rsi
call   10a0 <popen@plt>
lea    0xe38(%rip),%rdi
mov    %rbp,%rsi
call   10a0 <popen@plt>
lea    0xe7f(%rip),%rsi
test   %rax,%rax
je     1414 <main+0x274>
mov    0x2dd5(%rip),%r15
lea    0xdfe(%rip),%r13
mov    %rsp,%r14
jmp    12d8 <main+0x138>
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1070 <time@plt>
mov    %rax,(%rsp)
mov    %r14,%rdi
call   1030 <localtime@plt>
mov    %rbx,%rdi
mov    $0x100,%esi
lea    0xf66(%rip),%rdx
mov    %eax,%ecx
call   1090 <strftime@plt>
mov    %rbx,%rdi
call   10b0 <atoi@plt>
cltq
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x4,%ecx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x5,%edx
sub    %ecx,%edx
sub    %ecx,%edx
sub    %eax,%edx
imul   $0x3c,%edx,%ebp
mov    %r14,%rdi
call   1030 <localtime@plt>
mov    %rbx,%rdi
mov    $0x100,%esi
lea    0xf1c(%rip),%rdx
mov    %eax,%ecx
call   1090 <strftime@plt>
mov    %rbx,%rdi
call   10b0 <atoi@plt>
sub    %eax,%ebp
add    $0x708,%ebp
mov    (%r15),%edi
lea    0xefe(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %ebp,%edi
call   10c0 <sleep@plt>
lea    0xd5d(%rip),%rdi
mov    %r13,%rsi
call   10a0 <popen@plt>
test   %rax,%rax
je     1404 <main+0x264>
mov    %rax,%rdi
call   1040 <pclose@plt>
mov    (%r15),%edi
lea    0xdad(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xdae(%rip),%rdi
mov    %r13,%rsi
call   10a0 <popen@plt>
test   %rax,%rax
je     13f2 <main+0x252>
mov    %rax,%rdi
call   1040 <pclose@plt>
lea    0xdcf(%rip),%rdi
mov    %r13,%rsi
call   10a0 <popen@plt>
test   %rax,%rax
je     13fb <main+0x25b>
mov    %rax,%rbp
mov    $0xffffffff,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x100,%esi
mov    %rbp,%rdx
call   1050 <fgets@plt>
add    $0x1,%r12d
test   %rax,%rax
jne    1340 <main+0x1a0>
mov    %rbp,%rdi
call   1040 <pclose@plt>
cmp    $0x6,%r12d
jb     1220 <main+0x80>
lea    0xdad(%rip),%rdi
mov    %r13,%rsi
call   10a0 <popen@plt>
mov    %rax,%rdi
call   1040 <pclose@plt>
mov    (%r15),%edi
lea    0xdac(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xdac(%rip),%rdi
mov    %r13,%rsi
call   10a0 <popen@plt>
test   %rax,%rax
je     140d <main+0x26d>
mov    %rax,%rdi
call   1040 <pclose@plt>
mov    (%r15),%edi
lea    0xdd3(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xdd1(%rip),%rdi
mov    %r13,%rsi
call   10a0 <popen@plt>
test   %rax,%rax
je     140d <main+0x26d>
mov    %rax,%rdi
call   1040 <pclose@plt>
mov    (%r15),%edi
lea    0xdbb(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1220 <main+0x80>
lea    0xccf(%rip),%rsi
jmp    1414 <main+0x274>
lea    0xd00(%rip),%rsi
jmp    1414 <main+0x274>
lea    0xc6f(%rip),%rsi
jmp    1414 <main+0x274>
lea    0xd5c(%rip),%rsi
mov    0x2bc5(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
call   1060 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"touch posts.xml\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [18 x i8] c"touch posts.1.xml\00"
@.str.3 = [86 x i8] c"wget -U \22Mozzila/5.0\22 \22https://www.facebook.com/1stawesomeplatoon/posts\22 -Oposts.html\00"
@stderr = global i32 0
@.str.4 = [29 x i8] c"error: wget isn't available\0A\00"
@.str.5 = [15 x i8] c"converting...\0A\00"
@.str.6 = [34 x i8] c"./fb2rss posts.html -oposts.1.xml\00"
@.str.7 = [31 x i8] c"error: fb2rss isn't available\0A\00"
@.str.8 = [27 x i8] c"diff posts.1.xml posts.xml\00"
@.str.9 = [29 x i8] c"error: diff isn't available\0A\00"
@.str.10 = [25 x i8] c"mv posts.1.xml posts.xml\00"
@.str.11 = [14 x i8] c"commiting...\0A\00"
@.str.12 = [42 x i8] c"git commit -a -m \22auto-commit by wrapper\22\00"
@.str.13 = [28 x i8] c"error: git isn't available\0A\00"
@.str.14 = [12 x i8] c"pushing...\0A\00"
@.str.15 = [9 x i8] c"git push\00"
@.str.16 = [7 x i8] c"done!\0A\00"
@.str.17 = [3 x i8] c"%M\00"
@.str.18 = [3 x i8] c"%S\00"
@.str.19 = [12 x i8] c"waiting %d\0A\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 i32*
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i64
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
store i32* null, i32** %7
store i32* null, i32** %8
store i32* null, i32** %9
%15 = call i8* @malloc(i32 256)
store i8* %15, i8** %10
%16 = call i32* @popen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %16, i32** %9
%17 = load i32*, i32** %9
%18 = call i32 @pclose(i32* %17)
%19 = call i32* @popen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %19, i32** %9
br label %20
20: ; preds = %2, %89
%21 = call i32* @popen(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %21, i32** %6
%22 = load i32*, i32** %6
%23 = icmp ne i32* %22, null
br i1 %23, label %27, label %24
24: ; preds = %20
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %113
27: ; preds = %20
%28 = load i32*, i32** %6
%29 = call i32 @pclose(i32* %28)
%30 = load i32, i32* @stderr
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%32 = call i32* @popen(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %32, i32** %7
%33 = load i32*, i32** %7
%34 = icmp ne i32* %33, null
br i1 %34, label %38, label %35
35: ; preds = %27
%36 = load i32, i32* @stderr
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %3
br label %113
38: ; preds = %27
%39 = load i32*, i32** %7
%40 = call i32 @pclose(i32* %39)
%41 = call i32* @popen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %41, i32** %9
%42 = load i32*, i32** %9
%43 = icmp ne i32* %42, null
br i1 %43, label %47, label %44
44: ; preds = %38
%45 = load i32, i32* @stderr
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %3
br label %113
47: ; preds = %38
store i32 0, i32* %11
br label %48
48: ; preds = %53, %47
%49 = load i8*, i8** %10
%50 = load i32*, i32** %9
%51 = call i64 @fgets(i8* %49, i32 256, i32* %50)
%52 = icmp ne i64 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %48
%54 = load i32, i32* %11
%55 = add nsw i32 %54, 1
store i32 %55, i32* %11
br label %48
56: ; preds = %48
%57 = load i32*, i32** %9
%58 = call i32 @pclose(i32* %57)
%59 = load i32, i32* %11
%60 = icmp sgt i32 %59, 5
br i1 %60, label %61, label %89
61: ; preds = %56
%62 = call i32* @popen(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %62, i32** %9
%63 = load i32*, i32** %9
%64 = call i32 @pclose(i32* %63)
%65 = load i32, i32* @stderr
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%67 = call i32* @popen(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %67, i32** %8
%68 = load i32*, i32** %8
%69 = icmp ne i32* %68, null
br i1 %69, label %73, label %70
70: ; preds = %61
%71 = load i32, i32* @stderr
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %3
br label %113
73: ; preds = %61
%74 = load i32*, i32** %8
%75 = call i32 @pclose(i32* %74)
%76 = load i32, i32* @stderr
%77 = call i32 (i32, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0))
%78 = call i32* @popen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %78, i32** %8
%79 = load i32*, i32** %8
%80 = icmp ne i32* %79, null
br i1 %80, label %84, label %81
81: ; preds = %73
%82 = load i32, i32* @stderr
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %3
br label %113
84: ; preds = %73
%85 = load i32*, i32** %8
%86 = call i32 @pclose(i32* %85)
%87 = load i32, i32* @stderr
%88 = call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %89
89: ; preds = %84, %56
%90 = call i64 @time(i32 0)
store i64 %90, i64* %12
%91 = load i8*, i8** %10
%92 = call i32 @localtime(i64* %12)
%93 = call i32 @strftime(i8* %91, i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i32 %92)
%94 = load i8*, i8** %10
%95 = call i32 @atoi(i8* %94)
store i32 %95, i32* %13
%96 = load i32, i32* %13
%97 = srem i32 %96, 30
%98 = sub nsw i32 30, %97
store i32 %98, i32* %14
%99 = load i32, i32* %14
%100 = mul nsw i32 %99, 60
store i32 %100, i32* %14
%101 = load i8*, i8** %10
%102 = call i32 @localtime(i64* %12)
%103 = call i32 @strftime(i8* %101, i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32 %102)
%104 = load i8*, i8** %10
%105 = call i32 @atoi(i8* %104)
%106 = load i32, i32* %14
%107 = sub nsw i32 %106, %105
store i32 %107, i32* %14
%108 = load i32, i32* @stderr
%109 = load i32, i32* %14
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %108, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i32 %109)
%111 = load i32, i32* %14
%112 = call i32 @sleep(i32 %111)
br label %20
113: ; preds = %81, %70, %44, %35, %24
%114 = load i32, i32* %3
ret i32 %114
}

LLVM IR (-O2):
@.str = [16 x i8] c"touch posts.xml\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [18 x i8] c"touch posts.1.xml\00"
@.str.3 = [86 x i8] c"wget -U \22Mozzila/5.0\22 \22https://www.facebook.com/1stawesomeplatoon/posts\22 -Oposts.html\00"
@stderr = global i32 0
@.str.4 = [29 x i8] c"error: wget isn't available\0A\00"
@.str.5 = [15 x i8] c"converting...\0A\00"
@.str.6 = [34 x i8] c"./fb2rss posts.html -oposts.1.xml\00"
@.str.7 = [31 x i8] c"error: fb2rss isn't available\0A\00"
@.str.8 = [27 x i8] c"diff posts.1.xml posts.xml\00"
@.str.9 = [29 x i8] c"error: diff isn't available\0A\00"
@.str.10 = [25 x i8] c"mv posts.1.xml posts.xml\00"
@.str.11 = [14 x i8] c"commiting...\0A\00"
@.str.12 = [42 x i8] c"git commit -a -m \22auto-commit by wrapper\22\00"
@.str.13 = [28 x i8] c"error: git isn't available\0A\00"
@.str.14 = [12 x i8] c"pushing...\0A\00"
@.str.15 = [9 x i8] c"git push\00"
@.str.16 = [7 x i8] c"done!\0A\00"
@.str.17 = [3 x i8] c"%M\00"
@.str.18 = [3 x i8] c"%S\00"
@.str.19 = [12 x i8] c"waiting %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = tail call dereferenceable_or_null(256) i8* @malloc(i32 256)
%5 = tail call i32* @popen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @pclose(i32* %5)
%7 = tail call i32* @popen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32* @popen(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %65, label %10
10: ; preds = %2
%11 = bitcast i64* %3 to i8*
br label %12
12: ; preds = %10, %48
%13 = phi i32* [ %8, %10 ], [ %63, %48 ]
%14 = call i32 @pclose(i32* %13)
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32* @popen(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i32* %17, null
br i1 %18, label %65, label %19
19: ; preds = %12
%20 = call i32 @pclose(i32* %17)
%21 = call i32* @popen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i32* %21, null
br i1 %22, label %65, label %23
23: ; preds = %19, %23
%24 = phi i32 [ %27, %23 ], [ 0, %19 ]
%25 = call i64 @fgets(i8* %4, i32 256, i32* %21)
%26 = icmp eq i64 %25, 0
%27 = add nuw nsw i32 %24, 1
br i1 %26, label %28, label %23
28: ; preds = %23
%29 = call i32 @pclose(i32* %21)
%30 = icmp ugt i32 %24, 5
br i1 %30, label %31, label %48
31: ; preds = %28
%32 = call i32* @popen(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%33 = call i32 @pclose(i32* %32)
%34 = load i32, i32* @stderr
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%36 = call i32* @popen(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%37 = icmp eq i32* %36, null
br i1 %37, label %65, label %38
38: ; preds = %31
%39 = call i32 @pclose(i32* %36)
%40 = load i32, i32* @stderr
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0))
%42 = call i32* @popen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%43 = icmp eq i32* %42, null
br i1 %43, label %65, label %44
44: ; preds = %38
%45 = call i32 @pclose(i32* %42)
%46 = load i32, i32* @stderr
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %48
48: ; preds = %44, %28
%49 = call i64 @time(i32 0)
store i64 %49, i64* %3
%50 = call i32 @localtime(i64* %3)
%51 = call i32 @strftime(i8* %4, i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i32 %50)
%52 = call i32 @atoi(i8* %4)
%53 = srem i32 %52, 30
%54 = sub nsw i32 30, %53
%55 = mul nuw nsw i32 %54, 60
%56 = call i32 @localtime(i64* %3)
%57 = call i32 @strftime(i8* %4, i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32 %56)
%58 = call i32 @atoi(i8* %4)
%59 = sub nsw i32 %55, %58
%60 = load i32, i32* @stderr
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i32 %59)
%62 = call i32 @sleep(i32 %59)
%63 = call i32* @popen(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%64 = icmp eq i32* %63, null
br i1 %64, label %65, label %12
65: ; preds = %38, %31, %19, %12, %48, %2
%66 = phi i8* [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), %2 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), %48 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), %12 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), %19 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0), %31 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0), %38 ]
%67 = load i32, i32* @stderr
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* %66)
ret i32 0
}