xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void PrintTrans(int x, int y) {
  printf("    (%d %d)", x, y);
  printf("\n");
}


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

x86 assembly (clang, -O2):
<PrintTrans>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [12 x i8] c" (%d %d)\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @PrintTrans(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c" (%d %d)\00"
define void @PrintTrans(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = tail call i32 @putchar(i32 10)
ret void
}
long double longdouble_ignoring_unsignedlonglongint(long double x,
                                                    unsigned long long int y) {
  return x;
}


x86 assembly (clang, -O0):
<longdouble_ignoring_unsignedlonglongint>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<longdouble_ignoring_unsignedlonglongint>:
fldt   0x8(%rsp)
ret

LLVM IR (-O0):
define x86_fp80 @longdouble_ignoring_unsignedlonglongint(x86_fp80 %0, i64 %1) {
%3 = alloca x86_fp80
%4 = alloca i64
store x86_fp80 %0, x86_fp80* %3
store i64 %1, i64* %4
%5 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @longdouble_ignoring_unsignedlonglongint(x86_fp80 returned %0, i64 %1) {
ret x86_fp80 %0
}
void Overload0() {}


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

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

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

LLVM IR (-O2):
define void @Overload0() {
ret void
}
char *langDbgCallstack() { return "Callstack"; }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"Callstack\00"
define i8* @langDbgCallstack() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"Callstack\00"
define i8* @langDbgCallstack() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
int testfunction(void) { return 15; }


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

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

LLVM IR (-O0):
define i32 @testfunction() {
ret i32 15
}

LLVM IR (-O2):
define i32 @testfunction() {
ret i32 15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("This program adds two vectors together and stores it in a third "
         "vector. You can then add the sum to your list of favorites, or load "
         "a favorite back into one of the addends.\n");
}


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

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

LLVM IR (-O0):
@.str = [174 x i8] c"This program adds two vectors together and stores it in a third vector. You can then add the sum to your list of favorites, or load a favorite back into one of the addends.\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [173 x i8] c"This program adds two vectors together and stores it in a third vector. You can then add the sum to your list of favorites, or load a favorite back into one of the addends.\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([173 x i8], [173 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int lengthoffile(FILE *f) {
  int pos;
  int end;
  pos = ftell(f);
  fseek(f, 0, SEEK_END);
  end = ftell(f);
  fseek(f, pos, SEEK_SET);
  return end;
}


x86 assembly (clang, -O0):
<lengthoffile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lengthoffile>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %eax,%r14d
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %eax,%ebp
mov    0x2e85(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <fseek@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @lengthoffile(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @ftell(i32* %5)
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i32 @ftell(i32* %10)
store i32 %11, i32* %4
%12 = load i32*, i32** %2
%13 = load i32, i32* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i32 %13, i32 %14)
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @lengthoffile(i32* nocapture %0) {
%2 = tail call i32 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i32 0, i32 %3)
%5 = tail call i32 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i32 %2, i32 %6)
ret i32 %5
}
/* Variables and functions */
scalar_t__ lire(char *, int);
double strtod(char *, int /*<<< orphan*/ *);
double lireDouble() {
  char nombreTexte[100] = {0};
  if (lire(nombreTexte, 100)) {
    return strtod(nombreTexte, NULL);
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<lireDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   1040 <lire@plt>
cmp    $0x0,%rax
je     1177 <lireDouble+0x47>
lea    -0x70(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtod@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    117f <lireDouble+0x4f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lireDouble>:
sub    $0x68,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rdi
mov    $0x64,%esi
call   1040 <lire@plt>
test   %rax,%rax
je     116d <lireDouble+0x4d>
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <strtod@plt>
add    $0x68,%rsp
ret
xorps  %xmm0,%xmm0
add    $0x68,%rsp
ret

LLVM IR (-O0):
define double @lireDouble() {
%1 = alloca double
%2 = alloca [100 x i8]
%3 = bitcast [100 x i8]* %2 to i8*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i64 @lire(i8* %4, i32 100)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call double @strtod(i8* %8, i32* null)
store double %9, double* %1
br label %11
10: ; preds = %0
store double 0.000000e+00, double* %1
br label %11
11: ; preds = %10, %7
%12 = load double, double* %1
ret double %12
}

LLVM IR (-O2):
define double @lireDouble() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i64 @lire(i8* %2, i32 100)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call double @strtod(i8* nocapture %2, i32* null)
br label %7
7: ; preds = %0, %5
%8 = phi double [ %6, %5 ], [ 0.000000e+00, %0 ]
ret double %8
}
void BN_copy(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_copy() {
ret void
}
/* Variables and functions */
int fib(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int n = 6;
  printf("Fibonacci %d: %d\n", n, fib(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fib@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"Fibonacci %d: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 6, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fib(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Fibonacci %d: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @fib(i32 6)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 6, i32 %1)
ret i32 0
}
int _close(int file) {
  (void)(file);
  return -1;
}


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

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

LLVM IR (-O0):
define i32 @_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 -1
}

LLVM IR (-O2):
define i32 @_close(i32 %0) {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD;

/* Variables and functions */
int /*<<< orphan*/ OBJ_NAME_TYPE_MD_METH;
scalar_t__ OBJ_NAME_get(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ OPENSSL_init_crypto(int /*<<< orphan*/,
                                       int /*<<< orphan*/ *);
const EVP_MD *EVP_get_digestbyname(const char *name) {
  const EVP_MD *cp;
  if (!OPENSSL_init_crypto(0, NULL))
    return NULL;
  cp = (const EVP_MD *)OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  return (cp);
}


x86 assembly (clang, -O0):
<EVP_get_digestbyname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <OPENSSL_init_crypto@plt>
cmp    $0x0,%eax
jne    114d <EVP_get_digestbyname+0x2d>
movq   $0x0,-0x8(%rbp)
jmp    116b <EVP_get_digestbyname+0x4b>
mov    -0x10(%rbp),%rdi
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
call   1030 <OBJ_NAME_get@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_get_digestbyname>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %edi,%edi
xor    %esi,%esi
call   1040 <OPENSSL_init_crypto@plt>
test   %eax,%eax
je     114a <EVP_get_digestbyname+0x2a>
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    %r14,%rdi
call   1030 <OBJ_NAME_get@plt>
mov    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@OBJ_NAME_TYPE_MD_METH = global i32 0
define i32* @EVP_get_digestbyname(i8* %0) {
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = call i32 @OPENSSL_init_crypto(i32 0, i32* null)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32* null, i32** %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i32, i32* @OBJ_NAME_TYPE_MD_METH
%11 = call i64 @OBJ_NAME_get(i8* %9, i32 %10)
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %4
%13 = load i32*, i32** %4
store i32* %13, i32** %2
br label %14
14: ; preds = %8, %7
%15 = load i32*, i32** %2
ret i32* %15
}

LLVM IR (-O2):
@OBJ_NAME_TYPE_MD_METH = global i32 0
define i32* @EVP_get_digestbyname(i8* %0) {
%2 = tail call i32 @OPENSSL_init_crypto(i32 0, i32* null)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i32, i32* @OBJ_NAME_TYPE_MD_METH
%6 = tail call i64 @OBJ_NAME_get(i8* %0, i32 %5)
%7 = inttoptr i64 %6 to i32*
br label %8
8: ; preds = %1, %4
%9 = phi i32* [ %7, %4 ], [ null, %1 ]
ret i32* %9
}
int list_is_empty(char a) { return (a == 1); }


x86 assembly (clang, -O0):
<list_is_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_is_empty>:
xor    %eax,%eax
cmp    $0x1,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @list_is_empty(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @list_is_empty(i8 signext %0) {
%2 = icmp eq i8 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ curs_set(int);
int /*<<< orphan*/ wclear(int /*<<< orphan*/ *);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
void reset_bildschirm(WINDOW *fenster) {
  curs_set(1);
  wclear(fenster);
  wrefresh(fenster);
}


x86 assembly (clang, -O0):
<reset_bildschirm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1050 <curs_set@plt>
mov    -0x8(%rbp),%rdi
call   1040 <wclear@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wrefresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_bildschirm>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edi
call   1050 <curs_set@plt>
mov    %rbx,%rdi
call   1040 <wclear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <wrefresh@plt>

LLVM IR (-O0):
define void @reset_bildschirm(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @curs_set(i32 1)
%4 = load i32*, i32** %2
%5 = call i32 @wclear(i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @wrefresh(i32* %6)
ret void
}

LLVM IR (-O2):
define void @reset_bildschirm(i32* %0) {
%2 = tail call i32 @curs_set(i32 1)
%3 = tail call i32 @wclear(i32* %0)
%4 = tail call i32 @wrefresh(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getDealer();
int /*<<< orphan*/ initialize_helper(int /*<<< orphan*/, char *);
void initialize_dealer() { initialize_helper(getDealer(), "Dealer"); }


x86 assembly (clang, -O0):
<initialize_dealer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getDealer@plt>
mov    %eax,%edi
lea    0xecc(%rip),%rsi
call   1040 <initialize_helper@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_dealer>:
push   %rax
xor    %eax,%eax
call   1030 <getDealer@plt>
lea    0xed1(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1040 <initialize_helper@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Dealer\00"
define void @initialize_dealer() {
%1 = call i32 (...) @getDealer()
%2 = call i32 @initialize_helper(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Dealer\00"
define void @initialize_dealer() {
%1 = tail call i32 (...) @getDealer()
%2 = tail call i32 @initialize_helper(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
void dummy_() {}


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

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

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

LLVM IR (-O2):
define void @dummy_() {
ret void
}
void RTStrmPutStr(void) {}


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

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

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

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

/* Variables and functions */
char lang__defVar(char *, int);
char *lang_getVarName(int /*<<< orphan*/ *);
char lang_defVar(FILE *lang_in, int type) {
  char *name;
  name = lang_getVarName(lang_in);
  return lang__defVar(name, type);
}


x86 assembly (clang, -O0):
<lang_defVar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <lang_getVarName@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <lang__defVar@plt>
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lang_defVar>:
push   %rbx
mov    %esi,%ebx
call   1040 <lang_getVarName@plt>
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <lang__defVar@plt>

LLVM IR (-O0):
define signext i8 @lang_defVar(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = call i8* @lang_getVarName(i32* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i32, i32* %4
%10 = call signext i8 @lang__defVar(i8* %8, i32 %9)
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @lang_defVar(i32* %0, i32 %1) {
%3 = tail call i8* @lang_getVarName(i32* %0)
%4 = tail call signext i8 @lang__defVar(i8* %3, i32 %1)
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ IMIN(int, int);
int /*<<< orphan*/ memcpy(char *, char const *, int /*<<< orphan*/);
int strlen(char const *);
int load(char *recp, int recsize, char const *buf,
         char const *udata __attribute__((unused)),
         int uleng __attribute__((unused))) {
  int buflen = strlen(buf);
  memcpy(recp, buf, IMIN(buflen, recsize));
  return buflen;
}


x86 assembly (clang, -O0):
<load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <IMIN@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
mov    -0x28(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %rdi,%r14
mov    %rdx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %r15d,%esi
call   1040 <IMIN@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @load(i8* %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%12 = load i8*, i8** %8
%13 = call i32 @strlen(i8* %12)
store i32 %13, i32* %11
%14 = load i8*, i8** %6
%15 = load i8*, i8** %8
%16 = load i32, i32* %11
%17 = load i32, i32* %7
%18 = call i32 @IMIN(i32 %16, i32 %17)
%19 = call i32 @memcpy(i8* %14, i8* %15, i32 %18)
%20 = load i32, i32* %11
ret i32 %20
}

LLVM IR (-O2):
define i32 @load(i8* %0, i32 %1, i8* %2, i8* nocapture readnone %3, i32 %4) {
%6 = tail call i32 @strlen(i8* %2)
%7 = tail call i32 @IMIN(i32 %6, i32 %1)
%8 = tail call i32 @memcpy(i8* %0, i8* %2, i32 %7)
ret i32 %6
}
/* Variables and functions */
void *dlopen(char const *, int);
void *_dlopen(const char *path, int flag) { return dlopen(path, flag); }


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

x86 assembly (clang, -O2):
<_dlopen>:
jmp    1030 <dlopen@plt>

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

LLVM IR (-O2):
define i8* @_dlopen(i8* %0, i32 %1) {
%3 = tail call i8* @dlopen(i8* %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x67() {
  Assert_real((isspace(103) == 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_isspace.c",
              520, ("isspace should be 0 for g"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x67>:
push   %rax
mov    $0x67,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x208,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for g\00"
define void @t_isspace_0x67() {
%1 = call i64 @isspace(i32 103)
%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 520, i8* getelementptr inbounds ([26 x i8], [26 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for g\00"
define void @t_isspace_0x67() {
%1 = tail call i64 @isspace(i32 103)
%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 520, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int list_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool test_list_free_null_params(void) {
  bool pass = false;
  unsigned int res = list_free(NULL, NULL);
  if (res == 1) {
    pass = true;
  }
  return pass;
}


x86 assembly (clang, -O0):
<test_list_free_null_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1030 <list_free@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    113f <test_list_free_null_params+0x2f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_list_free_null_params>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <list_free@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_list_free_null_params() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @list_free(i32* null, i32* null)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %1
br label %7
7: ; preds = %6, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_list_free_null_params() {
%1 = tail call i32 @list_free(i32* null, i32* null)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("MBEDTLS_ECDH_C and/or MBEDTLS_ECDH_LEGACY_CONTEXT and/or "
         "MBEDTLS_ECP_DP_CURVE25519_ENABLED and/or "
         "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C "
         "not defined\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 = [155 x i8] c"MBEDTLS_ECDH_C and/or MBEDTLS_ECDH_LEGACY_CONTEXT and/or MBEDTLS_ECP_DP_CURVE25519_ENABLED and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [154 x i8] c"MBEDTLS_ECDH_C and/or MBEDTLS_ECDH_LEGACY_CONTEXT and/or MBEDTLS_ECP_DP_CURVE25519_ENABLED and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([154 x i8], [154 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISREG(int /*<<< orphan*/);
int stat(char const *, struct stat *);
int __imlib_IsRealFile(const char *s) {
  struct stat st;
  return ((stat(s, &st) != -1) && (S_ISREG(st.st_mode)));
}


x86 assembly (clang, -O0):
<__imlib_IsRealFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x11(%rbp)
je     115b <__imlib_IsRealFile+0x3b>
mov    -0x10(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__imlib_IsRealFile>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
je     1143 <__imlib_IsRealFile+0x23>
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @__imlib_IsRealFile(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = icmp ne i32 %5, -1
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i64 @S_ISREG(i32 %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @__imlib_IsRealFile(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i64 @S_ISREG(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int scanf(char *, int *, int *);
void check_intInput(int *a, int *b) {
  if ((scanf("%d %d%*c", a, b)) != 2) {
    printf("Not digit!");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<check_intInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb1(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x2,%eax
je     1177 <check_intInput+0x47>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_intInput>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xec2(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    114a <check_intInput+0x1a>
pop    %rax
ret
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d%*c\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
define void @check_intInput(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %6)
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d%*c\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
define void @check_intInput(i32* %0, i32* %1) {
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %0, i32* %1)
%4 = icmp eq i32 %3, 2
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
scalar_t__ raptorTest();
int main() {
  if (raptorTest())
    puts("I am the Raptor");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <raptorTest@plt>
cmp    $0x0,%rax
je     114c <main+0x2c>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <raptorTest@plt>
test   %rax,%rax
je     1139 <main+0x19>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"I am the Raptor\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @raptorTest()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"I am the Raptor\00"
define i32 @main() {
%1 = tail call i64 (...) @raptorTest()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fun(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int ret = 0;
  fun(1);
  printf("RETURNED %d\n", ret);
  if (ret != 3) {
    return 1;
  } else {
    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)
mov    $0x1,%edi
call   1030 <fun@plt>
mov    -0x14(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x3,-0x14(%rbp)
je     116c <main+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1173 <main+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"RETURNED %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 @fun(i32 1)
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 3
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [13 x i8] c"RETURNED %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fun(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 1
}
void RTTlsSet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTlsSet() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void __init(void) { fprintf(stderr, "Starting instrument-dummy...\n"); }


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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"Starting instrument-dummy...\0A\00"
define void @__init() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Starting instrument-dummy...\0A\00"
define void @__init() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct timeval {
  int tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint32_t get_timestamp_sec() {
  struct timeval now;
  gettimeofday(&now, NULL);
  uint32_t tstmp = (uint32_t)(now.tv_sec);
  if (now.tv_usec > 500000)
    tstmp++;
  return tstmp;
}


x86 assembly (clang, -O0):
<get_timestamp_sec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7a120,-0x8(%rbp)
jle    1141 <get_timestamp_sec+0x31>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_timestamp_sec>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
xor    %eax,%eax
cmpl   $0x7a121,(%rsp)
setge  %al
add    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @get_timestamp_sec() {
%1 = alloca %struct.timeval
%2 = alloca i32
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i32, i32* %4
store i32 %5, i32* %2
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = icmp sgt i32 %7, 500000
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %0
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @get_timestamp_sec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = icmp sgt i32 %7, 500000
%9 = zext i1 %8 to i32
%10 = add nsw i32 %5, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Set_AddressBus_to_Initial_Default_State_After_Power_ON();
int /*<<< orphan*/ Set_ControlBus_to_Initial_Default_State_After_Power_ON();
int /*<<< orphan*/ Set_DataBus_to_Initial_Default_State_After_Power_ON();
void Set_Initial_Default_State_After_Power_ON(void) {
  Set_DataBus_to_Initial_Default_State_After_Power_ON();
  Set_AddressBus_to_Initial_Default_State_After_Power_ON();
  Set_ControlBus_to_Initial_Default_State_After_Power_ON();
}


x86 assembly (clang, -O0):
<Set_Initial_Default_State_After_Power_ON>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Set_DataBus_to_Initial_Default_State_After_Power_ON@plt>
mov    $0x0,%al
call   1050 <Set_AddressBus_to_Initial_Default_State_After_Power_ON@plt>
mov    $0x0,%al
call   1040 <Set_ControlBus_to_Initial_Default_State_After_Power_ON@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Set_Initial_Default_State_After_Power_ON>:
push   %rax
xor    %eax,%eax
call   1030 <Set_DataBus_to_Initial_Default_State_After_Power_ON@plt>
xor    %eax,%eax
call   1050 <Set_AddressBus_to_Initial_Default_State_After_Power_ON@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <Set_ControlBus_to_Initial_Default_State_After_Power_ON@plt>

LLVM IR (-O0):
define void @Set_Initial_Default_State_After_Power_ON() {
%1 = call i32 (...) @Set_DataBus_to_Initial_Default_State_After_Power_ON()
%2 = call i32 (...) @Set_AddressBus_to_Initial_Default_State_After_Power_ON()
%3 = call i32 (...) @Set_ControlBus_to_Initial_Default_State_After_Power_ON()
ret void
}

LLVM IR (-O2):
define void @Set_Initial_Default_State_After_Power_ON() {
%1 = tail call i32 (...) @Set_DataBus_to_Initial_Default_State_After_Power_ON()
%2 = tail call i32 (...) @Set_AddressBus_to_Initial_Default_State_After_Power_ON()
%3 = tail call i32 (...) @Set_ControlBus_to_Initial_Default_State_After_Power_ON()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
page52() {
  printf("You wisely wait until the instructor returns with a Blue Internal "
         "Security\n");
  printf("guard.  The guard leads you to an Internal Security self "
         "incrimination station.\n");
  return 2;
}


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

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

LLVM IR (-O0):
@.str = [76 x i8] c"You wisely wait until the instructor returns with a Blue Internal Security\0A\00"
@.str.1 = [81 x i8] c"guard. The guard leads you to an Internal Security self incrimination station.\0A\00"
define i32 @page52() {
%1 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
ret i32 2
}

LLVM IR (-O2):
@str = [75 x i8] c"You wisely wait until the instructor returns with a Blue Internal Security\00"
@str.2 = [80 x i8] c"guard. The guard leads you to an Internal Security self incrimination station.\00"
define i32 @page52() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.2, i64 0, i64 0))
ret i32 2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_secp256k1_set_one(uintptr_t);
void fiat_secp256k1_set_one(uint32_t out1[8]) {
  internal_fiat_secp256k1_set_one((uintptr_t)out1);
}


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

x86 assembly (clang, -O2):
<fiat_secp256k1_set_one>:
jmp    1030 <internal_fiat_secp256k1_set_one@plt>

LLVM IR (-O0):
define void @fiat_secp256k1_set_one(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = call i32 @internal_fiat_secp256k1_set_one(i64 %4)
ret void
}

LLVM IR (-O2):
define void @fiat_secp256k1_set_one(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = tail call i32 @internal_fiat_secp256k1_set_one(i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gettimeofday_op(int, int /*<<< orphan*/);
void stop_timer() { gettimeofday_op(2, 0); }


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

x86 assembly (clang, -O2):
<stop_timer>:
mov    $0x2,%edi
xor    %esi,%esi
jmp    1030 <gettimeofday_op@plt>

LLVM IR (-O0):
define void @stop_timer() {
%1 = call i32 @gettimeofday_op(i32 2, i32 0)
ret void
}

LLVM IR (-O2):
define void @stop_timer() {
%1 = tail call i32 @gettimeofday_op(i32 2, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ tprintf(char *, char *);
FILE *Fread(char *filename) {
  FILE *in;
  if ((in = fopen(filename, "rb")) == NULL) {
    tprintf("ERROR: The file %s could not opened to read!\n", filename);
    exit(0);
  }
  return (in);
}


x86 assembly (clang, -O0):
<Fread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1171 <Fread+0x41>
mov    -0x8(%rbp),%rsi
lea    0xe9e(%rip),%rdi
call   1030 <tprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fread>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1147 <Fread+0x17>
pop    %rbx
ret
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <tprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@.str.1 = [46 x i8] c"ERROR: The file %s could not opened to read!\0A\00"
define i32* @Fread(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @tprintf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %1
%12 = load i32*, i32** %3
ret i32* %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@.str.1 = [46 x i8] c"ERROR: The file %s could not opened to read!\0A\00"
define noalias i32* @Fread(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @tprintf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %1
ret i32* %2
}
void fd_block2hts(int block, int *head, int *track, int *sector) {
  *head = (block % (18 * 2)) / (18);
  *track = block / (18 * 2);
  *sector = block % 18 + 1;
}


x86 assembly (clang, -O0):
<fd_block2hts>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x24,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x12,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
mov    $0x24,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
mov    $0x12,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    -0x20(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_block2hts>:
movslq %edi,%r8
imul   $0x38e38e39,%r8,%rax
mov    %rax,%r11
sar    $0x23,%r11
mov    %rax,%r10
shr    $0x3f,%r10
add    %r10d,%r11d
lea    0x0(,%r11,4),%edi
lea    (%rdi,%rdi,8),%r9d
sar    $0x22,%rax
add    %r10d,%eax
add    %eax,%eax
lea    (%rax,%rax,8),%eax
neg    %eax
lea    (%r8,%rax,1),%r10d
add    $0x1,%r10d
mov    %r8d,%edi
sub    %r9d,%edi
movsbl %dil,%edi
imul   $0x39,%edi,%edi
movzwl %di,%edi
movswl %di,%eax
shr    $0xf,%edi
shr    $0xa,%eax
add    %dil,%al
movsbl %al,%eax
mov    %eax,(%rsi)
mov    %r11d,(%rdx)
mov    %r10d,(%rcx)
ret

LLVM IR (-O0):
define void @fd_block2hts(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = srem i32 %9, 36
%11 = sdiv i32 %10, 18
%12 = load i32*, i32** %6
store i32 %11, i32* %12
%13 = load i32, i32* %5
%14 = sdiv i32 %13, 36
%15 = load i32*, i32** %7
store i32 %14, i32* %15
%16 = load i32, i32* %5
%17 = srem i32 %16, 18
%18 = add nsw i32 %17, 1
%19 = load i32*, i32** %8
store i32 %18, i32* %19
ret void
}

LLVM IR (-O2):
define void @fd_block2hts(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = srem i32 %0, 36
%6 = trunc i32 %5 to i8
%7 = sdiv i8 %6, 18
%8 = sext i8 %7 to i32
store i32 %8, i32* %1
%9 = sdiv i32 %0, 36
store i32 %9, i32* %2
%10 = srem i32 %0, 18
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, short);
void extractyear(short int x) { printf("year=%d \n", (x & 0x007f)); }


x86 assembly (clang, -O0):
<extractyear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
and    $0x7f,%eax
lea    0xed3(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extractyear>:
mov    %edi,%esi
and    $0x7f,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"year=%d \0A\00"
define void @extractyear(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 127
%6 = trunc i32 %5 to i16
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i16 signext %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"year=%d \0A\00"
define void @extractyear(i16 signext %0) {
%2 = and i16 %0, 127
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i16 signext %2)
ret void
}