xunge/DecIR huggingface dataset:
/* Variables and functions */
double __ocml_atan_f64(double);
double atan(double x) { return __ocml_atan_f64(x); }


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

x86 assembly (clang, -O2):
<atan>:
jmp    1030 <__ocml_atan_f64@plt>

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

LLVM IR (-O2):
define double @atan(double %0) {
%2 = tail call double @__ocml_atan_f64(double %0)
ret double %2
}
int do_662() { return 662; }


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

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

LLVM IR (-O0):
define i32 @do_662() {
ret i32 662
}

LLVM IR (-O2):
define i32 @do_662() {
ret i32 662
}
/* Variables and functions */
double sqrt(int);
double calcDist(int _x1, int _y1, int _x2, int _y2) {
  return sqrt((_x1 - _x2) * (_x1 - _x2) + (_y1 - _y2) * (_y1 - _y2));
}


x86 assembly (clang, -O0):
<calcDist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
mov    -0x4(%rbp),%eax
sub    -0xc(%rbp),%eax
imul   %eax,%edi
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    -0x10(%rbp),%ecx
imul   %ecx,%eax
add    %eax,%edi
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcDist>:
sub    %edx,%edi
imul   %edi,%edi
sub    %ecx,%esi
imul   %esi,%esi
add    %esi,%edi
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @calcDist(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 = load i32, i32* %7
%11 = sub nsw i32 %9, %10
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = sub nsw i32 %12, %13
%15 = mul nsw i32 %11, %14
%16 = load i32, i32* %6
%17 = load i32, i32* %8
%18 = sub nsw i32 %16, %17
%19 = load i32, i32* %6
%20 = load i32, i32* %8
%21 = sub nsw i32 %19, %20
%22 = mul nsw i32 %18, %21
%23 = add nsw i32 %15, %22
%24 = call double @sqrt(i32 %23)
ret double %24
}

LLVM IR (-O2):
define double @calcDist(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %0, %2
%6 = mul nsw i32 %5, %5
%7 = sub nsw i32 %1, %3
%8 = mul nsw i32 %7, %7
%9 = add nuw nsw i32 %8, %6
%10 = tail call double @sqrt(i32 %9)
ret double %10
}
char conv_to_upper_case(char ch) {
  if (('a' <= ch) && (ch <= 'z')) {
    return (ch - 0x20);
  } else {
    return ch;
  }
}


