xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr, "Usage: fsamin [-ip d/s] [-op d/s] [-silent] [-v] [-l/-h] "
                  "[-s] [filename]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<badusage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [74 x i8] c"Usage: fsamin [-ip d/s] [-op d/s] [-silent] [-v] [-l/-h] [-s] [filename]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [74 x i8] c"Usage: fsamin [-ip d/s] [-op d/s] [-silent] [-v] [-l/-h] [-s] [filename]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int ft_str_is_lowercase(char *str) {
  char *tmp;
  tmp = str;
  while (*tmp) {
    if (*tmp < 'a' || *tmp > 'z')
      return (0);
    tmp++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_str_is_lowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <ft_str_is_lowercase+0x5a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     113d <ft_str_is_lowercase+0x3d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jle    1149 <ft_str_is_lowercase+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1161 <ft_str_is_lowercase+0x61>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <ft_str_is_lowercase+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_lowercase>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <ft_str_is_lowercase+0x23>
add    $0x1,%rdi
nop
add    $0x85,%cl
cmp    $0xe5,%cl
jbe    1124 <ft_str_is_lowercase+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_str_is_lowercase+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_str_is_lowercase(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
br label %6
6: ; preds = %21, %1
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %24
10: ; preds = %6
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp slt i32 %13, 97
br i1 %14, label %20, label %15
15: ; preds = %10
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sgt i32 %18, 122
br i1 %19, label %20, label %21
20: ; preds = %15, %10
store i32 0, i32* %2
br label %25
21: ; preds = %15
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %4
br label %6
24: ; preds = %6
store i32 1, i32* %2
br label %25
25: ; preds = %24, %20
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @ft_str_is_lowercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -123
%11 = icmp ult i8 %10, -26
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *uwsgi_concat2(char *, char *);
int /*<<< orphan*/ uwsgi_log(char *);
int uwsgi_hook_print(char *arg) {
  char *line = uwsgi_concat2(arg, "\n");
  uwsgi_log(line);
  free(line);
  return 0;
}


x86 assembly (clang, -O0):
<uwsgi_hook_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <uwsgi_concat2@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <uwsgi_log@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_hook_print>:
push   %rbx
lea    0xec8(%rip),%rsi
call   1050 <uwsgi_concat2@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <uwsgi_log@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @uwsgi_hook_print(i8* %0) {
%2 = tail call i8* @uwsgi_concat2(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @uwsgi_log(i8* %2)
%4 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ compact(char *, char *);
int /*<<< orphan*/ parse(char *, char *);
int tohtml(char *, char *, char *, size_t);
int sanitize_fast(char *restrict src, char *restrict dst, size_t srcsize,
                  size_t dstsize, char *restrict attrs) {
  parse(src, attrs);
  compact(src, attrs);
  int ret = tohtml(src, attrs, dst, dstsize);
  return ret;
}


x86 assembly (clang, -O0):
<sanitize_fast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1050 <parse@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <compact@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <tohtml@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sanitize_fast>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r12
mov    %rcx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %r8,%rsi
call   1050 <parse@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <compact@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <tohtml@plt>

LLVM IR (-O0):
define i32 @sanitize_fast(i8* noalias %0, i8* noalias %1, i64 %2, i64 %3, i8* noalias %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i8* %4, i8** %10
%12 = load i8*, i8** %6
%13 = load i8*, i8** %10
%14 = call i32 @parse(i8* %12, i8* %13)
%15 = load i8*, i8** %6
%16 = load i8*, i8** %10
%17 = call i32 @compact(i8* %15, i8* %16)
%18 = load i8*, i8** %6
%19 = load i8*, i8** %10
%20 = load i8*, i8** %7
%21 = load i64, i64* %9
%22 = call i32 @tohtml(i8* %18, i8* %19, i8* %20, i64 %21)
store i32 %22, i32* %11
%23 = load i32, i32* %11
ret i32 %23
}

LLVM IR (-O2):
define i32 @sanitize_fast(i8* noalias %0, i8* noalias %1, i64 %2, i64 %3, i8* noalias %4) {
%6 = tail call i32 @parse(i8* %0, i8* %4)
%7 = tail call i32 @compact(i8* %0, i8* %4)
%8 = tail call i32 @tohtml(i8* %0, i8* %4, i8* %1, i64 %3)
ret i32 %8
}
/* Variables and functions */
scalar_t__ MyMalloc(long, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, long);
double *NewVector(long n) {
  double *v;
  v = (double *)MyMalloc(n * sizeof(double), 888);
  if (!v && n) {
    printf("Out of memory: NewVector(%ld)\n", n);
    exit(0);
  }
  return (v);
}


x86 assembly (clang, -O0):
<NewVector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
shl    $0x3,%rdi
mov    $0x378,%esi
call   1040 <MyMalloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117f <NewVector+0x4f>
cmpq   $0x0,-0x8(%rbp)
je     117f <NewVector+0x4f>
mov    -0x8(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NewVector>:
push   %rbx
mov    %rdi,%rbx
lea    0x0(,%rdi,8),%rdi
mov    $0x378,%esi
call   1040 <MyMalloc@plt>
test   %rbx,%rbx
je     1150 <NewVector+0x20>
test   %rax,%rax
je     1152 <NewVector+0x22>
pop    %rbx
ret
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Out of memory: NewVector(%ld)\0A\00"
define double* @NewVector(i64 %0) {
%2 = alloca i64
%3 = alloca double*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = mul i64 %4, 8
%6 = call i64 @MyMalloc(i64 %5, i32 888)
%7 = inttoptr i64 %6 to double*
store double* %7, double** %3
%8 = load double*, double** %3
%9 = icmp ne double* %8, null
br i1 %9, label %17, label %10
10: ; preds = %1
%11 = load i64, i64* %2
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i64, i64* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %14)
%16 = call i32 @exit(i32 0)
unreachable
17: ; preds = %10, %1
%18 = load double*, double** %3
ret double* %18
}

LLVM IR (-O2):
@.str = [31 x i8] c"Out of memory: NewVector(%ld)\0A\00"
define double* @NewVector(i64 %0) {
%2 = shl i64 %0, 3
%3 = tail call i64 @MyMalloc(i64 %2, i32 888)
%4 = icmp eq i64 %3, 0
%5 = icmp ne i64 %0, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %0)
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %1
%11 = inttoptr i64 %3 to double*
ret double* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fs_close(int /*<<< orphan*/ *);
char *fs_fnread(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ *fs_open(char *, char *);
char *fs_nread(char *path, int len) {
  FILE *file = fs_open(path, "r");
  char *buffer = fs_fnread(file, len);
  fs_close(file);
  return buffer;
}


x86 assembly (clang, -O0):
<fs_nread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <fs_open@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <fs_fnread@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <fs_close@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_nread>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
lea    0xec4(%rip),%rsi
call   1030 <fs_open@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1050 <fs_fnread@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1040 <fs_close@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i8* @fs_nread(i8* %0, i32 %1) {
%3 = tail call i32* @fs_open(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i8* @fs_fnread(i32* %3, i32 %1)
%5 = tail call i32 @fs_close(i32* %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void geom_grad(const double *prim, double *grad, const double *xp,
               const double *xm, double PLM, int dim, int LR) {
  printf("Geometric gradient called on non-geometric boundary.\n");
  printf("--Cartesian setup has NO geometric boundaries.\n");
  return;
}


x86 assembly (clang, -O0):
<geom_grad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_grad>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf11(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"Geometric gradient called on non-geometric boundary.\0A\00"
@.str.1 = [48 x i8] c"--Cartesian setup has NO geometric boundaries.\0A\00"
define void @geom_grad(double* %0, double* %1, double* %2, double* %3, double %4, i32 %5, i32 %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
store double* %0, double** %8
store double* %1, double** %9
store double* %2, double** %10
store double* %3, double** %11
store double %4, double* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [53 x i8] c"Geometric gradient called on non-geometric boundary.\00"
@str.2 = [47 x i8] c"--Cartesian setup has NO geometric boundaries.\00"
define void @geom_grad(double* nocapture readnone %0, double* nocapture readnone %1, double* nocapture readnone %2, double* nocapture readnone %3, double %4, i32 %5, i32 %6) {
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int addArray(int *, int);
int /*<<< orphan*/ printf(char *, int);
main() {
  int data[] = {4, 3, 2, 1, 0, 5, 6, 7, 8, 9};
  int size = sizeof(data) / sizeof(data[0]);
  printf("Pointer Version: sum is %d\n", addArray(data, size));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
movl   $0xa,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1050 <addArray@plt>
mov    %eax,%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <addArray@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.data = [10 x i32] [i32 4, i32 3, i32 2, i32 1, i32 0, i32 5, i32 6, i32 7, i32 8, i32 9]
@.str = [28 x i8] c"Pointer Version: sum is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [10 x i32]* %2 to i8*
store i32 10, i32* %3
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @addArray(i32* %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.data = [10 x i32] [i32 4, i32 3, i32 2, i32 1, i32 0, i32 5, i32 6, i32 7, i32 8, i32 9]
@.str = [28 x i8] c"Pointer Version: sum is %d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @addArray(i32* %3, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef int gid_t;

/* Variables and functions */
int /*<<< orphan*/ setgid(int);
int main() {
  gid_t gid = 100;
  setgid(gid);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @setgid(i32 100)
ret i32 0
}
/* Variables and functions */
int strlen(char *);
int strncasecmp(char *, char *, unsigned int);
int strendcasecmp(char *str, char *end) {
  unsigned int elen = strlen(end);
  return strncasecmp(str + strlen(str) - elen, end, elen);
}


x86 assembly (clang, -O0):
<strendcasecmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
xor    %eax,%eax
sub    %rcx,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <strncasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strendcasecmp>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    %ebp,%eax
sub    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <strncasecmp@plt>

LLVM IR (-O0):
define i32 @strendcasecmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = sub i64 0, %14
%16 = getelementptr inbounds i8, i8* %12, i64 %15
%17 = load i8*, i8** %4
%18 = load i32, i32* %5
%19 = call i32 @strncasecmp(i8* %16, i8* %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @strendcasecmp(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strlen(i8* %0)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = zext i32 %3 to i64
%8 = sub nsw i64 0, %7
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = tail call i32 @strncasecmp(i8* %9, i8* %1, i32 %3)
ret i32 %10
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void EPIConfigHB8TimingSet(uint32_t ui32Base, uint32_t ui32CS,
                           uint32_t ui32Config) {
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + (0x00000310 + (ui32CS << 2))))) =
      ui32Config;
}


x86 assembly (clang, -O0):
<EPIConfigHB8TimingSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
shl    $0x2,%edx
add    $0x310,%edx
add    %edx,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIConfigHB8TimingSet>:
lea    (%rdi,%rsi,4),%eax
add    $0x310,%eax
cltq
mov    %edx,(%rax)
ret

LLVM IR (-O0):
define void @EPIConfigHB8TimingSet(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = shl i32 %9, 2
%11 = add nsw i32 784, %10
%12 = add nsw i32 %8, %11
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
store volatile i32 %7, i32* %14
ret void
}

LLVM IR (-O2):
define void @EPIConfigHB8TimingSet(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 2
%5 = add i32 %0, 784
%6 = add i32 %5, %4
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 %2, i32* %8
ret void
}
double sin(x)
double x;
{ return sinus(x, 0); }


x86 assembly (clang, -O0):
<sin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %edi,%edi
mov    $0x1,%al
call   1030 <sinus@plt>
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sin>:
push   %rax
xor    %edi,%edi
mov    $0x1,%al
call   1030 <sinus@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 (double, i32, ...) bitcast (i32 (...)* @sinus to i32 (double, i32, ...)*)(double %3, i32 0)
%5 = sitofp i32 %4 to double
ret double %5
}

LLVM IR (-O2):
define double @sin(double %0) {
%2 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @sinus to i32 (double, i32, ...)*)(double %0, i32 0)
%3 = sitofp i32 %2 to double
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getrandom(i8* nocapture readnone %0, i64 %1, i32 %2) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t md5_F(uint32_t x, uint32_t y, uint32_t z) {
  return (x & y) | ((~x) & z);
}


x86 assembly (clang, -O0):
<md5_F>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5_F>:
mov    %esi,%eax
xor    %edx,%eax
and    %edi,%eax
xor    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @md5_F(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = xor i32 %0, -1
%6 = and i32 %5, %2
%7 = or i32 %6, %4
ret i32 %7
}
char get(int a) { return a < 10 ? a + '0' : a - 10 + 'A'; }


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    111f <get+0x1f>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <get+0x2b>
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
lea    0x37(%rdi),%ecx
lea    0x30(%rdi),%eax
cmp    $0xa,%edi
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @get(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 48
br label %12
8: ; preds = %1
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 10
%11 = add nsw i32 %10, 65
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ %7, %5 ], [ %11, %8 ]
%14 = trunc i32 %13 to i8
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @get(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = select i1 %2, i32 48, i32 55
%4 = add nsw i32 %3, %0
%5 = trunc i32 %4 to i8
ret i8 %5
}
void qeth_remove_procfs_entries(void) {}


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

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

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

LLVM IR (-O2):
define void @qeth_remove_procfs_entries() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ g(int);
void main() {
  f(3);
  if (1)
    g(1);
  else
    g(2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <f@plt>
mov    $0x1,%edi
call   1040 <g@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1030 <f@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <g@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @f(i32 3)
%2 = call i32 @g(i32 1)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @f(i32 3)
%2 = tail call i32 @g(i32 1)
ret void
}
int rlDidAgentConnect() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @rlDidAgentConnect() {
ret i32 1
}
/* Type definitions */
struct rsn_pmksa_cache_entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct rsn_pmksa_cache_entry *);
void _pmksa_cache_free_entry(struct rsn_pmksa_cache_entry *entry) {
  free(entry);
}


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

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

LLVM IR (-O0):
%struct.rsn_pmksa_cache_entry = type { i32 }
define void @_pmksa_cache_free_entry(%struct.rsn_pmksa_cache_entry* %0) {
%2 = alloca %struct.rsn_pmksa_cache_entry*
store %struct.rsn_pmksa_cache_entry* %0, %struct.rsn_pmksa_cache_entry** %2
%3 = load %struct.rsn_pmksa_cache_entry*, %struct.rsn_pmksa_cache_entry** %2
%4 = call i32 @free(%struct.rsn_pmksa_cache_entry* %3)
ret void
}

LLVM IR (-O2):
%struct.rsn_pmksa_cache_entry = type { i32 }
define void @_pmksa_cache_free_entry(%struct.rsn_pmksa_cache_entry* nocapture %0) {
%2 = tail call i32 @free(%struct.rsn_pmksa_cache_entry* %0)
ret void
}
/* Type definitions */
struct sortObject {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mergeSort(struct sortObject *, int, int, int);
void primarySort(struct sortObject *obj, int num) {
  int start = 0, middle = num / 2, end = num - 1;
  mergeSort(obj, start, middle, end);
}


x86 assembly (clang, -O0):
<primarySort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <mergeSort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primarySort>:
mov    %esi,%edx
shr    $0x1f,%edx
add    %esi,%edx
sar    %edx
lea    -0x1(%rsi),%ecx
xor    %esi,%esi
jmp    1030 <mergeSort@plt>

LLVM IR (-O0):
%struct.sortObject = type { i32 }
define void @primarySort(%struct.sortObject* %0, i32 %1) {
%3 = alloca %struct.sortObject*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.sortObject* %0, %struct.sortObject** %3
store i32 %1, i32* %4
store i32 0, i32* %5
%8 = load i32, i32* %4
%9 = sdiv i32 %8, 2
store i32 %9, i32* %6
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %7
%12 = load %struct.sortObject*, %struct.sortObject** %3
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = call i32 @mergeSort(%struct.sortObject* %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.sortObject = type { i32 }
define void @primarySort(%struct.sortObject* %0, i32 %1) {
%3 = sdiv i32 %1, 2
%4 = add nsw i32 %1, -1
%5 = tail call i32 @mergeSort(%struct.sortObject* %0, i32 0, i32 %3, i32 %4)
ret void
}
int Fstype(const char *path, char type[]) {
  *type = 0;
  return -1;
}


x86 assembly (clang, -O0):
<Fstype>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fstype>:
movb   $0x0,(%rsi)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @Fstype(i8* nocapture readnone %0, i8* nocapture writeonly %1) {
store i8 0, i8* %1
ret i32 -1
}
/* Variables and functions */
double _do_expression(char const **);
double evaluate_expression(const char *expression) {
  return _do_expression(&expression);
}


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

x86 assembly (clang, -O2):
<evaluate_expression>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <_do_expression@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @evaluate_expression(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call double @_do_expression(i8** %2)
ret double %3
}

LLVM IR (-O2):
define double @evaluate_expression(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call double @_do_expression(i8** %2)
ret double %3
}
void fc20(int n) {
  {
    typedef int(*b)[n];
    goto a;
    {
      typedef int(*c)[n];
      0;
    }
  a : {
    typedef int(*d)[n];
    0;
  };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc20(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
br label %8
5: ; No predecessors!
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc20(i32 %0) {
ret void
}
long long int numeric_oct_to_dec(char value[]) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @numeric_oct_to_dec(i8* nocapture readnone %0) {
ret i64 0
}
int getopt_long_only_r(argc, argv, options, long_options, opt_index, opt)
int argc;
char *const *argv;
const char *options;
const struct option *long_options;
int *opt_index;
struct opt_r *opt;
{
  return _getopt_r_internal(argc, argv, options, long_options, opt_index, 1,
                            opt);
}


x86 assembly (clang, -O0):
<getopt_long_only_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%rax
mov    $0x1,%r9d
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <_getopt_r_internal@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long_only_r>:
push   %rax
mov    %r9,(%rsp)
mov    $0x1,%r9d
xor    %eax,%eax
call   1030 <_getopt_r_internal@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.option = type opaque
%struct.opt_r = type opaque
define i32 @getopt_long_only_r(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, %struct.opt_r* %5) {
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i8*
%10 = alloca %struct.option*
%11 = alloca i32*
%12 = alloca %struct.opt_r*
store i32 %0, i32* %7
store i8** %1, i8*** %8
store i8* %2, i8** %9
store %struct.option* %3, %struct.option** %10
store i32* %4, i32** %11
store %struct.opt_r* %5, %struct.opt_r** %12
%13 = load i32, i32* %7
%14 = load i8**, i8*** %8
%15 = load i8*, i8** %9
%16 = load %struct.option*, %struct.option** %10
%17 = load i32*, i32** %11
%18 = load %struct.opt_r*, %struct.opt_r** %12
%19 = call i32 (i32, i8**, i8*, %struct.option*, i32*, i32, %struct.opt_r*, ...) bitcast (i32 (...)* @_getopt_r_internal to i32 (i32, i8**, i8*, %struct.option*, i32*, i32, %struct.opt_r*, ...)*)(i32 %13, i8** %14, i8* %15, %struct.option* %16, i32* %17, i32 1, %struct.opt_r* %18)
ret i32 %19
}

LLVM IR (-O2):
%struct.option = type opaque
%struct.opt_r = type opaque
define i32 @getopt_long_only_r(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, %struct.opt_r* %5) {
%7 = tail call i32 (i32, i8**, i8*, %struct.option*, i32*, i32, %struct.opt_r*, ...) bitcast (i32 (...)* @_getopt_r_internal to i32 (i32, i8**, i8*, %struct.option*, i32*, i32, %struct.opt_r*, ...)*)(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 1, %struct.opt_r* %5)
ret i32 %7
}
void ASN1_item_new(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_item_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int munmap(void *, unsigned int);
int /*<<< orphan*/ printf(char *, int);
void *unmapmem(void *addr, unsigned size) {
  int s = munmap(addr, size);
  if (s != 0) {
    printf("munmap error %d\n", s);
    exit(-1);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<unmapmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <munmap@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1171 <unmapmem+0x41>
mov    -0x10(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unmapmem>:
push   %rax
call   1040 <munmap@plt>
test   %eax,%eax
jne    113e <unmapmem+0xe>
xor    %eax,%eax
pop    %rcx
ret
lea    0xebb(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"munmap error %d\0A\00"
define i8* @unmapmem(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @munmap(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %5
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = call i32 @exit(i32 -1)
unreachable
15: ; preds = %2
ret i8* null
}

LLVM IR (-O2):
@.str = [17 x i8] c"munmap error %d\0A\00"
define noalias i8* @unmapmem(i8* %0, i32 %1) {
%3 = tail call i32 @munmap(i8* %0, i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret i8* null
}
void irq_enable(int interrupt) {
  (*((volatile unsigned int *)((0x12000000 + 0x200) + 0x00))) =
      (1 << interrupt);
}


x86 assembly (clang, -O0):
<irq_enable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    $0x12000200,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_enable>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,0x12000200
ret

LLVM IR (-O0):
define void @irq_enable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 1, %3
store volatile i32 %4, i32* inttoptr (i64 301990400 to i32*)
ret void
}

LLVM IR (-O2):
define void @irq_enable(i32 %0) {
%2 = shl nuw i32 1, %0
store volatile i32 %2, i32* inttoptr (i64 301990400 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ println(int /*<<< orphan*/);
int /*<<< orphan*/ sum(int);
int main() {
  int n;
  n = 6 * 6;
  println(sum(n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x24,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sum@plt>
mov    %eax,%edi
call   1030 <println@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 36, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @sum(i32 %2)
%4 = call i32 @println(i32 %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sum(i32 36)
%2 = tail call i32 @println(i32 %1)
ret i32 0
}
void ff_hevc_put_hevc_bi_w_qpel_hv32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_hv32_10_sse4() {
ret void
}
const char *getYY(int year) {
  if (year % 2 == 0) {
    return "yang";
  } else {
    return "yin";
  }
}


x86 assembly (clang, -O0):
<getYY>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112b <getYY+0x2b>
lea    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1136 <getYY+0x36>
lea    0xed3(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getYY>:
test   $0x1,%dil
lea    0xef5(%rip),%rcx
lea    0xef3(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"yang\00"
@.str.1 = [4 x i8] c"yin\00"
define i8* @getYY(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [5 x i8] c"yang\00"
@.str.1 = [4 x i8] c"yin\00"
define i8* @getYY(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ __get_cpuid(int, unsigned int *, unsigned int *,
                               unsigned int *, unsigned int *);
unsigned int check_rdrand_support(void) {
  unsigned int rdrand_mask = (1 << 30);
  unsigned int eax, ebx, ecx, edx;
  __get_cpuid(1, &eax, &ebx, &ecx, &edx);
  return ((ecx & rdrand_mask) == rdrand_mask);
}


x86 assembly (clang, -O0):
<check_rdrand_support>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x40000000,-0x4(%rbp)
mov    $0x1,%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <__get_cpuid@plt>
mov    -0x10(%rbp),%eax
and    -0x4(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_rdrand_support>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0x1,%edi
call   1030 <__get_cpuid@plt>
mov    0x8(%rsp),%eax
shr    $0x1e,%eax
and    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @check_rdrand_support() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 1073741824, i32* %1
%6 = call i32 @__get_cpuid(i32 1, i32* %2, i32* %3, i32* %4, i32* %5)
%7 = load i32, i32* %4
%8 = load i32, i32* %1
%9 = and i32 %7, %8
%10 = load i32, i32* %1
%11 = icmp eq i32 %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @check_rdrand_support() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @__get_cpuid(i32 1, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %3
%11 = lshr i32 %10, 30
%12 = and i32 %11, 1
ret i32 %12
}
void gtk_message_dialog_format_secondary_text() {}


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

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

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

LLVM IR (-O2):
define void @gtk_message_dialog_format_secondary_text() {
ret void
}
int secure_storage_spi_read(char *buf, unsigned int len) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @secure_storage_spi_read(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
int fz_maxi(int a, int b) { return (a > b ? a : b); }


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

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

LLVM IR (-O0):
define i32 @fz_maxi(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 sgt 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 @fz_maxi(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
double ___jn(int, double *);
double jn(int n, double x) { return ___jn(n, &x); }


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

x86 assembly (clang, -O2):
<jn>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rsi
call   1030 <___jn@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define double @jn(i32 %0, double %1) {
%3 = alloca double
store double %1, double* %3
%4 = call double @___jn(i32 %0, double* %3)
ret double %4
}
int test_imm_6Auint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x6A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Auint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x6a,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_6Auint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 106
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char *logger_udp_name(void) { return "udp"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"udp\00"
define i8* @logger_udp_name() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
int included_fn(int param) { return param * 3; }


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

x86 assembly (clang, -O2):
<included_fn>:
lea    (%rdi,%rdi,2),%eax
ret

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

LLVM IR (-O2):
define i32 @included_fn(i32 %0) {
%2 = mul nsw i32 %0, 3
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_int(int out) { printf("%8d\n", out); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%8d\0A\00"
define void @print_int(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void foo504() {}


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

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

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

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