xunge/DecIR huggingface dataset:
/* Type definitions */
struct atrf_dsc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ MCL_CURRENT;
int /*<<< orphan*/ ben_setup(struct atrf_dsc *);
int /*<<< orphan*/ mlockall(int /*<<< orphan*/);
int /*<<< orphan*/ rf_setup(struct atrf_dsc *, int, int);
void atben_setup(struct atrf_dsc *dsc, int size, int trim) {
  rf_setup(dsc, size, trim);
  mlockall(MCL_CURRENT);
  ben_setup(dsc);
}


x86 assembly (clang, -O0):
<atben_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <rf_setup@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <mlockall@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ben_setup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atben_setup>:
push   %rbx
mov    %rdi,%rbx
call   1050 <rf_setup@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <mlockall@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <ben_setup@plt>

LLVM IR (-O0):
%struct.atrf_dsc = type { i32 }
@MCL_CURRENT = global i32 0
define void @atben_setup(%struct.atrf_dsc* %0, i32 %1, i32 %2) {
%4 = alloca %struct.atrf_dsc*
%5 = alloca i32
%6 = alloca i32
store %struct.atrf_dsc* %0, %struct.atrf_dsc** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.atrf_dsc*, %struct.atrf_dsc** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @rf_setup(%struct.atrf_dsc* %7, i32 %8, i32 %9)
%11 = load i32, i32* @MCL_CURRENT
%12 = call i32 @mlockall(i32 %11)
%13 = load %struct.atrf_dsc*, %struct.atrf_dsc** %4
%14 = call i32 @ben_setup(%struct.atrf_dsc* %13)
ret void
}

LLVM IR (-O2):
%struct.atrf_dsc = type { i32 }
@MCL_CURRENT = global i32 0
define void @atben_setup(%struct.atrf_dsc* %0, i32 %1, i32 %2) {
%4 = tail call i32 @rf_setup(%struct.atrf_dsc* %0, i32 %1, i32 %2)
%5 = load i32, i32* @MCL_CURRENT
%6 = tail call i32 @mlockall(i32 %5)
%7 = tail call i32 @ben_setup(%struct.atrf_dsc* %0)
ret void
}
void int2a(void) {}


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

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

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

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

/* Variables and functions */
int64_t icl_zlib_windowSize(void) { return 32768; }


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

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

LLVM IR (-O0):
define i32 @icl_zlib_windowSize() {
ret i32 32768
}

