xunge/DecIR huggingface dataset:
/* Variables and functions */
double genexp(double);
void exp_rndc(int n, double dof, double *array) {
  int i;
  for (i = 0; i < n; i++)
    *(array + i) = genexp(dof);
}


x86 assembly (clang, -O0):
<exp_rndc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115c <exp_rndc+0x4c>
movsd  -0x10(%rbp),%xmm0
call   1030 <genexp@plt>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112b <exp_rndc+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_rndc>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
test   %edi,%edi
jle    114a <exp_rndc+0x3a>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
movsd  %xmm0,0x8(%rsp)
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm0
call   1030 <genexp@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <exp_rndc+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @exp_rndc(i32 %0, double %1, double* nocapture writeonly %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %13
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %11, %7 ]
%9 = tail call double @genexp(double %1)
%10 = getelementptr inbounds double, double* %2, i64 %8
store double %9, double* %10
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %6
br i1 %12, label %13, label %7
13: ; preds = %7, %3
ret void
}
/* Type definitions */
struct dns_resolver_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct dns_resolver_t *);
void dns_destroy_resolver(struct dns_resolver_t *r) { free(r); }


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

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

LLVM IR (-O2):
%struct.dns_resolver_t = type { i32 }
define void @dns_destroy_resolver(%struct.dns_resolver_t* nocapture %0) {
%2 = tail call i32 @free(%struct.dns_resolver_t* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *,
                           char const *, char const *);
int /*<<< orphan*/ output_level(int /*<<< orphan*/ *, int);
void output_fixed(FILE *outptr, const char *tag, const char *value, int level) {
  output_level(outptr, level);
  fprintf(outptr, "<%s>%s</%s>\n", tag, value, tag);
}


x86 assembly (clang, -O0):
<output_fixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <output_level@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xea6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_fixed>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %ecx,%esi
call   1040 <output_level@plt>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r15,%r8
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"<%s>%s</%s>\0A\00"
define void @output_fixed(i32* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32* %0, i32** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %8
%11 = call i32 @output_level(i32* %9, i32 %10)
%12 = load i32*, i32** %5
%13 = load i8*, i8** %6
%14 = load i8*, i8** %7
%15 = load i8*, i8** %6
%16 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<%s>%s</%s>\0A\00"
define void @output_fixed(i32* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @output_level(i32* %0, i32 %3)
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcat(char *, char *);
void getPidInfo(int pid) {
  char procIdFp[25];
  char infoBuf[25];
  char tempBuf[2048];
  int end;
  sprintf(procIdFp, "/proc/%d/", pid);
  char *sched = "sched";
  strcat(tempBuf, sched);
}


x86 assembly (clang, -O0):
<getPidInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x850,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec4(%rip),%rsi
call   1040 <sprintf@plt>
lea    0xec2(%rip),%rax
mov    %rax,-0x850(%rbp)
lea    -0x840(%rbp),%rdi
mov    -0x850(%rbp),%rsi
call   1030 <strcat@plt>
add    $0x850,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPidInfo>:
sub    $0x828,%rsp
mov    %edi,%edx
lea    0xed0(%rip),%rsi
mov    %rsp,%rdi
call   1040 <sprintf@plt>
lea    0xecb(%rip),%rsi
lea    0x20(%rsp),%rdi
call   1030 <strcat@plt>
add    $0x828,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/proc/%d/\00"
@.str.1 = [6 x i8] c"sched\00"
define void @getPidInfo(i32 %0) {
%2 = alloca i32
%3 = alloca [25 x i8]
%4 = alloca [25 x i8]
%5 = alloca [2048 x i8]
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %2
%8 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %9)
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %7
%11 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%12 = load i8*, i8** %7
%13 = call i32 @strcat(i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"/proc/%d/\00"
@.str.1 = [6 x i8] c"sched\00"
define void @getPidInfo(i32 %0) {
%2 = alloca [25 x i8]
%3 = alloca [2048 x i8]
%4 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%6 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ read(int, unsigned char *, unsigned int);
ssize_t i2c_read(int fd, unsigned char *buf, unsigned int len) {
  assert(NULL != buf);
  return read(fd, buf, len);
}


x86 assembly (clang, -O0):
<i2c_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_read>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
test   %rsi,%rsi
setne  %dil
call   1040 <assert@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <read@plt>

LLVM IR (-O0):
define i32 @i2c_read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = icmp ne i8* null, %7
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @read(i32 %11, i8* %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @i2c_read(i32 %0, i8* %1, i32 %2) {
%4 = icmp ne i8* %1, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
ret i32 %7
}
/* Type definitions */
struct rb_root {
  int dummy;
};
struct rb_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RB_CLEAR_NODE(struct rb_node *);
int /*<<< orphan*/ rb_erase(struct rb_node *, struct rb_root *);
void rb_erase_init(struct rb_node *n, struct rb_root *root) {
  rb_erase(n, root);
  RB_CLEAR_NODE(n);
}


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

x86 assembly (clang, -O2):
<rb_erase_init>:
push   %rbx
mov    %rdi,%rbx
call   1030 <rb_erase@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <RB_CLEAR_NODE@plt>

LLVM IR (-O0):
%struct.rb_node = type { i32 }
%struct.rb_root = type { i32 }
define void @rb_erase_init(%struct.rb_node* %0, %struct.rb_root* %1) {
%3 = alloca %struct.rb_node*
%4 = alloca %struct.rb_root*
store %struct.rb_node* %0, %struct.rb_node** %3
store %struct.rb_root* %1, %struct.rb_root** %4
%5 = load %struct.rb_node*, %struct.rb_node** %3
%6 = load %struct.rb_root*, %struct.rb_root** %4
%7 = call i32 @rb_erase(%struct.rb_node* %5, %struct.rb_root* %6)
%8 = load %struct.rb_node*, %struct.rb_node** %3
%9 = call i32 @RB_CLEAR_NODE(%struct.rb_node* %8)
ret void
}

LLVM IR (-O2):
%struct.rb_node = type { i32 }
%struct.rb_root = type { i32 }
define void @rb_erase_init(%struct.rb_node* %0, %struct.rb_root* %1) {
%3 = tail call i32 @rb_erase(%struct.rb_node* %0, %struct.rb_root* %1)
%4 = tail call i32 @RB_CLEAR_NODE(%struct.rb_node* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ nl_catd;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int catclose(nl_catd catd) {
  printf("catclose NYI\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"catclose NYI\0A\00"
define i32 @catclose(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"catclose NYI\00"
define i32 @catclose(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double sqrt(double);
double lmd_m(double h) { return sqrt(h * h + 1.) + h; }


x86 assembly (clang, -O0):
<lmd_m>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecd(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
addsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmd_m>:
push   %rax
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm0
addsd  0xedf(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1131 <lmd_m+0x21>
sqrtsd %xmm0,%xmm0
jmp    1140 <lmd_m+0x30>
movsd  %xmm2,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm2
addsd  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @lmd_m(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double %3, double %4, double 1.000000e+00)
%6 = call double @sqrt(double %5)
%7 = load double, double* %2
%8 = fadd double %6, %7
ret double %8
}

LLVM IR (-O2):
define double @lmd_m(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 1.000000e+00)
%3 = tail call double @sqrt(double %2)
%4 = fadd double %3, %0
ret double %4
}
/* Variables and functions */
void *mf__mem_free(void *);
void *mem_free(void *ptr) {
  void *r_ptr = NULL;
  ;
  r_ptr = mf__mem_free(ptr);
  ;
  return (r_ptr);
}


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

x86 assembly (clang, -O2):
<mem_free>:
jmp    1030 <mf__mem_free@plt>

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

LLVM IR (-O2):
define i8* @mem_free(i8* %0) {
%2 = tail call i8* @mf__mem_free(i8* %0)
ret i8* %2
}
/* Variables and functions */
long double atan2(double, double);
__attribute__((weak)) long double atan2l(long double x, long double y) {
  return atan2((double)x, (double)y);
}


x86 assembly (clang, -O0):
<atan2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
fldt   -0x20(%rbp)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
call   1030 <atan2@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2l>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm1
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define weak x86_fp80 @atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call x86_fp80 @atan2(double %6, double %8)
ret x86_fp80 %9
}

LLVM IR (-O2):
define weak x86_fp80 @atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call x86_fp80 @atan2(double %3, double %4)
ret x86_fp80 %5
}
/* Variables and functions */
int /*<<< orphan*/ vec4d_scalarDiv_new(double *, double *, double const);
void vec4d_scalarDiv(double v[4], const double scalar) {
  vec4d_scalarDiv_new(v, v, scalar);
}


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

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

LLVM IR (-O0):
define void @vec4d_scalarDiv(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** %3
%7 = load double, double* %4
%8 = call i32 @vec4d_scalarDiv_new(double* %5, double* %6, double %7)
ret void
}

LLVM IR (-O2):
define void @vec4d_scalarDiv(double* %0, double %1) {
%3 = tail call i32 @vec4d_scalarDiv_new(double* %0, double* %0, double %1)
ret void
}
void I420ToRAW() {}


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

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

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

LLVM IR (-O2):
define void @I420ToRAW() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ProgCleanup();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void AbortProg(char *msg, int exitcode) {
  fflush(stdout);
  fprintf(stderr, "%s\n", msg);
  fprintf(stderr, "  -h for help\n");
  ProgCleanup();
  exit(exitcode);
}


x86 assembly (clang, -O0):
<AbortProg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe8f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
lea    0xe7c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <ProgCleanup@plt>
mov    -0xc(%rbp),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<AbortProg>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e81(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xe97(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xe87(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <ProgCleanup@plt>
mov    %r14d,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [15 x i8] c" -h for help\0A\00"
define void @AbortProg(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %3
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @ProgCleanup()
%13 = load i32, i32* %4
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [15 x i8] c" -h for help\0A\00"
define void @AbortProg(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 (...) @ProgCleanup()
%10 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ doJump();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ recur(int);
int /*<<< orphan*/ setJump();
int main(int argc, char **argv) {
  setJump();
  if (argc > 1) {
    recur(2);
  }
  doJump();
  printf("Bye.\n");
  return EXIT_SUCCESS;
}


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)
mov    $0x0,%al
call   1050 <setJump@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1171 <main+0x31>
mov    $0x2,%edi
call   1040 <recur@plt>
mov    $0x0,%al
call   1060 <doJump@plt>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <setJump@plt>
cmp    $0x2,%ebx
jl     1159 <main+0x19>
mov    $0x2,%edi
call   1040 <recur@plt>
xor    %eax,%eax
call   1060 <doJump@plt>
lea    0xe99(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Bye.\0A\00"
@EXIT_SUCCESS = global i32 0
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 (...) @setJump()
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @recur(i32 2)
br label %11
11: ; preds = %9, %2
%12 = call i32 (...) @doJump()
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [5 x i8] c"Bye.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @setJump()
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @recur(i32 2)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 (...) @doJump()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}
void element2CONTROLX(char c) {}


x86 assembly (clang, -O0):
<element2CONTROLX>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @element2CONTROLX(i8 signext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello world\n");
  printf("my dear baby\n");
  printf("come again baby\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
@.str.1 = [14 x i8] c"my dear baby\0A\00"
@.str.2 = [17 x i8] c"come again baby\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
@str.3 = [13 x i8] c"my dear baby\00"
@str.4 = [16 x i8] c"come again baby\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glOrtho(int /*<<< orphan*/, int, int /*<<< orphan*/, int,
                           int, int);
void init(void) {
  glClearColor(1.0, 1.0, 1.0, 1.0);
  glOrtho(0, 256, 0, 256, -1, 1);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
movsd  0xed4(%rip),%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1040 <glClearColor@plt>
xor    %edx,%edx
mov    $0x100,%ecx
mov    $0xffffffff,%r8d
mov    $0x1,%r9d
mov    %edx,%edi
mov    %ecx,%esi
call   1030 <glOrtho@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
movsd  0xed7(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
movaps %xmm0,%xmm3
call   1040 <glClearColor@plt>
xor    %edi,%edi
mov    $0x100,%esi
xor    %edx,%edx
mov    $0x100,%ecx
mov    $0xffffffff,%r8d
mov    $0x1,%r9d
pop    %rax
jmp    1030 <glOrtho@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 @glClearColor(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%2 = call i32 @glOrtho(i32 0, i32 256, i32 0, i32 256, i32 -1, i32 1)
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 @glClearColor(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%2 = tail call i32 @glOrtho(i32 0, i32 256, i32 0, i32 256, i32 -1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __enable_irq();
int /*<<< orphan*/ __set_BASEPRI(unsigned int);
void port_enable(void) {
  __set_BASEPRI(0U);
  __enable_irq();
}


x86 assembly (clang, -O0):
<port_enable>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <__set_BASEPRI@plt>
mov    $0x0,%al
call   1030 <__enable_irq@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<port_enable>:
push   %rax
xor    %edi,%edi
call   1040 <__set_BASEPRI@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__enable_irq@plt>

LLVM IR (-O0):
define void @port_enable() {
%1 = call i32 @__set_BASEPRI(i32 0)
%2 = call i32 (...) @__enable_irq()
ret void
}

LLVM IR (-O2):
define void @port_enable() {
%1 = tail call i32 @__set_BASEPRI(i32 0)
%2 = tail call i32 (...) @__enable_irq()
ret void
}
double power(double x, int n) {
  double ans = 1;
  while (n > 0) {
    if (n % 2 == 1) {
      ans *= x;
    }
    x = x * x;
    n /= 2;
  }
  return ans;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1168 <power+0x68>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1146 <power+0x46>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
jmp    1119 <power+0x19>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %edi,%edi
jle    1148 <power+0x48>
movsd  0xef4(%rip),%xmm2
movapd %xmm2,%xmm1
jmp    1133 <power+0x33>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm0
mov    %edi,%eax
shr    %eax
cmp    $0x1,%edi
mov    %eax,%edi
jbe    1143 <power+0x43>
movapd %xmm2,%xmm3
test   $0x1,%dil
je     1120 <power+0x20>
movapd %xmm0,%xmm3
jmp    1120 <power+0x20>
movapd %xmm1,%xmm0
ret
movsd  0xeb0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @power(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
store double 1.000000e+00, double* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i32, i32* %4
%11 = srem i32 %10, 2
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load double, double* %3
%15 = load double, double* %5
%16 = fmul double %15, %14
store double %16, double* %5
br label %17
17: ; preds = %13, %9
%18 = load double, double* %3
%19 = load double, double* %3
%20 = fmul double %18, %19
store double %20, double* %3
%21 = load i32, i32* %4
%22 = sdiv i32 %21, 2
store i32 %22, i32* %4
br label %6
23: ; preds = %6
%24 = load double, double* %5
ret double %24
}

LLVM IR (-O2):
define double @power(double %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2, %4
%5 = phi double [ %11, %4 ], [ 1.000000e+00, %2 ]
%6 = phi i32 [ %13, %4 ], [ %1, %2 ]
%7 = phi double [ %12, %4 ], [ %0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, double 1.000000e+00, double %7
%11 = fmul double %5, %10
%12 = fmul double %7, %7
%13 = lshr i32 %6, 1
%14 = icmp ult i32 %6, 2
br i1 %14, label %15, label %4
15: ; preds = %4, %2
%16 = phi double [ 1.000000e+00, %2 ], [ %11, %4 ]
ret double %16
}
int compare(p1, p2) const void *p1;
const void *p2;
{
  const char **v1;
  const char **v2;
  v1 = (const char **)p1;
  v2 = (const char **)p2;
  return strcmp(*v1, *v2);
}


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

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

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ __pgrp;
};
typedef TYPE_1__ posix_spawnattr_t;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int posix_spawnattr_getpgroup(const posix_spawnattr_t *attr, pid_t *pgrp) {
  *pgrp = attr->__pgrp;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @posix_spawnattr_getpgroup(%struct.TYPE_3__* %0, i32* %1) {
%3 = alloca %struct.TYPE_3__*
%4 = alloca i32*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %3
store i32* %1, i32** %4
%5 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
store i32 %7, i32* %8
ret i32 0
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @posix_spawnattr_getpgroup(%struct.TYPE_3__* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%4 = load i32, i32* %3
store i32 %4, i32* %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ draw_post_game();
void render_post_game() { draw_post_game(); }


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

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

LLVM IR (-O0):
define void @render_post_game() {
%1 = call i32 (...) @draw_post_game()
ret void
}

LLVM IR (-O2):
define void @render_post_game() {
%1 = tail call i32 (...) @draw_post_game()
ret void
}
void gtk_window_set_decorated() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_set_decorated() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ main2();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello!\n");
  main2();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"Hello!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @main2()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_WORM(struct list_head *);
uint8_t clear_dlt_WORM(struct list_head *m) {
  ;
  return clear_WORM(m);
}


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

x86 assembly (clang, -O2):
<clear_dlt_WORM>:
jmp    1030 <clear_WORM@plt>

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

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @clear_dlt_WORM(%struct.list_head* %0) {
%2 = tail call i32 @clear_WORM(%struct.list_head* %0)
ret i32 %2
}
/* Variables and functions */
char const *hash_error_string(int);
char const *strerror(int);
const char *error_string(int error) {
  if ((((error) >= -2000) && ((error) < (-2000 + 20))))
    return hash_error_string(error);
  return strerror(error);
}


x86 assembly (clang, -O0):
<error_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0xfffff830,-0xc(%rbp)
jl     1156 <error_string+0x36>
cmpl   $0xfffff844,-0xc(%rbp)
jge    1156 <error_string+0x36>
mov    -0xc(%rbp),%edi
call   1030 <hash_error_string@plt>
mov    %rax,-0x8(%rbp)
jmp    1162 <error_string+0x42>
mov    -0xc(%rbp),%edi
call   1040 <strerror@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_string>:
lea    0x7d0(%rdi),%eax
cmp    $0x13,%eax
ja     1130 <error_string+0x10>
jmp    1030 <hash_error_string@plt>
jmp    1040 <strerror@plt>

LLVM IR (-O0):
define i8* @error_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, -2000
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, -1980
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = call i8* @hash_error_string(i32 %10)
store i8* %11, i8** %2
br label %15
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = call i8* @strerror(i32 %13)
store i8* %14, i8** %2
br label %15
15: ; preds = %12, %9
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
define i8* @error_string(i32 %0) {
%2 = add i32 %0, 2000
%3 = icmp ult i32 %2, 20
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @hash_error_string(i32 %0)
br label %8
6: ; preds = %1
%7 = tail call i8* @strerror(i32 %0)
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %5, %4 ], [ %7, %6 ]
ret i8* %9
}
int getopt_long(nargc, nargv, options, long_options, idx)
int nargc;
char *const *nargv;
const char *options;
const struct option *long_options;
int *idx;
{ return (getopt_internal(nargc, nargv, options, long_options, idx, 0x01)); }


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

x86 assembly (clang, -O2):
<getopt_long>:
mov    $0x1,%r9d
xor    %eax,%eax
jmp    1030 <getopt_internal@plt>

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

LLVM IR (-O2):
%struct.option = type opaque
define i32 @getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...) bitcast (i32 (...)* @getopt_internal to i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...)*)(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ft_putbase(int, int);
int /*<<< orphan*/ ft_putchar(char);
void ft_putnbr(int n) {
  if (n < 0) {
    ft_putchar('-');
    ft_putbase(-n, 10);
  } else
    ft_putbase(n, 10);
}


x86 assembly (clang, -O0):
<ft_putnbr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1153 <ft_putnbr+0x33>
mov    $0x2d,%edi
call   1040 <ft_putchar@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
mov    $0xa,%esi
call   1030 <ft_putbase@plt>
jmp    1160 <ft_putnbr+0x40>
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
call   1030 <ft_putbase@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnbr>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jns    1133 <ft_putnbr+0x13>
mov    $0x2d,%edi
call   1040 <ft_putchar@plt>
neg    %ebx
mov    %ebx,%edi
mov    $0xa,%esi
pop    %rbx
jmp    1030 <ft_putbase@plt>

LLVM IR (-O0):
define void @ft_putnbr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = call i32 @ft_putchar(i8 signext 45)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
%9 = call i32 @ft_putbase(i32 %8, i32 10)
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i32 @ft_putbase(i32 %11, i32 10)
br label %13
13: ; preds = %10, %5
ret void
}

LLVM IR (-O2):
define void @ft_putnbr(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @ft_putchar(i8 signext 45)
%5 = sub nsw i32 0, %0
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 @ft_putbase(i32 %7, i32 10)
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_57(uint64_t x) {
  __asm__("rolq $57, %0" : "=r"(x) : "0"(x));
  return x;
}


x86 assembly (clang, -O0):
<ROL64_57>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
rol    $0x39,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROL64_57>:
mov    %rdi,%rax
rol    $0x39,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_57(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$57, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_57(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$57, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
void kol_paint_pixel(unsigned x, unsigned y, unsigned c) {
  asm("int $0x40" ::"a"(1), "b"(x), "c"(y), "d"(c));
}


x86 assembly (clang, -O0):
<kol_paint_pixel>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0xc(%rbp),%ebx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%edx
mov    $0x1,%eax
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_paint_pixel>:
push   %rbx
mov    %esi,%ecx
mov    %edi,%ebx
mov    $0x1,%eax
int    $0x40
pop    %rbx
ret

LLVM IR (-O0):
define void @kol_paint_pixel(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @kol_paint_pixel(i32 %0, i32 %1, i32 %2) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i32 1, i32 %0, i32 %1, i32 %2)
ret void
}
int filtersvr_qsort_cmp2(const void *p1, const void *p2) {
  int v1 = *(int *)p1;
  int v2 = *(int *)p2;
  if (v1 == v2) {
    return (0);
  }
  return ((v1 < v2) ? 1 : -1);
}


x86 assembly (clang, -O0):
<filtersvr_qsort_cmp2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    1136 <filtersvr_qsort_cmp2+0x36>
movl   $0x0,-0x4(%rbp)
jmp    114e <filtersvr_qsort_cmp2+0x4e>
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%esi
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<filtersvr_qsort_cmp2>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setl   %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @filtersvr_qsort_cmp2(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x = 0;
  while (1) {
    assert(x == 0);
  }
  assert(x != 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
mov    %al,-0x9(%rbp)
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <assert@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @assert(i32 1)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ handle_HUP(int /*<<< orphan*/);
int gen_HUP(void) {
  handle_HUP(0);
  return 0;
}


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

x86 assembly (clang, -O2):
<gen_HUP>:
push   %rax
xor    %edi,%edi
call   1030 <handle_HUP@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gen_HUP() {
%1 = call i32 @handle_HUP(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_HUP() {
%1 = tail call i32 @handle_HUP(i32 0)
ret i32 0
}
int compare_integer(void *data1, void *data2) {
  return ((*((int *)data2) - *((int *)data1)));
}


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

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

LLVM IR (-O0):
define i32 @compare_integer(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare_integer(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int to_code2_gps(unsigned char code) {
  switch (code) {
  case 14:
  case 16:
  case 17:
  case 18:
    return 0;
  case 19:
  case 21:
    return 1;
  case 15:
    return 2;
  case 20:
  case 23:
    return 3;
  }
  return 0;
}


x86 assembly (clang, -O0):
<to_code2_gps>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
add    $0xfffffff2,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x9,%eax
ja     1164 <to_code2_gps+0x64>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    116b <to_code2_gps+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    116b <to_code2_gps+0x6b>
movl   $0x2,-0x4(%rbp)
jmp    116b <to_code2_gps+0x6b>
movl   $0x3,-0x4(%rbp)
jmp    116b <to_code2_gps+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_code2_gps>:
add    $0xf1,%dil
xor    %eax,%eax
cmp    $0x8,%dil
ja     111a <to_code2_gps+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @to_code2_gps(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %10 [
i32 14, label %6
i32 16, label %6
i32 17, label %6
i32 18, label %6
i32 19, label %7
i32 21, label %7
i32 15, label %8
i32 20, label %9
i32 23, label %9
]
6: ; preds = %1, %1, %1, %1
store i32 0, i32* %2
br label %11
7: ; preds = %1, %1
store i32 1, i32* %2
br label %11
8: ; preds = %1
store i32 2, i32* %2
br label %11
9: ; preds = %1, %1
store i32 3, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@switch.table.to_code2_gps = [9 x i32] [i32 2, i32 0, i32 0, i32 0, i32 1, i32 3, i32 1, i32 0, i32 3]
define i32 @to_code2_gps(i8 zeroext %0) {
%2 = add i8 %0, -15
%3 = icmp ult i8 %2, 9
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [9 x i32], [9 x i32]* @switch.table.to_code2_gps, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}