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

/* Variables and functions */
int EXIT_SUCCESS;
int atoi(char *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char *getenv(char *);
int getopt(int, char **, char *);
int optind;
int optopt;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  int c;
  int logerr_level = 0;
  char *env_debug = NULL;
  env_debug = getenv("DEBUG");
  if (env_debug) {
    logerr_level = atoi(env_debug);
  }
  while ((c = getopt(argc, argv, "v")) != -1) {
    switch (c) {
    case 'v':
      logerr_level += 1;
      break;
    default:
      printf("unknown option = %c = ascii(0%x)\n", optopt, optopt);
      printf("return value of getopt() = %c\n", c);
    }
  }
  printf("logerr_level = %i\n", logerr_level);
  if (1 <= logerr_level) {
    fprintf(stderr, "%s: %s:%d: ",
            1 >= 3   ? "D"
            : 1 == 2 ? "I"
            : 1 == 1 ? "N"
                     : "W",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/osamuaoki/fun2prog/refs/heads/master/"
            "cli/c/cli-log.c",
            27);
    fprintf(stderr, "optind = %i\n", optind);
    fflush(stderr);
  } else
    ;
  if (2 <= logerr_level) {
    fprintf(stderr, "%s: %s:%d: ",
            2 >= 3   ? "D"
            : 2 == 2 ? "I"
            : 2 == 1 ? "N"
                     : "W",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/osamuaoki/fun2prog/refs/heads/master/"
            "cli/c/cli-log.c",
            28);
    fprintf(stderr, "argc = %i\n", argc);
    fflush(stderr);
  } else
    ;
  if (3 <= logerr_level) {
    fprintf(stderr, "%s: %s:%d: ",
            3 >= 3   ? "D"
            : 3 == 2 ? "I"
            : 3 == 1 ? "N"
                     : "W",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/osamuaoki/fun2prog/refs/heads/master/"
            "cli/c/cli-log.c",
            29);
    fprintf(stderr, "argv[0] = %s\n", argv[0]);
    fflush(stderr);
  } else
    ;
  if (optind + 2 == argc) {
    printf("%s %s!\n", argv[optind], argv[optind + 1]);
  } else {
    if (0 <= logerr_level) {
      fprintf(stderr, "%s: %s:%d: ",
              0 >= 3   ? "D"
              : 0 == 2 ? "I"
              : 0 == 1 ? "N"
                       : "W",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/osamuaoki/fun2prog/refs/heads/master/"
              "cli/c/cli-log.c",
              33);
      fprintf(stderr, "%i arg(s) / 2 args needed\n", argc - optind);
      fflush(stderr);
    } else
      ;
    printf("Oops!\n");
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    0xe74(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11ac <main+0x4c>
mov    -0x20(%rbp),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    11b1 <main+0x51>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe47(%rip),%rdx
call   1070 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     1225 <main+0xc5>
mov    -0x14(%rbp),%eax
sub    $0x76,%eax
jne    11ef <main+0x8f>
jmp    11e1 <main+0x81>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1220 <main+0xc0>
mov    0x2df2(%rip),%rax
mov    (%rax),%esi
mov    0x2de9(%rip),%rax
mov    (%rax),%edx
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11b1 <main+0x51>
mov    -0x18(%rbp),%esi
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%eax
cmp    -0x18(%rbp),%eax
jg     12a2 <main+0x142>
mov    0x2d85(%rip),%rax
mov    (%rax),%edi
lea    0xe08(%rip),%rsi
lea    0xe0d(%rip),%rdx
lea    0xe08(%rip),%rcx
mov    $0x1b,%r8d
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2d5a(%rip),%rax
mov    (%rax),%edi
mov    0x2d61(%rip),%rax
mov    (%rax),%edx
lea    0xe71(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2d3a(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    12a7 <main+0x147>
jmp    12a7 <main+0x147>
mov    $0x2,%eax
cmp    -0x18(%rbp),%eax
jg     130d <main+0x1ad>
mov    0x2d14(%rip),%rax
mov    (%rax),%edi
lea    0xd97(%rip),%rsi
lea    0xe3a(%rip),%rdx
lea    0xd97(%rip),%rcx
mov    $0x1c,%r8d
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xe15(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2ccf(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    1312 <main+0x1b2>
jmp    1312 <main+0x1b2>
mov    $0x3,%eax
cmp    -0x18(%rbp),%eax
jg     137c <main+0x21c>
mov    0x2ca9(%rip),%rax
mov    (%rax),%edi
lea    0xd2c(%rip),%rsi
lea    0xddc(%rip),%rdx
lea    0xd2c(%rip),%rcx
mov    $0x1d,%r8d
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2c7e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdb3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2c60(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    1381 <main+0x221>
jmp    1381 <main+0x221>
mov    0x2c58(%rip),%rax
mov    (%rax),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
jne    13d2 <main+0x272>
mov    -0x10(%rbp),%rax
mov    0x2c3f(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x10(%rbp),%rax
mov    0x2c2d(%rip),%rcx
mov    (%rcx),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1451 <main+0x2f1>
xor    %eax,%eax
cmp    -0x18(%rbp),%eax
jg     143e <main+0x2de>
mov    0x2bec(%rip),%rax
mov    (%rax),%edi
lea    0xc6f(%rip),%rsi
lea    0xd37(%rip),%rdx
lea    0xc6f(%rip),%rcx
mov    $0x21,%r8d
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2bc1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
mov    0x2bc5(%rip),%rax
sub    (%rax),%edx
lea    0xd09(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2b9e(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    1443 <main+0x2e3>
jmp    1443 <main+0x2e3>
lea    0xcfe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2b70(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,0x10(%rsp)
mov    %edi,%ebp
lea    0xe74(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     11a4 <main+0x34>
mov    %rax,%rdi
call   1090 <atoi@plt>
mov    %eax,0xc(%rsp)
jmp    11ac <main+0x3c>
movl   $0x0,0xc(%rsp)
lea    0xe53(%rip),%r15
lea    0xe4e(%rip),%r13
lea    0xe69(%rip),%r12
jmp    11f4 <main+0x84>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x2e11(%rip),%rax
mov    (%rax),%edx
mov    %r13,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebx,%ebp
mov    %ebp,%ebx
mov    %ebp,%edi
mov    0x10(%rsp),%rsi
mov    %r15,%rdx
call   1080 <getopt@plt>
cmp    $0xffffffff,%eax
je     121b <main+0xab>
mov    %eax,%r14d
cmp    $0x76,%eax
jne    11d0 <main+0x60>
addl   $0x1,0xc(%rsp)
mov    %ebx,%ebp
jmp    11f4 <main+0x84>
lea    0xe27(%rip),%rdi
mov    0xc(%rsp),%ebp
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebp,%ebp
jle    131a <main+0x1aa>
mov    0x2d92(%rip),%r15
mov    (%r15),%edi
lea    0xe14(%rip),%rsi
lea    0xe19(%rip),%rdx
lea    0xe14(%rip),%rcx
mov    $0x1b,%r8d
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%edi
mov    0x2d73(%rip),%r14
mov    (%r14),%edx
lea    0xe82(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%edi
call   1070 <fflush@plt>
cmp    $0x1,%ebp
je     1330 <main+0x1c0>
mov    (%r15),%edi
lea    0xdc3(%rip),%rsi
lea    0xe66(%rip),%rdx
lea    0xdc3(%rip),%rcx
mov    $0x1c,%r8d
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%edi
lea    0xe4a(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%edi
call   1070 <fflush@plt>
cmp    $0x3,%ebp
jb     1330 <main+0x1c0>
mov    (%r15),%edi
lea    0xd7e(%rip),%rsi
lea    0xe2e(%rip),%rdx
lea    0xd7e(%rip),%rcx
mov    $0x1d,%r8d
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%edi
mov    0x10(%rsp),%rax
mov    (%rax),%rdx
lea    0xe0a(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%edi
call   1070 <fflush@plt>
mov    0x2cbf(%rip),%rax
mov    (%rax),%eax
lea    0x2(%rax),%ecx
cmp    %ebx,%ecx
je     133a <main+0x1ca>
test   %ebp,%ebp
jns    135a <main+0x1ea>
jmp    13aa <main+0x23a>
mov    (%r14),%eax
lea    0x2(%rax),%ecx
cmp    %ebx,%ecx
jne    135a <main+0x1ea>
cltq
mov    0x10(%rsp),%rcx
mov    (%rcx,%rax,8),%rsi
mov    0x8(%rcx,%rax,8),%rdx
lea    0xdd2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13b6 <main+0x246>
mov    0x2c6f(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xcf1(%rip),%rsi
lea    0xdb9(%rip),%rdx
lea    0xcf1(%rip),%rcx
mov    $0x21,%r8d
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    0x2c50(%rip),%rax
sub    (%rax),%ebx
lea    0xd94(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x0(%rbp),%edi
call   1070 <fflush@plt>
lea    0xd97(%rip),%rdi
call   1040 <puts@plt>
mov    0x2c0b(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"DEBUG\00"
@.str.1 = [2 x i8] c"v\00"
@.str.2 = [34 x i8] c"unknown option = %c = ascii(0%x)\0A\00"
@optopt = global i32 0
@.str.3 = [31 x i8] c"return value of getopt() = %c\0A\00"
@.str.4 = [19 x i8] c"logerr_level = %i\0A\00"
@stderr = global i32 0
@.str.5 = [12 x i8] c"%s: %s:%d: \00"
@.str.6 = [2 x i8] c"N\00"
@.str.7 = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/osamuaoki/fun2prog/refs/heads/master/cli/c/cli-log.c\00"
@.str.8 = [13 x i8] c"optind = %i\0A\00"
@optind = global i32 0
@.str.9 = [2 x i8] c"I\00"
@.str.10 = [11 x i8] c"argc = %i\0A\00"
@.str.11 = [2 x i8] c"D\00"
@.str.12 = [14 x i8] c"argv[0] = %s\0A\00"
@.str.13 = [8 x i8] c"%s %s!\0A\00"
@.str.14 = [2 x i8] c"W\00"
@.str.15 = [27 x i8] c"%i arg(s) / 2 args needed\0A\00"
@.str.16 = [7 x i8] c"Oops!\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i8* null, i8** %8
%9 = call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %9, i8** %8
%10 = load i8*, i8** %8
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %8
%14 = call i32 @atoi(i8* %13)
store i32 %14, i32* %7
br label %15
15: ; preds = %12, %2
br label %16
16: ; preds = %32, %15
%17 = load i32, i32* %4
%18 = load i8**, i8*** %5
%19 = call i32 @getopt(i32 %17, i8** %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 %19, i32* %6
%20 = icmp ne i32 %19, -1
br i1 %20, label %21, label %33
21: ; preds = %16
%22 = load i32, i32* %6
switch i32 %22, label %26 [
i32 118, label %23
]
23: ; preds = %21
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %32
26: ; preds = %21
%27 = load i32, i32* @optopt
%28 = load i32, i32* @optopt
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %27, i32 %28)
%30 = load i32, i32* %6
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 %30)
br label %32
32: ; preds = %26, %23
br label %16
33: ; preds = %16
%34 = load i32, i32* %7
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %34)
%36 = load i32, i32* %7
%37 = icmp sle i32 1, %36
br i1 %37, label %38, label %46
38: ; preds = %33
%39 = load i32, i32* @stderr
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.7, i64 0, i64 0), i32 27)
%41 = load i32, i32* @stderr
%42 = load i32, i32* @optind
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %42)
%44 = load i32, i32* @stderr
%45 = call i32 @fflush(i32 %44)
br label %47
46: ; preds = %33
br label %47
47: ; preds = %46, %38
%48 = load i32, i32* %7
%49 = icmp sle i32 2, %48
br i1 %49, label %50, label %58
50: ; preds = %47
%51 = load i32, i32* @stderr
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.7, i64 0, i64 0), i32 28)
%53 = load i32, i32* @stderr
%54 = load i32, i32* %4
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %54)
%56 = load i32, i32* @stderr
%57 = call i32 @fflush(i32 %56)
br label %59
58: ; preds = %47
br label %59
59: ; preds = %58, %50
%60 = load i32, i32* %7
%61 = icmp sle i32 3, %60
br i1 %61, label %62, label %72
62: ; preds = %59
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.7, i64 0, i64 0), i32 29)
%65 = load i32, i32* @stderr
%66 = load i8**, i8*** %5
%67 = getelementptr inbounds i8*, i8** %66, i64 0
%68 = load i8*, i8** %67
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i8* %68)
%70 = load i32, i32* @stderr
%71 = call i32 @fflush(i32 %70)
br label %73
72: ; preds = %59
br label %73
73: ; preds = %72, %62
%74 = load i32, i32* @optind
%75 = add nsw i32 %74, 2
%76 = load i32, i32* %4
%77 = icmp eq i32 %75, %76
br i1 %77, label %78, label %91
78: ; preds = %73
%79 = load i8**, i8*** %5
%80 = load i32, i32* @optind
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8*, i8** %79, i64 %81
%83 = load i8*, i8** %82
%84 = load i8**, i8*** %5
%85 = load i32, i32* @optind
%86 = add nsw i32 %85, 1
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8*, i8** %84, i64 %87
%89 = load i8*, i8** %88
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8* %83, i8* %89)
br label %107
91: ; preds = %73
%92 = load i32, i32* %7
%93 = icmp sle i32 0, %92
br i1 %93, label %94, label %104
94: ; preds = %91
%95 = load i32, i32* @stderr
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %95, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.7, i64 0, i64 0), i32 33)
%97 = load i32, i32* @stderr
%98 = load i32, i32* %4
%99 = load i32, i32* @optind
%100 = sub nsw i32 %98, %99
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i32 %100)
%102 = load i32, i32* @stderr
%103 = call i32 @fflush(i32 %102)
br label %105
104: ; preds = %91
br label %105
105: ; preds = %104, %94
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %107
107: ; preds = %105, %78
%108 = load i32, i32* @EXIT_SUCCESS
ret i32 %108
}

LLVM IR (-O2):
@.str = [6 x i8] c"DEBUG\00"
@.str.1 = [2 x i8] c"v\00"
@.str.2 = [34 x i8] c"unknown option = %c = ascii(0%x)\0A\00"
@optopt = global i32 0
@.str.3 = [31 x i8] c"return value of getopt() = %c\0A\00"
@.str.4 = [19 x i8] c"logerr_level = %i\0A\00"
@stderr = global i32 0
@.str.5 = [12 x i8] c"%s: %s:%d: \00"
@.str.6 = [2 x i8] c"N\00"
@.str.7 = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/osamuaoki/fun2prog/refs/heads/master/cli/c/cli-log.c\00"
@.str.8 = [13 x i8] c"optind = %i\0A\00"
@optind = global i32 0
@.str.9 = [2 x i8] c"I\00"
@.str.10 = [11 x i8] c"argc = %i\0A\00"
@.str.11 = [2 x i8] c"D\00"
@.str.12 = [14 x i8] c"argv[0] = %s\0A\00"
@.str.13 = [8 x i8] c"%s %s!\0A\00"
@.str.14 = [2 x i8] c"W\00"
@.str.15 = [27 x i8] c"%i arg(s) / 2 args needed\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [6 x i8] c"Oops!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @atoi(i8* %3)
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ 0, %2 ], [ %6, %5 ]
br label %9
9: ; preds = %7, %13
%10 = phi i32 [ %8, %7 ], [ %14, %13 ]
br label %11
11: ; preds = %9, %15
%12 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
switch i32 %12, label %15 [
i32 -1, label %19
i32 118, label %13
]
13: ; preds = %11
%14 = add nsw i32 %10, 1
br label %9
15: ; preds = %11
%16 = load i32, i32* @optopt
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %16, i32 %16)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 %12)
br label %11
19: ; preds = %11
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%21 = icmp sgt i32 %10, 0
br i1 %21, label %22, label %47
22: ; preds = %19
%23 = load i32, i32* @stderr
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.7, i64 0, i64 0), i32 27)
%25 = load i32, i32* @stderr
%26 = load i32, i32* @optind
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %26)
%28 = load i32, i32* @stderr
%29 = tail call i32 @fflush(i32 %28)
%30 = icmp eq i32 %10, 1
br i1 %30, label %51, label %31
31: ; preds = %22
%32 = load i32, i32* @stderr
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.7, i64 0, i64 0), i32 28)
%34 = load i32, i32* @stderr
%35 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %0)
%36 = load i32, i32* @stderr
%37 = tail call i32 @fflush(i32 %36)
%38 = icmp ugt i32 %10, 2
br i1 %38, label %39, label %55
39: ; preds = %31
%40 = load i32, i32* @stderr
%41 = tail call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.7, i64 0, i64 0), i32 29)
%42 = load i32, i32* @stderr
%43 = load i8*, i8** %1
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i8* %43)
%45 = load i32, i32* @stderr
%46 = tail call i32 @fflush(i32 %45)
br label %47
47: ; preds = %19, %39
%48 = load i32, i32* @optind
%49 = add nsw i32 %48, 2
%50 = icmp eq i32 %49, %0
br i1 %50, label %59, label %69
51: ; preds = %22
%52 = load i32, i32* @optind
%53 = add nsw i32 %52, 2
%54 = icmp eq i32 %53, %0
br i1 %54, label %59, label %71
55: ; preds = %31
%56 = load i32, i32* @optind
%57 = add nsw i32 %56, 2
%58 = icmp eq i32 %57, %0
br i1 %58, label %59, label %71
59: ; preds = %51, %55, %47
%60 = phi i32 [ %56, %55 ], [ %48, %47 ], [ %52, %51 ]
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8*, i8** %1, i64 %61
%63 = load i8*, i8** %62
%64 = add nsw i32 %60, 1
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8*, i8** %1, i64 %65
%67 = load i8*, i8** %66
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8* %63, i8* %67)
br label %82
69: ; preds = %47
%70 = icmp sgt i32 %10, -1
br i1 %70, label %71, label %80
71: ; preds = %51, %55, %69
%72 = load i32, i32* @stderr
%73 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.7, i64 0, i64 0), i32 33)
%74 = load i32, i32* @stderr
%75 = load i32, i32* @optind
%76 = sub nsw i32 %0, %75
%77 = tail call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i32 %76)
%78 = load i32, i32* @stderr
%79 = tail call i32 @fflush(i32 %78)
br label %80
80: ; preds = %69, %71
%81 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
br label %82
82: ; preds = %80, %59
%83 = load i32, i32* @EXIT_SUCCESS
ret i32 %83
}