xunge/DecIR huggingface dataset:
double f_b_d(double f_b_rep, double gamma_M) { return (f_b_rep / gamma_M); }


x86 assembly (clang, -O0):
<f_b_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_b_d>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f_b_d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @f_b_d(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
int nl_sendgetaddr_do(int, int /*<<< orphan*/, int /*<<< orphan*/, int,
                      int /*<<< orphan*/, int);
int nl_sendgetaddr6(int fd, uint32_t seq, uint32_t ifindex) {
  return nl_sendgetaddr_do(fd, seq, ifindex, 1, AF_INET6, 1);
}


x86 assembly (clang, -O0):
<nl_sendgetaddr6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    0x2eb7(%rip),%rax
mov    (%rax),%r8d
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1030 <nl_sendgetaddr_do@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nl_sendgetaddr6>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%r8d
mov    $0x1,%ecx
mov    $0x1,%r9d
jmp    1030 <nl_sendgetaddr_do@plt>

LLVM IR (-O0):
@AF_INET6 = global i32 0
define i32 @nl_sendgetaddr6(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
%10 = load i32, i32* @AF_INET6
%11 = call i32 @nl_sendgetaddr_do(i32 %7, i32 %8, i32 %9, i32 1, i32 %10, i32 1)
ret i32 %11
}

LLVM IR (-O2):
@AF_INET6 = global i32 0
define i32 @nl_sendgetaddr6(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @AF_INET6
%5 = tail call i32 @nl_sendgetaddr_do(i32 %0, i32 %1, i32 %2, i32 1, i32 %4, i32 1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void internal(void) {
  static unsigned int intfuncvar;
  printf("internal function\n");
}


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"internal function\00"
define void @internal() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void vaciarTrozos(char *trozos[], int maxTrozos) {
  int i = 0;
  for (; i < maxTrozos; i++)
    trozos[i] = NULL;
}


x86 assembly (clang, -O0):
<vaciarTrozos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <vaciarTrozos+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <vaciarTrozos+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vaciarTrozos>:
test   %esi,%esi
jle    1126 <vaciarTrozos+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @vaciarTrozos(i8** nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i8** %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
float absf(float a) { return a > -a ? a : -a; }


x86 assembly (clang, -O0):
<absf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
ucomiss %xmm1,%xmm0
jbe    1138 <absf+0x38>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    114f <absf+0x4f>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absf>:
movaps 0xef9(%rip),%xmm1
xorps  %xmm0,%xmm1
maxss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @absf(float %0) {
%2 = fneg float %0
%3 = fcmp olt float %2, %0
%4 = select i1 %3, float %0, float %2
ret float %4
}
/* Variables and functions */
char *rmalloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char);
char *get_short_option(char opt) {
  char *ptr;
  ptr = rmalloc(3);
  sprintf(ptr, "-%c", opt);
  return ptr;
}


x86 assembly (clang, -O0):
<get_short_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3,%edi
call   1030 <rmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
movsbl -0x1(%rbp),%edx
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_short_option>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x3,%edi
call   1030 <rmalloc@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"-%c\00"
define i8* @get_short_option(i8 signext %0) {
%2 = tail call i8* @rmalloc(i32 3)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret i8* %2
}
int neitherNullable(int *a, int *b) { return *a + *b; }


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

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

LLVM IR (-O0):
define i32 @neitherNullable(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @neitherNullable(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
double trunc(double);
double round_zero(double x, double scale) {
  return (scale == 1.0 ? trunc(x) : trunc(x / scale) * scale);
}


x86 assembly (clang, -O0):
<round_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1153 <round_zero+0x43>
jp     1153 <round_zero+0x43>
movsd  -0x8(%rbp),%xmm0
call   1030 <trunc@plt>
movsd  %xmm0,-0x18(%rbp)
jmp    116c <round_zero+0x5c>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <trunc@plt>
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_zero>:
push   %rax
ucomisd 0xee7(%rip),%xmm1
jne    1123 <round_zero+0x13>
jp     1123 <round_zero+0x13>
pop    %rax
jmp    1030 <trunc@plt>
divsd  %xmm1,%xmm0
movsd  %xmm1,(%rsp)
call   1030 <trunc@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @round_zero(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fcmp oeq double %5, 1.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load double, double* %3
%9 = call double @llvm.trunc.f64(double %8)
br label %17
10: ; preds = %2
%11 = load double, double* %3
%12 = load double, double* %4
%13 = fdiv double %11, %12
%14 = call double @llvm.trunc.f64(double %13)
%15 = load double, double* %4
%16 = fmul double %14, %15
br label %17
17: ; preds = %10, %7
%18 = phi double [ %9, %7 ], [ %16, %10 ]
ret double %18
}

LLVM IR (-O2):
define double @round_zero(double %0, double %1) {
%3 = fcmp oeq double %1, 1.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call double @llvm.trunc.f64(double %0)
br label %10
6: ; preds = %2
%7 = fdiv double %0, %1
%8 = tail call double @llvm.trunc.f64(double %7)
%9 = fmul double %8, %1
br label %10
10: ; preds = %6, %4
%11 = phi double [ %5, %4 ], [ %9, %6 ]
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void clean_up(const char *key, void *val) {
  printf("cleaning up value for key \"%s\"\n", key);
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"cleaning up value for key \22%s\22\0A\00"
define void @clean_up(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"cleaning up value for key \22%s\22\0A\00"
define void @clean_up(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int mc13xxx_adc_probe(struct device_d *dev, struct mc13xxx *mc_dev) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.device_d = type opaque
%struct.mc13xxx = type opaque
define i32 @mc13xxx_adc_probe(%struct.device_d* nocapture readnone %0, %struct.mc13xxx* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int LOG_CRIT;
int LOG_DEBUG;
int LOG_ERR;
int LOG_INFO;
int LOG_WARNING;
int log_xrdp2syslog(const int lvl) {
  switch (lvl) {
  case 0:
    return LOG_CRIT;
  case 1:
    return LOG_ERR;
  case 2:
    return LOG_WARNING;
  case 3:
    return LOG_INFO;
  default:
    return LOG_DEBUG;
  }
}


x86 assembly (clang, -O0):
<log_xrdp2syslog>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x3,%rax
ja     1170 <log_xrdp2syslog+0x70>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117c <log_xrdp2syslog+0x7c>
mov    0x2e74(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117c <log_xrdp2syslog+0x7c>
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117c <log_xrdp2syslog+0x7c>
mov    0x2e62(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117c <log_xrdp2syslog+0x7c>
mov    0x2e59(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_xrdp2syslog>:
cmp    $0x3,%edi
ja     1116 <log_xrdp2syslog+0x16>
movslq %edi,%rax
lea    0x2d19(%rip),%rcx
mov    (%rcx,%rax,8),%rax
mov    (%rax),%eax
ret
mov    0x2ec3(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@LOG_CRIT = global i32 0
@LOG_ERR = global i32 0
@LOG_WARNING = global i32 0
@LOG_INFO = global i32 0
@LOG_DEBUG = global i32 0
define i32 @log_xrdp2syslog(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %11
]
5: ; preds = %1
%6 = load i32, i32* @LOG_CRIT
store i32 %6, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* @LOG_ERR
store i32 %8, i32* %2
br label %15
9: ; preds = %1
%10 = load i32, i32* @LOG_WARNING
store i32 %10, i32* %2
br label %15
11: ; preds = %1
%12 = load i32, i32* @LOG_INFO
store i32 %12, i32* %2
br label %15
13: ; preds = %1
%14 = load i32, i32* @LOG_DEBUG
store i32 %14, i32* %2
br label %15
15: ; preds = %13, %11, %9, %7, %5
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@LOG_CRIT = global i32 0
@LOG_ERR = global i32 0
@LOG_WARNING = global i32 0
@LOG_INFO = global i32 0
@LOG_DEBUG = global i32 0
@switch.table.log_xrdp2syslog = [4 x i32*] [i32* @LOG_CRIT, i32* @LOG_ERR, i32* @LOG_WARNING, i32* @LOG_INFO]
define i32 @log_xrdp2syslog(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [4 x i32*], [4 x i32*]* @switch.table.log_xrdp2syslog, i64 0, i64 %4
%6 = load i32*, i32** %5
br label %7
7: ; preds = %1, %3
%8 = phi i32* [ %6, %3 ], [ @LOG_DEBUG, %1 ]
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ __print_int(int);
int /*<<< orphan*/ printf(char *);
void b(int a) {
  printf("b() called\n");
  __print_int(a);
}


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

x86 assembly (clang, -O2):
<b>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <__print_int@plt>

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

LLVM IR (-O2):
@str = [11 x i8] c"b() called\00"
define void @b(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @__print_int(i32 %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xdestroywindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xdestroywindow_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xdestroywindow.serial = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xdestroywindow_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xdestroywindow_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int Cyc_Unify_unify_and_constrain(unsigned int, void *, void *);
int Cyc_Tcdecl_check_type(unsigned loc, void *t0, void *t1) {
  int _T0;
  _T0 = Cyc_Unify_unify_and_constrain(loc, t0, t1);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Tcdecl_check_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <Cyc_Unify_unify_and_constrain@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcdecl_check_type>:
jmp    1030 <Cyc_Unify_unify_and_constrain@plt>

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

LLVM IR (-O2):
define i32 @Cyc_Tcdecl_check_type(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @Cyc_Unify_unify_and_constrain(i32 %0, i8* %1, i8* %2)
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
void short2be(uint8_t *be, unsigned short value) {
  be[0] = (uint8_t)((value >> 8) & 0xff);
  be[1] = (uint8_t)((value >> 0) & 0xff);
}


x86 assembly (clang, -O0):
<short2be>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x0,%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<short2be>:
mov    %esi,%eax
shr    $0x8,%rax
mov    %rax,(%rdi)
movzbl %sil,%eax
mov    %rax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @short2be(i64* %0, i16 zeroext %1) {
%3 = alloca i64*
%4 = alloca i16
store i64* %0, i64** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = sext i32 %8 to i64
%10 = load i64*, i64** %3
%11 = getelementptr inbounds i64, i64* %10, i64 0
store i64 %9, i64* %11
%12 = load i16, i16* %4
%13 = zext i16 %12 to i32
%14 = ashr i32 %13, 0
%15 = and i32 %14, 255
%16 = sext i32 %15 to i64
%17 = load i64*, i64** %3
%18 = getelementptr inbounds i64, i64* %17, i64 1
store i64 %16, i64* %18
ret void
}

LLVM IR (-O2):
define void @short2be(i64* nocapture writeonly %0, i16 zeroext %1) {
%3 = zext i16 %1 to i32
%4 = lshr i32 %3, 8
%5 = zext i32 %4 to i64
store i64 %5, i64* %0
%6 = and i32 %3, 255
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %7, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int main(void) {
  fputs("To install emacs on PPC you must run the following command\nsudo "
        "/usr/libexec/dumpemacs\n",
        stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [88 x i8] c"To install emacs on PPC you must run the following command\0Asudo /usr/libexec/dumpemacs\0A\00"
@stderr = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fputs(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [88 x i8] c"To install emacs on PPC you must run the following command\0Asudo /usr/libexec/dumpemacs\0A\00"
@stderr = global i32 0
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void imprimirLista() {}


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

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

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

LLVM IR (-O2):
define void @imprimirLista() {
ret void
}
int returnfalse() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @returnfalse() {
ret i32 0
}
int torow(int idx) { return idx / (3 * 3); }


x86 assembly (clang, -O0):
<torow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<torow>:
movslq %edi,%rax
imul   $0x38e38e39,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @torow(i32 %0) {
%2 = sdiv i32 %0, 9
ret i32 %2
}
/* Type definitions */
struct test {
  int dummy;
};

/* Variables and functions */
int priv_netinet_raw_setup(int asroot, int injail, struct test *test) {
  return (0);
}


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

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

LLVM IR (-O0):
%struct.test = type { i32 }
define i32 @priv_netinet_raw_setup(i32 %0, i32 %1, %struct.test* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.test*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.test* %2, %struct.test** %6
ret i32 0
}

LLVM IR (-O2):
%struct.test = type { i32 }
define i32 @priv_netinet_raw_setup(i32 %0, i32 %1, %struct.test* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i;
  for (i = 1; i < 100; i += 2)
    printf("%d\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffff,%ebx
lea    0xee0(%rip),%r14
add    $0x2,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x62,%ebx
jb     1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 2
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 2
%5 = icmp ult i32 %2, 98
br i1 %5, label %1, label %6
6: ; preds = %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int s_isblk(mode_t mode) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @s_isblk(i32 %0) {
ret i32 -1
}
void av_bsf_flush() {}


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

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

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

LLVM IR (-O2):
define void @av_bsf_flush() {
ret void
}
/* Variables and functions */
scalar_t__ system(char *);
int android_getHostBitness(void) {
  return system("file -L \"$SHELL\" | grep -q \"x86[_-]64\"") == 0 ? 64 : 32;
}


x86 assembly (clang, -O0):
<android_getHostBitness>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
mov    %rax,%rdx
mov    $0x20,%eax
mov    $0x40,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<android_getHostBitness>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
shl    $0x5,%ecx
add    $0x20,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"file -L \22$SHELL\22 | grep -q \22x86[_-]64\22\00"
define i32 @android_getHostBitness() {
%1 = call i64 @system(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 64, i32 32
ret i32 %4
}

LLVM IR (-O2):
@.str = [39 x i8] c"file -L \22$SHELL\22 | grep -q \22x86[_-]64\22\00"
define i32 @android_getHostBitness() {
%1 = tail call i64 @system(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i32 64, i32 32
ret i32 %3
}
/* Variables and functions */
int getSafetyLevel(char const *);
int getBoolean(const char *z) { return getSafetyLevel(z) & 1; }


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

x86 assembly (clang, -O2):
<getBoolean>:
push   %rax
call   1030 <getSafetyLevel@plt>
and    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @getBoolean(i8* %0) {
%2 = tail call i32 @getSafetyLevel(i8* %0)
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ freeWakeLock(int);
void foo2(void (*F)()) {
  F();
  freeWakeLock(1);
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   *-0x8(%rbp)
mov    $0x1,%edi
call   1030 <freeWakeLock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
push   %rax
xor    %eax,%eax
call   *%rdi
mov    $0x1,%edi
pop    %rax
jmp    1030 <freeWakeLock@plt>

LLVM IR (-O0):
define void @foo2(void (...)* %0) {
%2 = alloca void (...)*
store void (...)* %0, void (...)** %2
%3 = load void (...)*, void (...)** %2
%4 = call i32 @freeWakeLock(i32 1)
ret void
}

LLVM IR (-O2):
define void @foo2(void (...)* nocapture %0) {
tail call void (...) %0()
%2 = tail call i32 @freeWakeLock(i32 1)
ret void
}
float ANTweenTimingFunctionLinear(float time, float begin, float change,
                                  float duration) {
  return change * time / duration + begin;
}


x86 assembly (clang, -O0):
<ANTweenTimingFunctionLinear>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenTimingFunctionLinear>:
mulss  %xmm2,%xmm0
divss  %xmm3,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @ANTweenTimingFunctionLinear(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %7
%10 = load float, float* %5
%11 = fmul float %9, %10
%12 = load float, float* %8
%13 = fdiv float %11, %12
%14 = load float, float* %6
%15 = fadd float %13, %14
ret float %15
}

LLVM IR (-O2):
define float @ANTweenTimingFunctionLinear(float %0, float %1, float %2, float %3) {
%5 = fmul float %0, %2
%6 = fdiv float %5, %3
%7 = fadd float %6, %1
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int i = 0;
  while (i < 3) {
    printf("i = %d\n", i);
    printf("Hello World!\n");
    i = i + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    115d <main+0x4d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeca(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"i = %d\0A\00"
@.str.1 = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 3
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"i = %d\0A\00"
@str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 2)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t int_append(uint64_t base, uint64_t offset) {
  return (base * 10) + offset;
}


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

x86 assembly (clang, -O2):
<int_append>:
lea    (%rdi,%rdi,4),%eax
lea    (%rsi,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @int_append(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 = mul nsw i32 %5, 10
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @int_append(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 10
%4 = add nsw i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void term(int signo) { fprintf(stdout, "ignoring TERM signal\n"); }


x86 assembly (clang, -O0):
<term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stdout = global i32 0
@.str = [22 x i8] c"ignoring TERM signal\0A\00"
define void @term(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [22 x i8] c"ignoring TERM signal\0A\00"
define void @term(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ui {
  int dummy;
};

/* Variables and functions */
scalar_t__ ui_peek_c(struct ui *, char *);
size_t peek_non_space(struct ui *is) {
  char tmp;
  return (ui_peek_c(is, &tmp) && tmp != ' ') ? 1 : 0;
}


x86 assembly (clang, -O0):
<peek_non_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x9(%rbp),%rsi
call   1030 <ui_peek_c@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xa(%rbp)
je     1148 <peek_non_space+0x38>
movsbl -0x9(%rbp),%eax
cmp    $0x20,%eax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peek_non_space>:
push   %rax
lea    0x7(%rsp),%rsi
call   1030 <ui_peek_c@plt>
test   %rax,%rax
setne  %al
cmpb   $0x20,0x7(%rsp)
setne  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ui = type { i32 }
define i64 @peek_non_space(%struct.ui* %0) {
%2 = alloca %struct.ui*
%3 = alloca i8
store %struct.ui* %0, %struct.ui** %2
%4 = load %struct.ui*, %struct.ui** %2
%5 = call i64 @ui_peek_c(%struct.ui* %4, i8* %3)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 32
br label %11
11: ; preds = %7, %1
%12 = phi i1 [ false, %1 ], [ %10, %7 ]
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
%15 = sext i32 %14 to i64
ret i64 %15
}

LLVM IR (-O2):
%struct.ui = type { i32 }
define i64 @peek_non_space(%struct.ui* %0) {
%2 = alloca i8
%3 = call i64 @ui_peek_c(%struct.ui* %0, i8* %2)
%4 = icmp ne i64 %3, 0
%5 = load i8, i8* %2
%6 = icmp ne i8 %5, 32
%7 = select i1 %4, i1 %6, i1 false
%8 = zext i1 %7 to i64
ret i64 %8
}
void _set_ifa(unsigned char *u) { u[1] |= (1 << 2); }


x86 assembly (clang, -O0):
<_set_ifa>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
or     $0x4,%ecx
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_ifa>:
orb    $0x4,0x1(%rdi)
ret

LLVM IR (-O0):
define void @_set_ifa(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = or i32 %6, 4
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
ret void
}

LLVM IR (-O2):
define void @_set_ifa(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = or i8 %3, 4
store i8 %4, i8* %2
ret void
}
char *skip_leading_slashes(char *buf) {
  char *p = buf;
  while (*p && *p == '/')
    p++;
  return p;
}


x86 assembly (clang, -O0):
<skip_leading_slashes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1135 <skip_leading_slashes+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1145 <skip_leading_slashes+0x45>
jmp    1156 <skip_leading_slashes+0x56>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <skip_leading_slashes+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_leading_slashes>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x2f,0x1(%rax)
lea    0x1(%rax),%rax
je     1110 <skip_leading_slashes+0x10>
ret

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

LLVM IR (-O2):
define i8* @skip_leading_slashes(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 47
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i8* %3
}
void av_fifo_free() {}


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

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

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

LLVM IR (-O2):
define void @av_fifo_free() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_create_random_coefficient_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(96, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_create_random_coefficient_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x60,%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):
<celcon_create_random_coefficient_system>:
mov    $0x60,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_create_random_coefficient_system() {
%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 96, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_create_random_coefficient_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 96, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long);
void default_print_time(unsigned long long time) { printf("# %llups", time); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"# %llups\00"
define void @default_print_time(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ libds_log_file_close();
int /*<<< orphan*/ log_close();
int /*<<< orphan*/ memory_track_counters_print();
void log_file_close(void) {
  memory_track_counters_print();
  libds_log_file_close();
  log_close();
}


x86 assembly (clang, -O0):
<log_file_close>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <memory_track_counters_print@plt>
mov    $0x0,%al
call   1030 <libds_log_file_close@plt>
mov    $0x0,%al
call   1040 <log_close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_file_close>:
push   %rax
xor    %eax,%eax
call   1050 <memory_track_counters_print@plt>
xor    %eax,%eax
call   1030 <libds_log_file_close@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <log_close@plt>

LLVM IR (-O0):
define void @log_file_close() {
%1 = call i32 (...) @memory_track_counters_print()
%2 = call i32 (...) @libds_log_file_close()
%3 = call i32 (...) @log_close()
ret void
}

LLVM IR (-O2):
define void @log_file_close() {
%1 = tail call i32 (...) @memory_track_counters_print()
%2 = tail call i32 (...) @libds_log_file_close()
%3 = tail call i32 (...) @log_close()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_version(void) {
  printf("spi-hdlc "
         "0.04"
         "("
         "23:50:34"
         " "
         "Mar 17 2022"
         ")\n");
  printf("Copyright (c) 2016 The OpenThread Authors, All Rights Reserved\n");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"spi-hdlc 0.04(23:50:34 Mar 17 2022)\0A\00"
@.str.1 = [64 x i8] c"Copyright (c) 2016 The OpenThread Authors, All Rights Reserved\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"spi-hdlc 0.04(23:50:34 Mar 17 2022)\00"
@str.2 = [63 x i8] c"Copyright (c) 2016 The OpenThread Authors, All Rights Reserved\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.2, i64 0, i64 0))
ret void
}
float raw_linear_function(float x) { return x; }


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

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

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

LLVM IR (-O2):
define float @raw_linear_function(float returned %0) {
ret float %0
}
void cpu_id_info_core_init() { return; }


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

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

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

LLVM IR (-O2):
define void @cpu_id_info_core_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Insert_Node(int *, int, int, int);
void Reverse_List(int *array, int length) {
  int i = 0;
  for (i = 0; i < length; i++) {
    Insert_Node(array, length, i, array[length - 1]);
  }
}


x86 assembly (clang, -O0):
<Reverse_List>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1166 <Reverse_List+0x56>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%ecx
call   1030 <Insert_Node@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <Reverse_List+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reverse_List>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <Reverse_List+0x37>
mov    %esi,%ebx
mov    %rdi,%r14
lea    -0x1(%rbx),%r15d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%r15,4),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <Insert_Node@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1130 <Reverse_List+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @Reverse_List(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = add nsw i32 %1, -1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
br label %8
8: ; preds = %4, %8
%9 = phi i32 [ 0, %4 ], [ %12, %8 ]
%10 = load i32, i32* %7
%11 = tail call i32 @Insert_Node(i32* %0, i32 %1, i32 %9, i32 %10)
%12 = add nuw nsw i32 %9, 1
%13 = icmp eq i32 %12, %1
br i1 %13, label %14, label %8
14: ; preds = %8, %2
ret void
}