xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sleep(int);
scalar_t__ strlen(char *);
void *threadFunc(void *arg) {
  char *s = (char *)arg;
  sleep(1);
  printf("%s", s);
  return (void *)strlen(s);
}


x86 assembly (clang, -O0):
<threadFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0x10(%rbp),%rsi
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<threadFunc>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i8* @threadFunc(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = call i32 @sleep(i32 1)
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = call i64 @strlen(i8* %8)
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i8* @threadFunc(i8* %0) {
%2 = tail call i32 @sleep(i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
int mylibD() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @mylibD() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int fahr;
  for (fahr = 0; fahr <= 300; fahr = fahr + 20) {
    printf("%d\t%d\n", fahr, 5 * (fahr - 32) / 9);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x12c,-0x8(%rbp)
jg     1163 <main+0x53>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0xffffffec,%ebx
mov    $0xff60,%r15w
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
add    $0x14,%ebx
movswl %r15w,%eax
imul   $0x1c72,%eax,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x10,%eax
add    %ecx,%eax
movswl %ax,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x64,%r15d
cmp    $0x119,%ebx
jb     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d\09%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 300
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 32
%10 = mul nsw i32 5, %9
%11 = sdiv i32 %10, 9
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %11)
br label %13
13: ; preds = %6
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 20
store i32 %15, i32* %2
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %9, %1 ]
%3 = trunc i32 %2 to i16
%4 = mul nuw nsw i16 %3, 5
%5 = add nsw i16 %4, -160
%6 = sdiv i16 %5, 9
%7 = sext i16 %6 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %7)
%9 = add nuw nsw i32 %2, 20
%10 = icmp ult i32 %2, 281
br i1 %10, label %1, label %11
11: ; preds = %1
ret i32 0
}
/* Variables and functions */
int foo();
void bar(int a, int b, int c) {
  while (!a) {
    c = foo();
    if (c == 7)
      c = b;
    switch (c) {
    case 1:
      a = b++;
      if (b)
        b = 1;
    }
  }
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1137 <bar+0x27>
jmp    118b <bar+0x7b>
mov    $0x0,%al
call   1030 <foo@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jne    1151 <bar+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
jne    1186 <bar+0x76>
jmp    1162 <bar+0x52>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1181 <bar+0x71>
movl   $0x1,-0x8(%rbp)
jmp    1186 <bar+0x76>
jmp    1121 <bar+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbx
test   %edi,%edi
jne    1144 <bar+0x34>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %esi,%ebx
xor    %eax,%eax
call   1030 <foo@plt>
cmp    $0x7,%eax
cmove  %ebx,%eax
xor    %esi,%esi
cmp    $0xffffffff,%ebx
setne  %sil
cmp    $0x1,%eax
cmovne %ebx,%esi
jne    1120 <bar+0x10>
test   %ebx,%ebx
je     1120 <bar+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @bar(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
br label %7
7: ; preds = %26, %3
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %11, label %27
11: ; preds = %7
%12 = call i32 (...) @foo()
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = icmp eq i32 %13, 7
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i32, i32* %5
store i32 %16, i32* %6
br label %17
17: ; preds = %15, %11
%18 = load i32, i32* %6
switch i32 %18, label %26 [
i32 1, label %19
]
19: ; preds = %17
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
store i32 %20, i32* %4
%22 = load i32, i32* %5
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %19
store i32 1, i32* %5
br label %25
25: ; preds = %24, %19
br label %26
26: ; preds = %25, %17
br label %7
27: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @bar(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %17
5: ; preds = %3, %5
%6 = phi i32 [ %13, %5 ], [ %1, %3 ]
%7 = tail call i32 (...) @foo()
%8 = icmp eq i32 %7, 7
%9 = select i1 %8, i32 %6, i32 %7
%10 = icmp eq i32 %9, 1
%11 = icmp ne i32 %6, -1
%12 = zext i1 %11 to i32
%13 = select i1 %10, i32 %12, i32 %6
%14 = icmp eq i32 %6, 0
%15 = xor i1 %10, true
%16 = select i1 %15, i1 true, i1 %14
br i1 %16, label %5, label %17
17: ; preds = %5, %3
ret void
}
float powf(float x, float y) { return powf(x, y); }


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

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

LLVM IR (-O0):
define float @powf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @powf(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @powf(float %0, float %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
/* Variables and functions */
int UserIsNameValid(char const *);
int ProfileIsNameValid(const char *strName) {
  ;
  if (!strName)
    return 0;
  return UserIsNameValid(strName);
}


x86 assembly (clang, -O0):
<ProfileIsNameValid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <ProfileIsNameValid+0x23>
movl   $0x0,-0x4(%rbp)
jmp    113f <ProfileIsNameValid+0x2f>
mov    -0x10(%rbp),%rdi
call   1030 <UserIsNameValid@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ProfileIsNameValid>:
test   %rdi,%rdi
je     111a <ProfileIsNameValid+0xa>
jmp    1030 <UserIsNameValid@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ProfileIsNameValid(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @UserIsNameValid(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Type definitions */
struct svc_req {
  int dummy;
};

/* Variables and functions */
int l2tp_tunnel_profile_delete_1_svc(char *, void *, struct svc_req *);
int _l2tp_tunnel_profile_delete_1(char **argp, void *result,
                                  struct svc_req *rqstp) {
  return (l2tp_tunnel_profile_delete_1_svc(*argp, result, rqstp));
}


x86 assembly (clang, -O0):
<_l2tp_tunnel_profile_delete_1>:
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),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <l2tp_tunnel_profile_delete_1_svc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_l2tp_tunnel_profile_delete_1>:
mov    (%rdi),%rdi
jmp    1030 <l2tp_tunnel_profile_delete_1_svc@plt>

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

LLVM IR (-O2):
%struct.svc_req = type { i32 }
define i32 @_l2tp_tunnel_profile_delete_1(i8** nocapture %0, i8* %1, %struct.svc_req* %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @l2tp_tunnel_profile_delete_1_svc(i8* %4, i8* %1, %struct.svc_req* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int main(void) {
  char c;
  putchar('A');
  putchar('\n');
  putchar(65);
  putchar('\n');
  c = 'A';
  putchar(c);
  putchar('\n');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i8 signext 65)
%2 = tail call i32 @putchar(i8 signext 10)
%3 = tail call i32 @putchar(i8 signext 65)
%4 = tail call i32 @putchar(i8 signext 10)
%5 = tail call i32 @putchar(i8 signext 65)
%6 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ rgph_u32_murmur32s_data(int /*<<< orphan*/ const *, size_t,
                                           uintptr_t);
uint32_t rgph_u32_murmur32s_u16a(const uint16_t *key, size_t len,
                                 uintptr_t seed) {
  const uint8_t *arg = ((const uint8_t *)(const char *)(key));
  return rgph_u32_murmur32s_data(arg, len * sizeof(key[0]), seed);
}


x86 assembly (clang, -O0):
<rgph_u32_murmur32s_u16a>:
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,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
shl    $0x2,%rsi
mov    -0x18(%rbp),%rdx
call   1030 <rgph_u32_murmur32s_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u32_murmur32s_u16a>:
shl    $0x2,%rsi
jmp    1030 <rgph_u32_murmur32s_data@plt>

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

LLVM IR (-O2):
define i32 @rgph_u32_murmur32s_u16a(i32* %0, i64 %1, i64 %2) {
%4 = shl i64 %1, 2
%5 = tail call i32 @rgph_u32_murmur32s_data(i32* %0, i64 %4, i64 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x67() {
  Assert_real((isdigit(103) == 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_isdigit.c",
              520, ("isdigit should be 0 for g"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x67>:
push   %rax
mov    $0x67,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x208,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for g\00"
define void @t_isdigit_0x67() {
%1 = call i64 @isdigit(i32 103)
%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 520, 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for g\00"
define void @t_isdigit_0x67() {
%1 = tail call i64 @isdigit(i32 103)
%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 520, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(unsigned char);
void and_reg64_imm8(int reg64, unsigned char imm8) {
  put8(0x48);
  put8(0x83);
  put8(0xE0 + reg64);
  put8(imm8);
}


x86 assembly (clang, -O0):
<and_reg64_imm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x83,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%eax
add    $0xe0,%eax
movzbl %al,%edi
call   1030 <put8@plt>
movzbl -0x5(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<and_reg64_imm8>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x83,%edi
call   1030 <put8@plt>
add    $0xe0,%bpl
movzbl %bpl,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @and_reg64_imm8(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = call i32 @put8(i8 zeroext 72)
%6 = call i32 @put8(i8 zeroext -125)
%7 = load i32, i32* %3
%8 = add nsw i32 224, %7
%9 = trunc i32 %8 to i8
%10 = call i32 @put8(i8 zeroext %9)
%11 = load i8, i8* %4
%12 = call i32 @put8(i8 zeroext %11)
ret void
}

LLVM IR (-O2):
define void @and_reg64_imm8(i32 %0, i8 zeroext %1) {
%3 = tail call i32 @put8(i8 zeroext 72)
%4 = tail call i32 @put8(i8 zeroext -125)
%5 = trunc i32 %0 to i8
%6 = add i8 %5, -32
%7 = tail call i32 @put8(i8 zeroext %6)
%8 = tail call i32 @put8(i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pr_err(char *);
void reserve_hugetlb_gpages(void) {
  pr_err("Cannot reserve gpages without hugetlb enabled\n");
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"Cannot reserve gpages without hugetlb enabled\0A\00"
define void @reserve_hugetlb_gpages() {
%1 = call i32 @pr_err(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"Cannot reserve gpages without hugetlb enabled\0A\00"
define void @reserve_hugetlb_gpages() {
%1 = tail call i32 @pr_err(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t getNextRandomValue(size_t index) { return index; }


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

x86 assembly (clang, -O2):
<getNextRandomValue>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @getNextRandomValue(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int close(int);
int __libc_close(int fd) { return close(fd); }


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

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

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

LLVM IR (-O2):
define i32 @__libc_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ point_abs(float, float);
scalar_t__ threed_proj(double, double, double, float *, float *);
void point_3d(double x, double y, double z) {
  float xp, yp;
  if (threed_proj(x, y, z, &xp, &yp))
    point_abs(xp, yp);
}


x86 assembly (clang, -O0):
<point_3d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    -0x1c(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <threed_proj@plt>
cmp    $0x0,%rax
je     116c <point_3d+0x4c>
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
call   1030 <point_abs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<point_3d>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <threed_proj@plt>
test   %rax,%rax
je     1143 <point_3d+0x23>
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
call   1030 <point_abs@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @point_3d(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca float
%8 = alloca float
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = load double, double* %5
%11 = load double, double* %6
%12 = call i64 @threed_proj(double %9, double %10, double %11, float* %7, float* %8)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = load float, float* %7
%16 = load float, float* %8
%17 = call i32 @point_abs(float %15, float %16)
br label %18
18: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
define void @point_3d(double %0, double %1, double %2) {
%4 = alloca float
%5 = alloca float
%6 = bitcast float* %4 to i8*
%7 = bitcast float* %5 to i8*
%8 = call i64 @threed_proj(double %0, double %1, double %2, float* %4, float* %5)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %3
%11 = load float, float* %4
%12 = load float, float* %5
%13 = call i32 @point_abs(float %11, float %12)
br label %14
14: ; preds = %10, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void safe_free_impl(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<safe_free_impl>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @safe_free_impl(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int leftGrandChild(int i) { return 4 * i + 3; }


x86 assembly (clang, -O0):
<leftGrandChild>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
add    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leftGrandChild>:
lea    0x3(,%rdi,4),%eax
ret

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

LLVM IR (-O2):
define i32 @leftGrandChild(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = or i32 %2, 3
ret i32 %3
}
/* Variables and functions */
char *_resposta_padrao(int, int, char *);
char *ConsultarSAT(int sessao) {
  return _resposta_padrao(sessao, 8000, "SAT em Opera\xc3\xa7\xc3\xa3o");
}


x86 assembly (clang, -O0):
<ConsultarSAT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1f40,%esi
lea    0xed6(%rip),%rdx
call   1030 <_resposta_padrao@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConsultarSAT>:
lea    0xee9(%rip),%rdx
mov    $0x1f40,%esi
jmp    1030 <_resposta_padrao@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"SAT em Opera\C3\A7\C3\A3o\00"
define i8* @ConsultarSAT(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @_resposta_padrao(i32 %3, i32 8000, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [18 x i8] c"SAT em Opera\C3\A7\C3\A3o\00"
define i8* @ConsultarSAT(i32 %0) {
%2 = tail call i8* @_resposta_padrao(i32 %0, i32 8000, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int *malloc(int);
int malloc_usable_size(int *);
int main(void) {
  int *x = malloc(99);
  assert(104 == malloc_usable_size(x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x63,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc_usable_size@plt>
mov    %eax,%ecx
mov    $0x68,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x63,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
call   1030 <malloc_usable_size@plt>
xor    %edi,%edi
cmp    $0x68,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @malloc(i32 99)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @malloc_usable_size(i32* %4)
%6 = icmp eq i32 104, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 99)
%2 = tail call i32 @malloc_usable_size(i32* %1)
%3 = icmp eq i32 %2, 104
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ volatile *mem_get_reg32(int);
volatile uint32_t *syscfg_get_PMC() { return mem_get_reg32(0x40010000 + 0x04); }


x86 assembly (clang, -O0):
<syscfg_get_PMC>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40010004,%edi
call   1030 <mem_get_reg32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscfg_get_PMC>:
mov    $0x40010004,%edi
jmp    1030 <mem_get_reg32@plt>

LLVM IR (-O0):
define i32* @syscfg_get_PMC() {
%1 = call i32* @mem_get_reg32(i32 1073807364)
ret i32* %1
}

LLVM IR (-O2):
define i32* @syscfg_get_PMC() {
%1 = tail call i32* @mem_get_reg32(i32 1073807364)
ret i32* %1
}
void view_doBubbleSort(void) {}


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

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

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

LLVM IR (-O2):
define void @view_doBubbleSort() {
ret void
}
void __SLIC_fun_local_irq_enable_return(void) {
  { return; }
}


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

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

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

LLVM IR (-O2):
define void @__SLIC_fun_local_irq_enable_return() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_LINES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex2f(float, float);
void drawline(float x1, float y1, float x2, float y2) {
  glBegin(GL_LINES);
  glVertex2f(x1, y1);
  glVertex2f(x2, y2);
  glEnd();
}


x86 assembly (clang, -O0):
<drawline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <glVertex2f@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1040 <glVertex2f@plt>
mov    $0x0,%al
call   1030 <glEnd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawline>:
sub    $0x18,%rsp
movss  %xmm3,0x14(%rsp)
movss  %xmm2,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1040 <glVertex2f@plt>
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
call   1040 <glVertex2f@plt>
xor    %eax,%eax
add    $0x18,%rsp
jmp    1030 <glEnd@plt>

LLVM IR (-O0):
@GL_LINES = global i32 0
define void @drawline(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load i32, i32* @GL_LINES
%10 = call i32 @glBegin(i32 %9)
%11 = load float, float* %5
%12 = load float, float* %6
%13 = call i32 @glVertex2f(float %11, float %12)
%14 = load float, float* %7
%15 = load float, float* %8
%16 = call i32 @glVertex2f(float %14, float %15)
%17 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_LINES = global i32 0
define void @drawline(float %0, float %1, float %2, float %3) {
%5 = load i32, i32* @GL_LINES
%6 = tail call i32 @glBegin(i32 %5)
%7 = tail call i32 @glVertex2f(float %0, float %1)
%8 = tail call i32 @glVertex2f(float %2, float %3)
%9 = tail call i32 (...) @glEnd()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int thirdBits();
int main() {
  printf("%d\n", thirdBits());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @thirdBits()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
struct pair {
  int dummy;
};

/* Variables and functions */
struct pair *initial_env();
struct pair *setup_environment() {
  return initial_env();
}


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

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

LLVM IR (-O0):
%struct.pair = type { i32 }
define %struct.pair* @setup_environment() {
%1 = call %struct.pair* (...) @initial_env()
ret %struct.pair* %1
}

LLVM IR (-O2):
%struct.pair = type { i32 }
define %struct.pair* @setup_environment() {
%1 = tail call %struct.pair* (...) @initial_env()
ret %struct.pair* %1
}
__attribute__((no, noclone)) signed __int128 t101_4add(signed __int128 x) {
  signed __int128 y = (-1);
  signed __int128 r;
  if (__builtin_add_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t101_4add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movq   $0xffffffffffffffff,-0x38(%rbp)
ff
movq   $0xffffffffffffffff,-0x40(%rbp)
ff
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rax
add    %rsi,%rdx
adc    %rax,%rcx
seto   %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    116e <t101_4add+0x5e>
jmp    1175 <t101_4add+0x65>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t101_4add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
adc    $0xffffffffffffffff,%r14
jno    112b <t101_4add+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t101_4add(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 -1, i128* %6
%12 = load i128, i128* %5
%13 = load i128, i128* %6
%14 = call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %12, i128 %13)
%15 = extractvalue { i128, i1 } %14, 1
%16 = extractvalue { i128, i1 } %14, 0
store i128 %16, i128* %7
br i1 %15, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %7
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t101_4add(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %6, i128 -1)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
__attribute__((__no__)) void do_test(__float128 expected, __float128 got,
                                     const char *name) {
  int equal_p = (expected == got);
  if (!equal_p)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<do_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movaps %xmm0,-0x10(%rbp)
movaps %xmm1,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
movaps -0x10(%rbp),%xmm0
movaps -0x20(%rbp),%xmm1
call   1160 <__eqtf2>
test   %eax,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    114d <do_test+0x3d>
call   1030 <abort@plt>
add    $0x30,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)

x86 assembly (clang, -O2):
<do_test>:
push   %rax
call   1130 <__eqtf2>
test   %eax,%eax
jne    111c <do_test+0xc>
pop    %rax
ret
call   1030 <abort@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define void @do_test(fp128 %0, fp128 %1, i8* %2) {
%4 = alloca fp128
%5 = alloca fp128
%6 = alloca i8*
%7 = alloca i32
store fp128 %0, fp128* %4
store fp128 %1, fp128* %5
store i8* %2, i8** %6
%8 = load fp128, fp128* %4
%9 = load fp128, fp128* %5
%10 = fcmp oeq fp128 %8, %9
%11 = zext i1 %10 to i32
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %3
unreachable
15: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @do_test(fp128 %0, fp128 %1, i8* nocapture readnone %2) {
%4 = fcmp oeq fp128 %0, %1
br i1 %4, label %6, label %5
5: ; preds = %3
tail call void @abort()
unreachable
6: ; preds = %3
ret void
}
int lookup_external_symbol(char *sym_name, unsigned *adr, unsigned uscore) {
  return -1;
}


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

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

LLVM IR (-O0):
define i32 @lookup_external_symbol(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
ret i32 -1
}

LLVM IR (-O2):
define i32 @lookup_external_symbol(i8* nocapture readnone %0, i32* nocapture readnone %1, i32 %2) {
ret i32 -1
}
void bm_clear_bit(unsigned long *bmw, int n) {
  (bmw[n / ((sizeof(unsigned long)) * 8)]) &=
      ~(1UL << (n % ((sizeof(unsigned long)) * 8)));
}


x86 assembly (clang, -O0):
<bm_clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shr    $0x6,%rcx
and    (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bm_clear_bit>:
movslq %esi,%rcx
mov    $0xfffffffffffffffe,%rax
rol    %cl,%rax
shr    $0x6,%rcx
and    %rax,(%rdi,%rcx,8)
ret

LLVM IR (-O0):
define void @bm_clear_bit(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = urem i64 %6, 64
%8 = shl i64 1, %7
%9 = xor i64 %8, -1
%10 = load i64*, i64** %3
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = udiv i64 %12, 64
%14 = getelementptr inbounds i64, i64* %10, i64 %13
%15 = load i64, i64* %14
%16 = and i64 %15, %9
store i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @bm_clear_bit(i64* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = and i64 %3, 63
%5 = shl nuw i64 1, %4
%6 = xor i64 %5, -1
%7 = lshr i64 %3, 6
%8 = getelementptr inbounds i64, i64* %0, i64 %7
%9 = load i64, i64* %8
%10 = and i64 %9, %6
store i64 %10, i64* %8
ret void
}
/* Variables and functions */
int getpagesize();
int runtime_pagesize(void) { return getpagesize(); }


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

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

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

LLVM IR (-O2):
define i32 @runtime_pagesize() {
%1 = tail call i32 (...) @getpagesize()
ret i32 %1
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t add(uint32_t lhs, uint32_t rhs) { return lhs + rhs; }


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

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @add(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @add(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
int cdc_tcxo_set_req_int(int clk_id, int enable) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cdc_tcxo_set_req_int(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int rand();
int getnum(int a) { return rand() % a + 1; }


x86 assembly (clang, -O0):
<getnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnum>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
lea    0x1(%rdx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @getnum(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
%4 = add nsw i32 %3, 1
ret i32 %4
}
int strcollb(const char *str1, const char *str2) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @strcollb(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int random();
char randchar() { return random() % 26 + 'A'; }


x86 assembly (clang, -O0):
<randchar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random@plt>
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    %dl,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<randchar>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @randchar() {
%1 = call i32 (...) @random()
%2 = srem i32 %1, 26
%3 = add nsw i32 %2, 65
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @randchar() {
%1 = tail call i32 (...) @random()
%2 = srem i32 %1, 26
%3 = trunc i32 %2 to i8
%4 = add nsw i8 %3, 65
ret i8 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ u64_to_le(int /*<<< orphan*/, int /*<<< orphan*/ *);
void i64_to_le(int64_t val, uint8_t *buf) { u64_to_le(val, buf); }


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

x86 assembly (clang, -O2):
<i64_to_le>:
jmp    1030 <u64_to_le@plt>

LLVM IR (-O0):
define void @i64_to_le(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = load i32*, i32** %4
%7 = call i32 @u64_to_le(i32 %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @i64_to_le(i32 %0, i32* %1) {
%3 = tail call i32 @u64_to_le(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
void test3() {
  int *ptr;
  ptr = (int *)malloc(sizeof(int));
  free(ptr);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @test3() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @free(i32* %4)
ret void
}

LLVM IR (-O2):
define void @test3() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @free(i32* %2)
ret void
}
char *langDbgDevFmpak() { return "FMPAK"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"FMPAK\00"
define i8* @langDbgDevFmpak() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"FMPAK\00"
define i8* @langDbgDevFmpak() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ nxtDisplayCenteredBigTextLine(int, char *);
int /*<<< orphan*/ nxtDisplayCenteredTextLine(int, char *);
void showStatusWaescht() {
  nxtDisplayCenteredBigTextLine(1, "Ich");
  nxtDisplayCenteredBigTextLine(3, "wasche!");
  nxtDisplayCenteredTextLine(5, "Zeit: 0.5 min");
  nxtDisplayCenteredTextLine(6, "Tuere auf?");
}


x86 assembly (clang, -O0):
<showStatusWaescht>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xed0(%rip),%rsi
call   1030 <nxtDisplayCenteredBigTextLine@plt>
mov    $0x3,%edi
lea    0xec3(%rip),%rsi
call   1030 <nxtDisplayCenteredBigTextLine@plt>
mov    $0x5,%edi
lea    0xeba(%rip),%rsi
call   1040 <nxtDisplayCenteredTextLine@plt>
mov    $0x6,%edi
lea    0xeb7(%rip),%rsi
call   1040 <nxtDisplayCenteredTextLine@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<showStatusWaescht>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
call   1030 <nxtDisplayCenteredBigTextLine@plt>
lea    0xecb(%rip),%rsi
mov    $0x3,%edi
call   1030 <nxtDisplayCenteredBigTextLine@plt>
lea    0xec2(%rip),%rsi
mov    $0x5,%edi
call   1040 <nxtDisplayCenteredTextLine@plt>
lea    0xebf(%rip),%rsi
mov    $0x6,%edi
pop    %rax
jmp    1040 <nxtDisplayCenteredTextLine@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"Ich\00"
@.str.1 = [8 x i8] c"wasche!\00"
@.str.2 = [14 x i8] c"Zeit: 0.5 min\00"
@.str.3 = [11 x i8] c"Tuere auf?\00"
define void @showStatusWaescht() {
%1 = call i32 @nxtDisplayCenteredBigTextLine(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @nxtDisplayCenteredBigTextLine(i32 3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @nxtDisplayCenteredTextLine(i32 5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @nxtDisplayCenteredTextLine(i32 6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"Ich\00"
@.str.1 = [8 x i8] c"wasche!\00"
@.str.2 = [14 x i8] c"Zeit: 0.5 min\00"
@.str.3 = [11 x i8] c"Tuere auf?\00"
define void @showStatusWaescht() {
%1 = tail call i32 @nxtDisplayCenteredBigTextLine(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @nxtDisplayCenteredBigTextLine(i32 3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @nxtDisplayCenteredTextLine(i32 5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @nxtDisplayCenteredTextLine(i32 6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(char *str) {
  int len = -1;
  while (str[++len] != '\0')
    ;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1131 <strlen+0x31>
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %4, %2 ], [ -1, %1 ]
%4 = add nsw i64 %3, 1
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %4 to i32
ret i32 %9
}