xunge/DecIR huggingface dataset:
/* Type definitions */
struct __message {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ handleMessage(struct __message *);
void *pthread_func(void *arg) {
  handleMessage((struct __message *)arg);
  return NULL;
}


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

x86 assembly (clang, -O2):
<pthread_func>:
push   %rax
call   1030 <handleMessage@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.__message = type { i32 }
define i8* @pthread_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.__message*
%5 = call i32 @handleMessage(%struct.__message* %4)
ret i8* null
}

LLVM IR (-O2):
%struct.__message = type { i32 }
define noalias i8* @pthread_func(i8* %0) {
%2 = bitcast i8* %0 to %struct.__message*
%3 = tail call i32 @handleMessage(%struct.__message* %2)
ret i8* null
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
bool RingCompareGt(uint32_t a, uint32_t b) { return (int32_t)(a - b) > 0; }


x86 assembly (clang, -O0):
<RingCompareGt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RingCompareGt>:
xor    %eax,%eax
cmp    %rsi,%rdi
setg   %al
ret

LLVM IR (-O0):
define i32 @RingCompareGt(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 = sub nsw i64 %5, %6
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @RingCompareGt(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *new_string(char const *);
void assign_string(char **pdests, const char *ins) {
  if (*pdests)
    free(*pdests);
  if (ins == NULL)
    *pdests = NULL;
  else
    *pdests = new_string(ins);
}


x86 assembly (clang, -O0):
<assign_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114a <assign_string+0x2a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x10(%rbp)
jne    1165 <assign_string+0x45>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
jmp    1178 <assign_string+0x58>
mov    -0x10(%rbp),%rdi
call   1040 <new_string@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assign_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1137 <assign_string+0x17>
call   1030 <free@plt>
test   %rbx,%rbx
je     1146 <assign_string+0x26>
mov    %rbx,%rdi
call   1040 <new_string@plt>
jmp    1148 <assign_string+0x28>
xor    %eax,%eax
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @assign_string(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** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %4
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = load i8**, i8*** %3
store i8* null, i8** %16
br label %21
17: ; preds = %12
%18 = load i8*, i8** %4
%19 = call i8* @new_string(i8* %18)
%20 = load i8**, i8*** %3
store i8* %19, i8** %20
br label %21
21: ; preds = %17, %15
ret void
}

LLVM IR (-O2):
define void @assign_string(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @free(i8* %3)
br label %7
7: ; preds = %5, %2
%8 = icmp eq i8* %1, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i8* @new_string(i8* %1)
br label %11
11: ; preds = %7, %9
%12 = phi i8* [ %10, %9 ], [ null, %7 ]
store i8* %12, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_byte(char);
int /*<<< orphan*/ write_instr(int);
void write_str(const char *str) {
  write_instr(0x06);
  while (*str) {
    write_byte(*str++);
  }
  write_byte('\0');
}


x86 assembly (clang, -O0):
<write_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x6,%edi
call   1040 <write_instr@plt>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115f <write_str+0x3f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <write_byte@plt>
jmp    1136 <write_str+0x16>
xor    %edi,%edi
call   1030 <write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_str>:
push   %rbx
mov    %rdi,%rbx
mov    $0x6,%edi
call   1040 <write_instr@plt>
mov    (%rbx),%al
test   %al,%al
je     1153 <write_str+0x33>
add    $0x1,%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <write_byte@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <write_str+0x20>
xor    %edi,%edi
pop    %rbx
jmp    1030 <write_byte@plt>

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

LLVM IR (-O2):
define void @write_str(i8* nocapture %0) {
%2 = tail call i32 @write_instr(i32 6)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %10, %5 ], [ %3, %1 ]
%7 = phi i8* [ %8, %5 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = tail call i32 @write_byte(i8 signext %6)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %1
%13 = tail call i32 @write_byte(i8 signext 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
void testTortureExecute(void) {
  foo(0);
  return;
}


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

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

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

LLVM IR (-O2):
define void @testTortureExecute() {
%1 = tail call i32 @foo(i32 0)
ret void
}
int rankMin(unsigned int e) {
  int i;
  int o, p;
  i = 32 - 3;
  o = (e >> i & 0x1) == 1;
  p = (e >> (i - 1) & 0x1) == 1;
  if (o == 1) {
    if (p == 1) {
      return 4;
    } else {
      return 3;
    }
  } else {
    if (p == 1) {
      return 2;
    } else {
      return 1;
    }
  }
}


x86 assembly (clang, -O0):
<rankMin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1d,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shr    %cl,%eax
and    $0x1,%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
shr    %cl,%eax
and    $0x1,%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    116f <rankMin+0x6f>
cmpl   $0x1,-0x14(%rbp)
jne    1163 <rankMin+0x63>
movl   $0x4,-0x4(%rbp)
jmp    118c <rankMin+0x8c>
movl   $0x3,-0x4(%rbp)
jmp    118c <rankMin+0x8c>
cmpl   $0x1,-0x14(%rbp)
jne    1185 <rankMin+0x85>
movl   $0x2,-0x4(%rbp)
jmp    118c <rankMin+0x8c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rankMin>:
mov    %edi,%eax
and    $0x10000000,%eax
shr    $0x1c,%edi
and    $0x2,%edi
cmp    $0x1,%eax
sbb    $0x0,%edi
lea    0x2(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rankMin(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 29, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = lshr i32 %7, %8
%10 = and i32 %9, 1
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = lshr i32 %13, %15
%17 = and i32 %16, 1
%18 = icmp eq i32 %17, 1
%19 = zext i1 %18 to i32
store i32 %19, i32* %6
%20 = load i32, i32* %5
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %27
22: ; preds = %1
%23 = load i32, i32* %6
%24 = icmp eq i32 %23, 1
br i1 %24, label %25, label %26
25: ; preds = %22
store i32 4, i32* %2
br label %32
26: ; preds = %22
store i32 3, i32* %2
br label %32
27: ; preds = %1
%28 = load i32, i32* %6
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %31
30: ; preds = %27
store i32 2, i32* %2
br label %32
31: ; preds = %27
store i32 1, i32* %2
br label %32
32: ; preds = %31, %30, %26, %25
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @rankMin(i32 %0) {
%2 = and i32 %0, 536870912
%3 = icmp eq i32 %2, 0
%4 = and i32 %0, 268435456
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 3, i32 4
%7 = select i1 %5, i32 1, i32 2
%8 = select i1 %3, i32 %7, i32 %6
ret i32 %8
}
void out32(unsigned long addr, unsigned long data) {
  *(volatile unsigned long *)addr = data;
}


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

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

LLVM IR (-O0):
define void @out32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = inttoptr i64 %6 to i64*
store volatile i64 %5, i64* %7
ret void
}

LLVM IR (-O2):
define void @out32(i64 %0, i64 %1) {
%3 = inttoptr i64 %0 to i64*
store volatile i64 %1, i64* %3
ret void
}
int is_prime(int n) {
  int divisor;
  if (n <= 1)
    return 0;
  for (divisor = 2; divisor * divisor <= n; divisor++)
    if (n % divisor == 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     111d <is_prime+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    116a <is_prime+0x6a>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1163 <is_prime+0x63>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1150 <is_prime+0x50>
movl   $0x0,-0x4(%rbp)
jmp    116a <is_prime+0x6a>
jmp    1155 <is_prime+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <is_prime+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
xor    %ecx,%ecx
cmp    $0x2,%edi
jge    110a <is_prime+0xa>
mov    %ecx,%eax
ret
cmp    $0x4,%edi
jae    1115 <is_prime+0x15>
mov    $0x1,%eax
ret
mov    $0x2,%esi
nopw   0x0(%rax,%rax,1)
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1107 <is_prime+0x7>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jle    1120 <is_prime+0x20>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %26
8: ; preds = %1
store i32 2, i32* %4
br label %9
9: ; preds = %22, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = mul nsw i32 %10, %11
%13 = load i32, i32* %3
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %25
15: ; preds = %9
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = srem i32 %16, %17
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %15
store i32 0, i32* %2
br label %26
21: ; preds = %15
br label %22
22: ; preds = %21
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %9
25: ; preds = %9
store i32 1, i32* %2
br label %26
26: ; preds = %25, %20, %7
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @is_prime(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 4
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = mul nsw i32 %12, %12
%7 = icmp sgt i32 %6, %0
br i1 %7, label %13, label %8
8: ; preds = %3, %5
%9 = phi i32 [ %12, %5 ], [ 2, %3 ]
%10 = srem i32 %0, %9
%11 = icmp eq i32 %10, 0
%12 = add nuw nsw i32 %9, 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %3, %1
%14 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 0, %8 ], [ 1, %5 ]
ret i32 %14
}
unsigned long long f(unsigned long long a) { return a & 0xfffffffcffffffffull; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xfffffffcffffffff,%rax
ff ff ff
and    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movabs $0xfffffffcffffffff,%rax
ff ff ff
and    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @f(i64 %0) {
%2 = and i64 %0, -12884901889
ret i64 %2
}
/* Variables and functions */
int strcmp(char *, char *);
void strcmp_2() {
  char *x = "123";
  char *y = "234";
  if (strcmp(x, y) != -1)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strcmp_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0xffffffff,%eax
je     1144 <strcmp_2+0x34>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [4 x i8] c"234\00"
define void @strcmp_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strcmp(i8* %3, i8* %4)
%6 = icmp ne i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i8, i8* null
br label %9
9: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
define void @strcmp_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void write2(char *msg) { write(2, msg, strlen(msg)); }


x86 assembly (clang, -O0):
<write2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write2>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @write2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @write(i32 2, i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @write2(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
ret void
}
double Sleef_cos_u10(double x) { return __builtin_cos(x); }


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

x86 assembly (clang, -O2):
<Sleef_cos_u10>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define double @Sleef_cos_u10(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}
void board_init_irq(const struct mxt_platform_data *pdata) {}


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

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

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

LLVM IR (-O2):
%struct.mxt_platform_data = type opaque
define void @board_init_irq(%struct.mxt_platform_data* nocapture %0) {
ret void
}
/* Type definitions */
struct stack_st_OPENSSL_CSTRING {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int OPENSSL_sk_unshift(int /*<<< orphan*/ *, void const *);
int sk_OPENSSL_CSTRING_unshift(struct stack_st_OPENSSL_CSTRING *sk,
                               const char *ptr) {
  return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr);
}


x86 assembly (clang, -O0):
<sk_OPENSSL_CSTRING_unshift>:
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 <OPENSSL_sk_unshift@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sk_OPENSSL_CSTRING_unshift>:
jmp    1030 <OPENSSL_sk_unshift@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_CSTRING = type { i32 }
define i32 @sk_OPENSSL_CSTRING_unshift(%struct.stack_st_OPENSSL_CSTRING* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_CSTRING*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_CSTRING* %0, %struct.stack_st_OPENSSL_CSTRING** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_CSTRING*, %struct.stack_st_OPENSSL_CSTRING** %3
%6 = bitcast %struct.stack_st_OPENSSL_CSTRING* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i32 @OPENSSL_sk_unshift(i32* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_CSTRING = type { i32 }
define i32 @sk_OPENSSL_CSTRING_unshift(%struct.stack_st_OPENSSL_CSTRING* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_CSTRING, %struct.stack_st_OPENSSL_CSTRING* %0, i64 0, i32 0
%4 = tail call i32 @OPENSSL_sk_unshift(i32* %3, i8* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ I2C_SendByte(unsigned char);
int /*<<< orphan*/ I2C_StartCondition();
int /*<<< orphan*/ I2C_StopCondition();
void I2C_SendPocket(unsigned char value, unsigned char adres_rw) {
  I2C_StartCondition();
  I2C_SendByte(adres_rw);
  I2C_SendByte(value);
  I2C_StopCondition();
}


x86 assembly (clang, -O0):
<I2C_SendPocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1050 <I2C_StartCondition@plt>
movzbl -0x2(%rbp),%edi
call   1030 <I2C_SendByte@plt>
movzbl -0x1(%rbp),%edi
call   1030 <I2C_SendByte@plt>
mov    $0x0,%al
call   1040 <I2C_StopCondition@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2C_SendPocket>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <I2C_StartCondition@plt>
mov    %ebx,%edi
call   1030 <I2C_SendByte@plt>
mov    %ebp,%edi
call   1030 <I2C_SendByte@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <I2C_StopCondition@plt>

LLVM IR (-O0):
define void @I2C_SendPocket(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i32 (...) @I2C_StartCondition()
%6 = load i8, i8* %4
%7 = call i32 @I2C_SendByte(i8 zeroext %6)
%8 = load i8, i8* %3
%9 = call i32 @I2C_SendByte(i8 zeroext %8)
%10 = call i32 (...) @I2C_StopCondition()
ret void
}

LLVM IR (-O2):
define void @I2C_SendPocket(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 (...) @I2C_StartCondition()
%4 = tail call i32 @I2C_SendByte(i8 zeroext %1)
%5 = tail call i32 @I2C_SendByte(i8 zeroext %0)
%6 = tail call i32 (...) @I2C_StopCondition()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int const);
void funcInt2Char(const int *piI, const int *piLenI, char *pcI) {
  sprintf(pcI, "%d", *piI);
  pcI[*piLenI] = '\0';
}


x86 assembly (clang, -O0):
<funcInt2Char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xecb(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcInt2Char>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    (%rdi),%edx
lea    0xedd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
movslq (%r14),%rax
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @funcInt2Char(i32* %0, i32* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %6
%12 = load i32*, i32** %5
%13 = load i32, i32* %12
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @funcInt2Char(i32* nocapture %0, i32* nocapture %1, i8* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %2, i64 %7
store i8 0, i8* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cond_printf(int, char *, char const *);
int system(char const *);
int System(const char *command) {
  cond_printf(1, "System:%s\n", command);
  return system(command);
}


x86 assembly (clang, -O0):
<System>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xec4(%rip),%rsi
call   1040 <cond_printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<System>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
call   1040 <cond_printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <system@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"System:%s\0A\00"
define i32 @System(i8* %0) {
%2 = tail call i32 @cond_printf(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @system(i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ speed(int);
void mvfwd() { speed(50); }


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

x86 assembly (clang, -O2):
<mvfwd>:
mov    $0x32,%edi
jmp    1030 <speed@plt>

LLVM IR (-O0):
define void @mvfwd() {
%1 = call i32 @speed(i32 50)
ret void
}

LLVM IR (-O2):
define void @mvfwd() {
%1 = tail call i32 @speed(i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(unsigned char *);
void bm_get_rgb(unsigned int col, unsigned char *R, unsigned char *G,
                unsigned char *B) {
  assert(R);
  assert(G);
  assert(B);
  *R = (col >> 16) & 0xFF;
  *G = (col >> 8) & 0xFF;
  *B = (col >> 0) & 0xFF;
}


x86 assembly (clang, -O0):
<bm_get_rgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x20(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
shr    $0x0,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bm_get_rgb>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbp
mov    %rsi,%r15
mov    %edi,%ebx
mov    %rsi,%rdi
call   1030 <assert@plt>
mov    %rbp,%rdi
call   1030 <assert@plt>
mov    %r14,%rdi
call   1030 <assert@plt>
mov    %ebx,%eax
shr    $0x10,%eax
mov    %al,(%r15)
mov    %bh,0x0(%rbp)
mov    %bl,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @bm_get_rgb(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = call i32 @assert(i8* %9)
%11 = load i8*, i8** %7
%12 = call i32 @assert(i8* %11)
%13 = load i8*, i8** %8
%14 = call i32 @assert(i8* %13)
%15 = load i32, i32* %5
%16 = lshr i32 %15, 16
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i8
%19 = load i8*, i8** %6
store i8 %18, i8* %19
%20 = load i32, i32* %5
%21 = lshr i32 %20, 8
%22 = and i32 %21, 255
%23 = trunc i32 %22 to i8
%24 = load i8*, i8** %7
store i8 %23, i8* %24
%25 = load i32, i32* %5
%26 = lshr i32 %25, 0
%27 = and i32 %26, 255
%28 = trunc i32 %27 to i8
%29 = load i8*, i8** %8
store i8 %28, i8* %29
ret void
}

LLVM IR (-O2):
define void @bm_get_rgb(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @assert(i8* %1)
%6 = tail call i32 @assert(i8* %2)
%7 = tail call i32 @assert(i8* %3)
%8 = lshr i32 %0, 16
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = lshr i32 %0, 8
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
%12 = trunc i32 %0 to i8
store i8 %12, i8* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i = 0;
  for (; i != 10;)
    i = i + 1;
  assert(i == 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     113e <main+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
cmpl   $0xa,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <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
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 10
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
void rop3_165_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = T ^ *D;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_165_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_165_0_1>:
mov    (%rdi),%al
mov    %edx,%ecx
not    %cl
or     %sil,%cl
not    %sil
and    %dl,%sil
and    %al,%sil
xor    %dl,%al
not    %al
and    %al,%cl
or     %cl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_165_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = xor i32 %9, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = xor i32 %16, -1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %7
%19 = load i8, i8* %7
%20 = zext i8 %19 to i32
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = and i32 %20, %22
%24 = load i8, i8* %7
%25 = zext i8 %24 to i32
%26 = load i8, i8* %6
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = and i32 %25, %28
%30 = or i32 %23, %29
%31 = load i8, i8* %6
%32 = zext i8 %31 to i32
%33 = load i8, i8* %5
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = load i8*, i8** %4
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = and i32 %36, %39
%41 = or i32 %30, %40
%42 = trunc i32 %41 to i8
%43 = load i8*, i8** %4
store i8 %42, i8* %43
ret void
}

LLVM IR (-O2):
define void @rop3_165_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = xor i8 %5, -1
%7 = xor i8 %2, -1
%8 = or i8 %7, %1
%9 = and i8 %8, %6
%10 = xor i8 %1, -1
%11 = and i8 %10, %2
%12 = and i8 %11, %4
%13 = or i8 %9, %12
store i8 %13, i8* %0
ret void
}
void RAWToARGB() {}


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

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

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

LLVM IR (-O2):
define void @RAWToARGB() {
ret void
}
const char *GeoIP_lib_version(void) { return "1.6.10"; }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"1.6.10\00"
define i8* @GeoIP_lib_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
void adc_delay(int delay) {
  volatile int c, d = delay;
  for (c = 0; c < d; c++)
    ;
}


x86 assembly (clang, -O0):
<adc_delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1135 <adc_delay+0x35>
jmp    1127 <adc_delay+0x27>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1114 <adc_delay+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adc_delay>:
mov    %edi,-0x4(%rsp)
movl   $0x0,-0x8(%rsp)
nopl   0x0(%rax)
mov    -0x8(%rsp),%eax
cmp    -0x4(%rsp),%eax
jge    1121 <adc_delay+0x21>
addl   $0x1,-0x8(%rsp)
jmp    1110 <adc_delay+0x10>
ret

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

LLVM IR (-O2):
define void @adc_delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
store volatile i32 %0, i32* %3
store volatile i32 0, i32* %2
%6 = load volatile i32, i32* %2
%7 = load volatile i32, i32* %3
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %1, %9
%10 = load volatile i32, i32* %2
%11 = add nsw i32 %10, 1
store volatile i32 %11, i32* %2
%12 = load volatile i32, i32* %2
%13 = load volatile i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %9, label %15
15: ; preds = %9, %1
ret void
}
__attribute__((no, noclone)) unsigned __int128 foo(void) {
  unsigned __int128 x = (unsigned __int128)0xffffffffffffffffULL;
  struct {
    unsigned __int128 a : 65;
  } w;
  w.a = x;
  w.a += x;
  return w.a;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x18(%rbp)
movq   $0xffffffffffffffff,-0x20(%rbp)
ff
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rax
and    $0x1,%edx
and    $0xfffffffffffffffe,%rax
or     %rdx,%rax
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rsi
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
add    %rdx,%rcx
mov    %rax,%rdx
adc    %rsi,%rdx
and    $0x1,%edx
and    $0xfffffffffffffffe,%rax
or     %rdx,%rax
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
and    $0x1,%eax
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    $0x1,%edx
mov    $0xfffffffffffffffe,%rax
ret

LLVM IR (-O0):
%struct.anon = type { i72 }
define { i64, i64 } @foo() {
%1 = alloca i128
%2 = alloca i128
%3 = alloca %struct.anon
store i128 18446744073709551615, i128* %2
%4 = load i128, i128* %2
%5 = bitcast %struct.anon* %3 to i128*
%6 = load i128, i128* %5
%7 = and i128 %4, 36893488147419103231
%8 = and i128 %6, -36893488147419103232
%9 = or i128 %8, %7
store i128 %9, i128* %5
%10 = load i128, i128* %2
%11 = bitcast %struct.anon* %3 to i128*
%12 = load i128, i128* %11
%13 = and i128 %12, 36893488147419103231
%14 = add i128 %13, %10
%15 = load i128, i128* %11
%16 = and i128 %14, 36893488147419103231
%17 = and i128 %15, -36893488147419103232
%18 = or i128 %17, %16
store i128 %18, i128* %11
%19 = bitcast %struct.anon* %3 to i128*
%20 = load i128, i128* %19
%21 = and i128 %20, 36893488147419103231
store i128 %21, i128* %1
%22 = bitcast i128* %1 to { i64, i64 }*
%23 = load { i64, i64 }, { i64, i64 }* %22
ret { i64, i64 } %23
}

LLVM IR (-O2):
define { i64, i64 } @foo() {
ret { i64, i64 } { i64 -2, i64 1 }
}
/* Variables and functions */
int /*<<< orphan*/ japi_hide(int);
void j_hide(int arg0) { japi_hide(arg0); }


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

x86 assembly (clang, -O2):
<j_hide>:
jmp    1030 <japi_hide@plt>

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

LLVM IR (-O2):
define void @j_hide(i32 %0) {
%2 = tail call i32 @japi_hide(i32 %0)
ret void
}
char *lastpart(file)
register char *file;
{
  register char *c;
  c = rindex(file, '/');
  if (c++)
    return c;
  else
    return file;
}


x86 assembly (clang, -O0):
<lastpart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <rindex@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1154 <lastpart+0x44>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115c <lastpart+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lastpart>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <rindex@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @lastpart(i8* %0) {
%2 = tail call i8* @rindex(i8* %0, i32 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
scalar_t__ isgraph(int /*<<< orphan*/);
int IsEmptySubStr(const char *s, int count) {
  while (count--) {
    if (isgraph(*s++))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<IsEmptySubStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1165 <IsEmptySubStr+0x55>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <isgraph@plt>
cmp    $0x0,%rax
je     1160 <IsEmptySubStr+0x50>
movl   $0x0,-0x4(%rbp)
jmp    116c <IsEmptySubStr+0x5c>
jmp    111f <IsEmptySubStr+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsEmptySubStr>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
nopl   (%rax)
cmp    %ebx,%r15d
je     113c <IsEmptySubStr+0x2c>
movsbl (%r14,%rbx,1),%edi
call   1030 <isgraph@plt>
add    $0x1,%rbx
test   %rax,%rax
je     1120 <IsEmptySubStr+0x10>
xor    %eax,%eax
jmp    1141 <IsEmptySubStr+0x31>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @IsEmptySubStr(i8* nocapture %0, i32 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %0, %2 ], [ %9, %7 ]
%5 = phi i32 [ %1, %2 ], [ %8, %7 ]
%6 = icmp eq i32 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %3
%8 = add nsw i32 %5, -1
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = tail call i64 @isgraph(i32 %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %3, label %14
14: ; preds = %3, %7
%15 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %15
}
/* Variables and functions */
int vrna_bp_distance(char const *, char const *);
int bp_distance(const char *str1, const char *str2) {
  return vrna_bp_distance(str1, str2);
}


x86 assembly (clang, -O0):
<bp_distance>:
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 <vrna_bp_distance@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bp_distance>:
jmp    1030 <vrna_bp_distance@plt>

LLVM IR (-O0):
define i32 @bp_distance(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 @vrna_bp_distance(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @bp_distance(i8* %0, i8* %1) {
%3 = tail call i32 @vrna_bp_distance(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ UFILE;

/* Variables and functions */
int /*<<< orphan*/ u_fprintf(int /*<<< orphan*/ *, char *);
void print_header(UFILE *out) {
  u_fprintf(out,
            "<?xml version='1.1' encoding='UTF-8'?>\n<xhtml>\n<head/>\n<body>\n"
            "<h1>Atomic coordinates and thermal parameters</h1>\n");
}


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

x86 assembly (clang, -O2):
<print_header>:
lea    0xee9(%rip),%rsi
jmp    1030 <u_fprintf@plt>

LLVM IR (-O0):
@.str = [114 x i8] c"<?xml version='1.1' encoding='UTF-8'?>\0A<xhtml>\0A<head/>\0A<body>\0A<h1>Atomic coordinates and thermal parameters</h1>\0A\00"
define void @print_header(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @u_fprintf(i32* %3, i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [114 x i8] c"<?xml version='1.1' encoding='UTF-8'?>\0A<xhtml>\0A<head/>\0A<body>\0A<h1>Atomic coordinates and thermal parameters</h1>\0A\00"
define void @print_header(i32* %0) {
%2 = tail call i32 @u_fprintf(i32* %0, i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Mem_Free(void *, int, int /*<<< orphan*/, char const *,
                             int);
void CL_GameModule_MemFree(void *data, const char *filename, int fileline) {
  _Mem_Free(data, 8, 0, filename, fileline);
}


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

x86 assembly (clang, -O2):
<CL_GameModule_MemFree>:
mov    %edx,%r8d
mov    %rsi,%rcx
mov    $0x8,%esi
xor    %edx,%edx
jmp    1030 <_Mem_Free@plt>

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

LLVM IR (-O2):
define void @CL_GameModule_MemFree(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_Mem_Free(i8* %0, i32 8, i32 0, i8* %1, i32 %2)
ret void
}
void serverLogHexDump(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               122, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<serverLogHexDump>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x7a,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<serverLogHexDump>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x7a,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.serverLogHexDump = [17 x i8] c"serverLogHexDump\00"
define void @serverLogHexDump() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 122, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.serverLogHexDump, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.serverLogHexDump = [17 x i8] c"serverLogHexDump\00"
define void @serverLogHexDump() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 122, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.serverLogHexDump, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ run_command(char *, char **);
unsigned char *getcpuid() {
  unsigned char *cpuid = NULL;
  if (run_command("sudo cpuid", (char **)&cpuid)) {
    return cpuid;
  } else
    return NULL;
}


x86 assembly (clang, -O0):
<getcpuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x10(%rbp)
lea    0xed9(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <run_command@plt>
cmp    $0x0,%rax
je     1147 <getcpuid+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114f <getcpuid+0x3f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcpuid>:
push   %rax
movq   $0x0,(%rsp)
lea    0xee0(%rip),%rdi
mov    %rsp,%rsi
call   1030 <run_command@plt>
test   %rax,%rax
je     1131 <getcpuid+0x21>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"sudo cpuid\00"
define i8* @getcpuid() {
%1 = alloca i8*
%2 = alloca i8*
store i8* null, i8** %2
%3 = call i64 @run_command(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %2)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8*, i8** %2
store i8* %6, i8** %1
br label %8
7: ; preds = %0
store i8* null, i8** %1
br label %8
8: ; preds = %7, %5
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
@.str = [11 x i8] c"sudo cpuid\00"
define i8* @getcpuid() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%3 = call i64 @run_command(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1)
%4 = icmp eq i64 %3, 0
%5 = load i8*, i8** %1
%6 = select i1 %4, i8* null, i8* %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_sample_spec_init() {
  printf("NOT IMPLEMENTED:"
         "pa_sample_spec_init"
         "\n");
}


x86 assembly (clang, -O0):
<pa_sample_spec_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_sample_spec_init\00"
define i32 @pa_sample_spec_init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}