xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xff() {
  Assert_real((isspace(255) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              1280, ("isspace should be 0 for 0xff"));
}


x86 assembly (clang, -O0):
<t_isspace_0xff>:
push   %rbp
mov    %rsp,%rbp
mov    $0xff,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x500,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0xff>:
push   %rax
mov    $0xff,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x500,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xff\00"
define void @t_isspace_0xff() {
%1 = call i64 @isspace(i32 255)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1280, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xff\00"
define void @t_isspace_0xff() {
%1 = tail call i64 @isspace(i32 255)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1280, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main() {
  int a = 10;
  int b = 20;
  if (a == 10) {
    if (b == 20) {
      return 1;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    113e <main+0x3e>
cmpl   $0x14,-0xc(%rbp)
jne    1139 <main+0x39>
movl   $0x1,-0x4(%rbp)
jmp    113e <main+0x3e>
jmp    113e <main+0x3e>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ infinite_loop();
void cause_calamity() { infinite_loop(); }


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

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

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

LLVM IR (-O2):
define void @cause_calamity() {
%1 = tail call i32 (...) @infinite_loop()
ret void
}
char *dtostrf(double val, signed char width, unsigned char prec, char *s) {
  s[0] = '_';
  s[1] = '_';
  s[2] = '_';
  s[3] = '\0';
  return s;
}


x86 assembly (clang, -O0):
<dtostrf>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
movsd  %xmm0,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x5f,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x5f,0x1(%rax)
mov    -0x18(%rbp),%rax
movb   $0x5f,0x2(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,0x3(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtostrf>:
mov    %rdx,%rax
movl   $0x5f5f5f,(%rdx)
ret

LLVM IR (-O0):
define i8* @dtostrf(double %0, i8 signext %1, i8 zeroext %2, i8* %3) {
%5 = alloca double
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8*
store double %0, double* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 95, i8* %10
%11 = load i8*, i8** %8
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8 95, i8* %12
%13 = load i8*, i8** %8
%14 = getelementptr inbounds i8, i8* %13, i64 2
store i8 95, i8* %14
%15 = load i8*, i8** %8
%16 = getelementptr inbounds i8, i8* %15, i64 3
store i8 0, i8* %16
%17 = load i8*, i8** %8
ret i8* %17
}

LLVM IR (-O2):
define i8* @dtostrf(double %0, i8 signext %1, i8 zeroext %2, i8* returned writeonly %3) {
store i8 95, i8* %3
%5 = getelementptr inbounds i8, i8* %3, i64 1
store i8 95, i8* %5
%6 = getelementptr inbounds i8, i8* %3, i64 2
store i8 95, i8* %6
%7 = getelementptr inbounds i8, i8* %3, i64 3
store i8 0, i8* %7
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void printUsage(char *cmd) {
  printf("Usage: %s -- args stolen by Dr Evil\n", cmd);
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"Usage: %s -- args stolen by Dr Evil\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"Usage: %s -- args stolen by Dr Evil\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
unsigned long native_save_flags(void) {
  unsigned long flags;
  asm volatile("pushf; pop %0" : "=rm"(flags) : : "memory");
  return flags;
}


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

x86 assembly (clang, -O2):
<native_save_flags>:
pushf
pop    -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define i64 @native_save_flags() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = load i64, i64* %1
ret i64 %3
}
/* Variables and functions */
int tee(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  int fd_in = 3;
  int fd_out = 4;
  return tee(fd_in, fd_out, ~0, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0xffffffff,%edx
xor    %ecx,%ecx
call   1030 <tee@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x3,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
xor    %ecx,%ecx
jmp    1030 <tee@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @tee(i32 3, i32 4, i32 -1, i32 0)
ret i32 %1
}
/* Type definitions */
struct symbol_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_token_alloc();
struct symbol_list *sparse_keep_tokens(char *);
struct symbol_list *__sparse(char *filename) {
  struct symbol_list *res;
  res = sparse_keep_tokens(filename);
  clear_token_alloc();
  return res;
}


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

x86 assembly (clang, -O2):
<__sparse>:
push   %rbx
call   1040 <sparse_keep_tokens@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <clear_token_alloc@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.symbol_list = type { i32 }
define %struct.symbol_list* @__sparse(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.symbol_list*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.symbol_list* @sparse_keep_tokens(i8* %4)
store %struct.symbol_list* %5, %struct.symbol_list** %3
%6 = call i32 (...) @clear_token_alloc()
%7 = load %struct.symbol_list*, %struct.symbol_list** %3
ret %struct.symbol_list* %7
}

LLVM IR (-O2):
%struct.symbol_list = type { i32 }
define %struct.symbol_list* @__sparse(i8* %0) {
%2 = tail call %struct.symbol_list* @sparse_keep_tokens(i8* %0)
%3 = tail call i32 (...) @clear_token_alloc()
ret %struct.symbol_list* %2
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int main() {
  strlen("123456789");
  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 <strlen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"123456789\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"123456789\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void omap_control_usb_host_mode(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @omap_control_usb_host_mode(%struct.device* nocapture %0) {
ret void
}
void RTSemEventMultiWaitExDebug(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemEventMultiWaitExDebug() {
ret void
}
/* Variables and functions */
float asinf(float const);
void glmASin3f(float out[3], const float x[3]) {
  for (size_t i = 0; i < 3; ++i)
    out[i] = asinf(x[i]);
}


x86 assembly (clang, -O0):
<glmASin3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x3,-0x18(%rbp)
jae    1163 <glmASin3f+0x53>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <asinf@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <glmASin3f+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmASin3f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movss  (%rsi),%xmm0
call   1030 <asinf@plt>
movss  %xmm0,(%r14)
movss  0x4(%rbx),%xmm0
call   1030 <asinf@plt>
movss  %xmm0,0x4(%r14)
movss  0x8(%rbx),%xmm0
call   1030 <asinf@plt>
movss  %xmm0,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @glmASin3f(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = tail call float @asinf(float %3)
store float %4, float* %0
%5 = getelementptr inbounds float, float* %1, i64 1
%6 = load float, float* %5
%7 = tail call float @asinf(float %6)
%8 = getelementptr inbounds float, float* %0, i64 1
store float %7, float* %8
%9 = getelementptr inbounds float, float* %1, i64 2
%10 = load float, float* %9
%11 = tail call float @asinf(float %10)
%12 = getelementptr inbounds float, float* %0, i64 2
store float %11, float* %12
ret void
}
int find_value(int *values, int len, int v) {
  int i;
  i = 0;
  while (i < len) {
    if (values[i] == v)
      break;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<find_value>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1148 <find_value+0x48>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
jne    113a <find_value+0x3a>
jmp    1148 <find_value+0x48>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <find_value+0x15>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_value>:
test   %esi,%esi
jle    1121 <find_value+0x21>
mov    %esi,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmp    %edx,(%rdi,%rax,4)
je     1120 <find_value+0x20>
add    $0x1,%rax
cmp    %rax,%rcx
jne    1110 <find_value+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @find_value(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
store i32 0, i32* %7
br label %8
8: ; preds = %21, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32, i32* %6
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %12
br label %24
21: ; preds = %12
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %8
24: ; preds = %20, %8
%25 = load i32, i32* %7
ret i32 %25
}

LLVM IR (-O2):
define i32 @find_value(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ 0, %3 ], [ %16, %15 ], [ %1, %12 ]
ret i32 %18
}
void INT_Excep_TMR1_CMIB1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR1_CMIB1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_mic_err_usage(void) {
  printf("\nUsage : mic_err <STA_MAC_ADDRESS>\n");
  return;
}


x86 assembly (clang, -O0):
<print_mic_err_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_mic_err_usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"\0AUsage : mic_err <STA_MAC_ADDRESS>\0A\00"
define void @print_mic_err_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [35 x i8] c"\0AUsage : mic_err <STA_MAC_ADDRESS>\00"
define void @print_mic_err_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void myOnDomainRegistered(char *domain) {
  printf("myOnDomainRegistered %s\n", domain);
}


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

x86 assembly (clang, -O2):
<myOnDomainRegistered>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"myOnDomainRegistered %s\0A\00"
define void @myOnDomainRegistered(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"myOnDomainRegistered %s\0A\00"
define void @myOnDomainRegistered(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
void *allocatePages(size_t);
void *liballoc_alloc(size_t pages) { return allocatePages(pages); }


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

x86 assembly (clang, -O2):
<liballoc_alloc>:
jmp    1030 <allocatePages@plt>

LLVM IR (-O0):
define i8* @liballoc_alloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @allocatePages(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @liballoc_alloc(i64 %0) {
%2 = tail call i8* @allocatePages(i64 %0)
ret i8* %2
}
/* Variables and functions */
int strcmp(char *, char *);
int strcmp_reverse(char *s1, char *s2) { return (-1) * strcmp(s1, s2); }


x86 assembly (clang, -O0):
<strcmp_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
imul   $0xffffffff,%eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_reverse>:
push   %rax
call   1030 <strcmp@plt>
neg    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @strcmp_reverse(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 @strcmp(i8* %5, i8* %6)
%8 = mul nsw i32 -1, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @strcmp_reverse(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Halt();
int /*<<< orphan*/ MyAppend(char *, char *, char *);
int /*<<< orphan*/ Print(char *);
void main() {
  Print("=== Append program initiated ===\n");
  MyAppend("file1.txt", "file2.txt", "file3.txt");
  Print("=== Append program terminated ===\n");
  Halt();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <Print@plt>
lea    0xedb(%rip),%rdi
lea    0xede(%rip),%rsi
lea    0xee1(%rip),%rdx
call   1030 <MyAppend@plt>
lea    0xedf(%rip),%rdi
call   1040 <Print@plt>
mov    $0x0,%al
call   1050 <Halt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <Print@plt>
lea    0xede(%rip),%rdi
lea    0xee1(%rip),%rsi
lea    0xee4(%rip),%rdx
call   1030 <MyAppend@plt>
lea    0xee2(%rip),%rdi
call   1040 <Print@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <Halt@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"=== Append program initiated ===\0A\00"
@.str.1 = [10 x i8] c"file1.txt\00"
@.str.2 = [10 x i8] c"file2.txt\00"
@.str.3 = [10 x i8] c"file3.txt\00"
@.str.4 = [35 x i8] c"=== Append program terminated ===\0A\00"
define void @main() {
%1 = call i32 @Print(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @MyAppend(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 @Print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%4 = call i32 (...) @Halt()
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"=== Append program initiated ===\0A\00"
@.str.1 = [10 x i8] c"file1.txt\00"
@.str.2 = [10 x i8] c"file2.txt\00"
@.str.3 = [10 x i8] c"file3.txt\00"
@.str.4 = [35 x i8] c"=== Append program terminated ===\0A\00"
define void @main() {
%1 = tail call i32 @Print(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @MyAppend(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @Print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 (...) @Halt()
ret void
}
void rtems_start_network_services(void) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_vscale_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, char *const *, char *const *);
void exec_bin_bash(void) {
  char *const argv[1] = {NULL};
  char *const envp[1] = {NULL};
  execve("/bin/bash", argv, envp);
}


x86 assembly (clang, -O0):
<exec_bin_bash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    0xea9(%rip),%rdi
call   1040 <execve@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_bin_bash>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0xed3(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <execve@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/bin/bash\00"
define void @exec_bin_bash() {
%1 = alloca [1 x i8*]
%2 = alloca [1 x i8*]
%3 = bitcast [1 x i8*]* %1 to i8*
%4 = bitcast [1 x i8*]* %2 to i8*
%5 = getelementptr inbounds [1 x i8*], [1 x i8*]* %1, i64 0, i64 0
%6 = getelementptr inbounds [1 x i8*], [1 x i8*]* %2, i64 0, i64 0
%7 = call i32 @execve(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %5, i8** %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"/bin/bash\00"
define void @exec_bin_bash() {
%1 = alloca [1 x i8*]
%2 = alloca [1 x i8*]
%3 = bitcast [1 x i8*]* %1 to i8*
%4 = bitcast [1 x i8*]* %1 to i64*
store i64 0, i64* %4
%5 = bitcast [1 x i8*]* %2 to i8*
%6 = bitcast [1 x i8*]* %2 to i64*
store i64 0, i64* %6
%7 = getelementptr inbounds [1 x i8*], [1 x i8*]* %1, i64 0, i64 0
%8 = getelementptr inbounds [1 x i8*], [1 x i8*]* %2, i64 0, i64 0
%9 = call i32 @execve(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %7, i8** %8)
ret void
}
/* Variables and functions */
float __nv_frcp_rd(float);
float __frcp_rd(float __a) { return __nv_frcp_rd(__a); }


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

x86 assembly (clang, -O2):
<__frcp_rd>:
jmp    1030 <__nv_frcp_rd@plt>

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

LLVM IR (-O2):
define float @__frcp_rd(float %0) {
%2 = tail call float @__nv_frcp_rd(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ exit_wrapper_preamble(int /*<<< orphan*/);
void __attribute__((destructor)) init() { exit_wrapper_preamble(0); }


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit_wrapper_preamble@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
xor    %edi,%edi
jmp    1030 <exit_wrapper_preamble@plt>

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
define void @init() {
%1 = call i32 @exit_wrapper_preamble(i32 0)
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
define void @init() {
%1 = tail call i32 @exit_wrapper_preamble(i32 0)
ret void
}
void MM_Shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @MM_Shutdown() {
ret void
}
int digital(int port) {}


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

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

LLVM IR (-O0):
define i32 @digital(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 @digital(i32 %0) {
ret i32 undef
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int libcfile;
  struct stat statbuf;
  void *libcbuf, *libc;
  void (*my_printf)(char *, char *);
  printf("Hello, %s!\n", "world");
  return 0;
}


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

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

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [12 x i8] c"Hello, %s!\0A\00"
@.str.1 = [6 x i8] c"world\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.stat
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca void (i8*, i8*)*
store i32 0, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello, %s!\0A\00"
@.str.1 = [6 x i8] c"world\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
char **get_grid(int x, int y) {}


x86 assembly (clang, -O0):
<get_grid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8** @get_grid(i32 %0, i32 %1) {
ret i8** undef
}
int test_imm_72int64_midword_reg(long long val) {
  return ((val >> 16) & (0x72 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_72int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x72,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_72int64_midword_reg>:
test   $0x720000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_72int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 114
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_72int64_midword_reg(i64 %0) {
%2 = and i64 %0, 7471104
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void *malloc(int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void *sim_malloc(int size) {
  void *ptr = malloc(size);
  if (NULL == ptr)
    error("out of memory");
  memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<sim_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    115f <sim_malloc+0x2f>
lea    0xea6(%rip),%rdi
call   1050 <error@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sim_malloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114e <sim_malloc+0x1e>
lea    0xeb7(%rip),%rdi
call   1050 <error@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define i8* @sim_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
ret i8* %2
}
void XcmsCIELabQueryMinL() {}


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

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

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

LLVM IR (-O2):
define void @XcmsCIELabQueryMinL() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int64_t _sint64(int64_t x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @_sint64(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ switcheroo_write(char *);
void switcheroo_on(void) { switcheroo_write("ON\n"); }


x86 assembly (clang, -O0):
<switcheroo_on>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <switcheroo_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<switcheroo_on>:
lea    0xee9(%rip),%rdi
jmp    1030 <switcheroo_write@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"ON\0A\00"
define void @switcheroo_on() {
%1 = call i32 @switcheroo_write(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"ON\0A\00"
define void @switcheroo_on() {
%1 = tail call i32 @switcheroo_write(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int get_sections(char ***);
int /*<<< orphan*/ printf(char *, char *);
void debian_list_sections() {
  int i;
  char **sections;
  int no_of_sections = get_sections(&sections);
  for (i = 0; i < no_of_sections; i++) {
    printf("%s\n", sections[i]);
  }
}


x86 assembly (clang, -O0):
<debian_list_sections>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
call   1040 <get_sections@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    116d <debian_list_sections+0x4d>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113b <debian_list_sections+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debian_list_sections>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
call   1040 <get_sections@plt>
test   %eax,%eax
jle    116a <debian_list_sections+0x4a>
mov    %eax,%r15d
xor    %ebx,%ebx
lea    0xebd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x8(%rsp),%rax
mov    (%rax,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1150 <debian_list_sections+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @debian_list_sections() {
%1 = alloca i8**
%2 = bitcast i8*** %1 to i8*
%3 = call i32 @get_sections(i8*** %1)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %0
%6 = zext i32 %3 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %13, %7 ]
%9 = load i8**, i8*** %1
%10 = getelementptr inbounds i8*, i8** %9, i64 %8
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %0
ret void
}
void bcm43xx_debugfs_remove_device(struct bcm43xx_private *bcm) {}


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

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

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

LLVM IR (-O2):
%struct.bcm43xx_private = type opaque
define void @bcm43xx_debugfs_remove_device(%struct.bcm43xx_private* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ generate(char *, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  char dest[100];
  generate(argv[1], dest, 100);
  printf("%s", dest);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x64,%edx
call   1040 <generate@plt>
lea    -0x80(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    0x8(%rsi),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x64,%edx
call   1040 <generate@plt>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [100 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%10 = call i32 @generate(i8* %8, i8* %9, i32 100)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @generate(i8* %6, i8* %4, i32 100)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool SSIBusy(uint32_t ui32Base) {
  ;
  return (((*((volatile uint32_t *)(ui32Base + 0x0000000C))) & 0x00000010)
              ? true
              : false);
}


x86 assembly (clang, -O0):
<SSIBusy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    (%rax),%edx
and    $0x10,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIBusy>:
movslq %edi,%rax
mov    0xc(%rax),%eax
shr    $0x4,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @SSIBusy(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 12
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 16
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @SSIBusy(i32 %0) {
%2 = add nsw i32 %0, 12
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = lshr i32 %5, 4
%7 = and i32 %6, 1
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
__attribute__((always_)) void B_BUF64(void *const buf, uint64_t const x) {
  *(uint64_t *)buf = x;
}


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

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

LLVM IR (-O0):
define void @B_BUF64(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @B_BUF64(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int /*<<< orphan*/ SSL_library_init();
int /*<<< orphan*/ SSL_load_error_strings();
void init_ssl(void) {
  SSL_library_init();
  ERR_load_crypto_strings();
  SSL_load_error_strings();
  OpenSSL_add_all_algorithms();
}


x86 assembly (clang, -O0):
<init_ssl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <SSL_library_init@plt>
mov    $0x0,%al
call   1060 <ERR_load_crypto_strings@plt>
mov    $0x0,%al
call   1050 <SSL_load_error_strings@plt>
mov    $0x0,%al
call   1040 <OpenSSL_add_all_algorithms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_ssl>:
push   %rax
xor    %eax,%eax
call   1030 <SSL_library_init@plt>
xor    %eax,%eax
call   1060 <ERR_load_crypto_strings@plt>
xor    %eax,%eax
call   1050 <SSL_load_error_strings@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <OpenSSL_add_all_algorithms@plt>

LLVM IR (-O0):
define void @init_ssl() {
%1 = call i32 (...) @SSL_library_init()
%2 = call i32 (...) @ERR_load_crypto_strings()
%3 = call i32 (...) @SSL_load_error_strings()
%4 = call i32 (...) @OpenSSL_add_all_algorithms()
ret void
}

LLVM IR (-O2):
define void @init_ssl() {
%1 = tail call i32 (...) @SSL_library_init()
%2 = tail call i32 (...) @ERR_load_crypto_strings()
%3 = tail call i32 (...) @SSL_load_error_strings()
%4 = tail call i32 (...) @OpenSSL_add_all_algorithms()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ compare_first_to_subsequent_syscalls();
int /*<<< orphan*/ print_avg_syscall();
void system_call_test(void) {
  compare_first_to_subsequent_syscalls();
  print_avg_syscall();
}


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

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

LLVM IR (-O0):
define void @system_call_test() {
%1 = call i32 (...) @compare_first_to_subsequent_syscalls()
%2 = call i32 (...) @print_avg_syscall()
ret void
}

LLVM IR (-O2):
define void @system_call_test() {
%1 = tail call i32 (...) @compare_first_to_subsequent_syscalls()
%2 = tail call i32 (...) @print_avg_syscall()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int portcheck(int port) {
  if (port <= 0) {
    fprintf(stderr, "Port not valid\n");
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<portcheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1146 <portcheck+0x36>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    114d <portcheck+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<portcheck>:
xor    %eax,%eax
test   %edi,%edi
jle    1117 <portcheck+0x7>
ret
push   %rax
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"Port not valid\0A\00"
define i32 @portcheck(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"Port not valid\0A\00"
define i32 @portcheck(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ 1, %3 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ htc_usb_enable_function(char *, int);
void android_switch_htc_mode(void) {
  htc_usb_enable_function("adb,mass_storage,serial,projector", 1);
}


x86 assembly (clang, -O0):
<android_switch_htc_mode>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <htc_usb_enable_function@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<android_switch_htc_mode>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <htc_usb_enable_function@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"adb,mass_storage,serial,projector\00"
define void @android_switch_htc_mode() {
%1 = call i32 @htc_usb_enable_function(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"adb,mass_storage,serial,projector\00"
define void @android_switch_htc_mode() {
%1 = tail call i32 @htc_usb_enable_function(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RCT2_CALLPROC_EBPSAFE(int);
void window_map_mouseup() { RCT2_CALLPROC_EBPSAFE(0x006BAFCA); }


x86 assembly (clang, -O0):
<window_map_mouseup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6bafca,%edi
call   1030 <RCT2_CALLPROC_EBPSAFE@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<window_map_mouseup>:
mov    $0x6bafca,%edi
jmp    1030 <RCT2_CALLPROC_EBPSAFE@plt>

LLVM IR (-O0):
define void @window_map_mouseup() {
%1 = call i32 @RCT2_CALLPROC_EBPSAFE(i32 7057354)
ret void
}

LLVM IR (-O2):
define void @window_map_mouseup() {
%1 = tail call i32 @RCT2_CALLPROC_EBPSAFE(i32 7057354)
ret void
}