xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int const, int, int const);
int main(void) {
  int x1 = 1, x2 = 2, x3 = 3, x4 = 4;
  int *p1;
  p1 = &x1;
  *p1 = 10;
  const int *p2;
  p2 = &x2;
  int *const p3 = &x3;
  *p3 = 30;
  const int *const p4 = &x4;
  printf("%d %d %d %d", *p1, *p2, *p3, *p4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x4,-0x10(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0xa,(%rax)
lea    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x1e,(%rax)
lea    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    -0x30(%rbp),%rax
mov    (%rax),%r8d
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
mov    $0x2,%edx
mov    $0x1e,%ecx
mov    $0x4,%r8d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 10, i32 2, i32 30, i32 4)
ret i32 0
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void SHAMD5DataLengthSet(uint32_t ui32Base, uint32_t ui32Length) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000048))) = ui32Length;
}


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

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

LLVM IR (-O0):
define void @SHAMD5DataLengthSet(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 = add i64 %6, 72
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @SHAMD5DataLengthSet(i64 %0, i64 %1) {
%3 = add i64 %0, 72
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Type definitions */
struct socket {
  int dummy;
};

/* Variables and functions */
int EOPNOTSUPP;
int /*<<< orphan*/ so_needign(struct socket *, _Bool);
int so_pipeign(struct socket *so, _Bool rdonly) {
  if (!so_needign(so, rdonly))
    return 0;
  return EOPNOTSUPP;
}


x86 assembly (clang, -O0):
<so_pipeign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
and    $0x1,%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
call   1030 <so_needign@plt>
cmp    $0x0,%eax
jne    114a <so_pipeign+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1156 <so_pipeign+0x46>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<so_pipeign>:
push   %rax
call   1030 <so_needign@plt>
test   %eax,%eax
je     1123 <so_pipeign+0x13>
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.socket = type { i32 }
@EOPNOTSUPP = global i32 0
define i32 @so_pipeign(%struct.socket* %0, i1 zeroext %1) {
%3 = alloca i32
%4 = alloca %struct.socket*
%5 = alloca i8
store %struct.socket* %0, %struct.socket** %4
%6 = zext i1 %1 to i8
store i8 %6, i8* %5
%7 = load %struct.socket*, %struct.socket** %4
%8 = load i8, i8* %5
%9 = trunc i8 %8 to i1
%10 = call i32 @so_needign(%struct.socket* %7, i1 zeroext %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 0, i32* %3
br label %15
13: ; preds = %2
%14 = load i32, i32* @EOPNOTSUPP
store i32 %14, i32* %3
br label %15
15: ; preds = %13, %12
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.socket = type { i32 }
@EOPNOTSUPP = global i32 0
define i32 @so_pipeign(%struct.socket* %0, i1 zeroext %1) {
%3 = tail call i32 @so_needign(%struct.socket* %0, i1 zeroext %1)
%4 = icmp eq i32 %3, 0
%5 = load i32, i32* @EOPNOTSUPP
%6 = select i1 %4, i32 0, i32 %5
ret i32 %6
}
int IsPrime(int number) {
  int i;
  for (i = 2; i < number; i++) {
    if (number % i == 0 && i != number)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<IsPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1155 <IsPrime+0x55>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1142 <IsPrime+0x42>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1142 <IsPrime+0x42>
movl   $0x0,-0x4(%rbp)
jmp    115c <IsPrime+0x5c>
jmp    1147 <IsPrime+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <IsPrime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsPrime>:
mov    $0x1,%ecx
cmp    $0x3,%edi
jl     1120 <IsPrime+0x20>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1123 <IsPrime+0x23>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <IsPrime+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @IsPrime(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %5, label %10
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 2, %1 ]
%7 = srem i32 %0, %6
%8 = icmp eq i32 %7, 0
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %5, %3, %1
%11 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int, int, char);
int main(void) {
  for (int i = 65; i < 65 + 26; i++)
    printf("%c  %d    %3d  %c\n", (char)i, i, i + 32, (char)(i + 32));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x41,-0x8(%rbp)
cmpl   $0x5b,-0x8(%rbp)
jge    1167 <main+0x57>
mov    -0x8(%rbp),%eax
mov    %al,%sil
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
add    $0x20,%ecx
mov    -0x8(%rbp),%eax
add    $0x20,%eax
lea    0xeb4(%rip),%rdi
movsbl %sil,%esi
movsbl %al,%r8d
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x41,%ebx
lea    0xee0(%rip),%r14
lea    0x20(%rbx),%ecx
movsbl %bl,%esi
movsbl %cl,%r8d
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x5b,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"%c %d %3d %c\0A\00"
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ 65, %0 ], [ %8, %2 ]
%4 = trunc i32 %3 to i8
%5 = add nuw nsw i32 %3, 32
%6 = trunc i32 %5 to i8
%7 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8 signext %4, i32 %3, i32 %5, i8 signext %6)
%8 = add nuw nsw i32 %3, 1
%9 = icmp eq i32 %8, 91
br i1 %9, label %1, label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void mkdir(char param[]) {
  printf("mkdir command \n");
  printf("parameters = %s \n", param);
  return;
}


x86 assembly (clang, -O0):
<mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdir>:
push   %rbx
mov    %rdi,%rbx
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [18 x i8] c"parameters = %s \0A\00"
@str = [15 x i8] c"mkdir command \00"
define void @mkdir(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int ordering_lossy_gt_2(void) {
  return ((int)-(((int)-(
      ((int)0x37EE) << (8 * (((!!(((!!(sizeof(int))) * ((sizeof(int)) - 1)))) *
                              ((((!!(sizeof(int))) * ((sizeof(int)) - 1))) -
                               1))))))));
}


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

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

LLVM IR (-O0):
define i32 @ordering_lossy_gt_2() {
ret i32 938344448
}

LLVM IR (-O2):
define i32 @ordering_lossy_gt_2() {
ret i32 938344448
}
/* Variables and functions */
int /*<<< orphan*/ spotrf_(char *, int *, float *, int *, int *);
void clapack_spotrf(char uplo, int n, float *a, int lda, int *info) {
  spotrf_(&uplo, &n, a, &lda, info);
}


x86 assembly (clang, -O0):
<clapack_spotrf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    -0x1(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x14(%rbp),%rcx
call   1030 <spotrf_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clapack_spotrf>:
sub    $0x18,%rsp
mov    %dil,0xf(%rsp)
mov    %esi,0x14(%rsp)
mov    %ecx,0x10(%rsp)
lea    0xf(%rsp),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rcx
call   1030 <spotrf_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @clapack_spotrf(i8 signext %0, i32 %1, float* %2, i32 %3, i32* %4) {
%6 = alloca i8
%7 = alloca i32
%8 = alloca float*
%9 = alloca i32
%10 = alloca i32*
store i8 %0, i8* %6
store i32 %1, i32* %7
store float* %2, float** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%11 = load float*, float** %8
%12 = load i32*, i32** %10
%13 = call i32 @spotrf_(i8* %6, i32* %7, float* %11, i32* %9, i32* %12)
ret void
}

LLVM IR (-O2):
define void @clapack_spotrf(i8 signext %0, i32 %1, float* %2, i32 %3, i32* %4) {
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %6
store i32 %1, i32* %7
store i32 %3, i32* %8
%9 = call i32 @spotrf_(i8* %6, i32* %7, float* %2, i32* %8, i32* %4)
ret void
}
/* Variables and functions */
char *TAG(char *, int /*<<< orphan*/, int, int, int, char *);
char *P(char *str, int ilev) { return TAG("p", 0, 1, 1, ilev, str); }


x86 assembly (clang, -O0):
<P>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%r8d
mov    -0x8(%rbp),%r9
lea    0xed2(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <TAG@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<P>:
mov    %esi,%r8d
mov    %rdi,%r9
lea    0xee3(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <TAG@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"p\00"
define i8* @P(i8* %0, i32 %1) {
%3 = tail call i8* @TAG(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i32 1, i32 %1, i8* %0)
ret i8* %3
}
void rop3_121_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = *D | S;
  stk3 = T & stk4;
  stk2 = S ^ stk3;
  stk1 = *D ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


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

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

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

LLVM IR (-O2):
define void @rop3_121_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %1
%6 = and i8 %5, %2
%7 = xor i8 %4, %1
%8 = xor i8 %7, %6
%9 = xor i8 %8, -1
store i8 %9, i8* %0
ret void
}
int test_imm_1Dint8_reg(signed char val) {
  return ((val) & (-0x1D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_1Dint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -29
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_1Dint8_reg(i8 signext %0) {
%2 = and i8 %0, -29
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
bool ind_str_eq(const void *vstr1, const void *vstr2) {
  const char *str1 = *(const char **)vstr1;
  const char *str2 = *(const char **)vstr2;
  return strcmp(str1, str2) == 0;
}


x86 assembly (clang, -O0):
<ind_str_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ind_str_eq>:
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ind_str_eq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = call i64 @strcmp(i8* %13, i8* %14)
%16 = icmp eq i64 %15, 0
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @ind_str_eq(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %4, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ strtod(char *, char **);
int isNumericString(char *s) {
  char *end;
  strtod(s, &end);
  return (end != s && *end == 0);
}


x86 assembly (clang, -O0):
<isNumericString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <strtod@plt>
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x11(%rbp)
je     114c <isNumericString+0x3c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumericString>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <strtod@plt>
mov    0x8(%rsp),%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
je     1134 <isNumericString+0x24>
cmpb   $0x0,(%rcx)
sete   %al
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isNumericString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strtod(i8* %4, i8** %3)
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = icmp ne i8* %6, %7
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 0
br label %14
14: ; preds = %9, %1
%15 = phi i1 [ false, %1 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isNumericString(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @strtod(i8* %0, i8** %2)
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, %0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %1
%12 = phi i32 [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
unsigned char ASCII_TO_BCD(unsigned char ascii_text[2]) {
  unsigned char bcd_value;
  ascii_text[1] -= 0x30;
  ascii_text[0] -= 0x30;
  ascii_text[0] = (unsigned char)ascii_text[0] << 4;
  bcd_value = (unsigned char)ascii_text[0] | ascii_text[1];
  return bcd_value;
}


x86 assembly (clang, -O0):
<ASCII_TO_BCD>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
sub    $0x30,%ecx
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
sub    $0x30,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x4,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASCII_TO_BCD>:
mov    (%rdi),%al
mov    0x1(%rdi),%cl
add    $0xd0,%cl
mov    %cl,0x1(%rdi)
shl    $0x4,%al
mov    %al,(%rdi)
or     %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @ASCII_TO_BCD(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = sub nsw i32 %7, 48
%9 = trunc i32 %8 to i8
store i8 %9, i8* %5
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = sub nsw i32 %13, 48
%15 = trunc i32 %14 to i8
store i8 %15, i8* %11
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 4
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %2
%23 = getelementptr inbounds i8, i8* %22, i64 0
store i8 %21, i8* %23
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = load i8*, i8** %2
%29 = getelementptr inbounds i8, i8* %28, i64 1
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = or i32 %27, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %3
%34 = load i8, i8* %3
ret i8 %34
}

LLVM IR (-O2):
define zeroext i8 @ASCII_TO_BCD(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = add i8 %3, -48
store i8 %4, i8* %2
%5 = load i8, i8* %0
%6 = shl i8 %5, 4
store i8 %6, i8* %0
%7 = or i8 %6, %4
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ latest_prune_join(int *, int);
void call_latest_prune_join_2_Good() {
  int a[5];
  latest_prune_join(a, 10);
}


x86 assembly (clang, -O0):
<call_latest_prune_join_2_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
mov    $0xa,%esi
call   1030 <latest_prune_join@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_latest_prune_join_2_Good>:
sub    $0x18,%rsp
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <latest_prune_join@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @call_latest_prune_join_2_Good() {
%1 = alloca [5 x i32]
%2 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%3 = call i32 @latest_prune_join(i32* %2, i32 10)
ret void
}

LLVM IR (-O2):
define void @call_latest_prune_join_2_Good() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @latest_prune_join(i32* %3, i32 10)
ret void
}
void GC_words_allocd_at_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @GC_words_allocd_at_reset() {
ret void
}
int sum(int n) {
  if (n == 0)
    return n;
  else
    return n + sum(n - 1);
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1130 <sum+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <sum+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <sum@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
test   %edi,%edi
je     1119 <sum+0x19>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sum(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ get_setup_data();
int /*<<< orphan*/ sudoku_solve(int /*<<< orphan*/);
int /*<<< orphan*/ write_native_message(char *, char *);
int main() {
  while (1) {
    write_native_message("status", "ready");
    sudoku_solve(get_setup_data());
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xeba(%rip),%rsi
call   1030 <write_native_message@plt>
mov    $0x0,%al
call   1040 <get_setup_data@plt>
mov    %eax,%edi
call   1050 <sudoku_solve@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%r14
lea    0xec5(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <write_native_message@plt>
xor    %eax,%eax
call   1040 <get_setup_data@plt>
mov    %eax,%edi
call   1050 <sudoku_solve@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [7 x i8] c"status\00"
@.str.1 = [6 x i8] c"ready\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @write_native_message(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @get_setup_data()
%5 = call i32 @sudoku_solve(i32 %4)
br label %2
}

LLVM IR (-O2):
@.str = [7 x i8] c"status\00"
@.str.1 = [6 x i8] c"ready\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @write_native_message(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @get_setup_data()
%4 = tail call i32 @sudoku_solve(i32 %3)
br label %1
}
/* Variables and functions */
int func1();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf("Hello, world!\n");
  printf("%d\n", func1());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @func1()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
int main(void) {
  int x = 5;
  *((int **)&x);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int is_ordering_success(int ordering) {
  return (((ordering) !=
           (((int)-(((int)0x37ED)
                    << (8 * (((!!(((!!(sizeof(int))) * ((sizeof(int)) - 1)))) *
                              ((((!!(sizeof(int))) * ((sizeof(int)) - 1))) -
                               1)))))))) &&
          ((ordering) !=
           (((int)-(((int)0x37EE)
                    << (8 * (((!!(((!!(sizeof(int))) * ((sizeof(int)) - 1)))) *
                              ((((!!(sizeof(int))) * ((sizeof(int)) - 1))) -
                               1)))))))));
}


x86 assembly (clang, -O0):
<is_ordering_success>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xc8130000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1126 <is_ordering_success+0x26>
cmpl   $0xc8120000,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ordering_success>:
and    $0xfffeffff,%edi
xor    %eax,%eax
cmp    $0xc8120000,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @is_ordering_success(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, -938278912
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, -938344448
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_ordering_success(i32 %0) {
%2 = and i32 %0, -65537
%3 = icmp ne i32 %2, -938344448
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct tcmi_rpc {
  int dummy;
};

/* Variables and functions */
long tcmi_rpc_do(struct tcmi_rpc *, unsigned int, long *);
long tcmi_rpc_call1(struct tcmi_rpc *self, unsigned int rpc_num, long param1) {
  long parameters[6] = {0, 0, 0, 0, 0, 0};
  parameters[0] = param1;
  return tcmi_rpc_do(self, rpc_num, parameters);
}


x86 assembly (clang, -O0):
<tcmi_rpc_call1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x50(%rbp),%rdx
call   1040 <tcmi_rpc_do@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcmi_rpc_call1>:
sub    $0x38,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
mov    %rdx,(%rsp)
mov    %rsp,%rdx
call   1030 <tcmi_rpc_do@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
%struct.tcmi_rpc = type { i32 }
define i64 @tcmi_rpc_call1(%struct.tcmi_rpc* %0, i32 %1, i64 %2) {
%4 = alloca %struct.tcmi_rpc*
%5 = alloca i32
%6 = alloca i64
%7 = alloca [6 x i64]
store %struct.tcmi_rpc* %0, %struct.tcmi_rpc** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%8 = bitcast [6 x i64]* %7 to i8*
%9 = load i64, i64* %6
%10 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i64 0, i64 0
store i64 %9, i64* %10
%11 = load %struct.tcmi_rpc*, %struct.tcmi_rpc** %4
%12 = load i32, i32* %5
%13 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i64 0, i64 0
%14 = call i64 @tcmi_rpc_do(%struct.tcmi_rpc* %11, i32 %12, i64* %13)
ret i64 %14
}

LLVM IR (-O2):
%struct.tcmi_rpc = type { i32 }
define i64 @tcmi_rpc_call1(%struct.tcmi_rpc* %0, i32 %1, i64 %2) {
%4 = alloca [6 x i64]
%5 = bitcast [6 x i64]* %4 to i8*
%6 = getelementptr inbounds [6 x i64], [6 x i64]* %4, i64 0, i64 0
store i64 %2, i64* %6
%7 = call i64 @tcmi_rpc_do(%struct.tcmi_rpc* %0, i32 %1, i64* %6)
ret i64 %7
}
int g_sck_vsock_bind(int sck, const char *port) { return -1; }


x86 assembly (clang, -O0):
<g_sck_vsock_bind>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @g_sck_vsock_bind(i32 %0, i8* nocapture readnone %1) {
ret i32 -1
}
int main() {
  int i = 4;
  int *myPointer = &i;
  printf("%u\n%u", myPointer, &i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x4,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rdx
mov    %rdx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%u\0A%u\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 4, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %1)
ret i32 0
}
/* Type definitions */
struct single_row_lut {
  int dummy;
};

/* Variables and functions */
int EINVAL;
int interpolate_fcc(struct single_row_lut *fcc_temp_lut, int batt_temp) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<interpolate_fcc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolate_fcc>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.single_row_lut = type { i32 }
@EINVAL = global i32 0
define i32 @interpolate_fcc(%struct.single_row_lut* %0, i32 %1) {
%3 = alloca %struct.single_row_lut*
%4 = alloca i32
store %struct.single_row_lut* %0, %struct.single_row_lut** %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
%struct.single_row_lut = type { i32 }
@EINVAL = global i32 0
define i32 @interpolate_fcc(%struct.single_row_lut* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
int other(char c) {
  char valid[] = {'+', '-', '*', '/', '%', '>', '<', '=', '!', '&', '|'};
  int i;
  for (i = 0; i < sizeof(valid); i++) {
    if (valid[i] == c)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<other>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeec(%rip),%ax
mov    %ax,-0x8(%rbp)
mov    0xee4(%rip),%al
mov    %al,-0x6(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0xb,%rax
jae    1172 <other+0x72>
movslq -0x14(%rbp),%rax
movsbl -0x10(%rbp,%rax,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    115f <other+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1179 <other+0x79>
jmp    1164 <other+0x64>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1130 <other+0x30>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<other>:
add    $0xdf,%dil
cmp    $0x5b,%dil
ja     1124 <other+0x24>
mov    $0x1,%eax
movzbl %dil,%ecx
lea    0xee6(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@__const.other.valid = [11 x i8] c"+-*/%><=!&|"
define i32 @other(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca [11 x i8]
%5 = alloca i32
store i8 %0, i8* %3
%6 = bitcast [11 x i8]* %4 to i8*
store i32 0, i32* %5
br label %7
7: ; preds = %22, %1
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = icmp ult i64 %9, 11
br i1 %10, label %11, label %25
11: ; preds = %7
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 %13
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %16, %18
br i1 %19, label %20, label %21
20: ; preds = %11
store i32 1, i32* %2
br label %26
21: ; preds = %11
br label %22
22: ; preds = %21
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %7
25: ; preds = %7
store i32 0, i32* %2
br label %26
26: ; preds = %25, %20
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @other(i8 signext %0) {
switch i8 %0, label %2 [
i8 43, label %3
i8 45, label %3
i8 42, label %3
i8 47, label %3
i8 37, label %3
i8 62, label %3
i8 60, label %3
i8 61, label %3
i8 33, label %3
i8 38, label %3
i8 124, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 1, %1 ], [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("Hello World!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hello World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xaf() {
  Assert_real((isgraph(175) == 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_isgraph.c",
              880, ("isgraph should be 0 for 0xaf"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xaf>:
push   %rax
mov    $0xaf,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x370,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xaf\00"
define void @t_isgraph_0xaf() {
%1 = call i64 @isgraph(i32 175)
%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 880, i8* getelementptr inbounds ([29 x i8], [29 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xaf\00"
define void @t_isgraph_0xaf() {
%1 = tail call i64 @isgraph(i32 175)
%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 880, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ process_msg();
void *thread_proc(void *arg) {
  process_msg();
  return (void *)1;
}


x86 assembly (clang, -O0):
<thread_proc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <process_msg@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_proc>:
push   %rax
xor    %eax,%eax
call   1030 <process_msg@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @thread_proc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @process_msg()
ret i8* inttoptr (i64 1 to i8*)
}

LLVM IR (-O2):
define i8* @thread_proc(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @process_msg()
ret i8* inttoptr (i64 1 to i8*)
}
float Square(float x) { return x * x; }


x86 assembly (clang, -O0):
<Square>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Square>:
mulss  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define float @Square(float %0) {
%2 = fmul float %0, %0
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void fclosep(FILE **fp) {
  if (*fp)
    fclose(*fp);
  *fp = NULL;
}


x86 assembly (clang, -O0):
<fclosep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <fclosep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <fclose@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fclosep>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1121 <fclosep+0x11>
call   1030 <fclose@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @fclosep(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %4, %1
store i32* null, i32** %0
ret void
}
/* Variables and functions */
scalar_t__ anna_blob_payload(void *);
void *anna_blob_get(void *blob) { return *(void **)anna_blob_payload(blob); }


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

x86 assembly (clang, -O2):
<anna_blob_get>:
push   %rax
call   1030 <anna_blob_payload@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @anna_blob_get(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @anna_blob_payload(i8* %3)
%5 = inttoptr i64 %4 to i8**
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
define i8* @anna_blob_get(i8* %0) {
%2 = tail call i64 @anna_blob_payload(i8* %0)
%3 = inttoptr i64 %2 to i8**
%4 = load i8*, i8** %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ sys_domicrosleep(int, int);
void sys_microsleep(int microsec) { sys_domicrosleep(microsec, 1); }


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

x86 assembly (clang, -O2):
<sys_microsleep>:
mov    $0x1,%esi
jmp    1030 <sys_domicrosleep@plt>

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

LLVM IR (-O2):
define void @sys_microsleep(i32 %0) {
%2 = tail call i32 @sys_domicrosleep(i32 %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void bar() { printf("bar()\n"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"bar()\0A\00"
define void @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"bar()\00"
define void @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
void ble_rsp_sm_whitelist_bonds(
    const struct ble_msg_sm_whitelist_bonds_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_sm_whitelist_bonds_rsp_t = type opaque
define void @ble_rsp_sm_whitelist_bonds(%struct.ble_msg_sm_whitelist_bonds_rsp_t* nocapture %0) {
ret void
}