xunge/DecIR huggingface dataset:
int str_is_ident(char c) {
  if ((c >= '0') && (c <= '9')) {
    return (1);
  }
  if ((c >= 'a') && (c <= 'z')) {
    return (1);
  }
  if ((c >= 'A') && (c <= 'Z')) {
    return (1);
  }
  if (c == '_') {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<str_is_ident>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <str_is_ident+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <str_is_ident+0x30>
movl   $0x1,-0x4(%rbp)
jmp    119c <str_is_ident+0x9c>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1156 <str_is_ident+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1156 <str_is_ident+0x56>
movl   $0x1,-0x4(%rbp)
jmp    119c <str_is_ident+0x9c>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     117c <str_is_ident+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     117c <str_is_ident+0x7c>
movl   $0x1,-0x4(%rbp)
jmp    119c <str_is_ident+0x9c>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    1195 <str_is_ident+0x95>
movl   $0x1,-0x4(%rbp)
jmp    119c <str_is_ident+0x9c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_is_ident>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
mov    %edi,%ecx
and    $0xdf,%cl
add    $0xbf,%cl
cmp    $0x1a,%cl
setb   %cl
cmp    $0x5f,%dil
sete   %dl
or     %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @str_is_ident(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %36
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 97
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 122
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %2
br label %36
21: ; preds = %16, %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sge i32 %23, 65
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 90
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 1, i32* %2
br label %36
30: ; preds = %25, %21
%31 = load i8, i8* %3
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 95
br i1 %33, label %34, label %35
34: ; preds = %30
store i32 1, i32* %2
br label %36
35: ; preds = %30
store i32 0, i32* %2
br label %36
36: ; preds = %35, %34, %29, %20, %11
%37 = load i32, i32* %2
ret i32 %37
}

LLVM IR (-O2):
define i32 @str_is_ident(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 26
%7 = or i1 %3, %6
%8 = icmp eq i8 %0, 95
%9 = or i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
void omap_iommu_save_ctx(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @omap_iommu_save_ctx(%struct.device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mrpu(unsigned long);
int /*<<< orphan*/ putc(char);
void mprintu(unsigned long x) {
  if (x == 0)
    putc('0');
  else
    mrpu(x);
  putc(' ');
}


x86 assembly (clang, -O0):
<mprintu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1146 <mprintu+0x26>
mov    $0x30,%edi
call   1040 <putc@plt>
jmp    114f <mprintu+0x2f>
mov    -0x8(%rbp),%rdi
call   1030 <mrpu@plt>
mov    $0x20,%edi
call   1040 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mprintu>:
push   %rax
test   %rdi,%rdi
je     112d <mprintu+0xd>
call   1030 <mrpu@plt>
jmp    1137 <mprintu+0x17>
mov    $0x30,%edi
call   1040 <putc@plt>
mov    $0x20,%edi
pop    %rax
jmp    1040 <putc@plt>

LLVM IR (-O0):
define void @mprintu(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @putc(i8 signext 48)
br label %10
7: ; preds = %1
%8 = load i64, i64* %2
%9 = call i32 @mrpu(i64 %8)
br label %10
10: ; preds = %7, %5
%11 = call i32 @putc(i8 signext 32)
ret void
}

LLVM IR (-O2):
define void @mprintu(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @putc(i8 signext 48)
br label %7
5: ; preds = %1
%6 = tail call i32 @mrpu(i64 %0)
br label %7
7: ; preds = %5, %3
%8 = tail call i32 @putc(i8 signext 32)
ret void
}
char *RCSid() {
  return RCSid("$Id: hidden3d.c,v 1.82.2.4 2013/01/21 17:46:51 sfeam Exp $");
}


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

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

LLVM IR (-O0):
@.str = [59 x i8] c"$Id: hidden3d.c,v 1.82.2.4 2013/01/21 17:46:51 sfeam Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *, double);
int main() {
  double ln;
  ln = 0;
  for (ln = 0; getchar() != '\n'; ln++)
    ;
  printf("%.0f\n", ln);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     116e <main+0x4e>
jmp    1157 <main+0x37>
movsd  0xea1(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113f <main+0x1f>
movsd  -0x10(%rbp),%xmm0
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
xorpd  %xmm0,%xmm0
cmp    $0xa,%al
je     115d <main+0x3d>
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addsd  0xeb8(%rip),%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <getchar@plt>
movsd  (%rsp),%xmm0
cmp    $0xa,%al
jne    1140 <main+0x20>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %2
br label %3
3: ; preds = %8, %0
%4 = call signext i8 (...) @getchar()
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %3
br label %8
8: ; preds = %7
%9 = load double, double* %2
%10 = fadd double %9, 1.000000e+00
store double %10, double* %2
br label %3
11: ; preds = %3
%12 = load double, double* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.0f\0A\00"
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = icmp eq i8 %1, 10
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = phi double [ %5, %3 ], [ 0.000000e+00, %0 ]
%5 = fadd double %4, 1.000000e+00
%6 = tail call signext i8 (...) @getchar()
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %3
8: ; preds = %3, %0
%9 = phi double [ 0.000000e+00, %0 ], [ %5, %3 ]
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ atof(char const *);
int /*<<< orphan*/ c_plsdidev(int, int, int /*<<< orphan*/, int);
int opt_jx(const char *opt, const char *myoptarg, void *client_data) {
  (void)opt;
  (void)client_data;
  c_plsdidev((-42), (-42), atof(myoptarg), (-42));
  return 0;
}


x86 assembly (clang, -O0):
<opt_jx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <atof@plt>
mov    %eax,%edx
mov    $0xffffffd6,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
call   1040 <c_plsdidev@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_jx>:
push   %rax
mov    %rsi,%rdi
call   1030 <atof@plt>
mov    $0xffffffd6,%edi
mov    $0xffffffd6,%esi
mov    %eax,%edx
mov    $0xffffffd6,%ecx
call   1040 <c_plsdidev@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @opt_jx(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = tail call i32 @atof(i8* %1)
%5 = tail call i32 @c_plsdidev(i32 -42, i32 -42, i32 %4, i32 -42)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ SA_Delay(int);
void SHAP_Delay(uint32_t delay) {
  if (delay <= (7))
    return;
  delay -= (7);
  SA_Delay(delay);
  return;
}


x86 assembly (clang, -O0):
<SHAP_Delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jg     112a <SHAP_Delay+0x1a>
jmp    113b <SHAP_Delay+0x2b>
mov    -0x4(%rbp),%eax
sub    $0x7,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <SA_Delay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAP_Delay>:
cmp    $0x8,%edi
jge    1116 <SHAP_Delay+0x6>
ret
add    $0xfffffff9,%edi
jmp    1030 <SA_Delay@plt>

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

LLVM IR (-O2):
define void @SHAP_Delay(i32 %0) {
%2 = icmp slt i32 %0, 8
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -7
%5 = tail call i32 @SA_Delay(i32 %4)
br label %6
6: ; preds = %1, %3
ret void
}
void RTSocketSgWriteLV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSocketSgWriteLV() {
ret void
}
int op_add(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<op_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_add>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @op_add(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @op_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void const *, int);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
int32_t voip_readInt32(const void *p) {
  int32_t v;
  memcpy(&v, p, 4);
  return ntohl(v);
}


x86 assembly (clang, -O0):
<voip_readInt32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%edi
call   1040 <ntohl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<voip_readInt32>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%edi
call   1040 <ntohl@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @voip_readInt32(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(i32* %3, i8* %4, i32 4)
%6 = load i32, i32* %3
%7 = call i32 @ntohl(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @voip_readInt32(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
%6 = call i32 @ntohl(i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void testDestroy(void *data) { free(data); }


x86 assembly (clang, -O0):
<testDestroy>:
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):
<testDestroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @testDestroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int clear_quaddobl_data(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(248, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<clear_quaddobl_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xf8,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_quaddobl_data>:
mov    $0xf8,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @clear_quaddobl_data() {
%1 = tail call i32 @_ada_use_c2phc(i32 248, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ __covmalloc_init();
int /*<<< orphan*/ real_free(void *);
void free(void *__ptr) {
  __covmalloc_init();
  real_free(__ptr);
}


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

x86 assembly (clang, -O2):
<free>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <__covmalloc_init@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <real_free@plt>

LLVM IR (-O0):
define void @free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @__covmalloc_init()
%4 = load i8*, i8** %2
%5 = call i32 @real_free(i8* %4)
ret void
}

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = tail call i32 (...) @__covmalloc_init()
%3 = tail call i32 @real_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void TransmitPacketComplete(void) {
  printf("\n");
  printf("Packet Transfer Complete\n");
}


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

x86 assembly (clang, -O2):
<TransmitPacketComplete>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@str = [25 x i8] c"Packet Transfer Complete\00"
define void @TransmitPacketComplete() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G32_f(char *s) {
  debug("G32_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


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

x86 assembly (clang, -O2):
<G32_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"G32_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G32_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"G32_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G32_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
scalar_t__ fabs(float);
float f_min(float x, float b) {
  x = b - x;
  x += fabs(x);
  x *= 0.5;
  x = b - x;
  return x;
}


x86 assembly (clang, -O0):
<f_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2ss %rax,%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_min>:
push   %rax
movss  %xmm1,0x4(%rsp)
subss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movaps %xmm1,%xmm0
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
addss  (%rsp),%xmm0
mulss  0xec3(%rip),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @f_min(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = fsub float %5, %6
store float %7, float* %3
%8 = load float, float* %3
%9 = call i64 @fabs(float %8)
%10 = sitofp i64 %9 to float
%11 = load float, float* %3
%12 = fadd float %11, %10
store float %12, float* %3
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = fmul double %14, 5.000000e-01
%16 = fptrunc double %15 to float
store float %16, float* %3
%17 = load float, float* %4
%18 = load float, float* %3
%19 = fsub float %17, %18
store float %19, float* %3
%20 = load float, float* %3
ret float %20
}

LLVM IR (-O2):
define float @f_min(float %0, float %1) {
%3 = fsub float %1, %0
%4 = tail call i64 @fabs(float %3)
%5 = sitofp i64 %4 to float
%6 = fadd float %3, %5
%7 = fmul float %6, 5.000000e-01
%8 = fsub float %1, %7
ret float %8
}
int main(void) {
  1.0 != 3;
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_move_current_standard_to_next(int *cursor) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(454, cursor, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_move_current_standard_to_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1c6,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_move_current_standard_to_next>:
mov    %rdi,%rsi
mov    $0x1c6,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @solcon_move_current_standard_to_next(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 454, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_move_current_standard_to_next(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 454, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_unlock(pthread_mutex_t *mutex) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_mutex_unlock(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *mmdb_strdup(const char *str) {
  size_t len;
  char *copy;
  len = strlen(str) + 1;
  if ((copy = malloc(len)) == NULL)
    return (NULL);
  memcpy(copy, str, len);
  return (copy);
}


x86 assembly (clang, -O0):
<mmdb_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1172 <mmdb_strdup+0x42>
movq   $0x0,-0x8(%rbp)
jmp    118b <mmdb_strdup+0x5b>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmdb_strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1161 <mmdb_strdup+0x31>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @mmdb_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %4)
br label %9
9: ; preds = %1, %7
ret i8* %5
}
void hdp_data_set_byte(unsigned char *data, const int length,
                       const int byte_position, const int byte) {
  if (byte_position >= length) {
    return;
  }
  data[byte_position] = byte;
}


x86 assembly (clang, -O0):
<hdp_data_set_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1122 <hdp_data_set_byte+0x22>
jmp    1132 <hdp_data_set_byte+0x32>
mov    -0x14(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdp_data_set_byte>:
cmp    %esi,%edx
jge    110a <hdp_data_set_byte+0xa>
movslq %edx,%rax
mov    %cl,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define void @hdp_data_set_byte(i8* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %2, %1
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = trunc i32 %3 to i8
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 %7, i8* %9
br label %10
10: ; preds = %4, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_wrapper(void *unused, void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<free_wrapper>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_wrapper(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
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @free_wrapper(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
char *strcasestr(char const *, char *);
int main(void) {
  const char *big = "BigString";
  char *cp = strcasestr(big, "Gst");
  return (big + 2 != cp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcasestr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x2,%rax
cmp    -0x18(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeeb(%rip),%rsi
call   1030 <strcasestr@plt>
lea    0xed7(%rip),%rdx
xor    %ecx,%ecx
cmp    %rdx,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"BigString\00"
@.str.1 = [4 x i8] c"Gst\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strcasestr(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 2
%8 = load i8*, i8** %3
%9 = icmp ne i8* %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@.str = [10 x i8] c"BigString\00"
@.str.1 = [4 x i8] c"Gst\00"
define i32 @main() {
%1 = tail call i8* @strcasestr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp ne i8* %1, getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 2)
%3 = zext i1 %2 to i32
ret i32 %3
}
int fnv1a(char c, int currenthash) { return ((int)((c ^ currenthash) * 997)); }


x86 assembly (clang, -O0):
<fnv1a>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
xor    -0x8(%rbp),%eax
imul   $0x3e5,%eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnv1a>:
xor    %esi,%edi
imul   $0x3e5,%edi,%eax
ret

LLVM IR (-O0):
define i32 @fnv1a(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i32, i32* %4
%8 = xor i32 %6, %7
%9 = mul nsw i32 %8, 997
ret i32 %9
}

LLVM IR (-O2):
define i32 @fnv1a(i8 signext %0, i32 %1) {
%3 = sext i8 %0 to i32
%4 = xor i32 %3, %1
%5 = mul nsw i32 %4, 997
ret i32 %5
}
/* Variables and functions */
void *dlopen(char const *, int);
void *SEC_OSAL_dlopen(const char *filename, int flag) {
  return dlopen(filename, flag);
}


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

x86 assembly (clang, -O2):
<SEC_OSAL_dlopen>:
jmp    1030 <dlopen@plt>

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

LLVM IR (-O2):
define i8* @SEC_OSAL_dlopen(i8* %0, i32 %1) {
%3 = tail call i8* @dlopen(i8* %0, i32 %1)
ret i8* %3
}
/* Type definitions */
typedef double complex;

/* Variables and functions */
int main(void) {
  complex x = 1.0;
  (void)x;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movsd  0xeed(%rip),%xmm0
movsd  %xmm0,-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 double
store i32 0, i32* %1
store double 1.000000e+00, double* %2
%3 = load double, double* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ caseif1(int /*<<< orphan*/);
void caseif(void) { caseif1(0); }


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

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

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

LLVM IR (-O2):
define void @caseif() {
%1 = tail call i32 @caseif1(i32 0)
ret void
}
/* Variables and functions */
scalar_t__ strncmp(char const *, char const *, size_t);
int starts_withn(const char str[], const char prefix[], size_t prefix_len) {
  return strncmp(str, prefix, prefix_len) == 0;
}


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

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

LLVM IR (-O0):
define i32 @starts_withn(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @strncmp(i8* %7, i8* %8, i64 %9)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @starts_withn(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i64 %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ print_one(char *);
int /*<<< orphan*/ print_three(char *);
int /*<<< orphan*/ print_two(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  print_one("ONE\n");
  print_two("TWO\n");
  print_three("THREE\n");
  printf("CALYPSO running ... bye!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
call   1050 <print_one@plt>
lea    0xe9c(%rip),%rdi
call   1060 <print_two@plt>
lea    0xe95(%rip),%rdi
call   1040 <print_three@plt>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <print_one@plt>
lea    0xeb1(%rip),%rdi
call   1060 <print_two@plt>
lea    0xeaa(%rip),%rdi
call   1040 <print_three@plt>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"ONE\0A\00"
@.str.1 = [5 x i8] c"TWO\0A\00"
@.str.2 = [7 x i8] c"THREE\0A\00"
@.str.3 = [26 x i8] c"CALYPSO running ... bye!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @print_one(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @print_two(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @print_three(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"ONE\0A\00"
@.str.1 = [5 x i8] c"TWO\0A\00"
@.str.2 = [7 x i8] c"THREE\0A\00"
@str = [25 x i8] c"CALYPSO running ... bye!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @print_one(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @print_two(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @print_three(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  struct Foo {
    int a;
  } foo;
  struct Foo bar;
  foo.a = 1;
  bar.a = 2;
  assert(foo.a == 1);
  assert(bar.a == 2);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.Foo = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.Foo
%3 = alloca %struct.Foo
store i32 0, i32* %1
%4 = getelementptr inbounds %struct.Foo, %struct.Foo* %2, i32 0, i32 0
store i32 1, i32* %4
%5 = getelementptr inbounds %struct.Foo, %struct.Foo* %3, i32 0, i32 0
store i32 2, i32* %5
%6 = getelementptr inbounds %struct.Foo, %struct.Foo* %2, i32 0, i32 0
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = getelementptr inbounds %struct.Foo, %struct.Foo* %3, i32 0, i32 0
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 2
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret i32 0
}

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

/* Variables and functions */
int ENOSYS;
int gpio_export_link(struct device *dev, const char *name, unsigned gpio) {
  return -ENOSYS;
}


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

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

LLVM IR (-O0):
%struct.device = type { i32 }
@ENOSYS = global i32 0
define i32 @gpio_export_link(%struct.device* %0, i8* %1, i32 %2) {
%4 = alloca %struct.device*
%5 = alloca i8*
%6 = alloca i32
store %struct.device* %0, %struct.device** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
%struct.device = type { i32 }
@ENOSYS = global i32 0
define i32 @gpio_export_link(%struct.device* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void other_func() { printf("HELLO other_func\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"HELLO other_func\00"
define void @other_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
reg0adr1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if (r0 <= (*((short *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0adr1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movswl -0x6(%rbp),%eax
mov    $0xa98ac7,%ecx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jg     113f <reg0adr1+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <reg0adr1+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0adr1>:
movswl %di,%ecx
movswl 0xa98ac7,%edx
xor    %eax,%eax
cmp    %edx,%ecx
setle  %al
ret

LLVM IR (-O0):
define i32 @reg0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* %8
%17 = sext i16 %16 to i32
%18 = load i16, i16* inttoptr (i64 11111111 to i16*)
%19 = sext i16 %18 to i32
%20 = icmp sle i32 %17, %19
br i1 %20, label %21, label %22
21: ; preds = %6
store i32 1, i32* %7
br label %23
22: ; preds = %6
store i32 0, i32* %7
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @reg0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = shl i32 %0, 16
%8 = ashr exact i32 %7, 16
%9 = load i16, i16* inttoptr (i64 11111111 to i16*)
%10 = sext i16 %9 to i32
%11 = icmp sle i32 %8, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int SIGINT;
int /*<<< orphan*/ gwtCleanupAfterSignal();
int /*<<< orphan*/ gwtResetLineState();
int /*<<< orphan*/ gwtWriteSignal(int);
void gwtSignalHandler(int sig) {
  gwtWriteSignal(sig);
  if (sig == SIGINT)
    gwtResetLineState();
  else
    gwtCleanupAfterSignal();
}


x86 assembly (clang, -O0):
<gwtSignalHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <gwtWriteSignal@plt>
mov    -0x4(%rbp),%eax
mov    0x2e9b(%rip),%rcx
cmp    (%rcx),%eax
jne    1161 <gwtSignalHandler+0x31>
mov    $0x0,%al
call   1040 <gwtResetLineState@plt>
jmp    1168 <gwtSignalHandler+0x38>
mov    $0x0,%al
call   1050 <gwtCleanupAfterSignal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gwtSignalHandler>:
push   %rbx
mov    %edi,%ebx
call   1030 <gwtWriteSignal@plt>
mov    0x2ea9(%rip),%rax
cmp    %ebx,(%rax)
jne    114b <gwtSignalHandler+0x1b>
xor    %eax,%eax
pop    %rbx
jmp    1040 <gwtResetLineState@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <gwtCleanupAfterSignal@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
define void @gwtSignalHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @gwtWriteSignal(i32 %3)
%5 = load i32, i32* %2
%6 = load i32, i32* @SIGINT
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @gwtResetLineState()
br label %12
10: ; preds = %1
%11 = call i32 (...) @gwtCleanupAfterSignal()
br label %12
12: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
define void @gwtSignalHandler(i32 %0) {
%2 = tail call i32 @gwtWriteSignal(i32 %0)
%3 = load i32, i32* @SIGINT
%4 = icmp eq i32 %3, %0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @gwtResetLineState()
br label %9
7: ; preds = %1
%8 = tail call i32 (...) @gwtCleanupAfterSignal()
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int Quit() { exit(0); }


x86 assembly (clang, -O0):
<Quit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<Quit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @Quit() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @Quit() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct ssds_client {
  int dummy;
};

/* Variables and functions */
struct ssds_client *get_ssds_client(int ix) {
  struct ssds_client *cli = NULL;
  return cli;
}


x86 assembly (clang, -O0):
<get_ssds_client>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ssds_client = type { i32 }
define %struct.ssds_client* @get_ssds_client(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.ssds_client*
store i32 %0, i32* %2
store %struct.ssds_client* null, %struct.ssds_client** %3
%4 = load %struct.ssds_client*, %struct.ssds_client** %3
ret %struct.ssds_client* %4
}

LLVM IR (-O2):
%struct.ssds_client = type { i32 }
define noalias %struct.ssds_client* @get_ssds_client(i32 %0) {
ret %struct.ssds_client* null
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void rtError(const char *s) {
  printf("Runtime Error: %s\n", s);
  exit(0);
}


x86 assembly (clang, -O0):
<rtError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<rtError>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Runtime Error: %s\0A\00"
define void @rtError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"Runtime Error: %s\0A\00"
define void @rtError(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int maj_elem(int *, int);
int test_no_maj_elem_even() {
  int array[] = {1, 5, 2, 5, 9, 5, 9, 5, 1, 5};
  return -1 == maj_elem(array, 10);
}


x86 assembly (clang, -O0):
<test_no_maj_elem_even>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <maj_elem@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_no_maj_elem_even>:
sub    $0x28,%rsp
mov    0xf05(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <maj_elem@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test_no_maj_elem_even.array = [10 x i32] [i32 1, i32 5, i32 2, i32 5, i32 9, i32 5, i32 9, i32 5, i32 1, i32 5]
define i32 @test_no_maj_elem_even() {
%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 @maj_elem(i32* %3, i32 10)
%5 = icmp eq i32 -1, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@__const.test_no_maj_elem_even.array = [10 x i32] [i32 1, i32 5, i32 2, i32 5, i32 9, i32 5, i32 9, i32 5, i32 1, i32 5]
define i32 @test_no_maj_elem_even() {
%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 @maj_elem(i32* %3, i32 10)
%5 = icmp eq i32 %4, -1
%6 = zext i1 %5 to i32
ret i32 %6
}