#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 /*<<< orphan*/ free(void *);
char *get_err_str2(int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int i = 0;
  int j = -1;
  void *p;
  int k = 1;
  if (i) {
    printf("i:ture \n");
  } else {
    printf("i:false \n");
  }
  if (!i) {
    printf("i!:ture \n");
  } else {
    printf("i!:false \n");
  }
  if (j) {
    printf("j:ture [%d] \n", j);
  } else {
    printf("j:false [%d]\n", j);
  }
  if (!j) {
    printf("j!:ture [%d] \n", j);
  } else {
    printf("j!:false [%d]\n", j);
  }
  if (k) {
    printf("k:ture [%d] \n", k);
  } else {
    printf("k:false [%d]\n", k);
  }
  if (!k) {
    printf("k!:ture [%d] \n", k);
  } else {
    printf("k!:false [%d]\n", k);
  }
  if (p) {
    printf("p:ture \n");
  } else {
    printf("p:false \n");
  }
  if (!p) {
    printf("p!ture \n");
  } else {
    printf("p!:false \n");
  }
  p = NULL;
  if (!p) {
    printf("ture \n");
  } else {
    printf("false \n");
  }
  p = (void *)malloc(10);
  if (p) {
    printf("p:ture \n");
  } else {
    printf("p:false \n");
  }
  if (!p) {
    printf("ture \n");
  } else {
    printf("false \n");
  }
  if (0) {
    printf("0:ture \n");
  } else {
    printf("0:false \n");
  }
  if (!0) {
    printf("!0:ture \n");
  } else {
    printf("!0:false \n");
  }
  free(p);
  for (i = 0; i < 10; i++)
    printf("%s\n", get_err_str2(i));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1181 <main+0x41>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    118f <main+0x4f>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    11ac <main+0x6c>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11ba <main+0x7a>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     11da <main+0x9a>
mov    -0xc(%rbp),%esi
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11eb <main+0xab>
mov    -0xc(%rbp),%esi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    120b <main+0xcb>
mov    -0xc(%rbp),%esi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    121c <main+0xdc>
mov    -0xc(%rbp),%esi
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x1c(%rbp)
je     123c <main+0xfc>
mov    -0x1c(%rbp),%esi
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    124d <main+0x10d>
mov    -0x1c(%rbp),%esi
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    126d <main+0x12d>
mov    -0x1c(%rbp),%esi
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    127e <main+0x13e>
mov    -0x1c(%rbp),%esi
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x18(%rbp)
je     129c <main+0x15c>
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12aa <main+0x16a>
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x18(%rbp)
jne    12c8 <main+0x188>
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12d6 <main+0x196>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    12fc <main+0x1bc>
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    130a <main+0x1ca>
lea    0xd1d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1336 <main+0x1f6>
lea    0xd72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1344 <main+0x204>
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x18(%rbp)
jne    1362 <main+0x222>
lea    0xd5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1370 <main+0x230>
lea    0xcb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd48(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    13cd <main+0x28d>
mov    -0x8(%rbp),%edi
call   1050 <get_err_str2@plt>
mov    %rax,%rsi
lea    0xd1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    139c <main+0x25c>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xedb(%rip),%rdi
call   1040 <puts@plt>
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xe89(%rip),%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe80(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe7b(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe91(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xe7a(%rip),%rdi
call   1040 <puts@plt>
lea    0xe70(%rip),%r15
mov    %r15,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1070 <malloc@plt>
mov    %rax,%r12
test   %rax,%rax
lea    0xe72(%rip),%rdi
cmove  %r14,%rdi
lea    0xe57(%rip),%rbx
cmove  %r15,%rbx
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xe3d(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3a(%rip),%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x2,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x3,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x4,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x5,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x6,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x7,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x8,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
mov    $0x9,%edi
call   1060 <get_err_str2@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"i:ture \0A\00"
@.str.1 = [10 x i8] c"i:false \0A\00"
@.str.2 = [10 x i8] c"i!:ture \0A\00"
@.str.3 = [11 x i8] c"i!:false \0A\00"
@.str.4 = [14 x i8] c"j:ture [%d] \0A\00"
@.str.5 = [14 x i8] c"j:false [%d]\0A\00"
@.str.6 = [15 x i8] c"j!:ture [%d] \0A\00"
@.str.7 = [15 x i8] c"j!:false [%d]\0A\00"
@.str.8 = [14 x i8] c"k:ture [%d] \0A\00"
@.str.9 = [14 x i8] c"k:false [%d]\0A\00"
@.str.10 = [15 x i8] c"k!:ture [%d] \0A\00"
@.str.11 = [15 x i8] c"k!:false [%d]\0A\00"
@.str.12 = [9 x i8] c"p:ture \0A\00"
@.str.13 = [10 x i8] c"p:false \0A\00"
@.str.14 = [9 x i8] c"p!ture \0A\00"
@.str.15 = [11 x i8] c"p!:false \0A\00"
@.str.16 = [7 x i8] c"ture \0A\00"
@.str.17 = [8 x i8] c"false \0A\00"
@.str.18 = [10 x i8] c"0:false \0A\00"
@.str.19 = [10 x i8] c"!0:ture \0A\00"
@.str.20 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 -1, i32* %3
store i32 1, i32* %5
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %19
17: ; preds = %12
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
%20 = load i32, i32* %3
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %3
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %23)
br label %28
25: ; preds = %19
%26 = load i32, i32* %3
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %25, %22
%29 = load i32, i32* %3
%30 = icmp ne i32 %29, 0
br i1 %30, label %34, label %31
31: ; preds = %28
%32 = load i32, i32* %3
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %32)
br label %37
34: ; preds = %28
%35 = load i32, i32* %3
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %35)
br label %37
37: ; preds = %34, %31
%38 = load i32, i32* %5
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = load i32, i32* %5
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %41)
br label %46
43: ; preds = %37
%44 = load i32, i32* %5
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %43, %40
%47 = load i32, i32* %5
%48 = icmp ne i32 %47, 0
br i1 %48, label %52, label %49
49: ; preds = %46
%50 = load i32, i32* %5
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i32 %50)
br label %55
52: ; preds = %46
%53 = load i32, i32* %5
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), i32 %53)
br label %55
55: ; preds = %52, %49
%56 = load i8*, i8** %4
%57 = icmp ne i8* %56, null
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
br label %62
60: ; preds = %55
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %62
62: ; preds = %60, %58
%63 = load i8*, i8** %4
%64 = icmp ne i8* %63, null
br i1 %64, label %67, label %65
65: ; preds = %62
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
br label %69
67: ; preds = %62
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
br label %69
69: ; preds = %67, %65
store i8* null, i8** %4
%70 = load i8*, i8** %4
%71 = icmp ne i8* %70, null
br i1 %71, label %74, label %72
72: ; preds = %69
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %76
74: ; preds = %69
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
br label %76
76: ; preds = %74, %72
%77 = call i64 @malloc(i32 10)
%78 = inttoptr i64 %77 to i8*
store i8* %78, i8** %4
%79 = load i8*, i8** %4
%80 = icmp ne i8* %79, null
br i1 %80, label %81, label %83
81: ; preds = %76
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
br label %85
83: ; preds = %76
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %85
85: ; preds = %83, %81
%86 = load i8*, i8** %4
%87 = icmp ne i8* %86, null
br i1 %87, label %90, label %88
88: ; preds = %85
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %92
90: ; preds = %85
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
br label %92
92: ; preds = %90, %88
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0))
%95 = load i8*, i8** %4
%96 = call i32 @free(i8* %95)
store i32 0, i32* %2
br label %97
97: ; preds = %104, %92
%98 = load i32, i32* %2
%99 = icmp slt i32 %98, 10
br i1 %99, label %100, label %107
100: ; preds = %97
%101 = load i32, i32* %2
%102 = call i8* @get_err_str2(i32 %101)
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), i8* %102)
br label %104
104: ; preds = %100
%105 = load i32, i32* %2
%106 = add nsw i32 %105, 1
store i32 %106, i32* %2
br label %97
107: ; preds = %97
%108 = load i32, i32* %1
ret i32 %108
}

