xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x2f() {
  Assert_real((isalpha(47) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              240, ("isalpha should be 0 for /"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for /\00"
define void @t_isalpha_0x2f() {
%1 = tail call i64 @isalpha(i32 47)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 240, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void crash() {
  printf("Program crashed!\n");
  printf("Please view log file.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<crash>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [18 x i8] c"Program crashed!\0A\00"
@.str.1 = [23 x i8] c"Please view log file.\0A\00"
define void @crash() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [17 x i8] c"Program crashed!\00"
@str.2 = [22 x i8] c"Please view log file.\00"
define void @crash() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ rcsfaterror(char *);
void unexpected_EOF() { rcsfaterror("unexpected EOF in diff output"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"unexpected EOF in diff output\00"
define void @unexpected_EOF() {
%1 = call i32 @rcsfaterror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"unexpected EOF in diff output\00"
define void @unexpected_EOF() {
%1 = tail call i32 @rcsfaterror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(int /*<<< orphan*/);
int _write(int file, char *ptr, int len) {
  int todo;
  for (todo = 0; todo < len; todo++)
    outbyte(*ptr++);
  return len;
}


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115a <_write+0x4a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <outbyte@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1129 <_write+0x19>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
test   %edx,%edx
jle    1142 <_write+0x32>
mov    %rsi,%r15
mov    %r14d,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <outbyte@plt>
add    $0x1,%rbx
cmp    %ebx,%ebp
jne    1130 <_write+0x20>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* nocapture %1, i32 returned %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3, %5
%6 = phi i32 [ %12, %5 ], [ 0, %3 ]
%7 = phi i8* [ %8, %5 ], [ %1, %3 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %7
%10 = sext i8 %9 to i32
%11 = tail call i32 @outbyte(i32 %10)
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, %2
br i1 %13, label %14, label %5
14: ; preds = %5, %3
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ angelinaCall();
int /*<<< orphan*/ bigMacCall();
int /*<<< orphan*/ cleanup();
void runTest_Simple(void) {
  {
    {
      bigMacCall();
      angelinaCall();
      cleanup();
    }
    return;
  }
}


x86 assembly (clang, -O0):
<runTest_Simple>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <bigMacCall@plt>
mov    $0x0,%al
call   1030 <angelinaCall@plt>
mov    $0x0,%al
call   1050 <cleanup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<runTest_Simple>:
push   %rax
xor    %eax,%eax
call   1040 <bigMacCall@plt>
xor    %eax,%eax
call   1030 <angelinaCall@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cleanup@plt>

LLVM IR (-O0):
define void @runTest_Simple() {
%1 = call i32 (...) @bigMacCall()
%2 = call i32 (...) @angelinaCall()
%3 = call i32 (...) @cleanup()
ret void
}

LLVM IR (-O2):
define void @runTest_Simple() {
%1 = tail call i32 (...) @bigMacCall()
%2 = tail call i32 (...) @angelinaCall()
%3 = tail call i32 (...) @cleanup()
ret void
}
void v2d_(vec) double vec[2];
{
  float v[2];
  v[0] = vec[0];
  v[1] = vec[1];
  vcall(v, 2);
}


x86 assembly (clang, -O0):
<v2d_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <vcall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v2d_>:
push   %rax
movsd  (%rdi),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rsp)
movsd  0x8(%rdi),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <vcall@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @v2d_(double* %0) {
%2 = alloca double*
%3 = alloca [2 x float]
store double* %0, double** %2
%4 = load double*, double** %2
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = fptrunc double %6 to float
%8 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
store float %7, float* %8
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = fptrunc double %11 to float
%13 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
store float %12, float* %13
%14 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%15 = call i32 (float*, i32, ...) bitcast (i32 (...)* @vcall to i32 (float*, i32, ...)*)(float* %14, i32 2)
ret void
}

LLVM IR (-O2):
define void @v2d_(double* nocapture %0) {
%2 = alloca [2 x float]
%3 = bitcast [2 x float]* %2 to i8*
%4 = load double, double* %0
%5 = fptrunc double %4 to float
%6 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float %5, float* %6
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = fptrunc double %8 to float
%10 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float %9, float* %10
%11 = call i32 (float*, i32, ...) bitcast (i32 (...)* @vcall to i32 (float*, i32, ...)*)(float* %6, i32 2)
ret void
}
long FCNTL(fd, c, a)
long *fd, *c, *a;
{ return ((long)fcntl(*fd, *c, *a)); }


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

x86 assembly (clang, -O2):
<FCNTL>:
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rsi
mov    (%rdx),%rdx
xor    %eax,%eax
call   1030 <fcntl@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @FCNTL(i64* %0, i64* %1, i64* %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i64*
store i64* %0, i64** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = load i64*, i64** %5
%10 = load i64, i64* %9
%11 = load i64*, i64** %6
%12 = load i64, i64* %11
%13 = call i32 (i64, i64, i64, ...) bitcast (i32 (...)* @fcntl to i32 (i64, i64, i64, ...)*)(i64 %8, i64 %10, i64 %12)
%14 = sext i32 %13 to i64
ret i64 %14
}

LLVM IR (-O2):
define i64 @FCNTL(i64* nocapture %0, i64* nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %0
%5 = load i64, i64* %1
%6 = load i64, i64* %2
%7 = tail call i32 (i64, i64, i64, ...) bitcast (i32 (...)* @fcntl to i32 (i64, i64, i64, ...)*)(i64 %4, i64 %5, i64 %6)
%8 = sext i32 %7 to i64
ret i64 %8
}
int main(int argc, char *argv[]) {
  char b[10];
  int len = atoi(argv[1]);
  (void)strcpy(b, "1");
  (void)strncat(b, "1020202020202", len);
  (void)printf("%*.*s\n", len, len, b);
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1060 <atoi@plt>
mov    %eax,-0x20(%rbp)
lea    -0x1a(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x1a(%rbp),%rdi
movslq -0x20(%rbp),%rdx
lea    0xe7b(%rip),%rsi
call   1050 <strncat@plt>
mov    -0x20(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    -0x1a(%rbp),%rcx
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    0x8(%rsi),%rdi
xor    %eax,%eax
call   1050 <atoi@plt>
movw   $0x31,0xe(%rsp)
movslq %eax,%rbx
lea    0xead(%rip),%rsi
lea    0xe(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rdx
call   1040 <strncat@plt>
lea    0xea4(%rip),%rdi
mov    %ebx,%esi
mov    %ebx,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [14 x i8] c"1020202020202\00"
@.str.2 = [7 x i8] c"%*.*s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %10)
store i32 %11, i32* %7
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%13 = call i8* @strcpy(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = call i8* @strncat(i8* %14, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i64 %16)
%18 = load i32, i32* %7
%19 = load i32, i32* %7
%20 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %18, i32 %19, i8* %20)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"1020202020202\00"
@.str.2 = [7 x i8] c"%*.*s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %6)
%8 = bitcast [10 x i8]* %3 to i16*
store i16 49, i16* %8
%9 = sext i32 %7 to i64
%10 = call i8* @strncat(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i64 %9)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %7, i8* %4)
ret i32 0
}
int test_timer(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @test_timer() {
ret i32 0
}

LLVM IR (-O2):
define i32 @test_timer() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *stringdup(char *s) {
  char *t = malloc(strlen(s) + 1);
  if (t == NULL)
    exit(1);
  strcpy(t, s);
  return t;
}


x86 assembly (clang, -O0):
<stringdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117a <stringdup+0x3a>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1173 <stringdup+0x33>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i8* @stringdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = load i8*, i8** %2
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @stringdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
int pcre_config(int what, void *where) {
  switch (what) {
  case 0:
    *((int *)where) = 0;
    break;
  case 1:
    *((int *)where) = '\n';
    break;
  case 2:
    *((int *)where) = 2;
    break;
  case 3:
    *((int *)where) = 5;
    break;
  case 4:
    *((unsigned int *)where) = 10000000;
    break;
  default:
    return (-3);
  }
  return 0;
}


x86 assembly (clang, -O0):
<pcre_config>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x4,%rax
ja     117b <pcre_config+0x7b>
mov    -0x18(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1187 <pcre_config+0x87>
mov    -0x10(%rbp),%rax
movl   $0xa,(%rax)
jmp    1187 <pcre_config+0x87>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
jmp    1187 <pcre_config+0x87>
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
jmp    1187 <pcre_config+0x87>
mov    -0x10(%rbp),%rax
movl   $0x989680,(%rax)
jmp    1187 <pcre_config+0x87>
movl   $0xfffffffd,-0x4(%rbp)
jmp    118e <pcre_config+0x8e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcre_config>:
mov    $0xfffffffd,%eax
cmp    $0x4,%edi
ja     111b <pcre_config+0x1b>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pcre_config(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
switch i32 %6, label %22 [
i32 0, label %7
i32 1, label %10
i32 2, label %13
i32 3, label %16
i32 4, label %19
]
7: ; preds = %2
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to i32*
store i32 0, i32* %9
br label %23
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
store i32 10, i32* %12
br label %23
13: ; preds = %2
%14 = load i8*, i8** %5
%15 = bitcast i8* %14 to i32*
store i32 2, i32* %15
br label %23
16: ; preds = %2
%17 = load i8*, i8** %5
%18 = bitcast i8* %17 to i32*
store i32 5, i32* %18
br label %23
19: ; preds = %2
%20 = load i8*, i8** %5
%21 = bitcast i8* %20 to i32*
store i32 10000000, i32* %21
br label %23
22: ; preds = %2
store i32 -3, i32* %3
br label %24
23: ; preds = %19, %16, %13, %10, %7
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@switch.table.pcre_config = [5 x i32] [i32 0, i32 10, i32 2, i32 5, i32 10000000]
define i32 @pcre_config(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp ult i32 %0, 5
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = getelementptr inbounds [5 x i32], [5 x i32]* @switch.table.pcre_config, i64 0, i64 %5
%7 = load i32, i32* %6
%8 = bitcast i8* %1 to i32*
store i32 %7, i32* %8
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ -3, %2 ], [ 0, %4 ]
ret i32 %10
}
/* Variables and functions */
int worst_fit_count_extfrag(size_t size) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @worst_fit_count_extfrag(i64 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void die(const char *msg) {
  printf("Error: %s\n", msg);
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Error: %s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"Error: %s\0A\00"
define void @die(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void f132(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
a:
  ({
    ({ 0; });
    goto a;
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f132>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
jmp    1119 <f132+0x19>

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

LLVM IR (-O0):
define void @f132() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %1
store i32 0, i32* %2
%7 = load i32, i32* %2
store i32 0, i32* %3
%8 = load i32, i32* %3
br label %9
9: ; preds = %9, %0
store i32 0, i32* %4
%10 = load i32, i32* %4
br label %9
}

LLVM IR (-O2):
define void @f132() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ bwputs(char *);
int /*<<< orphan*/ syscall();
void first(void) {
  bwputs("In user mode\n");
  syscall();
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"In user mode\0A\00"
define void @first() {
%1 = tail call i32 @bwputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @syscall()
ret void
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double log2l(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<log2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @log2l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @log2l(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
const char *picosat_copyright(void) {
  return "Copyright (c) 2006 - 2014 Armin Biere JKU Linz";
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"Copyright (c) 2006 - 2014 Armin Biere JKU Linz\00"
define i8* @picosat_copyright() {
ret i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [47 x i8] c"Copyright (c) 2006 - 2014 Armin Biere JKU Linz\00"
define i8* @picosat_copyright() {
ret i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0)
}
extern int mul(int a, int b) { return a * b; }


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int close(int);
int tun_close(int fd, char *dev) { return close(fd); }


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

x86 assembly (clang, -O2):
<tun_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @tun_close(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @close(i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ PowerManagerP__0__ResourceDefaultOwner__granted();
void ArbiterP__0__ResourceDefaultOwner__granted(void) {
  PowerManagerP__0__ResourceDefaultOwner__granted();
}


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

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

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

LLVM IR (-O2):
define void @ArbiterP__0__ResourceDefaultOwner__granted() {
%1 = tail call i32 (...) @PowerManagerP__0__ResourceDefaultOwner__granted()
ret void
}
int funcion_i_v() {
  int c;
  c = 50;
}


x86 assembly (clang, -O0):
<funcion_i_v>:
push   %rbp
mov    %rsp,%rbp
movl   $0x32,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @funcion_i_v() {
%1 = alloca i32
%2 = alloca i32
store i32 50, i32* %2
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @funcion_i_v() {
ret i32 undef
}
int foo(int x) { return __builtin_parity(x); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%ecx
shr    $0x10,%ecx
xor    %edi,%ecx
xor    %eax,%eax
xor    %ch,%cl
setnp  %al
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.ctpop.i32(i32 %3)
%5 = and i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char const *, char const *);
int marker_string_contains(const char *str, const char *sub_str) {
  return strstr(str, sub_str) != NULL;
}


x86 assembly (clang, -O0):
<marker_string_contains>:
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 <strstr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @marker_string_contains(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
char asciiToHex(const char src) {
  char val = 0;
  val = src - '0';
  if (val > 9) {
    val -= 39;
  }
  return val;
}


x86 assembly (clang, -O0):
<asciiToHex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x9,%eax
jle    112f <asciiToHex+0x2f>
movsbl -0x2(%rbp),%eax
sub    $0x27,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asciiToHex>:
lea    -0x30(%rdi),%eax
add    $0xa9,%dil
cmp    $0xa,%al
movzbl %dil,%ecx
movzbl %al,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @asciiToHex(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 0, i8* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 48
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %9, 9
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 39
%15 = trunc i32 %14 to i8
store i8 %15, i8* %3
br label %16
16: ; preds = %11, %1
%17 = load i8, i8* %3
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @asciiToHex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp sgt i8 %2, 9
%4 = add i8 %0, -87
%5 = select i1 %3, i8 %4, i8 %2
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void netPrintIPAddr(uint32_t ipaddr) { ; }


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

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

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

LLVM IR (-O2):
define void @netPrintIPAddr(i32 %0) {
ret void
}
int xnor(int a, int b) {
  if (a == b) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<xnor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1122 <xnor+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <xnor+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xnor>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @xnor(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
const char *rcsid(const char *p) {
  return rcsid(p = "@(#)$File: encoding.c,v 1.6 2011/12/08 12:38:24 rrt Exp $");
}


x86 assembly (clang, -O0):
<rcsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <rcsid@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [58 x i8] c"@(#)$File: encoding.c,v 1.6 2011/12/08 12:38:24 rrt Exp $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
double vec3d_dot(double const *, double const *);
double vec3d_normSq(const double A[3]) { return vec3d_dot(A, A); }


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

x86 assembly (clang, -O2):
<vec3d_normSq>:
mov    %rdi,%rsi
jmp    1030 <vec3d_dot@plt>

LLVM IR (-O0):
define double @vec3d_normSq(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double*, double** %2
%5 = call double @vec3d_dot(double* %3, double* %4)
ret double %5
}

LLVM IR (-O2):
define double @vec3d_normSq(double* %0) {
%2 = tail call double @vec3d_dot(double* %0, double* %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ rseq_clear_rseq_cs();
void rseq_prepare_unload(void) { rseq_clear_rseq_cs(); }


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

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

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

LLVM IR (-O2):
define void @rseq_prepare_unload() {
%1 = tail call i32 (...) @rseq_clear_rseq_cs()
ret void
}
/* Variables and functions */
int RAND_MAX;
int rand();
double plisp_random() {
  int i = rand();
  double ret = (i * 1.0) / RAND_MAX;
  return ret;
}


x86 assembly (clang, -O0):
<plisp_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2eae(%rip),%rax
cvtsi2sdl (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plisp_random>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %eax,%xmm0
mov    0x2ec5(%rip),%rax
cvtsi2sdl (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i32 0
define double @plisp_random() {
%1 = alloca i32
%2 = alloca double
%3 = call i32 (...) @rand()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 1.000000e+00
%7 = load i32, i32* @RAND_MAX
%8 = sitofp i32 %7 to double
%9 = fdiv double %6, %8
store double %9, double* %2
%10 = load double, double* %2
ret double %10
}

LLVM IR (-O2):
@RAND_MAX = global i32 0
define double @plisp_random() {
%1 = tail call i32 (...) @rand()
%2 = sitofp i32 %1 to double
%3 = load i32, i32* @RAND_MAX
%4 = sitofp i32 %3 to double
%5 = fdiv double %2, %4
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ reqbuf;

/* Variables and functions */
int ph_rpc(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int, int);
int phConf(int cid1, int cid2) {
  char reqbuf[1000];
  snprintf(reqbuf, sizeof(reqbuf), "CONF CID=%d CIDT=%d", cid1, cid2);
  return ph_rpc(reqbuf);
}


x86 assembly (clang, -O0):
<phConf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    $0x3e8,%esi
lea    0xeb5(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x3f0(%rbp),%rdi
call   1040 <ph_rpc@plt>
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phConf>:
push   %rbx
sub    $0x3f0,%rsp
mov    %esi,%r8d
mov    %edi,%ecx
lea    0xecc(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <ph_rpc@plt>
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"CONF CID=%d CIDT=%d\00"
define i32 @phConf(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [1000 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @snprintf(i8* %6, i32 1000, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%11 = call i32 @ph_rpc(i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [20 x i8] c"CONF CID=%d CIDT=%d\00"
define i32 @phConf(i32 %0, i32 %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 1000, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%6 = call i32 @ph_rpc(i8* %4)
ret i32 %6
}
int genarray(int arr[]) {
  int out;
  out = sizeof(arr);
  return out;
}


x86 assembly (clang, -O0):
<genarray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @genarray(i32* nocapture readnone %0) {
ret i32 8
}
int userfun(int x) {
  return (x & 0xfffffffc) | ((x & 1) << 1) | ((x & 2) >> 1);
}


x86 assembly (clang, -O0):
<userfun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffffc,%eax
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0x2,%ecx
sar    $0x1,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<userfun>:
mov    %edi,%eax
and    $0xfffffffc,%eax
mov    %edi,%ecx
and    $0x1,%ecx
lea    (%rax,%rcx,2),%eax
shr    %edi
and    $0x1,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @userfun(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -4
%5 = load i32, i32* %2
%6 = and i32 %5, 1
%7 = shl i32 %6, 1
%8 = or i32 %4, %7
%9 = load i32, i32* %2
%10 = and i32 %9, 2
%11 = ashr i32 %10, 1
%12 = or i32 %8, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @userfun(i32 %0) {
%2 = and i32 %0, -4
%3 = shl i32 %0, 1
%4 = and i32 %3, 2
%5 = or i32 %4, %2
%6 = lshr i32 %0, 1
%7 = and i32 %6, 1
%8 = or i32 %5, %7
ret i32 %8
}
int test_imm_44uint8_reg(unsigned char val) {
  return ((val) & (-0x44 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_44uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -68
%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_44uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -68
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ *get_umap(int);
int upboard_exists(int board) { return get_umap(board) != NULL; }


x86 assembly (clang, -O0):
<upboard_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <get_umap@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @upboard_exists(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32* @get_umap(i32 %3)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @upboard_exists(i32 %0) {
%2 = tail call i32* @get_umap(i32 %0)
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stdout;
  if (status == EXIT_FAILURE)
    stream = stderr;
  fprintf(stream, "Usage: %s [command] [args]\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e8a(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eab(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea8(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e8f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32* null
@EXIT_FAILURE = global i32 0
@stderr = global i32* null
@.str = [28 x i8] c"Usage: %s [command] [args]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stdout
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_FAILURE
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stderr
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stdout = global i32* null
@EXIT_FAILURE = global i32 0
@stderr = global i32* null
@.str = [28 x i8] c"Usage: %s [command] [args]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_FAILURE
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stderr
%6 = load i32*, i32** @stdout
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
void gtk_hpaned_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_hpaned_new() {
ret void
}
void test_utils_interactive_sync(void) {}


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

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

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

LLVM IR (-O2):
define void @test_utils_interactive_sync() {
ret void
}
void dbow_free_result(void *vp) {}


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

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

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

LLVM IR (-O2):
define void @dbow_free_result(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct timex {
  scalar_t__ status;
  int /*<<< orphan*/ modes;
};

/* Variables and functions */
int /*<<< orphan*/ ADJ_STATUS;
int adjtimex(struct timex *);
int clear_time_state(void) {
  struct timex tx;
  int ret;
  tx.modes = ADJ_STATUS;
  tx.status = 0;
  ret = adjtimex(&tx);
  return ret;
}


x86 assembly (clang, -O0):
<clear_time_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <adjtimex@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_time_state>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <adjtimex@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timex = type { i64, i32 }
@ADJ_STATUS = global i32 0
define i32 @clear_time_state() {
%1 = alloca %struct.timex
%2 = alloca i32
%3 = load i32, i32* @ADJ_STATUS
%4 = getelementptr inbounds %struct.timex, %struct.timex* %1, i32 0, i32 1
store i32 %3, i32* %4
%5 = getelementptr inbounds %struct.timex, %struct.timex* %1, i32 0, i32 0
store i64 0, i64* %5
%6 = call i32 @adjtimex(%struct.timex* %1)
store i32 %6, i32* %2
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
%struct.timex = type { i64, i32 }
@ADJ_STATUS = global i32 0
define i32 @clear_time_state() {
%1 = alloca %struct.timex
%2 = bitcast %struct.timex* %1 to i8*
%3 = load i32, i32* @ADJ_STATUS
%4 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 1
store i32 %3, i32* %4
%5 = getelementptr inbounds %struct.timex, %struct.timex* %1, i64 0, i32 0
store i64 0, i64* %5
%6 = call i32 @adjtimex(%struct.timex* %1)
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int keycode;
};
typedef TYPE_1__ XKeyEvent;

/* Variables and functions */
void set_XKeyEvent_keycode(void *_p, unsigned _v) {
  ((XKeyEvent *)_p)->keycode = (unsigned)_v;
}


x86 assembly (clang, -O0):
<set_XKeyEvent_keycode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XKeyEvent_keycode(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XKeyEvent_keycode(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void WatchdogResetDisable(void) {
  (*((volatile unsigned long
          *)(((unsigned long)(0x40080000 + 0x00000008) & 0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x40080000 + 0x00000008) & 0x000FFFFF) << 5) |
             ((1) << 2)))) = 0;
}


x86 assembly (clang, -O0):
<WatchdogResetDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43000104,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogResetDisable>:
movq   $0x0,0x43000104
ret

LLVM IR (-O0):
define void @WatchdogResetDisable() {
store volatile i64 0, i64* inttoptr (i64 1124073732 to i64*)
ret void
}

LLVM IR (-O2):
define void @WatchdogResetDisable() {
store volatile i64 0, i64* inttoptr (i64 1124073732 to i64*)
ret void
}
int diag_l2_proto_14230_stopcomms(struct diag_l2_conn *pX
                                  __attribute__((unused))) {
  return 0;
}


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

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

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

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