xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr,
          "Usage: %s [-z zoom] [-m metadata-bits] -o destdir [file ...]\n",
          name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: %s [-z zoom] [-m metadata-bits] -o destdir [file ...]\0A\00"
define void @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 ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: %s [-z zoom] [-m metadata-bits] -o destdir [file ...]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char const *);
int /*<<< orphan*/ terminal_handle_newline();
void println(const char *data) {
  print(data);
  terminal_handle_newline();
}


x86 assembly (clang, -O0):
<println>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <print@plt>
mov    $0x0,%al
call   1040 <terminal_handle_newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<println>:
push   %rax
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <terminal_handle_newline@plt>

LLVM IR (-O0):
define void @println(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print(i8* %3)
%5 = call i32 (...) @terminal_handle_newline()
ret void
}

LLVM IR (-O2):
define void @println(i8* %0) {
%2 = tail call i32 @print(i8* %0)
%3 = tail call i32 (...) @terminal_handle_newline()
ret void
}
void yy_2_ValidXmlAttribute(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_2_ValidXmlAttribute(i8* nocapture %0, i32 %1) {
ret void
}
void ignore() { ; }


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

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

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

LLVM IR (-O2):
define void @ignore() {
ret void
}
void g_byte_array_prepend() {}


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

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

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

LLVM IR (-O2):
define void @g_byte_array_prepend() {
ret void
}
/* Variables and functions */
double cos(double);
double sin(double);
double arc_val(double t, double *arc) {
  return (arc[0] * cos(t) + arc[1] * sin(t) + arc[2]);
}


x86 assembly (clang, -O0):
<arc_val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
addsd  0x10(%rax),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arc_val>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
movaps %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
movsd  %xmm0,0x18(%rsp)
movaps %xmm1,%xmm0
call   1040 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  %xmm1,%xmm0
addsd  0x10(%rbx),%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @arc_val(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double, double* %3
%9 = call double @cos(double %8)
%10 = load double*, double** %4
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = load double, double* %3
%14 = call double @sin(double %13)
%15 = fmul double %12, %14
%16 = call double @llvm.fmuladd.f64(double %7, double %9, double %15)
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = fadd double %16, %19
ret double %20
}

LLVM IR (-O2):
define double @arc_val(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = tail call double @cos(double %0)
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = tail call double @sin(double %0)
%8 = fmul double %6, %7
%9 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %8)
%10 = getelementptr inbounds double, double* %1, i64 2
%11 = load double, double* %10
%12 = fadd double %11, %9
ret double %12
}
long long int llabs(long long int num) {
  if (num < 0)
    return -num;
  return num;
}


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1122 <llabs+0x22>
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <llabs+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llabs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @llabs(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %3
%8 = sub nsw i64 0, %7
store i64 %8, i64* %2
br label %11
9: ; preds = %1
%10 = load i64, i64* %3
store i64 %10, i64* %2
br label %11
11: ; preds = %9, %6
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t lp_read_u32_lep(void **p) {
  uint8_t *s = (uint8_t *)*p;
  uint32_t v = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24;
  *p = s + 4;
  return v;
}


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

x86 assembly (clang, -O2):
<lp_read_u32_lep>:
mov    (%rdi),%rcx
mov    0x4(%rcx),%edx
shl    $0x8,%edx
or     (%rcx),%edx
mov    0x8(%rcx),%esi
shl    $0x10,%esi
mov    0xc(%rcx),%eax
shl    $0x18,%eax
or     %esi,%eax
or     %edx,%eax
add    $0x10,%rcx
mov    %rcx,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @lp_read_u32_lep(i8** nocapture %0) {
%2 = bitcast i8** %0 to i32**
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %3, i64 1
%6 = load i32, i32* %5
%7 = shl i32 %6, 8
%8 = or i32 %7, %4
%9 = getelementptr inbounds i32, i32* %3, i64 2
%10 = load i32, i32* %9
%11 = shl i32 %10, 16
%12 = or i32 %8, %11
%13 = getelementptr inbounds i32, i32* %3, i64 3
%14 = load i32, i32* %13
%15 = shl i32 %14, 24
%16 = or i32 %12, %15
%17 = getelementptr inbounds i32, i32* %3, i64 4
store i32* %17, i32** %2
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close_led_brightness_file(int fd) { close(fd); }


x86 assembly (clang, -O0):
<close_led_brightness_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_led_brightness_file>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @close_led_brightness_file(i32 %0) {
%2 = tail call i32 @close(i32 %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*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long get_size(FILE *file) {
  long pos = ftell(file);
  long size;
  fseek(file, 0L, SEEK_END);
  size = ftell(file);
  fseek(file, pos, SEEK_SET);
  return size;
}


x86 assembly (clang, -O0):
<get_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_size>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @get_size(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
int FixedWToY(int v) { return v; }


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

x86 assembly (clang, -O2):
<FixedWToY>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @FixedWToY(i32 returned %0) {
ret i32 %0
}
int test_imm_58uint16_mem(unsigned short *val) {
  return ((*val) & (0x58 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_58uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x58,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_58uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 88
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
long time(p)
long *p;
{
  long l = _xtime();
  if (p)
    *p = l;
  return l;
}


x86 assembly (clang, -O0):
<time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <_xtime@plt>
cltq
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113f <time+0x2f>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <_xtime@plt>
cltq
test   %rbx,%rbx
je     1125 <time+0x15>
mov    %rax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @time(i64* writeonly %0) {
%2 = tail call i32 (...) @_xtime()
%3 = sext i32 %2 to i64
%4 = icmp eq i64* %0, null
br i1 %4, label %6, label %5
5: ; preds = %1
store i64 %3, i64* %0
br label %6
6: ; preds = %5, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xd0() {
  Assert_real((isgraph(208) == 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_isgraph.c",
              1045, ("isgraph should be 0 for 0xd0"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xd0>:
push   %rax
mov    $0xd0,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x415,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xd0\00"
define void @t_isgraph_0xd0() {
%1 = call i64 @isgraph(i32 208)
%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 1045, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xd0\00"
define void @t_isgraph_0xd0() {
%1 = tail call i64 @isgraph(i32 208)
%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 1045, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int FoF_FindFather(int *grp, int Id) {
  while (Id != grp[Id])
    Id = grp[Id];
  return Id;
}


x86 assembly (clang, -O0):
<FoF_FindFather>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     1132 <FoF_FindFather+0x32>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
jmp    110b <FoF_FindFather+0xb>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FoF_FindFather>:
mov    %esi,%eax
movslq %esi,%rcx
mov    (%rdi,%rcx,4),%esi
cmp    %esi,%ecx
jne    1100 <FoF_FindFather>
ret

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

LLVM IR (-O2):
define i32 @FoF_FindFather(i32* nocapture %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %7, %3 ]
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = icmp eq i32 %4, %7
br i1 %8, label %9, label %3
9: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int rand_int(int const);
int rand_sign();
int rand_signint(const int range) { return rand_int(range) * rand_sign(); }


x86 assembly (clang, -O0):
<rand_signint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <rand_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <rand_sign@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_signint>:
push   %rbx
call   1030 <rand_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <rand_sign@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_signint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rand_int(i32 %3)
%5 = call i32 (...) @rand_sign()
%6 = mul nsw i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @rand_signint(i32 %0) {
%2 = tail call i32 @rand_int(i32 %0)
%3 = tail call i32 (...) @rand_sign()
%4 = mul nsw i32 %3, %2
ret i32 %4
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
double PW(double a, double b) {
  int32_t t = (*(1 + (int32_t *)&a)),
          u = (int32_t)(b * (t - 1072632447) + 1072632447);
  double p = 0;
  *(1 + (int32_t *)&p) = u;
  return p;
}


x86 assembly (clang, -O0):
<PW>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%eax
sub    $0x3fef127f,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecf(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<PW>:
movq   %xmm0,%rax
shr    $0x20,%rax
add    $0xc010ed81,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm1,%xmm0
addsd  0xedf(%rip),%xmm0
cvttsd2si %xmm0,%eax
shl    $0x20,%rax
movq   %rax,%xmm0
ret

LLVM IR (-O0):
define double @PW(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = bitcast double* %3 to i32*
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
store i32 %10, i32* %5
%11 = load double, double* %4
%12 = load i32, i32* %5
%13 = sub nsw i32 %12, 1072632447
%14 = sitofp i32 %13 to double
%15 = call double @llvm.fmuladd.f64(double %11, double %14, double 0x41CFF7893F800000)
%16 = fptosi double %15 to i32
store i32 %16, i32* %6
store double 0.000000e+00, double* %7
%17 = load i32, i32* %6
%18 = bitcast double* %7 to i32*
%19 = getelementptr inbounds i32, i32* %18, i64 1
store i32 %17, i32* %19
%20 = load double, double* %7
ret double %20
}

LLVM IR (-O2):
define double @PW(double %0, double %1) {
%3 = bitcast double %0 to i64
%4 = lshr i64 %3, 32
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %5, -1072632447
%7 = sitofp i32 %6 to double
%8 = tail call double @llvm.fmuladd.f64(double %1, double %7, double 0x41CFF7893F800000)
%9 = fptosi double %8 to i32
%10 = zext i32 %9 to i64
%11 = shl nuw i64 %10, 32
%12 = bitcast i64 %11 to double
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEnop(int /*<<< orphan*/ *);
void code_nop() { appendCODE(makeCODEnop(NULL)); }


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

x86 assembly (clang, -O2):
<code_nop>:
push   %rax
xor    %edi,%edi
call   1030 <makeCODEnop@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <appendCODE@plt>

LLVM IR (-O0):
define void @code_nop() {
%1 = call i32 @makeCODEnop(i32* null)
%2 = call i32 @appendCODE(i32 %1)
ret void
}

LLVM IR (-O2):
define void @code_nop() {
%1 = tail call i32 @makeCODEnop(i32* null)
%2 = tail call i32 @appendCODE(i32 %1)
ret void
}
int main() {
  const char *null = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dmeanpn(int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dmeanpn(N, x, stride);
  printf("mean: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%edx
call   1050 <stdlib_strided_dmeanpn@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_dmeanpn@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [11 x i8] c"mean: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dmeanpn(i32 %6, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [11 x i8] c"mean: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dmeanpn(i32 4, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
const char *dsfmt_get_idstring(void) {
  return "dSFMT2-19937:117-19:ffafffffffb3f-ffdfffc90fffd";
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"dSFMT2-19937:117-19:ffafffffffb3f-ffdfffc90fffd\00"
define i8* @dsfmt_get_idstring() {
ret i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [48 x i8] c"dSFMT2-19937:117-19:ffafffffffb3f-ffdfffc90fffd\00"
define i8* @dsfmt_get_idstring() {
ret i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct i8x_readbuf {
  int dummy;
};
struct i8x_object {
  int dummy;
};

/* Variables and functions */
void *i8x_ob_get_userdata(struct i8x_object *);
void *__attribute__((always_)) i8x_rb_get_userdata(struct i8x_readbuf *x) {
  return i8x_ob_get_userdata((struct i8x_object *)x);
}


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

x86 assembly (clang, -O2):
<i8x_rb_get_userdata>:
jmp    1030 <i8x_ob_get_userdata@plt>

LLVM IR (-O0):
%struct.i8x_readbuf = type { i32 }
%struct.i8x_object = type { i32 }
define i8* @i8x_rb_get_userdata(%struct.i8x_readbuf* %0) {
%2 = alloca %struct.i8x_readbuf*
store %struct.i8x_readbuf* %0, %struct.i8x_readbuf** %2
%3 = load %struct.i8x_readbuf*, %struct.i8x_readbuf** %2
%4 = bitcast %struct.i8x_readbuf* %3 to %struct.i8x_object*
%5 = call i8* @i8x_ob_get_userdata(%struct.i8x_object* %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.i8x_readbuf = type { i32 }
%struct.i8x_object = type { i32 }
define i8* @i8x_rb_get_userdata(%struct.i8x_readbuf* %0) {
%2 = bitcast %struct.i8x_readbuf* %0 to %struct.i8x_object*
%3 = tail call i8* @i8x_ob_get_userdata(%struct.i8x_object* %2)
ret i8* %3
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ putchar(int);
int main() {
  int c;
  while (c != EOF) {
    c = getchar();
    putchar(c);
    printf("\nEOF:%3d\n", c != EOF);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%eax
je     1188 <main+0x58>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
mov    0x2e7b(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    0x2ead(%rip),%rbx
lea    0xebe(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %esi,%esi
cmp    (%rbx),%ebp
setne  %sil
mov    %r14,%rdi
call   1040 <printf@plt>
cmp    (%rbx),%ebp
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [10 x i8] c"\0AEOF:%3d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 @putchar(i32 %2)
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %2, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %2, %8
br i1 %9, label %10, label %1
10: ; preds = %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ beval;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/ *);
int /*<<< orphan*/ htobe64(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void knot_wire_write_u64(uint8_t *pos, uint64_t data) {
  assert(pos);
  uint64_t beval = htobe64(data);
  memcpy(pos, &beval, sizeof(beval));
}


x86 assembly (clang, -O0):
<knot_wire_write_u64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0xc(%rbp),%edi
call   1050 <htobe64@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<knot_wire_write_u64>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %ebp,%edi
call   1050 <htobe64@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @knot_wire_write_u64(i32* %0, i32 %1) {
%3 = alloca i32
%4 = tail call i32 @assert(i32* %0)
%5 = bitcast i32* %3 to i8*
%6 = tail call i32 @htobe64(i32 %1)
store i32 %6, i32* %3
%7 = call i32 @memcpy(i32* %0, i32* %3, i32 4)
ret void
}
void f(int x, int y, int *z) {
  if (x > 0) {
    f(x - 1, y, z);
    *z = x + y;
  } else
    *z = y;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    114f <f+0x3f>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <f@plt>
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1158 <f+0x48>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
test   %edi,%edi
jle    112e <f+0x1e>
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <f@plt>
add    %ebx,%ebp
mov    %ebp,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @f(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = add nsw i32 %0, -1
tail call void @f(i32 %6, i32 %1, i32* %2)
%7 = add nsw i32 %1, %0
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ %7, %5 ], [ %1, %3 ]
store i32 %9, i32* %2
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(scalar_t__ *);
scalar_t__ time(int /*<<< orphan*/);
struct tm getTimeAfter(int seconds) {
  time_t now = time(0) + seconds;
  return *localtime(&now);
}


x86 assembly (clang, -O0):
<getTimeAfter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTimeAfter>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
xor    %edi,%edi
call   1040 <time@plt>
movslq %ebx,%rcx
add    %rax,%rcx
mov    %rcx,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @getTimeAfter(i32 %0) {
%2 = alloca %struct.tm
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
%5 = call i64 @time(i32 0)
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = add nsw i64 %5, %7
store i64 %8, i64* %4
%9 = call %struct.tm* @localtime(i64* %4)
%10 = bitcast %struct.tm* %2 to i8*
%11 = bitcast %struct.tm* %9 to i8*
%12 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
%13 = load i32, i32* %12
ret i32 %13
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @getTimeAfter(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = tail call i64 @time(i32 0)
%5 = sext i32 %0 to i64
%6 = add nsw i64 %4, %5
store i64 %6, i64* %2
%7 = call %struct.tm* @localtime(i64* %2)
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i64 0, i32 0
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ check_vect();
int main1(int);
int main(void) {
  check_vect();
  return main1(3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <check_vect@plt>
mov    $0x3,%edi
call   1040 <main1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <check_vect@plt>
mov    $0x3,%edi
pop    %rax
jmp    1040 <main1@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @check_vect()
%2 = tail call i32 @main1(i32 3)
ret i32 %2
}
/* Variables and functions */
int bitstr_getb(void *);
int bitstr_get_bits(void *stream, int n) {
  int buf = 0;
  while (n--) {
    buf <<= 1;
    buf |= bitstr_getb(stream);
  }
  return buf;
}


x86 assembly (clang, -O0):
<bitstr_get_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1157 <bitstr_get_bits+0x47>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bitstr_getb@plt>
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <bitstr_get_bits+0x16>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitstr_get_bits>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
je     1133 <bitstr_get_bits+0x23>
mov    %esi,%ebp
mov    %rdi,%r14
xor    %ebx,%ebx
nop
add    %ebx,%ebx
mov    %r14,%rdi
call   1030 <bitstr_getb@plt>
or     %eax,%ebx
add    $0xffffffff,%ebp
jne    1120 <bitstr_get_bits+0x10>
jmp    1135 <bitstr_get_bits+0x25>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @bitstr_get_bits(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ 0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = add nsw i32 %6, -1
%8 = shl i32 %5, 1
%9 = tail call i32 @bitstr_getb(i8* %0)
%10 = or i32 %9, %8
%11 = icmp eq i32 %7, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
%13 = phi i32 [ 0, %2 ], [ %10, %4 ]
ret i32 %13
}
/* Variables and functions */
int open(char *, int);
int posix_openpt(int flags) {
  int fd = open("/dev/ptmx", flags);
  if (fd >= 0)
    return fd;
  return -1;
}


x86 assembly (clang, -O0):
<posix_openpt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1142 <posix_openpt+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1149 <posix_openpt+0x39>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_openpt>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <open@plt>
test   %eax,%eax
mov    $0xffffffff,%ecx
cmovs  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/ptmx\00"
define i32 @posix_openpt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/ptmx\00"
define i32 @posix_openpt(i32 %0) {
%2 = tail call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp sgt i32 %2, -1
%4 = select i1 %3, i32 %2, i32 -1
ret i32 %4
}
int int_to_d16(int x) { return x * (1 << 16); }


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

x86 assembly (clang, -O2):
<int_to_d16>:
mov    %edi,%eax
shl    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @int_to_d16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 65536
ret i32 %4
}

LLVM IR (-O2):
define i32 @int_to_d16(i32 %0) {
%2 = shl nsw i32 %0, 16
ret i32 %2
}
/* Variables and functions */
bool is_number(char c) { return ((c >= '0') && (c <= '9')); }


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <is_number+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_number(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, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_number(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
float max3float(float f1, float f2, float f3) {
  float temp;
  return (f1 > (temp = (f2 > f3) ? f2 : f3) ? f1 : temp);
}


x86 assembly (clang, -O0):
<max3float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    113b <max3float+0x3b>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1145 <max3float+0x45>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  %xmm1,-0x10(%rbp)
ucomiss %xmm1,%xmm0
jbe    116c <max3float+0x6c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1176 <max3float+0x76>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max3float>:
maxss  %xmm2,%xmm1
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @max3float(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = load float, float* %6
%11 = fcmp ogt float %9, %10
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load float, float* %5
br label %16
14: ; preds = %3
%15 = load float, float* %6
br label %16
16: ; preds = %14, %12
%17 = phi float [ %13, %12 ], [ %15, %14 ]
store float %17, float* %7
%18 = fcmp ogt float %8, %17
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load float, float* %4
br label %23
21: ; preds = %16
%22 = load float, float* %7
br label %23
23: ; preds = %21, %19
%24 = phi float [ %20, %19 ], [ %22, %21 ]
ret float %24
}

LLVM IR (-O2):
define float @max3float(float %0, float %1, float %2) {
%4 = fcmp ogt float %1, %2
%5 = select i1 %4, float %1, float %2
%6 = fcmp olt float %5, %0
%7 = select i1 %6, float %0, float %5
ret float %7
}
void g_key_file_get_integer() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ NID_pkcs9_emailAddress;
int set_cn(int /*<<< orphan*/ *, int /*<<< orphan*/, char const *,
           int /*<<< orphan*/);
int set_email1(X509 *crt, const char *name) {
  return set_cn(crt, NID_pkcs9_emailAddress, name, 0);
}


x86 assembly (clang, -O0):
<set_email1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <set_cn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_email1>:
mov    %rsi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
xor    %ecx,%ecx
jmp    1030 <set_cn@plt>

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

LLVM IR (-O2):
@NID_pkcs9_emailAddress = global i32 0
define i32 @set_email1(i32* %0, i8* %1) {
%3 = load i32, i32* @NID_pkcs9_emailAddress
%4 = tail call i32 @set_cn(i32* %0, i32 %3, i8* %1, i32 0)
ret i32 %4
}
int authenticate(int uid) {
  if (uid == 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<authenticate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <authenticate+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <authenticate+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @authenticate(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ SystemStatsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void SystemStatsLogging() { UAVObjLogging(SystemStatsHandle()); }


x86 assembly (clang, -O0):
<SystemStatsLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <SystemStatsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SystemStatsLogging>:
push   %rax
xor    %eax,%eax
call   1040 <SystemStatsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @SystemStatsLogging() {
%1 = call i32 (...) @SystemStatsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @SystemStatsLogging() {
%1 = tail call i32 (...) @SystemStatsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}