xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_instr();
int main(void) {
  test_instr();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_instr()
ret i32 0
}
unsigned char f56(unsigned char x, unsigned long int y) {
  return (x << ((-y) & (8 - 1))) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f56>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0x7,%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f56>:
mov    %esi,%ecx
neg    %cl
and    $0x7,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f56(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = sub i64 0, %7
%9 = and i64 %8, 7
%10 = trunc i64 %9 to i32
%11 = shl i32 %6, %10
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = load i64, i64* %4
%15 = trunc i64 %14 to i32
%16 = ashr i32 %13, %15
%17 = xor i32 %11, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @f56(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 0, %4
%6 = and i32 %5, 7
%7 = shl nuw nsw i32 %3, %6
%8 = lshr i32 %3, %4
%9 = xor i32 %7, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ MultM(double **, double **, double **);
int /*<<< orphan*/ genXRotMatrix(double, double **);
void CoordRotX(double theta, double m[3][3]) {
  double a[3][3];
  genXRotMatrix(theta, a);
  MultM(m, a, m);
}


x86 assembly (clang, -O0):
<CoordRotX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x60(%rbp),%rdi
call   1040 <genXRotMatrix@plt>
mov    -0x10(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <MultM@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CoordRotX>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <genXRotMatrix@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <MultM@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @CoordRotX(double %0, [3 x double]* %1) {
%3 = alloca double
%4 = alloca [3 x double]*
%5 = alloca [3 x [3 x double]]
store double %0, double* %3
store [3 x double]* %1, [3 x double]** %4
%6 = load double, double* %3
%7 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 0
%8 = bitcast [3 x double]* %7 to double**
%9 = call i32 @genXRotMatrix(double %6, double** %8)
%10 = load [3 x double]*, [3 x double]** %4
%11 = bitcast [3 x double]* %10 to double**
%12 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 0
%13 = bitcast [3 x double]* %12 to double**
%14 = load [3 x double]*, [3 x double]** %4
%15 = bitcast [3 x double]* %14 to double**
%16 = call i32 @MultM(double** %11, double** %13, double** %15)
ret void
}

LLVM IR (-O2):
define void @CoordRotX(double %0, [3 x double]* %1) {
%3 = alloca [3 x [3 x double]]
%4 = bitcast [3 x [3 x double]]* %3 to i8*
%5 = bitcast [3 x [3 x double]]* %3 to double**
%6 = call i32 @genXRotMatrix(double %0, double** %5)
%7 = bitcast [3 x double]* %1 to double**
%8 = call i32 @MultM(double** %7, double** %5, double** %7)
ret void
}
int main() {
  int a = 5;
  int b = 10;
  int c = 2;
  int d;
  int e;
  c = b + a * b + 10 * a / c + 10 * 3 / 3;
  d = c * b + a / 2;
  e = d * c;
  if (e != 90440)
    return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
imul   $0xa,-0x8(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
add    $0xa,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x16148,-0x18(%rbp)
je     1181 <main+0x81>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 10, i32* %3
store i32 2, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = mul nsw i32 %8, %9
%11 = add nsw i32 %7, %10
%12 = load i32, i32* %2
%13 = mul nsw i32 10, %12
%14 = load i32, i32* %4
%15 = sdiv i32 %13, %14
%16 = add nsw i32 %11, %15
%17 = add nsw i32 %16, 10
store i32 %17, i32* %4
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = mul nsw i32 %18, %19
%21 = load i32, i32* %2
%22 = sdiv i32 %21, 2
%23 = add nsw i32 %20, %22
store i32 %23, i32* %5
%24 = load i32, i32* %5
%25 = load i32, i32* %4
%26 = mul nsw i32 %24, %25
store i32 %26, i32* %6
%27 = load i32, i32* %6
%28 = icmp ne i32 %27, 90440
br i1 %28, label %29, label %30
29: ; preds = %0
store i32 1, i32* %1
br label %30
30: ; preds = %29, %0
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int onSameRow(int cellOne, int cellTwo) {
  if (cellOne / 8 == cellTwo / 8)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<onSameRow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jne    113c <onSameRow+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1143 <onSameRow+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<onSameRow>:
lea    0x7(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
sar    $0x3,%ecx
lea    0x7(%rsi),%edx
test   %esi,%esi
cmovns %esi,%edx
sar    $0x3,%edx
xor    %eax,%eax
cmp    %edx,%ecx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @onSameRow(i32 %0, i32 %1) {
%3 = sdiv i32 %0, 8
%4 = sdiv i32 %1, 8
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int pck__foo__bar__minsym__2();
int main(void) {
  int val = pck__foo__bar__minsym__2();
  if (val != 124)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <pck__foo__bar__minsym__2@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x7c,-0x8(%rbp)
je     113f <main+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <main+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <pck__foo__bar__minsym__2@plt>
xor    %ecx,%ecx
cmp    $0x7c,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @pck__foo__bar__minsym__2()
%2 = icmp ne i32 %1, 124
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int f365(int *);
int f366(int *p) { return f365(p); }


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

x86 assembly (clang, -O2):
<f366>:
jmp    1030 <f365@plt>

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

LLVM IR (-O2):
define i32 @f366(i32* %0) {
%2 = tail call i32 @f365(i32* %0)
ret i32 %2
}
/* Variables and functions */
int mLogGenerateCategory(char *);
int _mLOG_CAT_CHEATS(void) {
  static int category = 0;
  if (!category) {
    category = mLogGenerateCategory("Cheats");
  }
  return category;
}


x86 assembly (clang, -O0):
<_mLOG_CAT_CHEATS>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    1133 <_mLOG_CAT_CHEATS+0x23>
lea    0xed8(%rip),%rdi
call   1030 <mLogGenerateCategory@plt>
mov    %eax,0x2ef9(%rip)
mov    0x2ef3(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mLOG_CAT_CHEATS>:
push   %rax
mov    0x2f15(%rip),%eax
test   %eax,%eax
je     111d <_mLOG_CAT_CHEATS+0xd>
pop    %rcx
ret
lea    0xedc(%rip),%rdi
call   1030 <mLogGenerateCategory@plt>
mov    %eax,0x2efd(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@_mLOG_CAT_CHEATS.category = internal global i32 0
@.str = [7 x i8] c"Cheats\00"
define i32 @_mLOG_CAT_CHEATS() {
%1 = load i32, i32* @_mLOG_CAT_CHEATS.category
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 @mLogGenerateCategory(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @_mLOG_CAT_CHEATS.category
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @_mLOG_CAT_CHEATS.category
ret i32 %6
}

LLVM IR (-O2):
@_mLOG_CAT_CHEATS.category = internal unnamed_addr global i32 0
@.str = [7 x i8] c"Cheats\00"
define i32 @_mLOG_CAT_CHEATS() {
%1 = load i32, i32* @_mLOG_CAT_CHEATS.category
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @mLogGenerateCategory(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @_mLOG_CAT_CHEATS.category
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ f1();
void f2(void) { f1(); }


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

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

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

LLVM IR (-O2):
define void @f2() {
%1 = tail call i32 (...) @f1()
ret void
}
int do_181() { return 181; }


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

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

LLVM IR (-O0):
define i32 @do_181() {
ret i32 181
}

LLVM IR (-O2):
define i32 @do_181() {
ret i32 181
}
/* Type definitions */
struct mdoc_node {
  int dummy;
};
struct mdoc_meta {
  int dummy;
};
struct html {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_text(struct html *, char *);
int mdoc_bt_pre(const struct mdoc_meta *meta, const struct mdoc_node *n,
                struct html *h) {
  print_text(h, "is currently in beta test.");
  return (0);
}


x86 assembly (clang, -O0):
<mdoc_bt_pre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <print_text@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdoc_bt_pre>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <print_text@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.mdoc_meta = type { i32 }
%struct.mdoc_node = type { i32 }
%struct.html = type { i32 }
@.str = [27 x i8] c"is currently in beta test.\00"
define i32 @mdoc_bt_pre(%struct.mdoc_meta* %0, %struct.mdoc_node* %1, %struct.html* %2) {
%4 = alloca %struct.mdoc_meta*
%5 = alloca %struct.mdoc_node*
%6 = alloca %struct.html*
store %struct.mdoc_meta* %0, %struct.mdoc_meta** %4
store %struct.mdoc_node* %1, %struct.mdoc_node** %5
store %struct.html* %2, %struct.html** %6
%7 = load %struct.html*, %struct.html** %6
%8 = call i32 @print_text(%struct.html* %7, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.mdoc_meta = type { i32 }
%struct.mdoc_node = type { i32 }
%struct.html = type { i32 }
@.str = [27 x i8] c"is currently in beta test.\00"
define i32 @mdoc_bt_pre(%struct.mdoc_meta* nocapture readnone %0, %struct.mdoc_node* nocapture readnone %1, %struct.html* %2) {
%4 = tail call i32 @print_text(%struct.html* %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct shl_htable {
  int dummy;
};

/* Variables and functions */
int shl_htable_insert(struct shl_htable *, void const *, size_t);
int shl_htable_insert_ulong(struct shl_htable *htable,
                            const unsigned long *key) {
  return shl_htable_insert(htable, (const void *)key, (size_t)*key);
}


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

x86 assembly (clang, -O2):
<shl_htable_insert_ulong>:
mov    (%rsi),%rdx
jmp    1030 <shl_htable_insert@plt>

LLVM IR (-O0):
%struct.shl_htable = type { i32 }
define i32 @shl_htable_insert_ulong(%struct.shl_htable* %0, i64* %1) {
%3 = alloca %struct.shl_htable*
%4 = alloca i64*
store %struct.shl_htable* %0, %struct.shl_htable** %3
store i64* %1, i64** %4
%5 = load %struct.shl_htable*, %struct.shl_htable** %3
%6 = load i64*, i64** %4
%7 = bitcast i64* %6 to i8*
%8 = load i64*, i64** %4
%9 = load i64, i64* %8
%10 = call i32 @shl_htable_insert(%struct.shl_htable* %5, i8* %7, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.shl_htable = type { i32 }
define i32 @shl_htable_insert_ulong(%struct.shl_htable* %0, i64* %1) {
%3 = bitcast i64* %1 to i8*
%4 = load i64, i64* %1
%5 = tail call i32 @shl_htable_insert(%struct.shl_htable* %0, i8* %3, i64 %4)
ret i32 %5
}
void f_s(void) {
  short x;
  asm("" : "=@ccc"(x));
}


x86 assembly (clang, -O0):
<f_s>:
push   %rbp
mov    %rsp,%rbp
setb   %al
movzbl %al,%eax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f_s() {
%1 = alloca i16
%2 = call i16 asm "", "={@ccc},~{dirflag},~{fpsr},~{flags}"()
store i16 %2, i16* %1
ret void
}

LLVM IR (-O2):
define void @f_s() {
%1 = tail call i16 asm "", "={@ccc},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void backspace(void) { write(1, "\b", 1); }


x86 assembly (clang, -O0):
<backspace>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edx
lea    0xee0(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<backspace>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\08\00"
define void @backspace() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\08\00"
define void @backspace() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
size_t strlen(char const *);
size_t iks_strlen(const char *src) {
  if (!src)
    return 0;
  return strlen(src);
}


x86 assembly (clang, -O0):
<iks_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <iks_strlen+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1141 <iks_strlen+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iks_strlen>:
test   %rdi,%rdi
je     111a <iks_strlen+0xa>
jmp    1030 <strlen@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @iks_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i64 [ %4, %3 ], [ 0, %1 ]
ret i64 %6
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t ntohb2(const uint8_t *network2) {
  return (uint16_t)network2[0] << 8 | network2[1];
}


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

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

LLVM IR (-O0):
define i32 @ntohb2(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @ntohb2(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
int /*<<< orphan*/ show_bytes(unsigned char *, int);
int main() {
  int a = -1;
  unsigned int b = 4294967295;
  printf("a = %d, a = %u\n", a, a);
  printf("b = %d, b = %u\n", b, b);
  show_bytes((unsigned char *)&a, sizeof(int));
  show_bytes((unsigned char *)&b, sizeof(unsigned int));
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <show_bytes@plt>
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
call   1040 <show_bytes@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
movl   $0xffffffff,(%rsp)
lea    0xeb9(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1040 <show_bytes@plt>
mov    %rsp,%rdi
mov    $0x4,%esi
call   1040 <show_bytes@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"a = %d, a = %u\0A\00"
@.str.1 = [16 x i8] c"b = %d, b = %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 -1, i32* %2
store i32 -1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
%10 = bitcast i32* %2 to i8*
%11 = call i32 @show_bytes(i8* %10, i32 4)
%12 = bitcast i32* %3 to i8*
%13 = call i32 @show_bytes(i8* %12, i32 4)
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [16 x i8] c"a = %d, a = %u\0A\00"
@.str.1 = [16 x i8] c"b = %d, b = %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 -1, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 -1, i32 -1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 -1, i32 -1)
%7 = call i32 @show_bytes(i8* %3, i32 4)
%8 = call i32 @show_bytes(i8* %4, i32 4)
%9 = call i32 @exit(i32 0)
unreachable
}
int combine_surrogate(int hi, int lo) {
  return (hi - 0xD800) * 0x400 + (lo - 0xDC00) + 0x10000;
}


x86 assembly (clang, -O0):
<combine_surrogate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xd800,%eax
shl    $0xa,%eax
mov    -0x8(%rbp),%ecx
sub    $0xdc00,%ecx
add    %ecx,%eax
add    $0x10000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<combine_surrogate>:
shl    $0xa,%edi
lea    (%rsi,%rdi,1),%eax
add    $0xfca02400,%eax
ret

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

LLVM IR (-O2):
define i32 @combine_surrogate(i32 %0, i32 %1) {
%3 = shl i32 %0, 10
%4 = add i32 %1, -56613888
%5 = add i32 %4, %3
ret i32 %5
}
/* Type definitions */
typedef long int64_t;

/* Variables and functions */
int64_t ll_callback(int64_t (*fun)(int64_t, int64_t)) {
  int64_t x = 19L;
  return fun(x, x);
}


x86 assembly (clang, -O0):
<ll_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x13,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ll_callback>:
mov    %rdi,%rax
mov    $0x13,%edi
mov    $0x13,%esi
jmp    *%rax

LLVM IR (-O0):
define i64 @ll_callback(i64 (i64, i64)* %0) {
%2 = alloca i64 (i64, i64)*
%3 = alloca i64
store i64 (i64, i64)* %0, i64 (i64, i64)** %2
store i64 19, i64* %3
%4 = load i64 (i64, i64)*, i64 (i64, i64)** %2
%5 = load i64, i64* %3
%6 = load i64, i64* %3
%7 = call i64 %4(i64 %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @ll_callback(i64 (i64, i64)* nocapture %0) {
%2 = tail call i64 %0(i64 19, i64 19)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void Error(char *message) {
  fprintf(stderr, "ERROR: %s\n", message);
  exit(1);
}


x86 assembly (clang, -O0):
<Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @Error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @Error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
struct Cyc_AP_T *Cyc_AP_fromint(long x) {
  struct Cyc_AP_T *t =
      ({ Cyc_mk((int)(sizeof(unsigned long) / sizeof(unsigned char))); });
  return ({ Cyc_set(t, x); });
}


x86 assembly (clang, -O0):
<Cyc_AP_fromint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8,%edi
mov    $0x0,%al
call   1040 <Cyc_mk@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <Cyc_set@plt>
mov    %eax,-0x18(%rbp)
movslq -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_AP_fromint>:
push   %rbx
mov    %rdi,%rbx
mov    $0x8,%edi
xor    %eax,%eax
call   1040 <Cyc_mk@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <Cyc_set@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
%struct.Cyc_AP_T = type opaque
define %struct.Cyc_AP_T* @Cyc_AP_fromint(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.Cyc_AP_T*
%4 = alloca i32
%5 = alloca i32
store i64 %0, i64* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @Cyc_mk to i32 (i32, ...)*)(i32 8)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to %struct.Cyc_AP_T*
store %struct.Cyc_AP_T* %9, %struct.Cyc_AP_T** %3
%10 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %3
%11 = load i64, i64* %2
%12 = call i32 (%struct.Cyc_AP_T*, i64, ...) bitcast (i32 (...)* @Cyc_set to i32 (%struct.Cyc_AP_T*, i64, ...)*)(%struct.Cyc_AP_T* %10, i64 %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to %struct.Cyc_AP_T*
ret %struct.Cyc_AP_T* %15
}

LLVM IR (-O2):
%struct.Cyc_AP_T = type opaque
define %struct.Cyc_AP_T* @Cyc_AP_fromint(i64 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @Cyc_mk to i32 (i32, ...)*)(i32 8)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to %struct.Cyc_AP_T*
%5 = tail call i32 (%struct.Cyc_AP_T*, i64, ...) bitcast (i32 (...)* @Cyc_set to i32 (%struct.Cyc_AP_T*, i64, ...)*)(%struct.Cyc_AP_T* %4, i64 %0)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to %struct.Cyc_AP_T*
ret %struct.Cyc_AP_T* %7
}
int __attribute__((unused)) isalpha(int c) {
  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
}


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

x86 assembly (clang, -O2):
<isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void cond1(void *testme) {
  int i, j;
  i = (testme != 0) ?: 0;
  j = (testme != 0) ? (testme != 0) : 0;
}


x86 assembly (clang, -O0):
<cond1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x14(%rbp)
test   $0x1,%al
jne    1128 <cond1+0x28>
jmp    1133 <cond1+0x33>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    113d <cond1+0x3d>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
jmp    113d <cond1+0x3d>
mov    -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1163 <cond1+0x63>
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
jmp    116d <cond1+0x6d>
xor    %eax,%eax
mov    %eax,-0x1c(%rbp)
jmp    116d <cond1+0x6d>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cond1(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
br i1 %6, label %8, label %9
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %8
%11 = phi i32 [ %7, %8 ], [ 0, %9 ]
store i32 %11, i32* %3
%12 = load i8*, i8** %2
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8*, i8** %2
%16 = icmp ne i8* %15, null
%17 = zext i1 %16 to i32
br label %19
18: ; preds = %10
br label %19
19: ; preds = %18, %14
%20 = phi i32 [ %17, %14 ], [ 0, %18 ]
store i32 %20, i32* %4
ret void
}

LLVM IR (-O2):
define void @cond1(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int f();
__attribute__((no, noclone)) int g0(void) { return f(); }


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

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

LLVM IR (-O0):
define i32 @g0() {
%1 = call i32 (...) @f()
ret i32 %1
}

LLVM IR (-O2):
define i32 @g0() {
%1 = tail call i32 (...) @f()
ret i32 %1
}
/* Variables and functions */
int AAS_StartFrame(float);
int /*<<< orphan*/ BotLibSetup(char *);
int Export_BotLibStartFrame(float time) {
  if (!BotLibSetup("BotStartFrame"))
    return 1;
  return AAS_StartFrame(time);
}


x86 assembly (clang, -O0):
<Export_BotLibStartFrame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
lea    0xecc(%rip),%rdi
call   1030 <BotLibSetup@plt>
cmp    $0x0,%eax
jne    114e <Export_BotLibStartFrame+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    115b <Export_BotLibStartFrame+0x3b>
movss  -0x8(%rbp),%xmm0
call   1040 <AAS_StartFrame@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Export_BotLibStartFrame>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0xed2(%rip),%rdi
call   1030 <BotLibSetup@plt>
test   %eax,%eax
je     1143 <Export_BotLibStartFrame+0x23>
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1040 <AAS_StartFrame@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"BotStartFrame\00"
define i32 @Export_BotLibStartFrame(float %0) {
%2 = alloca i32
%3 = alloca float
store float %0, float* %3
%4 = call i32 @BotLibSetup(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 1, i32* %2
br label %10
7: ; preds = %1
%8 = load float, float* %3
%9 = call i32 @AAS_StartFrame(float %8)
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"BotStartFrame\00"
define i32 @Export_BotLibStartFrame(float %0) {
%2 = tail call i32 @BotLibSetup(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @AAS_StartFrame(float %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ cwrapper_q_sort_double_with_double(double *, double *,
                                                      int /*<<< orphan*/, int);
void quicksort_double_with_double_(double numbers[], double indices[],
                                   int *array_size) {
  cwrapper_q_sort_double_with_double(numbers, indices, 0, (*array_size) - 1);
}


x86 assembly (clang, -O0):
<quicksort_double_with_double_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <cwrapper_q_sort_double_with_double@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort_double_with_double_>:
mov    (%rdx),%ecx
add    $0xffffffff,%ecx
xor    %edx,%edx
jmp    1030 <cwrapper_q_sort_double_with_double@plt>

LLVM IR (-O0):
define void @quicksort_double_with_double_(double* %0, double* %1, i32* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32*
store double* %0, double** %4
store double* %1, double** %5
store i32* %2, i32** %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = load i32*, i32** %6
%10 = load i32, i32* %9
%11 = sub nsw i32 %10, 1
%12 = call i32 @cwrapper_q_sort_double_with_double(double* %7, double* %8, i32 0, i32 %11)
ret void
}

LLVM IR (-O2):
define void @quicksort_double_with_double_(double* %0, double* %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
%6 = tail call i32 @cwrapper_q_sort_double_with_double(double* %0, double* %1, i32 0, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *);
void sighandle(int sig) {
  (void)sig;
  printf("handled signal\n");
  abort();
}


x86 assembly (clang, -O0):
<sighandle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<sighandle>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"handled signal\0A\00"
define void @sighandle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@str = [15 x i8] c"handled signal\00"
define void @sighandle(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
void skpn_(int *x, int *i, int *j) {}


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

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

LLVM IR (-O0):
define void @skpn_(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
define void @skpn_(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
#pragma omp parallel
  printf("(%d:!!!Hello world!!!)", omp_get_thread_num());
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%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 = [23 x i8] c"(%d:!!!Hello world!!!)\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @omp_get_thread_num()
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"(%d:!!!Hello world!!!)\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_mulhi_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_mulhi_epi16(__m128i A, __m128i B) {
  return _mm_mulhi_epi16(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_mulhi_epi16>:
jmp    1030 <_mm_mulhi_epi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_mulhi_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_mulhi_epi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
double M_PI;
double bogenmass(double winkel) {
  double rad = 0;
  while (1) {
    if (winkel > 360) {
      winkel -= 360;
    } else {
      break;
    }
  }
  rad = winkel / 360 * 2 * M_PI;
  return rad;
}


x86 assembly (clang, -O0):
<bogenmass>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1143 <bogenmass+0x43>
movsd  -0x8(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1148 <bogenmass+0x48>
jmp    114d <bogenmass+0x4d>
jmp    1111 <bogenmass+0x11>
movsd  -0x8(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xea2(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2e77(%rip),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bogenmass>:
ucomisd 0xef8(%rip),%xmm0
jbe    112a <bogenmass+0x2a>
movsd  0xef6(%rip),%xmm1
movsd  0xee6(%rip),%xmm2
nopw   0x0(%rax,%rax,1)
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
ja     1120 <bogenmass+0x20>
divsd  0xece(%rip),%xmm0
addsd  %xmm0,%xmm0
mov    0x2eab(%rip),%rax
mulsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @bogenmass(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
br label %4
4: ; preds = %1, %11
%5 = load double, double* %2
%6 = fcmp ogt double %5, 3.600000e+02
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load double, double* %2
%9 = fsub double %8, 3.600000e+02
store double %9, double* %2
br label %11
10: ; preds = %4
br label %12
11: ; preds = %7
br label %4
12: ; preds = %10
%13 = load double, double* %2
%14 = fdiv double %13, 3.600000e+02
%15 = fmul double %14, 2.000000e+00
%16 = load double, double* @M_PI
%17 = fmul double %15, %16
store double %17, double* %3
%18 = load double, double* %3
ret double %18
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @bogenmass(double %0) {
%2 = fcmp ogt double %0, 3.600000e+02
br i1 %2, label %3, label %7
3: ; preds = %1, %3
%4 = phi double [ %5, %3 ], [ %0, %1 ]
%5 = fadd double %4, -3.600000e+02
%6 = fcmp ogt double %5, 3.600000e+02
br i1 %6, label %3, label %7
7: ; preds = %3, %1
%8 = phi double [ %0, %1 ], [ %5, %3 ]
%9 = fdiv double %8, 3.600000e+02
%10 = fmul double %9, 2.000000e+00
%11 = load double, double* @M_PI
%12 = fmul double %10, %11
ret double %12
}
void RTManifestWriteFilesBuf(void) {}


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

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

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

LLVM IR (-O2):
define void @RTManifestWriteFilesBuf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Exit(int);
void exit(int status) { Exit(status); }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <Exit@plt>

x86 assembly (clang, -O2):
<exit>:
push   %rax
call   1030 <Exit@plt>

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

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 @Exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ prune_sub2(int);
void call_prune_sub2_3_Good() { prune_sub2(100); }


x86 assembly (clang, -O0):
<call_prune_sub2_3_Good>:
push   %rbp
mov    %rsp,%rbp
mov    $0x64,%edi
call   1030 <prune_sub2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_prune_sub2_3_Good>:
mov    $0x64,%edi
jmp    1030 <prune_sub2@plt>

LLVM IR (-O0):
define void @call_prune_sub2_3_Good() {
%1 = call i32 @prune_sub2(i32 100)
ret void
}

LLVM IR (-O2):
define void @call_prune_sub2_3_Good() {
%1 = tail call i32 @prune_sub2(i32 100)
ret void
}
/* Variables and functions */
int vmem_read(int);
int /*<<< orphan*/ vmem_write(int, int);
void swap(int addr1, int addr2) {
  int tmp = vmem_read(addr1);
  vmem_write(addr1, vmem_read(addr2));
  vmem_write(addr2, tmp);
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <vmem_read@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <vmem_read@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1040 <vmem_write@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <vmem_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <vmem_read@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <vmem_read@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <vmem_write@plt>
mov    %ebx,%edi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <vmem_write@plt>

LLVM IR (-O0):
define void @swap(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 = call i32 @vmem_read(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @vmem_read(i32 %9)
%11 = call i32 @vmem_write(i32 %8, i32 %10)
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = call i32 @vmem_write(i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @swap(i32 %0, i32 %1) {
%3 = tail call i32 @vmem_read(i32 %0)
%4 = tail call i32 @vmem_read(i32 %1)
%5 = tail call i32 @vmem_write(i32 %0, i32 %4)
%6 = tail call i32 @vmem_write(i32 %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int proc1(int, int);
int main(int argc, char *argv[], char *envp[]) {
  int g3;
  g3 = proc1(11, 4);
  printf("%i\n", g3);
  return g3;
}


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)
mov    $0xb,%edi
mov    $0x4,%esi
call   1040 <proc1@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xb,%edi
mov    $0x4,%esi
call   1040 <proc1@plt>
mov    %eax,%ebx
lea    0xec7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @proc1(i32 11, i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int A, B, C, D, DIFERENCA;
  scanf("%d %d %d %d", &A, &B, &C, &D);
  DIFERENCA = ((A * B) - (C * D));
  printf("DIFERENCA = %d\n", DIFERENCA);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
imul   0x14(%rsp),%esi
mov    0x8(%rsp),%eax
imul   0xc(%rsp),%eax
sub    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [16 x i8] c"DIFERENCA = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = mul nsw i32 %8, %9
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = mul nsw i32 %11, %12
%14 = sub nsw i32 %10, %13
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [16 x i8] c"DIFERENCA = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = mul nsw i32 %11, %10
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = mul nsw i32 %14, %13
%16 = sub nsw i32 %12, %15
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}
void IR_stop(void) { ; }


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

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

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

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