xunge/DecIR huggingface dataset:
/* Variables and functions */
char *calculate_size(char *, int /*<<< orphan*/);
char *parse_stat(char *, int);
char *get_virtual_memory(char *pid) {
  char *vm = parse_stat(pid, 23);
  if (vm == NULL)
    return NULL;
  char *vm_conv = calculate_size(vm, 0);
  return vm_conv;
}


x86 assembly (clang, -O0):
<get_virtual_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x17,%esi
call   1040 <parse_stat@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1156 <get_virtual_memory+0x36>
movq   $0x0,-0x8(%rbp)
jmp    116d <get_virtual_memory+0x4d>
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1030 <calculate_size@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_virtual_memory>:
push   %rax
mov    $0x17,%esi
call   1040 <parse_stat@plt>
test   %rax,%rax
je     113b <get_virtual_memory+0x1b>
mov    %rax,%rdi
xor    %esi,%esi
pop    %rax
jmp    1030 <calculate_size@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @get_virtual_memory(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* @parse_stat(i8* %6, i32 23)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i8* null, i8** %2
br label %15
11: ; preds = %1
%12 = load i8*, i8** %4
%13 = call i8* @calculate_size(i8* %12, i32 0)
store i8* %13, i8** %5
%14 = load i8*, i8** %5
store i8* %14, i8** %2
br label %15
15: ; preds = %11, %10
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
define i8* @get_virtual_memory(i8* %0) {
%2 = tail call i8* @parse_stat(i8* %0, i32 23)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @calculate_size(i8* %2, i32 0)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
void *_hi_zalloc(size_t, char const *, int);
void *_hi_calloc(size_t nmemb, size_t size, const char *name, int line) {
  return _hi_zalloc(nmemb * size, name, line);
}


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

x86 assembly (clang, -O2):
<_hi_calloc>:
imul   %rsi,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <_hi_zalloc@plt>

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

LLVM IR (-O2):
define i8* @_hi_calloc(i64 %0, i64 %1, i8* %2, i32 %3) {
%5 = mul i64 %1, %0
%6 = tail call i8* @_hi_zalloc(i64 %5, i8* %2, i32 %3)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void imprimir(void) { printf("BIENVENIDO A MI PROGRAMA\n"); }


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

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

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

LLVM IR (-O2):
@str = [25 x i8] c"BIENVENIDO A MI PROGRAMA\00"
define void @imprimir() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rand();
int getRollResult() { return 1 + rand() % 6; }


x86 assembly (clang, -O0):
<getRollResult>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRollResult>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getRollResult() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 6
%3 = add nsw i32 1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @getRollResult() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 6
%3 = add nsw i32 %2, 1
ret i32 %3
}
int device_reboot_now(volatile char *key_pressed, int key_code) { return 0; }


x86 assembly (clang, -O0):
<device_reboot_now>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @device_reboot_now(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
const char *_Locale_ctype_default(char *__DUMMY_PAR) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @_Locale_ctype_default(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ XOpenDisplay(int /*<<< orphan*/ *);
main() { XOpenDisplay(NULL); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @XOpenDisplay(i32* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @XOpenDisplay(i32* null)
ret i32 0
}
int PDL_GetPDKVersion(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @PDL_GetPDKVersion() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sawada(void) { printf("sawada!\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"sawada!\00"
define void @sawada() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
short FastIntShortDiv(int x, short y) { return x / y; }


x86 assembly (clang, -O0):
<FastIntShortDiv>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
movswl -0x6(%rbp),%ecx
cltd
idiv   %ecx
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<FastIntShortDiv>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define signext i16 @FastIntShortDiv(i32 %0, i16 signext %1) {
%3 = alloca i32
%4 = alloca i16
store i32 %0, i32* %3
store i16 %1, i16* %4
%5 = load i32, i32* %3
%6 = load i16, i16* %4
%7 = sext i16 %6 to i32
%8 = sdiv i32 %5, %7
%9 = trunc i32 %8 to i16
ret i16 %9
}

LLVM IR (-O2):
define signext i16 @FastIntShortDiv(i32 %0, i16 signext %1) {
%3 = sext i16 %1 to i32
%4 = sdiv i32 %0, %3
%5 = trunc i32 %4 to i16
ret i16 %5
}
void writeout_quota_sb(struct super_block *sb, int type) {}


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

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

LLVM IR (-O0):
%struct.super_block = type opaque
define void @writeout_quota_sb(%struct.super_block* %0, i32 %1) {
%3 = alloca %struct.super_block*
%4 = alloca i32
store %struct.super_block* %0, %struct.super_block** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.super_block = type opaque
define void @writeout_quota_sb(%struct.super_block* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\"Blunder?\?!??\"");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"\22Blunder??!??\22\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void genblezl_out() {}


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

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

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

LLVM IR (-O2):
define void @genblezl_out() {
ret void
}
void b_set(void *x, int n, char c) {
  char *b = x;
  while (n--) {
    *b++ = c;
  }
}


x86 assembly (clang, -O0):
<b_set>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1145 <b_set+0x45>
mov    -0xd(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1118 <b_set+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_set>:
test   %esi,%esi
je     1126 <b_set+0x16>
push   %rax
mov    %esi,%eax
movzbl %dl,%esi
mov    %rax,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @b_set(i8* nocapture writeonly %0, i32 %1, i8 signext %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
long long gcd(long long, long long);
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <gcd@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cqto
idiv   %rcx
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %rbx
mov    %rsi,%rbx
imul   %rdi,%rbx
call   1030 <gcd@plt>
mov    %rax,%rcx
or     %rbx,%rax
shr    $0x20,%rax
je     1133 <lcm+0x23>
mov    %rbx,%rax
cqto
idiv   %rcx
pop    %rbx
ret
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i64 @lcm(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul nsw i64 %5, %6
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = call i64 @gcd(i64 %8, i64 %9)
%11 = sdiv i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @lcm(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
%4 = tail call i64 @gcd(i64 %0, i64 %1)
%5 = sdiv i64 %3, %4
ret i64 %5
}
/* Variables and functions */
int O_CLOEXEC;
int O_CREAT;
int O_EXCL;
int O_RDWR;
int open(char const *, int, int);
int create_file_excl(const char *fname) {
  return open(fname, O_RDWR | O_CLOEXEC | O_CREAT | O_EXCL, 00666);
}


x86 assembly (clang, -O0):
<create_file_excl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    0x2e90(%rip),%rax
or     (%rax),%esi
mov    0x2ebf(%rip),%rax
or     (%rax),%esi
mov    0x2e8e(%rip),%rax
or     (%rax),%esi
mov    $0x1b6,%edx
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_file_excl>:
mov    0x2ec9(%rip),%rax
mov    0x2ea2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ecf(%rip),%rax
or     (%rax),%esi
mov    0x2e9e(%rip),%rax
or     (%rax),%esi
mov    $0x1b6,%edx
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_CLOEXEC = global i32 0
@O_CREAT = global i32 0
@O_EXCL = global i32 0
define i32 @create_file_excl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDWR
%5 = load i32, i32* @O_CLOEXEC
%6 = or i32 %4, %5
%7 = load i32, i32* @O_CREAT
%8 = or i32 %6, %7
%9 = load i32, i32* @O_EXCL
%10 = or i32 %8, %9
%11 = call i32 @open(i8* %3, i32 %10, i32 438)
ret i32 %11
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_CLOEXEC = global i32 0
@O_CREAT = global i32 0
@O_EXCL = global i32 0
define i32 @create_file_excl(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = load i32, i32* @O_CLOEXEC
%4 = or i32 %3, %2
%5 = load i32, i32* @O_CREAT
%6 = or i32 %4, %5
%7 = load i32, i32* @O_EXCL
%8 = or i32 %6, %7
%9 = tail call i32 @open(i8* %0, i32 %8, i32 438)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: tapetest [-d debug_level] [device_name]\n"
                  "       -dnn        set debug level to nn\n"
                  "       -?          print this message.\n"
                  "\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [129 x i8] c"Usage: tapetest [-d debug_level] [device_name]\0A -dnn set debug level to nn\0A -? print this message.\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [129 x i8] c"Usage: tapetest [-d debug_level] [device_name]\0A -dnn set debug level to nn\0A -? print this message.\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn();
scalar_t__ getpid();
int /*<<< orphan*/ heavy_fn();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("PID: %d\n", (int)getpid());
  for (;;) {
    heavy_fn();
    fn();
    printf("One more cycle\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <heavy_fn@plt>
mov    $0x0,%al
call   1030 <fn@plt>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1166 <main+0x26>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <getpid@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe9a(%rip),%rbx
nop
xor    %eax,%eax
call   1070 <heavy_fn@plt>
xor    %eax,%eax
call   1040 <fn@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1170 <main+0x20>

LLVM IR (-O0):
@.str = [9 x i8] c"PID: %d\0A\00"
@.str.1 = [16 x i8] c"One more cycle\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @getpid()
%3 = trunc i64 %2 to i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %5
5: ; preds = %5, %0
%6 = call i32 (...) @heavy_fn()
%7 = call i32 (...) @fn()
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %5
}

LLVM IR (-O2):
@.str = [9 x i8] c"PID: %d\0A\00"
@str = [15 x i8] c"One more cycle\00"
define i32 @main() {
%1 = tail call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %4
4: ; preds = %4, %0
%5 = tail call i32 (...) @heavy_fn()
%6 = tail call i32 (...) @fn()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
br label %4
}
do_tau_setup_tabchan(argc, argv) int argc;
char **argv;
{}


x86 assembly (clang, -O0):
<do_tau_setup_tabchan>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @do_tau_setup_tabchan(i32 %0, i8** nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ test_array_sort();
int /*<<< orphan*/ test_memory_recursive(int);
void test_memory(void) {
  test_memory_recursive(4);
  test_array_sort();
}


x86 assembly (clang, -O0):
<test_memory>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1030 <test_memory_recursive@plt>
mov    $0x0,%al
call   1040 <test_array_sort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_memory>:
push   %rax
mov    $0x4,%edi
call   1030 <test_memory_recursive@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_array_sort@plt>

LLVM IR (-O0):
define void @test_memory() {
%1 = call i32 @test_memory_recursive(i32 4)
%2 = call i32 (...) @test_array_sort()
ret void
}

LLVM IR (-O2):
define void @test_memory() {
%1 = tail call i32 @test_memory_recursive(i32 4)
%2 = tail call i32 (...) @test_array_sort()
ret void
}
/* Variables and functions */
int simple_print(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ simple_strlen(char const *);
int main() {
  const char *message = "Hello without stdlib.\n";
  return simple_print(message, simple_strlen(message));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <simple_strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <simple_print@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <simple_strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <simple_print@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Hello without stdlib.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @simple_strlen(i8* %4)
%6 = call i32 @simple_print(i8* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [23 x i8] c"Hello without stdlib.\0A\00"
define i32 @main() {
%1 = tail call i32 @simple_strlen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @simple_print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ clrscr();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ permute(char *, int /*<<< orphan*/, scalar_t__);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
scalar_t__ strlen(char *);
int main() {
  char str[100];
  clrscr();
  printf("Enter the string : ");
  scanf("%s", str);
  permute(str, 0, strlen(str) - 1);
  getch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clrscr@plt>
lea    0xe80(%rip),%rdi
call   1060 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1070 <scanf@plt>
lea    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x70(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x78(%rbp),%rdi
mov    %rax,%rdx
sub    $0x1,%rdx
xor    %esi,%esi
call   1040 <permute@plt>
mov    $0x0,%al
call   1080 <getch@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
xor    %eax,%eax
call   1030 <clrscr@plt>
lea    0xe8d(%rip),%rdi
call   1060 <printf@plt>
lea    0xe95(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    -0x1(%rax),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <permute@plt>
xor    %eax,%eax
call   1080 <getch@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter the string : \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = call i32 (...) @clrscr()
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i64 @strlen(i8* %8)
%10 = sub nsw i64 %9, 1
%11 = call i32 @permute(i8* %7, i32 0, i64 %10)
%12 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter the string : \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @clrscr()
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = call i64 @strlen(i8* %2)
%7 = add nsw i64 %6, -1
%8 = call i32 @permute(i8* %2, i32 0, i64 %7)
%9 = call i32 (...) @getch()
ret i32 0
}
int compare(void *arg1, void *arg2) {
  int val1 = *(int *)arg1;
  int val2 = *(int *)arg2;
  if (val1 == val2)
    return 0;
  if (val1 < val2)
    return -1;
  else
    return 1;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    1136 <compare+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1155 <compare+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <compare+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <compare+0x55>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setge  %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

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

/* Variables and functions */
int nt_read(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int nt_skip(Elf64_Nhdr *note) { return nt_read(note, NULL); }


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

x86 assembly (clang, -O2):
<nt_skip>:
xor    %esi,%esi
jmp    1030 <nt_read@plt>

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

LLVM IR (-O2):
define i32 @nt_skip(i32* %0) {
%2 = tail call i32 @nt_read(i32* %0, i32* null)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_mutex_new() {
  printf("NOT IMPLEMENTED:"
         "pa_mutex_new"
         "\n");
}


x86 assembly (clang, -O0):
<pa_mutex_new>:
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_mutex_new>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

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


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

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

LLVM IR (-O0):
define i32 @fun704() {
ret i32 704
}

LLVM IR (-O2):
define i32 @fun704() {
ret i32 704
}
/* Variables and functions */
unsigned int isdigit(char const);
unsigned int estCaracterePorteNiveau(const char caractere) {
  return isdigit(caractere);
}


x86 assembly (clang, -O0):
<estCaracterePorteNiveau>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estCaracterePorteNiveau>:
jmp    1030 <isdigit@plt>

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

LLVM IR (-O2):
define i32 @estCaracterePorteNiveau(i8 signext %0) {
%2 = tail call i32 @isdigit(i8 signext %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ const *);
struct tm *localtime(const time_t *timep) {
  return gmtime(timep);
}


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

x86 assembly (clang, -O2):
<localtime>:
jmp    1030 <gmtime@plt>

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @localtime(i32* %0) {
%2 = tail call %struct.tm* @gmtime(i32* %0)
ret %struct.tm* %2
}
/* Variables and functions */
scalar_t__ mmalloc(int);
void test_leak() {
  char *leak = (char *)mmalloc(100);
  leak[0] = 0;
}


x86 assembly (clang, -O0):
<test_leak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x64,%edi
call   1030 <mmalloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_leak>:
push   %rax
mov    $0x64,%edi
call   1030 <mmalloc@plt>
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @test_leak() {
%1 = alloca i8*
%2 = call i64 @mmalloc(i32 100)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %5
ret void
}

LLVM IR (-O2):
define void @test_leak() {
%1 = tail call i64 @mmalloc(i32 100)
%2 = inttoptr i64 %1 to i8*
store i8 0, i8* %2
ret void
}
void plotpoint(x, y) double x, y;
{
  int ix, iy;
  ix = (int)(29.0 * x) + 5;
  iy = (int)(340.0 - (29.0 * y));
  DrawPoint(ix, iy);
}


x86 assembly (clang, -O0):
<plotpoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xee6(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
add    $0x5,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeba(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0x0,%al
call   1030 <DrawPoint@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plotpoint>:
mulsd  0xee8(%rip),%xmm0
cvttsd2si %xmm0,%edi
mulsd  0xee4(%rip),%xmm1
addsd  0xee4(%rip),%xmm1
add    $0x5,%edi
cvttsd2si %xmm1,%esi
xor    %eax,%eax
jmp    1030 <DrawPoint@plt>

LLVM IR (-O0):
define void @plotpoint(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = fmul double 2.900000e+01, %7
%9 = fptosi double %8 to i32
%10 = add nsw i32 %9, 5
store i32 %10, i32* %5
%11 = load double, double* %4
%12 = call double @llvm.fmuladd.f64(double -2.900000e+01, double %11, double 3.400000e+02)
%13 = fptosi double %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 (i32, i32, ...) bitcast (i32 (...)* @DrawPoint to i32 (i32, i32, ...)*)(i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @plotpoint(double %0, double %1) {
%3 = fmul double %0, 2.900000e+01
%4 = fptosi double %3 to i32
%5 = add nsw i32 %4, 5
%6 = tail call double @llvm.fmuladd.f64(double %1, double -2.900000e+01, double 3.400000e+02)
%7 = fptosi double %6 to i32
%8 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @DrawPoint to i32 (i32, i32, ...)*)(i32 %5, i32 %7)
ret void
}
unsigned int _uiBackupScreen(void) { return (1); }


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

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

LLVM IR (-O0):
define i32 @_uiBackupScreen() {
ret i32 1
}

LLVM IR (-O2):
define i32 @_uiBackupScreen() {
ret i32 1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
char base64_encode_value(uint8_t value) {
  static const char *encoding =
      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  if (value > 63)
    return '=';
  return encoding[value];
}


x86 assembly (clang, -O0):
<base64_encode_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x3f,-0x8(%rbp)
jle    111a <base64_encode_value+0x1a>
movb   $0x3d,-0x1(%rbp)
jmp    112b <base64_encode_value+0x2b>
mov    0x2eff(%rip),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_encode_value>:
mov    $0x3d,%al
cmp    $0x3f,%edi
jg     1114 <base64_encode_value+0x14>
movslq %edi,%rax
lea    0xeef(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
@base64_encode_value.encoding = internal global i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i32 0, i32 0)
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define signext i8 @base64_encode_value(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 63
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 61, i8* %2
br label %13
7: ; preds = %1
%8 = load i8*, i8** @base64_encode_value.encoding
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
store i8 %12, i8* %2
br label %13
13: ; preds = %7, %6
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define signext i8 @base64_encode_value(i32 %0) {
%2 = icmp sgt i32 %0, 63
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %4
%6 = load i8, i8* %5
br label %7
7: ; preds = %1, %3
%8 = phi i8 [ %6, %3 ], [ 61, %1 ]
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ bit_hl(int /*<<< orphan*/);
void opcb_46() { bit_hl(0); }


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

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

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

LLVM IR (-O2):
define void @opcb_46() {
%1 = tail call i32 @bit_hl(i32 0)
ret void
}
int my_str_isprintable(char *str) {
  int i;
  i = 0;
  while (str[i]) {
    if (str[i] < 32 || str[i] == 127)
      return (0);
    ++i;
  }
  return (1);
}


x86 assembly (clang, -O0):
<my_str_isprintable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1165 <my_str_isprintable+0x65>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jl     114b <my_str_isprintable+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7f,%eax
jne    1157 <my_str_isprintable+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116c <my_str_isprintable+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <my_str_isprintable+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_str_isprintable>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <my_str_isprintable+0x23>
add    $0x1,%rdi
nop
add    $0x81,%cl
cmp    $0xa0,%cl
jbe    1124 <my_str_isprintable+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <my_str_isprintable+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_str_isprintable(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -127
%12 = icmp ult i8 %11, -95
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int y;
};
struct TYPE_4__ {
  TYPE_1__ min_aspect;
};
typedef TYPE_2__ XSizeHints;

/* Variables and functions */
void set_XSizeHints_min_aspect_y(void *_p, int _v) {
  ((XSizeHints *)_p)->min_aspect.y = (int)_v;
}


x86 assembly (clang, -O0):
<set_XSizeHints_min_aspect_y>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XSizeHints_min_aspect_y>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XSizeHints_min_aspect_y(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XSizeHints_min_aspect_y(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void set_snan(double *f) { *((long long *)f) = 0x7ff0000000000001LL; }


x86 assembly (clang, -O0):
<set_snan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movabs $0x7ff0000000000001,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_snan>:
movabs $0x7ff0000000000001,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @set_snan(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = bitcast double* %3 to i64*
store i64 9218868437227405313, i64* %4
ret void
}

LLVM IR (-O2):
define void @set_snan(double* nocapture writeonly %0) {
%2 = bitcast double* %0 to i64*
store i64 9218868437227405313, i64* %2
ret void
}
void Apply_Default_Formats(const char **format, const char **dformat) {
  if (!*format)
    *format = "0x";
  if (!*dformat)
    *dformat = " = $0+\n";
}


x86 assembly (clang, -O0):
<Apply_Default_Formats>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1128 <Apply_Default_Formats+0x28>
mov    -0x8(%rbp),%rax
lea    0xedb(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1144 <Apply_Default_Formats+0x44>
mov    -0x10(%rbp),%rax
lea    0xec2(%rip),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Apply_Default_Formats>:
cmpq   $0x0,(%rdi)
je     110d <Apply_Default_Formats+0xd>
cmpq   $0x0,(%rsi)
je     111d <Apply_Default_Formats+0x1d>
ret
lea    0xeec(%rip),%rax
mov    %rax,(%rdi)
cmpq   $0x0,(%rsi)
jne    110c <Apply_Default_Formats+0xc>
lea    0xedf(%rip),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
@.str = [3 x i8] c"0x\00"
@.str.1 = [8 x i8] c" = $0+\0A\00"
define void @Apply_Default_Formats(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** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = load i8**, i8*** %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %9
br label %10
10: ; preds = %8, %2
%11 = load i8**, i8*** %4
%12 = load i8*, i8** %11
%13 = icmp ne i8* %12, null
br i1 %13, label %16, label %14
14: ; preds = %10
%15 = load i8**, i8*** %4
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %15
br label %16
16: ; preds = %14, %10
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"0x\00"
@.str.1 = [8 x i8] c" = $0+\0A\00"
define void @Apply_Default_Formats(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %2
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %0
br label %6
6: ; preds = %5, %2
%7 = load i8*, i8** %1
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %6
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %10
10: ; preds = %9, %6
ret void
}
/* Variables and functions */
char getchar();
void eatline(void) {
  while (getchar() != '\n')
    continue;
}


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

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

LLVM IR (-O0):
define void @eatline() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @eatline() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
unsigned long gfx_get_max_supported_pixel_clock(void) { return 229500; }


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

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

LLVM IR (-O0):
define i64 @gfx_get_max_supported_pixel_clock() {
ret i64 229500
}

LLVM IR (-O2):
define i64 @gfx_get_max_supported_pixel_clock() {
ret i64 229500
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzFalseVariable_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKUP(int /*<<< orphan*/);
void BrzFalseVariable_ackup(struct comp *comp, int port) {
  struct BrzFalseVariable_ *c = (struct BrzFalseVariable_ *)comp;
  SEND_ACKUP(0);
}


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

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

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzFalseVariable_ = type { i32 }
define void @BrzFalseVariable_ackup(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzFalseVariable_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzFalseVariable_*
store %struct.BrzFalseVariable_* %7, %struct.BrzFalseVariable_** %5
%8 = call i32 @SEND_ACKUP(i32 0)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzFalseVariable_ackup(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKUP(i32 0)
ret void
}
/* Variables and functions */
int MOD_R2BYTEMSK(unsigned short, int);
unsigned char msModCalDDAOUT(void) {
  return (unsigned char)((MOD_R2BYTEMSK((((unsigned short)(0x00) << 8) |
                                         (unsigned short)((0x7D) * 2)),
                                        (1 << (8)))) >>
                         8);
}


x86 assembly (clang, -O0):
<msModCalDDAOUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfa,%edi
mov    $0x100,%esi
call   1030 <MOD_R2BYTEMSK@plt>
sar    $0x8,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<msModCalDDAOUT>:
push   %rax
mov    $0xfa,%edi
mov    $0x100,%esi
call   1030 <MOD_R2BYTEMSK@plt>
shr    $0x8,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @msModCalDDAOUT() {
%1 = call i32 @MOD_R2BYTEMSK(i16 zeroext 250, i32 256)
%2 = ashr i32 %1, 8
%3 = trunc i32 %2 to i8
ret i8 %3
}

LLVM IR (-O2):
define zeroext i8 @msModCalDDAOUT() {
%1 = tail call i32 @MOD_R2BYTEMSK(i16 zeroext 250, i32 256)
%2 = lshr i32 %1, 8
%3 = trunc i32 %2 to i8
ret i8 %3
}
__attribute__((no, noclone)) int f3(int x) { return x <= 0 ? ~x : x; }


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     111f <f3+0x1f>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1125 <f3+0x25>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
xor    %eax,%eax
test   %edi,%edi
setle  %al
neg    %eax
xor    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @f3(i32 %0) {
%2 = icmp slt i32 %0, 1
%3 = sext i1 %2 to i32
%4 = xor i32 %3, %0
ret i32 %4
}
void put_zeros_int_1d(int *data, int len) {
  int i;
  for (i = 0; i < len; i++)
    data[i] = 0.;
}


x86 assembly (clang, -O0):
<put_zeros_int_1d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <put_zeros_int_1d+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <put_zeros_int_1d+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_zeros_int_1d>:
test   %esi,%esi
jle    1126 <put_zeros_int_1d+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @put_zeros_int_1d(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}