xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ g(long double);
__attribute__((no)) f(unsigned long long ll, int sig) {
  long double d;
  if (sig)
    d = (long long)ll;
  else
    d = ll;
  g(d);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     113c <f+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
fildll -0x40(%rbp)
fstpt  -0x30(%rbp)
jmp    1161 <f+0x51>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
test   %rax,%rax
sets   %al
movzbl %al,%eax
mov    %eax,%ecx
fildll -0x38(%rbp)
lea    0xea7(%rip),%rax
flds   (%rax,%rcx,4)
faddp  %st,%st(1)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <g@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
sub    $0x28,%rsp
xor    %eax,%eax
test   %rdi,%rdi
sets   %al
mov    %rdi,0x20(%rsp)
fildll 0x20(%rsp)
mov    %rdi,0x18(%rsp)
fildll 0x18(%rsp)
lea    0xecb(%rip),%rcx
fadds  (%rcx,%rax,4)
test   %esi,%esi
fxch   %st(1)
fcmove %st(1),%st
fstp   %st(1)
fstpt  (%rsp)
call   1030 <g@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @f(i64 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
%6 = alloca x86_fp80
store i64 %0, i64* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i64, i64* %4
%11 = sitofp i64 %10 to x86_fp80
store x86_fp80 %11, x86_fp80* %6
br label %15
12: ; preds = %2
%13 = load i64, i64* %4
%14 = uitofp i64 %13 to x86_fp80
store x86_fp80 %14, x86_fp80* %6
br label %15
15: ; preds = %12, %9
%16 = load x86_fp80, x86_fp80* %6
%17 = call i32 @g(x86_fp80 %16)
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @f(i64 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = sitofp i64 %0 to x86_fp80
%5 = uitofp i64 %0 to x86_fp80
%6 = select i1 %3, x86_fp80 %5, x86_fp80 %4
%7 = tail call i32 @g(x86_fp80 %6)
ret i32 undef
}
/* Variables and functions */
int const rand();
int random_int(const int min, const int max) {
  return (rand() % (max + 1 - min)) + min;
}


x86 assembly (clang, -O0):
<random_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @random_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = srem i32 %5, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @random_int(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
void gtk_file_chooser_dialog_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_dialog_new() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(scalar_t__ *);
void EMACHashFilterGet(uint32_t ui32Base, uint32_t *pui32HashHi,
                       uint32_t *pui32HashLo) {
  ASSERT(pui32HashHi);
  ASSERT(pui32HashLo);
  *pui32HashLo = (*((volatile uint32_t *)(ui32Base + 0x0000000C)));
  *pui32HashHi = (*((volatile uint32_t *)(ui32Base + 0x00000008)));
}


x86 assembly (clang, -O0):
<EMACHashFilterGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ASSERT@plt>
mov    -0x18(%rbp),%rdi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACHashFilterGet>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <ASSERT@plt>
mov    %r15,%rdi
call   1030 <ASSERT@plt>
mov    0xc(%rbx),%rax
mov    %rax,(%r15)
mov    0x8(%rbx),%rax
mov    %rax,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @EMACHashFilterGet(i64 %0, i64* %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64*
store i64 %0, i64* %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i64*, i64** %5
%8 = call i32 @ASSERT(i64* %7)
%9 = load i64*, i64** %6
%10 = call i32 @ASSERT(i64* %9)
%11 = load i64, i64* %4
%12 = add nsw i64 %11, 12
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = load i64*, i64** %6
store i64 %14, i64* %15
%16 = load i64, i64* %4
%17 = add nsw i64 %16, 8
%18 = inttoptr i64 %17 to i64*
%19 = load volatile i64, i64* %18
%20 = load i64*, i64** %5
store i64 %19, i64* %20
ret void
}

LLVM IR (-O2):
define void @EMACHashFilterGet(i64 %0, i64* %1, i64* %2) {
%4 = tail call i32 @ASSERT(i64* %1)
%5 = tail call i32 @ASSERT(i64* %2)
%6 = add nsw i64 %0, 12
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
store i64 %8, i64* %2
%9 = add nsw i64 %0, 8
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
store i64 %11, i64* %1
ret void
}
/* Variables and functions */
char *strchr(char const *, char);
int isValidEmail(const char *email) {
  char *tokenPosition = 0;
  tokenPosition = strchr(email, '@');
  return (tokenPosition != NULL);
}


x86 assembly (clang, -O0):
<isValidEmail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x40,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidEmail>:
push   %rax
mov    $0x40,%esi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isValidEmail(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 64)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @isValidEmail(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 64)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int yahoo_M1ObfuscatedTableCommon(int, int, unsigned char *);
int yahoo_f01_5f(int Salt, int Parameter) {
  static unsigned char LUT[32] = {
      0x1F, 0x0F, 0x19, 0x07, 0x18, 0x05, 0x1E, 0x1D, 0x15, 0x08, 0x17,
      0x10, 0x0A, 0x0E, 0x0C, 0x1B, 0x02, 0x13, 0x03, 0x0D, 0x04, 0x1A,
      0x06, 0x09, 0x12, 0x1C, 0x0B, 0x16, 0x14, 0x01, 0x11, 0x00,
  };
  return yahoo_M1ObfuscatedTableCommon(Salt, Parameter, LUT);
}


x86 assembly (clang, -O0):
<yahoo_f01_5f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0x2f05(%rip),%rdx
call   1030 <yahoo_M1ObfuscatedTableCommon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_5f>:
lea    0x2f19(%rip),%rdx
jmp    1030 <yahoo_M1ObfuscatedTableCommon@plt>

LLVM IR (-O0):
@yahoo_f01_5f.LUT = internal global [32 x i8] c"\1F\0F\19\07\18\05\1E\1D\15\08\17\10\0A\0E\0C\1B\02\13\03\0D\04\1A\06\09\12\1C\0B\16\14\01\11\00"
define i32 @yahoo_f01_5f(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 @yahoo_M1ObfuscatedTableCommon(i32 %5, i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_5f.LUT, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@yahoo_f01_5f.LUT = internal global [32 x i8] c"\1F\0F\19\07\18\05\1E\1D\15\08\17\10\0A\0E\0C\1B\02\13\03\0D\04\1A\06\09\12\1C\0B\16\14\01\11\00"
define i32 @yahoo_f01_5f(i32 %0, i32 %1) {
%3 = tail call i32 @yahoo_M1ObfuscatedTableCommon(i32 %0, i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_5f.LUT, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void fail(const char *errmsg) {
  perror(errmsg);
  exit(1);
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fail>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @fail(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int stat(path, buf)
char *path;
struct stat *buf;
{
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
ret i32 0
}
void epsf_fn_adj(char *p) {
  char c;
  while ((c = *p) != '\0') {
    if (c == ' ')
      *p = '_';
    else if (c == '/' || (unsigned)c >= 127)
      *p = '.';
    p++;
  }
}


x86 assembly (clang, -O0):
<epsf_fn_adj>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     116d <epsf_fn_adj+0x6d>
movsbl -0x9(%rbp),%eax
cmp    $0x20,%eax
jne    1136 <epsf_fn_adj+0x36>
mov    -0x8(%rbp),%rax
movb   $0x5f,(%rax)
jmp    115c <epsf_fn_adj+0x5c>
movsbl -0x9(%rbp),%eax
cmp    $0x2f,%eax
je     1150 <epsf_fn_adj+0x50>
movsbl -0x9(%rbp),%eax
cmp    $0x7f,%eax
jb     1157 <epsf_fn_adj+0x57>
mov    -0x8(%rbp),%rax
movb   $0x2e,(%rax)
jmp    115c <epsf_fn_adj+0x5c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <epsf_fn_adj+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<epsf_fn_adj>:
jmp    1116 <epsf_fn_adj+0x16>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %al,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%ecx
mov    $0x5f,%al
cmp    $0x20,%cl
je     1110 <epsf_fn_adj+0x10>
test   %cl,%cl
je     1132 <epsf_fn_adj+0x32>
mov    $0x2e,%al
cmp    $0x2f,%cl
je     1110 <epsf_fn_adj+0x10>
cmp    $0x7f,%cl
jb     1112 <epsf_fn_adj+0x12>
jmp    1110 <epsf_fn_adj+0x10>
ret

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

LLVM IR (-O2):
define void @epsf_fn_adj(i8* nocapture %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %12, %11 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %13
i8 32, label %9
]
5: ; preds = %2
%6 = icmp eq i8 %4, 47
%7 = icmp ugt i8 %4, 126
%8 = or i1 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %5, %2
%10 = phi i8 [ 95, %2 ], [ 46, %5 ]
store i8 %10, i8* %3
br label %11
11: ; preds = %9, %5
%12 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
13: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(char *progname) {
  fprintf(stderr, "Usage: %s <source file> <index file>\n", progname);
  exit(1);
}


x86 assembly (clang, -O0):
<print_usage>:
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    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s <source file> <index file>\0A\00"
define void @print_usage(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 ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s <source file> <index file>\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void dec2hex(int i) { printf("%X \n", i); }


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

x86 assembly (clang, -O2):
<dec2hex>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%X \0A\00"
define void @dec2hex(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int ng_getstat(char *outputreturn, int ident, void *userdata) {
  printf("%s\n", outputreturn);
  return 0;
}


x86 assembly (clang, -O0):
<ng_getstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @ng_getstat(i8* %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Type definitions */
struct iovec {
  char *iov_base;
  int iov_len;
};
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int pwritev(int, struct iovec *, int, int /*<<< orphan*/);
int main(void) {
  struct iovec iov;
  char buffer[] = "hello world\n";
  iov.iov_base = buffer;
  iov.iov_len = sizeof(buffer);
  return pwritev(1, &iov, 1, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x25(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x1d(%rbp)
mov    0xed3(%rip),%al
mov    %al,-0x19(%rbp)
lea    -0x25(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0xd,-0x10(%rbp)
mov    $0x1,%edx
lea    -0x18(%rbp),%rsi
xor    %ecx,%ecx
mov    %edx,%edi
call   1030 <pwritev@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movabs $0xa646c726f7720,%rax
mov    %rax,0xd(%rsp)
movabs $0x6f77206f6c6c6568,%rax
20 77 6f
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rax
mov    %rax,0x18(%rsp)
movl   $0xd,0x20(%rsp)
lea    0x18(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <pwritev@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.iovec = type { i8*, i32 }
@__const.main.buffer = [13 x i8] c"hello world\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.iovec
%3 = alloca [13 x i8]
store i32 0, i32* %1
%4 = bitcast [13 x i8]* %3 to i8*
%5 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds %struct.iovec, %struct.iovec* %2, i32 0, i32 0
store i8* %5, i8** %6
%7 = getelementptr inbounds %struct.iovec, %struct.iovec* %2, i32 0, i32 1
store i32 13, i32* %7
%8 = call i32 @pwritev(i32 1, %struct.iovec* %2, i32 1, i32 0)
ret i32 %8
}

LLVM IR (-O2):
%struct.iovec = type { i8*, i32 }
@__const.main.buffer = [13 x i8] c"hello world\0A\00"
define i32 @main() {
%1 = alloca %struct.iovec
%2 = alloca [13 x i8]
%3 = bitcast %struct.iovec* %1 to i8*
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds %struct.iovec, %struct.iovec* %1, i64 0, i32 0
store i8* %4, i8** %5
%6 = getelementptr inbounds %struct.iovec, %struct.iovec* %1, i64 0, i32 1
store i32 13, i32* %6
%7 = call i32 @pwritev(i32 1, %struct.iovec* %1, i32 1, i32 0)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x99() {
  Assert_real((iscntrl(153) == 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_iscntrl.c",
              770, ("iscntrl should be 0 for 0x99"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x99>:
push   %rax
mov    $0x99,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x302,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x99\00"
define void @t_iscntrl_0x99() {
%1 = call i64 @iscntrl(i32 153)
%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 770, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x99\00"
define void @t_iscntrl_0x99() {
%1 = tail call i64 @iscntrl(i32 153)
%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 770, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void _sedgesort_double(array, len) register double array[];
register int len;
{
  partial_quickersort_double(array, 0, len - 1);
  insort_double(array, len);
}


x86 assembly (clang, -O0):
<_sedgesort_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
mov    $0x0,%al
call   1040 <partial_quickersort_double@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <insort_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sedgesort_double>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%rbx
lea    -0x1(%r14),%edx
xor    %esi,%esi
xor    %eax,%eax
call   1040 <partial_quickersort_double@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <insort_double@plt>

LLVM IR (-O0):
define void @_sedgesort_double(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @partial_quickersort_double to i32 (double*, i32, i32, ...)*)(double* %5, i32 0, i32 %7)
%9 = load double*, double** %3
%10 = load i32, i32* %4
%11 = call i32 (double*, i32, ...) bitcast (i32 (...)* @insort_double to i32 (double*, i32, ...)*)(double* %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @_sedgesort_double(double* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @partial_quickersort_double to i32 (double*, i32, i32, ...)*)(double* %0, i32 0, i32 %3)
%5 = tail call i32 (double*, i32, ...) bitcast (i32 (...)* @insort_double to i32 (double*, i32, ...)*)(double* %0, i32 %1)
ret void
}
long long int potega(int n, int k) {
  if (k == 1) {
    return 1;
  } else {
    return n * potega(n, k - 1);
  }
}


x86 assembly (clang, -O0):
<potega>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    1135 <potega+0x25>
movq   $0x1,-0x8(%rbp)
jmp    115a <potega+0x4a>
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
sub    $0x1,%esi
call   1030 <potega@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
imul   %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<potega>:
mov    $0x1,%eax
cmp    $0x1,%esi
je     1169 <potega+0x69>
movslq %edi,%rcx
lea    -0x1(%rsi),%edi
add    $0xfffffffe,%esi
mov    %edi,%edx
and    $0x7,%edx
cmp    $0x7,%esi
jae    1124 <potega+0x24>
mov    $0x1,%eax
jmp    1155 <potega+0x55>
and    $0xfffffff8,%edi
mov    $0x1,%eax
nopl   0x0(%rax)
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
add    $0xfffffff8,%edi
jne    1130 <potega+0x30>
test   %edx,%edx
je     1169 <potega+0x69>
nopl   0x0(%rax)
imul   %rcx,%rax
add    $0xffffffff,%edx
jne    1160 <potega+0x60>
ret

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

LLVM IR (-O2):
define i64 @potega(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %35, label %4
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = add i32 %1, -1
%7 = add i32 %1, -2
%8 = and i32 %6, 7
%9 = icmp ult i32 %7, 7
br i1 %9, label %25, label %10
10: ; preds = %4
%11 = and i32 %6, -8
br label %12
12: ; preds = %12, %10
%13 = phi i64 [ 1, %10 ], [ %22, %12 ]
%14 = phi i32 [ 0, %10 ], [ %23, %12 ]
%15 = mul nsw i64 %13, %5
%16 = mul nsw i64 %15, %5
%17 = mul nsw i64 %16, %5
%18 = mul nsw i64 %17, %5
%19 = mul nsw i64 %18, %5
%20 = mul nsw i64 %19, %5
%21 = mul nsw i64 %20, %5
%22 = mul nsw i64 %21, %5
%23 = add i32 %14, 8
%24 = icmp eq i32 %23, %11
br i1 %24, label %25, label %12
25: ; preds = %12, %4
%26 = phi i64 [ undef, %4 ], [ %22, %12 ]
%27 = phi i64 [ 1, %4 ], [ %22, %12 ]
%28 = icmp eq i32 %8, 0
br i1 %28, label %35, label %29
29: ; preds = %25, %29
%30 = phi i64 [ %32, %29 ], [ %27, %25 ]
%31 = phi i32 [ %33, %29 ], [ 0, %25 ]
%32 = mul nsw i64 %30, %5
%33 = add i32 %31, 1
%34 = icmp eq i32 %33, %8
br i1 %34, label %35, label %29
35: ; preds = %25, %29, %2
%36 = phi i64 [ 1, %2 ], [ %26, %25 ], [ %32, %29 ]
ret i64 %36
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
int main() {
  foo(7, 2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
mov    $0x2,%esi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 7, i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 7, i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sfree(void **);
void da_trash(int *cur, int *max, void ***array) {
  if (*max && *array) {
    sfree(*array);
  }
  *array = NULL;
  *cur = 0;
  *max = 0;
  return;
}


x86 assembly (clang, -O0):
<da_trash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     114b <da_trash+0x3b>
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     114b <da_trash+0x3b>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <sfree@plt>
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<da_trash>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
cmpl   $0x0,(%rsi)
je     1130 <da_trash+0x20>
mov    (%r14),%rdi
test   %rdi,%rdi
je     1130 <da_trash+0x20>
call   1030 <sfree@plt>
movq   $0x0,(%r14)
movl   $0x0,(%r15)
movl   $0x0,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @da_trash(i32* nocapture writeonly %0, i32* nocapture %1, i8*** nocapture %2) {
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = load i8**, i8*** %2
%8 = icmp eq i8** %7, null
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @sfree(i8** %7)
br label %11
11: ; preds = %9, %6, %3
store i8** null, i8*** %2
store i32 0, i32* %0
store i32 0, i32* %1
ret void
}
void foo() {
  void bar();
  static int funclocal = 3;
  static int funclocal_bss;
  static const int funclocal_ro = 203;
  static const int funclocal_ro_bss;
  funclocal_bss = 103;
  bar();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x67,0x2f12(%rip)
mov    $0x0,%al
call   1030 <bar@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@foo.funclocal = internal global i32 3
@foo.funclocal_bss = internal global i32 0
@foo.funclocal_ro = internal constant i32 203
@foo.funclocal_ro_bss = internal constant i32 0
define void @foo() {
store i32 103, i32* @foo.funclocal_bss
ret void
}

LLVM IR (-O2):
define void @foo() {
tail call void (...) @bar()
ret void
}
int test_19(signed char x, int y, int z) { return (x << 1) & 0x0F ? y : z; }


x86 assembly (clang, -O0):
<test_19>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsbl -0x1(%rbp),%eax
shl    $0x1,%eax
and    $0xf,%eax
cmp    $0x0,%eax
je     112e <test_19+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <test_19+0x34>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_19>:
mov    %esi,%eax
test   $0x7,%dil
cmove  %edx,%eax
ret

LLVM IR (-O0):
define i32 @test_19(i8 signext %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 = sext i8 %7 to i32
%9 = shl i32 %8, 1
%10 = and i32 %9, 15
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load i32, i32* %5
br label %16
14: ; preds = %3
%15 = load i32, i32* %6
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @test_19(i8 signext %0, i32 %1, i32 %2) {
%4 = and i8 %0, 7
%5 = icmp eq i8 %4, 0
%6 = select i1 %5, i32 %2, i32 %1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i;
  int j;
  int z;
  {
    if (i == j) {
      z = 5;
    }
  }
  assert(z == 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1132 <main+0x22>
movl   $0x5,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 5, i32* %4
br label %9
9: ; preds = %8, %0
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 5
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int dep3();
int dep4(void) { return dep3(); }


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

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

LLVM IR (-O0):
define i32 @dep4() {
%1 = call i32 (...) @dep3()
ret i32 %1
}

LLVM IR (-O2):
define i32 @dep4() {
%1 = tail call i32 (...) @dep3()
ret i32 %1
}
/* Type definitions */
struct stack_st_OPENSSL_BLOCK {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
scalar_t__ OPENSSL_sk_delete(int /*<<< orphan*/ *, int);
void *sk_OPENSSL_BLOCK_delete(struct stack_st_OPENSSL_BLOCK *sk, int i) {
  return (void *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);
}


x86 assembly (clang, -O0):
<sk_OPENSSL_BLOCK_delete>:
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 <OPENSSL_sk_delete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sk_OPENSSL_BLOCK_delete>:
jmp    1030 <OPENSSL_sk_delete@plt>

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

LLVM IR (-O2):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i8* @sk_OPENSSL_BLOCK_delete(%struct.stack_st_OPENSSL_BLOCK* %0, i32 %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_BLOCK, %struct.stack_st_OPENSSL_BLOCK* %0, i64 0, i32 0
%4 = tail call i64 @OPENSSL_sk_delete(i32* %3, i32 %1)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
double dsfmt_gv_genrand_close1_open2();
double genrand_close1_open2(void) { return dsfmt_gv_genrand_close1_open2(); }


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

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

LLVM IR (-O0):
define double @genrand_close1_open2() {
%1 = call double (...) @dsfmt_gv_genrand_close1_open2()
ret double %1
}

LLVM IR (-O2):
define double @genrand_close1_open2() {
%1 = tail call double (...) @dsfmt_gv_genrand_close1_open2()
ret double %1
}
/* Variables and functions */
void *_stp_shm_alloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *_stp_shm_zalloc(size_t size) {
  void *ptr = _stp_shm_alloc(size);
  if (ptr)
    memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<_stp_shm_zalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_stp_shm_alloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <_stp_shm_zalloc+0x33>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stp_shm_zalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <_stp_shm_alloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <_stp_shm_zalloc+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @_stp_shm_zalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @_stp_shm_alloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i64, i64* %2
%11 = call i32 @memset(i8* %9, i32 0, i64 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @_stp_shm_zalloc(i64 %0) {
%2 = tail call i8* @_stp_shm_alloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __getppid(void) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__getppid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getppid>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__getppid() {
%1 = load i32, i32* @ENOSYS
%2 = call i32 @__set_errno(i32 %1)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getppid() {
%1 = load i32, i32* @ENOSYS
%2 = tail call i32 @__set_errno(i32 %1)
ret i32 -1
}
int is_leap_year(int tm_year) {
  int leap_year = 0;
  if ((tm_year % 4) == 0)
    leap_year = 1;
  if ((tm_year % 100) == 0)
    leap_year = 0;
  if ((tm_year % 400) == 100)
    leap_year = 1;
  return leap_year;
}


x86 assembly (clang, -O0):
<is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1129 <is_leap_year+0x29>
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1144 <is_leap_year+0x44>
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x64,%edx
jne    115f <is_leap_year+0x5f>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap_year>:
test   $0x3,%dil
sete   %al
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
ror    $0x2,%ecx
cmp    $0x28f5c29,%ecx
setae  %cl
and    %al,%cl
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x27,%rdx
add    %esi,%edx
imul   $0x190,%edx,%edx
sub    %edx,%eax
cmp    $0x64,%eax
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_leap_year(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = srem i32 %4, 4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %3
br label %8
8: ; preds = %7, %1
%9 = load i32, i32* %2
%10 = srem i32 %9, 100
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 0, i32* %3
br label %13
13: ; preds = %12, %8
%14 = load i32, i32* %2
%15 = srem i32 %14, 400
%16 = icmp eq i32 %15, 100
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %3
br label %18
18: ; preds = %17, %13
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @is_leap_year(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp ne i32 %4, 0
%6 = and i1 %5, %3
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 100
%9 = or i1 %8, %6
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ ushort;

/* Variables and functions */
ushort __VERIFIER_nondet_ushort() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__VERIFIER_nondet_ushort() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show() {
  printf("0:   0   1   2\n");
  printf("\n");
  printf("1:   3   4   5\n");
  printf("\n");
  printf("2:   6   7   8\n");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<show>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@str = [15 x i8] c"0: 0 1 2\00"
@str.4 = [15 x i8] c"1: 3 4 5\00"
@str.5 = [15 x i8] c"2: 6 7 8\00"
define void @show() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t get_uint32(uint8_t *buf) {
  uint32_t res;
  res = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3];
  return res;
}


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

x86 assembly (clang, -O2):
<get_uint32>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_uint32(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = shl i32 %6, 24
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = shl i32 %10, 16
%12 = or i32 %7, %11
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
%16 = shl i32 %15, 8
%17 = or i32 %12, %16
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 3
%20 = load i32, i32* %19
%21 = or i32 %17, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @get_uint32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = or i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void wave_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @wave_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
double remainder(double, double);
double c_remainder(double arg0, double arg1) { return remainder(arg0, arg1); }


x86 assembly (clang, -O0):
<c_remainder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <remainder@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_remainder>:
jmp    1030 <remainder@plt>

LLVM IR (-O0):
define double @c_remainder(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @remainder(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @c_remainder(double %0, double %1) {
%3 = tail call double @remainder(double %0, double %1)
ret double %3
}
char upcase(char c) {
  if (c >= 'a' && c <= 'z')
    c += 'A' - 'a';
  return c;
}


x86 assembly (clang, -O0):
<upcase>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     112e <upcase+0x2e>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     112e <upcase+0x2e>
movsbl -0x1(%rbp),%eax
add    $0xffffffe0,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

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