xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ eeprom_write_int16(int, int);
int /*<<< orphan*/ eeprom_write_uint16(int, int);
int settings_reset_to_defaults() {
  eeprom_write_uint16(34, 0);
  eeprom_write_uint16(36, 1);
  eeprom_write_uint16(128, 0xfafbul);
  eeprom_write_int16(32, 1);
}


x86 assembly (clang, -O0):
<settings_reset_to_defaults>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x22,%edi
xor    %esi,%esi
call   1040 <eeprom_write_uint16@plt>
mov    $0x24,%edi
mov    $0x1,%esi
call   1040 <eeprom_write_uint16@plt>
mov    $0x80,%edi
mov    $0xfafb,%esi
call   1040 <eeprom_write_uint16@plt>
mov    $0x20,%edi
mov    $0x1,%esi
call   1030 <eeprom_write_int16@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<settings_reset_to_defaults>:
push   %rax
mov    $0x22,%edi
xor    %esi,%esi
call   1040 <eeprom_write_uint16@plt>
mov    $0x24,%edi
mov    $0x1,%esi
call   1040 <eeprom_write_uint16@plt>
mov    $0x80,%edi
mov    $0xfafb,%esi
call   1040 <eeprom_write_uint16@plt>
mov    $0x20,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <eeprom_write_int16@plt>

