xunge/DecIR huggingface dataset:
/* Variables and functions */
char *piece_quote_comma(char *, char *, int);
char *piece_quote_comma_delimited(char *destination, char *source, int offset) {
  return piece_quote_comma(destination, source, offset);
}


x86 assembly (clang, -O0):
<piece_quote_comma_delimited>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <piece_quote_comma@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piece_quote_comma_delimited>:
jmp    1030 <piece_quote_comma@plt>

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

LLVM IR (-O2):
define i8* @piece_quote_comma_delimited(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @piece_quote_comma(i8* %0, i8* %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ cdc_respond(char *, size_t);
void comm_send(char *buf, size_t len, bool flush) { cdc_respond(buf, len); }


x86 assembly (clang, -O0):
<comm_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cdc_respond@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comm_send>:
jmp    1030 <cdc_respond@plt>

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

LLVM IR (-O2):
define void @comm_send(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @cdc_respond(i8* %0, i64 %1)
ret void
}
void put_finish(void) {}


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

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

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

LLVM IR (-O2):
define void @put_finish() {
ret void
}
const char *foo(void) {
  return "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/Boshin/workspace/refs/heads/baseline/"
         "ARMToolChain/source/glibc-2.21/elf/filtmod1.c";
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [173 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Boshin/workspace/refs/heads/baseline/ARMToolChain/source/glibc-2.21/elf/filtmod1.c\00"
define i8* @foo() {
ret i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [173 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Boshin/workspace/refs/heads/baseline/ARMToolChain/source/glibc-2.21/elf/filtmod1.c\00"
define i8* @foo() {
ret i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int help() {
  printf("\nMy Shell : by Jack Riales\n\nUsage:\t./myShell [-h/--help] "
         "[-v/--verbose] [prog] [args]\n\n-h\tHelp\tDisplays this help "
         "message.\n-v\tVerbose\tPrints out more information.\n\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [165 x i8] c"\0AMy Shell : by Jack Riales\0A\0AUsage:\09./myShell [-h/--help] [-v/--verbose] [prog] [args]\0A\0A-h\09Help\09Displays this help message.\0A-v\09Verbose\09Prints out more information.\0A\0A\00"
define i32 @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [164 x i8] c"\0AMy Shell : by Jack Riales\0A\0AUsage:\09./myShell [-h/--help] [-v/--verbose] [prog] [args]\0A\0A-h\09Help\09Displays this help message.\0A-v\09Verbose\09Prints out more information.\0A\00"
define i32 @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([164 x i8], [164 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double luaL_check_number(int);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
int /*<<< orphan*/ pow(double, double);
void math_pow(void) {
  double d1 = luaL_check_number(1);
  double d2 = luaL_check_number(2);
  lua_pushnumber(pow(d1, d2));
}


x86 assembly (clang, -O0):
<math_pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x2,%edi
call   1030 <luaL_check_number@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <pow@plt>
mov    %eax,%edi
call   1040 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_pow>:
push   %rax
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
call   1030 <luaL_check_number@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
call   1050 <pow@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_pow() {
%1 = alloca double
%2 = alloca double
%3 = call double @luaL_check_number(i32 1)
store double %3, double* %1
%4 = call double @luaL_check_number(i32 2)
store double %4, double* %2
%5 = load double, double* %1
%6 = load double, double* %2
%7 = call i32 @pow(double %5, double %6)
%8 = call i32 @lua_pushnumber(i32 %7)
ret void
}

LLVM IR (-O2):
define void @math_pow() {
%1 = tail call double @luaL_check_number(i32 1)
%2 = tail call double @luaL_check_number(i32 2)
%3 = tail call i32 @pow(double %1, double %2)
%4 = tail call i32 @lua_pushnumber(i32 %3)
ret void
}
/* Type definitions */
struct utsname {
  int /*<<< orphan*/ release;
};

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ sscanf(int /*<<< orphan*/, char *, int *, int *);
int uname(struct utsname *);
void mem_init(void) {
  struct utsname un;
  int version, patchlevel;
  if (uname(&un) == -1)
    perror("uname()");
  sscanf(un.release, "%d.%d", &version, &patchlevel);
}


x86 assembly (clang, -O0):
<mem_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1030 <uname@plt>
cmp    $0xffffffff,%eax
jne    1156 <mem_init+0x26>
lea    0xeaf(%rip),%rdi
call   1050 <perror@plt>
mov    -0x8(%rbp),%edi
lea    0xea8(%rip),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <sscanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_init>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
call   1030 <uname@plt>
cmp    $0xffffffff,%eax
je     1162 <mem_init+0x32>
mov    0x8(%rsp),%edi
lea    0xeba(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <sscanf@plt>
add    $0x18,%rsp
ret
lea    0xe97(%rip),%rdi
call   1050 <perror@plt>
jmp    1143 <mem_init+0x13>

LLVM IR (-O0):
%struct.utsname = type { i32 }
@.str = [8 x i8] c"uname()\00"
@.str.1 = [6 x i8] c"%d.%d\00"
define void @mem_init() {
%1 = alloca %struct.utsname
%2 = alloca i32
%3 = alloca i32
%4 = call i32 @uname(%struct.utsname* %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @sscanf(i32 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
ret void
}

LLVM IR (-O2):
%struct.utsname = type { i32 }
@.str = [8 x i8] c"uname()\00"
@.str.1 = [6 x i8] c"%d.%d\00"
define void @mem_init() {
%1 = alloca %struct.utsname
%2 = alloca i32
%3 = alloca i32
%4 = bitcast %struct.utsname* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @uname(%struct.utsname* %1)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
%12 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 0
%13 = load i32, i32* %12
%14 = call i32 @sscanf(i32 %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int android_atomic_cas(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/ volatile *);
int /*<<< orphan*/ android_memory_barrier();
extern int android_atomic_release_cas(int32_t old_value, int32_t new_value,
                                      volatile int32_t *ptr) {
  android_memory_barrier();
  return android_atomic_cas(old_value, new_value, ptr);
}


x86 assembly (clang, -O0):
<android_atomic_release_cas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <android_memory_barrier@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1040 <android_atomic_cas@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<android_atomic_release_cas>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <android_memory_barrier@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <android_atomic_cas@plt>

LLVM IR (-O0):
define i32 @android_atomic_release_cas(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = call i32 (...) @android_memory_barrier()
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = call i32 @android_atomic_cas(i32 %8, i32 %9, i32* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @android_atomic_release_cas(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 (...) @android_memory_barrier()
%5 = tail call i32 @android_atomic_cas(i32 %0, i32 %1, i32* %2)
ret i32 %5
}
unsigned int rshash(char *p) {
  unsigned int b = 378551;
  unsigned int a = 63689;
  unsigned int retval = 0;
  for (; *p; p++) {
    retval = retval * a + (*p);
    a *= b;
  }
  return retval;
}


x86 assembly (clang, -O0):
<rshash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x5c6b7,-0xc(%rbp)
movl   $0xf8c9,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1158 <rshash+0x58>
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111d <rshash+0x1d>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rshash>:
mov    (%rdi),%cl
test   %cl,%cl
je     113a <rshash+0x3a>
add    $0x1,%rdi
mov    $0xf8c9,%edx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
imul   %edx,%eax
movsbl %cl,%ecx
add    %ecx,%eax
imul   $0x5c6b7,%edx,%edx
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <rshash+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @rshash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %14, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i32 [ %12, %4 ], [ 63689, %1 ]
%8 = phi i8* [ %13, %4 ], [ %0, %1 ]
%9 = mul i32 %6, %7
%10 = sext i8 %5 to i32
%11 = add i32 %9, %10
%12 = mul i32 %7, 378551
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ SetIntPreference(char const *, int);
void SetBoolPreference(const char *name, int value) {
  SetIntPreference(name, value);
}


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

x86 assembly (clang, -O2):
<SetBoolPreference>:
jmp    1030 <SetIntPreference@plt>

LLVM IR (-O0):
define void @SetBoolPreference(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 @SetIntPreference(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @SetBoolPreference(i8* %0, i32 %1) {
%3 = tail call i32 @SetIntPreference(i8* %0, i32 %1)
ret void
}
void FLOODFILL_destroy(struct los *los) {}


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

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

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

LLVM IR (-O2):
%struct.los = type opaque
define void @FLOODFILL_destroy(%struct.los* nocapture %0) {
ret void
}
unsigned long get_pac_max() { return 2 * 1024; }


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

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

LLVM IR (-O0):
define i64 @get_pac_max() {
ret i64 2048
}

LLVM IR (-O2):
define i64 @get_pac_max() {
ret i64 2048
}
void addchar1(char *a, char *sum, char *dig_sum) {
  *sum = (*a - '0') + (*dig_sum);
  *dig_sum = *sum / 10;
  *sum = (*sum % 10) + '0';
}


x86 assembly (clang, -O0):
<addchar1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<addchar1>:
mov    (%rdi),%al
add    (%rdx),%al
add    $0xd0,%al
mov    %al,(%rsi)
movsbl %al,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%ecx
shr    $0xa,%eax
shr    $0xf,%ecx
add    %al,%cl
mov    %cl,(%rdx)
movsbl (%rsi),%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0xa,%ecx
shr    $0xf,%edx
add    %cl,%dl
movzbl %dl,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
add    $0x30,%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @addchar1(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
%11 = load i8*, i8** %6
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = add nsw i32 %10, %13
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %5
store i8 %15, i8* %16
%17 = load i8*, i8** %5
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = sdiv i32 %19, 10
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %6
store i8 %21, i8* %22
%23 = load i8*, i8** %5
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = srem i32 %25, 10
%27 = add nsw i32 %26, 48
%28 = trunc i32 %27 to i8
%29 = load i8*, i8** %5
store i8 %28, i8* %29
ret void
}

LLVM IR (-O2):
define void @addchar1(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
%4 = load i8, i8* %0
%5 = add i8 %4, -48
%6 = load i8, i8* %2
%7 = add i8 %5, %6
store i8 %7, i8* %1
%8 = sdiv i8 %7, 10
store i8 %8, i8* %2
%9 = load i8, i8* %1
%10 = srem i8 %9, 10
%11 = add nsw i8 %10, 48
store i8 %11, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void message_commit_done(void) { printf("--> Commit realizado con exito.\n"); }


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"--> Commit realizado con exito.\00"
define void @message_commit_done() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void lfs_free(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @lfs_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_WAITING(int /*<<< orphan*/);
int gen_WAITING() {
  handle_WAITING(0);
  return 0;
}


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

x86 assembly (clang, -O2):
<gen_WAITING>:
push   %rax
xor    %edi,%edi
call   1030 <handle_WAITING@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gen_WAITING() {
%1 = call i32 @handle_WAITING(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_WAITING() {
%1 = tail call i32 @handle_WAITING(i32 0)
ret i32 0
}
void g_type_fundamental() {}


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

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

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

LLVM IR (-O2):
define void @g_type_fundamental() {
ret void
}
/* Variables and functions */
scalar_t__ isIP();
double GetDryAirEnthalpy(double TDryBulb) {
  if (isIP())
    return 0.240 * TDryBulb;
  else
    return 1006 * TDryBulb;
}


x86 assembly (clang, -O0):
<GetDryAirEnthalpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <isIP@plt>
cmp    $0x0,%rax
je     1145 <GetDryAirEnthalpy+0x35>
movsd  0xed2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1157 <GetDryAirEnthalpy+0x47>
movsd  0xeb3(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetDryAirEnthalpy>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <isIP@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
lea    0xed4(%rip),%rax
movsd  (%rsp),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @GetDryAirEnthalpy(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = call i64 (...) @isIP()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fmul double 2.400000e-01, %7
store double %8, double* %2
br label %12
9: ; preds = %1
%10 = load double, double* %3
%11 = fmul double 1.006000e+03, %10
store double %11, double* %2
br label %12
12: ; preds = %9, %6
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @GetDryAirEnthalpy(double %0) {
%2 = tail call i64 (...) @isIP()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, double 1.006000e+03, double 2.400000e-01
%5 = fmul double %4, %0
ret double %5
}
int reg_mode(eaddr)
struct t_operand *eaddr;
{
  int mr;
  mr = mode_reg(eaddr);
  return (((mr & 0x7) << 3) | ((mr & 0x38) >> 3));
}


x86 assembly (clang, -O0):
<reg_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <mode_reg@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7,%eax
shl    $0x3,%eax
mov    -0xc(%rbp),%ecx
and    $0x38,%ecx
sar    $0x3,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_mode>:
push   %rax
xor    %eax,%eax
call   1030 <mode_reg@plt>
mov    %eax,%ecx
and    $0x7,%ecx
shr    $0x3,%eax
and    $0x7,%eax
lea    (%rax,%rcx,8),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.t_operand = type opaque
define i32 @reg_mode(%struct.t_operand* %0) {
%2 = alloca %struct.t_operand*
%3 = alloca i32
store %struct.t_operand* %0, %struct.t_operand** %2
%4 = load %struct.t_operand*, %struct.t_operand** %2
%5 = call i32 (%struct.t_operand*, ...) bitcast (i32 (...)* @mode_reg to i32 (%struct.t_operand*, ...)*)(%struct.t_operand* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, 7
%8 = shl i32 %7, 3
%9 = load i32, i32* %3
%10 = and i32 %9, 56
%11 = ashr i32 %10, 3
%12 = or i32 %8, %11
ret i32 %12
}

LLVM IR (-O2):
%struct.t_operand = type opaque
define i32 @reg_mode(%struct.t_operand* %0) {
%2 = tail call i32 (%struct.t_operand*, ...) bitcast (i32 (...)* @mode_reg to i32 (%struct.t_operand*, ...)*)(%struct.t_operand* %0)
%3 = shl i32 %2, 3
%4 = and i32 %3, 56
%5 = lshr i32 %2, 3
%6 = and i32 %5, 7
%7 = or i32 %4, %6
ret i32 %7
}
adrx0adrx1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (((int *)10000000)[x0]) = (((int *)11111111)[x1]); }


x86 assembly (clang, -O0):
<adrx0adrx1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movslq -0x14(%rbp),%rcx
mov    $0xa98ac7,%eax
mov    (%rax,%rcx,4),%edx
movslq -0x10(%rbp),%rcx
mov    $0x989680,%eax
mov    %edx,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0adrx1_set>:
movslq %ecx,%rax
mov    0xa98ac7(,%rax,4),%eax
movslq %edx,%rcx
mov    %eax,0x989680(,%rcx,4)
ret

LLVM IR (-O0):
define i32 @adrx0adrx1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* %11
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %15
%17 = load i32, i32* %16
%18 = load i32, i32* %10
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %19
store i32 %17, i32* %20
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @adrx0adrx1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %10
store i32 %9, i32* %11
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void yyerror(char const *p_msg) { printf("Syntax error: %s\n", p_msg); }


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"Syntax error: %s\0A\00"
define void @yyerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
char *strchr(const char *s, int c) {
  char *p;
  for (p = (char *)s; *p; p++) {
    if (*p == c)
      return p;
  }
  return 0;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1153 <strchr+0x53>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    113d <strchr+0x3d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <strchr+0x5b>
jmp    1142 <strchr+0x42>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1113 <strchr+0x13>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1123 <strchr+0x23>
mov    %rdi,%rax
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %esi,%ecx
je     1125 <strchr+0x25>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %12, %10 ], [ %3, %2 ]
%7 = phi i8* [ %11, %10 ], [ %0, %2 ]
%8 = sext i8 %6 to i32
%9 = icmp eq i32 %8, %1
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %2
%15 = phi i8* [ null, %2 ], [ null, %10 ], [ %7, %5 ]
ret i8* %15
}
int main(void) {
  ((void (*)(unsigned long ulConfig))(
      (unsigned long *)(((unsigned long *)0x01000010)[13]))[23])(
      0x04C00000 | 0x00000000 | 0x00000000 | 0x00000540);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1000010,%eax
mov    0x68(%rax),%rax
mov    $0x4c00540,%edi
call   *0xb8(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x1000078,%rax
01
mov    $0x4c00540,%edi
call   *0xb8(%rax)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 16777232 to i64*), i64 13)
%3 = inttoptr i64 %2 to i64*
%4 = getelementptr inbounds i64, i64* %3, i64 23
%5 = load i64, i64* %4
%6 = inttoptr i64 %5 to void (i64)*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = load i64, i64* inttoptr (i64 16777336 to i64*)
%2 = inttoptr i64 %1 to i64*
%3 = getelementptr inbounds i64, i64* %2, i64 23
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to void (i64)*
tail call void %5(i64 79693120)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
void idle() { glutPostRedisplay(); }


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

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

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

LLVM IR (-O2):
define void @idle() {
%1 = tail call i32 (...) @glutPostRedisplay()
ret void
}
int abs(int value) { return (value >= 0 ? value : -value); }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111c <abs+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct entry_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_unique(struct genlist *);
void entry_list_unique(struct entry_list *tthis) {
  genlist_unique((struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<entry_list_unique>:
jmp    1030 <genlist_unique@plt>

LLVM IR (-O0):
%struct.entry_list = type { i32 }
%struct.genlist = type { i32 }
define void @entry_list_unique(%struct.entry_list* %0) {
%2 = alloca %struct.entry_list*
store %struct.entry_list* %0, %struct.entry_list** %2
%3 = load %struct.entry_list*, %struct.entry_list** %2
%4 = bitcast %struct.entry_list* %3 to %struct.genlist*
%5 = call i32 @genlist_unique(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.entry_list = type { i32 }
%struct.genlist = type { i32 }
define void @entry_list_unique(%struct.entry_list* %0) {
%2 = bitcast %struct.entry_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_unique(%struct.genlist* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg_user_quit() { printf("We surrender!\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"We surrender!\00"
define void @msg_user_quit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
__attribute__((no, noclone)) signed __int128 t152_3add(unsigned __int128 y) {
  signed __int128 r;
  if (__builtin_add_overflow((unsigned __int128)(0), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t152_3add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
test   %rax,%rax
setne  %al
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    115a <t152_3add+0x4a>
jmp    1161 <t152_3add+0x51>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t152_3add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rax
sar    $0x3f,%rax
je     112a <t152_3add+0x1a>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t152_3add(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = zext i128 %11 to i129
%13 = call { i129, i1 } @llvm.sadd.with.overflow.i129(i129 0, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = sext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t152_3add(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = sext i128 %6 to i129
%9 = icmp eq i129 %7, %8
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = insertvalue { i64, i64 } poison, i64 %0, 0
%14 = insertvalue { i64, i64 } %13, i64 %1, 1
ret { i64, i64 } %14
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ msg(int, char *, size_t);
void *xmalloc(size_t size) {
  void *result = malloc(size);
  if (!result) {
    msg(-4, "Failed to malloc %zu bytes\n", size);
    exit(EXIT_FAILURE);
  }
  return result;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <xmalloc+0x47>
mov    -0x8(%rbp),%rdx
mov    $0xfffffffc,%edi
lea    0xe9c(%rip),%rsi
call   1050 <msg@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1030 <malloc@plt>
test   %rax,%rax
je     1140 <xmalloc+0x10>
pop    %rbx
ret
lea    0xeb9(%rip),%rsi
mov    $0xfffffffc,%edi
mov    %rbx,%rdx
call   1050 <msg@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Failed to malloc %zu bytes\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i64, i64* %2
%10 = call i32 @msg(i32 -4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [28 x i8] c"Failed to malloc %zu bytes\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @msg(i32 -4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %0)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
void avlTree() {}


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

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

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

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

/* Variables and functions */
float wcstox(int /*<<< orphan*/ const *, int /*<<< orphan*/ **,
             int /*<<< orphan*/);
float wcstof(const wchar_t *restrict s, wchar_t **restrict p) {
  return wcstox(s, p, 0);
}


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

x86 assembly (clang, -O2):
<wcstof>:
xor    %edx,%edx
jmp    1030 <wcstox@plt>

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

LLVM IR (-O2):
define float @wcstof(i32* noalias %0, i32** noalias %1) {
%3 = tail call float @wcstox(i32* %0, i32** %1, i32 0)
ret float %3
}
void usage(char *name) {}


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

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

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

LLVM IR (-O2):
define void @usage(i8* nocapture %0) {
ret void
}
void refresh_TLB(void *address) {
  __asm__ __volatile__("invlpg		(%0)\n" ::"a"(address));
  return;
}


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

x86 assembly (clang, -O2):
<refresh_TLB>:
mov    %rdi,%rax
invlpg (%rax)
ret

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

LLVM IR (-O2):
define void @refresh_TLB(i8* %0) {
tail call void asm sideeffect "invlpg\09\09($0)\0A", "{ax},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
void glShaderSource(unsigned int shader, int count, const char **string,
                    const int *length) {}


x86 assembly (clang, -O0):
<glShaderSource>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @glShaderSource(i32 %0, i32 %1, i8** %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i32* %3, i32** %8
ret void
}

LLVM IR (-O2):
define void @glShaderSource(i32 %0, i32 %1, i8** nocapture %2, i32* nocapture %3) {
ret void
}
void i2c_write_reg(int regnum, int data) {
  (*(volatile unsigned char *)((0x900000007F00B000ULL) + regnum) = data);
}


x86 assembly (clang, -O0):
<i2c_write_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,%cl
movslq -0x4(%rbp),%rax
movabs $0x900000007f00b000,%rdx
add    %rdx,%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_write_reg>:
movslq %edi,%rax
movabs $0x900000007f00b000,%rcx
mov    %sil,(%rax,%rcx,1)
ret

LLVM IR (-O0):
define void @i2c_write_reg(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = trunc i32 %5 to i8
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = add i64 -8070450530117177344, %8
%10 = inttoptr i64 %9 to i8*
store volatile i8 %6, i8* %10
ret void
}

LLVM IR (-O2):
define void @i2c_write_reg(i32 %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = sext i32 %0 to i64
%5 = add nsw i64 %4, -8070450530117177344
%6 = inttoptr i64 %5 to i8*
store volatile i8 %3, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ foo(int);
int main() {
  if (foo(0x3fffffff) == 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3fffffff,%edi
call   1040 <foo@plt>
cmp    $0x0,%rax
jne    114a <main+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3fffffff,%edi
call   1040 <foo@plt>
test   %rax,%rax
je     1134 <main+0x14>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @foo(i32 1073741823)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @foo(i32 1073741823)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
int config_MODULE_NEWCAMD(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_MODULE_NEWCAMD() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __pid_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int kill(int /*<<< orphan*/, int);
int killpg(__pid_t pgrp, int sig) {
  if (pgrp < 0) {
    __set_errno(EINVAL);
    return -1;
  }
  return kill(-pgrp, sig);
}


x86 assembly (clang, -O0):
<killpg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1152 <killpg+0x32>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <killpg+0x42>
xor    %edi,%edi
sub    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <kill@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<killpg>:
test   %edi,%edi
js     112b <killpg+0xb>
neg    %edi
jmp    1040 <kill@plt>
push   %rax
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @killpg(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* @EINVAL
%10 = call i32 @__set_errno(i32 %9)
store i32 -1, i32* %3
br label %16
11: ; preds = %2
%12 = load i32, i32* %4
%13 = sub nsw i32 0, %12
%14 = load i32, i32* %5
%15 = call i32 @kill(i32 %13, i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %11, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @killpg(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @EINVAL
%6 = tail call i32 @__set_errno(i32 %5)
br label %10
7: ; preds = %2
%8 = sub nsw i32 0, %0
%9 = tail call i32 @kill(i32 %8, i32 %1)
br label %10
10: ; preds = %7, %4
%11 = phi i32 [ -1, %4 ], [ %9, %7 ]
ret i32 %11
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t rol64(uint64_t x, int r) { return (x << r) | (x >> (64 - r)); }


x86 assembly (clang, -O0):
<rol64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x40,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol64>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rol64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 64, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rol64(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 64, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ gdb_send_packet(char *, int /*<<< orphan*/);
void gdb_response_not_supported() { gdb_send_packet("", 0); }


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

x86 assembly (clang, -O2):
<gdb_response_not_supported>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <gdb_send_packet@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @gdb_response_not_supported() {
%1 = call i32 @gdb_send_packet(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @gdb_response_not_supported() {
%1 = tail call i32 @gdb_send_packet(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free_manager();
void dwc_free_notification_manager(void) { free_manager(); }


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

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

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

LLVM IR (-O2):
define void @dwc_free_notification_manager() {
%1 = tail call i32 (...) @free_manager()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_loop_write() {
  printf("NOT IMPLEMENTED:"
         "pa_loop_write"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [30 x i8] c"NOT IMPLEMENTED:pa_loop_write\00"
define i32 @pa_loop_write() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 undef
}