xunge/DecIR huggingface dataset:
/* Type definitions */
struct ServerEnv {
  int dummy;
};
struct ForwardSession {
  int dummy;
};

/* Variables and functions */
int _AddTimeoutTreeNode(struct ServerEnv *, struct ForwardSession *,
                        unsigned int);
int /*<<< orphan*/ _RemoveTimeoutTreeNode(struct ServerEnv *,
                                          struct ForwardSession *);
int _UpdateTimeoutNode(struct ServerEnv *penv,
                       struct ForwardSession *p_forward_session,
                       unsigned int timeout_timestamp) {
  int nret = 0;
  _RemoveTimeoutTreeNode(penv, p_forward_session);
  nret = _AddTimeoutTreeNode(penv, p_forward_session, timeout_timestamp);
  return nret;
}


x86 assembly (clang, -O0):
<_UpdateTimeoutNode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_RemoveTimeoutTreeNode@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <_AddTimeoutTreeNode@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_UpdateTimeoutNode>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1030 <_RemoveTimeoutTreeNode@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <_AddTimeoutTreeNode@plt>

LLVM IR (-O0):
%struct.ServerEnv = type { i32 }
%struct.ForwardSession = type { i32 }
define i32 @_UpdateTimeoutNode(%struct.ServerEnv* %0, %struct.ForwardSession* %1, i32 %2) {
%4 = alloca %struct.ServerEnv*
%5 = alloca %struct.ForwardSession*
%6 = alloca i32
%7 = alloca i32
store %struct.ServerEnv* %0, %struct.ServerEnv** %4
store %struct.ForwardSession* %1, %struct.ForwardSession** %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load %struct.ServerEnv*, %struct.ServerEnv** %4
%9 = load %struct.ForwardSession*, %struct.ForwardSession** %5
%10 = call i32 @_RemoveTimeoutTreeNode(%struct.ServerEnv* %8, %struct.ForwardSession* %9)
%11 = load %struct.ServerEnv*, %struct.ServerEnv** %4
%12 = load %struct.ForwardSession*, %struct.ForwardSession** %5
%13 = load i32, i32* %6
%14 = call i32 @_AddTimeoutTreeNode(%struct.ServerEnv* %11, %struct.ForwardSession* %12, i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
%struct.ServerEnv = type { i32 }
%struct.ForwardSession = type { i32 }
define i32 @_UpdateTimeoutNode(%struct.ServerEnv* %0, %struct.ForwardSession* %1, i32 %2) {
%4 = tail call i32 @_RemoveTimeoutTreeNode(%struct.ServerEnv* %0, %struct.ForwardSession* %1)
%5 = tail call i32 @_AddTimeoutTreeNode(%struct.ServerEnv* %0, %struct.ForwardSession* %1, i32 %2)
ret i32 %5
}
void BlendPlane() {}


x86 assembly (clang, -O0):
<BlendPlane>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BlendPlane>:
ret

LLVM IR (-O0):
define void @BlendPlane() {
ret void
}

LLVM IR (-O2):
define void @BlendPlane() {
ret void
}
/* Variables and functions */
char *__xstrdup(char *, char *);
int /*<<< orphan*/ str_free(char *);
char *str_set(char *old_str, char *new_str) {
  str_free(old_str);
  if (!new_str)
    new_str = "";
  new_str = (__xstrdup(
      (new_str),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/MrWhoami/lacs_implementation/refs/heads/"
      "HSA_Develop/m2s-rcsl/runtime/glu/string.c"
      ":"
      "926"));
  return new_str;
}


x86 assembly (clang, -O0):
<str_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <str_free@plt>
cmpq   $0x0,-0x10(%rbp)
jne    114f <str_set+0x2f>
lea    0xf64(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1030 <__xstrdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_set>:
push   %rbx
mov    %rsi,%rbx
call   1040 <str_free@plt>
test   %rbx,%rbx
lea    0xf7c(%rip),%rdi
cmovne %rbx,%rdi
lea    0xec2(%rip),%rsi
pop    %rbx
jmp    1030 <__xstrdup@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/MrWhoami/lacs_implementation/refs/heads/HSA_Develop/m2s-rcsl/runtime/glu/string.c:926\00"
define i8* @str_set(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @str_free(i8* %5)
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %2
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %4
br label %10
10: ; preds = %9, %2
%11 = load i8*, i8** %4
%12 = call i8* @__xstrdup(i8* %11, i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.1, i64 0, i64 0))
store i8* %12, i8** %4
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/MrWhoami/lacs_implementation/refs/heads/HSA_Develop/m2s-rcsl/runtime/glu/string.c:926\00"
define i8* @str_set(i8* %0, i8* %1) {
%3 = tail call i32 @str_free(i8* %0)
%4 = icmp eq i8* %1, null
%5 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %1
%6 = tail call i8* @__xstrdup(i8* %5, i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.1, i64 0, i64 0))
ret i8* %6
}
void drive_seek_track0(void) {}


x86 assembly (clang, -O0):
<drive_seek_track0>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drive_seek_track0>:
ret

LLVM IR (-O0):
define void @drive_seek_track0() {
ret void
}

LLVM IR (-O2):
define void @drive_seek_track0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ attach_wireway(char *, int);
int /*<<< orphan*/ create_wireway(char *);
int /*<<< orphan*/ print_wireway();
void test_wireway2() {
  create_wireway("chn/name1");
  attach_wireway("chn/name1", 0x1234);
  attach_wireway("chn/name1", 0x5678);
  print_wireway();
}


x86 assembly (clang, -O0):
<test_wireway2>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <create_wireway@plt>
lea    0xeb9(%rip),%rdi
mov    $0x1234,%esi
call   1050 <attach_wireway@plt>
lea    0xea8(%rip),%rdi
mov    $0x5678,%esi
call   1050 <attach_wireway@plt>
mov    $0x0,%al
call   1030 <print_wireway@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_wireway2>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <create_wireway@plt>
mov    %rbx,%rdi
mov    $0x1234,%esi
call   1050 <attach_wireway@plt>
mov    %rbx,%rdi
mov    $0x5678,%esi
call   1050 <attach_wireway@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <print_wireway@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"chn/name1\00"
define void @test_wireway2() {
%1 = call i32 @create_wireway(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @attach_wireway(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4660)
%3 = call i32 @attach_wireway(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 22136)
%4 = call i32 (...) @print_wireway()
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"chn/name1\00"
define void @test_wireway2() {
%1 = tail call i32 @create_wireway(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @attach_wireway(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4660)
%3 = tail call i32 @attach_wireway(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 22136)
%4 = tail call i32 (...) @print_wireway()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ AUTH;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
bool_t authnone_refresh(AUTH *x) { return (FALSE); }


x86 assembly (clang, -O0):
<authnone_refresh>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<authnone_refresh>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@FALSE = global i32 0
define i32 @authnone_refresh(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @FALSE
ret i32 %3
}

LLVM IR (-O2):
@FALSE = global i32 0
define i32 @authnone_refresh(i32* nocapture readnone %0) {
%2 = load i32, i32* @FALSE
ret i32 %2
}
int BIO_socket_nbio(int s, int mode) {
  int ret = -1;
  int l;
  l = mode;
  return (ret == 0);
}


x86 assembly (clang, -O0):
<BIO_socket_nbio>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIO_socket_nbio>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @BIO_socket_nbio(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 -1, i32* %5
%7 = load i32, i32* %4
store i32 %7, i32* %6
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @BIO_socket_nbio(i32 %0, i32 %1) {
ret i32 0
}
void test18(int b) {
  test18_a(b, b);
  test18_a();
}


x86 assembly (clang, -O0):
<test18>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1030 <test18_a@plt>
mov    $0x0,%al
call   1030 <test18_a@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test18>:
push   %rax
mov    %edi,%esi
xor    %eax,%eax
call   1030 <test18_a@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test18_a@plt>

LLVM IR (-O0):
define void @test18(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @test18_a to i32 (i32, i32, ...)*)(i32 %3, i32 %4)
%6 = call i32 (...) @test18_a()
ret void
}

LLVM IR (-O2):
define void @test18(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @test18_a to i32 (i32, i32, ...)*)(i32 %0, i32 %0)
%3 = tail call i32 (...) @test18_a()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void reject_config_and_exit(char *filename) {
  printf("Configuration file %s rejected - abnormal exit.", filename);
  exit(-1);
}


x86 assembly (clang, -O0):
<reject_config_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<reject_config_and_exit>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Configuration file %s rejected - abnormal exit.\00"
define void @reject_config_and_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [48 x i8] c"Configuration file %s rejected - abnormal exit.\00"
define void @reject_config_and_exit(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int sqlite3UnixSleep(int);
int sqlite3_sleep(int ms) { return sqlite3UnixSleep(ms); }


x86 assembly (clang, -O0):
<sqlite3_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sqlite3UnixSleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite3_sleep>:
jmp    1030 <sqlite3UnixSleep@plt>

LLVM IR (-O0):
define i32 @sqlite3_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sqlite3UnixSleep(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @sqlite3_sleep(i32 %0) {
%2 = tail call i32 @sqlite3UnixSleep(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ str_next_token(char **, char const *);
char *str_split_token(char *t1, const char *fmt) {
  char *t2 = t1;
  if (!str_next_token(&t2, fmt)) {
    t2 = 0;
  }
  return t2;
}


x86 assembly (clang, -O0):
<str_split_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdi
call   1030 <str_next_token@plt>
cmp    $0x0,%eax
jne    1146 <str_split_token+0x36>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_split_token>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <str_next_token@plt>
test   %eax,%eax
je     1127 <str_split_token+0x17>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @str_split_token(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %4
%8 = call i32 @str_next_token(i8** %5, i8* %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
store i8* null, i8** %5
br label %11
11: ; preds = %10, %2
%12 = load i8*, i8** %5
ret i8* %12
}

LLVM IR (-O2):
define i8* @str_split_token(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* %0, i8** %3
%5 = call i32 @str_next_token(i8** %3, i8* %1)
%6 = icmp eq i32 %5, 0
%7 = load i8*, i8** %3
%8 = select i1 %6, i8* null, i8* %7
ret i8* %8
}
/* Variables and functions */
char *reverse_char(char *);
int /*<<< orphan*/ reverse_range(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *idris_utf8_rev(char *s, char *result) {
  strcpy(result, s);
  char *end = result;
  while (*end) {
    end = reverse_char(end);
  }
  reverse_range(result, end - 1);
  return result;
}


x86 assembly (clang, -O0):
<idris_utf8_rev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1174 <idris_utf8_rev+0x44>
mov    -0x18(%rbp),%rdi
call   1040 <reverse_char@plt>
mov    %rax,-0x18(%rbp)
jmp    1155 <idris_utf8_rev+0x25>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0xffffffffffffffff,%rsi
call   1050 <reverse_range@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idris_utf8_rev>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
cmpb   $0x0,(%rbx)
mov    %rbx,%rax
je     115d <idris_utf8_rev+0x2d>
mov    %rbx,%rax
nopw   0x0(%rax,%rax,1)
mov    %rax,%rdi
call   1040 <reverse_char@plt>
cmpb   $0x0,(%rax)
jne    1150 <idris_utf8_rev+0x20>
add    $0xffffffffffffffff,%rax
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <reverse_range@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @idris_utf8_rev(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = load i8*, i8** %4
store i8* %9, i8** %5
br label %10
10: ; preds = %14, %2
%11 = load i8*, i8** %5
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i8*, i8** %5
%16 = call i8* @reverse_char(i8* %15)
store i8* %16, i8** %5
br label %10
17: ; preds = %10
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = getelementptr inbounds i8, i8* %19, i64 -1
%21 = call i32 @reverse_range(i8* %18, i8* %20)
%22 = load i8*, i8** %4
ret i8* %22
}

LLVM IR (-O2):
define i8* @idris_utf8_rev(i8* %0, i8* returned %1) {
%3 = tail call i32 @strcpy(i8* %1, i8* %0)
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %8, %6 ], [ %1, %2 ]
%8 = tail call i8* @reverse_char(i8* %7)
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %2
%12 = phi i8* [ %1, %2 ], [ %8, %6 ]
%13 = getelementptr inbounds i8, i8* %12, i64 -1
%14 = tail call i32 @reverse_range(i8* %1, i8* %13)
ret i8* %1
}
void sidReset(void) {}


x86 assembly (clang, -O0):
<sidReset>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sidReset>:
ret

LLVM IR (-O0):
define void @sidReset() {
ret void
}

LLVM IR (-O2):
define void @sidReset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int, int, int, int);
int main() {
  int a = 1;
start:
  printf("%d %d %d %d %d %d %d %d %d\n", a, a, a, a, a, a, a, a, a);
  a++;
  if (a++)
    goto start;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x28,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0x10(%rbp),%ebx
mov    -0x10(%rbp),%r11d
mov    -0x10(%rbp),%r10d
mov    -0x10(%rbp),%eax
lea    0xeb3(%rip),%rdi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
je     1185 <main+0x75>
jmp    1127 <main+0x17>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
mov    %ebx,%ecx
mov    %ebx,%r8d
mov    %ebx,%r9d
push   %rbx
push   %rbx
push   %rbx
push   %rbx
call   1030 <printf@plt>
add    $0x20,%rsp
add    $0x2,%ebx
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [28 x i8] c"%d %d %d %d %d %d %d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %19, %0
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
%18 = icmp ne i32 %16, 0
br i1 %18, label %19, label %20
19: ; preds = %3
br label %3
20: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"%d %d %d %d %d %d %d %d %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2, i32 %2, i32 %2, i32 %2, i32 %2, i32 %2, i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 2
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ _do_log(char *, int, char *);
int /*<<< orphan*/ assert_messages(int, char *);
void t_empty(void *context) {
  _do_log("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/itmm/waelzer/refs/heads/master/"
          "2.5-t-log-adapter/test.c",
          45, "");
  assert_messages(1, "");
}


x86 assembly (clang, -O0):
<t_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x2d,%esi
lea    0xf52(%rip),%rdx
call   1040 <_do_log@plt>
mov    $0x1,%edi
lea    0xf41(%rip),%rsi
call   1030 <assert_messages@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_empty>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xf62(%rip),%rbx
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <_do_log@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <assert_messages@plt>

LLVM IR (-O0):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/itmm/waelzer/refs/heads/master/2.5-t-log-adapter/test.c\00"
@.str.1 = [1 x i8] zeroinitializer
define void @t_empty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @_do_log(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 45, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @assert_messages(i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/itmm/waelzer/refs/heads/master/2.5-t-log-adapter/test.c\00"
@.str.1 = [1 x i8] zeroinitializer
define void @t_empty(i8* nocapture readnone %0) {
%2 = tail call i32 @_do_log(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 45, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @assert_messages(i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int wint_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int wctob_l(wint_t x, locale_t loc) { return x; }


x86 assembly (clang, -O0):
<wctob_l>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wctob_l>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @wctob_l(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @wctob_l(i32 returned %0, i32 %1) {
ret i32 %0
}
void RotWord(unsigned char word[4]) {
  unsigned char tempRot;
  tempRot = word[0];
  word[0] = word[1];
  word[1] = word[2];
  word[2] = word[3];
  word[3] = tempRot;
}


x86 assembly (clang, -O0):
<RotWord>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RotWord>:
mov    (%rdi),%al
mov    0x1(%rdi),%cl
mov    %cl,(%rdi)
movzwl 0x2(%rdi),%ecx
mov    %cx,0x1(%rdi)
mov    %al,0x3(%rdi)
ret

LLVM IR (-O0):
define void @RotWord(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = load i8, i8* %13
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i64 3
%19 = load i8, i8* %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i8, i8* %3
%23 = load i8*, i8** %2
%24 = getelementptr inbounds i8, i8* %23, i64 3
store i8 %22, i8* %24
ret void
}

LLVM IR (-O2):
define void @RotWord(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = getelementptr inbounds i8, i8* %0, i64 3
%8 = load i8, i8* %7
store i8 %8, i8* %5
store i8 %2, i8* %7
ret void
}
/* Type definitions */
struct crypto_aes_key {
  int dummy;
};
typedef int /*<<< orphan*/ AES_KEY;

/* Variables and functions */
int /*<<< orphan*/ free(struct crypto_aes_key *);
int /*<<< orphan*/ insecure_memzero(struct crypto_aes_key *, int);
void crypto_aes_key_free(struct crypto_aes_key *key) {
  insecure_memzero(key, sizeof(AES_KEY));
  free(key);
}


x86 assembly (clang, -O0):
<crypto_aes_key_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <insecure_memzero@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_aes_key_free>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%esi
call   1030 <insecure_memzero@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free@plt>

LLVM IR (-O0):
%struct.crypto_aes_key = type { i32 }
define void @crypto_aes_key_free(%struct.crypto_aes_key* %0) {
%2 = alloca %struct.crypto_aes_key*
store %struct.crypto_aes_key* %0, %struct.crypto_aes_key** %2
%3 = load %struct.crypto_aes_key*, %struct.crypto_aes_key** %2
%4 = call i32 @insecure_memzero(%struct.crypto_aes_key* %3, i32 4)
%5 = load %struct.crypto_aes_key*, %struct.crypto_aes_key** %2
%6 = call i32 @free(%struct.crypto_aes_key* %5)
ret void
}

LLVM IR (-O2):
%struct.crypto_aes_key = type { i32 }
define void @crypto_aes_key_free(%struct.crypto_aes_key* %0) {
%2 = tail call i32 @insecure_memzero(%struct.crypto_aes_key* %0, i32 4)
%3 = tail call i32 @free(%struct.crypto_aes_key* %0)
ret void
}
void unused(void) {}


x86 assembly (clang, -O0):
<unused>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unused>:
ret

LLVM IR (-O0):
define void @unused() {
ret void
}

LLVM IR (-O2):
define void @unused() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
void f(char *d) {
  static const char a[] = "abcdefghijklmnopqrstuvwxyz";
  memcpy(d, a, 20);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x14,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    0xee9(%rip),%rsi
mov    $0x14,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
@f.a = internal constant [27 x i8] c"abcdefghijklmnopqrstuvwxyz\00"
define void @f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @memcpy(i8* %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @f.a, i64 0, i64 0), i32 20)
ret void
}

LLVM IR (-O2):
@f.a = internal constant [27 x i8] c"abcdefghijklmnopqrstuvwxyz\00"
define void @f(i8* %0) {
%2 = tail call i32 @memcpy(i8* %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @f.a, i64 0, i64 0), i32 20)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atomic_decrement(unsigned long volatile *);
void atomic_dec_ulong(volatile unsigned long *target) {
  atomic_decrement(target);
}


x86 assembly (clang, -O0):
<atomic_dec_ulong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atomic_decrement@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_dec_ulong>:
jmp    1030 <atomic_decrement@plt>

LLVM IR (-O0):
define void @atomic_dec_ulong(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = call i32 @atomic_decrement(i64* %3)
ret void
}

LLVM IR (-O2):
define void @atomic_dec_ulong(i64* %0) {
%2 = tail call i32 @atomic_decrement(i64* %0)
ret void
}
/* Variables and functions */
scalar_t__ assert(int);
int main() {
  assert(0 ? 42 : 0 ? 54 : 0 ? 65 : 7) == 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @assert(i32 7)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @assert(i32 7)
ret i32 0
}
char *dngettext(const char *domainname, const char *msgid1, const char *msgid2,
                unsigned long int n) {
  return (char *)((n == 1) ? msgid1 : msgid2);
}


x86 assembly (clang, -O0):
<dngettext>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x1,-0x20(%rbp)
jne    112c <dngettext+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1134 <dngettext+0x34>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dngettext>:
mov    %rsi,%rax
cmp    $0x1,%rcx
cmovne %rdx,%rax
ret

LLVM IR (-O0):
define i8* @dngettext(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i64, i64* %8
%10 = icmp eq i64 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = load i8*, i8** %6
br label %15
13: ; preds = %4
%14 = load i8*, i8** %7
br label %15
15: ; preds = %13, %11
%16 = phi i8* [ %12, %11 ], [ %14, %13 ]
ret i8* %16
}

LLVM IR (-O2):
define i8* @dngettext(i8* nocapture readnone %0, i8* readnone %1, i8* readnone %2, i64 %3) {
%5 = icmp eq i64 %3, 1
%6 = select i1 %5, i8* %1, i8* %2
ret i8* %6
}
void ft_swapi(int *p1, int *p2) {
  int t;
  t = *p1;
  *p1 = *p2;
  *p2 = t;
}


x86 assembly (clang, -O0):
<ft_swapi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_swapi>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @ft_swapi(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @ft_swapi(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
void tls_engine_deinit(struct tls_connection *conn) {}


x86 assembly (clang, -O0):
<tls_engine_deinit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tls_engine_deinit>:
ret

LLVM IR (-O0):
%struct.tls_connection = type opaque
define void @tls_engine_deinit(%struct.tls_connection* %0) {
%2 = alloca %struct.tls_connection*
store %struct.tls_connection* %0, %struct.tls_connection** %2
ret void
}

LLVM IR (-O2):
%struct.tls_connection = type opaque
define void @tls_engine_deinit(%struct.tls_connection* nocapture %0) {
ret void
}
/* Variables and functions */
int target_xfer_memory(unsigned long long, char *, int, int /*<<< orphan*/);
int target_read_memory(unsigned long long memaddr, char *myaddr, int len) {
  return target_xfer_memory(memaddr, myaddr, len, 0);
}


x86 assembly (clang, -O0):
<target_read_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <target_xfer_memory@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_read_memory>:
xor    %ecx,%ecx
jmp    1030 <target_xfer_memory@plt>

LLVM IR (-O0):
define i32 @target_read_memory(i64 %0, i8* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
store i64 %0, i64* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i64, i64* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @target_xfer_memory(i64 %7, i8* %8, i32 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @target_read_memory(i64 %0, i8* %1, i32 %2) {
%4 = tail call i32 @target_xfer_memory(i64 %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ im_a_minion_01();
int /*<<< orphan*/ im_a_minion_02();
void testFuncQMark(int int1, int int2) {
  (int1 > int2) ? im_a_minion_01() : im_a_minion_02();
}


x86 assembly (clang, -O0):
<testFuncQMark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1146 <testFuncQMark+0x26>
mov    $0x0,%al
call   1030 <im_a_minion_01@plt>
jmp    114d <testFuncQMark+0x2d>
mov    $0x0,%al
call   1040 <im_a_minion_02@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFuncQMark>:
xor    %eax,%eax
cmp    %esi,%edi
jle    112b <testFuncQMark+0xb>
jmp    1030 <im_a_minion_01@plt>
jmp    1040 <im_a_minion_02@plt>

LLVM IR (-O0):
define void @testFuncQMark(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @im_a_minion_01()
br label %12
10: ; preds = %2
%11 = call i32 (...) @im_a_minion_02()
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret void
}

LLVM IR (-O2):
define void @testFuncQMark(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @im_a_minion_01()
br label %8
6: ; preds = %2
%7 = tail call i32 (...) @im_a_minion_02()
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_passando_e_visitando_casa();
int main() { test_passando_e_visitando_casa(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_passando_e_visitando_casa@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_passando_e_visitando_casa@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_passando_e_visitando_casa()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_passando_e_visitando_casa()
ret i32 0
}
void ASN1_STRING_length(void) {}


x86 assembly (clang, -O0):
<ASN1_STRING_length>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_STRING_length>:
ret

LLVM IR (-O0):
define void @ASN1_STRING_length() {
ret void
}

LLVM IR (-O2):
define void @ASN1_STRING_length() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delete_route_t(void *);
void free_route_list_handler(void *ptr) { delete_route_t(ptr); }


x86 assembly (clang, -O0):
<free_route_list_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <delete_route_t@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_route_list_handler>:
jmp    1030 <delete_route_t@plt>

LLVM IR (-O0):
define void @free_route_list_handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @delete_route_t(i8* %3)
ret void
}

LLVM IR (-O2):
define void @free_route_list_handler(i8* %0) {
%2 = tail call i32 @delete_route_t(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2c_init();
void tca6424_init(void) { i2c_init(); }


x86 assembly (clang, -O0):
<tca6424_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <i2c_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tca6424_init>:
xor    %eax,%eax
jmp    1030 <i2c_init@plt>

LLVM IR (-O0):
define void @tca6424_init() {
%1 = call i32 (...) @i2c_init()
ret void
}

LLVM IR (-O2):
define void @tca6424_init() {
%1 = tail call i32 (...) @i2c_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abs(int);
int floor(int /*<<< orphan*/);
int /*<<< orphan*/ log10(int /*<<< orphan*/);
int intLength(int number) {
  if (number == 0)
    return 1;
  return floor(log10(abs(number))) + 1;
}


x86 assembly (clang, -O0):
<intLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1151 <intLength+0x21>
movl   $0x1,-0x4(%rbp)
jmp    116d <intLength+0x3d>
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%edi
call   1040 <log10@plt>
mov    %eax,%edi
call   1050 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intLength>:
test   %edi,%edi
je     1142 <intLength+0x22>
push   %rax
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
mov    %eax,%edi
call   1030 <log10@plt>
mov    %eax,%edi
call   1040 <floor@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @intLength(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @abs(i32 %8)
%10 = call i32 @log10(i32 %9)
%11 = call i32 @floor(i32 %10)
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %13
13: ; preds = %7, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @intLength(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%5 = tail call i32 @log10(i32 %4)
%6 = tail call i32 @floor(i32 %5)
%7 = add nsw i32 %6, 1
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ drawText(int, int, char *);
void clearTextBuf() {
  int y, x;
  for (y = 0; y < 240; y++) {
    for (x = 0; x < 320; x++) {
      drawText(x, y, " ");
    }
  }
}


x86 assembly (clang, -O0):
<clearTextBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xf0,-0x4(%rbp)
jge    1173 <clearTextBuf+0x63>
movl   $0x0,-0x8(%rbp)
cmpl   $0x140,-0x8(%rbp)
jge    1160 <clearTextBuf+0x50>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    0xeb3(%rip),%rdx
call   1030 <drawText@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <clearTextBuf+0x23>
jmp    1165 <clearTextBuf+0x55>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <clearTextBuf+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearTextBuf>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1030 <drawText@plt>
add    $0x1,%ebp
cmp    $0x140,%ebp
jne    1130 <clearTextBuf+0x20>
add    $0x1,%ebx
cmp    $0xf0,%ebx
jne    1120 <clearTextBuf+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @clearTextBuf() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %18, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 240
br i1 %5, label %6, label %21
6: ; preds = %3
store i32 0, i32* %2
br label %7
7: ; preds = %14, %6
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 320
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i32, i32* %2
%12 = load i32, i32* %1
%13 = call i32 @drawText(i32 %11, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %10
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %7
17: ; preds = %7
br label %18
18: ; preds = %17
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
br label %3
21: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @clearTextBuf() {
br label %1
1: ; preds = %0, %8
%2 = phi i32 [ 0, %0 ], [ %9, %8 ]
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %6, %3 ]
%5 = tail call i32 @drawText(i32 %4, i32 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 320
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = add nuw nsw i32 %2, 1
%10 = icmp eq i32 %9, 240
br i1 %10, label %11, label %1
11: ; preds = %8
ret void
}
/* Type definitions */
typedef int int64_t;
typedef int int32_t;

/* Variables and functions */
int32_t fixmul32(int32_t x, int32_t y) {
  int64_t temp;
  temp = x;
  temp *= y;
  temp >>= 16;
  return (int32_t)temp;
}


x86 assembly (clang, -O0):
<fixmul32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixmul32>:
mov    %edi,%eax
imul   %esi,%eax
sar    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @fixmul32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = mul nsw i32 %8, %7
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = ashr i32 %10, 16
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @fixmul32(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = ashr i32 %3, 16
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
char *getprogname();
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr,
                "Usage: %s [-R [-H | -L | -P]] [-fh] mode file ...\n"
                "\t%s [-R [-H | -L | -P]] [-fh] --reference=rfile file ...\n",
                getprogname(), getprogname());
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rdx
mov    %rax,%rcx
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ea6(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1030 <getprogname@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xeac(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [108 x i8] c"Usage: %s [-R [-H | -L | -P]] [-fh] mode file ...\0A\09%s [-R [-H | -L | -P]] [-fh] --reference=rfile file ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i8* (...) @getprogname()
%4 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [108 x i8] c"Usage: %s [-R [-H | -L | -P]] [-fh] mode file ...\0A\09%s [-R [-H | -L | -P]] [-fh] --reference=rfile file ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i8* (...) @getprogname()
%4 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
__attribute__((always_)) int hw_bitRead(unsigned int n, int bit) {
  return ((n >> bit) & 1U);
}


x86 assembly (clang, -O0):
<hw_bitRead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hw_bitRead>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @hw_bitRead(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = lshr i32 %5, %6
%8 = and i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @hw_bitRead(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ myExit(int);
int main() { myExit(12); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
call   1030 <myExit@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
call   1030 <myExit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @myExit(i32 12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @myExit(i32 12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ stdscr;
int position_valid(int x0, int y0, int x1, int y1) {
  int max_x, max_y;
  getmaxyx(stdscr, max_y, max_x);
  return x0 >= 0 && y0 >= 0 && x1 <= max_x && y1 <= max_y;
}


x86 assembly (clang, -O0):
<position_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <getmaxyx@plt>
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x19(%rbp)
jl     1173 <position_valid+0x63>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
jl     1173 <position_valid+0x63>
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x19(%rbp)
jg     1173 <position_valid+0x63>
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
setle  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<position_valid>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
call   1030 <getmaxyx@plt>
or     %ebx,%ebp
not    %ebp
shr    $0x1f,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdscr = global i32 0
define i32 @position_valid(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* @stdscr
%12 = load i32, i32* %10
%13 = load i32, i32* %9
%14 = call i32 @getmaxyx(i32 %11, i32 %12, i32 %13)
%15 = load i32, i32* %5
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %28
17: ; preds = %4
%18 = load i32, i32* %6
%19 = icmp sge i32 %18, 0
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = load i32, i32* %7
%22 = load i32, i32* %9
%23 = icmp sle i32 %21, %22
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i32, i32* %8
%26 = load i32, i32* %10
%27 = icmp sle i32 %25, %26
br label %28
28: ; preds = %24, %20, %17, %4
%29 = phi i1 [ false, %20 ], [ false, %17 ], [ false, %4 ], [ %27, %24 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
@stdscr = global i32 0
define i32 @position_valid(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = load i32, i32* @stdscr
%6 = tail call i32 @getmaxyx(i32 %5, i32 undef, i32 undef)
%7 = or i32 %1, %0
%8 = xor i32 %7, -1
%9 = lshr i32 %8, 31
ret i32 %9
}