xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
int setresgid(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int set_gids(gid_t rgid, gid_t egid, gid_t sgid) {
  if ((setresgid(rgid, egid, sgid)) == -1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<set_gids>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <setresgid@plt>
cmp    $0xffffffff,%eax
jne    114f <set_gids+0x2f>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_gids>:
push   %rax
call   1040 <setresgid@plt>
cmp    $0xffffffff,%eax
je     112f <set_gids+0xf>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @set_gids(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 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @setresgid(i32 %7, i32 %8, i32 %9)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @set_gids(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @setresgid(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3
ret i32 0
}
char *fgaj_green(int c) { return c ? "[0;32m" : ""; }


x86 assembly (clang, -O0):
<fgaj_green>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef6(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgaj_green>:
test   %edi,%edi
lea    0xefe(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[0;32m\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @fgaj_green(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[0;32m\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @fgaj_green(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ cli();
int /*<<< orphan*/ sti();
int /*<<< orphan*/ update_rect0(int, int, int, int, int, int);
void update_rect(int sid, int x, int y, int w, int h) {
  cli();
  update_rect0(sid, x, y, w, h, true);
  sti();
}


x86 assembly (clang, -O0):
<update_rect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    $0x0,%al
call   1040 <cli@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    $0x1,%r9d
call   1050 <update_rect0@plt>
mov    $0x0,%al
call   1030 <sti@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_rect>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <cli@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
mov    $0x1,%r9d
call   1050 <update_rect0@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <sti@plt>

LLVM IR (-O0):
define void @update_rect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = call i32 (...) @cli()
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = call i32 @update_rect0(i32 %12, i32 %13, i32 %14, i32 %15, i32 %16, i32 1)
%18 = call i32 (...) @sti()
ret void
}

LLVM IR (-O2):
define void @update_rect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 (...) @cli()
%7 = tail call i32 @update_rect0(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 1)
%8 = tail call i32 (...) @sti()
ret void
}
void Swap(int *x, int *y) {
  int Tmp;
  Tmp = *x;
  *x = *y;
  *y = Tmp;
  return;
}


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

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

LLVM IR (-O0):
define void @Swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @Swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int numbersOfSubtitleInString(char *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char a[100] = "abc123def456";
  printf("%d", numbersOfSubtitleInString(a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x64,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rdi
call   1050 <numbersOfSubtitleInString@plt>
mov    %eax,%esi
lea    0xefe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movaps 0xf25(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rdi
call   1040 <numbersOfSubtitleInString@plt>
lea    0xee2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [100 x i8] c"abc123def456\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = bitcast [100 x i8]* %2 to i8*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @numbersOfSubtitleInString(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [100 x i8] c"abc123def456\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @numbersOfSubtitleInString(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void object_free_scenario_text() {
  if ((*((void **)(0x009ADAF8))) != NULL) {
    free((*((void **)(0x009ADAF8))));
    (*((void **)(0x009ADAF8))) = NULL;
  }
}


x86 assembly (clang, -O0):
<object_free_scenario_text>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9adaf8,%eax
cmpq   $0x0,(%rax)
je     113c <object_free_scenario_text+0x2c>
mov    $0x9adaf8,%eax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    $0x9adaf8,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<object_free_scenario_text>:
push   %rax
mov    0x9adaf8,%rdi
test   %rdi,%rdi
je     112f <object_free_scenario_text+0x1f>
call   1030 <free@plt>
movq   $0x0,0x9adaf8
pop    %rax
ret

LLVM IR (-O0):
define void @object_free_scenario_text() {
%1 = load i8*, i8** inttoptr (i64 10148600 to i8**)
%2 = icmp ne i8* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i8*, i8** inttoptr (i64 10148600 to i8**)
%5 = call i32 @free(i8* %4)
store i8* null, i8** inttoptr (i64 10148600 to i8**)
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @object_free_scenario_text() {
%1 = load i8*, i8** inttoptr (i64 10148600 to i8**)
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @free(i8* %1)
store i8* null, i8** inttoptr (i64 10148600 to i8**)
br label %5
5: ; preds = %3, %0
ret void
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ *d_name;
};

/* Variables and functions */
int /*<<< orphan*/ isdigit(int /*<<< orphan*/);
int filter(const struct dirent *d) {
  if (!isdigit(d->d_name[0]))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    113f <filter+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1146 <filter+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter>:
mov    (%rdi),%rax
mov    (%rax),%ecx
add    $0xffffffd0,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
setb   %al
ret

LLVM IR (-O0):
%struct.dirent = type { i32* }
define i32 @filter(%struct.dirent* %0) {
%2 = alloca i32
%3 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %3
%4 = load %struct.dirent*, %struct.dirent** %3
%5 = getelementptr inbounds %struct.dirent, %struct.dirent* %4, i32 0, i32 0
%6 = load i32*, i32** %5
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = call i32 @isdigit(i32 %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %1
store i32 0, i32* %2
br label %13
12: ; preds = %1
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.dirent = type { i32* }
define i32 @filter(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = add i32 %4, -48
%6 = icmp ult i32 %5, 10
%7 = zext i1 %6 to i32
ret i32 %7
}
void avpicture_get_size() {}


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

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

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

LLVM IR (-O2):
define void @avpicture_get_size() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void show_version(void) {
  fprintf(stderr, "smc v"
                  "0.0.2"
                  "\n"
                  "User space daemon for KNX Devices' management,\n"
                  "KNX relevant device Controller and Manager\n"
                  "Copyright (c) 2014, VIA Networking "
                  "and contributors\n");
}


x86 assembly (clang, -O0):
<show_version>:
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):
<show_version>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [154 x i8] c"smc v0.0.2\0AUser space daemon for KNX Devices' management,\0AKNX relevant device Controller and Manager\0ACopyright (c) 2014, VIA Networking and contributors\0A\00"
define void @show_version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [154 x i8] c"smc v0.0.2\0AUser space daemon for KNX Devices' management,\0AKNX relevant device Controller and Manager\0ACopyright (c) 2014, VIA Networking and contributors\0A\00"
define void @show_version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void json_free(void *a) { free(a); }


x86 assembly (clang, -O0):
<json_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):
<json_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @json_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 @json_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned int *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int main(int args, char **argv) {
  int nIdx;
  for (nIdx = 0; nIdx < 136; nIdx++)
    printf("!");
  unsigned EIP = 0x00000000004006fa;
  fwrite(&EIP, 1, 8, stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x88,-0x14(%rbp)
jge    1164 <main+0x44>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
movl   $0x4006fa,-0x18(%rbp)
mov    0x2e6e(%rip),%rax
mov    (%rax),%ecx
lea    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x8,%edx
call   1040 <fwrite@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x88,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x21,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <main+0x10>
movl   $0x4006fa,0xc(%rsp)
mov    0x2e92(%rip),%rax
mov    (%rax),%ecx
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
mov    $0x8,%edx
call   1040 <fwrite@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
br label %4
4: ; preds = %2, %4
%5 = phi i32 [ 0, %2 ], [ %7, %4 ]
%6 = tail call i32 @putchar(i32 33)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, 136
br i1 %8, label %9, label %4
9: ; preds = %4
%10 = bitcast i32* %3 to i8*
store i32 4196090, i32* %3
%11 = load i32, i32* @stdout
%12 = call i32 @fwrite(i32* %3, i32 1, i32 8, i32 %11)
ret i32 0
}
int test_imm_E9uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xE9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E9uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0xe9,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_E9uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 233
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_E9uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1000727379968
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
double OverlappingTemplateMatchings(char *epsilon, int n, int m) { return (0); }


x86 assembly (clang, -O0):
<OverlappingTemplateMatchings>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<OverlappingTemplateMatchings>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @OverlappingTemplateMatchings(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @OverlappingTemplateMatchings(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret double 0.000000e+00
}
void XkbAllocServerMap() {}


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

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

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

LLVM IR (-O2):
define void @XkbAllocServerMap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putstr(char *);
void ft_putchar_succ(char c) {
  ft_putstr("\x1B[32m");
  ft_putchar(c);
  ft_putstr("\x1B[0m");
}


x86 assembly (clang, -O0):
<ft_putchar_succ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xecb(%rip),%rdi
call   1040 <ft_putstr@plt>
movsbl -0x1(%rbp),%edi
call   1030 <ft_putchar@plt>
lea    0xebc(%rip),%rdi
call   1040 <ft_putstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchar_succ>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <ft_putstr@plt>
mov    %ebx,%edi
call   1030 <ft_putchar@plt>
lea    0xec9(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[32m\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
define void @ft_putchar_succ(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @ft_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i8, i8* %2
%5 = call i32 @ft_putchar(i8 signext %4)
%6 = call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[32m\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
define void @ft_putchar_succ(i8 signext %0) {
%2 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @ft_putchar(i8 signext %0)
%4 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void EC_GROUP_get_point_conversion_form(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_GROUP_get_point_conversion_form() {
ret void
}
/* Variables and functions */
int yaffs_lgetxattr_reldir(int /*<<< orphan*/, char const *, char const *,
                           void *, int);
int yaffs_lgetxattr(const char *path, const char *name, void *data, int size) {
  return yaffs_lgetxattr_reldir((0), path, name, data, size);
}


x86 assembly (clang, -O0):
<yaffs_lgetxattr>:
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),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
xor    %edi,%edi
call   1030 <yaffs_lgetxattr_reldir@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_lgetxattr>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <yaffs_lgetxattr_reldir@plt>

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

LLVM IR (-O2):
define i32 @yaffs_lgetxattr(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @yaffs_lgetxattr_reldir(i32 0, i8* %0, i8* %1, i8* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ outb(short, char);
void serial_putc(short combase, char c) {
  outb(combase, c);
  return;
}


x86 assembly (clang, -O0):
<serial_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%ax
movswl %ax,%edi
movsbl -0x3(%rbp),%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_putc>:
jmp    1030 <outb@plt>

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

LLVM IR (-O2):
define void @serial_putc(i16 signext %0, i8 signext %1) {
%3 = tail call i32 @outb(i16 signext %0, i8 signext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  float f = 1.0;
  int i = 567;
  char c = 'A';
  void *p;
  printf("%d\n", sizeof(*p));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movl   $0x237,-0x8(%rbp)
movb   $0x41,-0x9(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8*
store float 1.000000e+00, float* %1
store i32 567, i32* %2
store i8 65, i8* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ushort;

/* Variables and functions */
ushort **addrow_usmatrix(ushort **m, long nrl, long nrh, long ncl, long nch,
                         long nr) {
  return NULL;
}


x86 assembly (clang, -O0):
<addrow_usmatrix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32** @addrow_usmatrix(i32** %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = alloca i32**
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i32** %0, i32*** %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
ret i32** null
}

LLVM IR (-O2):
define noalias i32** @addrow_usmatrix(i32** nocapture readnone %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
ret i32** null
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int recv(int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
int recv_msg(int fd, char *message) {
  int b_received = 0;
  int b_total = 0;
  char buffer[1024];
  memset(buffer, '\0', sizeof(buffer));
  b_received = recv(fd, buffer, sizeof(buffer), 0);
  b_total += b_received;
  strcpy(message, buffer);
  return b_total;
}


x86 assembly (clang, -O0):
<recv_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
mov    -0x4(%rbp),%edi
lea    -0x420(%rbp),%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recv_msg>:
push   %rbp
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    %ebp,%eax
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @recv_msg(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [1024 x i8]
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %5
store i32 0, i32* %6
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%9 = call i32 @memset(i8* %8, i8 signext 0, i32 1024)
%10 = load i32, i32* %3
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%12 = call i32 @recv(i32 %10, i8* %11, i32 1024, i32 0)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = add nsw i32 %14, %13
store i32 %15, i32* %6
%16 = load i8*, i8** %4
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%18 = call i32 @strcpy(i8* %16, i8* %17)
%19 = load i32, i32* %6
ret i32 %19
}

LLVM IR (-O2):
define i32 @recv_msg(i32 %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i8 signext 0, i32 1024)
%6 = call i32 @recv(i32 %0, i8* %4, i32 1024, i32 0)
%7 = call i32 @strcpy(i8* %1, i8* %4)
ret i32 %6
}
unsigned xrop3_244_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S & stk3;
  stk1 = T | stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_244_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_244_0_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
mov    %esi,%eax
and    %edi,%eax
or     %ecx,%eax
not    %edi
and    %esi,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_244_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %7
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = and i32 %31, %32
%34 = load i32, i32* %8
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = or i32 %33, %37
%39 = load i32, i32* %7
%40 = load i32, i32* %6
%41 = xor i32 %40, -1
%42 = and i32 %39, %41
%43 = load i32, i32* %5
%44 = and i32 %42, %43
%45 = or i32 %38, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_244_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = and i32 %6, %3
%8 = or i32 %7, %4
%9 = xor i32 %3, -1
%10 = and i32 %9, %5
%11 = or i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ cleanUpAndFail(int);
void blockOverrun() { cleanUpAndFail(2); }


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

x86 assembly (clang, -O2):
<blockOverrun>:
mov    $0x2,%edi
jmp    1030 <cleanUpAndFail@plt>

LLVM IR (-O0):
define void @blockOverrun() {
%1 = call i32 @cleanUpAndFail(i32 2)
ret void
}

LLVM IR (-O2):
define void @blockOverrun() {
%1 = tail call i32 @cleanUpAndFail(i32 2)
ret void
}
int test_imm_76uint32_reg(unsigned int val) {
  return ((val) & (0x76 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_76uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x76,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_76uint32_reg>:
test   $0x76,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_76uint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 118
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_76uint32_reg(i32 %0) {
%2 = and i32 %0, 118
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
long long calc_blsmsk_u64(long long src1, long long src2) {
  return (src1 - 1) ^ (src2);
}


x86 assembly (clang, -O0):
<calc_blsmsk_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
xor    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_blsmsk_u64>:
lea    -0x1(%rdi),%rax
xor    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @calc_blsmsk_u64(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 = sub nsw i64 %5, 1
%7 = load i64, i64* %4
%8 = xor i64 %6, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @calc_blsmsk_u64(i64 %0, i64 %1) {
%3 = add nsw i64 %0, -1
%4 = xor i64 %3, %1
ret i64 %4
}
/* Variables and functions */
char toupper(char c) {
  if (c >= 'a' && c <= 'z')
    return c + 'A' - 'a';
  else
    return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1136 <toupper+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     1136 <toupper+0x36>
movsbl -0x2(%rbp),%eax
add    $0x41,%eax
sub    $0x61,%eax
mov    %al,-0x1(%rbp)
jmp    113c <toupper+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @toupper(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 65
%15 = sub nsw i32 %14, 97
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %19
17: ; preds = %7, %1
%18 = load i8, i8* %3
store i8 %18, i8* %2
br label %19
19: ; preds = %17, %11
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @toupper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
void free_comment_data(void) {}


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

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

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

LLVM IR (-O2):
define void @free_comment_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
main() { printf("%s DE Shaw", "%s DE Shaw"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"%s DE Shaw\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s DE Shaw\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_message(char *);
void unsorted7_setup_fixture() {
  print_message("Pqueue with 7 unsorted elements\n");
  print_message("-------------------------------\n");
}


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

x86 assembly (clang, -O2):
<unsorted7_setup_fixture>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_message@plt>
lea    0xefd(%rip),%rdi
pop    %rax
jmp    1030 <print_message@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Pqueue with 7 unsorted elements\0A\00"
@.str.1 = [33 x i8] c"-------------------------------\0A\00"
define void @unsorted7_setup_fixture() {
%1 = call i32 @print_message(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @print_message(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Pqueue with 7 unsorted elements\0A\00"
@.str.1 = [33 x i8] c"-------------------------------\0A\00"
define void @unsorted7_setup_fixture() {
%1 = tail call i32 @print_message(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_message(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timespec {
  int tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
uint64_t delta_ns(struct timespec begin, struct timespec end) {
  return (end.tv_sec - begin.tv_sec) * 1000000000 + end.tv_nsec - begin.tv_nsec;
}


x86 assembly (clang, -O0):
<delta_ns>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    %edx,-0x20(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x20(%rbp),%eax
sub    -0x10(%rbp),%eax
imul   $0x3b9aca00,%eax,%eax
cltq
add    -0x18(%rbp),%rax
sub    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<delta_ns>:
sub    %edi,%edx
imul   $0x3b9aca00,%edx,%eax
cltq
sub    %rsi,%rcx
add    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define i64 @delta_ns(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = alloca %struct.timespec
%6 = alloca %struct.timespec
%7 = bitcast %struct.timespec* %5 to { i32, i64 }*
%8 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %7, i32 0, i32 0
store i32 %0, i32* %8
%9 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = bitcast %struct.timespec* %6 to { i32, i64 }*
%11 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 0
store i32 %2, i32* %11
%12 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 1
store i64 %3, i64* %12
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 0
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%16 = load i32, i32* %15
%17 = sub nsw i32 %14, %16
%18 = mul nsw i32 %17, 1000000000
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 1
%21 = load i64, i64* %20
%22 = add nsw i64 %19, %21
%23 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
%24 = load i64, i64* %23
%25 = sub nsw i64 %22, %24
ret i64 %25
}

LLVM IR (-O2):
define i64 @delta_ns(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = sub nsw i32 %2, %0
%6 = mul nsw i32 %5, 1000000000
%7 = sext i32 %6 to i64
%8 = sub i64 %3, %1
%9 = add i64 %8, %7
ret i64 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *,
                           char const *, char const *);
int /*<<< orphan*/ output_level(int /*<<< orphan*/ *, int);
void output_itemv(FILE *outptr, const char *tag, const char *item, int level) {
  output_level(outptr, level);
  fprintf(outptr, "<%s>%s</%s>\n", tag, item, tag);
}


x86 assembly (clang, -O0):
<output_itemv>:
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
mov    -0x1c(%rbp),%esi
call   1040 <output_level@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xea6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_itemv>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %ecx,%esi
call   1040 <output_level@plt>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r15,%r8
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"<%s>%s</%s>\0A\00"
define void @output_itemv(i32* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32* %0, i32** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %8
%11 = call i32 @output_level(i32* %9, i32 %10)
%12 = load i32*, i32** %5
%13 = load i8*, i8** %6
%14 = load i8*, i8** %7
%15 = load i8*, i8** %6
%16 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<%s>%s</%s>\0A\00"
define void @output_itemv(i32* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @output_level(i32* %0, i32 %3)
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %1)
ret void
}
/* Variables and functions */
scalar_t__ isdigit(int);
int isxdigit(int c) {
  if (isdigit(c) || (c >= 65 && c <= 70))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
jne    1141 <isxdigit+0x31>
cmpl   $0x41,-0x8(%rbp)
jl     114d <isxdigit+0x3d>
cmpl   $0x46,-0x8(%rbp)
jg     114d <isxdigit+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1154 <isxdigit+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
add    $0xffffffbf,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isdigit(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 65
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, 70
br i1 %12, label %13, label %14
13: ; preds = %10, %1
store i32 1, i32* %2
br label %15
14: ; preds = %10, %7
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = add i32 %0, -65
%5 = icmp ult i32 %4, 6
%6 = or i1 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
void func3(void) {
  int *p = (int *)&&lab1 + 1;
lab1:
  goto *(p + 1);
}


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
lea    0x8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
jmp    *%rax

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

LLVM IR (-O0):
define void @func3() {
%1 = alloca i32*
store i32* getelementptr inbounds (i32, i32* bitcast (i8* blockaddress(@func3, %2) to i32*), i64 1), i32** %1
br label %2
2: ; preds = %0, %6
%3 = load i32*, i32** %1
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = bitcast i32* %4 to i8*
br label %6
6: ; preds = %2
%7 = phi i8* [ %5, %2 ]
indirectbr i8* %7, [label %2]
}

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


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

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

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

LLVM IR (-O2):
define void @init_name_to_index_in_main_var_decl_table() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display(int, int, char);
void Output(int *hour, int *min, int *sec, int *maskHour, int *maskMin,
            int *maskSec) {
  display(*hour, *maskHour, ':');
  display(*min, *maskMin, ':');
  display(*sec, *maskSec, '\n');
}


x86 assembly (clang, -O0):
<Output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
mov    $0x3a,%edx
call   1030 <display@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
mov    $0x3a,%edx
call   1030 <display@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rax
mov    (%rax),%esi
mov    $0xa,%edx
call   1030 <display@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Output>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r12
mov    %rdx,%r15
mov    %rsi,%rbx
mov    (%rdi),%edi
mov    (%rcx),%esi
mov    $0x3a,%edx
call   1030 <display@plt>
mov    (%rbx),%edi
mov    (%r12),%esi
mov    $0x3a,%edx
call   1030 <display@plt>
mov    (%r15),%edi
mov    (%r14),%esi
mov    $0xa,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <display@plt>

LLVM IR (-O0):
define void @Output(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*
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = load i32*, i32** %10
%16 = load i32, i32* %15
%17 = call i32 @display(i32 %14, i32 %16, i8 signext 58)
%18 = load i32*, i32** %8
%19 = load i32, i32* %18
%20 = load i32*, i32** %11
%21 = load i32, i32* %20
%22 = call i32 @display(i32 %19, i32 %21, i8 signext 58)
%23 = load i32*, i32** %9
%24 = load i32, i32* %23
%25 = load i32*, i32** %12
%26 = load i32, i32* %25
%27 = call i32 @display(i32 %24, i32 %26, i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @Output(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5) {
%7 = load i32, i32* %0
%8 = load i32, i32* %3
%9 = tail call i32 @display(i32 %7, i32 %8, i8 signext 58)
%10 = load i32, i32* %1
%11 = load i32, i32* %4
%12 = tail call i32 @display(i32 %10, i32 %11, i8 signext 58)
%13 = load i32, i32* %2
%14 = load i32, i32* %5
%15 = tail call i32 @display(i32 %13, i32 %14, i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tellmeall();
void print_platform_information(void) { tellmeall(); }


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

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

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

LLVM IR (-O2):
define void @print_platform_information() {
%1 = tail call i32 (...) @tellmeall()
ret void
}