xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ crc64_iso_norm_base(int /*<<< orphan*/,
                                       int /*<<< orphan*/ const *,
                                       int /*<<< orphan*/);
uint64_t crc64_iso_norm(uint64_t seed, const uint8_t *buf, uint64_t len) {
  return crc64_iso_norm_base(seed, buf, len);
}


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

x86 assembly (clang, -O2):
<crc64_iso_norm>:
jmp    1030 <crc64_iso_norm_base@plt>

LLVM IR (-O0):
define i32 @crc64_iso_norm(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
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %6
%10 = call i32 @crc64_iso_norm_base(i32 %7, i32* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @crc64_iso_norm(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @crc64_iso_norm_base(i32 %0, i32* %1, i32 %2)
ret i32 %4
}
int test_imm_4Cuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x4C << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_4Cuint64_highword_mem>:
testb  $0x4c,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Cuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 326417514496
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ longestCommonPrefix(char **, int);
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int main() {
  char *strs[] = {"a", "b"};
  puts(longestCommonPrefix(strs, 2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x2,%esi
call   1040 <longestCommonPrefix@plt>
mov    %eax,%edi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0x2ce5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1040 <longestCommonPrefix@plt>
mov    %eax,%edi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@__const.main.strs = [2 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0)]
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8*]
store i32 0, i32* %1
%3 = bitcast [2 x i8*]* %2 to i8*
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%5 = call i32 @longestCommonPrefix(i8** %4, i32 2)
%6 = call i32 @puts(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@__const.main.strs = [2 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0)]
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%4 = call i32 @longestCommonPrefix(i8** %3, i32 2)
%5 = call i32 @puts(i32 %4)
ret i32 0
}
void cvt_u32_le_from_ul(unsigned char out[4U], unsigned long x) {
  out[0] = (unsigned char)(x & 0xff);
  x >>= 8;
  out[1] = (unsigned char)(x & 0xff);
  x >>= 8;
  out[2] = (unsigned char)(x & 0xff);
  x >>= 8;
  out[3] = (unsigned char)(x & 0xff);
}


x86 assembly (clang, -O0):
<cvt_u32_le_from_ul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvt_u32_le_from_ul>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @cvt_u32_le_from_ul(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 255
%7 = trunc i64 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i64, i64* %4
%11 = lshr i64 %10, 8
store i64 %11, i64* %4
%12 = load i64, i64* %4
%13 = and i64 %12, 255
%14 = trunc i64 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i64, i64* %4
%18 = lshr i64 %17, 8
store i64 %18, i64* %4
%19 = load i64, i64* %4
%20 = and i64 %19, 255
%21 = trunc i64 %20 to i8
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 2
store i8 %21, i8* %23
%24 = load i64, i64* %4
%25 = lshr i64 %24, 8
store i64 %25, i64* %4
%26 = load i64, i64* %4
%27 = and i64 %26, 255
%28 = trunc i64 %27 to i8
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i64 3
store i8 %28, i8* %30
ret void
}

LLVM IR (-O2):
define void @cvt_u32_le_from_ul(i8* nocapture writeonly %0, i64 %1) {
%3 = trunc i64 %1 to i8
store i8 %3, i8* %0
%4 = lshr i64 %1, 8
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i64 %1, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i64 %1, 24
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_remove_symbol_from_table(int i) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(291, &i, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_remove_symbol_from_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x123,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_remove_symbol_from_table>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x123,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_remove_symbol_from_table(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 291, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_remove_symbol_from_table(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 291, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_FREE(int /*<<< orphan*/ *);
void CPU_FREEp(cpu_set_t **p) {
  if (*p)
    CPU_FREE(*p);
}


x86 assembly (clang, -O0):
<CPU_FREEp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <CPU_FREEp+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <CPU_FREE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CPU_FREEp>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <CPU_FREEp+0xd>
jmp    1030 <CPU_FREE@plt>
ret

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

LLVM IR (-O2):
define void @CPU_FREEp(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @CPU_FREE(i32* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPC_disconnect();
int /*<<< orphan*/ carmen_close_input_blogfile();
int /*<<< orphan*/ carmen_close_output_blogfile();
void carmen_ipc_disconnect(void) {
  carmen_close_output_blogfile();
  carmen_close_input_blogfile();
  IPC_disconnect();
}


x86 assembly (clang, -O0):
<carmen_ipc_disconnect>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <carmen_close_output_blogfile@plt>
mov    $0x0,%al
call   1030 <carmen_close_input_blogfile@plt>
mov    $0x0,%al
call   1040 <IPC_disconnect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<carmen_ipc_disconnect>:
push   %rax
xor    %eax,%eax
call   1050 <carmen_close_output_blogfile@plt>
xor    %eax,%eax
call   1030 <carmen_close_input_blogfile@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <IPC_disconnect@plt>

LLVM IR (-O0):
define void @carmen_ipc_disconnect() {
%1 = call i32 (...) @carmen_close_output_blogfile()
%2 = call i32 (...) @carmen_close_input_blogfile()
%3 = call i32 (...) @IPC_disconnect()
ret void
}

LLVM IR (-O2):
define void @carmen_ipc_disconnect() {
%1 = tail call i32 (...) @carmen_close_output_blogfile()
%2 = tail call i32 (...) @carmen_close_input_blogfile()
%3 = tail call i32 (...) @IPC_disconnect()
ret void
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int _ioctl(int, char, struct termios *);
int tcgetattr(int fd, struct termios *tp) {
  return _ioctl(fd, (('x' << 8) | 1), tp);
}


x86 assembly (clang, -O0):
<tcgetattr>:
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    $0x1,%esi
call   1030 <_ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcgetattr>:
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <_ioctl@plt>

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

LLVM IR (-O2):
%struct.termios = type { i32 }
define i32 @tcgetattr(i32 %0, %struct.termios* %1) {
%3 = tail call i32 @_ioctl(i32 %0, i8 signext 1, %struct.termios* %1)
ret i32 %3
}
void bfq_check_next_in_service(struct bfq_sched_data *sd,
                               struct bfq_entity *entity) {}


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

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

LLVM IR (-O0):
%struct.bfq_sched_data = type opaque
%struct.bfq_entity = type opaque
define void @bfq_check_next_in_service(%struct.bfq_sched_data* %0, %struct.bfq_entity* %1) {
%3 = alloca %struct.bfq_sched_data*
%4 = alloca %struct.bfq_entity*
store %struct.bfq_sched_data* %0, %struct.bfq_sched_data** %3
store %struct.bfq_entity* %1, %struct.bfq_entity** %4
ret void
}

LLVM IR (-O2):
%struct.bfq_sched_data = type opaque
%struct.bfq_entity = type opaque
define void @bfq_check_next_in_service(%struct.bfq_sched_data* nocapture %0, %struct.bfq_entity* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ second();
void first(void) {
  second();
  printf("first\n");
}


x86 assembly (clang, -O0):
<first>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <second@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<first>:
push   %rax
xor    %eax,%eax
call   1040 <second@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [6 x i8] c"first\00"
define void @first() {
%1 = tail call i32 (...) @second()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double u_eq44(int, double);
double g6_eq45(double r, double a, double c) {
  double r1 = 1.0 / r;
  double r2 = r1 * r1;
  double r4 = r2 * r2;
  double r6 = r4 * r2;
  return c * r6 * u_eq44(9, a * r);
}


x86 assembly (clang, -O0):
<g6_eq45>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    $0x9,%edi
call   1030 <u_eq44@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g6_eq45>:
push   %rax
movsd  0xee7(%rip),%xmm3
divsd  %xmm0,%xmm3
mulsd  %xmm3,%xmm3
movapd %xmm3,%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm2,%xmm4
movsd  %xmm4,(%rsp)
mulsd  %xmm1,%xmm0
mov    $0x9,%edi
call   1030 <u_eq44@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @g6_eq45(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%11 = load double, double* %4
%12 = fdiv double 1.000000e+00, %11
store double %12, double* %7
%13 = load double, double* %7
%14 = load double, double* %7
%15 = fmul double %13, %14
store double %15, double* %8
%16 = load double, double* %8
%17 = load double, double* %8
%18 = fmul double %16, %17
store double %18, double* %9
%19 = load double, double* %9
%20 = load double, double* %8
%21 = fmul double %19, %20
store double %21, double* %10
%22 = load double, double* %6
%23 = load double, double* %10
%24 = fmul double %22, %23
%25 = load double, double* %5
%26 = load double, double* %4
%27 = fmul double %25, %26
%28 = call double @u_eq44(i32 9, double %27)
%29 = fmul double %24, %28
ret double %29
}

LLVM IR (-O2):
define double @g6_eq45(double %0, double %1, double %2) {
%4 = fdiv double 1.000000e+00, %0
%5 = fmul double %4, %4
%6 = fmul double %5, %5
%7 = fmul double %5, %6
%8 = fmul double %7, %2
%9 = fmul double %0, %1
%10 = tail call double @u_eq44(i32 9, double %9)
%11 = fmul double %8, %10
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int globals() {
  int x;
  x = 5;
  if (x == 5) {
    int y;
    y = 20;
  }
  assert(x == 5);
  return 0;
}


x86 assembly (clang, -O0):
<globals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jne    1130 <globals+0x20>
movl   $0x14,-0x8(%rbp)
cmpl   $0x5,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<globals>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @globals() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
void CRYPTO_set_add_lock_callback(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_set_add_lock_callback() {
ret void
}
void c_pomp_finalize_() { (void)0; }


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

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

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

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

/* Variables and functions */
uint32_t and0xf0(uint32_t x) { return x & 0xf0; }


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

x86 assembly (clang, -O2):
<and0xf0>:
mov    %edi,%eax
and    $0xf0,%eax
ret

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

LLVM IR (-O2):
define i32 @and0xf0(i32 %0) {
%2 = and i32 %0, 240
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ print_int(int);
int /*<<< orphan*/ print_string(char *);
void loopNoAfterThought(int times) {
  int i;
  for (i = times; i > 0;) {
    print_int(i);
    print_string(" ");
    i = i - 1;
  }
  print_int(i);
  print_string(" ");
}


x86 assembly (clang, -O0):
<loopNoAfterThought>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    115d <loopNoAfterThought+0x3d>
mov    -0x8(%rbp),%edi
call   1040 <print_int@plt>
lea    0xeb6(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1131 <loopNoAfterThought+0x11>
mov    -0x8(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe94(%rip),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loopNoAfterThought>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
test   %edi,%edi
jle    115b <loopNoAfterThought+0x3b>
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1040 <print_int@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
lea    -0x1(%rbx),%eax
cmp    $0x1,%ebx
mov    %eax,%ebx
ja     1140 <loopNoAfterThought+0x20>
xor    %ebx,%ebx
mov    %ebx,%edi
call   1040 <print_int@plt>
lea    0xe97(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <print_string@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @loopNoAfterThought(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = tail call i32 @print_int(i32 %4)
%6 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = add nsw i32 %4, -1
%8 = icmp ugt i32 %4, 1
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ 0, %3 ]
%11 = tail call i32 @print_int(i32 %10)
%12 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long HashExternalAddress(void *theExternalAddress,
                                  unsigned long range) {
  unsigned long tally;
  union {
    void *vv;
    unsigned uv;
  } fis;
  fis.uv = 0;
  fis.vv = theExternalAddress;
  tally = (fis.uv / 256);
  if (range == 0) {
    return tally;
  }
  return (tally % range);
}


x86 assembly (clang, -O0):
<HashExternalAddress>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
shr    $0x8,%eax
mov    %eax,%eax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    113f <HashExternalAddress+0x3f>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114f <HashExternalAddress+0x4f>
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rdx,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashExternalAddress>:
mov    %rdi,%rax
shr    $0x8,%eax
test   %rsi,%rsi
je     1116 <HashExternalAddress+0x16>
cmp    %rsi,%rax
jb     1116 <HashExternalAddress+0x16>
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
%union.anon = type { i8* }
define i64 @HashExternalAddress(i8* %0, i64 %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca %union.anon
store i8* %0, i8** %4
store i64 %1, i64* %5
%8 = bitcast %union.anon* %7 to i32*
store i32 0, i32* %8
%9 = load i8*, i8** %4
%10 = bitcast %union.anon* %7 to i8**
store i8* %9, i8** %10
%11 = bitcast %union.anon* %7 to i32*
%12 = load i32, i32* %11
%13 = udiv i32 %12, 256
%14 = zext i32 %13 to i64
store i64 %14, i64* %6
%15 = load i64, i64* %5
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = load i64, i64* %6
store i64 %18, i64* %3
br label %23
19: ; preds = %2
%20 = load i64, i64* %6
%21 = load i64, i64* %5
%22 = urem i64 %20, %21
store i64 %22, i64* %3
br label %23
23: ; preds = %19, %17
%24 = load i64, i64* %3
ret i64 %24
}

LLVM IR (-O2):
define i64 @HashExternalAddress(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = lshr i64 %3, 8
%5 = and i64 %4, 16777215
%6 = icmp eq i64 %1, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = urem i64 %5, %1
br label %9
9: ; preds = %2, %7
%10 = phi i64 [ %8, %7 ], [ %5, %2 ]
ret i64 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int iswlower(int /*<<< orphan*/);
int iswlower_l(wint_t c, locale_t l) { return iswlower(c); }


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

x86 assembly (clang, -O2):
<iswlower_l>:
jmp    1030 <iswlower@plt>

LLVM IR (-O0):
define i32 @iswlower_l(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 = call i32 @iswlower(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @iswlower_l(i32 %0, i32 %1) {
%3 = tail call i32 @iswlower(i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ writeStringKey(char *, char *, char *, char *);
void writeBoolKey(char *section, char *key, bool keyValue, char *configFile) {
  if (keyValue) {
    writeStringKey(section, key, "True", configFile);
  } else {
    writeStringKey(section, key, "False", configFile);
  }
}


x86 assembly (clang, -O0):
<writeBoolKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     114e <writeBoolKey+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    0xebc(%rip),%rdx
call   1030 <writeStringKey@plt>
jmp    1166 <writeBoolKey+0x56>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    0xea4(%rip),%rdx
call   1030 <writeStringKey@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeBoolKey>:
test   %edx,%edx
lea    0xeec(%rip),%rax
lea    0xee0(%rip),%rdx
cmove  %rax,%rdx
jmp    1030 <writeStringKey@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"True\00"
@.str.1 = [6 x i8] c"False\00"
define void @writeBoolKey(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %7
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = load i8*, i8** %5
%13 = load i8*, i8** %6
%14 = load i8*, i8** %8
%15 = call i32 @writeStringKey(i8* %12, i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %21
16: ; preds = %4
%17 = load i8*, i8** %5
%18 = load i8*, i8** %6
%19 = load i8*, i8** %8
%20 = call i32 @writeStringKey(i8* %17, i8* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %16, %11
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"True\00"
@.str.1 = [6 x i8] c"False\00"
define void @writeBoolKey(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = icmp eq i32 %2, 0
%6 = select i1 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%7 = tail call i32 @writeStringKey(i8* %0, i8* %1, i8* %6, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int dogs;
  printf("How many dogs so you have?\n");
  scanf("%d", &dogs);
  printf("So you have %d dog(s)!\n", dogs);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"How many dogs so you have?\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"So you have %d dog(s)!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"So you have %d dog(s)!\0A\00"
@str = [27 x i8] c"How many dogs so you have?\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
int main() {
  int x, y;
  __asm__ __volatile__("mov $0x11223344, %%eax\n\t"
                       "mov $0x1a2b3c4d, %%edx\n\t"
                       "clc\n\t"
                       "mov $0xaabbccdd, %%ecx\n\t"
                       "cmovc %%eax, %%edx\n\t"
                       "mov %%edx, %0\n\t"
                       "mov $0x11223344, %%eax\n\t"
                       "mov $0x1a2b3c4d, %%edx\n\t"
                       "stc\n\t"
                       "mov $0xaabbccdd, %%ecx\n\t"
                       "cmovc %%eax, %%edx\n\t"
                       "mov %%edx, %1\n\t"
                       : "=m"(x), "=m"(y)
                       :
                       : "eax", "ecx", "edx");
  do {
    if (!(x == 0x1a2b3c4d))
      asm volatile(".byte 0xd6" : : "a"(1));
  } while (0);
  do {
    if (!(y == 0x11223344))
      asm volatile(".byte 0xd6" : : "a"(1));
  } while (0);
  asm volatile(".byte 0xd6" : : "a"(0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x11223344,%eax
mov    $0x1a2b3c4d,%edx
clc
mov    $0xaabbccdd,%ecx
cmovb  %eax,%edx
mov    %edx,-0x8(%rbp)
mov    $0x11223344,%eax
mov    $0x1a2b3c4d,%edx
stc
mov    $0xaabbccdd,%ecx
cmovb  %eax,%edx
mov    %edx,-0xc(%rbp)
cmpl   $0x1a2b3c4d,-0x8(%rbp)
je     114a <main+0x4a>
mov    $0x1,%eax
(bad)
jmp    114f <main+0x4f>
jmp    1154 <main+0x54>
cmpl   $0x11223344,-0xc(%rbp)
je     1167 <main+0x67>
mov    $0x1,%eax
(bad)
jmp    116c <main+0x6c>
xor    %eax,%eax
(bad)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x11223344,%eax
mov    $0x1a2b3c4d,%edx
clc
mov    $0xaabbccdd,%ecx
cmovb  %eax,%edx
mov    %edx,-0x4(%rsp)
mov    $0x11223344,%eax
mov    $0x1a2b3c4d,%edx
stc
mov    $0xaabbccdd,%ecx
cmovb  %eax,%edx
mov    %edx,-0x8(%rsp)
cmpl   $0x1a2b3c4d,-0x4(%rsp)
1a
je     113e <main+0x3e>
mov    $0x1,%eax
(bad)
cmpl   $0x11223344,-0x8(%rsp)
11
je     114e <main+0x4e>
mov    $0x1,%eax
(bad)
xor    %eax,%eax
(bad)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 439041101
br i1 %6, label %8, label %7
7: ; preds = %0
br label %8
8: ; preds = %0, %7
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 287454020
br i1 %10, label %12, label %11
11: ; preds = %8
br label %12
12: ; preds = %11, %8
ret i32 0
}
int pcp_version() { return ((0 * 10000) + (4 * 100) + (1)); }


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

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

LLVM IR (-O0):
define i32 @pcp_version() {
ret i32 401
}

LLVM IR (-O2):
define i32 @pcp_version() {
ret i32 401
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ memcmp(char *, char *, int);
void check(char *test, char *match, int n) {
  if (memcmp(test, match, n))
    abort();
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
je     1154 <check+0x34>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rax
call   1040 <memcmp@plt>
test   %rax,%rax
jne    112d <check+0xd>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @check(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @memcmp(i8* %0, i8* %1, i32 %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpacklo_ps(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_unpacklo_ps(__m128 A, __m128 B) { return _mm_unpacklo_ps(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_unpacklo_ps>:
jmp    1030 <_mm_unpacklo_ps@plt>

LLVM IR (-O0):
define i32 @test_mm_unpacklo_ps(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_unpacklo_ps(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_unpacklo_ps(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpacklo_ps(i32 %0, i32 %1)
ret i32 %3
}
void *_Locale_messages_create(const char *__DUMMY_PAR) { return 0; }


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

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

LLVM IR (-O0):
define i8* @_Locale_messages_create(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @_Locale_messages_create(i8* nocapture readnone %0) {
ret i8* null
}
short __ocl_convert_short_char_sat(char src) { return src; }


x86 assembly (clang, -O0):
<__ocl_convert_short_char_sat>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_convert_short_char_sat>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @__ocl_convert_short_char_sat(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i16
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @__ocl_convert_short_char_sat(i8 signext %0) {
%2 = sext i8 %0 to i16
ret i16 %2
}
/* Variables and functions */
scalar_t__ abs(int /*<<< orphan*/);
int /*<<< orphan*/ common_rand();
double common_randJS() {
  return ((double)abs(common_rand()) / (double)0x7fffffff);
}


x86 assembly (clang, -O0):
<common_randJS>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <common_rand@plt>
mov    %eax,%edi
call   1030 <abs@plt>
cvtsi2sd %rax,%xmm0
movsd  0xec1(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<common_randJS>:
push   %rax
xor    %eax,%eax
call   1040 <common_rand@plt>
mov    %eax,%edi
call   1030 <abs@plt>
cvtsi2sd %rax,%xmm0
divsd  0xec4(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @common_randJS() {
%1 = call i32 (...) @common_rand()
%2 = call i64 @abs(i32 %1)
%3 = sitofp i64 %2 to double
%4 = fdiv double %3, 0x41DFFFFFFFC00000
ret double %4
}

LLVM IR (-O2):
define double @common_randJS() {
%1 = tail call i32 (...) @common_rand()
%2 = tail call i64 @abs(i32 %1)
%3 = sitofp i64 %2 to double
%4 = fdiv double %3, 0x41DFFFFFFFC00000
ret double %4
}
void HSMMCSDResponseGet(unsigned int baseAddr, unsigned int *rsp) {
  unsigned int i;
  for (i = 0; i <= 3; i++) {
    rsp[i] = (*((volatile unsigned int *)(baseAddr + (0x210 + (i * 4)))));
  }
}


x86 assembly (clang, -O0):
<HSMMCSDResponseGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
ja     1149 <HSMMCSDResponseGet+0x49>
mov    -0x4(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
add    $0x210,%ecx
add    %ecx,%eax
mov    %eax,%eax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <HSMMCSDResponseGet+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HSMMCSDResponseGet>:
lea    0x210(%rdi),%eax
mov    (%rax),%eax
mov    %eax,(%rsi)
lea    0x214(%rdi),%eax
mov    (%rax),%eax
mov    %eax,0x4(%rsi)
lea    0x218(%rdi),%eax
mov    (%rax),%eax
mov    %eax,0x8(%rsi)
add    $0x21c,%edi
mov    (%rdi),%eax
mov    %eax,0xc(%rsi)
ret

LLVM IR (-O0):
define void @HSMMCSDResponseGet(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
br label %6
6: ; preds = %22, %2
%7 = load i32, i32* %5
%8 = icmp ule i32 %7, 3
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = mul i32 %11, 4
%13 = add i32 528, %12
%14 = add i32 %10, %13
%15 = zext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load volatile i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
br label %22
22: ; preds = %9
%23 = load i32, i32* %5
%24 = add i32 %23, 1
store i32 %24, i32* %5
br label %6
25: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @HSMMCSDResponseGet(i32 %0, i32* nocapture writeonly %1) {
%3 = add i32 %0, 528
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
store i32 %6, i32* %1
%7 = add i32 %0, 532
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %10, i32* %11
%12 = add i32 %0, 536
%13 = zext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
%15 = load volatile i32, i32* %14
%16 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %15, i32* %16
%17 = add i32 %0, 540
%18 = zext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
%20 = load volatile i32, i32* %19
%21 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %20, i32* %21
ret void
}
/* Variables and functions */
char atoi(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int test_multicast(char *ip_addr) {
  char a_part1[4];
  char i_part1;
  strncpy(a_part1, ip_addr, 3);
  a_part1[3] = '\0';
  i_part1 = atoi(a_part1);
  if ((i_part1 & 0xe0) == 0xe0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<test_multicast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x11(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <atoi@plt>
mov    %al,-0x15(%rbp)
movsbl -0x15(%rbp),%eax
and    $0xe0,%eax
cmp    $0xe0,%eax
jne    116e <test_multicast+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <test_multicast+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_multicast>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rsi
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncpy@plt>
movb   $0x0,0xf(%rsp)
mov    %rbx,%rdi
call   1040 <atoi@plt>
xor    %ecx,%ecx
cmp    $0xe0,%al
setae  %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_multicast(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [4 x i8]
%5 = alloca i8
store i8* %0, i8** %3
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @strncpy(i8* %6, i8* %7, i32 3)
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 3
store i8 0, i8* %9
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%11 = call signext i8 @atoi(i8* %10)
store i8 %11, i8* %5
%12 = load i8, i8* %5
%13 = sext i8 %12 to i32
%14 = and i32 %13, 224
%15 = icmp eq i32 %14, 224
br i1 %15, label %16, label %17
16: ; preds = %1
store i32 1, i32* %2
br label %18
17: ; preds = %1
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @test_multicast(i8* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @strncpy(i8* %3, i8* %0, i32 3)
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
store i8 0, i8* %5
%6 = call signext i8 @atoi(i8* %3)
%7 = icmp ugt i8 %6, -33
%8 = zext i1 %7 to i32
ret i32 %8
}
int task_led_handler(void *task, const void *msg) { return (-1); }


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

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

LLVM IR (-O0):
define i32 @task_led_handler(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @task_led_handler(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void nested_inner() {
  int i = 0;
  while (i < 10) {
    while (1)
      assert(1);
    i++;
  }
}


x86 assembly (clang, -O0):
<nested_inner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    113d <nested_inner+0x2d>
jmp    112e <nested_inner+0x1e>
mov    $0x1,%edi
call   1030 <assert@plt>
jmp    112e <nested_inner+0x1e>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @nested_inner() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %2
br label %6
6: ; preds = %5, %6
%7 = call i32 @assert(i32 1)
br label %6
8: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @nested_inner() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @assert(i32 1)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ A(int, int);
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int main() {
  int g = __VERIFIER_nondet_int();
  int h = !g;
  A(g, h);
  A(g, h);
  if (g) {
  ERROR:
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <A@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <A@plt>
cmpl   $0x0,-0x8(%rbp)
je     1186 <main+0x56>
jmp    117f <main+0x4f>
mov    $0x0,%al
call   1050 <__VERIFIER_error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %ebp,%ebp
test   %eax,%eax
sete   %bpl
mov    %eax,%edi
mov    %ebp,%esi
call   1040 <A@plt>
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <A@plt>
test   %ebx,%ebx
je     1161 <main+0x31>
xor    %eax,%eax
call   1050 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @A(i32 %9, i32 %10)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 @A(i32 %12, i32 %13)
%15 = load i32, i32* %2
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %0
br label %18
18: ; preds = %17
%19 = call i32 (...) @__VERIFIER_error()
br label %20
20: ; preds = %18, %0
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @A(i32 %1, i32 %3)
%5 = tail call i32 @A(i32 %1, i32 %3)
br i1 %2, label %8, label %6
6: ; preds = %0
%7 = tail call i32 (...) @__VERIFIER_error()
br label %8
8: ; preds = %6, %0
ret i32 0
}
unsigned xrop3_243_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;
  stk2 = ~S;
  stk1 = T | stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_243_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    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -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_243_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
not    %eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_243_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = xor i32 %4, -1
ret i32 %5
}