xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Hello word from Sultan!\n");
  printf("i learnd that 2+2=%d,!\n", 4);
  printf("The grade am working for is %c!\n", 'A');
  printf("The temperature outside is barely %f!\n", 32.00000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x41,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Hello word from Sultan!\0A\00"
@.str.1 = [24 x i8] c"i learnd that 2+2=%d,!\0A\00"
@.str.2 = [33 x i8] c"The grade am working for is %c!\0A\00"
@.str.3 = [39 x i8] c"The temperature outside is barely %f!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 4)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 65)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), double 3.200000e+01)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [24 x i8] c"i learnd that 2+2=%d,!\0A\00"
@.str.2 = [33 x i8] c"The grade am working for is %c!\0A\00"
@.str.3 = [39 x i8] c"The temperature outside is barely %f!\0A\00"
@str = [24 x i8] c"Hello word from Sultan!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 65)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), double 3.200000e+01)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ menu();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf(" WELCOME TO QUIZZY \n");
  printf(" \n  the game that makes you smarter  \n");
  menu();
  return 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)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <menu@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <menu@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c" WELCOME TO QUIZZY \0A\00"
@.str.1 = [39 x i8] c" \0A the game that makes you smarter \0A\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 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (...) @menu()
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c" WELCOME TO QUIZZY \00"
@str.2 = [38 x i8] c" \0A the game that makes you smarter \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.2, i64 0, i64 0))
%5 = tail call i32 (...) @menu()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ITM_SendChar_My(char const);
void printErrorMsg(const char *errMsg) {
  while (*errMsg != 0) {
    ITM_SendChar_My(*errMsg);
    ++errMsg;
  }
}


