xunge/DecIR huggingface dataset:
unsigned int gcc_current_sp(void) {
  register unsigned sp __asm__("sp");
  return sp;
}


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

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

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

LLVM IR (-O2):
define i32 @gcc_current_sp() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ putchar_func(int);
void printchar(char **str, int c) {
  if (str) {
    **str = (char)c;
    ++(*str);
  } else {
    (void)putchar_func(c);
  }
}


x86 assembly (clang, -O0):
<printchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114b <printchar+0x3b>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1153 <printchar+0x43>
mov    -0xc(%rbp),%edi
call   1030 <putchar_func@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printchar>:
test   %rdi,%rdi
je     1120 <printchar+0x10>
mov    (%rdi),%rax
mov    %sil,(%rax)
addq   $0x1,(%rdi)
ret
mov    %esi,%edi
jmp    1030 <putchar_func@plt>

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

LLVM IR (-O2):
define void @printchar(i8** %0, i32 %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = trunc i32 %1 to i8
%6 = load i8*, i8** %0
store i8 %5, i8* %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
br label %11
9: ; preds = %2
%10 = tail call i32 @putchar_func(i32 %1)
br label %11
11: ; preds = %9, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int exec_reset(int instanceId) {
  printf("Rebooting\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"Rebooting\00"
define i32 @exec_reset(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart1_iomux_config();
void iomux_config(void) { uart1_iomux_config(); }


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

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

LLVM IR (-O0):
define void @iomux_config() {
%1 = call i32 (...) @uart1_iomux_config()
ret void
}

LLVM IR (-O2):
define void @iomux_config() {
%1 = tail call i32 (...) @uart1_iomux_config()
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr2setBank3(int);
void s4setParamsB000(uint16_t addr, uint8_t val) {
  (void)addr;
  chr2setBank3(val << 11);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xb,%edi
jmp    1030 <chr2setBank3@plt>

LLVM IR (-O0):
define void @s4setParamsB000(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 = shl i32 %6, 11
%8 = call i32 @chr2setBank3(i32 %7)
ret void
}

LLVM IR (-O2):
define void @s4setParamsB000(i32 %0, i32 %1) {
%3 = shl i32 %1, 11
%4 = tail call i32 @chr2setBank3(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x19() {
  Assert_real((ispunct(25) == 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",
              130, ("ispunct should be 0 for 0x19"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x19>:
push   %rax
mov    $0x19,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x82,%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 0x19\00"
define void @t_ispunct_0x19() {
%1 = call i64 @ispunct(i32 25)
%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 130, 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 0x19\00"
define void @t_ispunct_0x19() {
%1 = tail call i64 @ispunct(i32 25)
%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 130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void XtCvtIntToPixmap() {}


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

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

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

LLVM IR (-O2):
define void @XtCvtIntToPixmap() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window_group;
};
typedef TYPE_1__ XWMHints;

/* Variables and functions */
void set_XWMHints_window_group(void *_p, unsigned long _v) {
  ((XWMHints *)_p)->window_group = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XWMHints_window_group>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XWMHints_window_group>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XWMHints_window_group(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int read(int, char *, int);
int tosFile_read1(int fd, void *pBuffer, int start, int n) {
  return read(fd, ((char *)pBuffer) + start, n);
}


x86 assembly (clang, -O0):
<tosFile_read1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
add    %rax,%rsi
mov    -0x18(%rbp),%edx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tosFile_read1>:
movslq %edx,%rax
add    %rax,%rsi
mov    %ecx,%edx
jmp    1030 <read@plt>

LLVM IR (-O0):
define i32 @tosFile_read1(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i32, i32* %8
%15 = call i32 @read(i32 %9, i8* %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @tosFile_read1(i32 %0, i8* nocapture %1, i32 %2, i32 %3) {
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %1, i64 %5
%7 = tail call i32 @read(i32 %0, i8* %6, i32 %3)
ret i32 %7
}
void add_disk_randomness(struct gendisk *disk) { return; }


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

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

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

LLVM IR (-O2):
%struct.gendisk = type opaque
define void @add_disk_randomness(%struct.gendisk* nocapture %0) {
ret void
}
void f84(void) {
a:
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  goto a;
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f84>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    1104 <f84+0x4>

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

LLVM IR (-O0):
define void @f84() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
br label %4
4: ; preds = %4, %0
store i32 0, i32* %1
%5 = load i32, i32* %1
store i32 0, i32* %2
%6 = load i32, i32* %2
store i32 0, i32* %3
%7 = load i32, i32* %3
br label %4
}

LLVM IR (-O2):
define void @f84() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
int prompt_for_gamma(double *regamma, double *imgamma) {
  printf("Give the real part : ");
  scanf("%lf", regamma);
  printf("Give the imaginary part : ");
  scanf("%lf", imgamma);
  return 0;
}


x86 assembly (clang, -O0):
<prompt_for_gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xecf(%rip),%rdi
call   1040 <scanf@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <scanf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt_for_gamma>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xed8(%rip),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Give the real part : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [27 x i8] c"Give the imaginary part : \00"
define i32 @prompt_for_gamma(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = load double*, double** %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%9 = load double*, double** %4
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Give the real part : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [27 x i8] c"Give the imaginary part : \00"
define i32 @prompt_for_gamma(double* %0, double* %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %0)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
ret i32 0
}
int main(void) {
  if (g(3, 1337) != 1337)
    abrt("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/119/aircam-openwrt/refs/heads/ar9344/"
         "build_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/"
         "gcc-linaro-4.5-2011.02-0/gcc/testsuite/gcc.dg/pr33676.c",
         __FUNCTION__);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x539,%esi
mov    $0x0,%al
call   1040 <g@plt>
cmp    $0x539,%eax
je     1160 <main+0x40>
lea    0xeae(%rip),%rdi
lea    0xf99(%rip),%rsi
mov    $0x0,%al
call   1030 <abrt@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x539,%esi
xor    %eax,%eax
call   1040 <g@plt>
cmp    $0x539,%eax
je     114e <main+0x2e>
lea    0xec0(%rip),%rdi
lea    0xfab(%rip),%rsi
xor    %eax,%eax
call   1030 <abrt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [242 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/119/aircam-openwrt/refs/heads/ar9344/build_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/gcc-linaro-4.5-2011.02-0/gcc/testsuite/gcc.dg/pr33676.c\00"
@__FUNCTION__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i32, i32, ...) bitcast (i32 (...)* @g to i32 (i32, i32, ...)*)(i32 3, i32 1337)
%3 = icmp ne i32 %2, 1337
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @abrt to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([242 x i8], [242 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [242 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/119/aircam-openwrt/refs/heads/ar9344/build_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/gcc-linaro-4.5-2011.02-0/gcc/testsuite/gcc.dg/pr33676.c\00"
@__FUNCTION__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @g to i32 (i32, i32, ...)*)(i32 3, i32 1337)
%2 = icmp eq i32 %1, 1337
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @abrt to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([242 x i8], [242 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int printw(char const *, char *);
int s_printw(const char *fmt, char *string) { return (printw(fmt, string)); }


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

x86 assembly (clang, -O2):
<s_printw>:
jmp    1030 <printw@plt>

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

LLVM IR (-O2):
define i32 @s_printw(i8* %0, i8* %1) {
%3 = tail call i32 @printw(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_xchd_atRi(FILE *stream, unsigned char i) {
  fprintf(stream, "XCHD  A, @R%X                    ", i);
}


x86 assembly (clang, -O0):
<fprint_xchd_atRi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_xchd_atRi>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"XCHD A, @R%X \00"
define void @fprint_xchd_atRi(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = load i8, i8* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"XCHD A, @R%X \00"
define void @fprint_xchd_atRi(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
void exception_handler_install(uint16_t offset, void (*handler)(void)) {
  volatile uint32_t *vector;
  vector = (uint32_t *)offset;
  *vector = (uint32_t)handler;
}


x86 assembly (clang, -O0):
<exception_handler_install>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<exception_handler_install>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @exception_handler_install(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
%5 = alloca i64*
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%6 = load i64, i64* %3
%7 = inttoptr i64 %6 to i64*
store i64* %7, i64** %5
%8 = load void ()*, void ()** %4
%9 = ptrtoint void ()* %8 to i64
%10 = load i64*, i64** %5
store volatile i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @exception_handler_install(i64 %0, void ()* %1) {
%3 = inttoptr i64 %0 to i64*
%4 = ptrtoint void ()* %1 to i64
store volatile i64 %4, i64* %3
ret void
}
void gdk_cursor_new_from_pixmap() {}


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

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

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

LLVM IR (-O2):
define void @gdk_cursor_new_from_pixmap() {
ret void
}
double v_double_func() { return (0.0); }


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

x86 assembly (clang, -O2):
<v_double_func>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @v_double_func() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @v_double_func() {
ret double 0.000000e+00
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t splitmix64_next(uint64_t *state) {
  uint64_t z = (state[0] += 0x9e3779b97f4a7c15);
  z = (z ^ (z >> 30)) * 0xbf58476d1ce4e5b9;
  z = (z ^ (z >> 27)) * 0x94d049bb133111eb;
  return z ^ (z >> 31);
}


x86 assembly (clang, -O0):
<splitmix64_next>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
movslq (%rcx),%rax
movabs $0x9e3779b97f4a7c15,%rdx
79 37 9e
add    %rdx,%rax
mov    %eax,(%rcx)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x1e,%ecx
xor    %ecx,%eax
cltq
movabs $0xbf58476d1ce4e5b9,%rcx
47 58 bf
imul   %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x1b,%ecx
xor    %ecx,%eax
cltq
movabs $0x94d049bb133111eb,%rcx
49 d0 94
imul   %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x1f,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<splitmix64_next>:
mov    $0x7f4a7c15,%eax
add    (%rdi),%eax
mov    %eax,(%rdi)
mov    %eax,%ecx
sar    $0x1e,%ecx
xor    %eax,%ecx
imul   $0x1ce4e5b9,%ecx,%eax
mov    %eax,%ecx
sar    $0x1b,%ecx
xor    %eax,%ecx
imul   $0x133111eb,%ecx,%ecx
mov    %ecx,%eax
sar    $0x1f,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @splitmix64_next(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = add i64 %7, -7046029254386353131
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32, i32* %3
%12 = ashr i32 %11, 30
%13 = xor i32 %10, %12
%14 = sext i32 %13 to i64
%15 = mul i64 %14, -4658895280553007687
%16 = trunc i64 %15 to i32
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = load i32, i32* %3
%19 = ashr i32 %18, 27
%20 = xor i32 %17, %19
%21 = sext i32 %20 to i64
%22 = mul i64 %21, -7723592293110705685
%23 = trunc i64 %22 to i32
store i32 %23, i32* %3
%24 = load i32, i32* %3
%25 = load i32, i32* %3
%26 = ashr i32 %25, 31
%27 = xor i32 %24, %26
ret i32 %27
}

LLVM IR (-O2):
define i32 @splitmix64_next(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add i32 %2, 2135587861
store i32 %3, i32* %0
%4 = ashr i32 %3, 30
%5 = xor i32 %4, %3
%6 = mul i32 %5, 484763065
%7 = ashr i32 %6, 27
%8 = xor i32 %7, %6
%9 = mul i32 %8, 321982955
%10 = ashr i32 %9, 31
%11 = xor i32 %10, %9
ret i32 %11
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t hdsafe(int32_t addr) { return addr & 0x100 - 1; }


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

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

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

LLVM IR (-O2):
define i32 @hdsafe(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XErrorEvent;

/* Variables and functions */
void set_XErrorEvent_serial(void *_p, unsigned long _v) {
  ((XErrorEvent *)_p)->serial = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XErrorEvent_serial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XErrorEvent_serial>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XErrorEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
smp_init_pseries_xics(void) {}


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

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

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

LLVM IR (-O2):
define i32 @smp_init_pseries_xics() {
ret i32 undef
}
void test() {
#pragma omp parallel
  {
#pragma omp cancel parallel
  }
}


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

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

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

LLVM IR (-O2):
define void @test() {
ret void
}
void Delay(int count) {
  volatile int i, j = 0;
  volatile static int loop = 800000000 / 10000;
  for (; count > 0; count--)
    for (i = 0; i < loop; i++) {
      j++;
    }
}


x86 assembly (clang, -O0):
<Delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    115a <Delay+0x5a>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ef8(%rip),%ecx
cmp    %ecx,%eax
jge    1147 <Delay+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <Delay+0x1f>
jmp    114c <Delay+0x4c>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <Delay+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Delay>:
movl   $0x0,-0x4(%rsp)
test   %edi,%edi
jg     111a <Delay+0x1a>
ret
nopl   (%rax)
lea    -0x1(%rdi),%eax
cmp    $0x1,%edi
mov    %eax,%edi
jle    110c <Delay+0xc>
movl   $0x0,-0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    -0x8(%rsp),%eax
cmp    0x2ee6(%rip),%eax
jge    1110 <Delay+0x10>
addl   $0x1,-0x4(%rsp)
addl   $0x1,-0x8(%rsp)
jmp    1130 <Delay+0x30>

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

LLVM IR (-O2):
@Delay.loop = internal global i32 80000
define void @Delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
store volatile i32 0, i32* %3
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %23
7: ; preds = %1, %20
%8 = phi i32 [ %21, %20 ], [ %0, %1 ]
store volatile i32 0, i32* %2
%9 = load volatile i32, i32* %2
%10 = load volatile i32, i32* @Delay.loop
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %20
12: ; preds = %7, %12
%13 = load volatile i32, i32* %3
%14 = add nsw i32 %13, 1
store volatile i32 %14, i32* %3
%15 = load volatile i32, i32* %2
%16 = add nsw i32 %15, 1
store volatile i32 %16, i32* %2
%17 = load volatile i32, i32* %2
%18 = load volatile i32, i32* @Delay.loop
%19 = icmp slt i32 %17, %18
br i1 %19, label %12, label %20
20: ; preds = %12, %7
%21 = add nsw i32 %8, -1
%22 = icmp sgt i32 %8, 1
br i1 %22, label %7, label %23
23: ; preds = %20, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void yyerror(char const *s) { fprintf(stderr, "ERROR: %s\n", s); }


x86 assembly (clang, -O0):
<yyerror>:
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):
<yyerror>:
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 = [11 x i8] c"ERROR: %s\0A\00"
define void @yyerror(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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addFront(int);
int /*<<< orphan*/ printList();
int main() {
  addFront(5);
  addFront(6);
  addFront(8);
  addFront(1);
  addFront(2);
  printList();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <addFront@plt>
mov    $0x6,%edi
call   1030 <addFront@plt>
mov    $0x8,%edi
call   1030 <addFront@plt>
mov    $0x1,%edi
call   1030 <addFront@plt>
mov    $0x2,%edi
call   1030 <addFront@plt>
mov    $0x0,%al
call   1040 <printList@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <addFront@plt>
mov    $0x6,%edi
call   1030 <addFront@plt>
mov    $0x8,%edi
call   1030 <addFront@plt>
mov    $0x1,%edi
call   1030 <addFront@plt>
mov    $0x2,%edi
call   1030 <addFront@plt>
xor    %eax,%eax
call   1040 <printList@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @addFront(i32 5)
%2 = call i32 @addFront(i32 6)
%3 = call i32 @addFront(i32 8)
%4 = call i32 @addFront(i32 1)
%5 = call i32 @addFront(i32 2)
%6 = call i32 (...) @printList()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @addFront(i32 5)
%2 = tail call i32 @addFront(i32 6)
%3 = tail call i32 @addFront(i32 8)
%4 = tail call i32 @addFront(i32 1)
%5 = tail call i32 @addFront(i32 2)
%6 = tail call i32 (...) @printList()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
locale_t uselocale(locale_t locale) { return locale; }


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

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

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

LLVM IR (-O2):
define i32 @uselocale(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void nodiv() { printf("the number is not divisible by 5 and 7\n"); }


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"the number is not divisible by 5 and 7\0A\00"
define void @nodiv() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [39 x i8] c"the number is not divisible by 5 and 7\00"
define void @nodiv() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ push_unsigned_int(char *, int, long);
void push_signed_int(char *dest, int num_bits, long val) {
  if (val < 0)
    val = (-val | 1 << (num_bits - 1));
  push_unsigned_int(dest, num_bits, val);
}


x86 assembly (clang, -O0):
<push_signed_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    114d <push_signed_int+0x3d>
xor    %eax,%eax
sub    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <push_unsigned_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<push_signed_int>:
test   %rdx,%rdx
js     111a <push_signed_int+0xa>
jmp    1030 <push_unsigned_int@plt>
lea    -0x1(%rsi),%ecx
mov    $0x1,%eax
shl    %cl,%eax
neg    %rdx
cltq
or     %rax,%rdx
jmp    1030 <push_unsigned_int@plt>

LLVM IR (-O0):
define void @push_signed_int(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %3
%10 = load i64, i64* %6
%11 = sub nsw i64 0, %10
%12 = load i32, i32* %5
%13 = sub nsw i32 %12, 1
%14 = shl i32 1, %13
%15 = sext i32 %14 to i64
%16 = or i64 %11, %15
store i64 %16, i64* %6
br label %17
17: ; preds = %9, %3
%18 = load i8*, i8** %4
%19 = load i32, i32* %5
%20 = load i64, i64* %6
%21 = call i32 @push_unsigned_int(i8* %18, i32 %19, i64 %20)
ret void
}

LLVM IR (-O2):
define void @push_signed_int(i8* %0, i32 %1, i64 %2) {
%4 = icmp slt i64 %2, 0
br i1 %4, label %5, label %11
5: ; preds = %3
%6 = sub nsw i64 0, %2
%7 = add nsw i32 %1, -1
%8 = shl nuw i32 1, %7
%9 = sext i32 %8 to i64
%10 = or i64 %9, %6
br label %11
11: ; preds = %5, %3
%12 = phi i64 [ %10, %5 ], [ %2, %3 ]
%13 = tail call i32 @push_unsigned_int(i8* %0, i32 %1, i64 %12)
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *PlaybackWrapper_New(size_t size) { return malloc(size); }


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

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

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

LLVM IR (-O2):
define noalias i8* @PlaybackWrapper_New(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
int foo(int x) { return x - 18; }


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

x86 assembly (clang, -O2):
<foo>:
lea    -0x12(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add nsw i32 %0, -18
ret i32 %2
}
int astar_getIndexByWidth(int width, int x, int y) { return x + y * width; }


x86 assembly (clang, -O0):
<astar_getIndexByWidth>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<astar_getIndexByWidth>:
imul   %edx,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @astar_getIndexByWidth(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* %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = mul nsw i32 %8, %9
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @astar_getIndexByWidth(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %0
%5 = add nsw i32 %4, %1
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  char *name;
};
typedef TYPE_1__ X509_TRUST;

/* Variables and functions */
char *X509_TRUST_get0_name(const X509_TRUST *xp) { return xp->name; }


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

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

LLVM IR (-O0):
%struct.TYPE_3__ = type { i8* }
define i8* @X509_TRUST_get0_name(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i8*, i8** %4
ret i8* %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i8* }
define i8* @X509_TRUST_get0_name(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i8*, i8** %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ inputProgram(int *, int);
int /*<<< orphan*/ welcome();
int main() {
  int memory[100], operationCode, operation;
  welcome();
  inputProgram(memory, 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <welcome@plt>
lea    -0x1a0(%rbp),%rdi
mov    $0x64,%esi
call   1040 <inputProgram@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x198,%rsp
xor    %eax,%eax
call   1030 <welcome@plt>
mov    %rsp,%rdi
mov    $0x64,%esi
call   1040 <inputProgram@plt>
xor    %eax,%eax
add    $0x198,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @welcome()
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%7 = call i32 @inputProgram(i32* %6, i32 100)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = tail call i32 (...) @welcome()
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%5 = call i32 @inputProgram(i32* %4, i32 100)
ret i32 0
}
/* Variables and functions */
size_t darray_next_alloc(size_t alloc, size_t need) {
  if (alloc == 0)
    alloc = 4;
  while (alloc < need)
    alloc *= 2;
  return alloc;
}


x86 assembly (clang, -O0):
<darray_next_alloc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    111f <darray_next_alloc+0x1f>
movq   $0x4,-0x8(%rbp)
jmp    1124 <darray_next_alloc+0x24>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1143 <darray_next_alloc+0x43>
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1124 <darray_next_alloc+0x24>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<darray_next_alloc>:
test   %rdi,%rdi
mov    $0x4,%ecx
cmovne %rdi,%rcx
nopl   0x0(%rax)
mov    %rcx,%rax
add    %rcx,%rcx
cmp    %rsi,%rax
jb     1110 <darray_next_alloc+0x10>
ret

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

LLVM IR (-O2):
define i64 @darray_next_alloc(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
%4 = select i1 %3, i64 4, i64 %0
br label %5
5: ; preds = %5, %2
%6 = phi i64 [ %4, %2 ], [ %8, %5 ]
%7 = icmp ult i64 %6, %1
%8 = shl i64 %6, 1
br i1 %7, label %5, label %9
9: ; preds = %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void __attribute__((regparm(3))) memcpy_26(void *dest, void *src) {
  memcpy(dest, src, 26);
}


x86 assembly (clang, -O0):
<memcpy_26>:
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    $0x1a,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcpy_26>:
mov    $0x1a,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @memcpy_26(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 26)
ret void
}
/* Type definitions */
typedef int GLint;
typedef int GLenum;

/* Variables and functions */
#define GL_TEXTURE_ALPHA_SIZE 138
#define GL_TEXTURE_BLUE_SIZE 137
#define GL_TEXTURE_BORDER 136
#define GL_TEXTURE_COMPONENTS 135
#define GL_TEXTURE_DEPTH 134
#define GL_TEXTURE_GREEN_SIZE 133
#define GL_TEXTURE_HEIGHT 132
#define GL_TEXTURE_INTENSITY_SIZE 131
#define GL_TEXTURE_LUMINANCE_SIZE 130
#define GL_TEXTURE_RED_SIZE 129
#define GL_TEXTURE_WIDTH 128
GLint __glGetTexLevelParameterfv_size(GLenum pname) {
  switch (pname) {
  case GL_TEXTURE_WIDTH:
  case GL_TEXTURE_HEIGHT:
  case GL_TEXTURE_DEPTH:
  case GL_TEXTURE_COMPONENTS:
  case GL_TEXTURE_BORDER:
  case GL_TEXTURE_RED_SIZE:
  case GL_TEXTURE_GREEN_SIZE:
  case GL_TEXTURE_BLUE_SIZE:
  case GL_TEXTURE_ALPHA_SIZE:
  case GL_TEXTURE_LUMINANCE_SIZE:
  case GL_TEXTURE_INTENSITY_SIZE:
    return 1;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<__glGetTexLevelParameterfv_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffff80,%eax
sub    $0xa,%eax
ja     1127 <__glGetTexLevelParameterfv_size+0x27>
jmp    111b <__glGetTexLevelParameterfv_size+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <__glGetTexLevelParameterfv_size+0x2e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glGetTexLevelParameterfv_size>:
add    $0xffffff80,%edi
xor    %eax,%eax
cmp    $0xb,%edi
setb   %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @__glGetTexLevelParameterfv_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 128, label %5
i32 132, label %5
i32 134, label %5
i32 135, label %5
i32 136, label %5
i32 129, label %5
i32 133, label %5
i32 137, label %5
i32 138, label %5
i32 130, label %5
i32 131, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @__glGetTexLevelParameterfv_size(i32 %0) {
%2 = add i32 %0, -128
%3 = icmp ult i32 %2, 11
%4 = select i1 %3, i32 1, i32 -1
ret i32 %4
}
_Complex float test_cacoshf(_Complex float x) { return __builtin_cacoshf(x); }


x86 assembly (clang, -O0):
<test_cacoshf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movlpd %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  %xmm1,-0x18(%rbp)
movss  %xmm0,-0x14(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <cacoshf@plt>
movlpd %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cacoshf>:
jmp    1030 <cacoshf@plt>

LLVM IR (-O0):
define <2 x float> @test_cacoshf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca { float, float }
%6 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %6
%7 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%8 = load float, float* %7
%9 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%10 = load float, float* %9
%11 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%12 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
store float %8, float* %11
store float %10, float* %12
%13 = bitcast { float, float }* %4 to <2 x float>*
%14 = load <2 x float>, <2 x float>* %13
%15 = call <2 x float> @cacoshf(<2 x float> %14)
%16 = bitcast { float, float }* %5 to <2 x float>*
store <2 x float> %15, <2 x float>* %16
%17 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%18 = load float, float* %17
%19 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
%20 = load float, float* %19
%21 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%22 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float %18, float* %21
store float %20, float* %22
%23 = bitcast { float, float }* %2 to <2 x float>*
%24 = load <2 x float>, <2 x float>* %23
ret <2 x float> %24
}

LLVM IR (-O2):
define <2 x float> @test_cacoshf(<2 x float> %0) {
%2 = tail call <2 x float> @cacoshf(<2 x float> %0)
ret <2 x float> %2
}
int security_inode_rmdir(struct inode *dir, struct dentry *dentry) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
%struct.dentry = type opaque
define i32 @security_inode_rmdir(%struct.inode* nocapture readnone %0, %struct.dentry* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *xstrdup(char *);
char *do_info(int argc, char *argv[]) {
  printf("%s\n", argv[0]);
  return xstrdup("");
}


x86 assembly (clang, -O0):
<do_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
call   1040 <xstrdup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_info>:
push   %rax
mov    (%rsi),%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <xstrdup@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @do_info(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i8* @xstrdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ucontext_t;
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ stacktrace(int /*<<< orphan*/ *);
void segv(int signo, siginfo_t *info, void *ctx) {
  stacktrace((ucontext_t *)ctx);
  abort();
}


x86 assembly (clang, -O0):
<segv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <stacktrace@plt>
mov    $0x0,%al
call   1040 <abort@plt>

x86 assembly (clang, -O2):
<segv>:
push   %rax
mov    %rdx,%rdi
call   1030 <stacktrace@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @segv(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = bitcast i8* %7 to i32*
%9 = call i32 @stacktrace(i32* %8)
%10 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @segv(i32 %0, i32* nocapture readnone %1, i8* %2) {
%4 = bitcast i8* %2 to i32*
%5 = tail call i32 @stacktrace(i32* %4)
%6 = tail call i32 (...) @abort()
unreachable
}