xunge/DecIR huggingface dataset:
/* Variables and functions */
float exponential_in(float, float, float);
float exponential_f_in(float step, float max_steps, float max_val) {
  return exponential_in(step, max_steps, max_val);
}


x86 assembly (clang, -O0):
<exponential_f_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <exponential_in@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponential_f_in>:
jmp    1030 <exponential_in@plt>

LLVM IR (-O0):
define float @exponential_f_in(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call float @exponential_in(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @exponential_f_in(float %0, float %1, float %2) {
%4 = tail call float @exponential_in(float %0, float %1, float %2)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_putstr(char *str) {
  while (*str++)
    ft_putchar(*str);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1145 <ft_putstr+0x35>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ft_putchar@plt>
jmp    111c <ft_putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
cmpb   $0x0,(%rdi)
je     1131 <ft_putstr+0x21>
mov    %rdi,%rbx
add    $0x1,%rbx
nopl   (%rax)
movsbl (%rbx),%edi
call   1030 <ft_putchar@plt>
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <ft_putstr+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @ft_putstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %2
%6 = load i8, i8* %4
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @ft_putchar(i8 signext %10)
br label %3
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %6, %4 ], [ %0, %1 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = tail call i32 @ft_putchar(i8 signext %7)
%9 = load i8, i8* %6
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void endd(void) {}


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

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

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

LLVM IR (-O2):
define void @endd() {
ret void
}
int test_imm_F7int64_lowword_reg(long long val) {
  return ((val) & (0xF7 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F7int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 247
%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_F7int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 247
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void eb_jisx0208_to_euc(char *out_string, const char *in_string) {
  unsigned char *out_p = (unsigned char *)out_string;
  const unsigned char *in_p = (unsigned char *)in_string;
  while (*in_p != '\0')
    *out_p++ = ((*in_p++) | 0x80);
  *out_p = '\0';
}


x86 assembly (clang, -O0):
<eb_jisx0208_to_euc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     115b <eb_jisx0208_to_euc+0x5b>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movzbl (%rax),%eax
or     $0x80,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    111c <eb_jisx0208_to_euc+0x1c>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<eb_jisx0208_to_euc>:
mov    (%rsi),%al
test   %al,%al
je     1123 <eb_jisx0208_to_euc+0x23>
add    $0x1,%rsi
nopw   0x0(%rax,%rax,1)
or     $0x80,%al
mov    %al,(%rdi)
add    $0x1,%rdi
movzbl (%rsi),%eax
add    $0x1,%rsi
test   %al,%al
jne    1110 <eb_jisx0208_to_euc+0x10>
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @eb_jisx0208_to_euc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
br label %9
9: ; preds = %14, %2
%10 = load i8*, i8** %6
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %9
%15 = load i8*, i8** %6
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %6
%17 = load i8, i8* %15
%18 = zext i8 %17 to i32
%19 = or i32 %18, 128
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %5
store i8 %20, i8* %21
br label %9
23: ; preds = %9
%24 = load i8*, i8** %5
store i8 0, i8* %24
ret void
}

LLVM IR (-O2):
define void @eb_jisx0208_to_euc(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %12, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %11, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = or i8 %6, -128
%11 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %10, i8* %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i8* [ %0, %2 ], [ %11, %5 ]
store i8 0, i8* %15
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_sstdev(int, int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_sstdev(N, 1, x, stride);
  printf("sample standard deviation: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%ecx
mov    $0x1,%esi
call   1030 <stdlib_strided_sstdev@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%ecx
call   1030 <stdlib_strided_sstdev@plt>
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [31 x i8] c"sample standard deviation: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_sstdev(i32 %6, i32 1, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [31 x i8] c"sample standard deviation: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_sstdev(i32 4, i32 1, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ send_talked_duration();
void inqSpeakLen() { send_talked_duration(); }


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

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

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

LLVM IR (-O2):
define void @inqSpeakLen() {
%1 = tail call i32 (...) @send_talked_duration()
ret void
}
void internetUnpackIp(unsigned packed, unsigned char unpacked[4]) {
  int i;
  for (i = 3; i >= 0; --i) {
    unpacked[i] = (packed & 0xff);
    packed >>= 8;
  }
}


x86 assembly (clang, -O0):
<internetUnpackIp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1148 <internetUnpackIp+0x48>
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <internetUnpackIp+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<internetUnpackIp>:
bswap  %edi
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @internetUnpackIp(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 3, i32* %5
br label %6
6: ; preds = %19, %2
%7 = load i32, i32* %5
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %22
9: ; preds = %6
%10 = load i32, i32* %3
%11 = and i32 %10, 255
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
store i8 %12, i8* %16
%17 = load i32, i32* %3
%18 = lshr i32 %17, 8
store i32 %18, i32* %3
br label %19
19: ; preds = %9
%20 = load i32, i32* %5
%21 = add nsw i32 %20, -1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @internetUnpackIp(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
%4 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %3, i8* %4
%5 = lshr i32 %0, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %6, i8* %7
%8 = lshr i32 %0, 16
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %9, i8* %10
%11 = lshr i32 %0, 24
%12 = trunc i32 %11 to i8
store i8 %12, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
int /*<<< orphan*/ puts(char *);
void *xmalloc(size_t bytes) {
  void *p = malloc(bytes);
  if (!p) {
    puts("Failed: "
         "xmalloc");
    exit(-1);
  }
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <xmalloc+0x3a>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Failed: xmalloc\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 -1)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [16 x i8] c"Failed: xmalloc\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int sysapi_get_arch(void) {
  if ((size_t)-1 > 0xffffffffUL)
    return 1;
  else
    return 2;
}


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

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

LLVM IR (-O0):
define i32 @sysapi_get_arch() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sysapi_get_arch() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ validate_dpl();
int /*<<< orphan*/ validate_irq();
int /*<<< orphan*/ validate_priority();
int /*<<< orphan*/ validate_vector_id();
void validate_input_file(void) {
  validate_dpl();
  validate_vector_id();
  validate_priority();
  validate_irq();
}


x86 assembly (clang, -O0):
<validate_input_file>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <validate_dpl@plt>
mov    $0x0,%al
call   1040 <validate_vector_id@plt>
mov    $0x0,%al
call   1030 <validate_priority@plt>
mov    $0x0,%al
call   1060 <validate_irq@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_input_file>:
push   %rax
xor    %eax,%eax
call   1050 <validate_dpl@plt>
xor    %eax,%eax
call   1040 <validate_vector_id@plt>
xor    %eax,%eax
call   1030 <validate_priority@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <validate_irq@plt>

LLVM IR (-O0):
define void @validate_input_file() {
%1 = call i32 (...) @validate_dpl()
%2 = call i32 (...) @validate_vector_id()
%3 = call i32 (...) @validate_priority()
%4 = call i32 (...) @validate_irq()
ret void
}

LLVM IR (-O2):
define void @validate_input_file() {
%1 = tail call i32 (...) @validate_dpl()
%2 = tail call i32 (...) @validate_vector_id()
%3 = tail call i32 (...) @validate_priority()
%4 = tail call i32 (...) @validate_irq()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LCD_send4Bits(unsigned char);
void LCD_send(unsigned char date) {
  LCD_send4Bits(date);
  LCD_send4Bits(date << 4);
}


x86 assembly (clang, -O0):
<LCD_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <LCD_send4Bits@plt>
movzbl -0x1(%rbp),%eax
shl    $0x4,%eax
movzbl %al,%edi
call   1030 <LCD_send4Bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_send>:
push   %rbx
mov    %edi,%ebx
call   1030 <LCD_send4Bits@plt>
shl    $0x4,%bl
movzbl %bl,%edi
pop    %rbx
jmp    1030 <LCD_send4Bits@plt>

LLVM IR (-O0):
define void @LCD_send(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @LCD_send4Bits(i8 zeroext %3)
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 4
%8 = trunc i32 %7 to i8
%9 = call i32 @LCD_send4Bits(i8 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @LCD_send(i8 zeroext %0) {
%2 = tail call i32 @LCD_send4Bits(i8 zeroext %0)
%3 = shl i8 %0, 4
%4 = tail call i32 @LCD_send4Bits(i8 zeroext %3)
ret void
}
int shift_ndep(void) {
  char shift_amt = 0;
  int x = -2;
  asm("stc"
      "\n\t"
      "inc %[x]"
      "\n\t"
      "shl %[shift_amt], %[x]"
      "\n\t"
      "adc $0, %[x]"
      "\n\t"
      : [x] "+r"(x)
      : [shift_amt] "c"(shift_amt));
  return x;
}


x86 assembly (clang, -O0):
<shift_ndep>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
movl   $0xfffffffe,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x1(%rbp),%cl
stc
inc    %eax
shl    %cl,%eax
adc    $0x0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_ndep>:
mov    $0xfffffffe,%eax
xor    %ecx,%ecx
stc
inc    %eax
shl    %cl,%eax
adc    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @shift_ndep() {
%1 = alloca i8
%2 = alloca i32
store i8 0, i8* %1
store i32 -2, i32* %2
%3 = load i32, i32* %2
%4 = load i8, i8* %1
%5 = call i32 asm "stc\0A\09inc $0\0A\09shl $1, $0\0A\09adc $$0, $0\0A\09", "=r,{cx},0,~{dirflag},~{fpsr},~{flags}"(i8 %4, i32 %3)
store i32 %5, i32* %2
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @shift_ndep() {
%1 = tail call i32 asm "stc\0A\09inc $0\0A\09shl $1, $0\0A\09adc $$0, $0\0A\09", "=r,{cx},0,~{dirflag},~{fpsr},~{flags}"(i8 0, i32 -2)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  struct {
    char i;
  } a, *b = &a;
  char c;
  char *p = &c;
  *p = 'a';
  c = *p;
  b->i = 5;
  if (!(b->i == 5 && c == 'a'))
    abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x11(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x61,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x5,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5,%eax
jne    115c <main+0x4c>
movsbl -0x11(%rbp),%eax
cmp    $0x61,%eax
je     1163 <main+0x53>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i8 }
define i32 @main() {
%1 = alloca %struct.anon
%2 = alloca %struct.anon*
%3 = alloca i8
%4 = alloca i8*
store %struct.anon* %1, %struct.anon** %2
store i8* %3, i8** %4
%5 = load i8*, i8** %4
store i8 97, i8* %5
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
store i8 %7, i8* %3
%8 = load %struct.anon*, %struct.anon** %2
%9 = getelementptr inbounds %struct.anon, %struct.anon* %8, i32 0, i32 0
store i8 5, i8* %9
%10 = load %struct.anon*, %struct.anon** %2
%11 = getelementptr inbounds %struct.anon, %struct.anon* %10, i32 0, i32 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 5
br i1 %14, label %15, label %19
15: ; preds = %0
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 97
br i1 %18, label %21, label %19
19: ; preds = %15, %0
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
%struct.anon = type { i8 }
define i32 @main() {
ret i32 0
}
char *hash_plugin_summary(void) {
  return ("oracle-old \tOracle 7 up to 10r2 plugin");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"oracle-old \09Oracle 7 up to 10r2 plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [39 x i8] c"oracle-old \09Oracle 7 up to 10r2 plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0)
}
void func(void) {
  volatile int c;
  c = 5;
  c = 10;
  c = 20;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
movl   $0xa,-0x4(%rbp)
movl   $0x14,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
movl   $0x5,-0x4(%rsp)
movl   $0xa,-0x4(%rsp)
movl   $0x14,-0x4(%rsp)
ret

LLVM IR (-O0):
define void @func() {
%1 = alloca i32
store volatile i32 5, i32* %1
store volatile i32 10, i32* %1
store volatile i32 20, i32* %1
ret void
}

LLVM IR (-O2):
define void @func() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 5, i32* %1
store volatile i32 10, i32* %1
store volatile i32 20, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calltrap(int, int);
int EnableJoystick(void) { calltrap(7, 1); }


x86 assembly (clang, -O0):
<EnableJoystick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x7,%edi
mov    $0x1,%esi
call   1030 <calltrap@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EnableJoystick>:
mov    $0x7,%edi
mov    $0x1,%esi
jmp    1030 <calltrap@plt>

LLVM IR (-O0):
define i32 @EnableJoystick() {
%1 = alloca i32
%2 = call i32 @calltrap(i32 7, i32 1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @EnableJoystick() {
%1 = tail call i32 @calltrap(i32 7, i32 1)
ret i32 undef
}
void swap_ints(void *a, void *b) {
  int t = *(int *)a;
  *(int *)a = *(int *)b;
  *(int *)b = t;
}


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

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

LLVM IR (-O0):
define void @swap_ints(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 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
store i32 %8, i32* %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = load i8*, i8** %3
%13 = bitcast i8* %12 to i32*
store i32 %11, i32* %13
%14 = load i32, i32* %5
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to i32*
store i32 %14, i32* %16
ret void
}

LLVM IR (-O2):
define void @swap_ints(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
store i32 %4, i32* %5
ret void
}
void genbeql_idle() {}


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

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

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

LLVM IR (-O2):
define void @genbeql_idle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _ptrc_glFinish();
__attribute__((visibility("default"))) void emu_glFinish() { _ptrc_glFinish(); }


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

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

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

LLVM IR (-O2):
define void @emu_glFinish() {
%1 = tail call i32 (...) @_ptrc_glFinish()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SHA512_CTX;

/* Variables and functions */
int /*<<< orphan*/ SHA512_Final(unsigned char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA512_Init(int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA512_Update(int /*<<< orphan*/ *, unsigned char const *,
                                 size_t);
void crypto_hash_sha512_2(unsigned char *out, const unsigned char *in1,
                          size_t len1, const unsigned char *in2, size_t len2) {
  SHA512_CTX c;
  SHA512_Init(&c);
  SHA512_Update(&c, in1, len1);
  SHA512_Update(&c, in2, len2);
  SHA512_Final(out, &c);
}


x86 assembly (clang, -O0):
<crypto_hash_sha512_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    -0x2c(%rbp),%rdi
call   1050 <SHA512_Init@plt>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x2c(%rbp),%rdi
call   1030 <SHA512_Update@plt>
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    -0x2c(%rbp),%rdi
call   1030 <SHA512_Update@plt>
mov    -0x8(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <SHA512_Final@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_hash_sha512_2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%r13
lea    0x4(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <SHA512_Init@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1030 <SHA512_Update@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <SHA512_Update@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1040 <SHA512_Final@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @crypto_hash_sha512_2(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%12 = call i32 @SHA512_Init(i32* %11)
%13 = load i8*, i8** %7
%14 = load i64, i64* %8
%15 = call i32 @SHA512_Update(i32* %11, i8* %13, i64 %14)
%16 = load i8*, i8** %9
%17 = load i64, i64* %10
%18 = call i32 @SHA512_Update(i32* %11, i8* %16, i64 %17)
%19 = load i8*, i8** %6
%20 = call i32 @SHA512_Final(i8* %19, i32* %11)
ret void
}

LLVM IR (-O2):
define void @crypto_hash_sha512_2(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = alloca i32
%7 = bitcast i32* %6 to i8*
%8 = call i32 @SHA512_Init(i32* %6)
%9 = call i32 @SHA512_Update(i32* %6, i8* %1, i64 %2)
%10 = call i32 @SHA512_Update(i32* %6, i8* %3, i64 %4)
%11 = call i32 @SHA512_Final(i8* %0, i32* %6)
ret void
}
int main(int argc, char *argv[]) {
  printf("Hello world!\n");
  return argc > 1 ? atoi(argv[1]) : 5 ["Hello world!"] + '\v' - !!argc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1165 <main+0x45>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    1187 <main+0x67>
movsbl 0xea7(%rip),%eax
add    $0xb,%eax
cmpl   $0x0,-0x8(%rbp)
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x2,%ebx
jl     114c <main+0x2c>
mov    0x8(%r14),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <atoi@plt>
xor    %eax,%eax
test   %ebx,%ebx
sete   %al
or     $0x2a,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
@.str.1 = [13 x i8] c"Hello world!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %12)
br label %24
14: ; preds = %2
%15 = load i8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 5)
%16 = sext i8 %15 to i32
%17 = add nsw i32 %16, 11
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 0
%20 = xor i1 %19, true
%21 = xor i1 %20, true
%22 = zext i1 %21 to i32
%23 = sub nsw i32 %17, %22
br label %24
24: ; preds = %14, %9
%25 = phi i32 [ %13, %9 ], [ %23, %14 ]
ret i32 %25
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %7)
br label %12
9: ; preds = %2
%10 = icmp eq i32 %0, 0
%11 = select i1 %10, i32 43, i32 42
br label %12
12: ; preds = %9, %5
%13 = phi i32 [ %8, %5 ], [ %11, %9 ]
ret i32 %13
}
void __ipipe_exit_vm(void) {}


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

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

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

LLVM IR (-O2):
define void @__ipipe_exit_vm() {
ret void
}
/* Variables and functions */
int strkey_hash2(char const *, int, size_t *);
int strkey_hash(const char *data, int n) {
  size_t l;
  return strkey_hash2(data, n, &l);
}


x86 assembly (clang, -O0):
<strkey_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x18(%rbp),%rdx
call   1030 <strkey_hash2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strkey_hash>:
push   %rax
mov    %rsp,%rdx
call   1030 <strkey_hash2@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @strkey_hash(i8* %0, i32 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = call i32 @strkey_hash2(i8* %0, i32 %1, i64* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void pre() { printf("\n"); }


x86 assembly (clang, -O0):
<pre>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pre>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @pre() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
bool log_enabled(int level) { return true; }


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

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

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

LLVM IR (-O2):
define i32 @log_enabled(i32 %0) {
ret i32 1
}
void PRCMI2SClockFreqSet(unsigned long ulI2CClkFreq) {
  unsigned long long ullDiv;
  unsigned short usInteger;
  unsigned short usFrac;
  ullDiv = (((unsigned long long)240000000 * 65536) / ulI2CClkFreq);
  usInteger = (ullDiv / 65536);
  usFrac = (ullDiv % 65536);
  (*((volatile unsigned long *)(0x44025000 + 0x000000B0))) =
      ((usInteger & 0x3FF) << 16 | usFrac);
}


x86 assembly (clang, -O0):
<PRCMI2SClockFreqSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xe4e1c000000,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
mov    %ax,-0x12(%rbp)
mov    -0x10(%rbp),%rax
and    $0xffff,%rax
mov    %ax,-0x14(%rbp)
movzwl -0x12(%rbp),%eax
and    $0x3ff,%eax
shl    $0x10,%eax
movzwl -0x14(%rbp),%ecx
or     %ecx,%eax
movslq %eax,%rcx
mov    $0x440250b0,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRCMI2SClockFreqSet>:
movabs $0xe4e1c000000,%rax
xor    %edx,%edx
div    %rdi
and    $0x3ffffff,%eax
mov    %rax,0x440250b0
44
ret

LLVM IR (-O0):
define void @PRCMI2SClockFreqSet(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i16
%5 = alloca i16
store i64 %0, i64* %2
%6 = load i64, i64* %2
%7 = udiv i64 15728640000000, %6
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = udiv i64 %8, 65536
%10 = trunc i64 %9 to i16
store i16 %10, i16* %4
%11 = load i64, i64* %3
%12 = urem i64 %11, 65536
%13 = trunc i64 %12 to i16
store i16 %13, i16* %5
%14 = load i16, i16* %4
%15 = zext i16 %14 to i32
%16 = and i32 %15, 1023
%17 = shl i32 %16, 16
%18 = load i16, i16* %5
%19 = zext i16 %18 to i32
%20 = or i32 %17, %19
%21 = sext i32 %20 to i64
store volatile i64 %21, i64* inttoptr (i64 1141002416 to i64*)
ret void
}

LLVM IR (-O2):
define void @PRCMI2SClockFreqSet(i64 %0) {
%2 = udiv i64 15728640000000, %0
%3 = and i64 %2, 67108863
store volatile i64 %3, i64* inttoptr (i64 1141002416 to i64*)
ret void
}
void apply_DIRICHLET_X_0(double *V) {
  long j, index;
  for (j = 0; j < 50; j++) {
    index = j;
    V[index] = (0.0);
  }
}


x86 assembly (clang, -O0):
<apply_DIRICHLET_X_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x32,-0x10(%rbp)
jge    1144 <apply_DIRICHLET_X_0+0x44>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <apply_DIRICHLET_X_0+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply_DIRICHLET_X_0>:
push   %rax
mov    $0x190,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @apply_DIRICHLET_X_0(double* %0) {
%2 = alloca double*
%3 = alloca i64
%4 = alloca i64
store double* %0, double** %2
store i64 0, i64* %3
br label %5
5: ; preds = %13, %1
%6 = load i64, i64* %3
%7 = icmp slt i64 %6, 50
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i64, i64* %3
store i64 %9, i64* %4
%10 = load double*, double** %2
%11 = load i64, i64* %4
%12 = getelementptr inbounds double, double* %10, i64 %11
store double 0.000000e+00, double* %12
br label %13
13: ; preds = %8
%14 = load i64, i64* %3
%15 = add nsw i64 %14, 1
store i64 %15, i64* %3
br label %5
16: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @apply_DIRICHLET_X_0(double* nocapture writeonly %0) {
%2 = bitcast double* %0 to i8*
ret void
}
int test_imm_17uint8_reg(unsigned char val) {
  return ((val) & (0x17 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_17uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x17,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_17uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 23
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ isatty(int);
int column_width() {
  if (!isatty(1)) {
    return 80;
  } else {
    return 80;
  }
}


x86 assembly (clang, -O0):
<column_width>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <isatty@plt>
cmp    $0x0,%eax
jne    1137 <column_width+0x27>
movl   $0x50,-0x4(%rbp)
jmp    113e <column_width+0x2e>
movl   $0x50,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @column_width() {
%1 = tail call i32 @isatty(i32 1)
ret i32 80
}
void XkbLockModifiers() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @answer_nopost() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void help() {
  puts("Usage:");
  puts("  vfioctl command device-ids");
  puts("  command :: bind, unbind");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Usage:\00"
@.str.1 = [29 x i8] c" vfioctl command device-ids\00"
@.str.2 = [26 x i8] c" command :: bind, unbind\00"
define void @help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Usage:\00"
@.str.1 = [29 x i8] c" vfioctl command device-ids\00"
@.str.2 = [26 x i8] c" command :: bind, unbind\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xf0() {
  Assert_real((isbdigit(240) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              1205, ("isbdigit should be 0 for 0xf0"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0xf0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf0,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4b5,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0xf0>:
push   %rax
mov    $0xf0,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4b5,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xf0\00"
define void @t_isbdigit_0xf0() {
%1 = call i64 @isbdigit(i32 240)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1205, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xf0\00"
define void @t_isbdigit_0xf0() {
%1 = tail call i64 @isbdigit(i32 240)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1205, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned char decrypt_byte(unsigned key2) {
  unsigned short tmp = (key2) | 2;
  return (unsigned char)((tmp * (tmp ^ 1)) >> 8);
}


x86 assembly (clang, -O0):
<decrypt_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x2,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x6(%rbp),%ecx
xor    $0x1,%ecx
imul   %ecx,%eax
sar    $0x8,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decrypt_byte>:
and    $0xfffd,%edi
lea    0x2(%rdi),%eax
xor    $0x3,%edi
imul   %edi,%eax
shr    $0x8,%eax
ret

LLVM IR (-O0):
define zeroext i8 @decrypt_byte(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = or i32 %4, 2
%6 = trunc i32 %5 to i16
store i16 %6, i16* %3
%7 = load i16, i16* %3
%8 = zext i16 %7 to i32
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = xor i32 %10, 1
%12 = mul nsw i32 %8, %11
%13 = ashr i32 %12, 8
%14 = trunc i32 %13 to i8
ret i8 %14
}

LLVM IR (-O2):
define zeroext i8 @decrypt_byte(i32 %0) {
%2 = and i32 %0, 65533
%3 = or i32 %2, 2
%4 = xor i32 %2, 3
%5 = mul nuw nsw i32 %3, %4
%6 = lshr i32 %5, 8
%7 = trunc i32 %6 to i8
ret i8 %7
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int intrev(int);
int /*<<< orphan*/ isPrime(int);
int left_trunc(int32_t left) {
  for (; left; left = intrev(intrev(left) / 10)) {
    if (!isPrime(left))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<left_trunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1176 <left_trunc+0x56>
mov    -0x8(%rbp),%edi
call   1040 <isPrime@plt>
cmp    $0x0,%eax
jne    1152 <left_trunc+0x32>
movl   $0x0,-0x4(%rbp)
jmp    117d <left_trunc+0x5d>
jmp    1157 <left_trunc+0x37>
mov    -0x8(%rbp),%edi
call   1030 <intrev@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <intrev@plt>
mov    %eax,-0x8(%rbp)
jmp    112b <left_trunc+0xb>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<left_trunc>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebx
test   %edi,%edi
je     1167 <left_trunc+0x47>
mov    %edi,%ebp
xchg   %ax,%ax
mov    %ebp,%edi
call   1040 <isPrime@plt>
test   %eax,%eax
je     1165 <left_trunc+0x45>
mov    %ebp,%edi
call   1030 <intrev@plt>
cltq
imul   $0x66666667,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
call   1030 <intrev@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1130 <left_trunc+0x10>
jmp    1167 <left_trunc+0x47>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @left_trunc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %3
%9 = call i32 @isPrime(i32 %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %7
store i32 0, i32* %2
br label %19
12: ; preds = %7
br label %13
13: ; preds = %12
%14 = load i32, i32* %3
%15 = call i32 @intrev(i32 %14)
%16 = sdiv i32 %15, 10
%17 = call i32 @intrev(i32 %16)
store i32 %17, i32* %3
br label %4
18: ; preds = %4
store i32 1, i32* %2
br label %19
19: ; preds = %18, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @left_trunc(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %7
%4 = phi i32 [ %10, %7 ], [ %0, %1 ]
%5 = tail call i32 @isPrime(i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = tail call i32 @intrev(i32 %4)
%9 = sdiv i32 %8, 10
%10 = tail call i32 @intrev(i32 %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %3
12: ; preds = %3, %7, %1
%13 = phi i32 [ 1, %1 ], [ 1, %7 ], [ 0, %3 ]
ret i32 %13
}
char internal_round_b(char value) { return value; }


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

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

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

LLVM IR (-O2):
define signext i8 @internal_round_b(i8 returned signext %0) {
ret i8 %0
}
int hc2i(char c) {
  if (c >= 'a' && c <= 'f')
    return c - 'a' + 10;
  if (c >= 'A' && c <= 'F')
    return c - 'A' + 10;
  return c - '0';
}


x86 assembly (clang, -O0):
<hc2i>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1136 <hc2i+0x36>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jg     1136 <hc2i+0x36>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    116c <hc2i+0x6c>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1162 <hc2i+0x62>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     1162 <hc2i+0x62>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    116c <hc2i+0x6c>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hc2i>:
lea    -0x61(%rdi),%eax
lea    -0x41(%rdi),%ecx
cmp    $0x6,%cl
mov    $0xffffffc9,%ecx
mov    $0xffffffd0,%edx
cmovb  %ecx,%edx
cmp    $0x6,%al
mov    $0xffffffa9,%eax
cmovae %edx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @hc2i(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 102
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 97
%15 = add nsw i32 %14, 10
store i32 %15, i32* %2
br label %33
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 65
br i1 %19, label %20, label %29
20: ; preds = %16
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %22, 70
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = sub nsw i32 %26, 65
%28 = add nsw i32 %27, 10
store i32 %28, i32* %2
br label %33
29: ; preds = %20, %16
%30 = load i8, i8* %3
%31 = sext i8 %30 to i32
%32 = sub nsw i32 %31, 48
store i32 %32, i32* %2
br label %33
33: ; preds = %29, %24, %11
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @hc2i(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -97
%4 = icmp ult i8 %3, 6
%5 = add i8 %0, -65
%6 = icmp ult i8 %5, 6
%7 = select i1 %6, i32 -55, i32 -48
%8 = select i1 %4, i32 -87, i32 %7
%9 = add nsw i32 %8, %2
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int, char *, int);
int main(void) {
  write(1, "Hello world!\n", sizeof("Hello world!\n"));
  exit(5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
mov    $0xe,%edx
call   1030 <write@plt>
mov    $0x5,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 14)
%3 = call i32 @exit(i32 5)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello world!\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 14)
%2 = tail call i32 @exit(i32 5)
unreachable
}