xunge/DecIR huggingface dataset:
void test2_multi_b(int x) {
  int buf[100][100];
  buf[-1][0] = 1;
}


x86 assembly (clang, -O0):
<test2_multi_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9bd0,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x9de0(%rbp)
add    $0x9bd0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test2_multi_b(i32 %0) {
%2 = alloca i32
%3 = alloca [100 x [100 x i32]]
store i32 %0, i32* %2
%4 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %3, i64 0, i64 -1
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
store i32 1, i32* %5
ret void
}

LLVM IR (-O2):
define void @test2_multi_b(i32 %0) {
ret void
}
int *new_integer_ptr() {
  int *newInt = 23;
  return newInt;
}


x86 assembly (clang, -O0):
<new_integer_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32* @new_integer_ptr() {
%1 = alloca i32*
store i32* inttoptr (i64 23 to i32*), i32** %1
%2 = load i32*, i32** %1
ret i32* %2
}

LLVM IR (-O2):
define i32* @new_integer_ptr() {
ret i32* inttoptr (i64 23 to i32*)
}
/* Variables and functions */
int /*<<< orphan*/ MPE_Log_ApplyTimeCorrection(double, double);
int /*<<< orphan*/ MPE_Log_FindSkew(double *, double *);
void MPE_Log_adjtime2() {
  double sk, goff;
  sk = 1.0;
  goff = 0.0;
  if (!MPE_Log_FindSkew(&sk, &goff))
    return;
  MPE_Log_ApplyTimeCorrection(sk, goff);
}


x86 assembly (clang, -O0):
<MPE_Log_adjtime2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <MPE_Log_FindSkew@plt>
cmp    $0x0,%eax
jne    1158 <MPE_Log_adjtime2+0x38>
jmp    1167 <MPE_Log_adjtime2+0x47>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <MPE_Log_ApplyTimeCorrection@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPE_Log_adjtime2>:
sub    $0x18,%rsp
movabs $0x3ff0000000000000,%rax
mov    %rax,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <MPE_Log_FindSkew@plt>
test   %eax,%eax
je     1160 <MPE_Log_adjtime2+0x40>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <MPE_Log_ApplyTimeCorrection@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @MPE_Log_adjtime2() {
%1 = alloca double
%2 = alloca double
store double 1.000000e+00, double* %1
store double 0.000000e+00, double* %2
%3 = call i32 @MPE_Log_FindSkew(double* %1, double* %2)
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %0
br label %10
6: ; preds = %0
%7 = load double, double* %1
%8 = load double, double* %2
%9 = call i32 @MPE_Log_ApplyTimeCorrection(double %7, double %8)
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @MPE_Log_adjtime2() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
store double 1.000000e+00, double* %1
store double 0.000000e+00, double* %2
%5 = call i32 @MPE_Log_FindSkew(double* %1, double* %2)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %0
%8 = load double, double* %1
%9 = load double, double* %2
%10 = call i32 @MPE_Log_ApplyTimeCorrection(double %8, double %9)
br label %11
11: ; preds = %0, %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int libintl_vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int libintl_vprintf(const char *format, va_list args) {
  return libintl_vfprintf(stdout, format, args);
}


x86 assembly (clang, -O0):
<libintl_vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <libintl_vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libintl_vprintf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <libintl_vfprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define i32 @libintl_vprintf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @libintl_vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
char *hash_plugin_summary(void) {
  return ("osx-old \tMacOSX <= 10.6 system passwords plugin");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"osx-old \09MacOSX <= 10.6 system passwords plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [48 x i8] c"osx-old \09MacOSX <= 10.6 system passwords plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0)
}
void breakpt(void) {}


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

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

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

LLVM IR (-O2):
define void @breakpt() {
ret void
}
unsigned char reg_read_8(volatile unsigned char *addr) { return (*addr); }