LLVM IR (-O2):
define i32 @icl_zlib_windowSize() {
ret i32 32768
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__33__IO__selectIOFunc();
void HplMsp430Usart1P__SIMO__selectIOFunc(void) {
  HplMsp430GeneralIOP__33__IO__selectIOFunc();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430Usart1P__SIMO__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__33__IO__selectIOFunc()
ret void
}
/* Variables and functions */
void plat_video_menu_enter(int is_rom_loaded) {}


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

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

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

LLVM IR (-O2):
define void @plat_video_menu_enter(i32 %0) {
ret void
}
void testClosureBIBrV(void (*closure)(char, int, char), char a1, int a2,
                      char a3) {
  (*closure)(a1, a2, a3);
}


x86 assembly (clang, -O0):
<testClosureBIBrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x9(%rbp),%cl
mov    -0x10(%rbp),%esi
movsbl %cl,%edi
movsbl -0x11(%rbp),%edx
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureBIBrV>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
jmp    *%rax

LLVM IR (-O0):
define void @testClosureBIBrV(void (i8, i32, i8)* %0, i8 signext %1, i32 %2, i8 signext %3) {
%5 = alloca void (i8, i32, i8)*
%6 = alloca i8
%7 = alloca i32
%8 = alloca i8
store void (i8, i32, i8)* %0, void (i8, i32, i8)** %5
store i8 %1, i8* %6
store i32 %2, i32* %7
store i8 %3, i8* %8
%9 = load void (i8, i32, i8)*, void (i8, i32, i8)** %5
%10 = load i8, i8* %6
%11 = load i32, i32* %7
%12 = load i8, i8* %8
ret void
}

LLVM IR (-O2):
define void @testClosureBIBrV(void (i8, i32, i8)* nocapture %0, i8 signext %1, i32 %2, i8 signext %3) {
tail call void %0(i8 signext %1, i32 %2, i8 signext %3)
ret void
}
/* Variables and functions */
scalar_t__ has_colors();
int /*<<< orphan*/ init_dialog_colors();
int /*<<< orphan*/ set_mono_theme();
int set_theme(char const *);
int /*<<< orphan*/ start_color();
void color_setup(const char *theme) {
  int use_color;
  use_color = set_theme(theme);
  if (use_color && has_colors()) {
    start_color();
    init_dialog_colors();
  } else
    set_mono_theme();
}


x86 assembly (clang, -O0):
<color_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <set_theme@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1196 <color_setup+0x46>
mov    $0x0,%al
call   1040 <has_colors@plt>
cmp    $0x0,%rax
je     1196 <color_setup+0x46>
mov    $0x0,%al
call   1060 <start_color@plt>
mov    $0x0,%al
call   1070 <init_dialog_colors@plt>
jmp    119d <color_setup+0x4d>
mov    $0x0,%al
call   1030 <set_mono_theme@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_setup>:
push   %rax
call   1050 <set_theme@plt>
test   %eax,%eax
je     1175 <color_setup+0x25>
xor    %eax,%eax
call   1040 <has_colors@plt>
test   %rax,%rax
je     1175 <color_setup+0x25>
xor    %eax,%eax
call   1060 <start_color@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <init_dialog_colors@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <set_mono_theme@plt>

LLVM IR (-O0):
define void @color_setup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @set_theme(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = call i64 (...) @has_colors()
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = call i32 (...) @start_color()
%13 = call i32 (...) @init_dialog_colors()
br label %16
14: ; preds = %8, %1
%15 = call i32 (...) @set_mono_theme()
br label %16
16: ; preds = %14, %11
ret void
}

LLVM IR (-O2):
define void @color_setup(i8* %0) {
%2 = tail call i32 @set_theme(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = tail call i64 (...) @has_colors()
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 (...) @start_color()
%9 = tail call i32 (...) @init_dialog_colors()
br label %12
10: ; preds = %4, %1
%11 = tail call i32 (...) @set_mono_theme()
br label %12
12: ; preds = %10, %7
ret void
}
int f(int x) { return x - 2; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = add nsw i32 %0, -2
ret i32 %2
}
void PDMCritSectEnterDebug(void) {}


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

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

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

LLVM IR (-O2):
define void @PDMCritSectEnterDebug() {
ret void
}
void dfunc(float x[], float df[]) {
  int i;
  for (i = 1; i <= 3; i++)
    df[i] = 2.0 * (x[i] - 1.0);
}


x86 assembly (clang, -O0):
<dfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jg     1165 <dfunc+0x65>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xebe(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <dfunc+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfunc>:
movss  0x4(%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeef(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsi)
movss  0x8(%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x8(%rsi)
movss  0xc(%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsi)
ret

LLVM IR (-O0):
define void @dfunc(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca i32
store float* %0, float** %3
store float* %1, float** %4
store i32 1, i32* %5
br label %6
6: ; preds = %23, %2
%7 = load i32, i32* %5
%8 = icmp sle i32 %7, 3
br i1 %8, label %9, label %26
9: ; preds = %6
%10 = load float*, float** %3
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds float, float* %10, i64 %12
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = fsub double %15, 1.000000e+00
%17 = fmul double 2.000000e+00, %16
%18 = fptrunc double %17 to float
%19 = load float*, float** %4
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* %19, i64 %21
store float %18, float* %22
br label %23
23: ; preds = %9
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %6
26: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @dfunc(float* nocapture %0, float* nocapture writeonly %1) {
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fadd double %5, -1.000000e+00
%7 = fmul double %6, 2.000000e+00
%8 = fptrunc double %7 to float
%9 = getelementptr inbounds float, float* %1, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %0, i64 2
%11 = load float, float* %10
%12 = fpext float %11 to double
%13 = fadd double %12, -1.000000e+00
%14 = fmul double %13, 2.000000e+00
%15 = fptrunc double %14 to float
%16 = getelementptr inbounds float, float* %1, i64 2
store float %15, float* %16
%17 = getelementptr inbounds float, float* %0, i64 3
%18 = load float, float* %17
%19 = fpext float %18 to double
%20 = fadd double %19, -1.000000e+00
%21 = fmul double %20, 2.000000e+00
%22 = fptrunc double %21 to float
%23 = getelementptr inbounds float, float* %1, i64 3
store float %22, float* %23
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mem_readb_phys_dma(int /*<<< orphan*/);
uint8_t _dma_read(uint32_t addr) {
  uint8_t temp = mem_readb_phys_dma(addr);
  return temp;
}


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

x86 assembly (clang, -O2):
<_dma_read>:
jmp    1030 <mem_readb_phys_dma@plt>

LLVM IR (-O0):
define i32 @_dma_read(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @mem_readb_phys_dma(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @_dma_read(i32 %0) {
%2 = tail call i32 @mem_readb_phys_dma(i32 %0)
ret i32 %2
}
int foo_OK() {
  int i, j;
  i = 17;
  j = 31;
  return i + j + 3 + 7;
}


x86 assembly (clang, -O0):
<foo_OK>:
push   %rbp
mov    %rsp,%rbp
movl   $0x11,-0x4(%rbp)
movl   $0x1f,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x3,%eax
add    $0x7,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo_OK() {
%1 = alloca i32
%2 = alloca i32
store i32 17, i32* %1
store i32 31, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = add nsw i32 %3, %4
%6 = add nsw i32 %5, 3
%7 = add nsw i32 %6, 7
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo_OK() {
ret i32 58
}
/* Variables and functions */
scalar_t__ memcmp(int *, int *, int);
int equals(int src[4], int target[4]) {
  return memcmp(target, src, sizeof(int) * 4) == 0;
}


x86 assembly (clang, -O0):
<equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x10,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equals>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x10,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @equals(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32*, i32** %3
%7 = call i64 @memcmp(i32* %5, i32* %6, i32 16)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @equals(i32* %0, i32* %1) {
%3 = tail call i64 @memcmp(i32* %1, i32* %0, i32 16)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("Hello world.");
  puts("next line");
  puts("More \n lines");
  puts(" /**/ // \\ // ");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world.\00"
@.str.1 = [10 x i8] c"next line\00"
@.str.2 = [13 x i8] c"More \0A lines\00"
@.str.3 = [15 x i8] c" /**/ // \\ // \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world.\00"
@.str.1 = [10 x i8] c"next line\00"
@.str.2 = [13 x i8] c"More \0A lines\00"
@.str.3 = [15 x i8] c" /**/ // \\ // \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int mm_support();
int mmx_ok(void) { return (mm_support() & 0x1); }


x86 assembly (clang, -O0):
<mmx_ok>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mm_support@plt>
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmx_ok>:
push   %rax
xor    %eax,%eax
call   1030 <mm_support@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mmx_ok() {
%1 = call i32 (...) @mm_support()
%2 = and i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @mmx_ok() {
%1 = tail call i32 (...) @mm_support()
%2 = and i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR4A_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR4A_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR4A_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_exceptions(char *, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
void initial_tests(void) {
  test_exceptions("Initially all exceptions should be cleared", 0, 0);
}


x86 assembly (clang, -O0):
<initial_tests>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <test_exceptions@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initial_tests>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <test_exceptions@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Initially all exceptions should be cleared\00"
define void @initial_tests() {
%1 = call i32 @test_exceptions(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"Initially all exceptions should be cleared\00"
define void @initial_tests() {
%1 = tail call i32 @test_exceptions(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret void
}
/* Variables and functions */
int epoll_create(int);
int se_create(int event_size) { return epoll_create(event_size); }


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

x86 assembly (clang, -O2):
<se_create>:
jmp    1030 <epoll_create@plt>

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

LLVM IR (-O2):
define i32 @se_create(i32 %0) {
%2 = tail call i32 @epoll_create(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ args_check();
int main() {
  args_check();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @args_check()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SHUT_RDWR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ shutdown(int, int /*<<< orphan*/);
int destroy_socket(int sock) {
  shutdown(sock, SHUT_RDWR);
  close(sock);
  return (-1);
}


x86 assembly (clang, -O0):
<destroy_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_socket>:
push   %rbx
mov    %edi,%ebx
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    %ebx,%edi
call   1040 <close@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@SHUT_RDWR = global i32 0
define i32 @destroy_socket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SHUT_RDWR
%5 = call i32 @shutdown(i32 %3, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
ret i32 -1
}

LLVM IR (-O2):
@SHUT_RDWR = global i32 0
define i32 @destroy_socket(i32 %0) {
%2 = load i32, i32* @SHUT_RDWR
%3 = tail call i32 @shutdown(i32 %0, i32 %2)
%4 = tail call i32 @close(i32 %0)
ret i32 -1
}
int numa_map_to_online_node(int node) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @numa_map_to_online_node(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ blkfree_all();
int /*<<< orphan*/ test_count(int);
int /*<<< orphan*/ test_rand(char *);
int main(int argc, char *argv[]) {
  test_count(50000);
  test_count(10);
  char name[] = "test/r01.in";
  test_rand(name);
  blkfree_all();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xc350,%edi
call   1030 <test_count@plt>
mov    $0xa,%edi
call   1030 <test_count@plt>
mov    0xe9f(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xe9d(%rip),%eax
mov    %eax,-0x14(%rbp)
lea    -0x1c(%rbp),%rdi
call   1040 <test_rand@plt>
mov    $0x0,%al
call   1050 <blkfree_all@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    $0xc350,%edi
call   1030 <test_count@plt>
mov    $0xa,%edi
call   1030 <test_count@plt>
movabs $0x3130722f74736574,%rax
72 30 31
mov    %rax,0x8(%rsp)
movl   $0x6e692e,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1040 <test_rand@plt>
xor    %eax,%eax
call   1050 <blkfree_all@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.name = [12 x i8] c"test/r01.in\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [12 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @test_count(i32 50000)
%8 = call i32 @test_count(i32 10)
%9 = bitcast [12 x i8]* %6 to i8*
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %6, i64 0, i64 0
%11 = call i32 @test_rand(i8* %10)
%12 = call i32 (...) @blkfree_all()
ret i32 0
}

LLVM IR (-O2):
@__const.main.name = [12 x i8] c"test/r01.in\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [12 x i8]
%4 = tail call i32 @test_count(i32 50000)
%5 = tail call i32 @test_count(i32 10)
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%7 = call i32 @test_rand(i8* %6)
%8 = call i32 (...) @blkfree_all()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ err_template(int, char *);
void errCondVar(int n_error) {
  err_template(n_error, "\nFalha ao manipular variaveis de condicao.\n");
}


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

x86 assembly (clang, -O2):
<errCondVar>:
lea    0xee9(%rip),%rsi
jmp    1030 <err_template@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"\0AFalha ao manipular variaveis de condicao.\0A\00"
define void @errCondVar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @err_template(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"\0AFalha ao manipular variaveis de condicao.\0A\00"
define void @errCondVar(i32 %0) {
%2 = tail call i32 @err_template(i32 %0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}
void swapj(int v[], int i, int j) {
  int temp;
  temp = v[i];
  v[i] = v[j];
  v[j] = temp;
}


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

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

LLVM IR (-O0):
define void @swapj(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* %5
%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* %6
%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* %5
%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* %6
%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 @swapj(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 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
}
/* Variables and functions */
int /*<<< orphan*/ charts_store();
int /*<<< orphan*/ charts_term();
int /*<<< orphan*/ chartsdata_refresh();
void chartsdata_term(void) {
  chartsdata_refresh();
  charts_store();
  charts_term();
}


x86 assembly (clang, -O0):
<chartsdata_term>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <chartsdata_refresh@plt>
mov    $0x0,%al
call   1030 <charts_store@plt>
mov    $0x0,%al
call   1050 <charts_term@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chartsdata_term>:
push   %rax
xor    %eax,%eax
call   1040 <chartsdata_refresh@plt>
xor    %eax,%eax
call   1030 <charts_store@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <charts_term@plt>

LLVM IR (-O0):
define void @chartsdata_term() {
%1 = call i32 (...) @chartsdata_refresh()
%2 = call i32 (...) @charts_store()
%3 = call i32 (...) @charts_term()
ret void
}

LLVM IR (-O2):
define void @chartsdata_term() {
%1 = tail call i32 (...) @chartsdata_refresh()
%2 = tail call i32 (...) @charts_store()
%3 = tail call i32 (...) @charts_term()
ret void
}
main() {
  int a;
  a = 6;
  printf(a);
  a = a + 1;
  printf(a);
  f();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x6,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 6, i32* %1
%2 = load i32, i32* %1
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = call i32 (i8*, ...) @printf(i8* %4)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
%11 = call i32 (i8*, ...) @printf(i8* %10)
%12 = call i32 (...) @f()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 6 to i8*))
%2 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 7 to i8*))
%3 = tail call i32 (...) @f()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void xmlIndent(int indent, FILE *fp) {
  while (indent-- > 0)
    fprintf(fp, "  ");
}


x86 assembly (clang, -O0):
<xmlIndent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    1148 <xmlIndent+0x38>
mov    -0x10(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
jmp    111f <xmlIndent+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlIndent>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    114d <xmlIndent+0x3d>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%ebp
lea    0xed9(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   1030 <fwrite@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <xmlIndent+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
define void @xmlIndent(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 2, i64 1, i32* %1)
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %2
ret void
}
/* Type definitions */
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
int CHAR_MAX;
int _Locale_p_sep_by_space(struct _Locale_monetary *lmon
                           __attribute__((__unused__))) {
  return CHAR_MAX;
}


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

x86 assembly (clang, -O2):
<_Locale_p_sep_by_space>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_sep_by_space(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
%3 = load i32, i32* @CHAR_MAX
ret i32 %3
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_sep_by_space(%struct._Locale_monetary* nocapture readnone %0) {
%2 = load i32, i32* @CHAR_MAX
ret i32 %2
}
void acpi_video_unregister_backlight(void) { return; }


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

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

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

LLVM IR (-O2):
define void @acpi_video_unregister_backlight() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sub_immediate_test();
int /*<<< orphan*/ sub_memory_test();
int /*<<< orphan*/ sub_memory_with_borrow_test();
int /*<<< orphan*/ sub_register_test();
int /*<<< orphan*/ sub_register_with_borrow_test();
int main(int argc, const char *argv[]) {
  sub_register_test();
  sub_memory_test();
  sub_immediate_test();
  sub_register_with_borrow_test();
  sub_memory_with_borrow_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <sub_register_test@plt>
mov    $0x0,%al
call   1070 <sub_memory_test@plt>
mov    $0x0,%al
call   1060 <sub_immediate_test@plt>
mov    $0x0,%al
call   1030 <sub_register_with_borrow_test@plt>
mov    $0x0,%al
call   1040 <sub_memory_with_borrow_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <sub_register_test@plt>
xor    %eax,%eax
call   1070 <sub_memory_test@plt>
xor    %eax,%eax
call   1060 <sub_immediate_test@plt>
xor    %eax,%eax
call   1030 <sub_register_with_borrow_test@plt>
xor    %eax,%eax
call   1040 <sub_memory_with_borrow_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @sub_register_test()
%7 = call i32 (...) @sub_memory_test()
%8 = call i32 (...) @sub_immediate_test()
%9 = call i32 (...) @sub_register_with_borrow_test()
%10 = call i32 (...) @sub_memory_with_borrow_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @sub_register_test()
%4 = tail call i32 (...) @sub_memory_test()
%5 = tail call i32 (...) @sub_immediate_test()
%6 = tail call i32 (...) @sub_register_with_borrow_test()
%7 = tail call i32 (...) @sub_memory_with_borrow_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xba() {
  Assert_real((isxdigit(186) == 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_isxdigit.c",
              935, ("isxdigit should be 0 for 0xba"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xba>:
push   %rax
mov    $0xba,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3a7,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xba\00"
define void @t_isxdigit_0xba() {
%1 = call i64 @isxdigit(i32 186)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 935, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xba\00"
define void @t_isxdigit_0xba() {
%1 = tail call i64 @isxdigit(i32 186)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 935, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRED_set(void) { return U_WMRCORENONE_set("U_WMRED"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRED\00"
define i8* @U_WMRED_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRED\00"
define i8* @U_WMRED_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
char *strchr(char *, char);
char *terminate_string_at_first_slash_n(char *str) {
  char *ptr;
  ptr = strchr(str, '\n');
  if (ptr != NULL) {
    *ptr = '\0';
  }
  return str;
}


x86 assembly (clang, -O0):
<terminate_string_at_first_slash_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <terminate_string_at_first_slash_n+0x30>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminate_string_at_first_slash_n>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1126 <terminate_string_at_first_slash_n+0x16>
movb   $0x0,(%rax)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @terminate_string_at_first_slash_n(i8* returned %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret i8* %0
}
/* Type definitions */
struct dat {
  int dummy;
};

/* Variables and functions */
int __insert_pattern(struct dat *, unsigned char *, unsigned long,
                     unsigned long, int /*<<< orphan*/, void *);
int insert_pattern(struct dat *d, unsigned char *key, unsigned long key_len,
                   unsigned long attr, void *data) {
  return __insert_pattern(d, key, key_len, attr, 0, data);
}


x86 assembly (clang, -O0):
<insert_pattern>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r9
xor    %r8d,%r8d
call   1030 <__insert_pattern@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_pattern>:
mov    %r8,%r9
xor    %r8d,%r8d
jmp    1030 <__insert_pattern@plt>

LLVM IR (-O0):
%struct.dat = type { i32 }
define i32 @insert_pattern(%struct.dat* %0, i8* %1, i64 %2, i64 %3, i8* %4) {
%6 = alloca %struct.dat*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
store %struct.dat* %0, %struct.dat** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i8* %4, i8** %10
%11 = load %struct.dat*, %struct.dat** %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = load i64, i64* %9
%15 = load i8*, i8** %10
%16 = call i32 @__insert_pattern(%struct.dat* %11, i8* %12, i64 %13, i64 %14, i32 0, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.dat = type { i32 }
define i32 @insert_pattern(%struct.dat* %0, i8* %1, i64 %2, i64 %3, i8* %4) {
%6 = tail call i32 @__insert_pattern(%struct.dat* %0, i8* %1, i64 %2, i64 %3, i32 0, i8* %4)
ret i32 %6
}
void RTLdrSize(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLdrSize() {
ret void
}
/* Variables and functions */
void *ft_memalloc(size_t);
int /*<<< orphan*/ ft_memset(void *, char, size_t);
char *ft_strnew(size_t size) {
  void *str;
  str = ft_memalloc(size + 1);
  if (str == NULL)
    return (NULL);
  ft_memset(str, '\0', size + 1);
  return ((char *)str);
}


x86 assembly (clang, -O0):
<ft_strnew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <ft_memalloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1155 <ft_strnew+0x35>
movq   $0x0,-0x8(%rbp)
jmp    1170 <ft_strnew+0x50>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
add    $0x1,%rdx
xor    %esi,%esi
call   1030 <ft_memset@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strnew>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0x1,%rbx
mov    %rbx,%rdi
call   1040 <ft_memalloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1148 <ft_strnew+0x28>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <ft_memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ft_strnew(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = add i64 %5, 1
%7 = call i8* @ft_memalloc(i64 %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i8* null, i8** %2
br label %17
11: ; preds = %1
%12 = load i8*, i8** %4
%13 = load i64, i64* %3
%14 = add i64 %13, 1
%15 = call i32 @ft_memset(i8* %12, i8 signext 0, i64 %14)
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %11, %10
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @ft_strnew(i64 %0) {
%2 = add i64 %0, 1
%3 = tail call i8* @ft_memalloc(i64 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @ft_memset(i8* %3, i8 signext 0, i64 %2)
br label %7
7: ; preds = %1, %5
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int usage(char *argv0) {
  fprintf(stderr, "usage: %s [-h|-r] [-t] <filename>\n", argv0);
  fprintf(stderr, "\t<filename>:\tfilename of network, csv format.\n"
                  "\t-h:\t\tuse High Degree Adaptive Attack (HDA). \n"
                  "\t-r:\t\tuse random attack (HDA).\n"
                  "\t-t:\t\tshow elapsed time of robustness calculation.\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeef(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"usage: %s [-h|-r] [-t] <filename>\0A\00"
@.str.1 = [175 x i8] c"\09<filename>:\09filename of network, csv format.\0A\09-h:\09\09use High Degree Adaptive Attack (HDA). \0A\09-r:\09\09use random attack (HDA).\0A\09-t:\09\09show elapsed time of robustness calculation.\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"usage: %s [-h|-r] [-t] <filename>\0A\00"
@.str.1 = [175 x i8] c"\09<filename>:\09filename of network, csv format.\0A\09-h:\09\09use High Degree Adaptive Attack (HDA). \0A\09-r:\09\09use random attack (HDA).\0A\09-t:\09\09show elapsed time of robustness calculation.\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int execvpe(const char *path, char *const argv[], char *const envp[]) {
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<execvpe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<execvpe>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @execvpe(i8* %0, i8** %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = load i32, i32* @EINVAL
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @execvpe(i8* nocapture readnone %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = load i32, i32* @EINVAL
store i32 %4, i32* @errno
ret i32 -1
}
void ff_hevc_put_hevc_uni_qpel_hv64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_hv64_10_sse4() {
ret void
}
const char *ajResourceinTypeGetFields(void) { return "id acc"; }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"id acc\00"
define i8* @ajResourceinTypeGetFields() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}