xunge/DecIR huggingface dataset:
int udev_fill_info(struct device_info *info, struct stat *stat) {
  (void)stat;
  (void)info;
  return -1;
}


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

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

LLVM IR (-O0):
%struct.device_info = type opaque
%struct.stat = type opaque
define i32 @udev_fill_info(%struct.device_info* %0, %struct.stat* %1) {
%3 = alloca %struct.device_info*
%4 = alloca %struct.stat*
store %struct.device_info* %0, %struct.device_info** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load %struct.stat*, %struct.stat** %4
%6 = load %struct.device_info*, %struct.device_info** %3
ret i32 -1
}

LLVM IR (-O2):
%struct.device_info = type opaque
%struct.stat = type opaque
define i32 @udev_fill_info(%struct.device_info* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int close(int);
int i2c_close(int fd) { return fd == -1 ? 0 : close(fd); }


x86 assembly (clang, -O0):
<i2c_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    112f <i2c_close+0x1f>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <i2c_close+0x2a>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_close>:
cmp    $0xffffffff,%edi
je     111a <i2c_close+0xa>
jmp    1030 <close@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @i2c_close(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
scalar_t__ strlen(char *);
int s_list_test_sort_len(const void *a, const void *b) {
  char *ca = *(char **)a;
  char *cb = *(char **)b;
  return (int)((int)strlen(ca) - (int)strlen(cb));
}


x86 assembly (clang, -O0):
<s_list_test_sort_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x24(%rbp),%eax
sub    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_list_test_sort_len>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%r14
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @s_list_test_sort_len(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i64 @strlen(i8* dereferenceable(1) %4)
%8 = trunc i64 %7 to i32
%9 = tail call i64 @strlen(i8* dereferenceable(1) %6)
%10 = trunc i64 %9 to i32
%11 = sub nsw i32 %8, %10
ret i32 %11
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *Create_Campaign_Scenery() {
  char *scene_file;
  scene_file = (char *)calloc(128, sizeof(char));
  if (!scene_file)
    return NULL;
  strcpy(scene_file, "mission_scene_file scenery/los_angeles.scn");
  return scene_file;
}


x86 assembly (clang, -O0):
<Create_Campaign_Scenery>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x80,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1153 <Create_Campaign_Scenery+0x33>
movq   $0x0,-0x8(%rbp)
jmp    116b <Create_Campaign_Scenery+0x4b>
mov    -0x10(%rbp),%rdi
lea    0xea2(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Create_Campaign_Scenery>:
push   %rbx
mov    $0x80,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
test   %rax,%rax
je     1149 <Create_Campaign_Scenery+0x29>
mov    %rax,%rbx
lea    0xec1(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
jmp    114b <Create_Campaign_Scenery+0x2b>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"mission_scene_file scenery/los_angeles.scn\00"
define i8* @Create_Campaign_Scenery() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i64 @calloc(i32 128, i32 1)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %0
store i8* null, i8** %1
br label %12
8: ; preds = %0
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%11 = load i8*, i8** %2
store i8* %11, i8** %1
br label %12
12: ; preds = %8, %7
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [43 x i8] c"mission_scene_file scenery/los_angeles.scn\00"
define i8* @Create_Campaign_Scenery() {
%1 = tail call i64 @calloc(i32 128, i32 1)
%2 = inttoptr i64 %1 to i8*
%3 = icmp eq i64 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %0, %4
%7 = phi i8* [ %2, %4 ], [ null, %0 ]
ret i8* %7
}
/* Variables and functions */
int cfe_readblk(int, int /*<<< orphan*/, unsigned char *, int);
int cfe_read(int handle, unsigned char *buffer, int length) {
  return cfe_readblk(handle, 0, buffer, length);
}


x86 assembly (clang, -O0):
<cfe_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %esi,%esi
call   1030 <cfe_readblk@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfe_read>:
mov    %edx,%ecx
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <cfe_readblk@plt>

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

LLVM IR (-O2):
define i32 @cfe_read(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @cfe_readblk(i32 %0, i32 0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ my_task(double *, double *);
void not_the_ones_registered(void) {
  double a[12], b[23], p[12], q[23];
#pragma starpu register a
#pragma starpu register b
  my_task(p, q);
}


x86 assembly (clang, -O0):
<not_the_ones_registered>:
push   %rbp
mov    %rsp,%rbp
sub    $0x240,%rsp
lea    -0x180(%rbp),%rdi
lea    -0x240(%rbp),%rsi
call   1030 <my_task@plt>
add    $0x240,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_the_ones_registered>:
sub    $0x118,%rsp
mov    %rsp,%rdi
lea    0x60(%rsp),%rsi
call   1030 <my_task@plt>
add    $0x118,%rsp
ret

LLVM IR (-O0):
define void @not_the_ones_registered() {
%1 = alloca [12 x double]
%2 = alloca [23 x double]
%3 = alloca [12 x double]
%4 = alloca [23 x double]
%5 = getelementptr inbounds [12 x double], [12 x double]* %3, i64 0, i64 0
%6 = getelementptr inbounds [23 x double], [23 x double]* %4, i64 0, i64 0
%7 = call i32 @my_task(double* %5, double* %6)
ret void
}

LLVM IR (-O2):
define void @not_the_ones_registered() {
%1 = alloca [12 x double]
%2 = alloca [23 x double]
%3 = bitcast [12 x double]* %1 to i8*
%4 = bitcast [23 x double]* %2 to i8*
%5 = getelementptr inbounds [12 x double], [12 x double]* %1, i64 0, i64 0
%6 = getelementptr inbounds [23 x double], [23 x double]* %2, i64 0, i64 0
%7 = call i32 @my_task(double* %5, double* %6)
ret void
}
void INT_Excep_PERIA_INTA235(void) {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @enb_() {
ret void
}
void computeE(void) { ; }


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

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

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

LLVM IR (-O2):
define void @computeE() {
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t rdtsc(void) {
  uint64_t r;
  __asm__ __volatile__("rdtsc" : "=A"(r));
  return r;
}


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

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

LLVM IR (-O0):
define i8* @rdtsc() {
%1 = alloca i8*
%2 = call i8* asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @rdtsc() {
%1 = tail call i8* asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i8* %1
}
void BSP_LockBfg(void) { *(volatile unsigned long *)0x02620038 = 0x0; }


x86 assembly (clang, -O0):
<BSP_LockBfg>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2620038,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_LockBfg>:
movq   $0x0,0x2620038
ret

LLVM IR (-O0):
define void @BSP_LockBfg() {
store volatile i64 0, i64* inttoptr (i64 39977016 to i64*)
ret void
}

LLVM IR (-O2):
define void @BSP_LockBfg() {
store volatile i64 0, i64* inttoptr (i64 39977016 to i64*)
ret void
}
char *firstwhite(s)
char *s;
{
  char *s1, *s2;
  s1 = index(s, ' ');
  s2 = index(s, '\t');
  if (s1) {
    if (s2)
      return (s1 < s2) ? s1 : s2;
    else
      return s1;
  } else
    return s2;
}


x86 assembly (clang, -O0):
<firstwhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1030 <index@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x9,%esi
call   1030 <index@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1193 <firstwhite+0x83>
cmpq   $0x0,-0x20(%rbp)
je     1186 <firstwhite+0x76>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1171 <firstwhite+0x61>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1179 <firstwhite+0x69>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    119b <firstwhite+0x8b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    119b <firstwhite+0x8b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<firstwhite>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x20,%esi
call   1030 <index@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <index@plt>
test   %r14,%r14
je     1147 <firstwhite+0x37>
test   %rax,%rax
je     1144 <firstwhite+0x34>
cmp    %rax,%r14
cmovb  %r14,%rax
jmp    1147 <firstwhite+0x37>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @firstwhite(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @index(i8* %6, i32 32)
store i8* %7, i8** %4
%8 = load i8*, i8** %3
%9 = call i8* @index(i8* %8, i32 9)
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %27
12: ; preds = %1
%13 = load i8*, i8** %5
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %25
15: ; preds = %12
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = icmp ult i8* %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load i8*, i8** %4
br label %23
21: ; preds = %15
%22 = load i8*, i8** %5
br label %23
23: ; preds = %21, %19
%24 = phi i8* [ %20, %19 ], [ %22, %21 ]
store i8* %24, i8** %2
br label %29
25: ; preds = %12
%26 = load i8*, i8** %4
store i8* %26, i8** %2
br label %29
27: ; preds = %1
%28 = load i8*, i8** %5
store i8* %28, i8** %2
br label %29
29: ; preds = %27, %25, %23
%30 = load i8*, i8** %2
ret i8* %30
}

LLVM IR (-O2):
define i8* @firstwhite(i8* %0) {
%2 = tail call i8* @index(i8* %0, i32 32)
%3 = tail call i8* @index(i8* %0, i32 9)
%4 = icmp eq i8* %2, null
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = icmp eq i8* %3, null
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i8* %2, %3
%9 = select i1 %8, i8* %2, i8* %3
br label %10
10: ; preds = %1, %5, %7
%11 = phi i8* [ %9, %7 ], [ %2, %5 ], [ %3, %1 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndirectE1(int);
int /*<<< orphan*/ STA8(int /*<<< orphan*/);
void Op92E1(void) { STA8(DirectIndirectE1(2)); }


x86 assembly (clang, -O0):
<Op92E1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <DirectIndirectE1@plt>
mov    %eax,%edi
call   1030 <STA8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op92E1>:
push   %rax
mov    $0x2,%edi
call   1040 <DirectIndirectE1@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <STA8@plt>

LLVM IR (-O0):
define void @Op92E1() {
%1 = call i32 @DirectIndirectE1(i32 2)
%2 = call i32 @STA8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op92E1() {
%1 = tail call i32 @DirectIndirectE1(i32 2)
%2 = tail call i32 @STA8(i32 %1)
ret void
}
/* Variables and functions */
void Default_EGU3_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_EGU3_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_EGU3_IRQHandler+0x9>
jmp    1109 <Default_EGU3_IRQHandler+0x9>

x86 assembly (clang, -O2):
<Default_EGU3_IRQHandler>:
jmp    1100 <Default_EGU3_IRQHandler>

LLVM IR (-O0):
define void @Default_EGU3_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_EGU3_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int pthread_self();
void echomsg(int t) {
  printf("destructor excuted in thread %d,param=%d\n", pthread_self(), t);
}


x86 assembly (clang, -O0):
<echomsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%esi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echomsg>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"destructor excuted in thread %d,param=%d\0A\00"
define void @echomsg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @pthread_self()
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"destructor excuted in thread %d,param=%d\0A\00"
define void @echomsg(i32 %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EBADF;
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int tcsendbreak(int fd, int duration) {
  if (fd < 0) {
    __set_errno(EBADF);
    return -1;
  }
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<tcsendbreak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1142 <tcsendbreak+0x32>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <tcsendbreak+0x47>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcsendbreak>:
push   %rax
test   %edi,%edi
jns    111e <tcsendbreak+0xe>
mov    0x2ebc(%rip),%rax
jmp    1125 <tcsendbreak+0x15>
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EBADF = global i32 0
@ENOSYS = global i32 0
define i32 @tcsendbreak(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
%4 = load i32, i32* @EBADF
%5 = load i32, i32* @ENOSYS
%6 = select i1 %3, i32 %4, i32 %5
%7 = tail call i32 @__set_errno(i32 %6)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ GL_TRIANGLE_STRIP;
int /*<<< orphan*/ glDrawArrays(int /*<<< orphan*/, int /*<<< orphan*/, int);
void glfxRedraw(void) { glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); }


x86 assembly (clang, -O0):
<glfxRedraw>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <glDrawArrays@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glfxRedraw>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
mov    $0x4,%edx
jmp    1030 <glDrawArrays@plt>

LLVM IR (-O0):
@GL_TRIANGLE_STRIP = global i32 0
define void @glfxRedraw() {
%1 = load i32, i32* @GL_TRIANGLE_STRIP
%2 = call i32 @glDrawArrays(i32 %1, i32 0, i32 4)
ret void
}

LLVM IR (-O2):
@GL_TRIANGLE_STRIP = global i32 0
define void @glfxRedraw() {
%1 = load i32, i32* @GL_TRIANGLE_STRIP
%2 = tail call i32 @glDrawArrays(i32 %1, i32 0, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dmm_make_snapshot(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdlib_release();
void __attribute__((destructor)) dmm_destruct(void) {
  printf("DMM exiting...\n");
  dmm_make_snapshot(0);
  stdlib_release();
}


x86 assembly (clang, -O0):
<dmm_destruct>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <dmm_make_snapshot@plt>
mov    $0x0,%al
call   1040 <stdlib_release@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmm_destruct>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <dmm_make_snapshot@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <stdlib_release@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"DMM exiting...\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @dmm_destruct, i8* null }]
define void @dmm_destruct() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @dmm_make_snapshot(i32 0)
%3 = call i32 (...) @stdlib_release()
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @dmm_destruct, i8* null }]
@str = [15 x i8] c"DMM exiting...\00"
define void @dmm_destruct() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @dmm_make_snapshot(i32 0)
%3 = tail call i32 (...) @stdlib_release()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendFrame(int, unsigned char *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/);
void SendLAFrame(int newtFd, unsigned char seqNo) {
  unsigned char laFrameHead[4] = {'\x03', '\x05', '\x00', '\x01'};
  laFrameHead[2] = seqNo;
  SendFrame(newtFd, laFrameHead, NULL, 0);
  return;
}


x86 assembly (clang, -O0):
<SendLAFrame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    0xed9(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x9(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
call   1030 <SendFrame@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendLAFrame>:
push   %rax
movl   $0x1000503,0x4(%rsp)
01
mov    %sil,0x6(%rsp)
lea    0x4(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <SendFrame@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.SendLAFrame.laFrameHead = [4 x i8] c"\03\05\00\01"
define void @SendLAFrame(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [4 x i8]
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = bitcast [4 x i8]* %5 to i8*
%7 = load i8, i8* %4
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 2
store i8 %7, i8* %8
%9 = load i32, i32* %3
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%11 = call i32 @SendFrame(i32 %9, i8* %10, i32* null, i32 0)
ret void
}

LLVM IR (-O2):
define void @SendLAFrame(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to [4 x i8]*
%5 = bitcast i32* %3 to i8*
store i32 16778499, i32* %3
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
store i8 %1, i8* %6
%7 = call i32 @SendFrame(i32 %0, i8* %5, i32* null, i32 0)
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR5A_get(void) { return U_WMRCORENONE_get("U_WMR5A"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR5A\00"
define i32 @U_WMR5A_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR5A\00"
define i32 @U_WMR5A_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int _c2_addr_read();
void wait_busy(void) {
  while (_c2_addr_read() & (1 << 1))
    ;
}


x86 assembly (clang, -O0):
<wait_busy>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <wait_busy+0x9>
mov    $0x0,%al
call   1030 <_c2_addr_read@plt>
and    $0x2,%eax
cmp    $0x0,%eax
je     1131 <wait_busy+0x21>
jmp    1119 <wait_busy+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_busy>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <_c2_addr_read@plt>
test   $0x2,%al
jne    1120 <wait_busy+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @wait_busy() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @_c2_addr_read()
%3 = and i32 %2, 2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @wait_busy() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @_c2_addr_read()
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Place Holder Main function...\n");
  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)
lea    0xed3(%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 = [31 x i8] c"Place Holder Main function...\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 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"Place Holder Main function...\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int sqr(par)
int par;
{ return par * par; }


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

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

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

LLVM IR (-O2):
define i32 @sqr(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t max(uint32_t const a, uint32_t const b) {
  if (a > b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1127 <max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <max+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
int main(int argc, char *argv[]) {
  int i = 2;
  return i;
}


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

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

LLVM IR (-O0):
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
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 2
}
/* Variables and functions */
double __infer_nondet_double();
double copysign(double x, double y) { return __infer_nondet_double(); }


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

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

LLVM IR (-O0):
define double @copysign(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call double (...) @__infer_nondet_double()
ret double %5
}

LLVM IR (-O2):
define double @copysign(double %0, double %1) {
%3 = tail call double (...) @__infer_nondet_double()
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ do_expression();
char get_name();
int /*<<< orphan*/ match(char);
int /*<<< orphan*/ printf(char *, char);
void do_let() {
  char name = get_name();
  match('=');
  do_expression();
  printf("\tmov [v%c], ax\n", name);
}


x86 assembly (clang, -O0):
<do_let>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <get_name@plt>
mov    %al,-0x1(%rbp)
mov    $0x3d,%edi
call   1040 <match@plt>
mov    $0x0,%al
call   1050 <do_expression@plt>
lea    0xe96(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_let>:
push   %rbx
xor    %eax,%eax
call   1060 <get_name@plt>
mov    %eax,%ebx
mov    $0x3d,%edi
call   1040 <match@plt>
xor    %eax,%eax
call   1050 <do_expression@plt>
movsbl %bl,%esi
lea    0xe9b(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\09mov [v%c], ax\0A\00"
define void @do_let() {
%1 = alloca i8
%2 = call signext i8 (...) @get_name()
store i8 %2, i8* %1
%3 = call i32 @match(i8 signext 61)
%4 = call i32 (...) @do_expression()
%5 = load i8, i8* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext %5)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\09mov [v%c], ax\0A\00"
define void @do_let() {
%1 = tail call signext i8 (...) @get_name()
%2 = tail call i32 @match(i8 signext 61)
%3 = tail call i32 (...) @do_expression()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext %1)
ret void
}
/* Variables and functions */
int resource_GetTokenMeta(char *, int, int /*<<< orphan*/ *,
                          int /*<<< orphan*/);
int resource_GetToken(char *filename, int type) {
  return resource_GetTokenMeta(filename, type, NULL, 0);
}


x86 assembly (clang, -O0):
<resource_GetToken>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
call   1030 <resource_GetTokenMeta@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resource_GetToken>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <resource_GetTokenMeta@plt>

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

LLVM IR (-O2):
define i32 @resource_GetToken(i8* %0, i32 %1) {
%3 = tail call i32 @resource_GetTokenMeta(i8* %0, i32 %1, i32* null, i32 0)
ret i32 %3
}
int armory(element)
int element;
{
  switch (element) {
  case 30:
  case 31:
  case 33:
  case 34:
  case 35:
  case 36:
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<armory>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffe2,%eax
sub    $0x2,%eax
jb     1132 <armory+0x32>
jmp    111e <armory+0x1e>
mov    -0xc(%rbp),%eax
add    $0xffffffdf,%eax
sub    $0x3,%eax
ja     113e <armory+0x3e>
jmp    1132 <armory+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1145 <armory+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<armory>:
add    $0xffffffe2,%edi
xor    %eax,%eax
cmp    $0x6,%edi
ja     1117 <armory+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @armory(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 30, label %5
i32 31, label %5
i32 33, label %5
i32 34, label %5
i32 35, label %5
i32 36, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@switch.table.armory = [7 x i32] [i32 1, i32 1, i32 0, i32 1, i32 1, i32 1, i32 1]
define i32 @armory(i32 %0) {
%2 = add i32 %0, -30
%3 = icmp ult i32 %2, 7
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table.armory, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
int omap4_tps62361_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omap4_tps62361_init() {
ret i32 0
}
/* Variables and functions */
scalar_t__ strtod(char const *, char **);
float strtof(const char *str, char **endptr) {
  return (float)strtod(str, endptr);
}


x86 assembly (clang, -O0):
<strtof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strtod@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @strtof(i8* %0, i8** nocapture %1) {
%3 = tail call i64 @strtod(i8* %0, i8** %1)
%4 = sitofp i64 %3 to float
ret float %4
}
int IPE2() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @IPE2() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ IF_catC_i(int /*<<< orphan*/);
void IF_catC(void) { IF_catC_i(0); }


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

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

LLVM IR (-O0):
define void @IF_catC() {
%1 = call i32 @IF_catC_i(i32 0)
ret void
}

LLVM IR (-O2):
define void @IF_catC() {
%1 = tail call i32 @IF_catC_i(i32 0)
ret void
}
/* Variables and functions */
int __get_IPSR();
void unhandled_vector(void) {
  volatile int isr_number = (int)(__get_IPSR() & 0x1FF);
  if (isr_number < 16) {
  } else {
  }
  while (1) {
  }
}


x86 assembly (clang, -O0):
<unhandled_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__get_IPSR@plt>
and    $0x1ff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x10,%eax
jge    1138 <unhandled_vector+0x28>
jmp    113d <unhandled_vector+0x2d>
jmp    113d <unhandled_vector+0x2d>
jmp    1142 <unhandled_vector+0x32>
jmp    1142 <unhandled_vector+0x32>

x86 assembly (clang, -O2):
<unhandled_vector>:
push   %rax
xor    %eax,%eax
call   1030 <__get_IPSR@plt>
and    $0x1ff,%eax
mov    %eax,0x4(%rsp)
mov    0x4(%rsp),%eax
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1130 <unhandled_vector+0x20>

LLVM IR (-O0):
define void @unhandled_vector() {
%1 = alloca i32
%2 = call i32 (...) @__get_IPSR()
%3 = and i32 %2, 511
store volatile i32 %3, i32* %1
%4 = load volatile i32, i32* %1
%5 = icmp slt i32 %4, 16
br i1 %5, label %6, label %7
6: ; preds = %0
br label %8
7: ; preds = %0
br label %8
8: ; preds = %7, %6
br label %9
9: ; preds = %8, %9
br label %9
}

LLVM IR (-O2):
define void @unhandled_vector() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @__get_IPSR()
%4 = and i32 %3, 511
store volatile i32 %4, i32* %1
%5 = load volatile i32, i32* %1
br label %6
6: ; preds = %6, %0
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ print_binary(int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int x;
  scanf("%i", &x);
  print_binary(x);
  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)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%edi
call   1030 <print_binary@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <print_binary@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\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
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%8 = load i32, i32* %6
%9 = call i32 @print_binary(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @print_binary(i32 %6)
ret i32 0
}
int ccnl_enc2suite(int enc) {
  switch (enc) {
  default:
    break;
  }
  return -1;
}


x86 assembly (clang, -O0):
<ccnl_enc2suite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    110c <ccnl_enc2suite+0xc>
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ccnl_enc2suite(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %4 [
]
4: ; preds = %1
br label %5
5: ; preds = %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @ccnl_enc2suite(i32 %0) {
ret i32 -1
}
int test2(void) {
  extern int xyzzy2(int);
  return xyzzy2(5);
}


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

x86 assembly (clang, -O2):
<test2>:
mov    $0x5,%edi
jmp    1030 <xyzzy2@plt>

LLVM IR (-O0):
define i32 @test2() {
%1 = call i32 @xyzzy2(i32 5)
ret i32 %1
}

LLVM IR (-O2):
define i32 @test2() {
%1 = tail call i32 @xyzzy2(i32 5)
ret i32 %1
}
void XkbLibraryVersion() {}


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

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

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

LLVM IR (-O2):
define void @XkbLibraryVersion() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char, char);
int main() {
  char a = 'a';
  char b = 'b';
  char c = 'c';
  char d = 'e';
  printf("Chars: %c %c %c %c", a, b, c, d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movb   $0x62,-0x6(%rbp)
movb   $0x63,-0x7(%rbp)
movb   $0x65,-0x8(%rbp)
mov    -0x5(%rbp),%dl
mov    -0x6(%rbp),%cl
mov    -0x7(%rbp),%al
lea    0xec1(%rip),%rdi
movsbl %dl,%esi
movsbl %cl,%edx
movsbl %al,%ecx
movsbl -0x8(%rbp),%r8d
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"Chars: %c %c %c %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i32 0, i32* %1
store i8 97, i8* %2
store i8 98, i8* %3
store i8 99, i8* %4
store i8 101, i8* %5
%6 = load i8, i8* %2
%7 = load i8, i8* %3
%8 = load i8, i8* %4
%9 = load i8, i8* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8 signext %6, i8 signext %7, i8 signext %8, i8 signext %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Chars: %c %c %c %c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8 signext 97, i8 signext 98, i8 signext 99, i8 signext 101)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ aes_encr(unsigned char *, unsigned char *);
int /*<<< orphan*/ expand_key(unsigned char *, unsigned char *);
void aes_encrypt(unsigned char *state, unsigned char *key) {
  unsigned char expanded_key[176];
  expand_key(expanded_key, key);
  aes_encr(state, expanded_key);
}


x86 assembly (clang, -O0):
<aes_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xc0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <expand_key@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
call   1030 <aes_encr@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_encrypt>:
push   %r14
push   %rbx
sub    $0xb8,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <expand_key@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <aes_encr@plt>
add    $0xb8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @aes_encrypt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [176 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [176 x i8], [176 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %4
%8 = call i32 @expand_key(i8* %6, i8* %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [176 x i8], [176 x i8]* %5, i64 0, i64 0
%11 = call i32 @aes_encr(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
define void @aes_encrypt(i8* %0, i8* %1) {
%3 = alloca [176 x i8]
%4 = getelementptr inbounds [176 x i8], [176 x i8]* %3, i64 0, i64 0
%5 = call i32 @expand_key(i8* %4, i8* %1)
%6 = call i32 @aes_encr(i8* %0, i8* %4)
ret void
}
int islower(int c) { return (c >= 'a') && (c <= 'z'); }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <islower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned int Hash_lookup(const char *key) {
  int c;
  unsigned int hash = 5381;
  while ((c = *key++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<Hash_lookup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1141 <Hash_lookup+0x41>
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
add    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    110f <Hash_lookup+0xf>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hash_lookup>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <Hash_lookup+0x38>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <Hash_lookup+0x20>
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i32 @Hash_lookup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 5381, i32* %4
br label %5
5: ; preds = %11, %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %2
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
store i32 %9, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %5
%12 = load i32, i32* %4
%13 = shl i32 %12, 5
%14 = load i32, i32* %4
%15 = add i32 %13, %14
%16 = load i32, i32* %3
%17 = add i32 %15, %16
store i32 %17, i32* %4
br label %5
18: ; preds = %5
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
define i32 @Hash_lookup(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %6, 33
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
void dv2o_mult(double *output, double *a, double *b) {
  output[0] = a[0] * b[0];
  output[1] = a[1] * b[1];
}


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

x86 assembly (clang, -O2):
<dv2o_mult>:
movsd  (%rsi),%xmm0
mulsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
mulsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @dv2o_mult(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fmul double %9, %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fmul double %18, %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
ret void
}

LLVM IR (-O2):
define void @dv2o_mult(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fmul double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fmul double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
ret void
}