LLVM IR (-O2):
@.str.4 = [14 x i8] c"j:ture [%d] \0A\00"
@.str.7 = [15 x i8] c"j!:false [%d]\0A\00"
@.str.8 = [14 x i8] c"k:ture [%d] \0A\00"
@.str.11 = [15 x i8] c"k!:false [%d]\0A\00"
@str = [9 x i8] c"i:false \00"
@str.21 = [9 x i8] c"i!:ture \00"
@str.23 = [8 x i8] c"p!ture \00"
@str.25 = [9 x i8] c"p:false \00"
@str.26 = [6 x i8] c"ture \00"
@str.27 = [9 x i8] c"0:false \00"
@str.28 = [9 x i8] c"!0:ture \00"
@str.29 = [7 x i8] c"false \00"
@str.30 = [8 x i8] c"p:ture \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.21, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 -1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 -1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 1)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), i32 1)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.25, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.23, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.26, i64 0, i64 0))
%10 = tail call i64 @malloc(i32 10)
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.25, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.30, i64 0, i64 0)
%13 = select i1 %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.26, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0)
%14 = tail call i32 @puts(i8* dereferenceable(1) %12)
%15 = tail call i32 @puts(i8* dereferenceable(1) %13)
%16 = inttoptr i64 %10 to i8*
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.27, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.28, i64 0, i64 0))
%19 = tail call i32 @free(i8* %16)
%20 = tail call i8* @get_err_str2(i32 0)
%21 = tail call i32 @puts(i8* dereferenceable(1) %20)
%22 = tail call i8* @get_err_str2(i32 1)
%23 = tail call i32 @puts(i8* dereferenceable(1) %22)
%24 = tail call i8* @get_err_str2(i32 2)
%25 = tail call i32 @puts(i8* dereferenceable(1) %24)
%26 = tail call i8* @get_err_str2(i32 3)
%27 = tail call i32 @puts(i8* dereferenceable(1) %26)
%28 = tail call i8* @get_err_str2(i32 4)
%29 = tail call i32 @puts(i8* dereferenceable(1) %28)
%30 = tail call i8* @get_err_str2(i32 5)
%31 = tail call i32 @puts(i8* dereferenceable(1) %30)
%32 = tail call i8* @get_err_str2(i32 6)
%33 = tail call i32 @puts(i8* dereferenceable(1) %32)
%34 = tail call i8* @get_err_str2(i32 7)
%35 = tail call i32 @puts(i8* dereferenceable(1) %34)
%36 = tail call i8* @get_err_str2(i32 8)
%37 = tail call i32 @puts(i8* dereferenceable(1) %36)
%38 = tail call i8* @get_err_str2(i32 9)
%39 = tail call i32 @puts(i8* dereferenceable(1) %38)
ret i32 0
}