xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ gluPerspective(float, int, float, float);
void InitGL(int Width, int Height) {
  glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
  glMatrixMode(GL_PROJECTION);
  gluPerspective(45.0f, (GLfloat)Width / (GLfloat)Height, 0.1f, 100.0f);
  glMatrixMode(GL_MODELVIEW);
}


x86 assembly (clang, -O0):
<InitGL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1050 <glClearColor@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%edi
movss  0xe92(%rip),%xmm0
movss  0xe8e(%rip),%xmm1
movss  0xe8a(%rip),%xmm2
call   1040 <gluPerspective@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitGL>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1050 <glClearColor@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    %ebp,%eax
cltd
idiv   %ebx
movss  0xe9d(%rip),%xmm0
movss  0xe99(%rip),%xmm1
movss  0xe95(%rip),%xmm2
mov    %eax,%edi
call   1040 <gluPerspective@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <glMatrixMode@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @InitGL(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00)
%6 = load i32, i32* @GL_PROJECTION
%7 = call i32 @glMatrixMode(i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sdiv i32 %8, %9
%11 = call i32 @gluPerspective(float 4.500000e+01, i32 %10, float 0x3FB99999A0000000, float 1.000000e+02)
%12 = load i32, i32* @GL_MODELVIEW
%13 = call i32 @glMatrixMode(i32 %12)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @InitGL(i32 %0, i32 %1) {
%3 = tail call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = sdiv i32 %0, %1
%7 = tail call i32 @gluPerspective(float 4.500000e+01, i32 %6, float 0x3FB99999A0000000, float 1.000000e+02)
%8 = load i32, i32* @GL_MODELVIEW
%9 = tail call i32 @glMatrixMode(i32 %8)
ret void
}
char *parse_cmd_args(int argc, char **argv) {
  char *path = "./";
  if (argc > 1) {
    path = argv[1];
  }
  return path;
}


x86 assembly (clang, -O0):
<parse_cmd_args>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeee(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    112c <parse_cmd_args+0x2c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_cmd_args>:
cmp    $0x2,%edi
jl     110a <parse_cmd_args+0xa>
mov    0x8(%rsi),%rax
ret
lea    0xeef(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"./\00"
define i8* @parse_cmd_args(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
store i8* %11, i8** %5
br label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"./\00"
define i8* @parse_cmd_args(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %2 ]
ret i8* %8
}
void pinconf_generic_dump_config(struct pinctrl_dev *pctldev,
                                 struct seq_file *s, unsigned long config) {
  return;
}


x86 assembly (clang, -O0):
<pinconf_generic_dump_config>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pinctrl_dev = type opaque
%struct.seq_file = type opaque
define void @pinconf_generic_dump_config(%struct.pinctrl_dev* %0, %struct.seq_file* %1, i64 %2) {
%4 = alloca %struct.pinctrl_dev*
%5 = alloca %struct.seq_file*
%6 = alloca i64
store %struct.pinctrl_dev* %0, %struct.pinctrl_dev** %4
store %struct.seq_file* %1, %struct.seq_file** %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
%struct.pinctrl_dev = type opaque
%struct.seq_file = type opaque
define void @pinconf_generic_dump_config(%struct.pinctrl_dev* nocapture %0, %struct.seq_file* nocapture %1, i64 %2) {
ret void
}
void get_gesture_sensordata(char *pchRcvDataFrame, int *iDataIdx,
                            struct sensor_value *sensorsdata) {
  return;
}


x86 assembly (clang, -O0):
<get_gesture_sensordata>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sensor_value = type opaque
define void @get_gesture_sensordata(i8* %0, i32* %1, %struct.sensor_value* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca %struct.sensor_value*
store i8* %0, i8** %4
store i32* %1, i32** %5
store %struct.sensor_value* %2, %struct.sensor_value** %6
ret void
}

LLVM IR (-O2):
%struct.sensor_value = type opaque
define void @get_gesture_sensordata(i8* nocapture %0, i32* nocapture %1, %struct.sensor_value* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ nnewline(int);
int /*<<< orphan*/ printf(char *);
void pressAnyKeyToContinue() {
  nnewline(3);
  printf("Press any key to continue . . .");
  getchar();
}


x86 assembly (clang, -O0):
<pressAnyKeyToContinue>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1050 <nnewline@plt>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pressAnyKeyToContinue>:
push   %rax
mov    $0x3,%edi
call   1050 <nnewline@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Press any key to continue . . .\00"
define void @pressAnyKeyToContinue() {
%1 = call i32 @nnewline(i32 3)
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Press any key to continue . . .\00"
define void @pressAnyKeyToContinue() {
%1 = tail call i32 @nnewline(i32 3)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
int is_first_in_group_UnderlyingStipulations(size_t __tag) {
  return (__tag == (888)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_first_in_group_UnderlyingStipulations>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x378,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_first_in_group_UnderlyingStipulations>:
xor    %eax,%eax
cmp    $0x378,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_first_in_group_UnderlyingStipulations(i64 %0) {
%2 = icmp eq i64 %0, 888
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
double polygon_area(int, double const *);
int polygon_check(int n, const double *v) {
  double area = 0;
  if (n < 3) {
    return -1;
  }
  area = polygon_area(n, v);
  if (area < 0) {
    return 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<polygon_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    113d <polygon_check+0x2d>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <polygon_check+0x5f>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <polygon_area@plt>
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1168 <polygon_check+0x58>
movl   $0x2,-0x4(%rbp)
jmp    116f <polygon_check+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polygon_check>:
mov    $0xffffffff,%eax
cmp    $0x3,%edi
jl     1133 <polygon_check+0x23>
push   %rax
call   1030 <polygon_area@plt>
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
add    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @polygon_check(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double*
%6 = alloca double
store i32 %0, i32* %4
store double* %1, double** %5
store double 0.000000e+00, double* %6
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 -1, i32* %3
br label %18
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load double*, double** %5
%13 = call double @polygon_area(i32 %11, double* %12)
store double %13, double* %6
%14 = load double, double* %6
%15 = fcmp olt double %14, 0.000000e+00
br i1 %15, label %16, label %17
16: ; preds = %10
store i32 2, i32* %3
br label %18
17: ; preds = %10
store i32 0, i32* %3
br label %18
18: ; preds = %17, %16, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @polygon_check(i32 %0, double* %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call double @polygon_area(i32 %0, double* %1)
%6 = fcmp olt double %5, 0.000000e+00
%7 = select i1 %6, i32 2, i32 0
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ -1, %2 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *, int);
assert(int ln, _Bool b) {
  if (!b) {
    printf("%d\n", ln);
    abort();
  }
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
and    $0x1,%al
mov    %al,-0x9(%rbp)
testb  $0x1,-0x9(%rbp)
jne    1153 <assert+0x33>
mov    -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
test   %esi,%esi
je     1125 <assert+0x5>
ret
push   %rax
mov    %edi,%eax
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @assert(i32 %0, i1 zeroext %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 %0, i32* %4
%6 = zext i1 %1 to i8
store i8 %6, i8* %5
%7 = load i8, i8* %5
%8 = trunc i8 %7 to i1
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %2
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @assert(i32 %0, i1 zeroext %1) {
br i1 %1, label %6, label %3
3: ; preds = %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello Dur \n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"Hello Dur \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int a_ctz_32(unsigned long);
int a_ctz_64(unsigned long);
int a_ctz_l(unsigned long x) {
  return (sizeof(long) < 8) ? a_ctz_32(x) : a_ctz_64(x);
}


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

x86 assembly (clang, -O2):
<a_ctz_l>:
jmp    1030 <a_ctz_64@plt>

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

LLVM IR (-O2):
define i32 @a_ctz_l(i64 %0) {
%2 = tail call i32 @a_ctz_64(i64 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sub2();
int sub1(void) {
  sub2();
  return 5;
}


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

x86 assembly (clang, -O2):
<sub1>:
push   %rax
xor    %eax,%eax
call   1030 <sub2@plt>
mov    $0x5,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sub1() {
%1 = call i32 (...) @sub2()
ret i32 5
}

LLVM IR (-O2):
define i32 @sub1() {
%1 = tail call i32 (...) @sub2()
ret i32 5
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int printargs(struct tcb *);
int sys_capset(struct tcb *tcp) { return printargs(tcp); }


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

x86 assembly (clang, -O2):
<sys_capset>:
jmp    1030 <printargs@plt>

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

LLVM IR (-O2):
%struct.tcb = type { i32 }
define i32 @sys_capset(%struct.tcb* %0) {
%2 = tail call i32 @printargs(%struct.tcb* %0)
ret i32 %2
}
/* Variables and functions */
char *strstr(const char *a, const char *b) { return NULL; }


x86 assembly (clang, -O0):
<strstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @strstr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @strstr(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
char *myString() {
  char buffer[6] = {0};
  char *s = "Hello World!";
  int i = 0;
  for (i = 0; i < sizeof(buffer) - 1; i++) {
    buffer[i] = *(s + i);
  }
  return buffer;
}


x86 assembly (clang, -O0):
<myString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x6(%rbp),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1030 <memset@plt>
lea    0xed1(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x5,%rax
jae    1170 <myString+0x60>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0x6(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <myString+0x31>
lea    -0x6(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myString>:
lea    -0x6(%rsp),%rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define i8* @myString() {
%1 = alloca [6 x i8]
%2 = alloca i8*
%3 = alloca i32
%4 = bitcast [6 x i8]* %1 to i8*
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
store i32 0, i32* %3
store i32 0, i32* %3
br label %5
5: ; preds = %18, %0
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = icmp ult i64 %7, 5
br i1 %8, label %9, label %21
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 %16
store i8 %14, i8* %17
br label %18
18: ; preds = %9
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %5
21: ; preds = %5
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @myString() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
ret i8* %2
}
/* Type definitions */
typedef int ushort;

/* Variables and functions */
ushort Vect(ushort caseij) {
  if (caseij == 0) {
    return 1022;
  } else {
    return (1 << caseij);
  }
}


x86 assembly (clang, -O0):
<Vect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <Vect+0x1d>
movl   $0x3fe,-0x4(%rbp)
jmp    112a <Vect+0x2a>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vect>:
mov    %edi,%ecx
mov    $0x1,%edx
shl    %cl,%edx
test   %edi,%edi
mov    $0x3fe,%eax
cmovne %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @Vect(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = shl nuw i32 1, %0
%4 = select i1 %2, i32 1022, i32 %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_shell {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_get_version(struct wl_proxy *);
uint32_t wl_shell_get_version(struct wl_shell *wl_shell) {
  return wl_proxy_get_version((struct wl_proxy *)wl_shell);
}


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

x86 assembly (clang, -O2):
<wl_shell_get_version>:
jmp    1030 <wl_proxy_get_version@plt>

LLVM IR (-O0):
%struct.wl_shell = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_shell_get_version(%struct.wl_shell* %0) {
%2 = alloca %struct.wl_shell*
store %struct.wl_shell* %0, %struct.wl_shell** %2
%3 = load %struct.wl_shell*, %struct.wl_shell** %2
%4 = bitcast %struct.wl_shell* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_get_version(%struct.wl_proxy* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.wl_shell = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_shell_get_version(%struct.wl_shell* %0) {
%2 = bitcast %struct.wl_shell* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_get_version(%struct.wl_proxy* %2)
ret i32 %3
}
void __attribute__((warning("curl_easy_setopt expects a curl_ssl_ctx_callback "
                            "argument for this option")))
__attribute__((unused)) __attribute__((no))
_curl_easy_setopt_err_ssl_ctx_cb(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_ssl_ctx_cb() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ loop();
int main(int argc, char **argv __attribute__((unused))) {
  if (argc > 1)
    return 1;
  loop();
  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)
cmpl   $0x1,-0x8(%rbp)
jle    113c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    114a <main+0x3a>
mov    $0x0,%al
call   1030 <loop@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ebx
cmp    $0x1,%edi
jg     1124 <main+0x14>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <loop@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @loop()
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int x = 2;
  do {
    printf("*");
    x--;
  } while ((!x) == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @putchar(i32 42)
%4 = tail call i32 @putchar(i32 42)
ret i32 0
}
int test1u(unsigned int x) { return x / 10U == 2; }


x86 assembly (clang, -O0):
<test1u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1u>:
add    $0xffffffec,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @test1u(i32 %0) {
%2 = add i32 %0, -20
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fscanf(int /*<<< orphan*/ *, char *, char *);
void skip_line(FILE *infile) {
  int status;
  char c;
  while ((status = fscanf(infile, "%c", &c)) != EOF) {
    if (c == '\n')
      break;
  }
}


x86 assembly (clang, -O0):
<skip_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0xd(%rbp),%rdx
call   1030 <fscanf@plt>
mov    %eax,-0xc(%rbp)
mov    0x2eae(%rip),%rcx
cmp    (%rcx),%eax
je     1159 <skip_line+0x49>
movsbl -0xd(%rbp),%eax
cmp    $0xa,%eax
jne    1154 <skip_line+0x44>
jmp    1159 <skip_line+0x49>
jmp    111c <skip_line+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_line>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xede(%rip),%r14
lea    0x7(%rsp),%r15
mov    0x2eba(%rip),%r12
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <fscanf@plt>
cmp    (%r12),%eax
je     114b <skip_line+0x3b>
cmpb   $0xa,0x7(%rsp)
jne    1130 <skip_line+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@EOF = global i32 0
define void @skip_line(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i8
store i32* %0, i32** %2
br label %5
5: ; preds = %15, %1
%6 = load i32*, i32** %2
%7 = call i32 @fscanf(i32* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
store i32 %7, i32* %3
%8 = load i32, i32* @EOF
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %14, label %15
14: ; preds = %10
br label %16
15: ; preds = %10
br label %5
16: ; preds = %14, %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@EOF = global i32 0
define void @skip_line(i32* nocapture %0) {
%2 = alloca i8
br label %3
3: ; preds = %3, %1
%4 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
%7 = load i8, i8* %2
%8 = icmp eq i8 %7, 10
%9 = select i1 %6, i1 true, i1 %8
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_ld_sp_hl(void) { op_write1(0xf9); }


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

x86 assembly (clang, -O2):
<op_enc_ld_sp_hl>:
mov    $0xf9,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_ld_sp_hl() {
%1 = call i32 @op_write1(i32 249)
ret void
}

LLVM IR (-O2):
define void @op_enc_ld_sp_hl() {
%1 = tail call i32 @op_write1(i32 249)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendExternalInterrupt11(void) {
  SendInterrupt(0x5B, 0x1, 0x8000, 0x08000000);
}


x86 assembly (clang, -O0):
<ScuSendExternalInterrupt11>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5b,%edi
mov    $0x1,%esi
mov    $0x8000,%edx
mov    $0x8000000,%ecx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendExternalInterrupt11>:
mov    $0x5b,%edi
mov    $0x1,%esi
mov    $0x8000,%edx
mov    $0x8000000,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendExternalInterrupt11() {
%1 = call i32 @SendInterrupt(i32 91, i32 1, i32 32768, i32 134217728)
ret void
}

LLVM IR (-O2):
define void @ScuSendExternalInterrupt11() {
%1 = tail call i32 @SendInterrupt(i32 91, i32 1, i32 32768, i32 134217728)
ret void
}
/* Variables and functions */
double __nv_rhypot(double, double);
double rhypot(double __a, double __b) { return __nv_rhypot(__a, __b); }


x86 assembly (clang, -O0):
<rhypot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__nv_rhypot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rhypot>:
jmp    1030 <__nv_rhypot@plt>

LLVM IR (-O0):
define double @rhypot(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__nv_rhypot(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @rhypot(double %0, double %1) {
%3 = tail call double @__nv_rhypot(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ perror_msg_and_die(char *);
void error_msg_and_die(char *text) { perror_msg_and_die(text); }


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

x86 assembly (clang, -O2):
<error_msg_and_die>:
jmp    1030 <perror_msg_and_die@plt>

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

LLVM IR (-O2):
define void @error_msg_and_die(i8* %0) {
%2 = tail call i32 @perror_msg_and_die(i8* %0)
ret void
}
void gtk_tree_view_get_search_equal_func() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_search_equal_func() {
ret void
}
int do_heart(char *packet) { return (4 + 2); }


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

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

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

LLVM IR (-O2):
define i32 @do_heart(i8* nocapture readnone %0) {
ret i32 6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
__attribute__((always_)) bool assert_true(bool flag) {
  assert(flag);
  return flag;
}


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

x86 assembly (clang, -O2):
<assert_true>:
push   %rbx
mov    %edi,%ebx
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @assert_true(i32 returned %0) {
%2 = tail call i32 @assert(i32 %0)
ret i32 %0
}
void RTSemRWCreate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemRWCreate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xalloc(size_t size, char *myname) {
  void *p = malloc(size);
  if (p == NULL) {
    fprintf(stderr, "%s: out of memory\n", myname);
    exit(2);
  }
  return p;
}


x86 assembly (clang, -O0):
<xalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117b <xalloc+0x4b>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xalloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <xalloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"%s: out of memory\0A\00"
define noalias i8* @xalloc(i64 %0, i8* %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @exit(i32 2)
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ logger_info(char *, char const *, char *);
void test_message_start(const char *name) {
  logger_info(":%s %s", name, "--a94e2gfwdd--");
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c":%s %s\00"
@.str.1 = [15 x i8] c"--a94e2gfwdd--\00"
define void @test_message_start(i8* %0) {
%2 = tail call i32 @logger_info(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ dump_memoryf(int /*<<< orphan*/ *, void const *, size_t, int,
                                size_t);
void dump_memory(FILE *out, void const *data, size_t size, size_t offset) {
  dump_memoryf(out, data, size, 16, offset);
}


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

x86 assembly (clang, -O2):
<dump_memory>:
mov    %rcx,%r8
mov    $0x10,%ecx
jmp    1030 <dump_memoryf@plt>

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

LLVM IR (-O2):
define void @dump_memory(i32* %0, i8* %1, i64 %2, i64 %3) {
%5 = tail call i32 @dump_memoryf(i32* %0, i8* %1, i64 %2, i32 16, i64 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int fileRead16(FILE *fp) {
  unsigned int r = fgetc(fp);
  r |= fgetc(fp) << 8;
  return r;
}


x86 assembly (clang, -O0):
<fileRead16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileRead16>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fgetc@plt>
shl    $0x8,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fileRead16(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fgetc(i32* %4)
store i32 %5, i32* %3
%6 = load i32*, i32** %2
%7 = call i32 @fgetc(i32* %6)
%8 = shl i32 %7, 8
%9 = load i32, i32* %3
%10 = or i32 %9, %8
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @fileRead16(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = shl i32 %3, 8
%5 = or i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char str[5];
  strcpy(str, "0123456789abcdef");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789abcdef\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ _Exit(int);
int /*<<< orphan*/ raise(int /*<<< orphan*/);
void abort(void) {
  raise(SIGABRT);
  _Exit(127);
}


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
mov    $0x7f,%edi
call   1040 <_Exit@plt>

x86 assembly (clang, -O2):
<abort>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
mov    $0x7f,%edi
call   1040 <_Exit@plt>

LLVM IR (-O0):
@SIGABRT = global i32 0
define void @abort() {
%1 = load i32, i32* @SIGABRT
%2 = call i32 @raise(i32 %1)
%3 = call i32 @_Exit(i32 127)
unreachable
}

LLVM IR (-O2):
@SIGABRT = global i32 0
define void @abort() {
%1 = load i32, i32* @SIGABRT
%2 = tail call i32 @raise(i32 %1)
%3 = tail call i32 @_Exit(i32 127)
unreachable
}
int int_ascending(const void *a, const void *b) {
  if (*(int *)a < *(int *)b)
    return -1;
  else
    return 1;
}


x86 assembly (clang, -O0):
<int_ascending>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <int_ascending+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1131 <int_ascending+0x31>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_ascending>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setge  %cl
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @int_ascending(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = select i1 %7, i32 -1, i32 1
ret i32 %8
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t get(int64_t n) {
  int m;
  m = 0;
  if (n == 0)
    return (0);
  while (n >= 10) {
    n /= 10;
    m++;
  }
  return (m);
}


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <get+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1155 <get+0x55>
jmp    1129 <get+0x29>
cmpl   $0xa,-0x8(%rbp)
jl     114f <get+0x4f>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <get+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
xor    %eax,%eax
cmp    $0xa,%edi
jl     1124 <get+0x24>
xor    %eax,%eax
mov    $0xcccccccd,%ecx
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1110 <get+0x10>
ret

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

LLVM IR (-O2):
define i32 @get(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = icmp ugt i32 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
int t1_init_ctxno_mag(int f) {
  int n;
  if (!(f & 0x2000)) {
    n = (f & ((0x0010 | 0x0001 | 0x0020 | 0x0002 | 0x0040 | 0x0004 | 0x0080 |
               0x0008)))
            ? 1
            : 0;
  } else {
    n = 2;
  }
  return (((0 + 1) + 9) + n);
}


x86 assembly (clang, -O0):
<t1_init_ctxno_mag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
jne    1136 <t1_init_ctxno_mag+0x36>
mov    -0x4(%rbp),%edx
and    $0xff,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <t1_init_ctxno_mag+0x3d>
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_init_ctxno_mag>:
cmp    $0x1,%dil
mov    $0xb,%ecx
sbb    $0x0,%ecx
test   $0x2000,%edi
mov    $0xc,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @t1_init_ctxno_mag(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 8192
%6 = icmp ne i32 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1
%8 = load i32, i32* %2
%9 = and i32 %8, 255
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 1, i32 0
store i32 %12, i32* %3
br label %14
13: ; preds = %1
store i32 2, i32* %3
br label %14
14: ; preds = %13, %7
%15 = load i32, i32* %3
%16 = add nsw i32 10, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @t1_init_ctxno_mag(i32 %0) {
%2 = and i32 %0, 8192
%3 = icmp eq i32 %2, 0
%4 = and i32 %0, 255
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 10, i32 11
%7 = select i1 %3, i32 %6, i32 12
ret i32 %7
}
void gdk_keymap_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_keymap_get_type() {
ret void
}
/* Variables and functions */
int debug_active_process();
int debug_rt_pid(int);
int /*<<< orphan*/ printf(char *);
int debug_display_rt() {
  int pid = debug_active_process();
  if (pid > -1)
    return debug_rt_pid(pid);
  printf("No active processes.\n");
  return 0;
}


x86 assembly (clang, -O0):
<debug_display_rt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <debug_active_process@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jle    115c <debug_display_rt+0x2c>
mov    -0x8(%rbp),%edi
call   1050 <debug_rt_pid@plt>
mov    %eax,-0x4(%rbp)
jmp    116f <debug_display_rt+0x3f>
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_display_rt>:
push   %rax
xor    %eax,%eax
call   1040 <debug_active_process@plt>
test   %eax,%eax
js     1144 <debug_display_rt+0x14>
mov    %eax,%edi
pop    %rax
jmp    1050 <debug_rt_pid@plt>
lea    0xeb5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"No active processes.\0A\00"
define i32 @debug_display_rt() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @debug_active_process()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @debug_rt_pid(i32 %7)
store i32 %8, i32* %1
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@str = [21 x i8] c"No active processes.\00"
define i32 @debug_display_rt() {
%1 = tail call i32 (...) @debug_active_process()
%2 = icmp sgt i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @debug_rt_pid(i32 %1)
br label %7
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %4, %3 ], [ 0, %5 ]
ret i32 %8
}
/* Variables and functions */
float ceilf(float);
float floorf(float);
float symroundf(float f) { return (f < 0) ? floorf(f) : ceilf(f); }


x86 assembly (clang, -O0):
<symroundf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    114e <symroundf+0x2e>
movss  -0x4(%rbp),%xmm0
call   1030 <floorf@plt>
movss  %xmm0,-0x8(%rbp)
jmp    115d <symroundf+0x3d>
movss  -0x4(%rbp),%xmm0
call   1040 <ceilf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symroundf>:
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    112d <symroundf+0xd>
jmp    1030 <floorf@plt>
jmp    1040 <ceilf@plt>

LLVM IR (-O0):
define float @symroundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = call float @llvm.floor.f32(float %6)
br label %11
8: ; preds = %1
%9 = load float, float* %2
%10 = call float @llvm.ceil.f32(float %9)
br label %11
11: ; preds = %8, %5
%12 = phi float [ %7, %5 ], [ %10, %8 ]
ret float %12
}

LLVM IR (-O2):
define float @symroundf(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call float @llvm.floor.f32(float %0)
br label %7
5: ; preds = %1
%6 = tail call float @llvm.ceil.f32(float %0)
br label %7
7: ; preds = %5, %3
%8 = phi float [ %4, %3 ], [ %6, %5 ]
ret float %8
}