x86 assembly (clang, -O0):
<conv_to_upper_case>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     1137 <conv_to_upper_case+0x37>
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     1137 <conv_to_upper_case+0x37>
movsbl -0x2(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    113d <conv_to_upper_case+0x3d>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_to_upper_case>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @conv_to_upper_case(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 97, %5
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @conv_to_upper_case(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
void median_init() {}


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

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

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

LLVM IR (-O2):
define void @median_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ bswap_64(int /*<<< orphan*/);
size_t fread(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
void read_bswap_write_64(FILE *in, FILE *out) {
  uint64_t buf = 0;
  size_t read;
  read = fread(&buf, 1, sizeof(buf), in);
  if (read == 0)
    return;
  buf = bswap_64(buf);
  fwrite(&buf, 1, sizeof(buf), out);
}


x86 assembly (clang, -O0):
<read_bswap_write_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1030 <fread@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1172 <read_bswap_write_64+0x42>
jmp    1194 <read_bswap_write_64+0x64>
mov    -0x14(%rbp),%edi
call   1040 <bswap_64@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1050 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_bswap_write_64>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rcx
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1030 <fread@plt>
test   %rax,%rax
je     1180 <read_bswap_write_64+0x50>
mov    0xc(%rsp),%edi
call   1040 <bswap_64@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @read_bswap_write_64(i32* nocapture %0, i32* nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i64 @fread(i32* %3, i32 1, i32 4, i32* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = tail call i32 @bswap_64(i32 %8)
store i32 %9, i32* %3
%10 = call i32 @fwrite(i32* %3, i32 1, i32 4, i32* %1)
br label %11
11: ; preds = %2, %7
ret void
}
/* Variables and functions */
__attribute__((always_)) void *__align_ptr(void *ptr, uintptr_t size) {
  uintptr_t offset = (uintptr_t)ptr;
  offset = (offset + size - 1U) & ~(size - 1U);
  return (void *)offset;
}


x86 assembly (clang, -O0):
<__align_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__align_ptr>:
lea    (%rsi,%rdi,1),%rax
add    $0xffffffffffffffff,%rax
neg    %rsi
and    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @__align_ptr(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
store i64 %7, i64* %5
%8 = load i64, i64* %5
%9 = load i64, i64* %4
%10 = add i64 %8, %9
%11 = sub i64 %10, 1
%12 = load i64, i64* %4
%13 = sub i64 %12, 1
%14 = xor i64 %13, -1
%15 = and i64 %11, %14
store i64 %15, i64* %5
%16 = load i64, i64* %5
%17 = inttoptr i64 %16 to i8*
ret i8* %17
}

LLVM IR (-O2):
define i8* @__align_ptr(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = add i64 %1, -1
%5 = add i64 %4, %3
%6 = sub i64 0, %1
%7 = and i64 %5, %6
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
void XAllocClassHint() {}


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

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

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

LLVM IR (-O2):
define void @XAllocClassHint() {
ret void
}
void init_sub_rel_pixel_mask_span_funcs_c(void) {}


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

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

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

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

/* Variables and functions */
uint32_t readuint32le(uint8_t arr[4]) {
  uint32_t v = arr[3];
  v = v * 0x100 + arr[2];
  v = v * 0x100 + arr[1];
  v = v * 0x100 + arr[0];
  return v;
}


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

x86 assembly (clang, -O2):
<readuint32le>:
mov    0xc(%rdi),%eax
shl    $0x8,%eax
add    0x8(%rdi),%eax
shl    $0x8,%eax
add    0x4(%rdi),%eax
shl    $0x8,%eax
add    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @readuint32le(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = shl nsw i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = add nsw i32 %4, %6
%8 = shl nsw i32 %7, 8
%9 = getelementptr inbounds i32, i32* %0, i64 1
%10 = load i32, i32* %9
%11 = add nsw i32 %8, %10
%12 = shl nsw i32 %11, 8
%13 = load i32, i32* %0
%14 = add nsw i32 %12, %13
ret i32 %14
}
/* Type definitions */
struct blob_buf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ blob_nest_end(struct blob_buf *, void *);
void blobmsg_close_array(struct blob_buf *buf, void *cookie) {
  blob_nest_end(buf, cookie);
}


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

x86 assembly (clang, -O2):
<blobmsg_close_array>:
jmp    1030 <blob_nest_end@plt>

LLVM IR (-O0):
%struct.blob_buf = type { i32 }
define void @blobmsg_close_array(%struct.blob_buf* %0, i8* %1) {
%3 = alloca %struct.blob_buf*
%4 = alloca i8*
store %struct.blob_buf* %0, %struct.blob_buf** %3
store i8* %1, i8** %4
%5 = load %struct.blob_buf*, %struct.blob_buf** %3
%6 = load i8*, i8** %4
%7 = call i32 @blob_nest_end(%struct.blob_buf* %5, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.blob_buf = type { i32 }
define void @blobmsg_close_array(%struct.blob_buf* %0, i8* %1) {
%3 = tail call i32 @blob_nest_end(%struct.blob_buf* %0, i8* %1)
ret void
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};
typedef int /*<<< orphan*/ Time;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
Time fake_timestamp() {
  int tint;
  struct timeval tv;
  struct timezone tz;
  gettimeofday(&tv, &tz);
  tint = (int)tv.tv_sec * 1000;
  tint = tint / 1000 * 1000;
  tint = tint + tv.tv_usec / 1000;
  return (Time)tint;
}


x86 assembly (clang, -O0):
<fake_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <gettimeofday@plt>
mov    -0x10(%rbp),%rax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0x3e8,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fake_timestamp>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x10(%rsp),%ecx
movslq 0x8(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
%struct.timezone = type { i32 }
define i32 @fake_timestamp() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = alloca %struct.timezone
%4 = call i32 @gettimeofday(%struct.timeval* %2, %struct.timezone* %3)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = mul nsw i32 %7, 1000
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = sdiv i32 %9, 1000
%11 = mul nsw i32 %10, 1000
store i32 %11, i32* %1
%12 = load i32, i32* %1
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%14 = load i32, i32* %13
%15 = sdiv i32 %14, 1000
%16 = add nsw i32 %12, %15
store i32 %16, i32* %1
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
%struct.timezone = type { i32 }
define i32 @fake_timestamp() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timezone* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %8, 1000
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%11 = load i32, i32* %10
%12 = sdiv i32 %11, 1000
%13 = add nsw i32 %9, %12
ret i32 %13
}
char *ft_strdup(const char *s1) {
  char *copy;
  int i;
  i = ft_strlen(s1);
  copy = (char *)malloc(i + 1);
  if (copy == '\0')
    return (0);
  ft_strcpy(copy, s1);
  return (copy);
}


x86 assembly (clang, -O0):
<ft_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <ft_strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1174 <ft_strdup+0x44>
movq   $0x0,-0x8(%rbp)
jmp    118b <ft_strdup+0x5b>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <ft_strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1040 <ft_strlen@plt>
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115e <ft_strdup+0x2e>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <ft_strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ft_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = add nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %15
14: ; preds = %1
store i8* null, i8** %2
br label %20
15: ; preds = %1
%16 = load i8*, i8** %4
%17 = load i8*, i8** %3
%18 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ft_strcpy to i32 (i8*, i8*, ...)*)(i8* %16, i8* %17)
%19 = load i8*, i8** %4
store i8* %19, i8** %2
br label %20
20: ; preds = %15, %14
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @ft_strdup(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ft_strcpy to i32 (i8*, i8*, ...)*)(i8* %5, i8* %0)
br label %9
9: ; preds = %1, %7
ret i8* %5
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_1a(int Salt, int Parameter) {
  unsigned b = Salt * 0x5B756AB9 + 0x7E9B;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_1a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x5b756ab9,-0x4(%rbp),%eax
add    $0x7e9b,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_1a>:
imul   $0x5b756ab9,%edi,%edi
add    $0x7e9b,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_1a(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 1534421689
%8 = add nsw i32 %7, 32411
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_1a(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 1534421689
%4 = add nsw i32 %3, 32411
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
void ff_hevc_put_hevc_uni_epel_hv48_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv48_8_sse4() {
ret void
}
e(n) int n;
{
  printf("\nError %d  ", n);
  perror("");
}


x86 assembly (clang, -O0):
<e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1040 <perror@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <perror@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"\0AError %d \00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @e(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char **argv) {
  char *x;
  for (;;) {
    if ((x = malloc(1 << 20)) == 0) {
      write(1, "X\n", 2);
      return 0;
    }
    free(x);
  }
  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    $0x100000,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    117c <main+0x4c>
mov    $0x1,%edi
lea    0xe96(%rip),%rsi
mov    $0x2,%edx
call   1040 <write@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
jmp    1146 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x100000,%edi
call   1050 <malloc@plt>
test   %rax,%rax
je     1159 <main+0x29>
mov    %rax,%rdi
call   1030 <free@plt>
jmp    1140 <main+0x10>
lea    0xea0(%rip),%rsi
mov    $0x1,%edi
mov    $0x2,%edx
call   1040 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"X\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %12, %2
%8 = call i8* @malloc(i32 1048576)
store i8* %8, i8** %6
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
12: ; preds = %7
%13 = load i8*, i8** %6
%14 = call i32 @free(i8* %13)
br label %7
}

LLVM IR (-O2):
@.str = [3 x i8] c"X\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(1048576) i8* @malloc(i32 1048576)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %7, %2
%6 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
7: ; preds = %2, %7
%8 = phi i8* [ %10, %7 ], [ %3, %2 ]
%9 = tail call i32 @free(i8* %8)
%10 = tail call dereferenceable_or_null(1048576) i8* @malloc(i32 1048576)
%11 = icmp eq i8* %10, null
br i1 %11, label %5, label %7
}
int popcount(unsigned int x) { return __builtin_popcount(x); }


x86 assembly (clang, -O0):
<popcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcount>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
ret

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

LLVM IR (-O2):
define i32 @popcount(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
ret i32 %2
}
/* Type definitions */
struct jffs2_raw_dirent {
  int dummy;
};
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
struct jffs2_raw_dirent *resolvedirent(char *, size_t, int /*<<< orphan*/,
                                       int /*<<< orphan*/, int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
struct jffs2_raw_dirent *resolveinode(char *o, size_t size, __u32 ino) {
  return resolvedirent(o, size, ino, 0, NULL, 0);
}


x86 assembly (clang, -O0):
<resolveinode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %r9d,%r9d
xor    %eax,%eax
mov    %eax,%r8d
mov    %r9d,%ecx
call   1030 <resolvedirent@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resolveinode>:
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <resolvedirent@plt>

LLVM IR (-O0):
%struct.jffs2_raw_dirent = type { i32 }
define %struct.jffs2_raw_dirent* @resolveinode(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
%10 = call %struct.jffs2_raw_dirent* @resolvedirent(i8* %7, i64 %8, i32 %9, i32 0, i32* null, i32 0)
ret %struct.jffs2_raw_dirent* %10
}

LLVM IR (-O2):
%struct.jffs2_raw_dirent = type { i32 }
define %struct.jffs2_raw_dirent* @resolveinode(i8* %0, i64 %1, i32 %2) {
%4 = tail call %struct.jffs2_raw_dirent* @resolvedirent(i8* %0, i64 %1, i32 %2, i32 0, i32* null, i32 0)
ret %struct.jffs2_raw_dirent* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[], char *envp[]) {
  while (1) {
    printf("k");
  }
  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    %rdx,-0x18(%rbp)
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
jmp    112a <main+0x1a>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x6b,%edi
call   1030 <putchar@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [2 x i8] c"k\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
br label %8
8: ; preds = %3, %8
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
br label %4
4: ; preds = %3, %4
%5 = tail call i32 @putchar(i32 107)
br label %4
}
/* Type definitions */
struct node {
  int dummy;
};
struct list {
  int dummy;
};

/* Variables and functions */
struct node *list_first(struct list *);
int /*<<< orphan*/ node_remove(struct node *);
struct node *list_remove_head(struct list *list) {
  struct node *node = list_first(list);
  if (node)
    node_remove(node);
  return node;
}


x86 assembly (clang, -O0):
<list_remove_head>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <list_first@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114d <list_remove_head+0x2d>
mov    -0x10(%rbp),%rdi
call   1030 <node_remove@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_remove_head>:
push   %rbx
call   1040 <list_first@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1136 <list_remove_head+0x16>
mov    %rbx,%rdi
call   1030 <node_remove@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
%struct.list = type { i32 }
define %struct.node* @list_remove_head(%struct.list* %0) {
%2 = alloca %struct.list*
%3 = alloca %struct.node*
store %struct.list* %0, %struct.list** %2
%4 = load %struct.list*, %struct.list** %2
%5 = call %struct.node* @list_first(%struct.list* %4)
store %struct.node* %5, %struct.node** %3
%6 = load %struct.node*, %struct.node** %3
%7 = icmp ne %struct.node* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load %struct.node*, %struct.node** %3
%10 = call i32 @node_remove(%struct.node* %9)
br label %11
11: ; preds = %8, %1
%12 = load %struct.node*, %struct.node** %3
ret %struct.node* %12
}

LLVM IR (-O2):
%struct.node = type { i32 }
%struct.list = type { i32 }
define %struct.node* @list_remove_head(%struct.list* %0) {
%2 = tail call %struct.node* @list_first(%struct.list* %0)
%3 = icmp eq %struct.node* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @node_remove(%struct.node* %2)
br label %6
6: ; preds = %4, %1
ret %struct.node* %2
}
/* Type definitions */
typedef char *uint32_t;

/* Variables and functions */
uint32_t bsf(uint32_t value) {
  uint32_t res;
  asm volatile("bsf %1,%0" : "=r"(res) : "r"(value));
  return res;
}


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

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

LLVM IR (-O0):
define i8* @bsf(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* asm sideeffect "bsf $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @bsf(i8* %0) {
%2 = tail call i8* asm sideeffect "bsf $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ outw(int, int /*<<< orphan*/);
void fw_cfg_select(uint16_t f) { outw(0x510, f); }


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

x86 assembly (clang, -O2):
<fw_cfg_select>:
mov    %edi,%esi
mov    $0x510,%edi
jmp    1030 <outw@plt>

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

LLVM IR (-O2):
define void @fw_cfg_select(i32 %0) {
%2 = tail call i32 @outw(i32 1296, i32 %0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ getcwd(char *, int);
char *malloc(int);
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  char *buf = malloc(256);
  getcwd(buf, 256);
  puts(buf);
  return EXIT_SUCCESS;
}


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    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
mov    -0x18(%rbp),%rdi
call   1030 <puts@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* @malloc(i32 256)
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @getcwd(i8* %8, i32 256)
%10 = load i8*, i8** %6
%11 = call i32 @puts(i8* %10)
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(256) i8* @malloc(i32 256)
%4 = tail call i32 @getcwd(i8* %3, i32 256)
%5 = tail call i32 @puts(i8* dereferenceable(1) %3)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int errno;
scalar_t__ stat(char const *, struct stat *);
int debugfs_valid_entry(const char *path) {
  struct stat st;
  if (stat(path, &st))
    return -errno;
  return 0;
}


x86 assembly (clang, -O0):
<debugfs_valid_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     1146 <debugfs_valid_entry+0x36>
xor    %eax,%eax
mov    0x2ea4(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <debugfs_valid_entry+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debugfs_valid_entry>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    0x2ec0(%rip),%rdx
xor    %ecx,%ecx
sub    (%rdx),%ecx
xor    %edx,%edx
test   %rax,%rax
cmove  %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@errno = global i32 0
define i32 @debugfs_valid_entry(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @errno
%10 = sub nsw i32 0, %9
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i32 0
define i32 @debugfs_valid_entry(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* @errno
%7 = sub nsw i32 0, %6
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ FLSv2MBusGPIO_sendMBus8bit(int, int);
void FLSv2MBusGPIO_sleep() { FLSv2MBusGPIO_sendMBus8bit(0x01, 0x00000000); }


x86 assembly (clang, -O0):
<FLSv2MBusGPIO_sleep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <FLSv2MBusGPIO_sendMBus8bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FLSv2MBusGPIO_sleep>:
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <FLSv2MBusGPIO_sendMBus8bit@plt>

LLVM IR (-O0):
define void @FLSv2MBusGPIO_sleep() {
%1 = call i32 @FLSv2MBusGPIO_sendMBus8bit(i32 1, i32 0)
ret void
}

LLVM IR (-O2):
define void @FLSv2MBusGPIO_sleep() {
%1 = tail call i32 @FLSv2MBusGPIO_sendMBus8bit(i32 1, i32 0)
ret void
}
/* Variables and functions */
scalar_t__ mxFree(void *);
void *__wrap_free(void *ptr) { return (void *)mxFree(ptr); }


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

x86 assembly (clang, -O2):
<__wrap_free>:
jmp    1030 <mxFree@plt>

LLVM IR (-O0):
define i8* @__wrap_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mxFree(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @__wrap_free(i8* %0) {
%2 = tail call i64 @mxFree(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int absval(unsigned int);
int h(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) {
  return absval(x2 - x1) + absval(y2 - y1);
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
sub    -0x4(%rbp),%edi
call   1030 <absval@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <absval@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%ebx
mov    %esi,%r14d
sub    %edi,%edx
mov    %edx,%edi
call   1030 <absval@plt>
mov    %eax,%ebp
sub    %r14d,%ebx
mov    %ebx,%edi
call   1030 <absval@plt>
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @h(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* %7
%10 = load i32, i32* %5
%11 = sub i32 %9, %10
%12 = call i32 @absval(i32 %11)
%13 = load i32, i32* %8
%14 = load i32, i32* %6
%15 = sub i32 %13, %14
%16 = call i32 @absval(i32 %15)
%17 = add nsw i32 %12, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @h(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub i32 %2, %0
%6 = tail call i32 @absval(i32 %5)
%7 = sub i32 %3, %1
%8 = tail call i32 @absval(i32 %7)
%9 = add nsw i32 %8, %6
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pstream_unlink() {
  printf("NOT IMPLEMENTED:"
         "pa_pstream_unlink"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"NOT IMPLEMENTED:pa_pstream_unlink\0A\00"
define i32 @pa_pstream_unlink() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_pstream_unlink\00"
define i32 @pa_pstream_unlink() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int fc8080_audio_select(void *, unsigned char, unsigned char);
int bbm_com_audio_select(void *handle, unsigned char subch_id,
                         unsigned char buf_id) {
  int res;
  res = fc8080_audio_select(handle, subch_id, buf_id);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_audio_select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
movzbl %al,%esi
movzbl -0xa(%rbp),%edx
call   1030 <fc8080_audio_select@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_audio_select>:
jmp    1030 <fc8080_audio_select@plt>

LLVM IR (-O0):
define i32 @bbm_com_audio_select(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8*, i8** %4
%9 = load i8, i8* %5
%10 = load i8, i8* %6
%11 = call i32 @fc8080_audio_select(i8* %8, i8 zeroext %9, i8 zeroext %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @bbm_com_audio_select(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 @fc8080_audio_select(i8* %0, i8 zeroext %1, i8 zeroext %2)
ret i32 %4
}
/* Variables and functions */
char *strdup(char const *);
char *callsystem_path_to_host(const char *str) { return strdup(str); }


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

x86 assembly (clang, -O2):
<callsystem_path_to_host>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @callsystem_path_to_host(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
/* Variables and functions */
int minusculas(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
main() {
  char x;
  printf("ingresa la letra: ");
  scanf("%c", &x);
  printf("su valor en minusculas es: %c\n", minusculas(x));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x1(%rbp),%edi
call   1040 <minusculas@plt>
mov    %eax,%esi
lea    0xeae(%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    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%edi
call   1040 <minusculas@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"ingresa la letra: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [31 x i8] c"su valor en minusculas es: %c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = call i32 @minusculas(i8 signext %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"ingresa la letra: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [31 x i8] c"su valor en minusculas es: %c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = call i32 @minusculas(i8 signext %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char *str;
  str = malloc(sizeof(char) * 15);
  strcpy(str, "hello world");
  printf("%s\n", str);
  free(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xf,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xf,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xeab(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcpy@plt>
lea    0xea8(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @malloc(i32 15)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %2
%9 = call i32 @free(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(15) i8* @malloc(i32 15)
%2 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
bool is_underscore(int c) {
  if (c == '_') {
    return true;
  }
  return false;
}


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

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

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

LLVM IR (-O2):
define i32 @is_underscore(i32 %0) {
%2 = icmp eq i32 %0, 95
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int tid;
#pragma omp parallel private(tid)
  {
    tid = omp_get_thread_num();
    printf("Hello World from thread = %d\n", tid);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [30 x i8] c"Hello World from thread = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @omp_get_thread_num()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ zhash_delete_test();
int /*<<< orphan*/ zhash_exists_test();
int /*<<< orphan*/ zhash_set_test();
int main() {
  zhash_set_test();
  zhash_delete_test();
  zhash_exists_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @zhash_set_test()
%2 = tail call i32 (...) @zhash_delete_test()
%3 = tail call i32 (...) @zhash_exists_test()
ret i32 0
}