xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __two_constrained_args(int, int);
int /*<<< orphan*/ clang_analyzer_eval(int);
void test_constraints_on_multiple_args(int x, int y) {
  __two_constrained_args(x, y);
  clang_analyzer_eval(x == 1);
  clang_analyzer_eval(y == 1);
}


x86 assembly (clang, -O0):
<test_constraints_on_multiple_args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <__two_constrained_args@plt>
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_constraints_on_multiple_args>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <__two_constrained_args@plt>
xor    %edi,%edi
cmp    $0x1,%ebp
sete   %dil
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x1,%ebx
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @test_constraints_on_multiple_args(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @__two_constrained_args(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
%11 = call i32 @clang_analyzer_eval(i32 %10)
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 1
%14 = zext i1 %13 to i32
%15 = call i32 @clang_analyzer_eval(i32 %14)
ret void
}

LLVM IR (-O2):
define void @test_constraints_on_multiple_args(i32 %0, i32 %1) {
%3 = tail call i32 @__two_constrained_args(i32 %0, i32 %1)
%4 = icmp eq i32 %0, 1
%5 = zext i1 %4 to i32
%6 = tail call i32 @clang_analyzer_eval(i32 %5)
%7 = icmp eq i32 %1, 1
%8 = zext i1 %7 to i32
%9 = tail call i32 @clang_analyzer_eval(i32 %8)
ret void
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
double random_d(double range) {
  return (double)rand() * range / ((double)RAND_MAX + 1);
}


x86 assembly (clang, -O0):
<random_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    0x2eb3(%rip),%rax
cvtsi2sdq (%rax),%xmm1
movsd  0xebe(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_d>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0x2ebc(%rip),%rax
cvtsi2sdq (%rax),%xmm1
mulsd  (%rsp),%xmm0
addsd  0xec2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @random_d(double %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to double
%4 = fmul double %3, %0
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to double
%7 = fadd double %6, 1.000000e+00
%8 = fdiv double %4, %7
ret double %8
}
double *arrayElementTwo(double array[]) { return &array[2]; }


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

x86 assembly (clang, -O2):
<arrayElementTwo>:
lea    0x10(%rdi),%rax
ret

LLVM IR (-O0):
define double* @arrayElementTwo(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 2
ret double* %4
}

LLVM IR (-O2):
define double* @arrayElementTwo(double* readnone %0) {
%2 = getelementptr inbounds double, double* %0, i64 2
ret double* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
void genre_list_handler(int num, const char *name, void *cookie) {
  printf("%3d %s\n", num, name);
}


x86 assembly (clang, -O0):
<genre_list_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genre_list_handler>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%3d %s\0A\00"
define void @genre_list_handler(i32 %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
int imin(int x, int y) { return (x < y) ? x : y; }


x86 assembly (clang, -O0):
<imin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <imin+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <imin+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @imin(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ run(int);
int main() { run(30); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e,%edi
call   1030 <run@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @run(i32 30)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @run(i32 30)
ret i32 0
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int *malloc(int);
int /*<<< orphan*/ traversal(struct TreeNode *, int *, int *);
int *preorderTraversal(struct TreeNode *root, int *returnSize) {
  int *preorder = malloc(sizeof(int));
  int counter = 0;
  traversal(root, preorder, &counter);
  *returnSize = counter;
  return preorder;
}


x86 assembly (clang, -O0):
<preorderTraversal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <traversal@plt>
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preorderTraversal>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rdx
mov    %r15,%rdi
mov    %rax,%rsi
call   1040 <traversal@plt>
mov    0xc(%rsp),%eax
mov    %eax,(%r14)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32* @preorderTraversal(%struct.TreeNode* %0, i32* %1) {
%3 = alloca %struct.TreeNode*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %3
store i32* %1, i32** %4
%7 = call i32* @malloc(i32 4)
store i32* %7, i32** %5
store i32 0, i32* %6
%8 = load %struct.TreeNode*, %struct.TreeNode** %3
%9 = load i32*, i32** %5
%10 = call i32 @traversal(%struct.TreeNode* %8, i32* %9, i32* %6)
%11 = load i32, i32* %6
%12 = load i32*, i32** %4
store i32 %11, i32* %12
%13 = load i32*, i32** %5
ret i32* %13
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32* @preorderTraversal(%struct.TreeNode* %0, i32* nocapture writeonly %1) {
%3 = alloca i32
%4 = tail call i32* @malloc(i32 4)
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = call i32 @traversal(%struct.TreeNode* %0, i32* %4, i32* %3)
%7 = load i32, i32* %3
store i32 %7, i32* %1
ret i32* %4
}
/* Type definitions */
struct Graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ creator1(struct Graph *);
struct Graph *initGraph(int);
int /*<<< orphan*/ printGraphAll(struct Graph *);
int /*<<< orphan*/ printf(char *);
int main() {
  struct Graph *graph = initGraph(4);
  creator1(graph);
  printGraphAll(graph);
  printf("\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <initGraph@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <creator1@plt>
mov    -0x10(%rbp),%rdi
call   1060 <printGraphAll@plt>
lea    0xe8a(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1040 <initGraph@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <creator1@plt>
mov    %rbx,%rdi
call   1060 <printGraphAll@plt>
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.Graph = type { i32 }
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call %struct.Graph* @initGraph(i32 4)
%2 = tail call i32 @creator1(%struct.Graph* %1)
%3 = tail call i32 @printGraphAll(%struct.Graph* %1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int printstrlist(char **list) {
  int i;
  for (i = 0; list[i]; i++) {
    printf("%s\n", list[i]);
  }
  return i;
}


x86 assembly (clang, -O0):
<printstrlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     115c <printstrlist+0x4c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <printstrlist+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printstrlist>:
push   %r15
push   %r14
push   %rbx
mov    (%rdi),%rsi
test   %rsi,%rsi
je     1148 <printstrlist+0x38>
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed7(%rip),%r15
nopl   0x0(%rax)
mov    %r15,%rdi
call   1030 <printf@plt>
mov    0x8(%r14,%rbx,8),%rsi
add    $0x1,%rbx
test   %rsi,%rsi
jne    1130 <printstrlist+0x20>
jmp    114a <printstrlist+0x3a>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @printstrlist(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %4
12: ; preds = %4
%13 = trunc i64 %8 to i32
br label %14
14: ; preds = %12, %1
%15 = phi i32 [ 0, %1 ], [ %13, %12 ]
ret i32 %15
}
/* Variables and functions */
int hextodec(char *);
int strlen(char *);
int xstrtoi(char *hex) { return hextodec(hex + strlen(hex) - 1); }


x86 assembly (clang, -O0):
<xstrtoi>:
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   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
cltq
add    %rax,%rdi
add    $0xffffffffffffffff,%rdi
call   1040 <hextodec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrtoi>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
lea    (%rbx,%rax,1),%rdi
add    $0xffffffffffffffff,%rdi
pop    %rbx
jmp    1040 <hextodec@plt>

LLVM IR (-O0):
define i32 @xstrtoi(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 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 %6
%8 = getelementptr inbounds i8, i8* %7, i64 -1
%9 = call i32 @hextodec(i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @xstrtoi(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = tail call i32 @hextodec(i8* %5)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;

/* Variables and functions */
int is_blank_entry(u_int8_t *buf) {
  if (!buf[0] && !buf[1])
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_blank_entry>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    112f <is_blank_entry+0x2f>
mov    -0x10(%rbp),%rax
cmpl   $0x0,0x4(%rax)
jne    112f <is_blank_entry+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1136 <is_blank_entry+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_blank_entry>:
cmpl   $0x0,(%rdi)
jne    110b <is_blank_entry+0xb>
cmpl   $0x0,0x4(%rdi)
je     110e <is_blank_entry+0xe>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_blank_entry(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %4, %1
br label %9
9: ; preds = %4, %8
%10 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %10
}
void U_EMRFLATTENPATH_print(const char *contents) { (void)(contents); }


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

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

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

LLVM IR (-O2):
define void @U_EMRFLATTENPATH_print(i8* nocapture %0) {
ret void
}
unsigned char get_unsigned_char_max() {
  unsigned char max = ~0;
  return (max);
}


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

x86 assembly (clang, -O2):
<get_unsigned_char_max>:
mov    $0xff,%al
ret

LLVM IR (-O0):
define zeroext i8 @get_unsigned_char_max() {
%1 = alloca i8
store i8 -1, i8* %1
%2 = load i8, i8* %1
ret i8 %2
}

LLVM IR (-O2):
define zeroext i8 @get_unsigned_char_max() {
ret i8 -1
}
/* Variables and functions */
int errno;
int fprintf(int /*<<< orphan*/, char *, char const *, int, int, char *);
int /*<<< orphan*/ stderr;
char *strerror(int);
int print_err(const char *fname, int ret) {
  return fprintf(stderr, "%s() returned %d, errno = %d (%s).\n", fname, ret,
                 errno, strerror(errno));
}


x86 assembly (clang, -O0):
<print_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    %rax,%r9
lea    0xe85(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_err>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
mov    0x2eac(%rip),%rax
mov    (%rax),%ebp
mov    0x2e9b(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1040 <strerror@plt>
lea    0xeb3(%rip),%rsi
mov    %ebp,%edi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %ebx,%r8d
mov    %rax,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"%s() returned %d, errno = %d (%s).\0A\00"
@errno = global i32 0
define i32 @print_err(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = load i32, i32* @errno
%5 = tail call i8* @strerror(i32 %4)
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i32 %4, i8* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ g(int);
int /*<<< orphan*/ h(int);
int /*<<< orphan*/ r(int);
int main() {
  int a;
  f(a);
  h(a);
  {
    int a;
    g(a);
    r(a);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%edi
call   1050 <f@plt>
mov    -0x4(%rbp),%edi
call   1030 <h@plt>
mov    -0x8(%rbp),%edi
call   1060 <g@plt>
mov    -0x8(%rbp),%edi
call   1040 <r@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <f@plt>
call   1030 <h@plt>
call   1060 <g@plt>
call   1040 <r@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %1
%4 = call i32 @f(i32 %3)
%5 = load i32, i32* %1
%6 = call i32 @h(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @g(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @r(i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 undef)
%2 = tail call i32 @h(i32 undef)
%3 = tail call i32 @g(i32 undef)
%4 = tail call i32 @r(i32 undef)
ret i32 0
}
/* Type definitions */
struct sembuf {
  int sem_op;
  scalar_t__ sem_num;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int semop(int, struct sembuf *, int);
void sem_v(int semid) {
  struct sembuf sembuf_v;
  sembuf_v.sem_num = 0;
  sembuf_v.sem_op = 1;
  if (semop(semid, &sembuf_v, 1) == -1)
    printf("v operation is fail\n");
}


x86 assembly (clang, -O0):
<sem_v>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
jne    1160 <sem_v+0x40>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_v>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0x1,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
je     114e <sem_v+0x2e>
add    $0x18,%rsp
ret
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i64 }
@.str = [21 x i8] c"v operation is fail\0A\00"
define void @sem_v(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sembuf
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 0
store i32 1, i32* %5
%6 = load i32, i32* %2
%7 = call i32 @semop(i32 %6, %struct.sembuf* %3, i32 1)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i64 }
@str = [20 x i8] c"v operation is fail\00"
define void @sem_v(i32 %0) {
%2 = alloca %struct.sembuf
%3 = bitcast %struct.sembuf* %2 to i8*
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 0
store i32 1, i32* %5
%6 = call i32 @semop(i32 %0, %struct.sembuf* %2, i32 1)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}
int do_262() { return 262; }


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

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

LLVM IR (-O0):
define i32 @do_262() {
ret i32 262
}

LLVM IR (-O2):
define i32 @do_262() {
ret i32 262
}
/* Variables and functions */
int /*<<< orphan*/ fn1(int);
void fn2() {
  int b;
  fn1(!b);
}


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <fn1@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fn2() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
%6 = call i32 @fn1(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fn2() {
%1 = tail call i32 @fn1(i32 0)
ret void
}
/* Variables and functions */
int _get_cpsr();
int /*<<< orphan*/ _user_exec(unsigned char volatile *, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, unsigned int, int);
void user_exec_raw(volatile unsigned char *address) {
  if (0) {
    printf("Execution passing to %08x cpsr = %08x\r\n", (unsigned int)address,
           _get_cpsr());
  }
  _user_exec(address, 0, 0, 0);
  if (0) {
    printf("Execution returned from %08x cpsr = %08x\r\n",
           (unsigned int)address, _get_cpsr());
  }
}


x86 assembly (clang, -O0):
<user_exec_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <_user_exec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_exec_raw>:
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <_user_exec@plt>

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

LLVM IR (-O2):
define void @user_exec_raw(i8* %0) {
%2 = tail call i32 @_user_exec(i8* %0, i32 0, i32 0, i32 0)
ret void
}
void bar(long long int *p) {
  p[0] *= 2;
#pragma omp task in_reduction(* : p[0])
  p[0] *= 3;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
shl    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
imul   $0x3,(%rax),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    (%rdi),%rax
add    %rax,%rax
lea    (%rax,%rax,2),%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @bar(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 2
store i64 %6, i64* %4
%7 = load i64*, i64** %2
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = mul nsw i64 %9, 3
store i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @bar(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = mul nsw i64 %2, 6
store i64 %3, i64* %0
ret void
}
void NoDepAFunction() {}


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

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

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

LLVM IR (-O2):
define void @NoDepAFunction() {
ret void
}
int Hash(char *str) {
  unsigned int hash = 0;
  while (*str)
    hash = (hash << 1) + *str++;
  return hash % 317;
}


x86 assembly (clang, -O0):
<Hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <Hash+0x3e>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <Hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x13d,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1137 <Hash+0x37>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rcx,%rax,2),%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <Hash+0x10>
mov    %eax,%ecx
imul   $0x33af3e2f,%rcx,%rcx
shr    $0x26,%rcx
imul   $0x13d,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
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 %16
8: ; preds = %4
%9 = load i32, i32* %3
%10 = shl i32 %9, 1
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
%13 = load i8, i8* %11
%14 = sext i8 %13 to i32
%15 = add i32 %10, %14
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
%18 = urem i32 %17, 317
ret i32 %18
}

LLVM IR (-O2):
define i32 @Hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = shl i32 %6, 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %11, 317
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Type definitions */
typedef scalar_t__ uint16_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t sltiu(int32_t reg1, uint16_t kte) {
  if (reg1 < kte) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<sltiu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1127 <sltiu+0x27>
movq   $0x1,-0x8(%rbp)
jmp    112f <sltiu+0x2f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @sltiu(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void sleep_ms(int milliseconds) { usleep(milliseconds * 1000); }


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

x86 assembly (clang, -O2):
<sleep_ms>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @sleep_ms(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @sleep_ms(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
char const *netbsd_strptime(char const *, char const *, struct tm *);
const char *portable_strptime(const char *buf, const char *fmt, struct tm *tm) {
  return netbsd_strptime(buf, fmt, tm);
}


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

x86 assembly (clang, -O2):
<portable_strptime>:
jmp    1030 <netbsd_strptime@plt>

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @portable_strptime(i8* %0, i8* %1, %struct.tm* %2) {
%4 = tail call i8* @netbsd_strptime(i8* %0, i8* %1, %struct.tm* %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void tracer_trace_on(void *t) {
  fprintf(stdout, "TraceOn - A discontinuity in the trace stream\n");
}


x86 assembly (clang, -O0):
<tracer_trace_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tracer_trace_on>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [47 x i8] c"TraceOn - A discontinuity in the trace stream\0A\00"
define void @tracer_trace_on(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [47 x i8] c"TraceOn - A discontinuity in the trace stream\0A\00"
define void @tracer_trace_on(i8* nocapture readnone %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}
void posix_class_neg2NP_CNTRL() {}


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

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

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

LLVM IR (-O2):
define void @posix_class_neg2NP_CNTRL() {
ret void
}
Script_View_Init() {}


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

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

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

LLVM IR (-O2):
define i32 @Script_View_Init() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ evalfuns();
long evalumin();
scalar_t__ test(char *);
long evalunot() {
  if (test("!"))
    return ((long)!evalfuns());
  else
    return (evalumin());
}


x86 assembly (clang, -O0):
<evalunot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1050 <test@plt>
cmp    $0x0,%rax
je     116d <evalunot+0x3d>
mov    $0x0,%al
call   1030 <evalfuns@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
mov    %rax,-0x8(%rbp)
jmp    1178 <evalunot+0x48>
mov    $0x0,%al
call   1040 <evalumin@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evalunot>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <test@plt>
test   %rax,%rax
je     1155 <evalunot+0x25>
xor    %eax,%eax
call   1030 <evalfuns@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %rcx,%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <evalumin@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"!\00"
define i64 @evalunot() {
%1 = alloca i64
%2 = call i64 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = call i32 (...) @evalfuns()
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
store i64 %9, i64* %1
br label %12
10: ; preds = %0
%11 = call i64 (...) @evalumin()
store i64 %11, i64* %1
br label %12
12: ; preds = %10, %4
%13 = load i64, i64* %1
ret i64 %13
}

LLVM IR (-O2):
@.str = [2 x i8] c"!\00"
define i64 @evalunot() {
%1 = tail call i64 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 (...) @evalfuns()
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i64
br label %9
7: ; preds = %0
%8 = tail call i64 (...) @evalumin()
br label %9
9: ; preds = %7, %3
%10 = phi i64 [ %6, %3 ], [ %8, %7 ]
ret i64 %10
}
char *chrcat(s, c)
char *s, c;
{
  char *org;
  org = s;
  {
    while (*(s))
      (s)++;
  };
  *s++ = c;
  *s = '\0';
  return (org);
}


x86 assembly (clang, -O0):
<chrcat>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1134 <chrcat+0x34>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1116 <chrcat+0x16>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chrcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <chrcat+0x10>
mov    %sil,-0x1(%rcx)
movb   $0x0,(%rcx)
ret

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

LLVM IR (-O2):
define i8* @chrcat(i8* returned %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = trunc i32 %1 to i8
store i8 %9, i8* %4
store i8 0, i8* %7
ret i8* %0
}
double KPAtoMB(double KPA) {
  double MB = KPA * 10;
  return MB;
}


x86 assembly (clang, -O0):
<KPAtoMB>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<KPAtoMB>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @KPAtoMB(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 1.000000e+01
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @KPAtoMB(double %0) {
%2 = fmul double %0, 1.000000e+01
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ sim_printf(char *, char const *, int);
void sim_error_serial(const char *routine, int error) {
  sim_printf("Serial: %s fails with error %d\n", routine, error);
  return;
}


x86 assembly (clang, -O0):
<sim_error_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <sim_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sim_error_serial>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <sim_printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Serial: %s fails with error %d\0A\00"
define void @sim_error_serial(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @sim_printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Serial: %s fails with error %d\0A\00"
define void @sim_error_serial(i8* %0, i32 %1) {
%3 = tail call i32 @sim_printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
unsigned short ntohs(unsigned short x) {
  unsigned short n;
  unsigned char *p;
  n = x;
  p = (unsigned char *)&n;
  return (p[0] << 8) | p[1];
}


x86 assembly (clang, -O0):
<ntohs>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
mov    %ax,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohs>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @ntohs(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
%4 = alloca i8*
store i16 %0, i16* %2
%5 = load i16, i16* %2
store i16 %5, i16* %3
%6 = bitcast i16* %3 to i8*
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = or i32 %11, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @ntohs(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void ftnstop(char *msg) {
  if (msg != NULL)
    fprintf(stderr, "*** CDFLIB ERROR: %s\n", msg);
}


x86 assembly (clang, -O0):
<ftnstop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <ftnstop+0x30>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftnstop>:
test   %rdi,%rdi
je     112d <ftnstop+0x1d>
mov    %rdi,%rdx
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
jmp    1030 <fprintf@plt>
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"*** CDFLIB ERROR: %s\0A\00"
define void @ftnstop(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ isalnum(int);
int extalnum(int c) { return isalnum(c) || c == '_' || c >= 0200; }


x86 assembly (clang, -O0):
<extalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1151 <extalnum+0x41>
mov    $0x1,%al
cmpl   $0x5f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1151 <extalnum+0x41>
cmpl   $0x80,-0x4(%rbp)
setge  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extalnum>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%ebx
sete   %cl
cmp    $0x7f,%ebx
setg   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @extalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isalnum(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 95
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, 128
br label %12
12: ; preds = %9, %6, %1
%13 = phi i1 [ true, %6 ], [ true, %1 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @extalnum(i32 %0) {
%2 = tail call i64 @isalnum(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i32 %0, 95
%5 = or i1 %4, %3
%6 = icmp sgt i32 %0, 127
%7 = or i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint16_t;

/* Variables and functions */
__attribute__((always_)) uint16_t B_UNBUF16(void const *const buf) {
  return *(uint16_t const *)buf;
}


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

x86 assembly (clang, -O2):
<B_UNBUF16>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @B_UNBUF16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ getDiscardedElementsLock();
int /*<<< orphan*/ releaseLock(int /*<<< orphan*/);
void unlockDiscardedElements(void) { releaseLock(getDiscardedElementsLock()); }


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

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

LLVM IR (-O0):
define void @unlockDiscardedElements() {
%1 = call i32 (...) @getDiscardedElementsLock()
%2 = call i32 @releaseLock(i32 %1)
ret void
}

LLVM IR (-O2):
define void @unlockDiscardedElements() {
%1 = tail call i32 (...) @getDiscardedElementsLock()
%2 = tail call i32 @releaseLock(i32 %1)
ret void
}
/* Variables and functions */
unsigned long long _bzhi_u64(unsigned long long, int);
unsigned long long f34(unsigned long long x) { return _bzhi_u64(x, 321); }


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

x86 assembly (clang, -O2):
<f34>:
mov    $0x141,%esi
jmp    1030 <_bzhi_u64@plt>

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

LLVM IR (-O2):
define i64 @f34(i64 %0) {
%2 = tail call i64 @_bzhi_u64(i64 %0, i32 321)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Concrete contains gravel and cement.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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 = [38 x i8] c"Concrete contains gravel and cement.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [37 x i8] c"Concrete contains gravel and cement.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 0
}