xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ADI8BitsSet(int, int, int);
void NOROM_AUXADCDisableInputScaling(void) {
  ADI8BitsSet(0x400CB000, 0x00000009, 0x00000001);
}


x86 assembly (clang, -O0):
<NOROM_AUXADCDisableInputScaling>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400cb000,%edi
mov    $0x9,%esi
mov    $0x1,%edx
call   1030 <ADI8BitsSet@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<NOROM_AUXADCDisableInputScaling>:
mov    $0x400cb000,%edi
mov    $0x9,%esi
mov    $0x1,%edx
jmp    1030 <ADI8BitsSet@plt>

LLVM IR (-O0):
define void @NOROM_AUXADCDisableInputScaling() {
%1 = call i32 @ADI8BitsSet(i32 1074573312, i32 9, i32 1)
ret void
}

LLVM IR (-O2):
define void @NOROM_AUXADCDisableInputScaling() {
%1 = tail call i32 @ADI8BitsSet(i32 1074573312, i32 9, i32 1)
ret void
}
void error(int e) {}


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

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

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

LLVM IR (-O2):
define void @error(i32 %0) {
ret void
}
int main(void) {
  int c = 0;
  typedef struct a b;
  struct a {
    int a;
  };
  b a;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ pow(float, float);
float prv_process_fpa_pow_real32(float a, float b) { return (float)pow(a, b); }


x86 assembly (clang, -O0):
<prv_process_fpa_pow_real32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <pow@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_process_fpa_pow_real32>:
push   %rax
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @prv_process_fpa_pow_real32(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call i64 @pow(float %5, float %6)
%8 = sitofp i64 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @prv_process_fpa_pow_real32(float %0, float %1) {
%3 = tail call i64 @pow(float %0, float %1)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float f = 1.45;
  float g = 2.3;
  float h = f * g;
  printf("%f\n", h);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 0x3FF7333340000000, float* %2
store float 0x4002666660000000, float* %3
%5 = load float, float* %2
%6 = load float, float* %3
%7 = fmul float %5, %6
store float %7, float* %4
%8 = load float, float* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 0x400AAE1480000000)
ret i32 0
}
/* Variables and functions */
char *strchr(char const *, char const);
const char *strrspn(const char *s, const char *delimiters) {
  const char *p = strchr(s, '\0');
  while (p-- != s)
    if (!strchr(delimiters, *p))
      break;
  return p + 1;
}


x86 assembly (clang, -O0):
<strrspn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    -0x8(%rbp),%rax
je     116c <strrspn+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    1167 <strrspn+0x57>
jmp    116c <strrspn+0x5c>
jmp    112f <strrspn+0x1f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrspn>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %rbx,%rbx
je     1163 <strrspn+0x43>
movsbl -0x1(%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <strchr@plt>
add    $0xffffffffffffffff,%rbx
test   %rax,%rax
jne    1140 <strrspn+0x20>
add    %rbx,%r15
add    $0x1,%r15
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strrspn(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr i8, i8* %0, i64 %3
br label %5
5: ; preds = %9, %2
%6 = phi i8* [ %4, %2 ], [ %7, %9 ]
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = icmp eq i8* %6, %0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = load i8, i8* %7
%11 = tail call i8* @strchr(i8* dereferenceable(1) %1, i8 signext %10)
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %5
13: ; preds = %9, %5
%14 = phi i8* [ %6, %9 ], [ %0, %5 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void funb() {
  printf("funb\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"funb\00"
define void @funb() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void add(char *s, char *filename) {
  FILE *fp = fopen(filename, "a+");
  fprintf(fp, "%s", s);
  fclose(fp);
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rax
mov    %rdi,%r14
lea    0xebf(%rip),%rsi
mov    %rax,%rdi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <fputs@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"a+\00"
define void @add(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fputs(i8* %0, i32* %3)
%5 = tail call i32 @fclose(i32* %3)
ret void
}
/* Type definitions */
struct gpiohandle_data {
  int *values;
};

/* Variables and functions */
int /*<<< orphan*/ gpiotools_gets(char const *, unsigned int *, int,
                                  struct gpiohandle_data *);
int gpiotools_get(const char *device_name, unsigned int line) {
  struct gpiohandle_data data;
  unsigned int lines[] = {line};
  gpiotools_gets(device_name, lines, 1, &data);
  return data.values[0];
}


x86 assembly (clang, -O0):
<gpiotools_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x1,%edx
lea    -0x18(%rbp),%rcx
call   1030 <gpiotools_gets@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpiotools_get>:
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0x1,%edx
call   1030 <gpiotools_gets@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.gpiohandle_data = type { i32* }
define i32 @gpiotools_get(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.gpiohandle_data
%6 = alloca [1 x i32]
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
%8 = load i32, i32* %4
store i32 %8, i32* %7
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
%11 = call i32 @gpiotools_gets(i8* %9, i32* %10, i32 1, %struct.gpiohandle_data* %5)
%12 = getelementptr inbounds %struct.gpiohandle_data, %struct.gpiohandle_data* %5, i32 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %14
ret i32 %15
}

LLVM IR (-O2):
%struct.gpiohandle_data = type { i32* }
define i32 @gpiotools_get(i8* %0, i32 %1) {
%3 = alloca %struct.gpiohandle_data
%4 = alloca [1 x i32]
%5 = bitcast %struct.gpiohandle_data* %3 to i8*
%6 = bitcast [1 x i32]* %4 to i8*
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
store i32 %1, i32* %7
%8 = call i32 @gpiotools_gets(i8* %0, i32* %7, i32 1, %struct.gpiohandle_data* %3)
%9 = getelementptr inbounds %struct.gpiohandle_data, %struct.gpiohandle_data* %3, i64 0, i32 0
%10 = load i32*, i32** %9
%11 = load i32, i32* %10
ret i32 %11
}
/* Variables and functions */
int dolmmode(int, int);
int tn_setmode(int bit) { return dolmmode(bit, 1); }


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

x86 assembly (clang, -O2):
<tn_setmode>:
mov    $0x1,%esi
jmp    1030 <dolmmode@plt>

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

LLVM IR (-O2):
define i32 @tn_setmode(i32 %0) {
%2 = tail call i32 @dolmmode(i32 %0, i32 1)
ret i32 %2
}
int skip_whitespace(char *str, int n) {
  while ((str[n] == ' ' || str[n] == '\t') && str[n] != '\0')
    n++;
  return n;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     113a <skip_whitespace+0x3a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0xd(%rbp)
jne    114f <skip_whitespace+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115f <skip_whitespace+0x5f>
jmp    116d <skip_whitespace+0x6d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <skip_whitespace+0xb>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
mov    %esi,%eax
movslq %esi,%rcx
add    %rdi,%rcx
jmp    1117 <skip_whitespace+0x17>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x20,%dl
je     1110 <skip_whitespace+0x10>
cmp    $0x9,%dl
je     1110 <skip_whitespace+0x10>
ret

LLVM IR (-O0):
define i32 @skip_whitespace(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %31, %2
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 32
br i1 %12, label %21, label %13
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 9
br i1 %20, label %21, label %29
21: ; preds = %13, %5
%22 = load i8*, i8** %3
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp ne i32 %27, 0
br label %29
29: ; preds = %21, %13
%30 = phi i1 [ false, %13 ], [ %28, %21 ]
br i1 %30, label %31, label %34
31: ; preds = %29
%32 = load i32, i32* %4
%33 = add nsw i32 %32, 1
store i32 %33, i32* %4
br label %5
34: ; preds = %29
%35 = load i32, i32* %4
ret i32 %35
}

LLVM IR (-O2):
define i32 @skip_whitespace(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %8, %2
%5 = phi i64 [ %9, %8 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
switch i8 %7, label %10 [
i8 32, label %8
i8 9, label %8
]
8: ; preds = %4, %4
%9 = add i64 %5, 1
br label %4
10: ; preds = %4
%11 = trunc i64 %5 to i32
ret i32 %11
}
/* Variables and functions */
int CFC_filter_duplicate_sn_ap();
int CFC_filter_duplicate_sn_client();
int CFC_filter_duplicate_sn() {
  return CFC_filter_duplicate_sn_ap() + CFC_filter_duplicate_sn_client();
}


x86 assembly (clang, -O0):
<CFC_filter_duplicate_sn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <CFC_filter_duplicate_sn_ap@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <CFC_filter_duplicate_sn_client@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CFC_filter_duplicate_sn>:
push   %rbx
xor    %eax,%eax
call   1040 <CFC_filter_duplicate_sn_ap@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <CFC_filter_duplicate_sn_client@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CFC_filter_duplicate_sn() {
%1 = call i32 (...) @CFC_filter_duplicate_sn_ap()
%2 = call i32 (...) @CFC_filter_duplicate_sn_client()
%3 = add nsw i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @CFC_filter_duplicate_sn() {
%1 = tail call i32 (...) @CFC_filter_duplicate_sn_ap()
%2 = tail call i32 (...) @CFC_filter_duplicate_sn_client()
%3 = add nsw i32 %2, %1
ret i32 %3
}
/* Variables and functions */
int op_xor(int, int);
int test_xor() {
  if (op_xor(3, 4) != ((3 ^ 4)))
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<test_xor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <op_xor@plt>
cmp    $0x7,%eax
je     113c <test_xor+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1143 <test_xor+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_xor>:
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <op_xor@plt>
xor    %ecx,%ecx
cmp    $0x7,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_xor() {
%1 = alloca i32
%2 = call i32 @op_xor(i32 3, i32 4)
%3 = icmp ne i32 %2, 7
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %6
5: ; preds = %0
store i32 0, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_xor() {
%1 = tail call i32 @op_xor(i32 3, i32 4)
%2 = icmp ne i32 %1, 7
%3 = sext i1 %2 to i32
ret i32 %3
}
extern int f7(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f7() {
ret i32 0
}
int ssh_packet_send(struct ssh *ssh) {
  int r;
  if ((r = sshpkt_send(ssh)) != 0)
    ssh_fatal("%s: %s", __func__, ssh_err(r));
  return r;
}


x86 assembly (clang, -O0):
<ssh_packet_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <sshpkt_send@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1174 <ssh_packet_send+0x44>
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1030 <ssh_err@plt>
mov    %eax,%edx
lea    0xe9a(%rip),%rdi
lea    0xe9a(%rip),%rsi
mov    $0x0,%al
call   1050 <ssh_fatal@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssh_packet_send>:
push   %rbx
xor    %eax,%eax
call   1040 <sshpkt_send@plt>
mov    %eax,%ebx
test   %eax,%eax
je     115e <ssh_packet_send+0x2e>
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <ssh_err@plt>
lea    0xeb2(%rip),%rdi
lea    0xeb2(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <ssh_fatal@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ssh = type opaque
@.str = [7 x i8] c"%s: %s\00"
@__func__.ssh_packet_send = [16 x i8] c"ssh_packet_send\00"
define i32 @ssh_packet_send(%struct.ssh* %0) {
%2 = alloca %struct.ssh*
%3 = alloca i32
store %struct.ssh* %0, %struct.ssh** %2
%4 = load %struct.ssh*, %struct.ssh** %2
%5 = call i32 (%struct.ssh*, ...) bitcast (i32 (...)* @sshpkt_send to i32 (%struct.ssh*, ...)*)(%struct.ssh* %4)
store i32 %5, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 (i32, ...) bitcast (i32 (...)* @ssh_err to i32 (i32, ...)*)(i32 %8)
%10 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @ssh_fatal to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.ssh_packet_send, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
%struct.ssh = type opaque
@.str = [7 x i8] c"%s: %s\00"
@__func__.ssh_packet_send = [16 x i8] c"ssh_packet_send\00"
define i32 @ssh_packet_send(%struct.ssh* %0) {
%2 = tail call i32 (%struct.ssh*, ...) bitcast (i32 (...)* @sshpkt_send to i32 (%struct.ssh*, ...)*)(%struct.ssh* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @ssh_err to i32 (i32, ...)*)(i32 %2)
%6 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @ssh_fatal to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.ssh_packet_send, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %4, %1
ret i32 %2
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 7 * 100 + 0); }


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

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

LLVM IR (-O0):
define i32 @LZ4_versionNumber() {
ret i32 10700
}

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10700
}
void menu_redraw() {}


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

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

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

LLVM IR (-O2):
define void @menu_redraw() {
ret void
}
int test_imm_90int16_mem(short *val) {
  return ((*val) & (0x90 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_90int16_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, 144
%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_90int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 144
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
f() { printf("%z", 2); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%z\00"
define i32 @f() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("Usage: plistutil -i|--infile in_file.plist -o|--outfile "
         "out_file.plist [--debug]\n");
  printf("\n");
  printf("\t-i or --infile: The file to read in.\n");
  printf("\t-o or --outfile: The file to convert to.\n");
  printf("\t-d, -v or --debug: Provide extended debug information.\n\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf13(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2d(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4b(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [82 x i8] c"Usage: plistutil -i|--infile in_file.plist -o|--outfile out_file.plist [--debug]\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [39 x i8] c"\09-i or --infile: The file to read in.\0A\00"
@.str.3 = [43 x i8] c"\09-o or --outfile: The file to convert to.\0A\00"
@.str.4 = [58 x i8] c"\09-d, -v or --debug: Provide extended debug information.\0A\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [81 x i8] c"Usage: plistutil -i|--infile in_file.plist -o|--outfile out_file.plist [--debug]\00"
@str.5 = [38 x i8] c"\09-i or --infile: The file to read in.\00"
@str.6 = [42 x i8] c"\09-o or --outfile: The file to convert to.\00"
@str.7 = [57 x i8] c"\09-d, -v or --debug: Provide extended debug information.\0A\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.7, i64 0, i64 0))
ret void
}
/* Variables and functions */
int firstBadVersion(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  printf("%d\n", firstBadVersion(2126753390));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @firstBadVersion(i32 2126753390)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ logStartStop(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void shutDown(int sig) { (void)logStartStop(NULL, -1, 0); }


x86 assembly (clang, -O0):
<shutDown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
mov    $0xffffffff,%esi
xor    %edx,%edx
call   1030 <logStartStop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shutDown>:
xor    %edi,%edi
mov    $0xffffffff,%esi
xor    %edx,%edx
jmp    1030 <logStartStop@plt>

LLVM IR (-O0):
define void @shutDown(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @logStartStop(i32* null, i32 -1, i32 0)
ret void
}

LLVM IR (-O2):
define void @shutDown(i32 %0) {
%2 = tail call i32 @logStartStop(i32* null, i32 -1, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          size_t);
int strlen(char const *);
uint8_t *write_raw(uint8_t *p, const uint8_t *v) {
  size_t len;
  len = strlen((const char *)v) + 1;
  memcpy(p, v, len);
  p += len;
  return (p);
}


x86 assembly (clang, -O0):
<write_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_raw>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
movslq %eax,%rbx
lea    0x1(%rbx),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <memcpy@plt>
lea    (%r14,%rbx,4),%rax
add    $0x4,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32* @write_raw(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i64
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = bitcast i32* %6 to i8*
%8 = call i32 @strlen(i8* %7)
%9 = add nsw i32 %8, 1
%10 = sext i32 %9 to i64
store i64 %10, i64* %5
%11 = load i32*, i32** %3
%12 = load i32*, i32** %4
%13 = load i64, i64* %5
%14 = call i32 @memcpy(i32* %11, i32* %12, i64 %13)
%15 = load i64, i64* %5
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 %15
store i32* %17, i32** %3
%18 = load i32*, i32** %3
ret i32* %18
}

LLVM IR (-O2):
define i32* @write_raw(i32* %0, i32* %1) {
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @strlen(i8* %3)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = tail call i32 @memcpy(i32* %0, i32* %1, i64 %6)
%8 = getelementptr inbounds i32, i32* %0, i64 %6
ret i32* %8
}
void userBinaryOperator(void *x1, void *x2) {
  int *a = (int *)x1;
  int *b = (int *)x2;
  *a += *b;
}


x86 assembly (clang, -O0):
<userBinaryOperator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @userBinaryOperator(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = add nsw i32 %14, %12
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @userBinaryOperator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = add nsw i32 %6, %5
store i32 %7, i32* %3
ret void
}
unsigned long I2CMasterLineStateGet(unsigned long ulBase) {
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x0000002C))));
}


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

x86 assembly (clang, -O2):
<I2CMasterLineStateGet>:
mov    0x2c(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @I2CMasterLineStateGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 44
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @I2CMasterLineStateGet(i64 %0) {
%2 = add i64 %0, 44
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
ret i64 %4
}
void masking_zero_stats(void) {}


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

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

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

LLVM IR (-O2):
define void @masking_zero_stats() {
ret void
}
void stop_count() {
  extern int sigalarm;
  sigalarm = 1;
}


x86 assembly (clang, -O0):
<stop_count>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_count>:
mov    0x2ed9(%rip),%rax
movl   $0x1,(%rax)
ret

LLVM IR (-O0):
@sigalarm = external global i32
define void @stop_count() {
store i32 1, i32* @sigalarm
ret void
}

LLVM IR (-O2):
@sigalarm = external global i32
define void @stop_count() {
store i32 1, i32* @sigalarm
ret void
}
/* Type definitions */
struct runtime_instr_cb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ store_runtime_instr_cb(struct runtime_instr_cb *);
void save_ri_cb(struct runtime_instr_cb *cb_prev) {
  if (cb_prev) {
    store_runtime_instr_cb(cb_prev);
  }
}


x86 assembly (clang, -O0):
<save_ri_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <save_ri_cb+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <store_runtime_instr_cb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_ri_cb>:
test   %rdi,%rdi
je     111a <save_ri_cb+0xa>
jmp    1030 <store_runtime_instr_cb@plt>
ret

LLVM IR (-O0):
%struct.runtime_instr_cb = type { i32 }
define void @save_ri_cb(%struct.runtime_instr_cb* %0) {
%2 = alloca %struct.runtime_instr_cb*
store %struct.runtime_instr_cb* %0, %struct.runtime_instr_cb** %2
%3 = load %struct.runtime_instr_cb*, %struct.runtime_instr_cb** %2
%4 = icmp ne %struct.runtime_instr_cb* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.runtime_instr_cb*, %struct.runtime_instr_cb** %2
%7 = call i32 @store_runtime_instr_cb(%struct.runtime_instr_cb* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.runtime_instr_cb = type { i32 }
define void @save_ri_cb(%struct.runtime_instr_cb* %0) {
%2 = icmp eq %struct.runtime_instr_cb* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @store_runtime_instr_cb(%struct.runtime_instr_cb* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int f(int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("%d\n", f(200, 0));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @f(i32 200, i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int fge(float x, float y) {
  if (x >= y)
    return 13;
  else
    return 140;
}


x86 assembly (clang, -O0):
<fge>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     1129 <fge+0x29>
movl   $0xd,-0x4(%rbp)
jmp    1130 <fge+0x30>
movl   $0x8c,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fge>:
ucomiss %xmm1,%xmm0
mov    $0x8c,%ecx
mov    $0xd,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fge(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp oge float %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 13, i32* %3
br label %11
10: ; preds = %2
store i32 140, i32* %3
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @fge(float %0, float %1) {
%3 = fcmp ult float %0, %1
%4 = select i1 %3, i32 140, i32 13
ret i32 %4
}
void gmx_left_right(int nnodes, int nodeid, int *left, int *right) {
  *left = (nnodes + nodeid - 1) % nnodes;
  *right = (nodeid + 1) % nnodes;
}


x86 assembly (clang, -O0):
<gmx_left_right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %edx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmx_left_right>:
mov    %rdx,%r8
lea    (%rdi,%rsi,1),%eax
add    $0xffffffff,%eax
cltd
idiv   %edi
mov    %edx,(%r8)
lea    0x1(%rsi),%eax
cltd
idiv   %edi
mov    %edx,(%rcx)
ret

LLVM IR (-O0):
define void @gmx_left_right(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = sub nsw i32 %11, 1
%13 = load i32, i32* %5
%14 = srem i32 %12, %13
%15 = load i32*, i32** %7
store i32 %14, i32* %15
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
%18 = load i32, i32* %5
%19 = srem i32 %17, %18
%20 = load i32*, i32** %8
store i32 %19, i32* %20
ret void
}

LLVM IR (-O2):
define void @gmx_left_right(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = add i32 %0, -1
%6 = add i32 %5, %1
%7 = srem i32 %6, %0
store i32 %7, i32* %2
%8 = add nsw i32 %1, 1
%9 = srem i32 %8, %0
store i32 %9, i32* %3
ret void
}
/* Type definitions */
typedef unsigned char u_int8_t;

/* Variables and functions */
u_int8_t get_version(unsigned char *pkt_buf) { return pkt_buf[0]; }


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

x86 assembly (clang, -O2):
<get_version>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @get_version(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @get_version(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ gg_message_html_to_text_110_buff(char *, char const *);
char *malloc(size_t);
char *gg_message_html_to_text_110(const char *html) {
  size_t dst_len;
  char *dst;
  dst_len = gg_message_html_to_text_110_buff(NULL, html) + 1;
  dst = malloc(dst_len);
  if (!dst)
    return NULL;
  gg_message_html_to_text_110_buff(dst, html);
  return dst;
}


x86 assembly (clang, -O0):
<gg_message_html_to_text_110>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1030 <gg_message_html_to_text_110_buff@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1167 <gg_message_html_to_text_110+0x47>
movq   $0x0,-0x8(%rbp)
jmp    117c <gg_message_html_to_text_110+0x5c>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <gg_message_html_to_text_110_buff@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gg_message_html_to_text_110>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
mov    %r14,%rsi
call   1030 <gg_message_html_to_text_110_buff@plt>
add    $0x1,%eax
movslq %eax,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114f <gg_message_html_to_text_110+0x2f>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <gg_message_html_to_text_110_buff@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @gg_message_html_to_text_110(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @gg_message_html_to_text_110_buff(i8* null, i8* %6)
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %15, label %14
14: ; preds = %1
store i8* null, i8** %2
br label %20
15: ; preds = %1
%16 = load i8*, i8** %5
%17 = load i8*, i8** %3
%18 = call i32 @gg_message_html_to_text_110_buff(i8* %16, i8* %17)
%19 = load i8*, i8** %5
store i8* %19, i8** %2
br label %20
20: ; preds = %15, %14
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @gg_message_html_to_text_110(i8* %0) {
%2 = tail call i32 @gg_message_html_to_text_110_buff(i8* null, i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @gg_message_html_to_text_110_buff(i8* %5, i8* %0)
br label %9
9: ; preds = %1, %7
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ do_csi(char *, int);
void mc_printer_start(int flag) { do_csi("?%di", flag ? 9 : 8); }


x86 assembly (clang, -O0):
<mc_printer_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x8,%esi
mov    $0x9,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
lea    0xecb(%rip),%rdi
call   1030 <do_csi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_printer_start>:
cmp    $0x1,%edi
mov    $0x9,%esi
sbb    $0x0,%esi
lea    0xede(%rip),%rdi
jmp    1030 <do_csi@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"?%di\00"
define void @mc_printer_start(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 9, i32 8
%7 = call i32 @do_csi(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"?%di\00"
define void @mc_printer_start(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 8, i32 9
%4 = tail call i32 @do_csi(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
const char *CompactionFilterV2Name(void *arg) {
  return "TestCompactionFilterV2";
}


x86 assembly (clang, -O0):
<CompactionFilterV2Name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [23 x i8] c"TestCompactionFilterV2\00"
define i8* @CompactionFilterV2Name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [23 x i8] c"TestCompactionFilterV2\00"
define i8* @CompactionFilterV2Name(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int o_socketpair(int, int, int, int *);
int f_socketpair(int domain, int type, int protocol, int socket_vector[2]) {
  return o_socketpair(domain, type, protocol, socket_vector);
}


x86 assembly (clang, -O0):
<f_socketpair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <o_socketpair@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_socketpair>:
jmp    1030 <o_socketpair@plt>

LLVM IR (-O0):
define i32 @f_socketpair(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 @o_socketpair(i32 %9, i32 %10, i32 %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @f_socketpair(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = tail call i32 @o_socketpair(i32 %0, i32 %1, i32 %2, i32* %3)
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ssd1306_write_command(int);
void ssd1306_set_page_address(uint8_t address) {
  address &= 0x0F;
  ssd1306_write_command((0xB0 | (address)));
}


x86 assembly (clang, -O0):
<ssd1306_set_page_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
or     $0xb0,%edi
call   1030 <ssd1306_write_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssd1306_set_page_address>:
and    $0xf,%edi
or     $0xb0,%edi
jmp    1030 <ssd1306_write_command@plt>

LLVM IR (-O0):
define void @ssd1306_set_page_address(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = or i32 176, %5
%7 = call i32 @ssd1306_write_command(i32 %6)
ret void
}

LLVM IR (-O2):
define void @ssd1306_set_page_address(i32 %0) {
%2 = and i32 %0, 15
%3 = or i32 %2, 176
%4 = tail call i32 @ssd1306_write_command(i32 %3)
ret void
}
void wireless_nlevent_flush(void) {}


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

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

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

LLVM IR (-O2):
define void @wireless_nlevent_flush() {
ret void
}
/* Variables and functions */
int coremark_main(int, char **);
int coremark_cmd(int argc, char *argv[]) { return coremark_main(argc, argv); }


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

x86 assembly (clang, -O2):
<coremark_cmd>:
jmp    1030 <coremark_main@plt>

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

LLVM IR (-O2):
define i32 @coremark_cmd(i32 %0, i8** %1) {
%3 = tail call i32 @coremark_main(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ file_getlocalremotedatabasepath(char *, int, unsigned int);
unsigned int file_remove(char *);
unsigned int file_removeremote(unsigned int id) {
  char remotedatapath[128];
  file_getlocalremotedatabasepath(remotedatapath, 128, id);
  return file_remove(remotedatapath);
}


x86 assembly (clang, -O0):
<file_removeremote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    $0x80,%esi
call   1040 <file_getlocalremotedatabasepath@plt>
lea    -0x90(%rbp),%rdi
call   1030 <file_remove@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_removeremote>:
push   %rbx
sub    $0x80,%rsp
mov    %edi,%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1040 <file_getlocalremotedatabasepath@plt>
mov    %rbx,%rdi
call   1030 <file_remove@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @file_removeremote(i32 %0) {
%2 = alloca i32
%3 = alloca [128 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @file_getlocalremotedatabasepath(i8* %4, i32 128, i32 %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = call i32 @file_remove(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @file_removeremote(i32 %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @file_getlocalremotedatabasepath(i8* %3, i32 128, i32 %0)
%5 = call i32 @file_remove(i8* %3)
ret i32 %5
}