x86 assembly (clang, -O0):
<reg_read_8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_read_8>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @reg_read_8(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load volatile i8, i8* %3
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @reg_read_8(i8* %0) {
%2 = load volatile i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ wFileSize(int /*<<< orphan*/);
int /*<<< orphan*/ wPopNumber();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasLof() { wPushNumber(wFileSize(wPopNumber())); }


x86 assembly (clang, -O0):
<wBasLof>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <wFileSize@plt>
mov    %eax,%edi
call   1030 <wPushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasLof>:
push   %rax
xor    %eax,%eax
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <wFileSize@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasLof() {
%1 = call i32 (...) @wPopNumber()
%2 = call i32 @wFileSize(i32 %1)
%3 = call i32 @wPushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @wBasLof() {
%1 = tail call i32 (...) @wPopNumber()
%2 = tail call i32 @wFileSize(i32 %1)
%3 = tail call i32 @wPushNumber(i32 %2)
ret void
}
void gtk_menu_get_tearoff_state() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_or_si64(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test55(__m64 a, __m64 b) { return _mm_or_si64(a, b); }


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

x86 assembly (clang, -O2):
<test55>:
jmp    1030 <_mm_or_si64@plt>

LLVM IR (-O0):
define i32 @test55(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 @_mm_or_si64(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test55(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_or_si64(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Alarm(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void handler(int sig) {
  static int beeps = 0;
  printf("BEEP\n");
  if (++beeps < 5)
    Alarm(1);
  else {
    printf("BOOM!\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eef(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ee6(%rip)
cmp    $0x5,%eax
jge    116e <handler+0x3e>
mov    $0x1,%edi
call   1050 <Alarm@plt>
jmp    1181 <handler+0x51>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ef9(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2ef0(%rip)
cmp    $0x3,%eax
jg     115c <handler+0x2c>
mov    $0x1,%edi
pop    %rax
jmp    1050 <Alarm@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@handler.beeps = internal global i32 0
@.str = [6 x i8] c"BEEP\0A\00"
@.str.1 = [7 x i8] c"BOOM!\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @handler.beeps
%5 = add nsw i32 %4, 1
store i32 %5, i32* @handler.beeps
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @Alarm(i32 1)
br label %12
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %7
ret void
}

LLVM IR (-O2):
@handler.beeps = internal unnamed_addr global i32 0
@str = [5 x i8] c"BEEP\00"
@str.2 = [6 x i8] c"BOOM!\00"
define void @handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @handler.beeps
%4 = add nsw i32 %3, 1
store i32 %4, i32* @handler.beeps
%5 = icmp slt i32 %3, 4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @Alarm(i32 1)
ret void
8: ; preds = %1
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
%10 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x1d() {
  Assert_real((ispunct(29) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              150, ("ispunct should be 0 for 0x1d"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x1d\00"
define void @t_ispunct_0x1d() {
%1 = call i64 @ispunct(i32 29)
%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 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x1d\00"
define void @t_ispunct_0x1d() {
%1 = tail call i64 @ispunct(i32 29)
%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 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  short ascent;
};
struct TYPE_4__ {
  TYPE_1__ max_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_max_bounds_ascent(void *_p, short _v) {
  ((XFontStruct *)_p)->max_bounds.ascent = (short)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_max_bounds_ascent>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontStruct_max_bounds_ascent>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i16 }
define void @set_XFontStruct_max_bounds_ascent(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i16 %5, i16* %9
ret void
}

LLVM IR (-O2):
define void @set_XFontStruct_max_bounds_ascent(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
int test_imm_5Duint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x5D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_5Duint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 399431958528
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void swap(int v[], int i, int j) {
  int temp;
  temp = v[j];
  v[j] = v[i];
  v[i] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %edx,%rax
mov    (%rdi,%rax,4),%ecx
movslq %esi,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
int main() {
  int a, b;
  a = b + b + b + b + b + b + b + b + b;
  return a;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 undef
}
/* Variables and functions */
void *malloc(int);
void *OS_alloc(int size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<OS_alloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @OS_alloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
void ASN1_OBJECT_create(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_OBJECT_create() {
ret void
}
/* Variables and functions */
void *aligned_realloc(void *, size_t, int);
int /*<<< orphan*/ handle_out_of_memory();
void *mem_unmanaged_realloc(void *memory, size_t new_size) {
  memory = aligned_realloc(memory, new_size, 8);
  if (!memory)
    handle_out_of_memory();
  return memory;
}


x86 assembly (clang, -O0):
<mem_unmanaged_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <aligned_realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1158 <mem_unmanaged_realloc+0x38>
mov    $0x0,%al
call   1040 <handle_out_of_memory@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_unmanaged_realloc>:
push   %rbx
mov    $0x8,%edx
call   1030 <aligned_realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <mem_unmanaged_realloc+0x1a>
xor    %eax,%eax
call   1040 <handle_out_of_memory@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @mem_unmanaged_realloc(i8* %0, i64 %1) {
%3 = tail call i8* @aligned_realloc(i8* %0, i64 %1, i32 8)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @handle_out_of_memory()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ ungetc(char, int /*<<< orphan*/);
int main() {
  char buf[5];
  int i;
  ungetc('\n', stdin);
  ungetc('\0', stdin);
  for (i = 0; i < 100; i++) {
    ungetc('a', stdin);
  }
  gets(buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <ungetc@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1040 <ungetc@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jge    1184 <main+0x64>
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
mov    $0x61,%edi
call   1040 <ungetc@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1159 <main+0x39>
lea    -0x9(%rbp),%rdi
call   1030 <gets@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ebe(%rip),%rbx
mov    (%rbx),%esi
mov    $0xa,%edi
call   1040 <ungetc@plt>
mov    (%rbx),%esi
xor    %edi,%edi
call   1040 <ungetc@plt>
mov    $0x64,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rbx),%esi
mov    $0x61,%edi
call   1040 <ungetc@plt>
add    $0xffffffff,%ebp
jne    1150 <main+0x30>
lea    0x3(%rsp),%rdi
call   1030 <gets@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* @stdin
%5 = call i32 @ungetc(i8 signext 10, i32 %4)
%6 = load i32, i32* @stdin
%7 = call i32 @ungetc(i8 signext 0, i32 %6)
store i32 0, i32* %3
br label %8
8: ; preds = %14, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 100
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* @stdin
%13 = call i32 @ungetc(i8 signext 97, i32 %12)
br label %14
14: ; preds = %11
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %8
17: ; preds = %8
%18 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%19 = call i32 @gets(i8* %18)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = tail call i32 @ungetc(i8 signext 10, i32 %3)
%5 = load i32, i32* @stdin
%6 = tail call i32 @ungetc(i8 signext 0, i32 %5)
br label %7
7: ; preds = %0, %7
%8 = phi i32 [ 0, %0 ], [ %11, %7 ]
%9 = load i32, i32* @stdin
%10 = tail call i32 @ungetc(i8 signext 97, i32 %9)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, 100
br i1 %12, label %13, label %7
13: ; preds = %7
%14 = call i32 @gets(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int VISIT;

/* Variables and functions */
#define endorder 131
#define leaf 130
#define postorder 129
#define preorder 128
int /*<<< orphan*/ printf(char *, int);
void action(const void *nodep, const VISIT which, const int depth) {
  int *datap;
  switch (which) {
  case preorder:
  case endorder:
    break;
  case postorder:
  case leaf:
    datap = *(int **)nodep;
    printf("%6d\n", *datap);
    break;
  }
}


x86 assembly (clang, -O0):
<action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x80,%eax
je     1161 <action+0x51>
jmp    1138 <action+0x28>
mov    -0x1c(%rbp),%eax
add    $0xffffff7f,%eax
sub    $0x2,%eax
jb     1166 <action+0x56>
jmp    114e <action+0x3e>
mov    -0x1c(%rbp),%eax
sub    $0x83,%eax
jne    1183 <action+0x73>
jmp    1161 <action+0x51>
jmp    1183 <action+0x73>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<action>:
add    $0xffffff7f,%esi
cmp    $0x1,%esi
ja     112c <action+0x1c>
mov    (%rdi),%rax
mov    (%rax),%esi
lea    0xed9(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%6d\0A\00"
define void @action(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
switch i32 %8, label %17 [
i32 128, label %9
i32 131, label %9
i32 129, label %10
i32 130, label %10
]
9: ; preds = %3, %3
br label %17
10: ; preds = %3, %3
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i32**
%13 = load i32*, i32** %12
store i32* %13, i32** %7
%14 = load i32*, i32** %7
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %3, %10, %9
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%6d\0A\00"
define void @action(i8* nocapture %0, i32 %1, i32 %2) {
%4 = add i32 %1, -129
%5 = icmp ult i32 %4, 2
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = bitcast i8* %0 to i32**
%8 = load i32*, i32** %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %3, %6
ret void
}
unsigned int _uiSetTime(const unsigned char *pszTime) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @_uiSetTime(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
double DBL_EPSILON;
double DBL_MAX;
double DBL_MIN;
double dpmpar(int i) {
  switch (i) {
  case 1:
    return DBL_EPSILON;
  case 2:
    return DBL_MIN;
  default:
    return DBL_MAX;
  }
}


x86 assembly (clang, -O0):
<dpmpar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     112c <dpmpar+0x2c>
jmp    111b <dpmpar+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1141 <dpmpar+0x41>
jmp    1156 <dpmpar+0x56>
mov    0x2eb5(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1166 <dpmpar+0x66>
mov    0x2e90(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1166 <dpmpar+0x66>
mov    0x2e73(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpmpar>:
cmp    $0x2,%edi
jne    1113 <dpmpar+0x13>
mov    0x2ecc(%rip),%rax
cmp    $0x1,%edi
je     111f <dpmpar+0x1f>
jmp    1126 <dpmpar+0x26>
mov    0x2eb6(%rip),%rax
cmp    $0x1,%edi
jne    1126 <dpmpar+0x26>
mov    0x2ec2(%rip),%rax
movsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@DBL_EPSILON = global double 0.000000e+00
@DBL_MIN = global double 0.000000e+00
@DBL_MAX = global double 0.000000e+00
define double @dpmpar(i32 %0) {
%2 = alloca double
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %7
]
5: ; preds = %1
%6 = load double, double* @DBL_EPSILON
store double %6, double* %2
br label %11
7: ; preds = %1
%8 = load double, double* @DBL_MIN
store double %8, double* %2
br label %11
9: ; preds = %1
%10 = load double, double* @DBL_MAX
store double %10, double* %2
br label %11
11: ; preds = %9, %7, %5
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
@DBL_EPSILON = global double 0.000000e+00
@DBL_MIN = global double 0.000000e+00
@DBL_MAX = global double 0.000000e+00
define double @dpmpar(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = icmp eq i32 %0, 1
%4 = load double, double* @DBL_EPSILON
%5 = load double, double* @DBL_MIN
%6 = load double, double* @DBL_MAX
%7 = select i1 %2, double %5, double %6
%8 = select i1 %3, double %4, double %7
ret double %8
}
int(abs_xf)(int i) { return ((i < 0) ? -i : i); }


x86 assembly (clang, -O0):
<abs_xf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs_xf+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs_xf+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs_xf(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
void swap_bits(int num, int *new_num) {
  *new_num = (num >> 1 & 0x55555555) | (num << 1 & 0xAAAAAAAA);
}


x86 assembly (clang, -O0):
<swap_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
and    $0x55555555,%ecx
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
and    $0xaaaaaaaa,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_bits>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
and    $0xd5555555,%edi
lea    (%rax,%rdi,2),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap_bits(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 = ashr i32 %5, 1
%7 = and i32 %6, 1431655765
%8 = load i32, i32* %3
%9 = shl i32 %8, 1
%10 = and i32 %9, -1431655766
%11 = or i32 %7, %10
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap_bits(i32 %0, i32* nocapture writeonly %1) {
%3 = lshr i32 %0, 1
%4 = and i32 %3, 1431655765
%5 = shl i32 %0, 1
%6 = and i32 %5, -1431655766
%7 = or i32 %4, %6
store i32 %7, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __acle_se_func();
int /*<<< orphan*/ fun1();
int /*<<< orphan*/ func();
int main(void) {
  func();
  fun1();
  __acle_se_func();
  func();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <func@plt>
mov    $0x0,%al
call   1030 <fun1@plt>
mov    $0x0,%al
call   1050 <__acle_se_func@plt>
mov    $0x0,%al
call   1040 <func@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <func@plt>
xor    %eax,%eax
call   1030 <fun1@plt>
xor    %eax,%eax
call   1050 <__acle_se_func@plt>
xor    %eax,%eax
call   1040 <func@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @func()
%3 = call i32 (...) @fun1()
%4 = call i32 (...) @__acle_se_func()
%5 = call i32 (...) @func()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func()
%2 = tail call i32 (...) @fun1()
%3 = tail call i32 (...) @__acle_se_func()
%4 = tail call i32 (...) @func()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void nfmhead(int osvers, int osrel, int ossub) {
  printf("mounted_device                          physread/s  physwrit/s"
         "  _nfm_");
}


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

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

LLVM IR (-O0):
@.str = [70 x i8] c"mounted_device physread/s physwrit/s _nfm_\00"
define void @nfmhead(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 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c"mounted_device physread/s physwrit/s _nfm_\00"
define void @nfmhead(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}
long double longdouble_ignoring_signedshort(long double x, signed short y) {
  return x;
}


x86 assembly (clang, -O0):
<longdouble_ignoring_signedshort>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %ax,-0x12(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define x86_fp80 @longdouble_ignoring_signedshort(x86_fp80 returned %0, i16 signext %1) {
ret x86_fp80 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ Machine_Check(int, char *);
void set_byte(int32_t id, int32_t addr, int32_t value) {
  Machine_Check(0x00000008 | 0x00000002, "timer registers are word wide");
}


x86 assembly (clang, -O0):
<set_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0xa,%edi
lea    0xed3(%rip),%rsi
call   1030 <Machine_Check@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_byte>:
lea    0xee9(%rip),%rsi
mov    $0xa,%edi
jmp    1030 <Machine_Check@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"timer registers are word wide\00"
define void @set_byte(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 = call i32 @Machine_Check(i32 10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"timer registers are word wide\00"
define void @set_byte(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @Machine_Check(i32 10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double sqlite3AtoF(char const *, char const **);
int getValue(const char *z, double *pR) {
  const char *zEnd;
  *pR = sqlite3AtoF(z, &zEnd);
  return zEnd - z;
}


x86 assembly (clang, -O0):
<getValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <sqlite3AtoF@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getValue>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
call   1030 <sqlite3AtoF@plt>
movsd  %xmm0,(%r14)
mov    (%rsp),%eax
sub    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @getValue(i8* %0, double* %1) {
%3 = alloca i8*
%4 = alloca double*
%5 = alloca i8*
store i8* %0, i8** %3
store double* %1, double** %4
%6 = load i8*, i8** %3
%7 = call double @sqlite3AtoF(i8* %6, i8** %5)
%8 = load double*, double** %4
store double %7, double* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = ptrtoint i8* %9 to i64
%12 = ptrtoint i8* %10 to i64
%13 = sub i64 %11, %12
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @getValue(i8* %0, double* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call double @sqlite3AtoF(i8* %0, i8** %3)
store double %5, double* %1
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
%8 = ptrtoint i8* %0 to i64
%9 = sub i64 %7, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}
void foo4c() {}


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

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

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

LLVM IR (-O2):
define void @foo4c() {
ret void
}
int isalnum(int c) {
  return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
          (c >= 0x30 && c <= 0x39));
}


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1120 <isalnum+0x20>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isalnum+0x58>
cmpl   $0x61,-0x4(%rbp)
jl     1139 <isalnum+0x39>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isalnum+0x58>
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1152 <isalnum+0x52>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
add    $0xffffffd0,%edi
cmp    $0xa,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 122
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 48
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 57
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = add i32 %0, -48
%6 = icmp ult i32 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
__attribute__((no)) uint64_t rdtsc_overhead_func(uint64_t dummy) {
  return dummy;
}


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

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

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

LLVM IR (-O2):
define i32 @rdtsc_overhead_func(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int strcmp(char *, char *);
int listcompare_strcmp(const void *a, const void *b) {
  char *string1 = *(char **)a;
  char *string2 = *(char **)b;
  return strcmp(string1, string2);
}


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

x86 assembly (clang, -O2):
<listcompare_strcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @listcompare_strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = call i32 @strcmp(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @listcompare_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int fixed_to_float(unsigned int, int, int *);
int show_float(char *, size_t, int, int);
int show_fixed(char *buf, size_t size, unsigned int fractional_bits,
               int fixed) {
  int ret;
  int mantissa, exponent;
  mantissa = fixed_to_float(fractional_bits, fixed, &exponent);
  return show_float(buf, size, exponent, mantissa);
}


x86 assembly (clang, -O0):
<show_fixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
lea    -0x24(%rbp),%rdx
call   1040 <fixed_to_float@plt>
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1030 <show_float@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_fixed>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%eax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x4(%rsp),%rdx
mov    %eax,%edi
mov    %ecx,%esi
call   1040 <fixed_to_float@plt>
mov    0x4(%rsp),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%ecx
call   1030 <show_float@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @show_fixed(i8* %0, i64 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = call i32 @fixed_to_float(i32 %2, i32 %3, i32* %5)
%8 = load i32, i32* %5
%9 = call i32 @show_float(i8* %0, i64 %1, i32 %8, i32 %7)
ret i32 %9
}
void glDrawElementsInstanced(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glDrawElementsInstanced() {
ret void
}
char plugin_format() { return 'b'; }


x86 assembly (clang, -O0):
<plugin_format>:
push   %rbp
mov    %rsp,%rbp
mov    $0x62,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_format>:
mov    $0x62,%al
ret

LLVM IR (-O0):
define signext i8 @plugin_format() {
ret i8 98
}

LLVM IR (-O2):
define signext i8 @plugin_format() {
ret i8 98
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void MyUSleep(unsigned seconds) { usleep(seconds); }


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

x86 assembly (clang, -O2):
<MyUSleep>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @MyUSleep(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret void
}
int gyroscope_ok() { return 1; }


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

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

LLVM IR (-O0):
define i32 @gyroscope_ok() {
ret i32 1
}

LLVM IR (-O2):
define i32 @gyroscope_ok() {
ret i32 1
}
long double fminl(long double _x, long double _y) {
  return ((__builtin_islessequal(_x, _y) || __builtin_isnan(_y)) ? _x : _y);
}


x86 assembly (clang, -O0):
<fminl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jae    1135 <fminl+0x35>
jmp    1125 <fminl+0x25>
fldt   -0x20(%rbp)
fucomip %st(0),%st
jnp    1140 <fminl+0x40>
jmp    1135 <fminl+0x35>
fldt   -0x10(%rbp)
fstpt  -0x2c(%rbp)
jmp    1146 <fminl+0x46>
fldt   -0x20(%rbp)
fstpt  -0x2c(%rbp)
fldt   -0x2c(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fminl>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fucomi %st(0),%st
fld    %st(0)
fcmovu %st(2),%st
fxch   %st(1)
fucomip %st(2),%st
fcmovnb %st(1),%st
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @fminl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp ole x86_fp80 %5, %6
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load x86_fp80, x86_fp80* %4
%10 = fcmp uno x86_fp80 %9, %9
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = load x86_fp80, x86_fp80* %3
br label %15
13: ; preds = %8
%14 = load x86_fp80, x86_fp80* %4
br label %15
15: ; preds = %13, %11
%16 = phi x86_fp80 [ %12, %11 ], [ %14, %13 ]
ret x86_fp80 %16
}

LLVM IR (-O2):
define x86_fp80 @fminl(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp ole x86_fp80 %0, %1
%4 = fcmp uno x86_fp80 %1, 0xK00000000000000000000
%5 = or i1 %3, %4
%6 = select i1 %5, x86_fp80 %0, x86_fp80 %1
ret x86_fp80 %6
}
/* Type definitions */
typedef scalar_t__ u_int64_t;

/* Variables and functions */
scalar_t__ fls64(scalar_t__);
int log2c64(u_int64_t v) { return v ? (int)fls64(v - 1) : -1; }


x86 assembly (clang, -O0):
<log2c64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <log2c64+0x2c>
mov    -0x8(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <fls64@plt>
mov    %eax,-0xc(%rbp)
jmp    1149 <log2c64+0x39>
mov    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <log2c64+0x39>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2c64>:
test   %rdi,%rdi
je     1124 <log2c64+0x14>
push   %rax
add    $0xffffffffffffffff,%rdi
call   1030 <fls64@plt>
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @log2c64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 %6, 1
%8 = call i64 @fls64(i64 %7)
%9 = trunc i64 %8 to i32
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %5
%12 = phi i32 [ %9, %5 ], [ -1, %10 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @log2c64(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nsw i64 %0, -1
%5 = tail call i64 @fls64(i64 %4)
%6 = trunc i64 %5 to i32
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}