LLVM IR (-O0):
define i32 @settings_reset_to_defaults() {
%1 = alloca i32
%2 = call i32 @eeprom_write_uint16(i32 34, i32 0)
%3 = call i32 @eeprom_write_uint16(i32 36, i32 1)
%4 = call i32 @eeprom_write_uint16(i32 128, i32 64251)
%5 = call i32 @eeprom_write_int16(i32 32, i32 1)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @settings_reset_to_defaults() {
%1 = tail call i32 @eeprom_write_uint16(i32 34, i32 0)
%2 = tail call i32 @eeprom_write_uint16(i32 36, i32 1)
%3 = tail call i32 @eeprom_write_uint16(i32 128, i32 64251)
%4 = tail call i32 @eeprom_write_int16(i32 32, i32 1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ gl2psPrintGzipFooter();
int /*<<< orphan*/ gl2psPrintf(char *);
void gl2psPrintSVGFooter(void) {
  gl2psPrintf("</g>\n");
  gl2psPrintf("</svg>\n");
  gl2psPrintGzipFooter();
}


x86 assembly (clang, -O0):
<gl2psPrintSVGFooter>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <gl2psPrintf@plt>
lea    0xecf(%rip),%rdi
call   1040 <gl2psPrintf@plt>
mov    $0x0,%al
call   1030 <gl2psPrintGzipFooter@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl2psPrintSVGFooter>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <gl2psPrintf@plt>
lea    0xed2(%rip),%rdi
call   1040 <gl2psPrintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <gl2psPrintGzipFooter@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"</g>\0A\00"
@.str.1 = [8 x i8] c"</svg>\0A\00"
define void @gl2psPrintSVGFooter() {
%1 = call i32 @gl2psPrintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @gl2psPrintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @gl2psPrintGzipFooter()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"</g>\0A\00"
@.str.1 = [8 x i8] c"</svg>\0A\00"
define void @gl2psPrintSVGFooter() {
%1 = tail call i32 @gl2psPrintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @gl2psPrintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @gl2psPrintGzipFooter()
ret void
}
/* Variables and functions */
unsigned char asm_checkkbdbuf();
unsigned char checkkbdbuf() { return asm_checkkbdbuf(); }


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

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

LLVM IR (-O0):
define zeroext i8 @checkkbdbuf() {
%1 = call zeroext i8 (...) @asm_checkkbdbuf()
ret i8 %1
}

LLVM IR (-O2):
define zeroext i8 @checkkbdbuf() {
%1 = tail call zeroext i8 (...) @asm_checkkbdbuf()
ret i8 %1
}
unsigned xrop3_101_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = S | stk3;
  stk1 = D ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_101_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_101_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
not    %ecx
or     %eax,%ecx
xor    $0xff,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_101_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %5
%29 = load i32, i32* %9
%30 = xor i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_101_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, -1
%8 = or i32 %4, %7
%9 = xor i32 %8, 255
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}
void CNullOrLeq(const volatile void *e, const volatile void *e1,
                const volatile void *e2, const char *why, const char *text,
                const char *file, int line, const char *func) {
  if (e) {
    if (!(e1 <= e2) || 0) {
      deputy_fail_mayreturn(why, text, file, line, func);
    };
  }
}


x86 assembly (clang, -O0):
<CNullOrLeq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116f <CNullOrLeq+0x5f>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    116a <CNullOrLeq+0x5a>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    0x18(%rbp),%r8
mov    $0x0,%al
call   1030 <deputy_fail_mayreturn@plt>
jmp    116f <CNullOrLeq+0x5f>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CNullOrLeq>:
test   %rdi,%rdi
je     1138 <CNullOrLeq+0x28>
cmp    %rdx,%rsi
jbe    1138 <CNullOrLeq+0x28>
mov    0x10(%rsp),%r10
mov    0x8(%rsp),%eax
mov    %rcx,%rdi
mov    %r8,%rsi
mov    %r9,%rdx
mov    %eax,%ecx
mov    %r10,%r8
xor    %eax,%eax
jmp    1030 <deputy_fail_mayreturn@plt>
ret

LLVM IR (-O0):
define void @CNullOrLeq(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i32 %6, i8* %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i8*
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i8* %4, i8** %13
store i8* %5, i8** %14
store i32 %6, i32* %15
store i8* %7, i8** %16
%17 = load i8*, i8** %9
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %31
19: ; preds = %8
%20 = load i8*, i8** %10
%21 = load i8*, i8** %11
%22 = icmp ule i8* %20, %21
br i1 %22, label %30, label %23
23: ; preds = %19
%24 = load i8*, i8** %12
%25 = load i8*, i8** %13
%26 = load i8*, i8** %14
%27 = load i32, i32* %15
%28 = load i8*, i8** %16
%29 = call i32 (i8*, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @deputy_fail_mayreturn to i32 (i8*, i8*, i8*, i32, i8*, ...)*)(i8* %24, i8* %25, i8* %26, i32 %27, i8* %28)
br label %30
30: ; preds = %23, %19
br label %31
31: ; preds = %30, %8
ret void
}

LLVM IR (-O2):
define void @CNullOrLeq(i8* readnone %0, i8* readnone %1, i8* readnone %2, i8* %3, i8* %4, i8* %5, i32 %6, i8* %7) {
%9 = icmp ne i8* %0, null
%10 = icmp ugt i8* %1, %2
%11 = and i1 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = tail call i32 (i8*, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @deputy_fail_mayreturn to i32 (i8*, i8*, i8*, i32, i8*, ...)*)(i8* %3, i8* %4, i8* %5, i32 %6, i8* %7)
br label %14
14: ; preds = %12, %8
ret void
}
void f(void) {
  void *p = &&a;
  1 ? 1 : ({
    a:
      1;
  });
  goto *p;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
lea    0x1d(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    111e <f+0x1e>
jmp    1123 <f+0x23>
jmp    1132 <f+0x32>
jmp    1128 <f+0x28>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
jmp    *%rax

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i8*
%2 = alloca i32
store i8* blockaddress(@f, %5), i8** %1
br i1 true, label %3, label %4
3: ; preds = %0
br label %7
4: ; preds = %0
br label %5
5: ; preds = %4, %10
store i32 1, i32* %2
%6 = load i32, i32* %2
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ 1, %3 ], [ %6, %5 ]
%9 = load i8*, i8** %1
br label %10
10: ; preds = %7
%11 = phi i8* [ %9, %7 ]
indirectbr i8* %11, [label %5]
}

LLVM IR (-O2):
define void @f() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int symlink(char const *, char const *);
int xsymlink(const char *target, const char *linkpath) {
  int ret = symlink(target, linkpath);
  if (ret == -1) {
    ;
  }
  return ret;
}


x86 assembly (clang, -O0):
<xsymlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <symlink@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    113f <xsymlink+0x2f>
jmp    113f <xsymlink+0x2f>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsymlink>:
jmp    1030 <symlink@plt>

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

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

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ RSAPrivateKey_it;
int i2d_RSAPrivateKey(const RSA *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPrivateKey_it);
}


x86 assembly (clang, -O0):
<i2d_RSAPrivateKey>:
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    0x2eb1(%rip),%rdx
call   1030 <ASN1_item_i2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_RSAPrivateKey>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@RSAPrivateKey_it = global i32 0
define i32 @i2d_RSAPrivateKey(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @RSAPrivateKey_it)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ matrix_multiply_ext(float const *, float *, float *);
float *matrix_multiply_left(const float matrix1[4 * 4], float matrix2[4 * 4]) {
  float temp[4 * 4];
  int i = 0;
  matrix_multiply_ext(matrix1, matrix2, temp);
  for (i = 0; i < 4 * 4; i++)
    matrix2[i] = temp[i];
  return matrix2;
}


x86 assembly (clang, -O0):
<matrix_multiply_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x50(%rbp),%rdx
call   1030 <matrix_multiply_ext@plt>
movl   $0x0,-0x54(%rbp)
cmpl   $0x10,-0x54(%rbp)
jge    116e <matrix_multiply_left+0x5e>
movslq -0x54(%rbp),%rax
movss  -0x50(%rbp,%rax,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    113f <matrix_multiply_left+0x2f>
mov    -0x10(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix_multiply_left>:
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%rbx
mov    %rsp,%rdx
call   1030 <matrix_multiply_ext@plt>
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
movaps 0x30(%rsp),%xmm3
movups %xmm0,(%rbx)
movups %xmm1,0x10(%rbx)
movups %xmm2,0x20(%rbx)
movups %xmm3,0x30(%rbx)
mov    %rbx,%rax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float* @matrix_multiply_left(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca [16 x float]
%6 = alloca i32
store float* %0, float** %3
store float* %1, float** %4
store i32 0, i32* %6
%7 = load float*, float** %3
%8 = load float*, float** %4
%9 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%10 = call i32 @matrix_multiply_ext(float* %7, float* %8, float* %9)
store i32 0, i32* %6
br label %11
11: ; preds = %23, %2
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 16
br i1 %13, label %14, label %26
14: ; preds = %11
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 %16
%18 = load float, float* %17
%19 = load float*, float** %4
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* %19, i64 %21
store float %18, float* %22
br label %23
23: ; preds = %14
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %11
26: ; preds = %11
%27 = load float*, float** %4
ret float* %27
}

LLVM IR (-O2):
define float* @matrix_multiply_left(float* %0, float* returned %1) {
%3 = bitcast float* %1 to i8*
%4 = alloca [16 x float]
%5 = bitcast [16 x float]* %4 to i8*
%6 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 0
%7 = call i32 @matrix_multiply_ext(float* %0, float* %1, float* %6)
ret float* %1
}
int test_imm_43int64_lowword_reg(long long val) {
  return ((val) & (0x43 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_43int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x43,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_43int64_lowword_reg>:
test   $0x43,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_43int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 67
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_with_tab(char *);
int /*<<< orphan*/ print_label(int);
void gen_jump(int label) {
  output_with_tab("jmp ");
  print_label(label);
  newline();
}


x86 assembly (clang, -O0):
<gen_jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1050 <output_with_tab@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_label@plt>
mov    $0x0,%al
call   1030 <newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_jump>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1050 <output_with_tab@plt>
mov    %ebx,%edi
call   1040 <print_label@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <newline@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"jmp \00"
define void @gen_jump(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @print_label(i32 %4)
%6 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"jmp \00"
define void @gen_jump(i32 %0) {
%2 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print_label(i32 %0)
%4 = tail call i32 (...) @newline()
ret void
}
FNIEMOP_DEF(iemOp_Invalid) {
  IEMOP_MNEMONIC("Invalid");
  return IEMOP_RAISE_INVALID_OPCODE();
}


x86 assembly (clang, -O0):
<FNIEMOP_DEF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1040 <IEMOP_MNEMONIC@plt>
mov    $0x0,%al
call   1030 <IEMOP_RAISE_INVALID_OPCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FNIEMOP_DEF>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <IEMOP_MNEMONIC@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <IEMOP_RAISE_INVALID_OPCODE@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Invalid\00"
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @IEMOP_MNEMONIC to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"Invalid\00"
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @IEMOP_MNEMONIC to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %3
}
unsigned int rt_rand(unsigned int *idum) {
  *idum = (unsigned int)1099087573 * *idum;
  return *idum;
}


x86 assembly (clang, -O0):
<rt_rand>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x4182bed5,(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rt_rand>:
imul   $0x4182bed5,(%rdi),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define i32 @rt_rand(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = mul i32 1099087573, %4
%6 = load i32*, i32** %2
store i32 %5, i32* %6
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @rt_rand(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = mul i32 %2, 1099087573
store i32 %3, i32* %0
ret i32 %3
}
double Sub(double x, double y) { return x - y; }


x86 assembly (clang, -O0):
<Sub>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sub>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Sub(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @Sub(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int);
void modulo(unsigned int a, unsigned int b) {
  unsigned int total = 0;
  total = a % b;
  printf("%d %% %d = %d\n", a, b, total);
}


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

x86 assembly (clang, -O2):
<modulo>:
mov    %esi,%r8d
mov    %edi,%esi
mov    %edi,%eax
xor    %edx,%edx
div    %r8d
mov    %edx,%ecx
lea    0xedb(%rip),%rdi
mov    %r8d,%edx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"%d %% %d = %d\0A\00"
define void @modulo(i32 %0, i32 %1) {
%3 = urem i32 %0, %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %3)
ret void
}
int findintable(const char *ct, char c) {
  int p = 0;
  while (*ct) {
    if (*ct == c)
      return p;
    ct++;
    p++;
  }
  return -1;
}


x86 assembly (clang, -O0):
<findintable>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <findintable+0x5a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1140 <findintable+0x40>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <findintable+0x61>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <findintable+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findintable>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <findintable+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1123 <findintable+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <findintable+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @findintable(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %13, %10 ], [ %3, %2 ]
%7 = phi i32 [ %12, %10 ], [ 0, %2 ]
%8 = phi i8* [ %11, %10 ], [ %0, %2 ]
%9 = icmp eq i8 %6, %1
br i1 %9, label %15, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = add nuw nsw i32 %7, 1
%13 = load i8, i8* %11
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %10, %2
%16 = phi i32 [ -1, %2 ], [ -1, %10 ], [ %7, %5 ]
ret i32 %16
}
unsigned int my_hash(const void *key) {
  return (unsigned int)*((const int *)key);
}


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

x86 assembly (clang, -O2):
<my_hash>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @my_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @my_hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ bnc_scanf();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("integer size: %d\n", (int)sizeof(int));
  bnc_scanf();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"integer size: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = call i32 (...) @bnc_scanf()
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"integer size: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 (...) @bnc_scanf()
ret i32 0
}
/* Type definitions */
struct DNAset {
  int dummy;
};

/* Variables and functions */
int setLetter(int, char, struct DNAset *);
void setDNAset(int r, struct DNAset *order) {
  r = setLetter(r, 'A', order);
  r = setLetter(r, 'C', order);
  r = setLetter(r, 'G', order);
  r = setLetter(r, 'T', order);
}


x86 assembly (clang, -O0):
<setDNAset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x41,%esi
call   1030 <setLetter@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x43,%esi
call   1030 <setLetter@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x47,%esi
call   1030 <setLetter@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x54,%esi
call   1030 <setLetter@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDNAset>:
push   %rbx
mov    %rsi,%rbx
mov    $0x41,%esi
mov    %rbx,%rdx
call   1030 <setLetter@plt>
mov    %eax,%edi
mov    $0x43,%esi
mov    %rbx,%rdx
call   1030 <setLetter@plt>
mov    %eax,%edi
mov    $0x47,%esi
mov    %rbx,%rdx
call   1030 <setLetter@plt>
mov    %eax,%edi
mov    $0x54,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <setLetter@plt>

LLVM IR (-O0):
%struct.DNAset = type { i32 }
define void @setDNAset(i32 %0, %struct.DNAset* %1) {
%3 = alloca i32
%4 = alloca %struct.DNAset*
store i32 %0, i32* %3
store %struct.DNAset* %1, %struct.DNAset** %4
%5 = load i32, i32* %3
%6 = load %struct.DNAset*, %struct.DNAset** %4
%7 = call i32 @setLetter(i32 %5, i8 signext 65, %struct.DNAset* %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load %struct.DNAset*, %struct.DNAset** %4
%10 = call i32 @setLetter(i32 %8, i8 signext 67, %struct.DNAset* %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load %struct.DNAset*, %struct.DNAset** %4
%13 = call i32 @setLetter(i32 %11, i8 signext 71, %struct.DNAset* %12)
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = load %struct.DNAset*, %struct.DNAset** %4
%16 = call i32 @setLetter(i32 %14, i8 signext 84, %struct.DNAset* %15)
store i32 %16, i32* %3
ret void
}

LLVM IR (-O2):
%struct.DNAset = type { i32 }
define void @setDNAset(i32 %0, %struct.DNAset* %1) {
%3 = tail call i32 @setLetter(i32 %0, i8 signext 65, %struct.DNAset* %1)
%4 = tail call i32 @setLetter(i32 %3, i8 signext 67, %struct.DNAset* %1)
%5 = tail call i32 @setLetter(i32 %4, i8 signext 71, %struct.DNAset* %1)
%6 = tail call i32 @setLetter(i32 %5, i8 signext 84, %struct.DNAset* %1)
ret void
}
/* Variables and functions */
double InGamma(double, double);
double cdfStandard(double x) {
  double t;
  t = InGamma(0.5, 0.5 * x * x);
  if (x < 0.0)
    return (0.5 * (1.0 - t));
  else
    return (0.5 * (1.0 + t));
}


x86 assembly (clang, -O0):
<cdfStandard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xec9(%rip),%xmm0
call   1030 <InGamma@plt>
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1172 <cdfStandard+0x62>
movsd  0xeb1(%rip),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  0xe9c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1190 <cdfStandard+0x80>
movsd  0xe8e(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
movsd  0xe79(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdfStandard>:
sub    $0x18,%rsp
movapd %xmm0,%xmm2
movapd %xmm0,(%rsp)
movsd  0xedb(%rip),%xmm0
movapd %xmm2,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
call   1030 <InGamma@plt>
movapd 0xed2(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd (%rsp),%xmm3
cmpltsd %xmm2,%xmm3
movapd %xmm3,%xmm2
andnpd %xmm0,%xmm2
andpd  %xmm1,%xmm3
orpd   %xmm2,%xmm3
addsd  0xea0(%rip),%xmm3
mulsd  0xe90(%rip),%xmm3
movapd %xmm3,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @cdfStandard(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fmul double 5.000000e-01, %5
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = call double @InGamma(double 5.000000e-01, double %8)
store double %9, double* %4
%10 = load double, double* %3
%11 = fcmp olt double %10, 0.000000e+00
br i1 %11, label %12, label %16
12: ; preds = %1
%13 = load double, double* %4
%14 = fsub double 1.000000e+00, %13
%15 = fmul double 5.000000e-01, %14
store double %15, double* %2
br label %20
16: ; preds = %1
%17 = load double, double* %4
%18 = fadd double 1.000000e+00, %17
%19 = fmul double 5.000000e-01, %18
store double %19, double* %2
br label %20
20: ; preds = %16, %12
%21 = load double, double* %2
ret double %21
}

LLVM IR (-O2):
define double @cdfStandard(double %0) {
%2 = fmul double %0, 5.000000e-01
%3 = fmul double %2, %0
%4 = tail call double @InGamma(double 5.000000e-01, double %3)
%5 = fcmp olt double %0, 0.000000e+00
%6 = fneg double %4
%7 = select i1 %5, double %6, double %4
%8 = fadd double %7, 1.000000e+00
%9 = fmul double %8, 5.000000e-01
ret double %9
}
void task_io_accounting_init(struct task_struct *tsk) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @task_io_accounting_init(%struct.task_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ decode_base64(char *, char *);
int /*<<< orphan*/ rotate_bit_left(unsigned char *);
int decode_password(char *encrypted_password, char *cleartext) {
  decode_base64(encrypted_password, cleartext);
  rotate_bit_left((unsigned char *)cleartext);
  return 1;
}


x86 assembly (clang, -O0):
<decode_password>:
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 <decode_base64@plt>
mov    -0x10(%rbp),%rdi
call   1040 <rotate_bit_left@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_password>:
push   %rbx
mov    %rsi,%rbx
call   1030 <decode_base64@plt>
mov    %rbx,%rdi
call   1040 <rotate_bit_left@plt>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @decode_password(i8* %0, i8* %1) {
%3 = tail call i32 @decode_base64(i8* %0, i8* %1)
%4 = tail call i32 @rotate_bit_left(i8* %1)
ret i32 1
}
/* Variables and functions */
scalar_t__ is64bit();
int hash_tt_max_size(void) { return is64bit() ? 131072 : 1024; }


x86 assembly (clang, -O0):
<hash_tt_max_size>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <is64bit@plt>
mov    %rax,%rdx
mov    $0x400,%eax
mov    $0x20000,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_tt_max_size>:
push   %rax
xor    %eax,%eax
call   1030 <is64bit@plt>
test   %rax,%rax
mov    $0x400,%ecx
mov    $0x20000,%eax
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hash_tt_max_size() {
%1 = call i64 (...) @is64bit()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 131072, i32 1024
ret i32 %4
}

LLVM IR (-O2):
define i32 @hash_tt_max_size() {
%1 = tail call i64 (...) @is64bit()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i32 1024, i32 131072
ret i32 %3
}
/* Variables and functions */
scalar_t__ check_path(char *);
int /*<<< orphan*/ perror(char *);
char *get_config_path(char *default_path, char *pbuf, size_t bufsize) {
  char *path = default_path;
  if (check_path(path))
    return path;
  perror("couldn't find configuration file");
  return NULL;
}


x86 assembly (clang, -O0):
<get_config_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <check_path@plt>
cmp    $0x0,%rax
je     115c <get_config_path+0x3c>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <get_config_path+0x50>
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_config_path>:
push   %rbx
mov    %rdi,%rbx
call   1030 <check_path@plt>
test   %rax,%rax
je     1133 <get_config_path+0x13>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xec6(%rip),%rdi
call   1040 <perror@plt>
xor    %ebx,%ebx
jmp    112e <get_config_path+0xe>

LLVM IR (-O0):
@.str = [33 x i8] c"couldn't find configuration file\00"
define i8* @get_config_path(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%9 = load i8*, i8** %5
store i8* %9, i8** %8
%10 = load i8*, i8** %8
%11 = call i64 @check_path(i8* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load i8*, i8** %8
store i8* %14, i8** %4
br label %17
15: ; preds = %3
%16 = call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
store i8* null, i8** %4
br label %17
17: ; preds = %15, %13
%18 = load i8*, i8** %4
ret i8* %18
}

LLVM IR (-O2):
@.str = [33 x i8] c"couldn't find configuration file\00"
define i8* @get_config_path(i8* %0, i8* nocapture readnone %1, i64 %2) {
%4 = tail call i64 @check_path(i8* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %3, %6
%9 = phi i8* [ null, %6 ], [ %0, %3 ]
ret i8* %9
}
/* Variables and functions */
scalar_t__ strcasecmp(char *, char *);
int switch_hash_equalkeys_ci(void *k1, void *k2) {
  return strcasecmp((char *)k1, (char *)k2) ? 0 : 1;
}


x86 assembly (clang, -O0):
<switch_hash_equalkeys_ci>:
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 <strcasecmp@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch_hash_equalkeys_ci>:
push   %rax
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @switch_hash_equalkeys_ci(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcasecmp(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 0, i32 1
ret i32 %10
}

LLVM IR (-O2):
define i32 @switch_hash_equalkeys_ci(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strcasecmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ absolute();
int /*<<< orphan*/ rol8addr(int /*<<< orphan*/);
void rolAbs8(void) { rol8addr(absolute()); }


x86 assembly (clang, -O0):
<rolAbs8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <absolute@plt>
mov    %eax,%edi
call   1040 <rol8addr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rolAbs8>:
push   %rax
xor    %eax,%eax
call   1030 <absolute@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <rol8addr@plt>

LLVM IR (-O0):
define void @rolAbs8() {
%1 = call i32 (...) @absolute()
%2 = call i32 @rol8addr(i32 %1)
ret void
}

LLVM IR (-O2):
define void @rolAbs8() {
%1 = tail call i32 (...) @absolute()
%2 = tail call i32 @rol8addr(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 10, b = 20, k;
  (a >= 5) ? (b = 100) : (b = 200);
  printf("%d\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
jl     1143 <main+0x33>
movl   $0x64,-0xc(%rbp)
jmp    114a <main+0x3a>
movl   $0xc8,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 5
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 100, i32* %3
br label %9
8: ; preds = %0
store i32 200, i32* %3
br label %9
9: ; preds = %8, %7
%10 = phi i32 [ 100, %7 ], [ 200, %8 ]
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 100)
ret i32 0
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
void brnflip_flip_16_in_place(char *x) {
  uint8_t temp = x[0];
  x[0] = x[1];
  x[1] = temp;
}


x86 assembly (clang, -O0):
<brnflip_flip_16_in_place>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<brnflip_flip_16_in_place>:
rolw   $0x8,(%rdi)
ret

LLVM IR (-O0):
define void @brnflip_flip_16_in_place(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8, i8* %3
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
ret void
}

LLVM IR (-O2):
define void @brnflip_flip_16_in_place(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %0
store i8 %2, i8* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gc_mark();
int /*<<< orphan*/ gc_sweep();
int /*<<< orphan*/ printf(char *);
void gc_ms() {
  if (1)
    printf("begin_mark_sweep\n");
  gc_mark();
  gc_sweep();
}


x86 assembly (clang, -O0):
<gc_ms>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <gc_mark@plt>
mov    $0x0,%al
call   1050 <gc_sweep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc_ms>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <gc_mark@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <gc_sweep@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"begin_mark_sweep\0A\00"
define void @gc_ms() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @gc_mark()
%3 = call i32 (...) @gc_sweep()
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"begin_mark_sweep\00"
define void @gc_ms() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @gc_mark()
%3 = tail call i32 (...) @gc_sweep()
ret void
}
__attribute__((vector_size(16))) unsigned long long
f1(__attribute__((vector_size(16))) unsigned long long b,
   __attribute__((vector_size(16))) unsigned int a) {
  b[(1234 == 4321 ? 1 : 0)] = a[(1234 == 4321 ? 3 : 0)];
  return b;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
movaps %xmm0,-0x10(%rbp)
movaps %xmm1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
movq   %rax,%xmm1
movapd -0x10(%rbp),%xmm0
movsd  %xmm1,%xmm0
movdqa %xmm0,-0x10(%rbp)
movdqa -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
movd   %xmm1,%eax
movq   %rax,%xmm1
movsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define <2 x i64> @f1(<2 x i64> %0, <4 x i32> %1) {
%3 = alloca <2 x i64>
%4 = alloca <4 x i32>
store <2 x i64> %0, <2 x i64>* %3
store <4 x i32> %1, <4 x i32>* %4
%5 = load <4 x i32>, <4 x i32>* %4
%6 = extractelement <4 x i32> %5, i32 0
%7 = zext i32 %6 to i64
%8 = load <2 x i64>, <2 x i64>* %3
%9 = insertelement <2 x i64> %8, i64 %7, i32 0
store <2 x i64> %9, <2 x i64>* %3
%10 = load <2 x i64>, <2 x i64>* %3
ret <2 x i64> %10
}

LLVM IR (-O2):
define <2 x i64> @f1(<2 x i64> %0, <4 x i32> %1) {
%3 = extractelement <4 x i32> %1, i64 0
%4 = zext i32 %3 to i64
%5 = insertelement <2 x i64> %0, i64 %4, i64 0
ret <2 x i64> %5
}
/* Variables and functions */
int check_prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int N, p;
  scanf("%d", &N);
  if ((N == 1) || (N == 2))
    printf("%d", 2);
  else {
    p = check_prime(N);
    printf("%d", p);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
je     1163 <main+0x33>
cmpl   $0x2,-0x8(%rbp)
jne    1179 <main+0x49>
lea    0xe96(%rip),%rdi
mov    $0x2,%esi
call   1040 <printf@plt>
jmp    1193 <main+0x63>
mov    -0x8(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
lea    -0x1(%rdi),%eax
mov    $0x2,%esi
cmp    $0x2,%eax
jb     115a <main+0x2a>
call   1030 <check_prime@plt>
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add i32 %4, -1
%6 = icmp ult i32 %5, 2
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @check_prime(i32 %4)
br label %9
9: ; preds = %0, %7
%10 = phi i32 [ %8, %7 ], [ 2, %0 ]
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int lstat(char *, struct stat *);
int file_exists(char *filename) {
  struct stat buf;
  int st;
  st = lstat(filename, &buf);
  if (st) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <lstat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1142 <file_exists+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1149 <file_exists+0x39>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <lstat@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exists(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @lstat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
time_t mktime(struct tm *tm) { return 0; }


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

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

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @mktime(%struct.tm* %0) {
%2 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @mktime(%struct.tm* nocapture readnone %0) {
ret i32 0
}