xunge/DecIR huggingface dataset:
/* Variables and functions */
int dcc_r_token_string(int, char *, char **);
int dcc_r_cwd(int ifd, char **cwd) {
  return dcc_r_token_string(ifd, "CDIR", cwd);
}


x86 assembly (clang, -O0):
<dcc_r_cwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rsi
call   1030 <dcc_r_token_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcc_r_cwd>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <dcc_r_token_string@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"CDIR\00"
define i32 @dcc_r_cwd(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @dcc_r_token_string(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [5 x i8] c"CDIR\00"
define i32 @dcc_r_cwd(i32 %0, i8** %1) {
%3 = tail call i32 @dcc_r_token_string(i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int vf_iii(int x, int y, int z) {
  printf("%d %d %d\n", x, y, z);
  return (x == 1 && y == 2 && z == 3);
}


x86 assembly (clang, -O0):
<vf_iii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jne    115e <vf_iii+0x4e>
xor    %eax,%eax
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jne    115e <vf_iii+0x4e>
cmpl   $0x3,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vf_iii>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
lea    0xede(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
xor    $0x1,%r14d
xor    $0x2,%ebp
or     %r14d,%ebp
xor    $0x3,%ebx
xor    %eax,%eax
or     %ebp,%ebx
sete   %al
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @vf_iii(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %0, 1
%6 = icmp eq i32 %1, 2
%7 = and i1 %5, %6
%8 = icmp eq i32 %2, 3
%9 = and i1 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
#define SIGHUP 131
#define SIGINT 130
#define SIGQUIT 129
#define SIGTERM 128
int /*<<< orphan*/ event_loopbreak();
void signal_handler(int sig) {
  switch (sig) {
  case SIGTERM:
  case SIGHUP:
  case SIGQUIT:
  case SIGINT:
    event_loopbreak();
    break;
  }
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
sub    $0x3,%eax
ja     1136 <signal_handler+0x26>
jmp    112f <signal_handler+0x1f>
mov    $0x0,%al
call   1030 <event_loopbreak@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handler>:
and    $0xfffffffc,%edi
cmp    $0x80,%edi
jne    1122 <signal_handler+0x12>
xor    %eax,%eax
jmp    1030 <event_loopbreak@plt>
ret

LLVM IR (-O0):
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
i32 128, label %4
i32 131, label %4
i32 129, label %4
i32 130, label %4
]
4: ; preds = %1, %1, %1, %1
%5 = call i32 (...) @event_loopbreak()
br label %6
6: ; preds = %1, %4
ret void
}

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
%2 = and i32 %0, -4
%3 = icmp eq i32 %2, 128
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @event_loopbreak()
br label %6
6: ; preds = %1, %4
ret void
}
void async_release(gc) struct cache *gc;
{ takeoffinuse(gc); }


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

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

LLVM IR (-O0):
%struct.cache = type opaque
define void @async_release(%struct.cache* %0) {
%2 = alloca %struct.cache*
store %struct.cache* %0, %struct.cache** %2
%3 = load %struct.cache*, %struct.cache** %2
%4 = call i32 (%struct.cache*, ...) bitcast (i32 (...)* @takeoffinuse to i32 (%struct.cache*, ...)*)(%struct.cache* %3)
ret void
}

LLVM IR (-O2):
%struct.cache = type opaque
define void @async_release(%struct.cache* %0) {
%2 = tail call i32 (%struct.cache*, ...) bitcast (i32 (...)* @takeoffinuse to i32 (%struct.cache*, ...)*)(%struct.cache* %0)
ret void
}
/* Variables and functions */
double sqrt(int);
double distance(int x1, int y1, int x2, int y2) {
  return sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));
}


x86 assembly (clang, -O0):
<distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
sub    -0x4(%rbp),%edi
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
imul   %eax,%edi
mov    -0x10(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0x8(%rbp),%ecx
imul   %ecx,%eax
add    %eax,%edi
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance>:
sub    %edi,%edx
imul   %edx,%edx
sub    %esi,%ecx
imul   %ecx,%ecx
lea    (%rcx,%rdx,1),%edi
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @distance(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
%12 = load i32, i32* %7
%13 = load i32, i32* %5
%14 = sub nsw i32 %12, %13
%15 = mul nsw i32 %11, %14
%16 = load i32, i32* %8
%17 = load i32, i32* %6
%18 = sub nsw i32 %16, %17
%19 = load i32, i32* %8
%20 = load i32, i32* %6
%21 = sub nsw i32 %19, %20
%22 = mul nsw i32 %18, %21
%23 = add nsw i32 %15, %22
%24 = call double @sqrt(i32 %23)
ret double %24
}

LLVM IR (-O2):
define double @distance(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %2, %0
%6 = mul nsw i32 %5, %5
%7 = sub nsw i32 %3, %1
%8 = mul nsw i32 %7, %7
%9 = add nuw nsw i32 %8, %6
%10 = tail call double @sqrt(i32 %9)
ret double %10
}
/* Variables and functions */
int __builtin_ptx_read_pm0();
int __builtin_ptx_read_pm1();
int __builtin_ptx_read_pm2();
int __builtin_ptx_read_pm3();
int read_pms() {
  int a = __builtin_ptx_read_pm0();
  int b = __builtin_ptx_read_pm1();
  int c = __builtin_ptx_read_pm2();
  int d = __builtin_ptx_read_pm3();
  return a + b + c + d;
}


x86 assembly (clang, -O0):
<read_pms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__builtin_ptx_read_pm0@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <__builtin_ptx_read_pm1@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__builtin_ptx_read_pm2@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1060 <__builtin_ptx_read_pm3@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_pms>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <__builtin_ptx_read_pm0@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1050 <__builtin_ptx_read_pm1@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <__builtin_ptx_read_pm2@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <__builtin_ptx_read_pm3@plt>
add    %r14d,%ebp
add    %ebx,%ebp
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_pms() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @__builtin_ptx_read_pm0()
store i32 %5, i32* %1
%6 = call i32 (...) @__builtin_ptx_read_pm1()
store i32 %6, i32* %2
%7 = call i32 (...) @__builtin_ptx_read_pm2()
store i32 %7, i32* %3
%8 = call i32 (...) @__builtin_ptx_read_pm3()
store i32 %8, i32* %4
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @read_pms() {
%1 = tail call i32 (...) @__builtin_ptx_read_pm0()
%2 = tail call i32 (...) @__builtin_ptx_read_pm1()
%3 = tail call i32 (...) @__builtin_ptx_read_pm2()
%4 = tail call i32 (...) @__builtin_ptx_read_pm3()
%5 = add nsw i32 %2, %1
%6 = add nsw i32 %5, %3
%7 = add nsw i32 %6, %4
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int common_chown(char const *, int /*<<< orphan*/, int /*<<< orphan*/,
                 int /*<<< orphan*/);
int virt_chown(const char *path, uid_t owner, gid_t grp) {
  return common_chown(path, owner, grp, 0);
}


x86 assembly (clang, -O0):
<virt_chown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
xor    %ecx,%ecx
call   1030 <common_chown@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @virt_chown(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @common_chown(i8* %0, i32 %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(size_t);
unsigned **createAdjMatrix(size_t size) {
  size_t i = 0;
  unsigned **adj = (unsigned **)malloc(size * sizeof(unsigned));
  while (i < size)
    adj[i++] = (unsigned *)malloc(size * sizeof(unsigned));
  return adj;
}


x86 assembly (clang, -O0):
<createAdjMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
shl    $0x2,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    116f <createAdjMatrix+0x5f>
mov    -0x8(%rbp),%rdi
shl    $0x2,%rdi
call   1030 <malloc@plt>
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x10(%rbp)
mov    %rdx,(%rax,%rcx,8)
jmp    1135 <createAdjMatrix+0x25>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createAdjMatrix>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r15
lea    0x0(,%rdi,4),%r14
mov    %r14,%rdi
call   1030 <malloc@plt>
mov    %rax,%r12
test   %r15,%r15
je     1155 <createAdjMatrix+0x45>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
call   1030 <malloc@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <createAdjMatrix+0x30>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32** @createAdjMatrix(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32**
store i64 %0, i64* %2
store i64 0, i64* %3
%5 = load i64, i64* %2
%6 = mul i64 %5, 4
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i32**
store i32** %8, i32*** %4
br label %9
9: ; preds = %13, %1
%10 = load i64, i64* %3
%11 = load i64, i64* %2
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %22
13: ; preds = %9
%14 = load i64, i64* %2
%15 = mul i64 %14, 4
%16 = call i64 @malloc(i64 %15)
%17 = inttoptr i64 %16 to i32*
%18 = load i32**, i32*** %4
%19 = load i64, i64* %3
%20 = add i64 %19, 1
store i64 %20, i64* %3
%21 = getelementptr inbounds i32*, i32** %18, i64 %19
store i32* %17, i32** %21
br label %9
22: ; preds = %9
%23 = load i32**, i32*** %4
ret i32** %23
}

LLVM IR (-O2):
define i32** @createAdjMatrix(i64 %0) {
%2 = shl i64 %0, 2
%3 = tail call i64 @malloc(i64 %2)
%4 = inttoptr i64 %3 to i32**
%5 = icmp eq i64 %0, 0
br i1 %5, label %13, label %6
6: ; preds = %1, %6
%7 = phi i64 [ %10, %6 ], [ 0, %1 ]
%8 = tail call i64 @malloc(i64 %2)
%9 = inttoptr i64 %8 to i32*
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds i32*, i32** %4, i64 %7
store i32* %9, i32** %11
%12 = icmp eq i64 %10, %0
br i1 %12, label %13, label %6
13: ; preds = %6, %1
ret i32** %4
}
/* Variables and functions */
unsigned long long fast_strtoull(char *);
void callback(void *data1, void *data2) {
  char *string = data1;
  unsigned long long *value = data2;
  *value = fast_strtoull(string);
}


x86 assembly (clang, -O0):
<callback>:
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),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <fast_strtoull@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callback>:
push   %rbx
mov    %rsi,%rbx
call   1030 <fast_strtoull@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @callback(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
store i64* %9, i64** %6
%10 = load i8*, i8** %5
%11 = call i64 @fast_strtoull(i8* %10)
%12 = load i64*, i64** %6
store i64 %11, i64* %12
ret void
}

LLVM IR (-O2):
define void @callback(i8* %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %1 to i64*
%4 = tail call i64 @fast_strtoull(i8* %0)
store i64 %4, i64* %3
ret void
}
/* Type definitions */
struct pdeq {
  int dummy;
};
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *);
struct list_head *pdeq_pop_error(struct pdeq *d) {
  printf("pdeq_pop_error()\n");
  abort();
}


x86 assembly (clang, -O0):
<pdeq_pop_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<pdeq_pop_error>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
%struct.pdeq = type { i32 }
@.str = [18 x i8] c"pdeq_pop_error()\0A\00"
define %struct.list_head* @pdeq_pop_error(%struct.pdeq* %0) {
%2 = alloca %struct.pdeq*
store %struct.pdeq* %0, %struct.pdeq** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
%struct.pdeq = type { i32 }
@str = [17 x i8] c"pdeq_pop_error()\00"
define noalias %struct.list_head* @pdeq_pop_error(%struct.pdeq* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("MBEDTLS_SSL_CLI_C and/or MBEDTLS_SSL_PROTO_DTLS and/or "
         "MBEDTLS_NET_C and/or MBEDTLS_TIMING_C and/or "
         "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C and/or "
         "MBEDTLS_X509_CRT_PARSE_C and/or MBEDTLS_RSA_C and/or "
         "MBEDTLS_CERTS_C and/or MBEDTLS_PEM_PARSE_C not defined.\n");
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [261 x i8] c"MBEDTLS_SSL_CLI_C and/or MBEDTLS_SSL_PROTO_DTLS and/or MBEDTLS_NET_C and/or MBEDTLS_TIMING_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C and/or MBEDTLS_RSA_C and/or MBEDTLS_CERTS_C and/or MBEDTLS_PEM_PARSE_C not defined.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([261 x i8], [261 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [260 x i8] c"MBEDTLS_SSL_CLI_C and/or MBEDTLS_SSL_PROTO_DTLS and/or MBEDTLS_NET_C and/or MBEDTLS_TIMING_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C and/or MBEDTLS_RSA_C and/or MBEDTLS_CERTS_C and/or MBEDTLS_PEM_PARSE_C not defined.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([260 x i8], [260 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct archive {
  int dummy;
};

/* Variables and functions */
int archive_read_finish(struct archive *);
int _alpm_archive_read_free(struct archive *archive) {
  return archive_read_finish(archive);
}


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

x86 assembly (clang, -O2):
<_alpm_archive_read_free>:
jmp    1030 <archive_read_finish@plt>

LLVM IR (-O0):
%struct.archive = type { i32 }
define i32 @_alpm_archive_read_free(%struct.archive* %0) {
%2 = alloca %struct.archive*
store %struct.archive* %0, %struct.archive** %2
%3 = load %struct.archive*, %struct.archive** %2
%4 = call i32 @archive_read_finish(%struct.archive* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.archive = type { i32 }
define i32 @_alpm_archive_read_free(%struct.archive* %0) {
%2 = tail call i32 @archive_read_finish(%struct.archive* %0)
ret i32 %2
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void set_sint32(char *buf, const int32_t val) {
  buf[0] = (val >> 0) & 0xFF;
  buf[1] = (val >> 8) & 0xFF;
  buf[2] = (val >> 16) & 0xFF;
  buf[3] = (val >> 24) & 0xFF;
}


x86 assembly (clang, -O0):
<set_sint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x0,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_sint32>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_sint32(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int foo(int, int, int, ...);
int main(void) {
  return foo(2, 1, 4) + foo(3, 9, 8, 6) + foo(8, 4, 5, 2, 89, 0, 71, 99, 4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <foo@plt>
mov    %eax,-0xc(%rbp)
mov    $0x3,%edi
mov    $0x9,%esi
mov    $0x8,%edx
mov    $0x6,%ecx
mov    $0x0,%al
call   1030 <foo@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x8,%edi
mov    $0x4,%esi
mov    $0x5,%edx
mov    $0x2,%ecx
mov    $0x59,%r8d
xor    %r9d,%r9d
movl   $0x47,(%rsp)
movl   $0x63,0x8(%rsp)
movl   $0x4,0x10(%rsp)
mov    $0x0,%al
call   1030 <foo@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <foo@plt>
mov    %eax,%ebx
mov    $0x3,%edi
mov    $0x9,%esi
mov    $0x8,%edx
mov    $0x6,%ecx
xor    %eax,%eax
call   1030 <foo@plt>
mov    %eax,%ebp
add    %ebx,%ebp
sub    $0x8,%rsp
mov    $0x8,%edi
mov    $0x4,%esi
mov    $0x5,%edx
mov    $0x2,%ecx
mov    $0x59,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
push   $0x4
push   $0x63
push   $0x47
call   1030 <foo@plt>
add    $0x20,%rsp
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i32, i32, i32, ...) @foo(i32 2, i32 1, i32 4)
%3 = call i32 (i32, i32, i32, ...) @foo(i32 3, i32 9, i32 8, i32 6)
%4 = add nsw i32 %2, %3
%5 = call i32 (i32, i32, i32, ...) @foo(i32 8, i32 4, i32 5, i32 2, i32 89, i32 0, i32 71, i32 99, i32 4)
%6 = add nsw i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32, i32, i32, ...) @foo(i32 2, i32 1, i32 4)
%2 = tail call i32 (i32, i32, i32, ...) @foo(i32 3, i32 9, i32 8, i32 6)
%3 = add nsw i32 %2, %1
%4 = tail call i32 (i32, i32, i32, ...) @foo(i32 8, i32 4, i32 5, i32 2, i32 89, i32 0, i32 71, i32 99, i32 4)
%5 = add nsw i32 %3, %4
ret i32 %5
}
double absd(i)
double i;
{ return i >= 0 ? i : -i; }


x86 assembly (clang, -O0):
<absd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <absd+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <absd+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absd>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @absd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fneg double %8
br label %10
10: ; preds = %7, %5
%11 = phi double [ %6, %5 ], [ %9, %7 ]
ret double %11
}

LLVM IR (-O2):
define double @absd(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Variables and functions */
int f129(int *);
int f130(int *p) { return f129(p); }


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

x86 assembly (clang, -O2):
<f130>:
jmp    1030 <f129@plt>

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

LLVM IR (-O2):
define i32 @f130(i32* %0) {
%2 = tail call i32 @f129(i32* %0)
ret i32 %2
}
int main() {
  int a = ~~5;
  return !(a == 5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 5
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ IS_ERR(void const *);
int PTR_ERR(void const *);
int PTR_RET(const void *ptr) {
  if (IS_ERR(ptr))
    return PTR_ERR(ptr);
  else
    return 0;
}


x86 assembly (clang, -O0):
<PTR_RET>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <IS_ERR@plt>
cmp    $0x0,%rax
je     1150 <PTR_RET+0x30>
mov    -0x10(%rbp),%rdi
call   1030 <PTR_ERR@plt>
mov    %eax,-0x4(%rbp)
jmp    1157 <PTR_RET+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PTR_RET>:
push   %rbx
mov    %rdi,%rbx
call   1040 <IS_ERR@plt>
test   %rax,%rax
je     1137 <PTR_RET+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <PTR_ERR@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @PTR_RET(i8* %0) {
%2 = tail call i64 @IS_ERR(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @PTR_ERR(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
void ASMAtomicReadU64(void) {}


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

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

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

LLVM IR (-O2):
define void @ASMAtomicReadU64() {
ret void
}
void X509V3_section_free(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_section_free() {
ret void
}
/* Variables and functions */
int strcoll(char *, char *);
int sort_strcmp_func(const void *a, const void *b) {
  return strcoll(*(char **)a, *(char **)b);
}


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

x86 assembly (clang, -O2):
<sort_strcmp_func>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcoll@plt>

LLVM IR (-O0):
define i32 @sort_strcmp_func(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcoll(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @sort_strcmp_func(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcoll(i8* %4, i8* %6)
ret i32 %7
}
/* Variables and functions */
char *my_put_big_nbr_base(int, int, int);
char *my_putnbr_base(int, int, int);
char *my_put_hexa(int nbr, int upper) {
  char *ret;
  if (nbr < 0) {
    ret = my_put_big_nbr_base(nbr, 16, upper);
  } else {
    ret = my_putnbr_base(nbr, 16, upper);
  }
  return ret;
}


x86 assembly (clang, -O0):
<my_put_hexa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1151 <my_put_hexa+0x31>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x10,%esi
call   1030 <my_put_big_nbr_base@plt>
mov    %rax,-0x10(%rbp)
jmp    1165 <my_put_hexa+0x45>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x10,%esi
call   1040 <my_putnbr_base@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_put_hexa>:
mov    %esi,%edx
mov    $0x10,%esi
test   %edi,%edi
js     1130 <my_put_hexa+0x10>
jmp    1040 <my_putnbr_base@plt>
jmp    1030 <my_put_big_nbr_base@plt>

LLVM IR (-O0):
define i8* @my_put_hexa(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i8* @my_put_big_nbr_base(i32 %9, i32 16, i32 %10)
store i8* %11, i8** %5
br label %16
12: ; preds = %2
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i8* @my_putnbr_base(i32 %13, i32 16, i32 %14)
store i8* %15, i8** %5
br label %16
16: ; preds = %12, %8
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @my_put_hexa(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i8* @my_put_big_nbr_base(i32 %0, i32 16, i32 %1)
br label %8
6: ; preds = %2
%7 = tail call i8* @my_putnbr_base(i32 %0, i32 16, i32 %1)
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %5, %4 ], [ %7, %6 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ register_mtgp_function_list();
void mtgp_init() { register_mtgp_function_list(); }


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

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

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

LLVM IR (-O2):
define void @mtgp_init() {
%1 = tail call i32 (...) @register_mtgp_function_list()
ret void
}
int fun464() { return 464; }


x86 assembly (clang, -O0):
<fun464>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun464>:
mov    $0x1d0,%eax
ret

LLVM IR (-O0):
define i32 @fun464() {
ret i32 464
}

LLVM IR (-O2):
define i32 @fun464() {
ret i32 464
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_45(int Salt, int Parameter) {
  unsigned b = Salt * 0x4D595519 + 0x1A7D;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_45>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x4d595519,-0x4(%rbp),%eax
add    $0x1a7d,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_45>:
imul   $0x4d595519,%edi,%edi
add    $0x1a7d,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_45(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 = mul nsw i32 %6, 1297700121
%8 = add nsw i32 %7, 6781
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_45(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 1297700121
%4 = add nsw i32 %3, 6781
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
scalar_t__ R2Settings_init(int, char **);
int /*<<< orphan*/ R2WindowManager_run();
int main(int argc, char **argv) {
  if (R2Settings_init(argc, argv))
    R2WindowManager_run();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <R2Settings_init@plt>
cmp    $0x0,%rax
je     1153 <main+0x33>
mov    $0x0,%al
call   1030 <R2WindowManager_run@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <R2Settings_init@plt>
test   %rax,%rax
je     1132 <main+0x12>
xor    %eax,%eax
call   1030 <R2WindowManager_run@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @R2Settings_init(i32 %0, i8** %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @R2WindowManager_run()
br label %7
7: ; preds = %5, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glPopMatrix();
void end2D(void) {
  glMatrixMode(GL_PROJECTION);
  glPopMatrix();
  glMatrixMode(GL_MODELVIEW);
  glPopMatrix();
}


x86 assembly (clang, -O0):
<end2D>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<end2D>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1040 <glPopMatrix@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glPopMatrix@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @end2D() {
%1 = load i32, i32* @GL_PROJECTION
%2 = call i32 @glMatrixMode(i32 %1)
%3 = call i32 (...) @glPopMatrix()
%4 = load i32, i32* @GL_MODELVIEW
%5 = call i32 @glMatrixMode(i32 %4)
%6 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @end2D() {
%1 = load i32, i32* @GL_PROJECTION
%2 = tail call i32 @glMatrixMode(i32 %1)
%3 = tail call i32 (...) @glPopMatrix()
%4 = load i32, i32* @GL_MODELVIEW
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glPopMatrix()
ret void
}
unsigned char tech_isLeapYear(unsigned int yy) {
  if (yy % 100 == 0)
    if (yy % 400 == 0)
      return 1;
    else if (yy % 4 == 0)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<tech_isLeapYear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    115c <tech_isLeapYear+0x5c>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    113a <tech_isLeapYear+0x3a>
movb   $0x1,-0x1(%rbp)
jmp    1160 <tech_isLeapYear+0x60>
mov    -0x8(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
jne    1152 <tech_isLeapYear+0x52>
movb   $0x1,-0x1(%rbp)
jmp    1160 <tech_isLeapYear+0x60>
jmp    1157 <tech_isLeapYear+0x57>
jmp    115c <tech_isLeapYear+0x5c>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tech_isLeapYear>:
imul   $0xc28f5c29,%edi,%ecx
mov    %ecx,%eax
ror    $0x2,%eax
cmp    $0x28f5c28,%eax
ja     1124 <tech_isLeapYear+0x24>
ror    $0x4,%ecx
mov    $0x1,%al
cmp    $0xa3d70b,%ecx
jb     1126 <tech_isLeapYear+0x26>
and    $0x3,%edi
je     1126 <tech_isLeapYear+0x26>
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i8 @tech_isLeapYear(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = urem i32 %4, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = urem i32 %8, 400
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i8 1, i8* %2
br label %20
12: ; preds = %7
%13 = load i32, i32* %3
%14 = urem i32 %13, 4
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i8 1, i8* %2
br label %20
17: ; preds = %12
br label %18
18: ; preds = %17
br label %19
19: ; preds = %18, %1
store i8 0, i8* %2
br label %20
20: ; preds = %19, %16, %11
%21 = load i8, i8* %2
ret i8 %21
}

LLVM IR (-O2):
define zeroext i8 @tech_isLeapYear(i32 %0) {
%2 = urem i32 %0, 100
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = urem i32 %0, 400
%6 = icmp eq i32 %5, 0
%7 = and i32 %0, 3
%8 = icmp eq i32 %7, 0
%9 = or i1 %6, %8
br i1 %9, label %11, label %10
10: ; preds = %4, %1
br label %11
11: ; preds = %4, %10
%12 = phi i8 [ 0, %10 ], [ 1, %4 ]
ret i8 %12
}
void test(int a) { return; }


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

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

LLVM IR (-O0):
define void @test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @test(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lt_dlinit();
void auth_client_init(void) { lt_dlinit(); }


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

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

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

LLVM IR (-O2):
define void @auth_client_init() {
%1 = tail call i32 (...) @lt_dlinit()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int puts(char const *);
int fputs(const char *str, FILE *stream) {
  FILE tmp;
  tmp = *stream;
  return puts(str);
}


x86 assembly (clang, -O0):
<fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputs>:
jmp    1030 <puts@plt>

LLVM IR (-O0):
define i32 @fputs(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = call i32 @puts(i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @fputs(i8* nocapture %0, i32* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret i32 %3
}
/* Variables and functions */
int drand48();
int getRandByte() { return (int)(drand48() * 255); }


x86 assembly (clang, -O0):
<getRandByte>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <drand48@plt>
imul   $0xff,%eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRandByte>:
push   %rax
xor    %eax,%eax
call   1030 <drand48@plt>
mov    %eax,%ecx
shl    $0x8,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getRandByte() {
%1 = call i32 (...) @drand48()
%2 = mul nsw i32 %1, 255
ret i32 %2
}

LLVM IR (-O2):
define i32 @getRandByte() {
%1 = tail call i32 (...) @drand48()
%2 = mul nsw i32 %1, 255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void perror_msg_and_die(char *text) {
  fprintf(stderr, text);
  exit(1);
}


x86 assembly (clang, -O0):
<perror_msg_and_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<perror_msg_and_die>:
push   %rax
mov    %rdi,%rsi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @perror_msg_and_die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @perror_msg_and_die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  ((void)argc);
  ((void)argv);
  printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_CERTS_C and/or MBEDTLS_ENTROPY_C "
         "and/or MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_SRV_C and/or "
         "MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or "
         "MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C and/or "
         "MBEDTLS_TIMING_C and/or MBEDTLS_PEM_PARSE_C not defined.\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [280 x i8] c"MBEDTLS_BIGNUM_C and/or MBEDTLS_CERTS_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_SRV_C and/or MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C and/or MBEDTLS_TIMING_C and/or MBEDTLS_PEM_PARSE_C not defined.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([280 x i8], [280 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [279 x i8] c"MBEDTLS_BIGNUM_C and/or MBEDTLS_CERTS_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_SRV_C and/or MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C and/or MBEDTLS_TIMING_C and/or MBEDTLS_PEM_PARSE_C not defined.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([279 x i8], [279 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int cairo_code_draw_stuckbg_get_width() { return 256; }


x86 assembly (clang, -O0):
<cairo_code_draw_stuckbg_get_width>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cairo_code_draw_stuckbg_get_width>:
mov    $0x100,%eax
ret

LLVM IR (-O0):
define i32 @cairo_code_draw_stuckbg_get_width() {
ret i32 256
}

LLVM IR (-O2):
define i32 @cairo_code_draw_stuckbg_get_width() {
ret i32 256
}
/* Variables and functions */
int partition(int *, int, int);
void quickSort(int *theArray, int pivot, int right) {
  int aux;
  if (pivot < right) {
    aux = partition(theArray, pivot, right);
    quickSort(theArray, pivot, aux - 1);
    quickSort(theArray, aux + 1, right);
  }
}


x86 assembly (clang, -O0):
<quickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quickSort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quickSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quickSort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickSort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quickSort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quickSort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quickSort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quickSort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %3
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @partition(i32* %12, i32 %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 1
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %6
br label %24
24: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @quickSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quickSort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}