xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ time_t;
typedef int /*<<< orphan*/ out_msg;

/* Variables and functions */
scalar_t__ _xmit(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ snprintf(char *, int, char *, int, long);
scalar_t__ time(int /*<<< orphan*/ *);
void _suspend_job(long my_job_id) {
  time_t now = time(NULL);
  char out_msg[128];
  snprintf(out_msg, sizeof(out_msg),
           "TS=%u AUTH=root DT=CMD=SUSPENDJOB ARG=%ld", (uint32_t)now,
           my_job_id);
  if (_xmit(out_msg))
    exit(1);
}


x86 assembly (clang, -O0):
<_suspend_job>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %rax,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%r8
mov    $0x80,%esi
lea    0xe87(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x90(%rbp),%rdi
call   1040 <_xmit@plt>
cmp    $0x0,%rax
je     119e <_suspend_job+0x5e>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_suspend_job>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1050 <time@plt>
lea    0xea5(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x80,%esi
mov    %eax,%ecx
mov    %rbx,%r8
call   1030 <snprintf@plt>
mov    %r14,%rdi
call   1040 <_xmit@plt>
test   %rax,%rax
jne    1188 <_suspend_job+0x48>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"TS=%u AUTH=root DT=CMD=SUSPENDJOB ARG=%ld\00"
define void @_suspend_job(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca [128 x i8]
store i64 %0, i64* %2
%5 = call i64 @time(i32* null)
store i64 %5, i64* %3
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%7 = load i64, i64* %3
%8 = trunc i64 %7 to i32
%9 = load i64, i64* %2
%10 = call i32 @snprintf(i8* %6, i32 128, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %8, i64 %9)
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%12 = call i64 @_xmit(i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %1
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"TS=%u AUTH=root DT=CMD=SUSPENDJOB ARG=%ld\00"
define void @_suspend_job(i64 %0) {
%2 = alloca [128 x i8]
%3 = tail call i64 @time(i32* null)
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = trunc i64 %3 to i32
%6 = call i32 @snprintf(i8* %4, i32 128, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %0)
%7 = call i64 @_xmit(i8* %4)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getdelim(char **, size_t *, int /*<<< orphan*/, int /*<<< orphan*/ *);
char *read_cmdline_field(FILE *fh) {
  char *arg = NULL;
  size_t arg_size = 0;
  if (getdelim(&arg, &arg_size, 0, fh) != -1)
    return arg;
  return NULL;
}


x86 assembly (clang, -O0):
<read_cmdline_field>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <getdelim@plt>
cmp    $0xffffffff,%eax
je     1155 <read_cmdline_field+0x45>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115d <read_cmdline_field+0x4d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_cmdline_field>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rcx
movq   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rdi
lea    0x8(%rsp),%rsi
xor    %ebx,%ebx
xor    %edx,%edx
call   1030 <getdelim@plt>
cmp    $0xffffffff,%eax
je     1143 <read_cmdline_field+0x33>
mov    (%rsp),%rbx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @read_cmdline_field(i32* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%5 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%6 = call i32 @getdelim(i8** %2, i64* %3, i32 0, i32* %0)
%7 = icmp eq i32 %6, -1
%8 = load i8*, i8** %2
%9 = select i1 %7, i8* null, i8* %8
ret i8* %9
}
void fd234(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  p026A:
    goto p026A;
    goto a;
  a:
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd234>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd234+0x7>

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

LLVM IR (-O0):
define void @fd234(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; No predecessors!
br label %42
42: ; preds = %42, %41
br label %42
43: ; No predecessors!
%44 = load i32, i32* %2
%45 = zext i32 %44 to i64
br label %46
46: ; preds = %46, %43
br label %46
47: ; preds = %47
br label %47
}

LLVM IR (-O2):
define void @fd234(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
long get_vbatt_min() { return 2300; }


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

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

LLVM IR (-O0):
define i64 @get_vbatt_min() {
ret i64 2300
}

LLVM IR (-O2):
define i64 @get_vbatt_min() {
ret i64 2300
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
char *strdup(char const *);
scalar_t__ strlen(char const *);
char *w_malloc(scalar_t__);
char *w_strdup(const char *src) {
  return strdup(src);
  char *n = w_malloc(strlen(src) + 1);
  strcpy(n, src);
  return n;
}


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

x86 assembly (clang, -O2):
<w_strdup>:
jmp    1030 <strdup@plt>

LLVM IR (-O0):
define i8* @w_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
ret i8* %5
}

LLVM IR (-O2):
define noalias i8* @w_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
void NoSound(void) {}


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

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

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

LLVM IR (-O2):
define void @NoSound() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gt_log(char *, char const *);
void gt_na(const char *name) {
  gt_log("%s is not available on your platform\n", name);
}


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

x86 assembly (clang, -O2):
<gt_na>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <gt_log@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"%s is not available on your platform\0A\00"
define void @gt_na(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @gt_log(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"%s is not available on your platform\0A\00"
define void @gt_na(i8* %0) {
%2 = tail call i32 @gt_log(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
double Rect(double x) {
  if (x > (-1 / 2.0) && x < (1 / 2.0)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<Rect>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1145 <Rect+0x45>
movsd  0xee0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1145 <Rect+0x45>
movsd  0xed5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114d <Rect+0x4d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Rect>:
movsd  0xef8(%rip),%xmm1
cmpltsd %xmm0,%xmm1
cmpltsd 0xef2(%rip),%xmm0
movsd  0xef2(%rip),%xmm2
andpd  %xmm2,%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Rect(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, -5.000000e-01
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp olt double %7, 5.000000e-01
br i1 %8, label %9, label %10
9: ; preds = %6
store double 1.000000e+00, double* %2
br label %11
10: ; preds = %6, %1
store double 0.000000e+00, double* %2
br label %11
11: ; preds = %10, %9
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @Rect(double %0) {
%2 = fcmp ogt double %0, -5.000000e-01
%3 = fcmp olt double %0, 5.000000e-01
%4 = and i1 %2, %3
%5 = select i1 %4, double 1.000000e+00, double 0.000000e+00
ret double %5
}
/* Variables and functions */
scalar_t__ isalnum(int);
scalar_t__ isspace(int);
int classify_char(int c) {
  if (isspace(c))
    return 1;
  if (isalnum(c) || (c == '_'))
    return 2;
  return 3;
}


x86 assembly (clang, -O0):
<classify_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1149 <classify_char+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1178 <classify_char+0x58>
mov    -0x8(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
jne    1165 <classify_char+0x45>
cmpl   $0x5f,-0x8(%rbp)
jne    1171 <classify_char+0x51>
movl   $0x2,-0x4(%rbp)
jmp    1178 <classify_char+0x58>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<classify_char>:
push   %rbx
mov    %edi,%ebx
call   1040 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <classify_char+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%ebx
sete   %cl
or     %al,%cl
movzbl %cl,%eax
xor    $0x3,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @classify_char(i32 %0) {
%2 = tail call i64 @isspace(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i64 @isalnum(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = icmp eq i32 %0, 95
%8 = or i1 %7, %6
%9 = select i1 %8, i32 2, i32 3
br label %10
10: ; preds = %4, %1
%11 = phi i32 [ 1, %1 ], [ %9, %4 ]
ret i32 %11
}
double f_int(double x) { return ((int)(x)); }


x86 assembly (clang, -O0):
<f_int>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_int>:
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @f_int(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
ret double %3
}
int param_get_uint(char *buffer, struct kernel_param *kp) { return 0; }


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

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

LLVM IR (-O0):
%struct.kernel_param = type opaque
define i32 @param_get_uint(i8* %0, %struct.kernel_param* %1) {
%3 = alloca i8*
%4 = alloca %struct.kernel_param*
store i8* %0, i8** %3
store %struct.kernel_param* %1, %struct.kernel_param** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kernel_param = type opaque
define i32 @param_get_uint(i8* nocapture readnone %0, %struct.kernel_param* nocapture readnone %1) {
ret i32 0
}
int ft_strlen(char *str) {
  int n;
  n = 0;
  while (str[n]) {
    n++;
  }
  return (n);
}


x86 assembly (clang, -O0):
<ft_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     112f <ft_strlen+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %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, 0
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
ret i32 %15
}

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


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

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

LLVM IR (-O0):
define i32 @alloc(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 5, i32* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @alloc(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int icholu(double *, int);
int ichol(double *A, int N) {
  int sc;
  sc = icholu(A, N);
  return sc;
}


x86 assembly (clang, -O0):
<ichol>:
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   1030 <icholu@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ichol>:
jmp    1030 <icholu@plt>

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

LLVM IR (-O2):
define i32 @ichol(double* %0, i32 %1) {
%3 = tail call i32 @icholu(double* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Lut_N(double *, double *, int);
void Lut_9(double *out, double *in) { Lut_N(out, in, 9); }


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

x86 assembly (clang, -O2):
<Lut_9>:
mov    $0x9,%edx
jmp    1030 <Lut_N@plt>

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

LLVM IR (-O2):
define void @Lut_9(double* %0, double* %1) {
%3 = tail call i32 @Lut_N(double* %0, double* %1, i32 9)
ret void
}
unsigned char test_bit(byte, bitpos)
unsigned char byte;
short bitpos;
{
  static unsigned char mask[9] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80};
  return (byte & mask[bitpos]);
}


x86 assembly (clang, -O0):
<test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%cl
mov    %si,%ax
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
movzbl -0x1(%rbp),%eax
movswq -0x4(%rbp),%rdx
lea    0x2eff(%rip),%rcx
movzbl (%rcx,%rdx,1),%ecx
and    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bit>:
mov    %edi,%eax
movswq %si,%rcx
lea    0xef3(%rip),%rdx
and    (%rcx,%rdx,1),%al
ret

LLVM IR (-O0):
@test_bit.mask = internal global [9 x i8] c"\01\02\04\08\10 @\80\00"
define zeroext i8 @test_bit(i32 %0, i32 %1) {
%3 = alloca i8
%4 = alloca i16
%5 = trunc i32 %0 to i8
%6 = trunc i32 %1 to i16
store i8 %5, i8* %3
store i16 %6, i16* %4
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = load i16, i16* %4
%10 = sext i16 %9 to i64
%11 = getelementptr inbounds [9 x i8], [9 x i8]* @test_bit.mask, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %8, %13
%15 = trunc i32 %14 to i8
ret i8 %15
}

LLVM IR (-O2):
@test_bit.mask = internal unnamed_addr constant [9 x i8] c"\01\02\04\08\10 @\80\00"
define zeroext i8 @test_bit(i32 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl i64 %3, 48
%5 = ashr exact i64 %4, 48
%6 = getelementptr inbounds [9 x i8], [9 x i8]* @test_bit.mask, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = trunc i32 %0 to i8
%9 = and i8 %7, %8
ret i8 %9
}
/* Variables and functions */
int Palindrom(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  int i, a;
  char Pali[100];
  scanf("%s", Pali);
  printf("%d \n", Palindrom(Pali));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <Palindrom@plt>
mov    %eax,%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xec4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <Palindrom@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @Palindrom(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int close(int);
int _dl_close(int fd) { return close(fd); }


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

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

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

LLVM IR (-O2):
define i32 @_dl_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void frm_gpu_init(void) {}


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

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

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

LLVM IR (-O2):
define void @frm_gpu_init() {
ret void
}
void err_readonly(s) const char *s;
{ report_error("%s: readonly variable", s); }


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

x86 assembly (clang, -O2):
<err_readonly>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <report_error@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"%s: variable\00"
define void @err_readonly(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @report_error to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"%s: variable\00"
define void @err_readonly(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @report_error to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void announceCheckmate(void) { printf("Checkmate\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"Checkmate\00"
define void @announceCheckmate() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TCIOFLUSH;
int tcflush(int, int /*<<< orphan*/);
int /*<<< orphan*/ usleep(int);
int serial_flush(int fd) {
  int ret;
  usleep(10000);
  ret = tcflush(fd, TCIOFLUSH);
  usleep(1000000);
  return ret;
}


x86 assembly (clang, -O0):
<serial_flush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2710,%edi
call   1040 <usleep@plt>
mov    -0x4(%rbp),%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1030 <tcflush@plt>
mov    %eax,-0x8(%rbp)
mov    $0xf4240,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_flush>:
push   %rbx
mov    %edi,%ebx
mov    $0x2710,%edi
call   1040 <usleep@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1030 <tcflush@plt>
mov    %eax,%ebx
mov    $0xf4240,%edi
call   1040 <usleep@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@TCIOFLUSH = global i32 0
define i32 @serial_flush(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @usleep(i32 10000)
%5 = load i32, i32* %2
%6 = load i32, i32* @TCIOFLUSH
%7 = call i32 @tcflush(i32 %5, i32 %6)
store i32 %7, i32* %3
%8 = call i32 @usleep(i32 1000000)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@TCIOFLUSH = global i32 0
define i32 @serial_flush(i32 %0) {
%2 = tail call i32 @usleep(i32 10000)
%3 = load i32, i32* @TCIOFLUSH
%4 = tail call i32 @tcflush(i32 %0, i32 %3)
%5 = tail call i32 @usleep(i32 1000000)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assignment_expr();
int /*<<< orphan*/ expr();
int yyselect();
expr_assign() {
  switch (yyselect()) {
  case 78: {
    expr();
  } break;
  case 79: {
    assignment_expr();
  } break;
  }
}


x86 assembly (clang, -O0):
<expr_assign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <yyselect@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0x4e,%eax
je     1163 <expr_assign+0x33>
jmp    1152 <expr_assign+0x22>
mov    -0x8(%rbp),%eax
sub    $0x4f,%eax
je     116f <expr_assign+0x3f>
jmp    1176 <expr_assign+0x46>
mov    $0x0,%al
call   1050 <expr@plt>
jmp    1176 <expr_assign+0x46>
mov    $0x0,%al
call   1030 <assignment_expr@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expr_assign>:
push   %rax
xor    %eax,%eax
call   1040 <yyselect@plt>
cmp    $0x4f,%eax
je     114b <expr_assign+0x1b>
cmp    $0x4e,%eax
jne    1152 <expr_assign+0x22>
xor    %eax,%eax
call   1050 <expr@plt>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <assignment_expr@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @expr_assign() {
%1 = alloca i32
%2 = call i32 (...) @yyselect()
switch i32 %2, label %7 [
i32 78, label %3
i32 79, label %5
]
3: ; preds = %0
%4 = call i32 (...) @expr()
br label %7
5: ; preds = %0
%6 = call i32 (...) @assignment_expr()
br label %7
7: ; preds = %0, %5, %3
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @expr_assign() {
%1 = tail call i32 (...) @yyselect()
switch i32 %1, label %6 [
i32 78, label %2
i32 79, label %4
]
2: ; preds = %0
%3 = tail call i32 (...) @expr()
br label %6
4: ; preds = %0
%5 = tail call i32 (...) @assignment_expr()
br label %6
6: ; preds = %0, %4, %2
ret i32 undef
}
int main() {
  int x = 1;
  int y;
  y = ~x;
  y = -x;
  y = +x;
  y = x++;
  y = ++x;
  y = --x;
  y = x--;
  int a;
  int *b;
  b = &a;
  a = *(b + 1);
  *b = *b + 1;
  a = *(&a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 0, i32* %1
store i32 1, i32* %2
%6 = load i32, i32* %2
%7 = xor i32 %6, -1
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = sub nsw i32 0, %8
store i32 %9, i32* %3
%10 = load i32, i32* %2
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
store i32 %11, i32* %3
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = add nsw i32 %15, -1
store i32 %16, i32* %2
store i32 %16, i32* %3
%17 = load i32, i32* %2
%18 = add nsw i32 %17, -1
store i32 %18, i32* %2
store i32 %17, i32* %3
store i32* %4, i32** %5
%19 = load i32*, i32** %5
%20 = getelementptr inbounds i32, i32* %19, i64 1
%21 = load i32, i32* %20
store i32 %21, i32* %4
%22 = load i32*, i32** %5
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
%25 = load i32*, i32** %5
store i32 %24, i32* %25
%26 = load i32, i32* %4
store i32 %26, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(stderr,
          "nsenter --nspid <pid> --console <console> -- cmd1 arg1 arg2...\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [64 x i8] c"nsenter --nspid <pid> --console <console> -- cmd1 arg1 arg2...\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [64 x i8] c"nsenter --nspid <pid> --console <console> -- cmd1 arg1 arg2...\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
ret void
}
void SPI_MAX7221_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @SPI_MAX7221_SaveConfig() {
ret void
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyndump_dumpexp_prec(int /*<<< orphan*/,
                                              struct Cyc_Absyn_Exp *);
void Cyc_Absyndump_dumpexp(struct Cyc_Absyn_Exp *e) {
  Cyc_Absyndump_dumpexp_prec(0, e);
}


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

x86 assembly (clang, -O2):
<Cyc_Absyndump_dumpexp>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <Cyc_Absyndump_dumpexp_prec@plt>

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

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define void @Cyc_Absyndump_dumpexp(%struct.Cyc_Absyn_Exp* %0) {
%2 = tail call i32 @Cyc_Absyndump_dumpexp_prec(i32 0, %struct.Cyc_Absyn_Exp* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
int8_t bmin_int8(int8_t a, int8_t b) { return (a < b ? a : b); }


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

x86 assembly (clang, -O2):
<bmin_int8>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @bmin_int8(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
int fun1172() { return 1172; }


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

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

LLVM IR (-O0):
define i32 @fun1172() {
ret i32 1172
}

LLVM IR (-O2):
define i32 @fun1172() {
ret i32 1172
}
char *squelch_to_label(int squelch) {
  if (squelch == 1)
    return ("(Squelched)");
  if (squelch == -1)
    return ("(Squelch Failed)");
  return ("");
}


x86 assembly (clang, -O0):
<squelch_to_label>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1121 <squelch_to_label+0x21>
lea    0xee8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <squelch_to_label+0x46>
cmpl   $0xffffffff,-0xc(%rbp)
jne    113b <squelch_to_label+0x3b>
lea    0xeda(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <squelch_to_label+0x46>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<squelch_to_label>:
cmp    $0xffffffff,%edi
lea    0xf02(%rip),%rax
lea    0xefa(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x1,%edi
lea    0xee1(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"(Squelched)\00"
@.str.1 = [17 x i8] c"(Squelch Failed)\00"
@.str.2 = [1 x i8] zeroinitializer
define i8* @squelch_to_label(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %7
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %12
11: ; preds = %7
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %12
12: ; preds = %11, %10, %6
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [12 x i8] c"(Squelched)\00"
@.str.1 = [17 x i8] c"(Squelch Failed)\00"
@.str.2 = [1 x i8] zeroinitializer
define i8* @squelch_to_label(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = select i1 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, 1
%5 = select i1 %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
int _runner_test_func_0(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @_runner_test_func_0() {
ret i32 0
}

LLVM IR (-O2):
define i32 @_runner_test_func_0() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ log_f(char *);
void mouseb_none_done(void) { log_f("mouseb:none: mouseb_none_done()\n"); }


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

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

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

LLVM IR (-O2):
@.str = [33 x i8] c"mouseb:none: mouseb_none_done()\0A\00"
define void @mouseb_none_done() {
%1 = tail call i32 @log_f(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mlMatrixCopy(float *, float *);
int /*<<< orphan*/ mlMatrixRotateTo(float *, float const *, float, float *);
void mlMatrixRotate(float *a, const float *axis, float angle) {
  float result[16];
  mlMatrixRotateTo(a, axis, angle, result);
  mlMatrixCopy(result, a);
}


x86 assembly (clang, -O0):
<mlMatrixRotate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
lea    -0x60(%rbp),%rdx
call   1030 <mlMatrixRotateTo@plt>
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <mlMatrixCopy@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlMatrixRotate>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdx
call   1030 <mlMatrixRotateTo@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <mlMatrixCopy@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mlMatrixRotate(float* %0, float* %1, float %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
%7 = alloca [16 x float]
store float* %0, float** %4
store float* %1, float** %5
store float %2, float* %6
%8 = load float*, float** %4
%9 = load float*, float** %5
%10 = load float, float* %6
%11 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%12 = call i32 @mlMatrixRotateTo(float* %8, float* %9, float %10, float* %11)
%13 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%14 = load float*, float** %4
%15 = call i32 @mlMatrixCopy(float* %13, float* %14)
ret void
}

LLVM IR (-O2):
define void @mlMatrixRotate(float* %0, float* %1, float %2) {
%4 = alloca [16 x float]
%5 = bitcast [16 x float]* %4 to i8*
%6 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 0
%7 = call i32 @mlMatrixRotateTo(float* %0, float* %1, float %2, float* %6)
%8 = call i32 @mlMatrixCopy(float* %6, float* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_shmget;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, size_t, int);
int shmget(key_t key, size_t size, int shmflg) {
  return syscall(__NR_shmget, key, size, shmflg);
}


x86 assembly (clang, -O0):
<shmget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shmget>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_shmget = global i32 0
define i32 @shmget(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* @__NR_shmget
%8 = load i32, i32* %4
%9 = load i64, i64* %5
%10 = load i32, i32* %6
%11 = call i32 @syscall(i32 %7, i32 %8, i64 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@__NR_shmget = global i32 0
define i32 @shmget(i32 %0, i64 %1, i32 %2) {
%4 = load i32, i32* @__NR_shmget
%5 = tail call i32 @syscall(i32 %4, i32 %0, i64 %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int validate_algorithm_type(char *str) {
  if (strcmp("bs", str) != 0 && strcmp("bb", str) != 0) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<validate_algorithm_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     115c <validate_algorithm_type+0x4c>
mov    -0x10(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     115c <validate_algorithm_type+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1163 <validate_algorithm_type+0x53>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_algorithm_type>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1143 <validate_algorithm_type+0x33>
lea    0xed4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1143 <validate_algorithm_type+0x33>
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"bs\00"
@.str.1 = [3 x i8] c"bb\00"
define i32 @validate_algorithm_type(i8* %0) {
%2 = tail call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4, %1
br label %8
8: ; preds = %4, %7
%9 = phi i32 [ 1, %7 ], [ 0, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
char mygetc() {
  char s[1];
  read(0, s, 1);
  return s[0];
}


x86 assembly (clang, -O0):
<mygetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x1(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mygetc>:
push   %rax
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @mygetc() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%3 = call i32 @read(i32 0, i8* %2, i32 1)
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%5 = load i8, i8* %4
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @mygetc() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%3 = call i32 @read(i32 0, i8* %2, i32 1)
%4 = load i8, i8* %2
ret i8 %4
}
void gtk_tree_store_set() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_store_set() {
ret void
}
int CSlim_IsCharacter(unsigned char const *byte) {
  if ((*byte < (unsigned char const)0x80) ||
      (*byte > (unsigned char const)0xBF))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<CSlim_IsCharacter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x80,%eax
jl     112c <CSlim_IsCharacter+0x2c>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xbf,%eax
jle    1138 <CSlim_IsCharacter+0x38>
movl   $0x1,-0x4(%rbp)
jmp    113f <CSlim_IsCharacter+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CSlim_IsCharacter>:
xor    %eax,%eax
cmpb   $0xc0,(%rdi)
setge  %al
ret

LLVM IR (-O0):
define i32 @CSlim_IsCharacter(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp slt i32 %6, 128
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = icmp sgt i32 %11, 191
br i1 %12, label %13, label %14
13: ; preds = %8, %1
store i32 1, i32* %2
br label %15
14: ; preds = %8
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 @CSlim_IsCharacter(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp sgt i8 %2, -65
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ getpgrp();
pid_t Getpgrp(void) { return getpgrp(); }


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

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

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

LLVM IR (-O2):
define i32 @Getpgrp() {
%1 = tail call i32 (...) @getpgrp()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *malloc(size_t);
void *xalloc(size_t sz) {
  void *mem;
  mem = malloc(sz);
  if (!mem && sz)
    die("Out of memory");
  return mem;
}


x86 assembly (clang, -O0):
<xalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <xalloc+0x3b>
cmpq   $0x0,-0x8(%rbp)
je     115b <xalloc+0x3b>
lea    0xeaa(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <malloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1145 <xalloc+0x25>
test   %r14,%r14
jne    1145 <xalloc+0x25>
lea    0xec0(%rip),%rdi
call   1040 <die@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
define i8* @xalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %8, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define noalias i8* @xalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret i8* %2
}