x86 assembly (clang, -O0):
<printErrorMsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <printErrorMsg+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ITM_SendChar_My@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <printErrorMsg+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printErrorMsg>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <printErrorMsg+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <ITM_SendChar_My@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <printErrorMsg+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @printErrorMsg(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 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @ITM_SendChar_My(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void newlinespec_unit2OPT_CR() {}


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

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

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

LLVM IR (-O2):
define void @newlinespec_unit2OPT_CR() {
ret void
}
void ena_under(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ena_under() {
ret void
}
unsigned int _check_schedparam(unsigned int id) {
  unsigned int cmd;
  unsigned int res;
  cmd = ((0x12000000) | (((0x0) & 0x00000003) << 16) |
         (((id)&0x000000FF) << 8) | (((0x68) & 0x000000FF) << 0));
  res = (*(volatile unsigned int *)(cmd));
  if (((res)&0x00000001))
    return (-1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<_check_schedparam>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
or     $0x12000000,%eax
or     $0x68,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1140 <_check_schedparam+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    1147 <_check_schedparam+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_schedparam>:
shl    $0x8,%edi
movzwl %di,%eax
mov    0x12000068(%rax),%eax
and    $0x1,%eax
neg    %eax
ret

LLVM IR (-O0):
define i32 @_check_schedparam(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, 255
%8 = shl i32 %7, 8
%9 = or i32 301989888, %8
%10 = or i32 %9, 104
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = and i32 %15, 1
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %1
store i32 -1, i32* %2
br label %20
19: ; preds = %1
store i32 0, i32* %2
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @_check_schedparam(i32 %0) {
%2 = shl i32 %0, 8
%3 = and i32 %2, 65280
%4 = or i32 %3, 301989992
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 1
%9 = sub nsw i32 0, %8
ret i32 %9
}
void foo304() {}


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

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

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

LLVM IR (-O2):
define void @foo304() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uwsgi_log(char *, char *);
void sapi_uwsgi_log_message(char *message) { uwsgi_log("%s\n", message); }


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

x86 assembly (clang, -O2):
<sapi_uwsgi_log_message>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <uwsgi_log@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @sapi_uwsgi_log_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @uwsgi_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @sapi_uwsgi_log_message(i8* %0) {
%2 = tail call i32 @uwsgi_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void preenchimento(char ch, int n) {
  int i;
  for (i = 0; i < n; i++) {
    putchar(ch);
  }
}


x86 assembly (clang, -O0):
<preenchimento>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    114b <preenchimento+0x3b>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <preenchimento+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preenchimento>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
jle    112c <preenchimento+0x1c>
mov    %esi,%ebx
movsbl %dil,%ebp
nopl   (%rax)
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <preenchimento+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @preenchimento(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %13, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i8, i8* %3
%12 = call i32 @putchar(i8 signext %11)
br label %13
13: ; preds = %10
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
br label %6
16: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @preenchimento(i8 signext %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @putchar(i8 signext %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_c2();
int /*<<< orphan*/ take_struct_c2(int /*<<< orphan*/);
void test_struct_c2() { take_struct_c2(return_struct_c2()); }


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

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

LLVM IR (-O0):
define void @test_struct_c2() {
%1 = call i32 (...) @return_struct_c2()
%2 = call i32 @take_struct_c2(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_c2() {
%1 = tail call i32 (...) @return_struct_c2()
%2 = tail call i32 @take_struct_c2(i32 %1)
ret void
}
int f3(int x) { return (x % -5) % -5; }


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xfffffffb,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xfffffffb,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @f3(i32 %0) {
%2 = srem i32 %0, 5
ret i32 %2
}
int test_03(unsigned short *x) { return x[0] & -129 ? -20 : -40; }


x86 assembly (clang, -O0):
<test_03>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff7f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_03>:
movzwl (%rdi),%eax
test   $0xff7f,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_03(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = getelementptr inbounds i16, i16* %3, i64 0
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = and i32 %6, -129
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 -20, i32 -40
ret i32 %10
}

LLVM IR (-O2):
define i32 @test_03(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -129
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ krb5_gss_get_mic();
int /*<<< orphan*/ krb5_gss_unwrap();
int /*<<< orphan*/ krb5_gss_unwrap_iov();
int /*<<< orphan*/ krb5_gss_verify_mic();
int /*<<< orphan*/ krb5_gss_wrap();
int /*<<< orphan*/ krb5_gss_wrap_iov();
int /*<<< orphan*/ krb5_gss_wrap_iov_length();
int main(int argc, char **argv) {
  krb5_gss_wrap_iov();
  krb5_gss_wrap_iov_length();
  krb5_gss_wrap();
  krb5_gss_unwrap();
  krb5_gss_unwrap_iov();
  krb5_gss_get_mic();
  krb5_gss_verify_mic();
  return 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    $0x0,%al
call   1030 <krb5_gss_wrap_iov@plt>
mov    $0x0,%al
call   1080 <krb5_gss_wrap_iov_length@plt>
mov    $0x0,%al
call   1050 <krb5_gss_wrap@plt>
mov    $0x0,%al
call   1060 <krb5_gss_unwrap@plt>
mov    $0x0,%al
call   1070 <krb5_gss_unwrap_iov@plt>
mov    $0x0,%al
call   1040 <krb5_gss_get_mic@plt>
mov    $0x0,%al
call   1090 <krb5_gss_verify_mic@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <krb5_gss_wrap_iov@plt>
xor    %eax,%eax
call   1080 <krb5_gss_wrap_iov_length@plt>
xor    %eax,%eax
call   1050 <krb5_gss_wrap@plt>
xor    %eax,%eax
call   1060 <krb5_gss_unwrap@plt>
xor    %eax,%eax
call   1070 <krb5_gss_unwrap_iov@plt>
xor    %eax,%eax
call   1040 <krb5_gss_get_mic@plt>
xor    %eax,%eax
call   1090 <krb5_gss_verify_mic@plt>
xor    %eax,%eax
pop    %rcx
ret

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 (...) @krb5_gss_wrap_iov()
%7 = call i32 (...) @krb5_gss_wrap_iov_length()
%8 = call i32 (...) @krb5_gss_wrap()
%9 = call i32 (...) @krb5_gss_unwrap()
%10 = call i32 (...) @krb5_gss_unwrap_iov()
%11 = call i32 (...) @krb5_gss_get_mic()
%12 = call i32 (...) @krb5_gss_verify_mic()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @krb5_gss_wrap_iov()
%4 = tail call i32 (...) @krb5_gss_wrap_iov_length()
%5 = tail call i32 (...) @krb5_gss_wrap()
%6 = tail call i32 (...) @krb5_gss_unwrap()
%7 = tail call i32 (...) @krb5_gss_unwrap_iov()
%8 = tail call i32 (...) @krb5_gss_get_mic()
%9 = tail call i32 (...) @krb5_gss_verify_mic()
ret i32 0
}
void AdPlug_LogFile(char *filename) { (void)filename; }


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

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

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

LLVM IR (-O2):
define void @AdPlug_LogFile(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void taskexitall(int val) { exit(val); }


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

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

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

LLVM IR (-O2):
define void @taskexitall(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
long lan2_get_latency(void) { return (1); }


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

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

LLVM IR (-O0):
define i64 @lan2_get_latency() {
ret i64 1
}

LLVM IR (-O2):
define i64 @lan2_get_latency() {
ret i64 1
}
/* Variables and functions */
int /*<<< orphan*/ print_value();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int x = 999;
  printf("%d\n", x);
  print_value();
  return 0;
}


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)
movl   $0x3e7,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_value@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 999)
%4 = tail call i32 (...) @print_value()
ret i32 0
}
int cmc220_init_modemctl_device(struct modem_ctl *mc,
                                struct modem_data *pdata) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @cmc220_init_modemctl_device(%struct.modem_ctl* %0, %struct.modem_data* %1) {
%3 = alloca %struct.modem_ctl*
%4 = alloca %struct.modem_data*
store %struct.modem_ctl* %0, %struct.modem_ctl** %3
store %struct.modem_data* %1, %struct.modem_data** %4
ret i32 0
}

LLVM IR (-O2):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @cmc220_init_modemctl_device(%struct.modem_ctl* nocapture readnone %0, %struct.modem_data* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int g();
int f() { return g(); }


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

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

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

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i32 (...) @g()
ret i32 %1
}
long roundv(double value) {
  long intpart;
  intpart = (long)value;
  value = value - intpart;
  if (value >= 0.5)
    intpart++;
  return intpart;
}


x86 assembly (clang, -O0):
<roundv>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     114a <roundv+0x4a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundv>:
cvttsd2si %xmm0,%rax
cvtsi2sd %rax,%xmm1
subsd  %xmm1,%xmm0
ucomisd 0xeea(%rip),%xmm0
sbb    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @roundv(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i64
store i64 %5, i64* %3
%6 = load double, double* %2
%7 = load i64, i64* %3
%8 = sitofp i64 %7 to double
%9 = fsub double %6, %8
store double %9, double* %2
%10 = load double, double* %2
%11 = fcmp oge double %10, 5.000000e-01
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i64, i64* %3
%14 = add nsw i64 %13, 1
store i64 %14, i64* %3
br label %15
15: ; preds = %12, %1
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @roundv(double %0) {
%2 = fptosi double %0 to i64
%3 = sitofp i64 %2 to double
%4 = fsub double %0, %3
%5 = fcmp oge double %4, 5.000000e-01
%6 = zext i1 %5 to i64
%7 = add nsw i64 %6, %2
ret i64 %7
}
/* Variables and functions */
float __nv_floorf(float);
float floorf(float __f) { return __nv_floorf(__f); }


x86 assembly (clang, -O0):
<floorf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__nv_floorf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorf>:
jmp    1030 <__nv_floorf@plt>

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

LLVM IR (-O2):
define float @floorf(float %0) {
%2 = tail call float @__nv_floorf(float %0)
ret float %2
}
/* Variables and functions */
int via_vt823x_gpio_set(int, int);
int via_vt823x_gpio5_raise(void) { return via_vt823x_gpio_set(5, 1); }


x86 assembly (clang, -O0):
<via_vt823x_gpio5_raise>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
mov    $0x1,%esi
call   1030 <via_vt823x_gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<via_vt823x_gpio5_raise>:
mov    $0x5,%edi
mov    $0x1,%esi
jmp    1030 <via_vt823x_gpio_set@plt>

LLVM IR (-O0):
define i32 @via_vt823x_gpio5_raise() {
%1 = call i32 @via_vt823x_gpio_set(i32 5, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @via_vt823x_gpio5_raise() {
%1 = tail call i32 @via_vt823x_gpio_set(i32 5, i32 1)
ret i32 %1
}
/* Variables and functions */
int mkdir(char const *, int);
int my_mkdir(const char *pathname) { return mkdir(pathname, 0755); }


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

x86 assembly (clang, -O2):
<my_mkdir>:
mov    $0x1ed,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @my_mkdir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 493)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
void echo(char *input, char *output, int length) {
  memcpy(output, input, length);
  return;
}


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

x86 assembly (clang, -O2):
<echo>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @echo(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @echo(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %1, i8* %0, i32 %2)
ret void
}
/* Type definitions */
struct client {
  int dummy;
};

/* Variables and functions */
int connect_unix(struct client *, char const *, char const *);
int cconnect(struct client *cl, const char *serv, const char *port) {
  return connect_unix(cl, serv, port);
}


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

x86 assembly (clang, -O2):
<cconnect>:
jmp    1030 <connect_unix@plt>

LLVM IR (-O0):
%struct.client = type { i32 }
define i32 @cconnect(%struct.client* %0, i8* %1, i8* %2) {
%4 = alloca %struct.client*
%5 = alloca i8*
%6 = alloca i8*
store %struct.client* %0, %struct.client** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.client*, %struct.client** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @connect_unix(%struct.client* %7, i8* %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.client = type { i32 }
define i32 @cconnect(%struct.client* %0, i8* %1, i8* %2) {
%4 = tail call i32 @connect_unix(%struct.client* %0, i8* %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void banner() {
  printf("******************************************\n");
  printf("*                                        *\n");
  printf("*               MetaCalc v0.3            *\n");
  printf("*                                        *\n");
  printf("******************************************\n");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<banner>:
push   %r14
push   %rbx
push   %rax
lea    0xf2b(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xef1(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xeb7(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@str.5 = [43 x i8] c"* MetaCalc v0.3 *\00"
@str.6 = [43 x i8] c"* *\00"
@str.7 = [43 x i8] c"******************************************\00"
define void @banner() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.7, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.6, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.7, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
ret void
}
unsigned long HibernateRTCMatch0Get(void) {
  return ((*((volatile unsigned long *)(0x400FC004))));
}


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

x86 assembly (clang, -O2):
<HibernateRTCMatch0Get>:
mov    0x400fc004,%rax
40
ret

LLVM IR (-O0):
define i64 @HibernateRTCMatch0Get() {
%1 = load volatile i64, i64* inttoptr (i64 1074774020 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @HibernateRTCMatch0Get() {
%1 = load volatile i64, i64* inttoptr (i64 1074774020 to i64*)
ret i64 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct itimerval {
  TYPE_1__ it_interval;
  TYPE_1__ it_value;
};

/* Variables and functions */
int /*<<< orphan*/ ITIMER_REAL;
int /*<<< orphan*/ setitimer(int /*<<< orphan*/, struct itimerval *,
                             int /*<<< orphan*/ *);
void signalTimerStop(void) {
  struct itimerval itv;
  itv.it_interval.tv_sec = 0;
  itv.it_interval.tv_usec = 0;
  itv.it_value = itv.it_interval;
  setitimer(ITIMER_REAL, &itv, NULL);
  return;
}


x86 assembly (clang, -O0):
<signalTimerStop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <setitimer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signalTimerStop>:
sub    $0x28,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <setitimer@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.itimerval = type { %struct.TYPE_2__, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i64 }
@ITIMER_REAL = global i32 0
define void @signalTimerStop() {
%1 = alloca %struct.itimerval
%2 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%3 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %2, i32 0, i32 1
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 1
%7 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%8 = bitcast %struct.TYPE_2__* %6 to i8*
%9 = bitcast %struct.TYPE_2__* %7 to i8*
%10 = load i32, i32* @ITIMER_REAL
%11 = call i32 @setitimer(i32 %10, %struct.itimerval* %1, i32* null)
ret void
}

LLVM IR (-O2):
%struct.itimerval = type { %struct.TYPE_2__, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i64 }
@ITIMER_REAL = global i32 0
define void @signalTimerStop() {
%1 = alloca %struct.itimerval
%2 = bitcast %struct.itimerval* %1 to i8*
%3 = bitcast %struct.itimerval* %1 to i8*
%4 = load i32, i32* @ITIMER_REAL
%5 = call i32 @setitimer(i32 %4, %struct.itimerval* %1, i32* null)
ret void
}
void displayOdometer() { char buffer[17] = ""; }


x86 assembly (clang, -O0):
<displayOdometer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x11,%edx
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @displayOdometer() {
%1 = alloca [17 x i8]
%2 = bitcast [17 x i8]* %1 to i8*
ret void
}

LLVM IR (-O2):
define void @displayOdometer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bcopy(char *, char *, int);
void bcopy0() {
  char src[] = {1, 2, 3, 4};
  char dst[4] = {0};
  bcopy(src, dst, 4);
  if (dst[0] != 0)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<bcopy0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <bcopy@plt>
movsbl -0x8(%rbp),%eax
cmp    $0x0,%eax
je     1160 <bcopy0+0x40>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.bcopy0.src = [4 x i8] c"\01\02\03\04"
define void @bcopy0() {
%1 = alloca [4 x i8]
%2 = alloca [4 x i8]
%3 = bitcast [4 x i8]* %1 to i8*
%4 = bitcast [4 x i8]* %2 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%7 = call i32 @bcopy(i8* %5, i8* %6, i32 4)
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = load i8, i8* null
br label %14
14: ; preds = %12, %0
ret void
}

LLVM IR (-O2):
define void @bcopy0() {
ret void
}
void taktik2(int sagSensorDeger, int solSensorDeger, int ortaSensorDeger,
             int sagKenarDeger, int solKenarDeger, int motorHizi) {}


x86 assembly (clang, -O0):
<taktik2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @taktik2(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
ret void
}

LLVM IR (-O2):
define void @taktik2(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
ret void
}
/* Variables and functions */
int lastpos(char *, char);
char *lastword(char *s) {
  int i;
  i = lastpos(s, ' ');
  if (i == -1) {
    return s;
  } else {
    return s + i + 1;
  }
}


x86 assembly (clang, -O0):
<lastword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1030 <lastpos@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1144 <lastword+0x34>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <lastword+0x47>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lastword>:
push   %rbx
mov    %rdi,%rbx
mov    $0x20,%esi
call   1030 <lastpos@plt>
cmp    $0xffffffff,%eax
cltq
lea    0x1(%rbx,%rax,1),%rax
cmove  %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @lastword(i8* %0) {
%2 = tail call i32 @lastpos(i8* %0, i8 signext 32)
%3 = icmp eq i32 %2, -1
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = select i1 %3, i8* %0, i8* %6
ret i8* %7
}
char *OSCPaddedStrcpy(char *target, const char *source) {
  while (*target++ = *source++) {
  }
  while (((int)target) % 4 != 0) {
    *target = '\0';
    target++;
  }
  return target;
}


x86 assembly (clang, -O0):
<OSCPaddedStrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <OSCPaddedStrcpy+0x3b>
jmp    110c <OSCPaddedStrcpy+0xc>
jmp    1140 <OSCPaddedStrcpy+0x40>
mov    -0x8(%rbp),%rax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     116d <OSCPaddedStrcpy+0x6d>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1140 <OSCPaddedStrcpy+0x40>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSCPaddedStrcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%eax
add    $0x1,%rsi
mov    %al,(%r14)
add    $0x1,%r14
add    $0x1,%rbx
test   %al,%al
jne    1120 <OSCPaddedStrcpy+0x10>
test   $0x3,%bl
je     1162 <OSCPaddedStrcpy+0x52>
mov    %ebx,%eax
and    $0x3,%eax
mov    $0x4,%edx
sub    %rax,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
movzbl %bl,%eax
and    $0x3,%eax
neg    %rax
add    %rax,%r14
add    $0x4,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @OSCPaddedStrcpy(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
%11 = ptrtoint i8* %8 to i64
%12 = and i64 %11, 3
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = and i64 %11, 3
%16 = sub nuw nsw i64 4, %15
%17 = getelementptr i8, i8* %8, i64 %16
br label %18
18: ; preds = %14, %10
%19 = phi i8* [ %8, %10 ], [ %17, %14 ]
ret i8* %19
}
/* Variables and functions */
int /*<<< orphan*/ OAL_OBTAIN_SEMAPHORE();
int /*<<< orphan*/ OAL_RELEASE_SEMAPHORE();
int spi_bulkread(void *, unsigned short, unsigned char, unsigned char *, int);
int fc8150_spib_longread(void *hDevice, unsigned short addr,
                         unsigned int *data) {
  int res;
  unsigned char command = 0x40 | 0x80;
  OAL_OBTAIN_SEMAPHORE();
  res = spi_bulkread(hDevice, addr, command, (unsigned char *)data, 4);
  OAL_RELEASE_SEMAPHORE();
  return res;
}


x86 assembly (clang, -O0):
<fc8150_spib_longread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
movb   $0xc0,-0x1d(%rbp)
mov    $0x0,%al
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%dx
mov    -0x1d(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    $0x4,%r8d
movzwl %dx,%esi
movzbl %al,%edx
call   1040 <spi_bulkread@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <OAL_RELEASE_SEMAPHORE@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8150_spib_longread>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0xc0,%edx
mov    %r14,%rcx
mov    $0x4,%r8d
call   1040 <spi_bulkread@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <OAL_RELEASE_SEMAPHORE@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fc8150_spib_longread(i8* %0, i16 zeroext %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %4
store i16 %1, i16* %5
store i32* %2, i32** %6
store i8 -64, i8* %8
%9 = call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%10 = load i8*, i8** %4
%11 = load i16, i16* %5
%12 = load i8, i8* %8
%13 = load i32*, i32** %6
%14 = bitcast i32* %13 to i8*
%15 = call i32 @spi_bulkread(i8* %10, i16 zeroext %11, i8 zeroext %12, i8* %14, i32 4)
store i32 %15, i32* %7
%16 = call i32 (...) @OAL_RELEASE_SEMAPHORE()
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @fc8150_spib_longread(i8* %0, i16 zeroext %1, i32* %2) {
%4 = tail call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%5 = bitcast i32* %2 to i8*
%6 = tail call i32 @spi_bulkread(i8* %0, i16 zeroext %1, i8 zeroext -64, i8* %5, i32 4)
%7 = tail call i32 (...) @OAL_RELEASE_SEMAPHORE()
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ tqli(double *, double *, int, double *);
int /*<<< orphan*/ tred2(double *, int, double *, double *);
void get_eigs(int np, double x[], double d[]) {
  double e[np];
  tred2(x, np, d, e);
  tqli(d, e, np, x);
}


x86 assembly (clang, -O0):
<get_eigs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <tred2@plt>
mov    -0x30(%rbp),%rsi
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
call   1030 <tqli@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_eigs>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %edi,%r12d
mov    %edi,%eax
mov    %rsp,%rbx
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rsi,%rdi
mov    %r12d,%esi
mov    %rbx,%rcx
call   1040 <tred2@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
mov    %r14,%rcx
call   1030 <tqli@plt>
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @get_eigs(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca i8*
%8 = alloca i64
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %7
%12 = alloca double, i64 %10
store i64 %10, i64* %8
%13 = load double*, double** %5
%14 = load i32, i32* %4
%15 = load double*, double** %6
%16 = call i32 @tred2(double* %13, i32 %14, double* %15, double* %12)
%17 = load double*, double** %6
%18 = load i32, i32* %4
%19 = load double*, double** %5
%20 = call i32 @tqli(double* %17, double* %12, i32 %18, double* %19)
%21 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
define void @get_eigs(i32 %0, double* %1, double* %2) {
%4 = zext i32 %0 to i64
%5 = alloca double, i64 %4
%6 = call i32 @tred2(double* %1, i32 %0, double* %2, double* %5)
%7 = call i32 @tqli(double* %2, double* %5, i32 %0, double* %1)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ EACCES;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
int kill(pid_t pid, int sig) {
  fprintf(stderr,
          "try kill %d %d"
          "\n",
          pid, sig);
  errno = EACCES;
  return -1;
}


x86 assembly (clang, -O0):
<kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%ecx
mov    0x2e87(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kill>:
push   %rax
mov    %esi,%ecx
mov    %edi,%edx
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
mov    0x2e96(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"try kill %d %d\0A\00"
@EACCES = global i32 0
@errno = global i32 0
define i32 @kill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* @EACCES
store i32 %9, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"try kill %d %d\0A\00"
@EACCES = global i32 0
@errno = global i32 0
define i32 @kill(i32 %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%5 = load i32, i32* @EACCES
store i32 %5, i32* @errno
ret i32 -1
}