xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int info(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc < 2) {
    fprintf(stderr, "Usage: %s filename\n", argv[0]);
    return 1;
  }
  return info(argv[1]);
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    1168 <main+0x48>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1178 <main+0x58>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <info@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1145 <main+0x25>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
pop    %rax
jmp    1040 <info@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Usage: %s filename\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 = icmp slt i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %12)
store i32 1, i32* %3
br label %19
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @info(i8* %17)
store i32 %18, i32* %3
br label %19
19: ; preds = %14, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Usage: %s filename\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %12
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @info(i8* %10)
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ 1, %4 ], [ %11, %8 ]
ret i32 %13
}
void gtk_vbox_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_vbox_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ enable_irq(unsigned int);
__attribute__((always_)) void enable_irq_lockdep(unsigned int irq) {
  enable_irq(irq);
}


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

x86 assembly (clang, -O2):
<enable_irq_lockdep>:
jmp    1030 <enable_irq@plt>

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

LLVM IR (-O2):
define void @enable_irq_lockdep(i32 %0) {
%2 = tail call i32 @enable_irq(i32 %0)
ret void
}
int __attribute__((no)) test_02(int x) { return x & 0; }


x86 assembly (clang, -O0):
<test_02>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x0,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_02(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int a[] = {1, 2, 3, 4, 5, 6, 7};
  char c[] = {'a', 'x', 'h', 'o', 'k'};
  printf("%d %d %d %d \n", (&a[3] - &a[0]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed9(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xed4(%rip),%eax
mov    %eax,-0x25(%rbp)
mov    0xecf(%rip),%al
mov    %al,-0x21(%rbp)
lea    -0x20(%rbp),%rax
add    $0xc,%rax
lea    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
@__const.main.c = [5 x i8] c"axhok"
@.str = [14 x i8] c"%d %d %d %d \0A\00"
define i32 @main() {
%1 = alloca [7 x i32]
%2 = alloca [5 x i8]
%3 = bitcast [7 x i32]* %1 to i8*
%4 = bitcast [5 x i8]* %2 to i8*
%5 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 3
%6 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%7 = ptrtoint i32* %5 to i64
%8 = ptrtoint i32* %6 to i64
%9 = sub i64 %7, %8
%10 = sdiv exact i64 %9, 4
%11 = trunc i64 %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d %d %d %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 3)
ret i32 0
}
/* Variables and functions */
int __lxstat(int /*<<< orphan*/, char *, void *);
int lstat(char *name, void *st) { return __lxstat(0, name, st); }


x86 assembly (clang, -O0):
<lstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
call   1030 <__lxstat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lstat>:
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <__lxstat@plt>

LLVM IR (-O0):
define i32 @lstat(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 = load i8*, i8** %4
%7 = call i32 @__lxstat(i32 0, i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @lstat(i8* %0, i8* %1) {
%3 = tail call i32 @__lxstat(i32 0, i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ errx(int, char *);
void *Calloc(size_t nelements, size_t size) {
  void *back;
  back = calloc(nelements, size);
  if (back == NULL)
    errx(1, "Ran out of memory.");
  return (back);
}


x86 assembly (clang, -O0):
<Calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115d <Calloc+0x3d>
mov    $0x1,%edi
lea    0xea8(%rip),%rsi
call   1030 <errx@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calloc>:
push   %rbx
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <Calloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <errx@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Ran out of memory.\00"
define i8* @Calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @errx(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [19 x i8] c"Ran out of memory.\00"
define noalias i8* @Calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ __SEV();
int /*<<< orphan*/ __WFE();
void cpu_sleep(void) {
  __WFE();
  __SEV();
  __WFE();
}


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

x86 assembly (clang, -O2):
<cpu_sleep>:
push   %rax
xor    %eax,%eax
call   1040 <__WFE@plt>
xor    %eax,%eax
call   1030 <__SEV@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__WFE@plt>

LLVM IR (-O0):
define void @cpu_sleep() {
%1 = call i32 (...) @__WFE()
%2 = call i32 (...) @__SEV()
%3 = call i32 (...) @__WFE()
ret void
}

LLVM IR (-O2):
define void @cpu_sleep() {
%1 = tail call i32 (...) @__WFE()
%2 = tail call i32 (...) @__SEV()
%3 = tail call i32 (...) @__WFE()
ret void
}
int align_guy() {}


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

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

LLVM IR (-O0):
define i32 @align_guy() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @align_guy() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ close_aux(int);
scalar_t__ dup2(int, int);
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void dup2_aux(int old, int new) {
  if (old != new) {
    if (dup2(old, new) < 0) {
      error("esh: I/O redirection failed.");
      exit(EXIT_FAILURE);
    }
    close_aux(old);
  }
}


x86 assembly (clang, -O0):
<dup2_aux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1191 <dup2_aux+0x51>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <dup2@plt>
cmp    $0x0,%rax
jge    1189 <dup2_aux+0x49>
lea    0xe8a(%rip),%rdi
call   1050 <error@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
mov    -0x4(%rbp),%edi
call   1030 <close_aux@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup2_aux>:
push   %rbx
cmp    %esi,%edi
jne    1147 <dup2_aux+0x7>
pop    %rbx
ret
mov    %edi,%ebx
call   1040 <dup2@plt>
test   %rax,%rax
js     115b <dup2_aux+0x1b>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close_aux@plt>
lea    0xe9e(%rip),%rdi
call   1050 <error@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"esh: I/O redirection failed.\00"
@EXIT_FAILURE = global i32 0
define void @dup2_aux(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 ne i32 %5, %6
br i1 %7, label %8, label %20
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i64 @dup2(i32 %9, i32 %10)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = call i32 @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
17: ; preds = %8
%18 = load i32, i32* %3
%19 = call i32 @close_aux(i32 %18)
br label %20
20: ; preds = %17, %2
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"esh: I/O redirection failed.\00"
@EXIT_FAILURE = global i32 0
define void @dup2_aux(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = tail call i64 @dup2(i32 %0, i32 %1)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i32 @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %4
%12 = tail call i32 @close_aux(i32 %0)
br label %13
13: ; preds = %11, %2
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_is_auth(__le16 fc) {
  return (fc & __cpu_to_le16(0x000c | 0x00f0)) ==
         __cpu_to_le16(0x0000 | 0x00B0);
}


x86 assembly (clang, -O0):
<ieee80211_is_auth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xb0,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_auth>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0xb0,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_auth(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @__cpu_to_le16(i32 176)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_auth(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @__cpu_to_le16(i32 176)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void rtp_set_type(uint8_t *p_rtp, uint8_t i_type) { p_rtp[1] = i_type; }


x86 assembly (clang, -O0):
<rtp_set_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rtp_set_type(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 1
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @rtp_set_type(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %1, i32* %3
ret void
}
char *hash_plugin_detailed(void) {
  return ("apr1 - Apache apr1 plugin\n"
          "------------------------\n"
          "Use this module to crack Apache apr1 passwords\n"
          "Input should be in form: \'user:hash\' or \'hash\'. htpasswd files "
          "accepted using -f\n"
          "Known software that uses this password hashing method:\n"
          "Apache web server\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


x86 assembly (clang, -O0):
<hash_plugin_detailed>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_detailed>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [298 x i8] c"apr1 - Apache apr1 plugin\0A------------------------\0AUse this module to crack Apache apr1 passwords\0AInput should be in form: 'user:hash' or 'hash'. htpasswd files accepted using -f\0AKnown software that uses this password hashing method:\0AApache web server\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([298 x i8], [298 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [298 x i8] c"apr1 - Apache apr1 plugin\0A------------------------\0AUse this module to crack Apache apr1 passwords\0AInput should be in form: 'user:hash' or 'hash'. htpasswd files accepted using -f\0AKnown software that uses this password hashing method:\0AApache web server\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([298 x i8], [298 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct i2c {
  int dummy;
};

/* Variables and functions */
long getBCD(int /*<<< orphan*/);
int /*<<< orphan*/ getByte(struct i2c *, int, int);
long getTemperature(struct i2c *i2c, int sensor) {
  return getBCD(getByte(i2c, 0x69, 0x0c + sensor));
}


x86 assembly (clang, -O0):
<getTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
add    $0xc,%edx
mov    $0x69,%esi
call   1030 <getByte@plt>
mov    %eax,%edi
call   1040 <getBCD@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTemperature>:
push   %rax
lea    0xc(%rsi),%edx
mov    $0x69,%esi
call   1030 <getByte@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <getBCD@plt>

LLVM IR (-O0):
%struct.i2c = type { i32 }
define i64 @getTemperature(%struct.i2c* %0, i32 %1) {
%3 = alloca %struct.i2c*
%4 = alloca i32
store %struct.i2c* %0, %struct.i2c** %3
store i32 %1, i32* %4
%5 = load %struct.i2c*, %struct.i2c** %3
%6 = load i32, i32* %4
%7 = add nsw i32 12, %6
%8 = call i32 @getByte(%struct.i2c* %5, i32 105, i32 %7)
%9 = call i64 @getBCD(i32 %8)
ret i64 %9
}

LLVM IR (-O2):
%struct.i2c = type { i32 }
define i64 @getTemperature(%struct.i2c* %0, i32 %1) {
%3 = add nsw i32 %1, 12
%4 = tail call i32 @getByte(%struct.i2c* %0, i32 105, i32 %3)
%5 = tail call i64 @getBCD(i32 %4)
ret i64 %5
}
int irc_config_server_default_check_notify(void *data,
                                           struct t_config_option *option,
                                           const char *value) {
  (void)data;
  (void)option;
  if (value && value[0])
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<irc_config_server_default_check_notify>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1137 <irc_config_server_default_check_notify+0x37>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1137 <irc_config_server_default_check_notify+0x37>
movl   $0x0,-0x4(%rbp)
jmp    113e <irc_config_server_default_check_notify+0x3e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_config_server_default_check_notify>:
test   %rdx,%rdx
je     110d <irc_config_server_default_check_notify+0xd>
xor    %eax,%eax
cmpb   $0x0,(%rdx)
je     110d <irc_config_server_default_check_notify+0xd>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
%struct.t_config_option = type opaque
define i32 @irc_config_server_default_check_notify(i8* %0, %struct.t_config_option* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.t_config_option*
%7 = alloca i8*
store i8* %0, i8** %5
store %struct.t_config_option* %1, %struct.t_config_option** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %5
%9 = load %struct.t_config_option*, %struct.t_config_option** %6
%10 = load i8*, i8** %7
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %19
12: ; preds = %3
%13 = load i8*, i8** %7
%14 = getelementptr inbounds i8, i8* %13, i64 0
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %12
store i32 0, i32* %4
br label %20
19: ; preds = %12, %3
store i32 1, i32* %4
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
%struct.t_config_option = type opaque
define i32 @irc_config_server_default_check_notify(i8* nocapture readnone %0, %struct.t_config_option* nocapture readnone %1, i8* %2) {
%4 = icmp eq i8* %2, null
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = load i8, i8* %2
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5, %3
br label %9
9: ; preds = %5, %8
%10 = phi i32 [ 1, %8 ], [ 0, %5 ]
ret i32 %10
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvinwstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvinwstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvinwstr+0x2a>
jmp    1170 <cmd_mvinwstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvinwstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvinwstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvinwstr(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 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvinwstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
int sleep_monitor_unregister_ops(int device_type) {}


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

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

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

LLVM IR (-O2):
define i32 @sleep_monitor_unregister_ops(i32 %0) {
ret i32 undef
}
double convert(long long l) { return (double)l; }


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

x86 assembly (clang, -O2):
<convert>:
cvtsi2sd %rdi,%xmm0
ret

LLVM IR (-O0):
define double @convert(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to double
ret double %4
}

LLVM IR (-O2):
define double @convert(i64 %0) {
%2 = sitofp i64 %0 to double
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ gen_ptrtoint_helper(int, int);
int /*<<< orphan*/ limit2_i32(int *, int /*<<< orphan*/, int);
int ptrtoint_helper(int);
void test_ptrtoint() {
  int a = 28, r = 0;
  limit2_i32(&a, 0, 28);
  r = ptrtoint_helper(a);
  gen_ptrtoint_helper(a, r);
}


x86 assembly (clang, -O0):
<test_ptrtoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1c,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
mov    $0x1c,%edx
call   1050 <limit2_i32@plt>
mov    -0x4(%rbp),%edi
call   1030 <ptrtoint_helper@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <gen_ptrtoint_helper@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ptrtoint>:
push   %rax
movl   $0x1c,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %esi,%esi
mov    $0x1c,%edx
call   1050 <limit2_i32@plt>
mov    0x4(%rsp),%edi
call   1030 <ptrtoint_helper@plt>
mov    0x4(%rsp),%edi
mov    %eax,%esi
call   1040 <gen_ptrtoint_helper@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_ptrtoint() {
%1 = alloca i32
%2 = alloca i32
store i32 28, i32* %1
store i32 0, i32* %2
%3 = call i32 @limit2_i32(i32* %1, i32 0, i32 28)
%4 = load i32, i32* %1
%5 = call i32 @ptrtoint_helper(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @gen_ptrtoint_helper(i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @test_ptrtoint() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 28, i32* %1
%3 = call i32 @limit2_i32(i32* %1, i32 0, i32 28)
%4 = load i32, i32* %1
%5 = call i32 @ptrtoint_helper(i32 %4)
%6 = load i32, i32* %1
%7 = call i32 @gen_ptrtoint_helper(i32 %6, i32 %5)
ret void
}
void log_set_server_mode(int mode) {
  { (mode) = (mode); };
}


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

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

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

LLVM IR (-O2):
define void @log_set_server_mode(i32 %0) {
ret void
}
int paritykr(unsigned i) {
  int p;
  for (p = 0; i; i &= (i - 1))
    p = !p;
  return p;
}


x86 assembly (clang, -O0):
<paritykr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113a <paritykr+0x3a>
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110e <paritykr+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<paritykr>:
xor    %eax,%eax
test   %edi,%edi
je     111c <paritykr+0x1c>
cs nopw 0x0(%rax,%rax,1)
xor    $0x1,%eax
lea    -0x1(%rdi),%ecx
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <paritykr+0x10>
ret

LLVM IR (-O0):
define i32 @paritykr(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
store i32 %11, i32* %3
br label %12
12: ; preds = %7
%13 = load i32, i32* %2
%14 = sub i32 %13, 1
%15 = load i32, i32* %2
%16 = and i32 %15, %14
store i32 %16, i32* %2
br label %4
17: ; preds = %4
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @paritykr(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = xor i32 %4, 1
%7 = add i32 %5, -1
%8 = and i32 %7, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %11
}
/* Variables and functions */
char const *gettext(char *);
const char *path_utils_error_string(int error) {
  switch (error) {
  case 0:
    return gettext("Success");
  case (-3000 + 1):
    return gettext("Path could not be fully normalized");
  }
  return NULL;
}


x86 assembly (clang, -O0):
<path_utils_error_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xfffff449,%eax
je     1156 <path_utils_error_string+0x46>
jmp    1131 <path_utils_error_string+0x21>
mov    -0x10(%rbp),%eax
test   %eax,%eax
jne    116b <path_utils_error_string+0x5b>
jmp    1141 <path_utils_error_string+0x31>
lea    0xeb8(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,-0x8(%rbp)
jmp    1173 <path_utils_error_string+0x63>
lea    0xeab(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,-0x8(%rbp)
jmp    1173 <path_utils_error_string+0x63>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_utils_error_string>:
test   %edi,%edi
je     1128 <path_utils_error_string+0x18>
cmp    $0xfffff449,%edi
jne    1134 <path_utils_error_string+0x24>
lea    0xee5(%rip),%rdi
jmp    1030 <gettext@plt>
lea    0xed1(%rip),%rdi
jmp    1030 <gettext@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Success\00"
@.str.1 = [35 x i8] c"Path could not be fully normalized\00"
define i8* @path_utils_error_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 -2999, label %7
]
5: ; preds = %1
%6 = call i8* @gettext(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %2
br label %10
7: ; preds = %1
%8 = call i8* @gettext(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %2
br label %10
9: ; preds = %1
store i8* null, i8** %2
br label %10
10: ; preds = %9, %7, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [8 x i8] c"Success\00"
@.str.1 = [35 x i8] c"Path could not be fully normalized\00"
define i8* @path_utils_error_string(i32 %0) {
switch i32 %0, label %6 [
i32 0, label %3
i32 -2999, label %2
]
2: ; preds = %1
br label %3
3: ; preds = %1, %2
%4 = phi i8* [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
%5 = tail call i8* @gettext(i8* %4)
br label %6
6: ; preds = %3, %1
%7 = phi i8* [ null, %1 ], [ %5, %3 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ MainGame_run();
int main(void) {
  MainGame_run();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @MainGame_run()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @MainGame_run()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EA_AY_PI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int /*<<< orphan*/);
void m68k_op_sf_8_pi(void) { m68ki_write_8(EA_AY_PI_8(), 0); }


x86 assembly (clang, -O0):
<m68k_op_sf_8_pi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <EA_AY_PI_8@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <m68ki_write_8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_sf_8_pi>:
push   %rax
xor    %eax,%eax
call   1030 <EA_AY_PI_8@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_sf_8_pi() {
%1 = call i32 (...) @EA_AY_PI_8()
%2 = call i32 @m68ki_write_8(i32 %1, i32 0)
ret void
}

LLVM IR (-O2):
define void @m68k_op_sf_8_pi() {
%1 = tail call i32 (...) @EA_AY_PI_8()
%2 = tail call i32 @m68ki_write_8(i32 %1, i32 0)
ret void
}
/* Variables and functions */
int TestModel();
int /*<<< orphan*/ printf(char *);
int main(void) {
  int resu = TestModel();
  if (resu)
    printf("Model test OK !\n");
  else
    printf("Model test failed !\n");
  return !resu;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <TestModel@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1154 <main+0x34>
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
jmp    1160 <main+0x40>
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <TestModel@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
lea    0xeca(%rip),%rax
lea    0xed7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Model test OK !\0A\00"
@.str.1 = [21 x i8] c"Model test failed !\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @TestModel()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %2
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
@str = [20 x i8] c"Model test failed !\00"
@str.2 = [16 x i8] c"Model test OK !\00"
define i32 @main() {
%1 = tail call i32 (...) @TestModel()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
%5 = zext i1 %2 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void logger_cleanup() { closelog(); }


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

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

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

LLVM IR (-O2):
define void @logger_cleanup() {
%1 = tail call i32 (...) @closelog()
ret void
}
const char *vde_chain_nm4_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  case 2:
    return "o2";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<vde_chain_nm4_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113c <vde_chain_nm4_name_out+0x3c>
jmp    111a <vde_chain_nm4_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <vde_chain_nm4_name_out+0x4c>
jmp    112b <vde_chain_nm4_name_out+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <vde_chain_nm4_name_out+0x5c>
jmp    116c <vde_chain_nm4_name_out+0x6c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm4_name_out+0x74>
lea    0xeb0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm4_name_out+0x74>
lea    0xea3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm4_name_out+0x74>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm4_name_out>:
cmp    $0x2,%edi
ja     1117 <vde_chain_nm4_name_out+0x17>
movslq %edi,%rax
lea    0xefd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
define i8* @vde_chain_nm4_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* null, i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
@reltable.vde_chain_nm4_name_out = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm4_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm4_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm4_name_out to i64)) to i32)]
define i8* @vde_chain_nm4_name_out(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.vde_chain_nm4_name_out to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
int foo(C)
char C;
{ return C; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movsbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;
struct ip {
  scalar_t__ ip_p;
};

/* Variables and functions */
scalar_t__ IPPROTO_TCP;
int isTCP(const u_char *p, int source) {
  return ((struct ip *)(p + 14))->ip_p == IPPROTO_TCP;
}


x86 assembly (clang, -O0):
<isTCP>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rax
mov    0x2ece(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isTCP>:
mov    0x38(%rdi),%rcx
mov    0x2edd(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
sete   %al
ret

LLVM IR (-O0):
%struct.ip = type { i64 }
@IPPROTO_TCP = global i64 0
define i32 @isTCP(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 = getelementptr inbounds i32, i32* %5, i64 14
%7 = bitcast i32* %6 to %struct.ip*
%8 = getelementptr inbounds %struct.ip, %struct.ip* %7, i32 0, i32 0
%9 = load i64, i64* %8
%10 = load i64, i64* @IPPROTO_TCP
%11 = icmp eq i64 %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@IPPROTO_TCP = global i64 0
define i32 @isTCP(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 14
%4 = bitcast i32* %3 to i64*
%5 = load i64, i64* %4
%6 = load i64, i64* @IPPROTO_TCP
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
struct list_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_cmdline_parser_release(struct list_args_info *);
void list_cmdline_parser_free(struct list_args_info *args_info) {
  list_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<list_cmdline_parser_free>:
jmp    1030 <list_cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.list_args_info = type { i32 }
define void @list_cmdline_parser_free(%struct.list_args_info* %0) {
%2 = tail call i32 @list_cmdline_parser_release(%struct.list_args_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int _ioperm(int /*<<< orphan*/, int, int);
int _iopl(unsigned int level) {
  if (level > 3) {
    __set_errno(EINVAL);
    return -1;
  }
  if (level) {
    return _ioperm(0, 0x10000, 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<_iopl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jbe    114f <_iopl+0x2f>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <_iopl+0x59>
cmpl   $0x0,-0x8(%rbp)
je     1172 <_iopl+0x52>
xor    %edi,%edi
mov    $0x10000,%esi
mov    $0x1,%edx
call   1040 <_ioperm@plt>
mov    %eax,-0x4(%rbp)
jmp    1179 <_iopl+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_iopl>:
cmp    $0x4,%edi
jb     113e <_iopl+0x1e>
push   %rax
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
ret
test   %edi,%edi
je     1153 <_iopl+0x33>
xor    %edi,%edi
mov    $0x10000,%esi
mov    $0x1,%edx
jmp    1040 <_ioperm@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @_iopl(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ugt i32 %4, 3
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EINVAL
%8 = call i32 @__set_errno(i32 %7)
store i32 -1, i32* %2
br label %15
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @_ioperm(i32 0, i32 65536, i32 1)
store i32 %13, i32* %2
br label %15
14: ; preds = %9
store i32 0, i32* %2
br label %15
15: ; preds = %14, %12, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @_iopl(i32 %0) {
%2 = icmp ugt i32 %0, 3
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @EINVAL
%5 = tail call i32 @__set_errno(i32 %4)
br label %10
6: ; preds = %1
%7 = icmp eq i32 %0, 0
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @_ioperm(i32 0, i32 65536, i32 1)
br label %10
10: ; preds = %6, %8, %3
%11 = phi i32 [ -1, %3 ], [ %9, %8 ], [ 0, %6 ]
ret i32 %11
}
/* Variables and functions */
int test_svarint(int);
char *test_svarint4() {
  do {
    if (!(test_svarint(0x01c7) == -100))
      return "error, test_svarint4";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_svarint4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1c7,%edi
call   1030 <test_svarint@plt>
cmp    $0xffffff9c,%eax
je     113b <test_svarint4+0x2b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1148 <test_svarint4+0x38>
jmp    1140 <test_svarint4+0x30>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_svarint4>:
push   %rax
mov    $0x1c7,%edi
call   1030 <test_svarint@plt>
xor    %ecx,%ecx
cmp    $0xffffff9c,%eax
lea    0xed9(%rip),%rax
cmovne %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"error, test_svarint4\00"
define i8* @test_svarint4() {
%1 = alloca i8*
br label %2
2: ; preds = %0
%3 = call i32 @test_svarint(i32 455)
%4 = icmp eq i32 %3, -100
br i1 %4, label %6, label %5
5: ; preds = %2
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8** %1
br label %8
6: ; preds = %2
br label %7
7: ; preds = %6
store i8* null, i8** %1
br label %8
8: ; preds = %7, %5
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
@.str = [21 x i8] c"error, test_svarint4\00"
define i8* @test_svarint4() {
%1 = tail call i32 @test_svarint(i32 455)
%2 = icmp eq i32 %1, -100
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void put_uint32le(unsigned char *p, uint32_t x) {
  p[0] = x & 0xff;
  p[1] = (x >> 8) & 0xff;
  p[2] = (x >> 16) & 0xff;
  p[3] = (x >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<put_uint32le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%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):
<put_uint32le>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @put_uint32le(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
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fclose(int /*<<< orphan*/ *);
int pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *stdout;
int close_as_file(int mode, FILE *f) {
  int ret = 0;
  if ((mode & (1 << 3)) && (mode & (1 << 1)))
    ret = pclose(f);
  else if (f != stdout)
    ret = fclose(f);
  f = NULL;
  return ret;
}


x86 assembly (clang, -O0):
<close_as_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1165 <close_as_file+0x45>
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1165 <close_as_file+0x45>
mov    -0x10(%rbp),%rdi
call   1040 <pclose@plt>
mov    %eax,-0x14(%rbp)
jmp    118a <close_as_file+0x6a>
mov    -0x10(%rbp),%rax
mov    0x2e70(%rip),%rcx
cmp    (%rcx),%rax
je     1185 <close_as_file+0x65>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    %eax,-0x14(%rbp)
jmp    118a <close_as_file+0x6a>
movq   $0x0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_as_file>:
not    %edi
test   $0xa,%dil
jne    1130 <close_as_file+0x10>
mov    %rsi,%rdi
jmp    1040 <pclose@plt>
mov    0x2ea9(%rip),%rax
cmp    %rsi,(%rax)
je     1144 <close_as_file+0x24>
mov    %rsi,%rdi
jmp    1030 <fclose@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
@stdout = global i32* null
define i32 @close_as_file(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = and i32 %6, 8
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i32, i32* %3
%11 = and i32 %10, 2
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32*, i32** %4
%15 = call i32 @pclose(i32* %14)
store i32 %15, i32* %5
br label %24
16: ; preds = %9, %2
%17 = load i32*, i32** %4
%18 = load i32*, i32** @stdout
%19 = icmp ne i32* %17, %18
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i32*, i32** %4
%22 = call i32 @fclose(i32* %21)
store i32 %22, i32* %5
br label %23
23: ; preds = %20, %16
br label %24
24: ; preds = %23, %13
store i32* null, i32** %4
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
@stdout = global i32* null
define i32 @close_as_file(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, 10
%4 = icmp eq i32 %3, 10
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @pclose(i32* %1)
br label %12
7: ; preds = %2
%8 = load i32*, i32** @stdout
%9 = icmp eq i32* %8, %1
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 @fclose(i32* %1)
br label %12
12: ; preds = %7, %10, %5
%13 = phi i32 [ %6, %5 ], [ %11, %10 ], [ 0, %7 ]
ret i32 %13
}
void INI_Rename_Generic1() { ; }


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

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

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

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