xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x80() {
  Assert_real((ispunct(128) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              645, ("ispunct should be 0 for 0x80"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x80>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x285,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x80>:
push   %rax
mov    $0x80,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x285,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x80\00"
define void @t_ispunct_0x80() {
%1 = call i64 @ispunct(i32 128)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 645, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x80\00"
define void @t_ispunct_0x80() {
%1 = tail call i64 @ispunct(i32 128)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 645, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void error_and_exit(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error_and_exit>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error_and_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error_and_exit(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void greenLEDOn(void) { (*((volatile uint32_t *)0x40025020)) |= 0x08; }


x86 assembly (clang, -O0):
<greenLEDOn>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40025020,%eax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    $0x40025020,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<greenLEDOn>:
orl    $0x8,0x40025020
08
ret

LLVM IR (-O0):
define void @greenLEDOn() {
%1 = load volatile i32, i32* inttoptr (i64 1073893408 to i32*)
%2 = or i32 %1, 8
store volatile i32 %2, i32* inttoptr (i64 1073893408 to i32*)
ret void
}

LLVM IR (-O2):
define void @greenLEDOn() {
%1 = load volatile i32, i32* inttoptr (i64 1073893408 to i32*)
%2 = or i32 %1, 8
store volatile i32 %2, i32* inttoptr (i64 1073893408 to i32*)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t getle32(const void *p) {
  const uint8_t *cp = p;
  return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) + ((uint32_t)cp[2] << 16) +
         ((uint32_t)cp[3] << 24);
}


x86 assembly (clang, -O0):
<getle32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x18(%rcx),%rcx
shl    $0x18,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getle32>:
mov    0x8(%rdi),%eax
mov    0x10(%rdi),%ecx
shl    $0x8,%eax
add    (%rdi),%eax
shl    $0x10,%ecx
add    %eax,%ecx
mov    0x18(%rdi),%eax
shl    $0x18,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getle32(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 0
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = load i64*, i64** %3
%11 = getelementptr inbounds i64, i64* %10, i64 1
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 8
%15 = add nsw i32 %9, %14
%16 = load i64*, i64** %3
%17 = getelementptr inbounds i64, i64* %16, i64 2
%18 = load i64, i64* %17
%19 = trunc i64 %18 to i32
%20 = shl i32 %19, 16
%21 = add nsw i32 %15, %20
%22 = load i64*, i64** %3
%23 = getelementptr inbounds i64, i64* %22, i64 3
%24 = load i64, i64* %23
%25 = trunc i64 %24 to i32
%26 = shl i32 %25, 24
%27 = add nsw i32 %21, %26
ret i32 %27
}

LLVM IR (-O2):
define i32 @getle32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 8
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = add nsw i32 %9, %4
%11 = getelementptr inbounds i8, i8* %0, i64 16
%12 = bitcast i8* %11 to i64*
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 16
%16 = add nsw i32 %10, %15
%17 = getelementptr inbounds i8, i8* %0, i64 24
%18 = bitcast i8* %17 to i64*
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 24
%22 = add nsw i32 %16, %21
ret i32 %22
}
/* Variables and functions */
long __arch_atomic_swap(long *, long);
long int atomic_swap(long int *p, long int replace) {
  return __arch_atomic_swap(p, replace);
}


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

x86 assembly (clang, -O2):
<atomic_swap>:
jmp    1030 <__arch_atomic_swap@plt>

LLVM IR (-O0):
define i64 @atomic_swap(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 = call i64 @__arch_atomic_swap(i64* %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @atomic_swap(i64* %0, i64 %1) {
%3 = tail call i64 @__arch_atomic_swap(i64* %0, i64 %1)
ret i64 %3
}
int main() {
  int a = 5;
  int b = 6;
  return a + b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 11
}
void foo199() {}


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

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

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

LLVM IR (-O2):
define void @foo199() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void mpfq_free(void *p, size_t s __attribute__((unused))) { free(p); }


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

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

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

LLVM IR (-O2):
define void @mpfq_free(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
unsigned int sid_to_hash_bucket(uint64_t sid) { return (sid & 0xFF); }


x86 assembly (clang, -O0):
<sid_to_hash_bucket>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sid_to_hash_bucket>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @sid_to_hash_bucket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
ret i32 %4
}

LLVM IR (-O2):
define i32 @sid_to_hash_bucket(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_help() {
  fprintf(stderr, "Help Text Here\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_help>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"Help Text Here\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"Help Text Here\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int count_lines(FILE *fp) {
  int c, n = 0;
  while ((c = fgetc(fp)) != EOF) {
    if (c == '\n')
      n++;
  }
  rewind(fp);
  return n;
}


x86 assembly (clang, -O0):
<count_lines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%eax
je     1166 <count_lines+0x46>
cmpl   $0xa,-0xc(%rbp)
jne    1161 <count_lines+0x41>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1133 <count_lines+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_lines>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1040 <fgetc@plt>
mov    0x2eb5(%rip),%r14
xor    %ebp,%ebp
cmp    (%r14),%eax
je     1157 <count_lines+0x37>
xor    %ebp,%ebp
nopl   0x0(%rax)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebp
mov    %rbx,%rdi
call   1040 <fgetc@plt>
cmp    (%r14),%eax
jne    1140 <count_lines+0x20>
mov    %rbx,%rdi
call   1030 <rewind@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @count_lines(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %14, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %11, %5 ], [ %2, %1 ]
%7 = phi i32 [ %10, %5 ], [ 0, %1 ]
%8 = icmp eq i32 %6, 10
%9 = zext i1 %8 to i32
%10 = add nuw nsw i32 %7, %9
%11 = tail call i32 @fgetc(i32* %0)
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %5
14: ; preds = %5, %1
%15 = phi i32 [ 0, %1 ], [ %10, %5 ]
%16 = tail call i32 @rewind(i32* %0)
ret i32 %15
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char *, struct stat *);
int cfg_stat(char *path, struct stat *sb) {
  int removed_slash;
  int len;
  int ret;
  removed_slash = 0;
  len = 0;
  ret = stat(path, sb);
  return ret;
}


x86 assembly (clang, -O0):
<cfg_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_stat>:
jmp    1030 <stat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @cfg_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
store i32 0, i32* %5
store i32 0, i32* %6
%8 = load i8*, i8** %3
%9 = load %struct.stat*, %struct.stat** %4
%10 = call i32 @stat(i8* %8, %struct.stat* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
ret i32 %11
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @cfg_stat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @stat(i8* %0, %struct.stat* %1)
ret i32 %3
}
int msm_pm_boot_init(struct msm_pm_boot_platform_data *pdata) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.msm_pm_boot_platform_data = type opaque
define i32 @msm_pm_boot_init(%struct.msm_pm_boot_platform_data* nocapture readnone %0) {
ret i32 0
}
char *bind_textdomain_codeset(domainname, codeset) const char *domainname;
const char *codeset;
{ return libintl_bind_textdomain_codeset(domainname, codeset); }


x86 assembly (clang, -O0):
<bind_textdomain_codeset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <libintl_bind_textdomain_codeset@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind_textdomain_codeset>:
push   %rax
xor    %eax,%eax
call   1030 <libintl_bind_textdomain_codeset@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @bind_textdomain_codeset(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @libintl_bind_textdomain_codeset to i32 (i8*, i8*, ...)*)(i8* %5, i8* %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @bind_textdomain_codeset(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @libintl_bind_textdomain_codeset to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ lua_check_string(int, char *);
int /*<<< orphan*/ pushresult(int);
scalar_t__ rename(int /*<<< orphan*/, int /*<<< orphan*/);
void io_rename(void) {
  pushresult(rename(lua_check_string(1, "rename"),
                    lua_check_string(2, "rename")) == 0);
}


x86 assembly (clang, -O0):
<io_rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    0xebc(%rip),%rsi
call   1030 <lua_check_string@plt>
mov    %eax,-0x4(%rbp)
mov    $0x2,%edi
lea    0xea8(%rip),%rsi
call   1030 <lua_check_string@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1050 <rename@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <pushresult@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_rename>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1030 <lua_check_string@plt>
mov    %eax,%ebp
mov    $0x2,%edi
mov    %rbx,%rsi
call   1030 <lua_check_string@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1050 <rename@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <pushresult@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"rename\00"
define void @io_rename() {
%1 = call i32 @lua_check_string(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @lua_check_string(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i64 @rename(i32 %1, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @pushresult(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"rename\00"
define void @io_rename() {
%1 = tail call i32 @lua_check_string(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @lua_check_string(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @rename(i32 %1, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @pushresult(i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *fgets(char *, int, int /*<<< orphan*/ *);
char *readline(FILE *f, char *buffer) {
  for (;;) {
    char *ret = fgets(buffer, 128, f);
    if (ret == NULL) {
      return NULL;
    }
    if (ret[0] != '#') {
      return ret;
    }
  }
}


x86 assembly (clang, -O0):
<readline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x80,%esi
call   1030 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    114e <readline+0x3e>
movq   $0x0,-0x8(%rbp)
jmp    1170 <readline+0x60>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     116b <readline+0x5b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <readline+0x60>
jmp    1120 <readline+0x10>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readline>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   1030 <fgets@plt>
test   %rax,%rax
je     113a <readline+0x2a>
cmpb   $0x23,(%rax)
je     1120 <readline+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @readline(i32* nocapture %0, i8* %1) {
br label %3
3: ; preds = %6, %2
%4 = tail call i8* @fgets(i8* %1, i32 128, i32* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load i8, i8* %4
%8 = icmp eq i8 %7, 35
br i1 %8, label %3, label %9
9: ; preds = %3, %6
ret i8* %4
}
void rop3_46_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D ^ T;
  stk2 = S | stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_46_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_46_0_1>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
xor    %dl,%cl
or     %sil,%cl
mov    %edx,%eax
not    %al
and    %cl,%al
xor    %dl,%cl
and    %sil,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %al,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_46_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %6, %2
%8 = and i8 %7, %1
%9 = xor i8 %2, -1
%10 = and i8 %6, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %4
%14 = or i8 %10, %13
%15 = or i8 %14, %8
store i8 %15, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RCT2_CALLPROC_EBPSAFE(int);
void window_editor_scenario_options_open() {
  RCT2_CALLPROC_EBPSAFE(0x00670138);
}


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

x86 assembly (clang, -O2):
<window_editor_scenario_options_open>:
mov    $0x670138,%edi
jmp    1030 <RCT2_CALLPROC_EBPSAFE@plt>

LLVM IR (-O0):
define void @window_editor_scenario_options_open() {
%1 = call i32 @RCT2_CALLPROC_EBPSAFE(i32 6750520)
ret void
}

LLVM IR (-O2):
define void @window_editor_scenario_options_open() {
%1 = tail call i32 @RCT2_CALLPROC_EBPSAFE(i32 6750520)
ret void
}
int do_369() { return 369; }


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

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

LLVM IR (-O0):
define i32 @do_369() {
ret i32 369
}

LLVM IR (-O2):
define i32 @do_369() {
ret i32 369
}
/* Variables and functions */
int /*<<< orphan*/ compress_file(char *, char *);
int main(void) {
  compress_file("/home/anand/input_file", "/tmp/output");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"/home/anand/input_file\00"
@.str.1 = [12 x i8] c"/tmp/output\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @compress_file(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"/home/anand/input_file\00"
@.str.1 = [12 x i8] c"/tmp/output\00"
define i32 @main() {
%1 = tail call i32 @compress_file(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void fa40(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        p012A:
          goto p012A;
          goto a;
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
a:
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa40>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa40+0x4>

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

LLVM IR (-O0):
define void @fa40() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
br label %15
15: ; preds = %15, %14
br label %15
16: ; preds = %16
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
br label %19
19: ; preds = %19, %18
br label %19
20: ; No predecessors!
br label %21
21: ; preds = %21, %20
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
br label %24
24: ; preds = %24, %23
br label %24
25: ; preds = %25
br label %25
26: ; No predecessors!
br label %27
27: ; preds = %27, %26
br label %27
}

LLVM IR (-O2):
define void @fa40() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
char *__aosc_encode_fixed_size_16(char *, int /*<<< orphan*/,
                                  int /*<<< orphan*/);
char *__aosc_encode_16(char *dst, uint16_t base, uint16_t val) {
  return __aosc_encode_fixed_size_16(dst, base, val);
}


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

x86 assembly (clang, -O2):
<__aosc_encode_16>:
jmp    1030 <__aosc_encode_fixed_size_16@plt>

LLVM IR (-O0):
define i8* @__aosc_encode_16(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
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i8* @__aosc_encode_fixed_size_16(i8* %7, i32 %8, i32 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @__aosc_encode_16(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @__aosc_encode_fixed_size_16(i8* %0, i32 %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_creds_get_user_unit(void *c, const char **ret) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_bus_creds_get_user_unit>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_user_unit(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int foo(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  static int a __attribute__((annotate("GlobalValAnnotation")));
  a = foo(2);
  printf("hello world%d\n", a);
  return 0;
}


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

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

LLVM IR (-O0):
@main.a = internal global i32 0
@.str = [20 x i8] c"GlobalValAnnotation\00", section "llvm.metadata"
@.str.1 = [62 x i8] c"/home/jiang/dataset/exebench/tmp/tmpjz6rzfc3/formatted_code.c\00", section "llvm.metadata"
@.str.2 = [15 x i8] c"hello world%d\0A\00"
@llvm.global.annotations = appending global [1 x { i8*, i8*, i8*, i32, i8* }] [{ i8*, i8*, i8*, i32, i8* } { i8* bitcast (i32* @main.a to i8*), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0), i32 19, i8* null }], section "llvm.metadata"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 2)
store i32 %2, i32* @main.a
%3 = load i32, i32* @main.a
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@main.a = internal global i32 0
@.str = [20 x i8] c"GlobalValAnnotation\00", section "llvm.metadata"
@.str.1 = [62 x i8] c"/home/jiang/dataset/exebench/tmp/tmpjz6rzfc3/formatted_code.c\00", section "llvm.metadata"
@.str.2 = [15 x i8] c"hello world%d\0A\00"
@llvm.global.annotations = appending global [1 x { i8*, i8*, i8*, i32, i8* }] [{ i8*, i8*, i8*, i32, i8* } { i8* bitcast (i32* @main.a to i8*), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0), i32 19, i8* null }], section "llvm.metadata"
define i32 @main() {
%1 = tail call i32 @foo(i32 2)
store i32 %1, i32* @main.a
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
void hlt() { __asm__ volatile("hlt" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @hlt() {
tail call void asm sideeffect "hlt", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
void SSL_CTX_use_certificate_file(void) {}


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

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

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

LLVM IR (-O2):
define void @SSL_CTX_use_certificate_file() {
ret void
}
/* Variables and functions */
int atoi(char *);
void load_coefficients(int *coeffs, char **argv) {
  for (size_t i = 0; argv[i] != NULL; i++)
    coeffs[i] = atoi(argv[i]);
}


x86 assembly (clang, -O0):
<load_coefficients>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     116a <load_coefficients+0x5a>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atoi@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <load_coefficients+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_coefficients>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    (%rsi),%rdi
test   %rdi,%rdi
je     1147 <load_coefficients+0x37>
mov    %rsi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <atoi@plt>
mov    %eax,(%r14,%rbx,1)
mov    0x8(%r15,%rbx,2),%rdi
add    $0x4,%rbx
test   %rdi,%rdi
jne    1130 <load_coefficients+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @load_coefficients(i32* nocapture writeonly %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %6, %2
ret void
6: ; preds = %2, %6
%7 = phi i8* [ %13, %6 ], [ %3, %2 ]
%8 = phi i64 [ %11, %6 ], [ 0, %2 ]
%9 = tail call i32 @atoi(i8* %7)
%10 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %9, i32* %10
%11 = add i64 %8, 1
%12 = getelementptr inbounds i8*, i8** %1, i64 %11
%13 = load i8*, i8** %12
%14 = icmp eq i8* %13, null
br i1 %14, label %5, label %6
}
/* Type definitions */
struct tok {
  int dummy;
};

/* Variables and functions */
struct tok *process_cond(char const **, int);
struct tok *parse_cond(const char *cond) {
  return process_cond(&cond, 1);
}


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

x86 assembly (clang, -O2):
<parse_cond>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <process_cond@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tok = type { i32 }
define %struct.tok* @parse_cond(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call %struct.tok* @process_cond(i8** %2, i32 1)
ret %struct.tok* %3
}

LLVM IR (-O2):
%struct.tok = type { i32 }
define %struct.tok* @parse_cond(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call %struct.tok* @process_cond(i8** %2, i32 1)
ret %struct.tok* %3
}
/* Variables and functions */
int /*<<< orphan*/ fwrite(int *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void putint(int x) { fwrite(&x, sizeof(int), 1, stdout); }


x86 assembly (clang, -O0):
<putint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%ecx
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putint>:
push   %rax
mov    %edi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%ecx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @putint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fwrite(i32* %2, i32 4, i32 1, i32 %3)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @putint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fwrite(i32* %2, i32 4, i32 1, i32 %3)
ret void
}
/* Variables and functions */
float erfcore(float, int /*<<< orphan*/);
float erf1(float x) {
  float y;
  y = erfcore(x, 0);
  return y;
}


x86 assembly (clang, -O0):
<erf1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xor    %edi,%edi
call   1030 <erfcore@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @erf1(float %0) {
%2 = tail call float @erfcore(float %0, i32 0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void show_version() {
  write(1,
        "samcms-index v0.1-dev"
        ""
        " - spawns FastCGI processes\n"
        "\n",
        sizeof("samcms-index v0.1-dev"
               ""
               " - spawns FastCGI processes\n"
               "\n") -
            1);
}


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x32,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_version>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x32,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"samcms-index v0.1-dev - spawns FastCGI processes\0A\0A\00"
define void @show_version() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 50)
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"samcms-index v0.1-dev - spawns FastCGI processes\0A\0A\00"
define void @show_version() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 50)
ret void
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
int CLOCKS_PER_SEC;
scalar_t__ clock();
void wait(int seconds) {
  clock_t endwait;
  endwait = clock() + seconds * CLOCKS_PER_SEC;
  while (clock() < endwait)
    ;
}


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    -0x4(%rbp),%ecx
mov    0x2ebc(%rip),%rdx
imul   (%rdx),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
cmp    -0x10(%rbp),%rax
jge    114f <wait+0x3f>
jmp    1139 <wait+0x29>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <clock@plt>
mov    0x2ec7(%rip),%rcx
movslq (%rcx),%rcx
movslq %ebx,%rbx
imul   %rcx,%rbx
add    %rax,%rbx
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <clock@plt>
cmp    %rbx,%rax
jl     1130 <wait+0x20>
pop    %rbx
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i32 0
define void @wait(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i64 (...) @clock()
%5 = load i32, i32* %2
%6 = load i32, i32* @CLOCKS_PER_SEC
%7 = mul nsw i32 %5, %6
%8 = sext i32 %7 to i64
%9 = add nsw i64 %4, %8
store i64 %9, i64* %3
br label %10
10: ; preds = %14, %1
%11 = call i64 (...) @clock()
%12 = load i64, i64* %3
%13 = icmp slt i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
br label %10
15: ; preds = %10
ret void
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i32 0
define void @wait(i32 %0) {
%2 = tail call i64 (...) @clock()
%3 = load i32, i32* @CLOCKS_PER_SEC
%4 = mul nsw i32 %3, %0
%5 = sext i32 %4 to i64
%6 = add nsw i64 %2, %5
br label %7
7: ; preds = %7, %1
%8 = tail call i64 (...) @clock()
%9 = icmp slt i64 %8, %6
br i1 %9, label %7, label %10
10: ; preds = %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  char c = 'B';
  printf("%i\n", c);
  printf("%c\n", c + 1);
  printf("%c\n", 65);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x42,-0x5(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
add    $0x1,%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
mov    $0x42,%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rbx
mov    %rbx,%rdi
mov    $0x43,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 66, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = add nsw i32 %7, 1
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 65)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
@.str.1 = [4 x i8] c"%c\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 66)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 67)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 65)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_move_source_output_by_name() {
  printf("NOT IMPLEMENTED:"
         "pa_context_move_source_output_by_name"
         "\n");
}


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

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

LLVM IR (-O2):
@str = [54 x i8] c"NOT IMPLEMENTED:pa_context_move_source_output_by_name\00"
define i32 @pa_context_move_source_output_by_name() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello World from c\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"Hello World from c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_one_line_t32(int, int, int);
void print_2_t32(int k) {
  print_one_line_t32(k, 0, 7);
  print_one_line_t32(k, 1, 6);
  print_one_line_t32(k, 2, 5);
  print_one_line_t32(k, 3, 4);
}


x86 assembly (clang, -O0):
<print_2_t32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x7,%edx
call   1030 <print_one_line_t32@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
mov    $0x6,%edx
call   1030 <print_one_line_t32@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
mov    $0x5,%edx
call   1030 <print_one_line_t32@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
mov    $0x4,%edx
call   1030 <print_one_line_t32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_2_t32>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
mov    $0x7,%edx
call   1030 <print_one_line_t32@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x6,%edx
call   1030 <print_one_line_t32@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    $0x5,%edx
call   1030 <print_one_line_t32@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    $0x4,%edx
pop    %rbx
jmp    1030 <print_one_line_t32@plt>

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

LLVM IR (-O2):
define void @print_2_t32(i32 %0) {
%2 = tail call i32 @print_one_line_t32(i32 %0, i32 0, i32 7)
%3 = tail call i32 @print_one_line_t32(i32 %0, i32 1, i32 6)
%4 = tail call i32 @print_one_line_t32(i32 %0, i32 2, i32 5)
%5 = tail call i32 @print_one_line_t32(i32 %0, i32 3, i32 4)
ret void
}