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

/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ pathSumSearch(struct TreeNode *, int, int, int *,
                                 int /*<<< orphan*/);
int pathSum(struct TreeNode *root, int sum) {
  int *count = malloc(sizeof(int));
  *count = 0;
  pathSumSearch(root, sum, sum, count, 0);
  int c = *count;
  free(count);
  return c;
}


x86 assembly (clang, -O0):
<pathSum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
xor    %r8d,%r8d
call   1040 <pathSumSearch@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathSum>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%rax)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebp,%edx
mov    %rax,%rcx
xor    %r8d,%r8d
call   1040 <pathSumSearch@plt>
mov    (%rbx),%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @pathSum(%struct.TreeNode* %0, i32 %1) {
%3 = alloca %struct.TreeNode*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %3
store i32 %1, i32* %4
%7 = call i32* @malloc(i32 4)
store i32* %7, i32** %5
%8 = load i32*, i32** %5
store i32 0, i32* %8
%9 = load %struct.TreeNode*, %struct.TreeNode** %3
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = load i32*, i32** %5
%13 = call i32 @pathSumSearch(%struct.TreeNode* %9, i32 %10, i32 %11, i32* %12, i32 0)
%14 = load i32*, i32** %5
%15 = load i32, i32* %14
store i32 %15, i32* %6
%16 = load i32*, i32** %5
%17 = call i32 @free(i32* %16)
%18 = load i32, i32* %6
ret i32 %18
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @pathSum(%struct.TreeNode* %0, i32 %1) {
%3 = tail call i32* @malloc(i32 4)
store i32 0, i32* %3
%4 = tail call i32 @pathSumSearch(%struct.TreeNode* %0, i32 %1, i32 %1, i32* %3, i32 0)
%5 = load i32, i32* %3
%6 = tail call i32 @free(i32* %3)
ret i32 %5
}
int shlim(int a, int b) { return '0'; }


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

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

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

LLVM IR (-O2):
define i32 @shlim(i32 %0, i32 %1) {
ret i32 48
}
/* Type definitions */
typedef int GLenum;

/* Variables and functions */
#define GL_PROXY_TEXTURE_1D 132
int GL_PROXY_TEXTURE_2D;
#define GL_PROXY_TEXTURE_3D 131
#define GL_TEXTURE_1D 130
int GL_TEXTURE_2D;
#define GL_TEXTURE_3D 129
#define GL_TEXTURE_RECTANGLE_ARB 128
GLenum map_tex_target(GLenum target) {
  switch (target) {
  case GL_TEXTURE_1D:
  case GL_TEXTURE_3D:
  case GL_TEXTURE_RECTANGLE_ARB:
    target = GL_TEXTURE_2D;
    break;
  case GL_PROXY_TEXTURE_1D:
  case GL_PROXY_TEXTURE_3D:
    target = GL_PROXY_TEXTURE_2D;
    break;
  }
  return target;
}


x86 assembly (clang, -O0):
<map_tex_target>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
add    $0xffffff80,%eax
sub    $0x3,%eax
jb     1134 <map_tex_target+0x34>
jmp    111e <map_tex_target+0x1e>
mov    -0x8(%rbp),%eax
add    $0xffffff7d,%eax
sub    $0x2,%eax
jb     1145 <map_tex_target+0x45>
jmp    1151 <map_tex_target+0x51>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1151 <map_tex_target+0x51>
mov    0x2e8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_tex_target>:
mov    %edi,%eax
lea    -0x80(%rax),%ecx
cmp    $0x3,%ecx
jae    1113 <map_tex_target+0x13>
mov    0x2ecf(%rip),%rax
jmp    1125 <map_tex_target+0x25>
lea    -0x83(%rax),%ecx
cmp    $0x2,%ecx
jae    1127 <map_tex_target+0x27>
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@GL_TEXTURE_2D = global i32 0
@GL_PROXY_TEXTURE_2D = global i32 0
define i32 @map_tex_target(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 130, label %4
i32 129, label %4
i32 128, label %4
i32 132, label %6
i32 131, label %6
]
4: ; preds = %1, %1, %1
%5 = load i32, i32* @GL_TEXTURE_2D
store i32 %5, i32* %2
br label %8
6: ; preds = %1, %1
%7 = load i32, i32* @GL_PROXY_TEXTURE_2D
store i32 %7, i32* %2
br label %8
8: ; preds = %1, %6, %4
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@GL_TEXTURE_2D = global i32 0
@GL_PROXY_TEXTURE_2D = global i32 0
define i32 @map_tex_target(i32 %0) {
switch i32 %0, label %6 [
i32 130, label %2
i32 129, label %2
i32 128, label %2
i32 132, label %4
i32 131, label %4
]
2: ; preds = %1, %1, %1
%3 = load i32, i32* @GL_TEXTURE_2D
br label %6
4: ; preds = %1, %1
%5 = load i32, i32* @GL_PROXY_TEXTURE_2D
br label %6
6: ; preds = %1, %4, %2
%7 = phi i32 [ %0, %1 ], [ %5, %4 ], [ %3, %2 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int M = 4;
  printf("%d", 5);
  printf("%d", M);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int nvram_detect();
int nvram_open_internal(int);
int nvram_open(int nvram_type_arg) {
  if (nvram_type_arg == 0) {
    nvram_type_arg = nvram_detect();
  }
  return nvram_open_internal(nvram_type_arg);
}


x86 assembly (clang, -O0):
<nvram_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113f <nvram_open+0x1f>
mov    $0x0,%al
call   1030 <nvram_detect@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <nvram_open_internal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvram_open>:
test   %edi,%edi
je     1129 <nvram_open+0x9>
jmp    1040 <nvram_open_internal@plt>
push   %rax
xor    %eax,%eax
call   1030 <nvram_detect@plt>
mov    %eax,%edi
add    $0x8,%rsp
jmp    1040 <nvram_open_internal@plt>

LLVM IR (-O0):
define i32 @nvram_open(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @nvram_detect()
store i32 %6, i32* %2
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* %2
%9 = call i32 @nvram_open_internal(i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @nvram_open(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @nvram_detect()
br label %5
5: ; preds = %3, %1
%6 = phi i32 [ %4, %3 ], [ %0, %1 ]
%7 = tail call i32 @nvram_open_internal(i32 %6)
ret i32 %7
}
int isspace(int c) { return (c == ' ' || c == '\t'); }


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <isspace+0x20>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct proto_keys {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct proto_keys *);
void proto_crypt_free(struct proto_keys *k) { free(k); }


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

x86 assembly (clang, -O2):
<proto_crypt_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.proto_keys = type { i32 }
define void @proto_crypt_free(%struct.proto_keys* nocapture %0) {
%2 = tail call i32 @free(%struct.proto_keys* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
char *binrep(int /*<<< orphan*/ const, char *, int);
int /*<<< orphan*/ printf(char *, char *);
void printBinary(const uint32_t num) {
  char buffer[32 + 1], *pbuff = &buffer[0];
  pbuff = binrep(num, pbuff, 32);
  printf("%s", pbuff);
}


x86 assembly (clang, -O0):
<printBinary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x38(%rbp),%rsi
mov    $0x20,%edx
call   1040 <binrep@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBinary>:
sub    $0x28,%rsp
mov    %rsp,%rsi
mov    $0x20,%edx
call   1040 <binrep@plt>
lea    0xec8(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @printBinary(i32 %0) {
%2 = alloca i32
%3 = alloca [33 x i8]
%4 = alloca i8*
store i32 %0, i32* %2
%5 = getelementptr inbounds [33 x i8], [33 x i8]* %3, i64 0, i64 0
store i8* %5, i8** %4
%6 = load i32, i32* %2
%7 = load i8*, i8** %4
%8 = call i8* @binrep(i32 %6, i8* %7, i32 32)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @printBinary(i32 %0) {
%2 = alloca [33 x i8]
%3 = getelementptr inbounds [33 x i8], [33 x i8]* %2, i64 0, i64 0
%4 = call i8* @binrep(i32 %0, i8* %3, i32 32)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIA1_CheckInterruptFlag();
int /*<<< orphan*/ VIA1_Clear();
int /*<<< orphan*/ VIA1_SetDDR_A(int /*<<< orphan*/);
int /*<<< orphan*/ VIA1_SetDDR_B(int /*<<< orphan*/);
void VIA1_Reset(void) {
  VIA1_SetDDR_A(0);
  VIA1_SetDDR_B(0);
  VIA1_Clear();
  VIA1_CheckInterruptFlag();
}


x86 assembly (clang, -O0):
<VIA1_Reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <VIA1_SetDDR_A@plt>
xor    %edi,%edi
call   1050 <VIA1_SetDDR_B@plt>
mov    $0x0,%al
call   1060 <VIA1_Clear@plt>
mov    $0x0,%al
call   1040 <VIA1_CheckInterruptFlag@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIA1_Reset>:
push   %rax
xor    %edi,%edi
call   1030 <VIA1_SetDDR_A@plt>
xor    %edi,%edi
call   1050 <VIA1_SetDDR_B@plt>
xor    %eax,%eax
call   1060 <VIA1_Clear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <VIA1_CheckInterruptFlag@plt>

LLVM IR (-O0):
define void @VIA1_Reset() {
%1 = call i32 @VIA1_SetDDR_A(i32 0)
%2 = call i32 @VIA1_SetDDR_B(i32 0)
%3 = call i32 (...) @VIA1_Clear()
%4 = call i32 (...) @VIA1_CheckInterruptFlag()
ret void
}

LLVM IR (-O2):
define void @VIA1_Reset() {
%1 = tail call i32 @VIA1_SetDDR_A(i32 0)
%2 = tail call i32 @VIA1_SetDDR_B(i32 0)
%3 = tail call i32 (...) @VIA1_Clear()
%4 = tail call i32 (...) @VIA1_CheckInterruptFlag()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VirtualizeTimerC__0__Timer__stop(unsigned int);
void Msp430RefVoltGeneratorP__SwitchOffTimer__stop(void) {
  VirtualizeTimerC__0__Timer__stop(7U);
}


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

x86 assembly (clang, -O2):
<Msp430RefVoltGeneratorP__SwitchOffTimer__stop>:
mov    $0x7,%edi
jmp    1030 <VirtualizeTimerC__0__Timer__stop@plt>

LLVM IR (-O0):
define void @Msp430RefVoltGeneratorP__SwitchOffTimer__stop() {
%1 = call i32 @VirtualizeTimerC__0__Timer__stop(i32 7)
ret void
}

LLVM IR (-O2):
define void @Msp430RefVoltGeneratorP__SwitchOffTimer__stop() {
%1 = tail call i32 @VirtualizeTimerC__0__Timer__stop(i32 7)
ret void
}
/* Variables and functions */
int syscall(int, char *, char *, int /*<<< orphan*/);
int link(char *oldfile, char *newfile) {
  return syscall(23, oldfile, newfile, 0);
}


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

x86 assembly (clang, -O2):
<link>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x17,%edi
xor    %ecx,%ecx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @link(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 @syscall(i32 23, i8* %5, i8* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @link(i8* %0, i8* %1) {
%3 = tail call i32 @syscall(i32 23, i8* %0, i8* %1, i32 0)
ret i32 %3
}
/* Variables and functions */
double RAND_MAX;
double rand();
int /*<<< orphan*/ usleep(int);
void sleeprand() {
  int r;
  r = 1 + (int)(1000000.0 * rand() / (RAND_MAX + 1.0));
  usleep(r);
}


x86 assembly (clang, -O0):
<sleeprand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeba(%rip),%xmm1
mov    0x2e9b(%rip),%rax
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleeprand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mulsd  0xed0(%rip),%xmm0
mov    0x2eb1(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xec5(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
add    $0x1,%edi
pop    %rax
jmp    1040 <usleep@plt>

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define void @sleeprand() {
%1 = alloca i32
%2 = call double (...) @rand()
%3 = fmul double 1.000000e+06, %2
%4 = load double, double* @RAND_MAX
%5 = fadd double %4, 1.000000e+00
%6 = fdiv double %3, %5
%7 = fptosi double %6 to i32
%8 = add nsw i32 1, %7
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = call i32 @usleep(i32 %9)
ret void
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define void @sleeprand() {
%1 = tail call double (...) @rand()
%2 = fmul double %1, 1.000000e+06
%3 = load double, double* @RAND_MAX
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double %2, %4
%6 = fptosi double %5 to i32
%7 = add nsw i32 %6, 1
%8 = tail call i32 @usleep(i32 %7)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};
struct FTW {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ perror(char const *);
int remove(char const *);
int _remove(const char *fpath, const struct stat *sb, int typeflag,
            struct FTW *ftwbuf) {
  int rv = remove(fpath);
  if (rv)
    perror(fpath);
  return rv;
}


x86 assembly (clang, -O0):
<_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <remove@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1156 <_remove+0x36>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_remove>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <remove@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    113a <_remove+0x1a>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
jmp    1131 <_remove+0x11>

LLVM IR (-O0):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
define i32 @_remove(i8* %0, %struct.stat* %1, i32 %2, %struct.FTW* %3) {
%5 = alloca i8*
%6 = alloca %struct.stat*
%7 = alloca i32
%8 = alloca %struct.FTW*
%9 = alloca i32
store i8* %0, i8** %5
store %struct.stat* %1, %struct.stat** %6
store i32 %2, i32* %7
store %struct.FTW* %3, %struct.FTW** %8
%10 = load i8*, i8** %5
%11 = call i32 @remove(i8* %10)
store i32 %11, i32* %9
%12 = load i32, i32* %9
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %4
%15 = load i8*, i8** %5
%16 = call i32 @perror(i8* %15)
br label %17
17: ; preds = %14, %4
%18 = load i32, i32* %9
ret i32 %18
}

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
define i32 @_remove(i8* nocapture %0, %struct.stat* nocapture readnone %1, i32 %2, %struct.FTW* nocapture readnone %3) {
%5 = tail call i32 @remove(i8* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @perror(i8* %0)
br label %9
9: ; preds = %7, %4
ret i32 %5
}
/* Variables and functions */
int ilogb(long double);
int ilogbl(long double a1) { return ilogb(a1); }


x86 assembly (clang, -O0):
<ilogbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <ilogb@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilogbl>:
jmp    1030 <ilogb@plt>

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

LLVM IR (-O2):
define i32 @ilogbl(x86_fp80 %0) {
%2 = tail call i32 @ilogb(x86_fp80 %0)
ret i32 %2
}
/* Variables and functions */
double __uniform__();
double THRandom_uniform(double a, double b) {
  return (__uniform__() * (b - a) + a);
}


x86 assembly (clang, -O0):
<THRandom_uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__uniform__@plt>
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<THRandom_uniform>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <__uniform__@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @THRandom_uniform(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call double (...) @__uniform__()
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fsub double %6, %7
%9 = load double, double* %3
%10 = call double @llvm.fmuladd.f64(double %5, double %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @THRandom_uniform(double %0, double %1) {
%3 = tail call double (...) @__uniform__()
%4 = fsub double %1, %0
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %0)
ret double %5
}
/* Type definitions */
struct sk_buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ kfree_skb(struct sk_buff *);
void free_remaining(struct sk_buff **skbs, int offset, int total) {
  for (; offset < total; offset++) {
    kfree_skb(skbs[offset]);
  }
}


x86 assembly (clang, -O0):
<free_remaining>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    114d <free_remaining+0x3d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <kfree_skb@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <free_remaining+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_remaining>:
push   %r15
push   %r14
push   %rbx
cmp    %edx,%esi
jge    1142 <free_remaining+0x32>
mov    %edx,%r14d
movslq %esi,%rax
lea    (%rdi,%rax,8),%r15
sub    %esi,%r14d
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
call   1030 <kfree_skb@plt>
add    $0x1,%rbx
cmp    %ebx,%r14d
jne    1130 <free_remaining+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.sk_buff = type { i32 }
define void @free_remaining(%struct.sk_buff** nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = sext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %6, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds %struct.sk_buff*, %struct.sk_buff** %0, i64 %8
%10 = load %struct.sk_buff*, %struct.sk_buff** %9
%11 = tail call i32 @kfree_skb(%struct.sk_buff* %10)
%12 = add nsw i64 %8, 1
%13 = trunc i64 %12 to i32
%14 = icmp eq i32 %13, %2
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ vwprintf(int /*<<< orphan*/ *, int /*<<< orphan*/);
void uninivar_vwprintf(wchar_t *Format, va_list Arg) {
  wchar_t *format;
  va_list arg;
  (void)vwprintf(format, arg);
  (void)vwprintf(format, Arg);
  (void)vwprintf(Format, Arg);
  (void)vwprintf(Format, arg);
}


x86 assembly (clang, -O0):
<uninivar_vwprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <vwprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <vwprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <vwprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <vwprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninivar_vwprintf>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
call   1030 <vwprintf@plt>
mov    %ebx,%esi
call   1030 <vwprintf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <vwprintf@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <vwprintf@plt>

LLVM IR (-O0):
define void @uninivar_vwprintf(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %5
%8 = load i32, i32* %6
%9 = call i32 @vwprintf(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = load i32, i32* %4
%12 = call i32 @vwprintf(i32* %10, i32 %11)
%13 = load i32*, i32** %3
%14 = load i32, i32* %4
%15 = call i32 @vwprintf(i32* %13, i32 %14)
%16 = load i32*, i32** %3
%17 = load i32, i32* %6
%18 = call i32 @vwprintf(i32* %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @uninivar_vwprintf(i32* %0, i32 %1) {
%3 = tail call i32 @vwprintf(i32* undef, i32 undef)
%4 = tail call i32 @vwprintf(i32* undef, i32 %1)
%5 = tail call i32 @vwprintf(i32* %0, i32 %1)
%6 = tail call i32 @vwprintf(i32* %0, i32 undef)
ret void
}
void setLEDs(unsigned long on, unsigned long off) {
  unsigned long *setGPIO = (unsigned long *)0x40e00018;
  unsigned long *clearGPIO = (unsigned long *)0x40e00024;
  *clearGPIO = off;
  *setGPIO = on;
}


x86 assembly (clang, -O0):
<setLEDs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x40e00018,%eax
mov    %rax,-0x18(%rbp)
mov    $0x40e00024,%eax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setLEDs>:
mov    %rsi,0x40e00024
40
mov    %rdi,0x40e00018
40
ret

LLVM IR (-O0):
define void @setLEDs(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64*
store i64 %0, i64* %3
store i64 %1, i64* %4
store i64* inttoptr (i64 1088421912 to i64*), i64** %5
store i64* inttoptr (i64 1088421924 to i64*), i64** %6
%7 = load i64, i64* %4
%8 = load i64*, i64** %6
store i64 %7, i64* %8
%9 = load i64, i64* %3
%10 = load i64*, i64** %5
store i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @setLEDs(i64 %0, i64 %1) {
store i64 %1, i64* inttoptr (i64 1088421924 to i64*)
store i64 %0, i64* inttoptr (i64 1088421912 to i64*)
ret void
}
int outlib() { return 456; }


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

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

LLVM IR (-O0):
define i32 @outlib() {
ret i32 456
}

LLVM IR (-O2):
define i32 @outlib() {
ret i32 456
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           size_t const, double const, double const);
int /*<<< orphan*/ stderr;
void print_array_index_error(const char *array_name, const size_t index,
                             const double *const array, const double expected) {
  fprintf(stderr, "%s[%zu] = %22.16g instead of %22.16g\n", array_name, index,
          array[index], expected);
}


x86 assembly (clang, -O0):
<print_array_index_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rsi
movsd  (%rax,%rsi,8),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xead(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array_index_error>:
movaps %xmm0,%xmm1
mov    %rsi,%rcx
mov    %rdi,%rax
mov    0x2ec0(%rip),%rsi
mov    (%rsi),%edi
movsd  (%rdx,%rcx,8),%xmm0
lea    0xed2(%rip),%rsi
mov    %rax,%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"%s[%zu] = %22.16g instead of %22.16g\0A\00"
define void @print_array_index_error(i8* %0, i64 %1, double* %2, double %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca double*
%8 = alloca double
store i8* %0, i8** %5
store i64 %1, i64* %6
store double* %2, double** %7
store double %3, double* %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load double*, double** %7
%13 = load i64, i64* %6
%14 = getelementptr inbounds double, double* %12, i64 %13
%15 = load double, double* %14
%16 = load double, double* %8
%17 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %10, i64 %11, double %15, double %16)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"%s[%zu] = %22.16g instead of %22.16g\0A\00"
define void @print_array_index_error(i8* %0, i64 %1, double* nocapture %2, double %3) {
%5 = load i32, i32* @stderr
%6 = getelementptr inbounds double, double* %2, i64 %1
%7 = load double, double* %6
%8 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1, double %7, double %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sym_algs2(unsigned int);
extern void sym_algs(unsigned int type) {
  printf("\tSym alg - ");
  sym_algs2(type);
  printf("\n");
}


x86 assembly (clang, -O0):
<sym_algs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <sym_algs2@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sym_algs>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1050 <sym_algs2@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\09Sym alg - \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @sym_algs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @sym_algs2(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\09Sym alg - \00"
define void @sym_algs(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @sym_algs2(i32 %0)
%4 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRB1_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRB1_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRB1_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DrawTextlnXYw143(char const *, unsigned long, unsigned long);
void drawtextlnxyw(const char *s, unsigned long x, unsigned long y) {
  DrawTextlnXYw143(s, x, y);
}


x86 assembly (clang, -O0):
<drawtextlnxyw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <DrawTextlnXYw143@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawtextlnxyw>:
jmp    1030 <DrawTextlnXYw143@plt>

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

LLVM IR (-O2):
define void @drawtextlnxyw(i8* %0, i64 %1, i64 %2) {
%4 = tail call i32 @DrawTextlnXYw143(i8* %0, i64 %1, i64 %2)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void FPUDisable(void) {
  (*((volatile uint32_t *)(0xE000ED88))) =
      (((*((volatile uint32_t *)(0xE000ED88))) & ~(0x00300000 | 0x00C00000)) |
       0x00000000 | 0x00000000);
}


x86 assembly (clang, -O0):
<FPUDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000ed88,%eax
mov    (%rax),%ecx
and    $0xff0fffff,%ecx
or     $0x0,%ecx
or     $0x0,%ecx
mov    $0xe000ed88,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FPUDisable>:
mov    $0xe000ed88,%eax
andl   $0xff0fffff,(%rax)
ret

LLVM IR (-O0):
define void @FPUDisable() {
%1 = load volatile i32, i32* inttoptr (i64 3758157192 to i32*)
%2 = and i32 %1, -15728641
%3 = or i32 %2, 0
%4 = or i32 %3, 0
store volatile i32 %4, i32* inttoptr (i64 3758157192 to i32*)
ret void
}

LLVM IR (-O2):
define void @FPUDisable() {
%1 = load volatile i32, i32* inttoptr (i64 3758157192 to i32*)
%2 = and i32 %1, -15728641
store volatile i32 %2, i32* inttoptr (i64 3758157192 to i32*)
ret void
}
int test_imm_72uint16_mem(unsigned short *val) {
  return ((*val) & (-0x72 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_72uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff8e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_72uint16_mem>:
movzwl (%rdi),%eax
test   $0xff8e,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_72uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -114
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void wifi_rsp_sme_wifi_on(const struct wifi_msg_sme_wifi_on_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_sme_wifi_on_rsp_t = type opaque
define void @wifi_rsp_sme_wifi_on(%struct.wifi_msg_sme_wifi_on_rsp_t* nocapture %0) {
ret void
}
int test_imm_66int16_mem(short *val) {
  return ((*val) & (0x66 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_66int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0x66,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_66int16_mem>:
testb  $0x66,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_66int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 102
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned xrop3_135_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D & S;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_135_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_135_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    %edi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_135_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = and i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = xor i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %5
%35 = load i32, i32* %6
%36 = and i32 %34, %35
%37 = or i32 %33, %36
ret i32 %37
}

LLVM IR (-O2):
define i32 @xrop3_135_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %3
%8 = or i32 %7, %4
%9 = xor i32 %8, -1
%10 = or i32 %9, %3
ret i32 %10
}
int RZR1() { return 0; }


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

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

LLVM IR (-O0):
define i32 @RZR1() {
ret i32 0
}

LLVM IR (-O2):
define i32 @RZR1() {
ret i32 0
}
int fibonacci(int n) {
  if (n <= 2) {
    return 1;
  } else {
    return ((fibonacci(n - 1)) + (fibonacci(n - 2)));
  }
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jg     1131 <fibonacci+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <fibonacci+0x44>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x3,%edi
jl     1145 <fibonacci+0x35>
mov    %edi,%ebx
add    $0x2,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x3(%rbx),%edi
call   1030 <fibonacci@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x4,%ebx
ja     1130 <fibonacci+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibonacci(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 5
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ break_on_me();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int getpid();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
void child_proc(void) {
  fprintf(stderr, "child process %d lives!\n", getpid());
  break_on_me();
  printf("child process terminating!\n");
  exit(37);
}


x86 assembly (clang, -O0):
<child_proc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%edx
lea    0xe89(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1050 <break_on_me@plt>
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x25,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<child_proc>:
push   %rbx
mov    0x2e88(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xe98(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1060 <fprintf@plt>
xor    %eax,%eax
call   1050 <break_on_me@plt>
lea    0xe9a(%rip),%rdi
call   1030 <puts@plt>
mov    $0x25,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"child process %d lives!\0A\00"
@.str.1 = [28 x i8] c"child process terminating!\0A\00"
define void @child_proc() {
%1 = load i32, i32* @stderr
%2 = call i32 (...) @getpid()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @break_on_me()
%5 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 37)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"child process %d lives!\0A\00"
@str = [27 x i8] c"child process terminating!\00"
define void @child_proc() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 (...) @break_on_me()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 37)
unreachable
}
/* Variables and functions */
int __get_array_size(void *);
int __infer_nondet_int();
int fsctl(const char *path, unsigned long request, void *data,
          unsigned int options) {
  int size1;
  int size2;
  int ret;
  size1 = __get_array_size(path);
  size2 = __get_array_size(data);
  ret = __infer_nondet_int();
  if (ret < -1 || ret > 0)
    while (1)
      ;
  return ret;
}


x86 assembly (clang, -O0):
<fsctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0xffffffff,-0x28(%rbp)
jl     116d <fsctl+0x4d>
cmpl   $0x0,-0x28(%rbp)
jle    1177 <fsctl+0x57>
jmp    1172 <fsctl+0x52>
jmp    1172 <fsctl+0x52>
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsctl>:
push   %rbx
mov    %rdx,%rbx
call   1040 <__get_array_size@plt>
mov    %rbx,%rdi
call   1040 <__get_array_size@plt>
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
lea    -0x1(%rax),%ecx
cmp    $0xfffffffd,%ecx
ja     1142 <fsctl+0x22>
jmp    1140 <fsctl+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fsctl(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%12 = load i8*, i8** %5
%13 = call i32 @__get_array_size(i8* %12)
store i32 %13, i32* %9
%14 = load i8*, i8** %7
%15 = call i32 @__get_array_size(i8* %14)
store i32 %15, i32* %10
%16 = call i32 (...) @__infer_nondet_int()
store i32 %16, i32* %11
%17 = load i32, i32* %11
%18 = icmp slt i32 %17, -1
br i1 %18, label %22, label %19
19: ; preds = %4
%20 = load i32, i32* %11
%21 = icmp sgt i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %19, %4
br label %23
23: ; preds = %22, %23
br label %23
24: ; preds = %19
%25 = load i32, i32* %11
ret i32 %25
}

LLVM IR (-O2):
define i32 @fsctl(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 @__get_array_size(i8* %0)
%6 = tail call i32 @__get_array_size(i8* %2)
%7 = tail call i32 (...) @__infer_nondet_int()
%8 = add i32 %7, -1
%9 = icmp ult i32 %8, -2
br i1 %9, label %10, label %11
10: ; preds = %4, %10
br label %10
11: ; preds = %4
ret i32 %7
}
void output_fini() { return; }


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

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

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

LLVM IR (-O2):
define void @output_fini() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cli();
void cpu_irq_save(uintptr_t *flags) { cli(); }


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

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

LLVM IR (-O0):
define void @cpu_irq_save(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i32 (...) @cli()
ret void
}

LLVM IR (-O2):
define void @cpu_irq_save(i64* nocapture readnone %0) {
%2 = tail call i32 (...) @cli()
ret void
}
/* Variables and functions */
int foo2_com2(int);
int foo2_com4(int x) { return foo2_com2(x) + 4; }


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

x86 assembly (clang, -O2):
<foo2_com4>:
push   %rax
call   1030 <foo2_com2@plt>
add    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo2_com4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @foo2_com2(i32 %3)
%5 = add nsw i32 %4, 4
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo2_com4(i32 %0) {
%2 = tail call i32 @foo2_com2(i32 %0)
%3 = add nsw i32 %2, 4
ret i32 %3
}