xunge/DecIR huggingface dataset:
int isInCircle(double x, double y) {
  return (x - 0.5) * (x - 0.5) + (y - 0.5) * (y - 0.5) <= 0.5 * 0.5;
}


x86 assembly (clang, -O0):
<isInCircle>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeed(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  0xedc(%rip),%xmm0
subsd  %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
movsd  0xecb(%rip),%xmm3
subsd  %xmm3,%xmm0
movsd  -0x10(%rbp),%xmm3
movsd  0xeba(%rip),%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe9a(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isInCircle>:
movsd  0xef8(%rip),%xmm2
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xee4(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @isInCircle(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fsub double %5, 5.000000e-01
%7 = load double, double* %3
%8 = fsub double %7, 5.000000e-01
%9 = load double, double* %4
%10 = fsub double %9, 5.000000e-01
%11 = load double, double* %4
%12 = fsub double %11, 5.000000e-01
%13 = fmul double %10, %12
%14 = call double @llvm.fmuladd.f64(double %6, double %8, double %13)
%15 = fcmp ole double %14, 2.500000e-01
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isInCircle(double %0, double %1) {
%3 = fadd double %0, -5.000000e-01
%4 = fadd double %1, -5.000000e-01
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %3, double %3, double %5)
%7 = fcmp ole double %6, 2.500000e-01
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i, j;
  i = 2;
  j = 2;
  printf("%d", i + j);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
/* Variables and functions */
int printf(char *);
int puts(const char *str) {
  return printf("We took control over your C library! \n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"We took control over your C library! \0A\00"
define i32 @puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}

LLVM IR (-O2):
@.str = [39 x i8] c"We took control over your C library! \0A\00"
define i32 @puts(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
int sysfs_rename_dir(struct kobject *k, const char *new_name) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.kobject = type opaque
define i32 @sysfs_rename_dir(%struct.kobject* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
char *numio_version(void) {
  return ("numio : V1.38 Peter Boesecke 2013-03-20");
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"numio : V1.38 Peter Boesecke 2013-03-20\00"
define i8* @numio_version() {
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [40 x i8] c"numio : V1.38 Peter Boesecke 2013-03-20\00"
define i8* @numio_version() {
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int RAND_MAX;
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  printf("On this computer, RAND_MAX = %d.\n", RAND_MAX);
  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    0x2ebb(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"On this computer, RAND_MAX = %d.\0A\00"
@RAND_MAX = global i32 0
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 = load i32, i32* @RAND_MAX
%7 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"On this computer, RAND_MAX = %d.\0A\00"
@RAND_MAX = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @RAND_MAX
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int Run_OF_filter(int send_job_rw_timeout, int *of_pid, int *of_stdin,
                  int *of_stderr, int output, char **outbuf, int *outmax,
                  int *outlen, struct job *job, char *id, int terminate_of,
                  char *msgbuffer, int msglen) {}


x86 assembly (clang, -O0):
<Run_OF_filter>:
push   %rbp
mov    %rsp,%rbp
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.job = type opaque
define i32 @Run_OF_filter(i32 %0, i32* %1, i32* %2, i32* %3, i32 %4, i8** %5, i32* %6, i32* %7, %struct.job* %8, i8* %9, i32 %10, i8* %11, i32 %12) {
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32
%20 = alloca i8**
%21 = alloca i32*
%22 = alloca i32*
%23 = alloca %struct.job*
%24 = alloca i8*
%25 = alloca i32
%26 = alloca i8*
%27 = alloca i32
store i32 %0, i32* %15
store i32* %1, i32** %16
store i32* %2, i32** %17
store i32* %3, i32** %18
store i32 %4, i32* %19
store i8** %5, i8*** %20
store i32* %6, i32** %21
store i32* %7, i32** %22
store %struct.job* %8, %struct.job** %23
store i8* %9, i8** %24
store i32 %10, i32* %25
store i8* %11, i8** %26
store i32 %12, i32* %27
%28 = load i32, i32* %14
ret i32 %28
}

LLVM IR (-O2):
%struct.job = type opaque
define i32 @Run_OF_filter(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i32 %4, i8** nocapture readnone %5, i32* nocapture readnone %6, i32* nocapture readnone %7, %struct.job* nocapture readnone %8, i8* nocapture readnone %9, i32 %10, i8* nocapture readnone %11, i32 %12) {
ret i32 undef
}
/* Type definitions */
struct globals {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_lists(struct globals *);
int /*<<< orphan*/ compile_vis_data(struct globals *);
int /*<<< orphan*/ parse_orig_list(struct globals *);
int /*<<< orphan*/ parse_transtable_local(struct globals *);
int /*<<< orphan*/ register_interfaces(struct globals *);
int /*<<< orphan*/ vis_publish_data(struct globals *);
int vis_update_data(struct globals *globals) {
  clear_lists(globals);
  register_interfaces(globals);
  parse_orig_list(globals);
  parse_transtable_local(globals);
  compile_vis_data(globals);
  vis_publish_data(globals);
  return 0;
}


x86 assembly (clang, -O0):
<vis_update_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1080 <clear_lists@plt>
mov    -0x8(%rbp),%rdi
call   1050 <register_interfaces@plt>
mov    -0x8(%rbp),%rdi
call   1070 <parse_orig_list@plt>
mov    -0x8(%rbp),%rdi
call   1040 <parse_transtable_local@plt>
mov    -0x8(%rbp),%rdi
call   1060 <compile_vis_data@plt>
mov    -0x8(%rbp),%rdi
call   1030 <vis_publish_data@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vis_update_data>:
push   %rbx
mov    %rdi,%rbx
call   1080 <clear_lists@plt>
mov    %rbx,%rdi
call   1050 <register_interfaces@plt>
mov    %rbx,%rdi
call   1070 <parse_orig_list@plt>
mov    %rbx,%rdi
call   1040 <parse_transtable_local@plt>
mov    %rbx,%rdi
call   1060 <compile_vis_data@plt>
mov    %rbx,%rdi
call   1030 <vis_publish_data@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.globals = type { i32 }
define i32 @vis_update_data(%struct.globals* %0) {
%2 = alloca %struct.globals*
store %struct.globals* %0, %struct.globals** %2
%3 = load %struct.globals*, %struct.globals** %2
%4 = call i32 @clear_lists(%struct.globals* %3)
%5 = load %struct.globals*, %struct.globals** %2
%6 = call i32 @register_interfaces(%struct.globals* %5)
%7 = load %struct.globals*, %struct.globals** %2
%8 = call i32 @parse_orig_list(%struct.globals* %7)
%9 = load %struct.globals*, %struct.globals** %2
%10 = call i32 @parse_transtable_local(%struct.globals* %9)
%11 = load %struct.globals*, %struct.globals** %2
%12 = call i32 @compile_vis_data(%struct.globals* %11)
%13 = load %struct.globals*, %struct.globals** %2
%14 = call i32 @vis_publish_data(%struct.globals* %13)
ret i32 0
}

LLVM IR (-O2):
%struct.globals = type { i32 }
define i32 @vis_update_data(%struct.globals* %0) {
%2 = tail call i32 @clear_lists(%struct.globals* %0)
%3 = tail call i32 @register_interfaces(%struct.globals* %0)
%4 = tail call i32 @parse_orig_list(%struct.globals* %0)
%5 = tail call i32 @parse_transtable_local(%struct.globals* %0)
%6 = tail call i32 @compile_vis_data(%struct.globals* %0)
%7 = tail call i32 @vis_publish_data(%struct.globals* %0)
ret i32 0
}
void Frame2Time(unsigned frame, int *Min, int *Sec, int *Fra) {
  *Min = (int)(frame / (60 * 75));
  frame -= *Min * 60 * 75;
  *Sec = (int)(frame / 75);
  frame -= *Sec * 75;
  *Fra = (int)frame;
}


x86 assembly (clang, -O0):
<Frame2Time>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x1194,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
imul   $0x3c,(%rax),%eax
imul   $0x4b,%eax,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4b,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
imul   $0x4b,(%rax),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Frame2Time>:
mov    %edi,%r8d
mov    $0xe90452d5,%eax
imul   %r8,%rax
shr    $0x2c,%rax
mov    %eax,(%rsi)
imul   $0xffffee6c,%eax,%eax
add    %edi,%eax
imul   $0x1b4e81b5,%rax,%rsi
shr    $0x23,%rsi
mov    %esi,(%rdx)
imul   $0xffffffb5,%esi,%edx
add    %eax,%edx
mov    %edx,(%rcx)
ret

LLVM IR (-O0):
define void @Frame2Time(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = udiv i32 %9, 4500
%11 = load i32*, i32** %6
store i32 %10, i32* %11
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = mul nsw i32 %13, 60
%15 = mul nsw i32 %14, 75
%16 = load i32, i32* %5
%17 = sub i32 %16, %15
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = udiv i32 %18, 75
%20 = load i32*, i32** %7
store i32 %19, i32* %20
%21 = load i32*, i32** %7
%22 = load i32, i32* %21
%23 = mul nsw i32 %22, 75
%24 = load i32, i32* %5
%25 = sub i32 %24, %23
store i32 %25, i32* %5
%26 = load i32, i32* %5
%27 = load i32*, i32** %8
store i32 %26, i32* %27
ret void
}

LLVM IR (-O2):
define void @Frame2Time(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = udiv i32 %0, 4500
store i32 %5, i32* %1
%6 = mul i32 %5, -4500
%7 = add i32 %6, %0
%8 = udiv i32 %7, 75
store i32 %8, i32* %2
%9 = mul i32 %8, -75
%10 = add i32 %9, %7
store i32 %10, i32* %3
ret void
}
/* Variables and functions */
int compileString(char const *);
int /*<<< orphan*/ getTable(char const *);
int lou_compileString(const char *tableList, const char *inString) {
  if (!getTable(tableList))
    return 0;
  return compileString(inString);
}


x86 assembly (clang, -O0):
<lou_compileString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <getTable@plt>
cmp    $0x0,%eax
jne    114e <lou_compileString+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    115a <lou_compileString+0x3a>
mov    -0x18(%rbp),%rdi
call   1030 <compileString@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lou_compileString>:
push   %rbx
mov    %rsi,%rbx
call   1040 <getTable@plt>
test   %eax,%eax
je     1136 <lou_compileString+0x16>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <compileString@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @lou_compileString(i8* %0, i8* %1) {
%3 = tail call i32 @getTable(i8* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @compileString(i8* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegWriteByte(int /*<<< orphan*/, int,
                                      int /*<<< orphan*/);
void wiznetSetSocketRXBufferSize(uint8_t socket, uint8_t size) {
  wiznetRegWriteByte(socket, (0x0000 + 0x001E), size);
}


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

x86 assembly (clang, -O2):
<wiznetSetSocketRXBufferSize>:
mov    %esi,%edx
mov    $0x1e,%esi
jmp    1030 <wiznetRegWriteByte@plt>

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

LLVM IR (-O2):
define void @wiznetSetSocketRXBufferSize(i32 %0, i32 %1) {
%3 = tail call i32 @wiznetRegWriteByte(i32 %0, i32 30, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, long long);
void f6(int x, int y, int z, long long w) {
  printf("f6: %d %d %d %lld\n", x, y, z, w);
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"f6: %d %d %d %lld\0A\00"
define void @f6(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i64, i64* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i64 %12)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"f6: %d %d %d %lld\0A\00"
define void @f6(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i64 %3)
ret void
}
void abc7defghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @abc7defghijklmnopqrstuvwxzy() {
ret void
}
void *back_imp() {}


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

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

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

LLVM IR (-O2):
define noalias i8* @back_imp() {
ret i8* undef
}
/* Type definitions */
struct genlist_link {
  int dummy;
};
struct genlist {
  int dummy;
};
struct fileinfo_list_link {
  int dummy;
};
struct fileinfo_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_erase(struct genlist *, struct genlist_link *);
void fileinfo_list_erase(struct fileinfo_list *tthis,
                         struct fileinfo_list_link *plink) {
  genlist_erase((struct genlist *)tthis, (struct genlist_link *)plink);
}


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

x86 assembly (clang, -O2):
<fileinfo_list_erase>:
jmp    1030 <genlist_erase@plt>

LLVM IR (-O0):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @fileinfo_list_erase(%struct.fileinfo_list* %0, %struct.fileinfo_list_link* %1) {
%3 = alloca %struct.fileinfo_list*
%4 = alloca %struct.fileinfo_list_link*
store %struct.fileinfo_list* %0, %struct.fileinfo_list** %3
store %struct.fileinfo_list_link* %1, %struct.fileinfo_list_link** %4
%5 = load %struct.fileinfo_list*, %struct.fileinfo_list** %3
%6 = bitcast %struct.fileinfo_list* %5 to %struct.genlist*
%7 = load %struct.fileinfo_list_link*, %struct.fileinfo_list_link** %4
%8 = bitcast %struct.fileinfo_list_link* %7 to %struct.genlist_link*
%9 = call i32 @genlist_erase(%struct.genlist* %6, %struct.genlist_link* %8)
ret void
}

LLVM IR (-O2):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @fileinfo_list_erase(%struct.fileinfo_list* %0, %struct.fileinfo_list_link* %1) {
%3 = bitcast %struct.fileinfo_list* %0 to %struct.genlist*
%4 = bitcast %struct.fileinfo_list_link* %1 to %struct.genlist_link*
%5 = tail call i32 @genlist_erase(%struct.genlist* %3, %struct.genlist_link* %4)
ret void
}
/* Variables and functions */
int clock();
double getCpuTime() {
  int c;
  c = clock();
  return c;
}


x86 assembly (clang, -O0):
<getCpuTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCpuTime>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @getCpuTime() {
%1 = alloca i32
%2 = call i32 (...) @clock()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = sitofp i32 %3 to double
ret double %4
}

LLVM IR (-O2):
define double @getCpuTime() {
%1 = tail call i32 (...) @clock()
%2 = sitofp i32 %1 to double
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Atom;

/* Variables and functions */
int /*<<< orphan*/ False;
scalar_t__ None;
scalar_t__ XGetSelectionOwner(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ XInternAtom(int /*<<< orphan*/ *, char *,
                               int /*<<< orphan*/);
int _DtTestLock(Display *display, char *lock_name) {
  Atom lock_atom;
  lock_atom = XInternAtom(display, lock_name, False);
  if (XGetSelectionOwner(display, lock_atom) == None)
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<_DtTestLock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
call   1040 <XInternAtom@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <XGetSelectionOwner@plt>
mov    0x2e84(%rip),%rcx
cmp    (%rcx),%rax
jne    1171 <_DtTestLock+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1178 <_DtTestLock+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_DtTestLock>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
call   1040 <XInternAtom@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <XGetSelectionOwner@plt>
mov    0x2e9d(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@False = global i32 0
@None = global i64 0
define i32 @_DtTestLock(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* @False
%10 = call i32 @XInternAtom(i32* %7, i8* %8, i32 %9)
store i32 %10, i32* %6
%11 = load i32*, i32** %4
%12 = load i32, i32* %6
%13 = call i64 @XGetSelectionOwner(i32* %11, i32 %12)
%14 = load i64, i64* @None
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 0, i32* %3
br label %18
17: ; preds = %2
store i32 1, i32* %3
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@False = global i32 0
@None = global i64 0
define i32 @_DtTestLock(i32* %0, i8* %1) {
%3 = load i32, i32* @False
%4 = tail call i32 @XInternAtom(i32* %0, i8* %1, i32 %3)
%5 = tail call i64 @XGetSelectionOwner(i32* %0, i32 %4)
%6 = load i64, i64* @None
%7 = icmp ne i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
int t1_3d_init_ctxno_mag(unsigned int f, int f2) {
  int n;
  if (!(f2 & 0x0002)) {
    n = (f & ((0x00000010 | 0x00000020 | 0x00000040 | 0x00000080 | 0x00000100 |
               0x00000200)))
            ? 1
            : 0;
  } else {
    n = 2;
  }
  return (((0 + 1) + 16) + n);
}


x86 assembly (clang, -O0):
<t1_3d_init_ctxno_mag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    1137 <t1_3d_init_ctxno_mag+0x37>
mov    -0x4(%rbp),%edx
and    $0x3f0,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    113e <t1_3d_init_ctxno_mag+0x3e>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x11,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_3d_init_ctxno_mag>:
and    $0x3f0,%edi
cmp    $0x1,%edi
mov    $0x12,%ecx
sbb    $0x0,%ecx
test   $0x2,%sil
mov    $0x13,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @t1_3d_init_ctxno_mag(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = and i32 %6, 2
%8 = icmp ne i32 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %2
%10 = load i32, i32* %3
%11 = and i32 %10, 1008
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
store i32 %14, i32* %5
br label %16
15: ; preds = %2
store i32 2, i32* %5
br label %16
16: ; preds = %15, %9
%17 = load i32, i32* %5
%18 = add nsw i32 17, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @t1_3d_init_ctxno_mag(i32 %0, i32 %1) {
%3 = and i32 %1, 2
%4 = icmp eq i32 %3, 0
%5 = and i32 %0, 1008
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 17, i32 18
%8 = select i1 %4, i32 %7, i32 19
ret i32 %8
}
long long min(long long in1, long long in2) {
  if (in1 < in2)
    return in1;
  else
    return in2;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1127 <min+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <min+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @min(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ errno;
char *strdup(char *);
int /*<<< orphan*/ strerror_l(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ xerr(char *, int /*<<< orphan*/);
char *estrdup(char *s) {
  if (!(s = strdup(s)))
    xerr("strdup: %s", strerror_l(errno, 0));
  return s;
}


x86 assembly (clang, -O0):
<estrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1171 <estrdup+0x41>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <strerror_l@plt>
mov    %eax,%esi
lea    0xe94(%rip),%rdi
call   1040 <xerr@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrdup>:
push   %rbx
call   1050 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115c <estrdup+0x2c>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <strerror_l@plt>
lea    0xeab(%rip),%rdi
mov    %eax,%esi
call   1040 <xerr@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"strdup: %s\00"
@errno = global i32 0
define i8* @estrdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strdup(i8* %3)
store i8* %4, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* @errno
%8 = call i32 @strerror_l(i32 %7, i32 0)
%9 = call i32 @xerr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %6, %1
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [11 x i8] c"strdup: %s\00"
@errno = global i32 0
define noalias i8* @estrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i32 @strerror_l(i32 %5, i32 0)
%7 = tail call i32 @xerr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
scalar_t__ isspace(char);
scalar_t__ strtol(char *, char **, int);
int nextint(char *instr, int *ptr) {
  int i = *ptr;
  while (isspace(*(instr + i))) {
    i++;
  }
  return (int)strtol(instr + i, (char **)NULL, 10);
}


x86 assembly (clang, -O0):
<nextint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1162 <nextint+0x42>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <nextint+0x19>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextint>:
push   %rbx
movslq (%rsi),%rax
lea    (%rax,%rdi,1),%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1130 <nextint+0x10>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
pop    %rbx
jmp    1040 <strtol@plt>

LLVM IR (-O0):
define i32 @nextint(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
store i32 %7, i32* %5
br label %8
8: ; preds = %16, %2
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = call i64 @isspace(i8 signext %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %8
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %8
19: ; preds = %8
%20 = load i8*, i8** %3
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = call i64 @strtol(i8* %23, i8** null, i32 10)
%25 = trunc i64 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @nextint(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
br label %5
5: ; preds = %5, %2
%6 = phi i64 [ %11, %5 ], [ %4, %2 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i64 @isspace(i8 signext %8)
%10 = icmp eq i64 %9, 0
%11 = add i64 %6, 1
br i1 %10, label %12, label %5
12: ; preds = %5
%13 = getelementptr inbounds i8, i8* %0, i64 %6
%14 = tail call i64 @strtol(i8* nocapture %13, i8** null, i32 10)
%15 = trunc i64 %14 to i32
ret i32 %15
}
/* Variables and functions */
bool canWinNim(int n) { return n % 4; }


x86 assembly (clang, -O0):
<canWinNim>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<canWinNim>:
mov    %edi,%eax
lea    0x3(%rax),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @canWinNim(i32 %0) {
%2 = srem i32 %0, 4
ret i32 %2
}
void proc46() {}


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

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

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

LLVM IR (-O2):
define void @proc46() {
ret void
}
int chama(int *idade) {
  int E = 23;
  *idade = E;
  return (E);
}


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

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

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

LLVM IR (-O2):
define i32 @chama(i32* nocapture writeonly %0) {
store i32 23, i32* %0
ret i32 23
}
/* Variables and functions */
int /*<<< orphan*/ al_string_cat(char *, char *, int);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void al_ansi_escape_bg_reset(char *dest, int maxlen, int bg) {
  char buf[48] = {0};
  snprintf(buf, 48, "\\[\\e[0;38;5;%d;49;22m\\]", bg);
  al_string_cat(dest, buf, maxlen);
}


x86 assembly (clang, -O0):
<al_ansi_escape_bg_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%ecx
mov    $0x30,%esi
lea    0xe9b(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <al_string_cat@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<al_ansi_escape_bg_reset>:
push   %rbp
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %edx,%ecx
mov    %esi,%ebp
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xeb9(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x30,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <al_string_cat@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"\\[\\e[0;38;5;%d;49;22m\\]\00"
define void @al_ansi_escape_bg_reset(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [48 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = bitcast [48 x i8]* %7 to i8*
%9 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 0
%10 = load i32, i32* %6
%11 = call i32 @snprintf(i8* %9, i32 48, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i8*, i8** %4
%13 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 0
%14 = load i32, i32* %5
%15 = call i32 @al_string_cat(i8* %12, i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"\\[\\e[0;38;5;%d;49;22m\\]\00"
define void @al_ansi_escape_bg_reset(i8* %0, i32 %1, i32 %2) {
%4 = alloca [48 x i8]
%5 = getelementptr inbounds [48 x i8], [48 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 48, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = call i32 @al_string_cat(i8* %0, i8* %5, i32 %1)
ret void
}
float GeometrySchlick(float NdotL, float NdotV, float roughness) {
  float k = (roughness * roughness) * 0.5f;
  float NoVTerm = NdotV * (1.0f - k) + k;
  float NoLTerm = NdotL * (1.0f - k) + k;
  return (NdotL * NdotV) / (NoVTerm * NoLTerm);
}


x86 assembly (clang, -O0):
<GeometrySchlick>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  0xedf(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xec5(%rip),%xmm2
subss  -0x10(%rbp),%xmm2
movss  -0x10(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xea1(%rip),%xmm2
subss  -0x10(%rbp),%xmm2
movss  -0x10(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GeometrySchlick>:
mulss  %xmm2,%xmm2
mulss  0xef4(%rip),%xmm2
movss  0xef0(%rip),%xmm3
subss  %xmm2,%xmm3
movaps %xmm1,%xmm4
mulss  %xmm3,%xmm4
addss  %xmm2,%xmm4
mulss  %xmm0,%xmm3
addss  %xmm2,%xmm3
mulss  %xmm4,%xmm3
mulss  %xmm1,%xmm0
divss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @GeometrySchlick(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%10 = load float, float* %6
%11 = load float, float* %6
%12 = fmul float %10, %11
%13 = fmul float %12, 5.000000e-01
store float %13, float* %7
%14 = load float, float* %5
%15 = load float, float* %7
%16 = fsub float 1.000000e+00, %15
%17 = load float, float* %7
%18 = call float @llvm.fmuladd.f32(float %14, float %16, float %17)
store float %18, float* %8
%19 = load float, float* %4
%20 = load float, float* %7
%21 = fsub float 1.000000e+00, %20
%22 = load float, float* %7
%23 = call float @llvm.fmuladd.f32(float %19, float %21, float %22)
store float %23, float* %9
%24 = load float, float* %4
%25 = load float, float* %5
%26 = fmul float %24, %25
%27 = load float, float* %8
%28 = load float, float* %9
%29 = fmul float %27, %28
%30 = fdiv float %26, %29
ret float %30
}

LLVM IR (-O2):
define float @GeometrySchlick(float %0, float %1, float %2) {
%4 = fmul float %2, %2
%5 = fmul float %4, 5.000000e-01
%6 = fsub float 1.000000e+00, %5
%7 = tail call float @llvm.fmuladd.f32(float %1, float %6, float %5)
%8 = tail call float @llvm.fmuladd.f32(float %0, float %6, float %5)
%9 = fmul float %0, %1
%10 = fmul float %7, %8
%11 = fdiv float %9, %10
ret float %11
}
float accommon_calc_dimension(float value) { return value / 2.; }


x86 assembly (clang, -O0):
<accommon_calc_dimension>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<accommon_calc_dimension>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @accommon_calc_dimension(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double %4, 2.000000e+00
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @accommon_calc_dimension(float %0) {
%2 = fmul float %0, 5.000000e-01
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b, c;
  printf("Enter two numbers to add\n");
  scanf("%d%d", &a, &b);
  c = a + b;
  printf("Sum of entered numbers = %d\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Enter two numbers to add\0A\00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [29 x i8] c"Sum of entered numbers = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [29 x i8] c"Sum of entered numbers = %d\0A\00"
@str = [25 x i8] c"Enter two numbers to add\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _p(int, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
void _fail_eno(int line) {
  _p(line, "E", NULL);
  exit(1);
}


x86 assembly (clang, -O0):
<_fail_eno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xecb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <_p@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_fail_eno>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edx,%edx
call   1030 <_p@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"E\00"
define void @_fail_eno(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_p(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* null)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [2 x i8] c"E\00"
define void @_fail_eno(i32 %0) {
%2 = tail call i32 @_p(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* null)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct proxy_server {
  int dummy;
};
struct proxy_client {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct proxy_client *);
void proxy_server_notify_client_closed(struct proxy_server *ps,
                                       struct proxy_client *client) {
  free(client);
}


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

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

LLVM IR (-O0):
%struct.proxy_server = type { i32 }
%struct.proxy_client = type { i32 }
define void @proxy_server_notify_client_closed(%struct.proxy_server* %0, %struct.proxy_client* %1) {
%3 = alloca %struct.proxy_server*
%4 = alloca %struct.proxy_client*
store %struct.proxy_server* %0, %struct.proxy_server** %3
store %struct.proxy_client* %1, %struct.proxy_client** %4
%5 = load %struct.proxy_client*, %struct.proxy_client** %4
%6 = call i32 @free(%struct.proxy_client* %5)
ret void
}

LLVM IR (-O2):
%struct.proxy_server = type { i32 }
%struct.proxy_client = type { i32 }
define void @proxy_server_notify_client_closed(%struct.proxy_server* nocapture readnone %0, %struct.proxy_client* nocapture %1) {
%3 = tail call i32 @free(%struct.proxy_client* %1)
ret void
}
int test_imm_1Cint16_mem(short *val) {
  return ((*val) & (-0x1C << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_1Cint16_mem>:
movzwl (%rdi),%eax
test   $0xffe4,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Cint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -28
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char IN(int);
char phy_status(void) { return IN((0x60 | 0x0f)); }


x86 assembly (clang, -O0):
<phy_status>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6f,%edi
call   1030 <IN@plt>
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<phy_status>:
mov    $0x6f,%edi
jmp    1030 <IN@plt>

LLVM IR (-O0):
define signext i8 @phy_status() {
%1 = call signext i8 @IN(i32 111)
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @phy_status() {
%1 = tail call signext i8 @IN(i32 111)
ret i8 %1
}
unsigned int rt2x00crypto_tx_overhead(struct rt2x00_dev *rt2x00dev,
                                      struct sk_buff *skb) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.rt2x00_dev = type opaque
%struct.sk_buff = type opaque
define i32 @rt2x00crypto_tx_overhead(%struct.rt2x00_dev* nocapture readnone %0, %struct.sk_buff* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int putc(int, int /*<<< orphan*/ *);
int putc_unlocked(int c, FILE *stream) { return putc(c, stream); }


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

x86 assembly (clang, -O2):
<putc_unlocked>:
jmp    1030 <putc@plt>

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

LLVM IR (-O2):
define i32 @putc_unlocked(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @putc(i32 %0, i32* %1)
ret i32 %3
}