xunge/DecIR huggingface dataset:
/* Variables and functions */
int verify_result();
int simulate_thread_step_verify() { return verify_result(); }


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

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

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

LLVM IR (-O2):
define i32 @simulate_thread_step_verify() {
%1 = tail call i32 (...) @verify_result()
ret i32 %1
}
/* Variables and functions */
int edit1(int *, char);
int editor(void *v) {
  int *msgvec = v;
  return edit1(msgvec, 'e');
}


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

x86 assembly (clang, -O2):
<editor>:
mov    $0x65,%esi
jmp    1030 <edit1@plt>

LLVM IR (-O0):
define i32 @editor(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @edit1(i32* %6, i8 signext 101)
ret i32 %7
}

LLVM IR (-O2):
define i32 @editor(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @edit1(i32* %2, i8 signext 101)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f(int, int *);
int main(int argc, char **argv) {
  if (f(100, (int *)0) != 1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x64,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <f@plt>
cmp    $0x1,%eax
je     1164 <main+0x34>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
xor    %esi,%esi
call   1040 <f@plt>
cmp    $0x1,%eax
jne    1149 <main+0x19>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
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 @f(i32 100, i32* null)
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %2
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @f(i32 100, i32* null)
%4 = icmp eq i32 %3, 1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
%8 = tail call i32 @exit(i32 0)
unreachable
}
unsigned int roundup(unsigned int n, unsigned int m) {
  return ((n + (m - 1)) / m) * m;
}


x86 assembly (clang, -O0):
<roundup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
add    %ecx,%eax
xor    %edx,%edx
divl   -0x8(%rbp)
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundup>:
lea    (%rdi,%rsi,1),%ecx
add    $0xffffffff,%ecx
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
sub    %edx,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @roundup(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 = sub i32 %6, 1
%8 = add i32 %5, %7
%9 = load i32, i32* %4
%10 = udiv i32 %8, %9
%11 = load i32, i32* %4
%12 = mul i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @roundup(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = add i32 %3, %1
%5 = urem i32 %4, %1
%6 = sub i32 %4, %5
ret i32 %6
}
void check_preempt_curr_simple_rr(struct rq *rq, struct task_struct *p,
                                  int wakeflags) {}


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

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

LLVM IR (-O0):
%struct.rq = type opaque
%struct.task_struct = type opaque
define void @check_preempt_curr_simple_rr(%struct.rq* %0, %struct.task_struct* %1, i32 %2) {
%4 = alloca %struct.rq*
%5 = alloca %struct.task_struct*
%6 = alloca i32
store %struct.rq* %0, %struct.rq** %4
store %struct.task_struct* %1, %struct.task_struct** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.rq = type opaque
%struct.task_struct = type opaque
define void @check_preempt_curr_simple_rr(%struct.rq* nocapture %0, %struct.task_struct* nocapture %1, i32 %2) {
ret void
}
long set_screen(string)
char *string[];
{
  long maxpx, maxpy;
  if (sscanf(*string, "%d %d", &maxpx, &maxpy) != 2)
    return (0);
  if (!char_setscr(maxpx, maxpy))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<set_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xec6(%rip),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x2,%eax
je     115f <set_screen+0x3f>
movq   $0x0,-0x8(%rbp)
jmp    118c <set_screen+0x6c>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1030 <char_setscr@plt>
cmp    $0x0,%eax
jne    1184 <set_screen+0x64>
movq   $0x0,-0x8(%rbp)
jmp    118c <set_screen+0x6c>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_screen>:
push   %rbx
sub    $0x10,%rsp
mov    (%rdi),%rdi
lea    0xed1(%rip),%rsi
xor    %ebx,%ebx
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
xor    %eax,%eax
call   1040 <sscanf@plt>
cmp    $0x2,%eax
jne    115c <set_screen+0x3c>
mov    0x8(%rsp),%rdi
mov    (%rsp),%rsi
xor    %eax,%eax
call   1030 <char_setscr@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i64 @set_screen(i8** nocapture %0) {
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = load i8*, i8** %0
%7 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3)
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i64, i64* %2
%11 = load i64, i64* %3
%12 = call i32 (i64, i64, ...) bitcast (i32 (...)* @char_setscr to i32 (i64, i64, ...)*)(i64 %10, i64 %11)
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
br label %15
15: ; preds = %9, %1
%16 = phi i64 [ 0, %1 ], [ %14, %9 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ OUTINS(int /*<<< orphan*/);
void INS_NOP(void) { OUTINS(0); }


x86 assembly (clang, -O0):
<INS_NOP>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <OUTINS@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<INS_NOP>:
xor    %edi,%edi
jmp    1030 <OUTINS@plt>

LLVM IR (-O0):
define void @INS_NOP() {
%1 = call i32 @OUTINS(i32 0)
ret void
}

LLVM IR (-O2):
define void @INS_NOP() {
%1 = tail call i32 @OUTINS(i32 0)
ret void
}
int is_linefeed(const char ch) {
  return ((ch == '\r') || (ch == '\n')) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_linefeed>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_linefeed+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_linefeed>:
cmp    $0xd,%dil
sete   %al
cmp    $0xa,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_linefeed(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 13
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 10
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_linefeed(i8 signext %0) {
%2 = icmp eq i8 %0, 13
%3 = icmp eq i8 %0, 10
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
double inline_sqrt1d(double);
double length3d(double *v1) {
  return (inline_sqrt1d((v1[0] * v1[0]) + (v1[1] * v1[1]) + (v1[2] * v1[2])));
}


x86 assembly (clang, -O0):
<length3d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <inline_sqrt1d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<length3d>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
jmp    1030 <inline_sqrt1d@plt>

LLVM IR (-O0):
define double @length3d(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = call double @llvm.fmuladd.f64(double %19, double %22, double %16)
%24 = call double @inline_sqrt1d(double %23)
ret double %24
}

LLVM IR (-O2):
define double @length3d(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
%10 = tail call double @inline_sqrt1d(double %9)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(short *, unsigned char *, int);
short I2(unsigned char *p) {
  short i;
  memcpy(&i, p, 2);
  return i;
}


x86 assembly (clang, -O0):
<I2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xa(%rbp),%rdi
mov    $0x2,%edx
call   1030 <memcpy@plt>
movswl -0xa(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2>:
push   %rax
mov    %rdi,%rsi
lea    0x6(%rsp),%rdi
mov    $0x2,%edx
call   1030 <memcpy@plt>
movzwl 0x6(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @I2(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(i16* %3, i8* %4, i32 2)
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define signext i16 @I2(i8* %0) {
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
%4 = call i32 @memcpy(i16* %2, i8* %0, i32 2)
%5 = load i16, i16* %2
ret i16 %5
}
/* Type definitions */
struct input_handle {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ input_close_device(struct input_handle *);
int /*<<< orphan*/ input_unregister_handle(struct input_handle *);
int /*<<< orphan*/ kfree(struct input_handle *);
void dbs_input_disconnect(struct input_handle *handle) {
  input_close_device(handle);
  input_unregister_handle(handle);
  kfree(handle);
}


x86 assembly (clang, -O0):
<dbs_input_disconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <input_close_device@plt>
mov    -0x8(%rbp),%rdi
call   1030 <input_unregister_handle@plt>
mov    -0x8(%rbp),%rdi
call   1040 <kfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbs_input_disconnect>:
push   %rbx
mov    %rdi,%rbx
call   1050 <input_close_device@plt>
mov    %rbx,%rdi
call   1030 <input_unregister_handle@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <kfree@plt>

LLVM IR (-O0):
%struct.input_handle = type { i32 }
define void @dbs_input_disconnect(%struct.input_handle* %0) {
%2 = alloca %struct.input_handle*
store %struct.input_handle* %0, %struct.input_handle** %2
%3 = load %struct.input_handle*, %struct.input_handle** %2
%4 = call i32 @input_close_device(%struct.input_handle* %3)
%5 = load %struct.input_handle*, %struct.input_handle** %2
%6 = call i32 @input_unregister_handle(%struct.input_handle* %5)
%7 = load %struct.input_handle*, %struct.input_handle** %2
%8 = call i32 @kfree(%struct.input_handle* %7)
ret void
}

LLVM IR (-O2):
%struct.input_handle = type { i32 }
define void @dbs_input_disconnect(%struct.input_handle* %0) {
%2 = tail call i32 @input_close_device(%struct.input_handle* %0)
%3 = tail call i32 @input_unregister_handle(%struct.input_handle* %0)
%4 = tail call i32 @kfree(%struct.input_handle* %0)
ret void
}
/* Variables and functions */
bool isLetter(char ch) {
  if (ch >= 'A' && ch <= 'Z')
    return true;
  return false;
}


x86 assembly (clang, -O0):
<isLetter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1130 <isLetter+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1130 <isLetter+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <isLetter+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLetter>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isLetter(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, 65
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @isLetter(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printscreen(char *);
long add2(int n, int m) {
  printscreen("Helloworld");
  return n + m;
}


x86 assembly (clang, -O0):
<add2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <printscreen@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
call   1030 <printscreen@plt>
add    %ebx,%ebp
movslq %ebp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Helloworld\00"
define i64 @add2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @printscreen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
@.str = [11 x i8] c"Helloworld\00"
define i64 @add2(i32 %0, i32 %1) {
%3 = tail call i32 @printscreen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = add nsw i32 %1, %0
%5 = sext i32 %4 to i64
ret i64 %5
}
void I444ToARGBRow_Any_SSSE3() {}


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

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

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

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

/* Variables and functions */
size_t ds_crc8_byte_update(size_t, size_t const);
uint8_t ds_crc8(const uint8_t *addr, uint8_t len) {
  uint8_t crc8 = 0;
  for (uint8_t i = 0; i < len; ++i)
    crc8 = ds_crc8_byte_update(crc8, addr[i]);
  return crc8;
}


x86 assembly (clang, -O0):
<ds_crc8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1168 <ds_crc8+0x58>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <ds_crc8_byte_update@plt>
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1130 <ds_crc8+0x20>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds_crc8>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1147 <ds_crc8+0x37>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r14,%rbx,8),%rsi
mov    %rax,%rdi
call   1030 <ds_crc8_byte_update@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <ds_crc8+0x20>
jmp    1149 <ds_crc8+0x39>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @ds_crc8(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
store i64 0, i64* %5
store i64 0, i64* %6
br label %7
7: ; preds = %18, %2
%8 = load i64, i64* %6
%9 = load i64, i64* %4
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i64, i64* %5
%13 = load i64*, i64** %3
%14 = load i64, i64* %6
%15 = getelementptr inbounds i64, i64* %13, i64 %14
%16 = load i64, i64* %15
%17 = call i64 @ds_crc8_byte_update(i64 %12, i64 %16)
store i64 %17, i64* %5
br label %18
18: ; preds = %11
%19 = load i64, i64* %6
%20 = add i64 %19, 1
store i64 %20, i64* %6
br label %7
21: ; preds = %7
%22 = load i64, i64* %5
ret i64 %22
}

LLVM IR (-O2):
define i64 @ds_crc8(i64* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %2
%5 = phi i64 [ 0, %2 ], [ %11, %6 ]
ret i64 %5
6: ; preds = %2, %6
%7 = phi i64 [ %12, %6 ], [ 0, %2 ]
%8 = phi i64 [ %11, %6 ], [ 0, %2 ]
%9 = getelementptr inbounds i64, i64* %0, i64 %7
%10 = load i64, i64* %9
%11 = tail call i64 @ds_crc8_byte_update(i64 %8, i64 %10)
%12 = add nuw i64 %7, 1
%13 = icmp eq i64 %12, %1
br i1 %13, label %4, label %6
}
/* Variables and functions */
int /*<<< orphan*/ decrypt_sub(unsigned char *, unsigned char *);
void decrypt(unsigned char *buf, int loop) {
  int i;
  unsigned char c = 0;
  for (i = 0; i < loop; i++) {
    decrypt_sub(buf, &c);
    buf += 0x100;
    decrypt_sub(buf, &c);
    buf += 0x100;
  }
}


x86 assembly (clang, -O0):
<decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movb   $0x0,-0x11(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117a <decrypt+0x6a>
mov    -0x8(%rbp),%rdi
lea    -0x11(%rbp),%rsi
call   1030 <decrypt_sub@plt>
mov    -0x8(%rbp),%rax
add    $0x100,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x11(%rbp),%rsi
call   1030 <decrypt_sub@plt>
mov    -0x8(%rbp),%rax
add    $0x100,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112a <decrypt+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decrypt>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
test   %esi,%esi
jle    1156 <decrypt+0x46>
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xf(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <decrypt_sub@plt>
lea    0x100(%rbx),%rdi
mov    %r14,%rsi
call   1030 <decrypt_sub@plt>
add    $0x200,%rbx
add    $0xffffffff,%ebp
jne    1130 <decrypt+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @decrypt(i8* %0, i32 %1) {
%3 = alloca i8
store i8 0, i8* %3
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %2, %5
%6 = phi i32 [ %12, %5 ], [ 0, %2 ]
%7 = phi i8* [ %11, %5 ], [ %0, %2 ]
%8 = call i32 @decrypt_sub(i8* %7, i8* %3)
%9 = getelementptr inbounds i8, i8* %7, i64 256
%10 = call i32 @decrypt_sub(i8* %9, i8* %3)
%11 = getelementptr inbounds i8, i8* %7, i64 512
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, %1
br i1 %13, label %14, label %5
14: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int getRandomNumber() {
  int r = rand() % 4;
  printf("random number is %d\n", r);
  return r;
}


x86 assembly (clang, -O0):
<getRandomNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRandomNumber>:
push   %rbx
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,%ebx
lea    0x3(%rbx),%eax
test   %ebx,%ebx
cmovns %ebx,%eax
and    $0xfffffffc,%eax
sub    %eax,%ebx
lea    0xec2(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"random number is %d\0A\00"
define i32 @getRandomNumber() {
%1 = alloca i32
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 4
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [21 x i8] c"random number is %d\0A\00"
define i32 @getRandomNumber() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 4
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %2
}
void destroyMatrix(int **m, int w, int h) {
  int i;
  for (i = 0; i < w; i++) {
    free(m[i]);
  }
  free(m);
}


x86 assembly (clang, -O0):
<destroyMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <destroyMatrix+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <destroyMatrix+0x19>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroyMatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <destroyMatrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <destroyMatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @destroyMatrix(i32** nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i32*, i32** %0, i64 %8
%10 = bitcast i32** %9 to i8**
%11 = load i8*, i8** %10
tail call void @free(i8* %11)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
%15 = bitcast i32** %0 to i8*
tail call void @free(i8* %15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void timeout(int sig) {
  printf("Err : Test duration exceeded\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<timeout>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Err : Test duration exceeded\0A\00"
define void @timeout(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [29 x i8] c"Err : Test duration exceeded\00"
define void @timeout(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void gtk_icon_theme_error_quark() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_theme_error_quark() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void cleanup(void) { system("rm -f /etc/wanpipe/wpkbd_lock"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"rm -f /etc/wanpipe/wpkbd_lock\00"
define void @cleanup() {
%1 = call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"rm -f /etc/wanpipe/wpkbd_lock\00"
define void @cleanup() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
void init_serial(void) {}


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

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

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

LLVM IR (-O2):
define void @init_serial() {
ret void
}
int iswhite(int c) {
  if (c == ' ' || c == '\t')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<iswhite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     111b <iswhite+0x1b>
cmpl   $0x9,-0x8(%rbp)
jne    1127 <iswhite+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <iswhite+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswhite>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @iswhite(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
double Not(double v) { return v == 0; }


x86 assembly (clang, -O0):
<Not>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Not>:
xorpd  %xmm1,%xmm1
cmpeqsd %xmm1,%xmm0
movsd  0xeef(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Not(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0.000000e+00
%5 = zext i1 %4 to i32
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @Not(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
%3 = uitofp i1 %2 to double
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p384_square(uintptr_t, uintptr_t);
void fiat_p384_square(uint32_t out1[12], const uint32_t arg1[12]) {
  internal_fiat_p384_square((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p384_square>:
jmp    1030 <internal_fiat_p384_square@plt>

LLVM IR (-O0):
define void @fiat_p384_square(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p384_square(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p384_square(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p384_square(i64 %3, i64 %4)
ret void
}
/* Type definitions */
struct sd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ w9968cf_write_sb(struct sd *, int);
void w9968cf_smbus_stop(struct sd *sd) {
  w9968cf_write_sb(sd, 0x0010);
  w9968cf_write_sb(sd, 0x0011);
  w9968cf_write_sb(sd, 0x0013);
}


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

x86 assembly (clang, -O2):
<w9968cf_smbus_stop>:
push   %rbx
mov    %rdi,%rbx
mov    $0x10,%esi
call   1030 <w9968cf_write_sb@plt>
mov    %rbx,%rdi
mov    $0x11,%esi
call   1030 <w9968cf_write_sb@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
pop    %rbx
jmp    1030 <w9968cf_write_sb@plt>

LLVM IR (-O0):
%struct.sd = type { i32 }
define void @w9968cf_smbus_stop(%struct.sd* %0) {
%2 = alloca %struct.sd*
store %struct.sd* %0, %struct.sd** %2
%3 = load %struct.sd*, %struct.sd** %2
%4 = call i32 @w9968cf_write_sb(%struct.sd* %3, i32 16)
%5 = load %struct.sd*, %struct.sd** %2
%6 = call i32 @w9968cf_write_sb(%struct.sd* %5, i32 17)
%7 = load %struct.sd*, %struct.sd** %2
%8 = call i32 @w9968cf_write_sb(%struct.sd* %7, i32 19)
ret void
}

LLVM IR (-O2):
%struct.sd = type { i32 }
define void @w9968cf_smbus_stop(%struct.sd* %0) {
%2 = tail call i32 @w9968cf_write_sb(%struct.sd* %0, i32 16)
%3 = tail call i32 @w9968cf_write_sb(%struct.sd* %0, i32 17)
%4 = tail call i32 @w9968cf_write_sb(%struct.sd* %0, i32 19)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
char *websock_write_message_len(char *, size_t);
char *websocket_write_message(char *__restrict dest,
                              const char *__restrict data, size_t len,
                              uint8_t opcode_and_flags) {
  *dest++ = opcode_and_flags;
  dest = websock_write_message_len(dest, len);
  memcpy(dest, data, len);
  return dest + len;
}


x86 assembly (clang, -O0):
<websocket_write_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <websock_write_message_len@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<websocket_write_message>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %cl,(%rdi)
add    $0x1,%rdi
mov    %rdx,%rsi
call   1040 <websock_write_message_len@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
add    %r15,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @websocket_write_message(i8* noalias %0, i8* noalias %1, i64 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %5
store i8 %10, i8* %11
%13 = load i8*, i8** %5
%14 = load i64, i64* %7
%15 = call i8* @websock_write_message_len(i8* %13, i64 %14)
store i8* %15, i8** %5
%16 = load i8*, i8** %5
%17 = load i8*, i8** %6
%18 = load i64, i64* %7
%19 = call i32 @memcpy(i8* %16, i8* %17, i64 %18)
%20 = load i8*, i8** %5
%21 = load i64, i64* %7
%22 = getelementptr inbounds i8, i8* %20, i64 %21
ret i8* %22
}

LLVM IR (-O2):
define i8* @websocket_write_message(i8* noalias %0, i8* noalias %1, i64 %2, i32 %3) {
%5 = trunc i32 %3 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %0
%7 = tail call i8* @websock_write_message_len(i8* %6, i64 %2)
%8 = tail call i32 @memcpy(i8* %7, i8* %1, i64 %2)
%9 = getelementptr inbounds i8, i8* %7, i64 %2
ret i8* %9
}
double v_mu3(double mu) { return mu * mu * mu; }


x86 assembly (clang, -O0):
<v_mu3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_mu3>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @v_mu3(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
ret double %3
}
/* Variables and functions */
scalar_t__ memcmp(char *, char *, int /*<<< orphan*/);
void memcmp5(char *input) {
  char a[] = {1, 2, 3, 4};
  if (memcmp(a, 0, 0))
    (void)*(char *)0;
  if (memcmp(0, a, 0))
    (void)*(char *)0;
  if (memcmp(a, input, 0))
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<memcmp5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xede(%rip),%eax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <memcmp@plt>
cmp    $0x0,%rax
je     113c <memcmp5+0x2c>
lea    -0xc(%rbp),%rsi
xor    %edx,%edx
mov    %edx,%edi
call   1030 <memcmp@plt>
cmp    $0x0,%rax
je     1153 <memcmp5+0x43>
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
je     116c <memcmp5+0x5c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcmp5>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movl   $0x4030201,0x4(%rsp)
04
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <memcmp@plt>
xor    %edi,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <memcmp@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <memcmp@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.memcmp5.a = [4 x i8] c"\01\02\03\04"
define void @memcmp5(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = bitcast [4 x i8]* %3 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%6 = call i64 @memcmp(i8* %5, i8* null, i32 0)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8, i8* null
br label %10
10: ; preds = %8, %1
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%12 = call i64 @memcmp(i8* null, i8* %11, i32 0)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i8, i8* null
br label %16
16: ; preds = %14, %10
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%18 = load i8*, i8** %2
%19 = call i64 @memcmp(i8* %17, i8* %18, i32 0)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = load i8, i8* null
br label %23
23: ; preds = %21, %16
ret void
}

LLVM IR (-O2):
define void @memcmp5(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 67305985, i32* %2
%4 = call i64 @memcmp(i8* %3, i8* null, i32 0)
%5 = call i64 @memcmp(i8* null, i8* %3, i32 0)
%6 = call i64 @memcmp(i8* %3, i8* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cio_byteout(unsigned char);
void cio_write(unsigned int v, int n) {
  int i;
  for (i = n - 1; i >= 0; i--) {
    cio_byteout((unsigned char)((v >> (i << 3)) & 0xff));
  }
}


x86 assembly (clang, -O0):
<cio_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1157 <cio_write+0x47>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x3,%ecx
shr    %cl,%eax
and    $0xff,%eax
movzbl %al,%edi
call   1030 <cio_byteout@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <cio_write+0x17>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cio_write>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    114a <cio_write+0x3a>
mov    %edi,%r14d
mov    %esi,%ebx
add    $0x1,%ebx
lea    -0x8(,%rsi,8),%ebp
nopw   0x0(%rax,%rax,1)
mov    %r14d,%eax
mov    %ebp,%ecx
shr    %cl,%eax
movzbl %al,%edi
call   1030 <cio_byteout@plt>
add    $0xffffffff,%ebx
add    $0xfffffff8,%ebp
cmp    $0x1,%ebx
ja     1130 <cio_write+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @cio_write(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = shl i32 %6, 3
%8 = lshr i32 %0, %7
%9 = trunc i32 %8 to i8
%10 = tail call i32 @cio_byteout(i8 zeroext %9)
%11 = icmp ugt i32 %5, 1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
void pm_debug_save_ahb_glb_regs(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_random_double() {
ret void
}
void packsplit(int *strchr, int *firstpart, int *rest, int bitno_firstpart,
               int bitno_total) {
  int bitno_rest = bitno_total - bitno_firstpart;
  *firstpart = *strchr >> (bitno_rest);
  *rest = *strchr - (*firstpart << (bitno_rest));
}


x86 assembly (clang, -O0):
<packsplit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x20(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x24(%rbp),%ecx
sar    %cl,%eax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x24(%rbp),%ecx
shl    %cl,%eax
mov    -0x28(%rbp),%ecx
sub    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<packsplit>:
sub    %ecx,%r8d
mov    (%rdi),%eax
mov    %r8d,%ecx
sar    %cl,%eax
mov    %eax,(%rsi)
shl    %cl,%eax
mov    (%rdi),%ecx
sub    %eax,%ecx
mov    %ecx,(%rdx)
ret

LLVM IR (-O0):
define void @packsplit(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %10
%13 = load i32, i32* %9
%14 = sub nsw i32 %12, %13
store i32 %14, i32* %11
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
%17 = load i32, i32* %11
%18 = ashr i32 %16, %17
%19 = load i32*, i32** %7
store i32 %18, i32* %19
%20 = load i32*, i32** %6
%21 = load i32, i32* %20
%22 = load i32*, i32** %7
%23 = load i32, i32* %22
%24 = load i32, i32* %11
%25 = shl i32 %23, %24
%26 = sub nsw i32 %21, %25
%27 = load i32*, i32** %8
store i32 %26, i32* %27
ret void
}

LLVM IR (-O2):
define void @packsplit(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32 %3, i32 %4) {
%6 = sub nsw i32 %4, %3
%7 = load i32, i32* %0
%8 = ashr i32 %7, %6
store i32 %8, i32* %1
%9 = load i32, i32* %0
%10 = shl i32 %8, %6
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %2
ret void
}
int test_imm_FBint16_reg(short val) {
  return ((val) & (-0xFB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FBint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff05,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FBint16_reg>:
test   $0xff05,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FBint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -251
%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_FBint16_reg(i16 signext %0) {
%2 = and i16 %0, -251
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int pop(int xx, int y, int z) {
  unsigned x = xx;
  x = x - ((x >> 1) & 0x55555555);
  x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  x = (x + (x >> 4)) & 0x0F0F0F0F;
  x = x + (x << 8);
  x = x + (x << 16);
  return x >> 24;
}


x86 assembly (clang, -O0):
<pop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x10(%rbp),%ecx
shr    $0x1,%ecx
and    $0x55555555,%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x33333333,%eax
mov    -0x10(%rbp),%ecx
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x10(%rbp),%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x18,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pop(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
store i32 %8, i32* %7
%9 = load i32, i32* %7
%10 = load i32, i32* %7
%11 = lshr i32 %10, 1
%12 = and i32 %11, 1431655765
%13 = sub i32 %9, %12
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = and i32 %14, 858993459
%16 = load i32, i32* %7
%17 = lshr i32 %16, 2
%18 = and i32 %17, 858993459
%19 = add i32 %15, %18
store i32 %19, i32* %7
%20 = load i32, i32* %7
%21 = load i32, i32* %7
%22 = lshr i32 %21, 4
%23 = add i32 %20, %22
%24 = and i32 %23, 252645135
store i32 %24, i32* %7
%25 = load i32, i32* %7
%26 = load i32, i32* %7
%27 = shl i32 %26, 8
%28 = add i32 %25, %27
store i32 %28, i32* %7
%29 = load i32, i32* %7
%30 = load i32, i32* %7
%31 = shl i32 %30, 16
%32 = add i32 %29, %31
store i32 %32, i32* %7
%33 = load i32, i32* %7
%34 = lshr i32 %33, 24
ret i32 %34
}

LLVM IR (-O2):
define i32 @pop(i32 %0, i32 %1, i32 %2) {
%4 = lshr i32 %0, 1
%5 = and i32 %4, 1431655765
%6 = sub i32 %0, %5
%7 = and i32 %6, 858993459
%8 = lshr i32 %6, 2
%9 = and i32 %8, 858993459
%10 = add nuw nsw i32 %9, %7
%11 = lshr i32 %10, 4
%12 = add nuw nsw i32 %11, %10
%13 = and i32 %12, 252645135
%14 = mul i32 %13, 16843009
%15 = lshr i32 %14, 24
ret i32 %15
}