xunge/DecIR huggingface dataset:
void dt2lst(date, time) double *date;
double *time;
{
  double dj, lst, date0;
  dj = dt2jd(*date, *time);
  lst = jd2lst(dj);
  date0 = 0.0;
  ts2dt(lst, &date0, time);
  return;
}


x86 assembly (clang, -O0):
<dt2lst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    $0x2,%al
call   1040 <dt2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1050 <jd2lst@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rsi
lea    -0x28(%rbp),%rdi
mov    $0x1,%al
call   1030 <ts2dt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dt2lst>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
mov    $0x2,%al
call   1040 <dt2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    $0x1,%al
call   1050 <jd2lst@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @dt2lst(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%8 = load double*, double** %3
%9 = load double, double* %8
%10 = load double*, double** %4
%11 = load double, double* %10
%12 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2jd to i32 (double, double, ...)*)(double %9, double %11)
%13 = sitofp i32 %12 to double
store double %13, double* %5
%14 = load double, double* %5
%15 = call i32 (double, ...) bitcast (i32 (...)* @jd2lst to i32 (double, ...)*)(double %14)
%16 = sitofp i32 %15 to double
store double %16, double* %6
store double 0.000000e+00, double* %7
%17 = load double, double* %6
%18 = load double*, double** %4
%19 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %17, double* %7, double* %18)
ret void
}

LLVM IR (-O2):
define void @dt2lst(double* nocapture %0, double* %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = load double, double* %0
%6 = load double, double* %1
%7 = tail call i32 (double, double, ...) bitcast (i32 (...)* @dt2jd to i32 (double, double, ...)*)(double %5, double %6)
%8 = sitofp i32 %7 to double
%9 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2lst to i32 (double, ...)*)(double %8)
%10 = sitofp i32 %9 to double
store double 0.000000e+00, double* %3
%11 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %10, double* %3, double* %1)
ret void
}
/* Variables and functions */
double **getIsometricMap2(double, double, int, int, double);
double **getIsometricMap(int w, int h, double theta) {
  return getIsometricMap2((double)w, (double)h, w, h, theta);
}


x86 assembly (clang, -O0):
<getIsometricMap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm2
call   1030 <getIsometricMap2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getIsometricMap>:
movaps %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
jmp    1030 <getIsometricMap2@plt>

LLVM IR (-O0):
define double** @getIsometricMap(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = load double, double* %6
%14 = call double** @getIsometricMap2(double %8, double %10, i32 %11, i32 %12, double %13)
ret double** %14
}

LLVM IR (-O2):
define double** @getIsometricMap(i32 %0, i32 %1, double %2) {
%4 = sitofp i32 %0 to double
%5 = sitofp i32 %1 to double
%6 = tail call double** @getIsometricMap2(double %4, double %5, i32 %0, i32 %1, double %2)
ret double** %6
}
/* Variables and functions */
int /*<<< orphan*/ send_http_error(int, char *, int /*<<< orphan*/ *);
void send_404_not_found(int clientsock) {
  send_http_error(clientsock, "404 Not Found", NULL);
}


x86 assembly (clang, -O0):
<send_404_not_found>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <send_http_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_404_not_found>:
lea    0xee9(%rip),%rsi
xor    %edx,%edx
jmp    1030 <send_http_error@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"404 Not Found\00"
define void @send_404_not_found(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @send_http_error(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"404 Not Found\00"
define void @send_404_not_found(i32 %0) {
%2 = tail call i32 @send_http_error(i32 %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ erdl_coeff(double, double, double, double *, double *,
                              double *);
double erdl_pp(double r, double d, double m1) {
  double a0, a1, a2;
  erdl_coeff(r, d, m1, &a0, &a1, &a2);
  return (a0 + a1 + a2);
}


x86 assembly (clang, -O0):
<erdl_pp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <erdl_coeff@plt>
movsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erdl_pp>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <erdl_coeff@plt>
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
addsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @erdl_pp(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%10 = load double, double* %4
%11 = load double, double* %5
%12 = load double, double* %6
%13 = call i32 @erdl_coeff(double %10, double %11, double %12, double* %7, double* %8, double* %9)
%14 = load double, double* %7
%15 = load double, double* %8
%16 = fadd double %14, %15
%17 = load double, double* %9
%18 = fadd double %16, %17
ret double %18
}

LLVM IR (-O2):
define double @erdl_pp(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %4 to i8*
%8 = bitcast double* %5 to i8*
%9 = bitcast double* %6 to i8*
%10 = call i32 @erdl_coeff(double %0, double %1, double %2, double* %4, double* %5, double* %6)
%11 = load double, double* %4
%12 = load double, double* %5
%13 = fadd double %11, %12
%14 = load double, double* %6
%15 = fadd double %13, %14
ret double %15
}
/* Variables and functions */
scalar_t__ close(int);
int /*<<< orphan*/ err(int, char *);
void xclose(int fd) {
  if (close(fd) < 0)
    err(1, "close");
}


x86 assembly (clang, -O0):
<xclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0x0,%rax
jge    114e <xclose+0x2e>
mov    $0x1,%edi
lea    0xeb7(%rip),%rsi
call   1040 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xclose>:
push   %rax
call   1030 <close@plt>
test   %rax,%rax
js     112d <xclose+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1040 <err@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"close\00"
define void @xclose(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @close(i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @err(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"close\00"
define void @xclose(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InfixToPostfix(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char **);
int main() {
  char input[100];
  printf("Enter the expression for converting to postfix: ");
  scanf("%s", &input);
  printf("\nInputed Infix Expression: %s", input);
  InfixToPostfix(input);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"Enter the expression for converting to postfix: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [30 x i8] c"\0AInputed Infix Expression: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [100 x i8]* %2 to i8**
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i32 @InfixToPostfix(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"Enter the expression for converting to postfix: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [30 x i8] c"\0AInputed Infix Expression: %s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [100 x i8]* %1 to i8**
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%7 = call i32 @InfixToPostfix(i8* %2)
ret i32 0
}
char *intcat(char *p, int val, char *str) {
  if (!val)
    return p;
  while (*str)
    *p++ = *str++;
  *p++ = '-';
  return p;
}


x86 assembly (clang, -O0):
<intcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1126 <intcat+0x26>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1179 <intcat+0x79>
jmp    112b <intcat+0x2b>
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     115f <intcat+0x5f>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    112b <intcat+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intcat>:
mov    %rdi,%rax
test   %esi,%esi
je     1138 <intcat+0x38>
mov    (%rdx),%cl
test   %cl,%cl
je     1131 <intcat+0x31>
add    $0x1,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1120 <intcat+0x20>
movb   $0x2d,(%rax)
add    $0x1,%rax
ret

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

LLVM IR (-O2):
define i8* @intcat(i8* writeonly %0, i32 %1, i8* nocapture %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %19, label %5
5: ; preds = %3
%6 = load i8, i8* %2
%7 = icmp eq i8 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %5, %8
%9 = phi i8 [ %14, %8 ], [ %6, %5 ]
%10 = phi i8* [ %12, %8 ], [ %2, %5 ]
%11 = phi i8* [ %13, %8 ], [ %0, %5 ]
%12 = getelementptr inbounds i8, i8* %10, i64 1
%13 = getelementptr inbounds i8, i8* %11, i64 1
store i8 %9, i8* %11
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %8
16: ; preds = %8, %5
%17 = phi i8* [ %0, %5 ], [ %13, %8 ]
%18 = getelementptr inbounds i8, i8* %17, i64 1
store i8 45, i8* %17
br label %19
19: ; preds = %3, %16
%20 = phi i8* [ %18, %16 ], [ %0, %3 ]
ret i8* %20
}
int wpas_dbus_unregister_interface(struct wpa_supplicant *wpa_s) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define i32 @wpas_dbus_unregister_interface(%struct.wpa_supplicant* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct rusage {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int /*<<< orphan*/, int *, int,
                           struct rusage *);
pid_t wait4(pid_t pid, int *status, int options, struct rusage *usage) {
  return syscall(114, pid, status, options, usage);
}


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

x86 assembly (clang, -O2):
<wait4>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x72,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.rusage = type { i32 }
define i32 @wait4(i32 %0, i32* %1, i32 %2, %struct.rusage* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca %struct.rusage*
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store %struct.rusage* %3, %struct.rusage** %8
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %7
%12 = load %struct.rusage*, %struct.rusage** %8
%13 = call i32 @syscall(i32 114, i32 %9, i32* %10, i32 %11, %struct.rusage* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
define i32 @wait4(i32 %0, i32* %1, i32 %2, %struct.rusage* %3) {
%5 = tail call i32 @syscall(i32 114, i32 %0, i32* %1, i32 %2, %struct.rusage* %3)
ret i32 %5
}
int power(long x, unsigned int n) {
  long y = n % 2 ? x : 1;
  while (n >>= 1) {
    x = x * x;
    if (n % 2)
      y = y * x;
  }
  return y;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1127 <power+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1135 <power+0x35>
mov    $0x1,%eax
mov    %rax,-0x20(%rbp)
jmp    1135 <power+0x35>
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     117d <power+0x7d>
mov    -0x8(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1178 <power+0x78>
mov    -0x18(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    113d <power+0x3d>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   $0x1,%sil
mov    $0x1,%r8d
mov    %rdi,%rax
cmove  %r8,%rax
cmp    $0x2,%esi
jb     113c <power+0x3c>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
shr    %edx
imul   %rdi,%rdi
test   $0x2,%sil
mov    %rdi,%rcx
cmove  %r8,%rcx
imul   %rcx,%rax
cmp    $0x3,%esi
mov    %edx,%esi
ja     1120 <power+0x20>
ret

LLVM IR (-O0):
define i32 @power(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = urem i32 %6, 2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %3
br label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %9
%13 = phi i64 [ %10, %9 ], [ 1, %11 ]
store i64 %13, i64* %5
br label %14
14: ; preds = %29, %12
%15 = load i32, i32* %4
%16 = lshr i32 %15, 1
store i32 %16, i32* %4
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %30
18: ; preds = %14
%19 = load i64, i64* %3
%20 = load i64, i64* %3
%21 = mul nsw i64 %19, %20
store i64 %21, i64* %3
%22 = load i32, i32* %4
%23 = urem i32 %22, 2
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %18
%26 = load i64, i64* %5
%27 = load i64, i64* %3
%28 = mul nsw i64 %26, %27
store i64 %28, i64* %5
br label %29
29: ; preds = %25, %18
br label %14
30: ; preds = %14
%31 = load i64, i64* %5
%32 = trunc i64 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @power(i64 %0, i32 %1) {
%3 = and i32 %1, 1
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i64 1, i64 %0
%6 = icmp ult i32 %1, 2
br i1 %6, label %18, label %7
7: ; preds = %2, %7
%8 = phi i64 [ %16, %7 ], [ %5, %2 ]
%9 = phi i32 [ %11, %7 ], [ %1, %2 ]
%10 = phi i64 [ %12, %7 ], [ %0, %2 ]
%11 = lshr i32 %9, 1
%12 = mul nsw i64 %10, %10
%13 = and i32 %9, 2
%14 = icmp eq i32 %13, 0
%15 = select i1 %14, i64 1, i64 %12
%16 = mul nsw i64 %15, %8
%17 = icmp ult i32 %9, 4
br i1 %17, label %18, label %7
18: ; preds = %7, %2
%19 = phi i64 [ %5, %2 ], [ %16, %7 ]
%20 = trunc i64 %19 to i32
ret i32 %20
}
/* Variables and functions */
int sin(double);
double f5_cosx_x_prime(double x) { return -sin(x) - 1; }


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

x86 assembly (clang, -O2):
<f5_cosx_x_prime>:
push   %rax
call   1030 <sin@plt>
not    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f5_cosx_x_prime(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @sin(double %3)
%5 = sub nsw i32 0, %4
%6 = sub nsw i32 %5, 1
%7 = sitofp i32 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @f5_cosx_x_prime(double %0) {
%2 = tail call i32 @sin(double %0)
%3 = xor i32 %2, -1
%4 = sitofp i32 %3 to double
ret double %4
}
void XSyncValueIsPositive() {}


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

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

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

LLVM IR (-O2):
define void @XSyncValueIsPositive() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glClearDepth(double);
void ClearDepth(double d) { glClearDepth(d); }


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

x86 assembly (clang, -O2):
<ClearDepth>:
jmp    1030 <glClearDepth@plt>

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

LLVM IR (-O2):
define void @ClearDepth(double %0) {
%2 = tail call i32 @glClearDepth(double %0)
ret void
}
long calc_add(int summand1, int summand2) { return summand1 + summand2; }


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

x86 assembly (clang, -O2):
<calc_add>:
add    %esi,%edi
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @calc_add(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
%8 = sext i32 %7 to i64
ret i64 %8
}

LLVM IR (-O2):
define i64 @calc_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sext i32 %3 to i64
ret i64 %4
}
void protocol_textline_free_client_data(struct client *c) {}


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

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

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

LLVM IR (-O2):
%struct.client = type opaque
define void @protocol_textline_free_client_data(%struct.client* nocapture %0) {
ret void
}
int x_size(c)
int c;
{
  if (c == '\t')
    return 4;
  if (iscntrl(c))
    return 2;
  return 1;
}


x86 assembly (clang, -O0):
<x_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jne    1131 <x_size+0x21>
movl   $0x4,-0x4(%rbp)
jmp    1155 <x_size+0x45>
mov    -0x8(%rbp),%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%eax
je     114e <x_size+0x3e>
movl   $0x2,-0x4(%rbp)
jmp    1155 <x_size+0x45>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_size>:
mov    $0x4,%eax
cmp    $0x9,%edi
je     112f <x_size+0x1f>
push   %rax
call   1030 <iscntrl@plt>
cmp    $0x1,%eax
mov    $0x2,%eax
sbb    $0x0,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @x_size(i32 %0) {
%2 = icmp eq i32 %0, 9
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @iscntrl(i32 %0)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 1, i32 2
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 4, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
float poly(float, float, float, float, int);
float cubicIn(float fraction, float start, float delta, float slope) {
  return poly(fraction, start, delta, slope, 3);
}


x86 assembly (clang, -O0):
<cubicIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
mov    $0x3,%edi
call   1030 <poly@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubicIn>:
mov    $0x3,%edi
jmp    1030 <poly@plt>

LLVM IR (-O0):
define float @cubicIn(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* %5
%10 = load float, float* %6
%11 = load float, float* %7
%12 = load float, float* %8
%13 = call float @poly(float %9, float %10, float %11, float %12, i32 3)
ret float %13
}

LLVM IR (-O2):
define float @cubicIn(float %0, float %1, float %2, float %3) {
%5 = tail call float @poly(float %0, float %1, float %2, float %3, i32 3)
ret float %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ROR(uint32_t x) { return ((x >> 1) | (x << (32 - 1))); }


x86 assembly (clang, -O0):
<ROR>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1f,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROR>:
mov    %edi,%eax
sar    %eax
shl    $0x1f,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @ROR(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = load i32, i32* %2
%6 = shl i32 %5, 31
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @ROR(i32 %0) {
%2 = ashr i32 %0, 1
%3 = shl i32 %0, 31
%4 = or i32 %2, %3
ret i32 %4
}
unsigned int atoi(char *str) {
  unsigned int result = 0;
  while (*str) {
    result = (result << 3) + (result << 1) + (*str) - '0';
    str++;
  }
  return result;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <atoi+0x4a>
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <atoi+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
lea    (%rax,%rax,4),%eax
movsbl %cl,%ecx
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <atoi+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %12, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 10
%9 = sext i8 %5 to i32
%10 = add i32 %8, -48
%11 = add i32 %10, %9
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ fun1();
int /*<<< orphan*/ fun2();
int /*<<< orphan*/ fun3();
void fun4(void) {
  fun1();
  fun2();
  fun3();
}


x86 assembly (clang, -O0):
<fun4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <fun1@plt>
mov    $0x0,%al
call   1030 <fun2@plt>
mov    $0x0,%al
call   1050 <fun3@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun4>:
push   %rax
xor    %eax,%eax
call   1040 <fun1@plt>
xor    %eax,%eax
call   1030 <fun2@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <fun3@plt>

LLVM IR (-O0):
define void @fun4() {
%1 = call i32 (...) @fun1()
%2 = call i32 (...) @fun2()
%3 = call i32 (...) @fun3()
ret void
}

LLVM IR (-O2):
define void @fun4() {
%1 = tail call i32 (...) @fun1()
%2 = tail call i32 (...) @fun2()
%3 = tail call i32 (...) @fun3()
ret void
}
/* Variables and functions */
int mkdir(char const *, int);
int create_dir(const char *path) { return mkdir(path, 0755); }


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

x86 assembly (clang, -O2):
<create_dir>:
mov    $0x1ed,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @create_dir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 493)
ret i32 %2
}
PI_App_init() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @PI_App_init() {
ret i32 1
}
__attribute__((vector_size(16))) int i(__attribute__((vector_size(16))) int f) {
  __attribute__((vector_size(16))) int g = {0x80000000, 0, 0x80000000, 0};
  __attribute__((vector_size(16))) int f_int =
      (__attribute__((vector_size(16))) int)f;
  return (f_int ^ g);
}


x86 assembly (clang, -O0):
<i>:
push   %rbp
mov    %rsp,%rbp
movaps %xmm0,-0x10(%rbp)
movaps 0xef1(%rip),%xmm0
movaps %xmm0,-0x20(%rbp)
movdqa -0x10(%rbp),%xmm0
movdqa %xmm0,-0x30(%rbp)
movdqa -0x30(%rbp),%xmm0
pxor   -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<i>:
xorps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define <4 x i32> @i(<4 x i32> %0) {
%2 = alloca <4 x i32>
%3 = alloca <4 x i32>
%4 = alloca <4 x i32>
store <4 x i32> %0, <4 x i32>* %2
store <4 x i32> <i32 -2147483648, i32 0, i32 -2147483648, i32 0>, <4 x i32>* %3
%5 = load <4 x i32>, <4 x i32>* %2
store <4 x i32> %5, <4 x i32>* %4
%6 = load <4 x i32>, <4 x i32>* %4
%7 = load <4 x i32>, <4 x i32>* %3
%8 = xor <4 x i32> %6, %7
ret <4 x i32> %8
}

LLVM IR (-O2):
define <4 x i32> @i(<4 x i32> %0) {
%2 = xor <4 x i32> %0, <i32 -2147483648, i32 0, i32 -2147483648, i32 0>
ret <4 x i32> %2
}
/* Type definitions */
typedef int /*<<< orphan*/ gzFile;

/* Variables and functions */
int /*<<< orphan*/ ConvertFromFloat(float, unsigned char *);
int gzwrite(int /*<<< orphan*/, unsigned char *, int);
int ConvertWriteFloatZ(gzFile file, float val) {
  unsigned char tmp[4];
  ConvertFromFloat(val, tmp);
  if (gzwrite(file, tmp, 4) != 4)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<ConvertWriteFloatZ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <ConvertFromFloat@plt>
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <gzwrite@plt>
cmp    $0x4,%eax
je     1164 <ConvertWriteFloatZ+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <ConvertWriteFloatZ+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertWriteFloatZ>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <ConvertFromFloat@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x4,%edx
call   1030 <gzwrite@plt>
xor    %ecx,%ecx
cmp    $0x4,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @ConvertWriteFloatZ(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca [4 x i8]
store i32 %0, i32* %4
store float %1, float* %5
%7 = load float, float* %5
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%9 = call i32 @ConvertFromFloat(float %7, i8* %8)
%10 = load i32, i32* %4
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%12 = call i32 @gzwrite(i32 %10, i8* %11, i32 4)
%13 = icmp ne i32 %12, 4
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 -1, i32* %3
br label %16
15: ; preds = %2
store i32 0, i32* %3
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @ConvertWriteFloatZ(i32 %0, float %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = call i32 @ConvertFromFloat(float %1, i8* %4)
%6 = call i32 @gzwrite(i32 %0, i8* %4, i32 4)
%7 = icmp ne i32 %6, 4
%8 = sext i1 %7 to i32
ret i32 %8
}
void project_flow(image, proj, nx, ny) float *image, *proj;
int nx, ny;
{ project_with_interp(image, proj, nx, ny, 2.0); }


x86 assembly (clang, -O0):
<project_flow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
movsd  0xec4(%rip),%xmm0
mov    $0x1,%al
call   1030 <project_with_interp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<project_flow>:
movsd  0xee8(%rip),%xmm0
mov    $0x1,%al
jmp    1030 <project_with_interp@plt>

LLVM IR (-O0):
define void @project_flow(float* %0, float* %1, i32 %2, i32 %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca i32
%8 = alloca i32
store float* %0, float** %5
store float* %1, float** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load float*, float** %5
%10 = load float*, float** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 (float*, float*, i32, i32, double, ...) bitcast (i32 (...)* @project_with_interp to i32 (float*, float*, i32, i32, double, ...)*)(float* %9, float* %10, i32 %11, i32 %12, double 2.000000e+00)
ret void
}

LLVM IR (-O2):
define void @project_flow(float* %0, float* %1, i32 %2, i32 %3) {
%5 = tail call i32 (float*, float*, i32, i32, double, ...) bitcast (i32 (...)* @project_with_interp to i32 (float*, float*, i32, i32, double, ...)*)(float* %0, float* %1, i32 %2, i32 %3, double 2.000000e+00)
ret void
}
__attribute__((__unused__)) int toupper(int c) {
  return ((c >= 'a' && c <= 'z') ? c - ('a' - 'A') : c);
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1129 <toupper+0x29>
cmpl   $0x7a,-0x4(%rbp)
jg     1129 <toupper+0x29>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <toupper+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 32
br label %13
11: ; preds = %5, %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
void test1(void) { *((int *)0x1234) = 'x'; }


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1234,%eax
movl   $0x78,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
movl   $0x78,0x1234
ret

LLVM IR (-O0):
define void @test1() {
store i32 120, i32* inttoptr (i64 4660 to i32*)
ret void
}

LLVM IR (-O2):
define void @test1() {
store i32 120, i32* inttoptr (i64 4660 to i32*)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int type;
};
typedef TYPE_1__ XSelectionEvent;

/* Variables and functions */
void set_XSelectionEvent_type(void *_p, int _v) {
  ((XSelectionEvent *)_p)->type = (int)_v;
}


x86 assembly (clang, -O0):
<set_XSelectionEvent_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XSelectionEvent_type>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XSelectionEvent_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printBin(int n) {
  if (n > 1)
    printBin(n / 2);
  printf("%d", n % 2);
}


x86 assembly (clang, -O0):
<printBin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1147 <printBin+0x27>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <printBin@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBin>:
push   %rbx
mov    %edi,%ebx
cmp    $0x2,%edi
jl     1131 <printBin+0x11>
mov    %ebx,%edi
shr    %edi
call   1030 <printBin@plt>
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
and    $0xfffffffe,%eax
sub    %eax,%ebx
lea    0xebc(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printBin(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = lshr i32 %0, 1
tail call void @printBin(i32 %4)
br label %5
5: ; preds = %3, %1
%6 = srem i32 %0, 2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
int *f();
int main() {
  int y;
  int *p = f();
  y += 7;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* (...) @f()
store i32* %4, i32** %3
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 7
store i32 %6, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* (...) @f()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ModelicaFormatError(char *, char const *);
void ModelicaNotExistError(const char *name) {
  ModelicaFormatError(
      "C-Function \"%s\" is called\n"
      "but is not implemented for the actual environment\n"
      "(e.g., because there is no file system available on the machine\n"
      "as for dSpace or xPC systems)",
      name);
}


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

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

LLVM IR (-O0):
@.str = [170 x i8] c"C-Function \22%s\22 is called\0Abut is not implemented for the actual environment\0A(e.g., because there is no file system available on the machine\0Aas for dSpace or xPC systems)\00"
define void @ModelicaNotExistError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ModelicaFormatError(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [170 x i8] c"C-Function \22%s\22 is called\0Abut is not implemented for the actual environment\0A(e.g., because there is no file system available on the machine\0Aas for dSpace or xPC systems)\00"
define void @ModelicaNotExistError(i8* %0) {
%2 = tail call i32 @ModelicaFormatError(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void d2i_PUBKEY(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_PUBKEY() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ callmealias();
b() { callmealias(); }


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <callmealias@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @b() {
%1 = alloca i32
%2 = call i32 (...) @callmealias()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @b() {
%1 = tail call i32 (...) @callmealias()
ret i32 undef
}
/* Type definitions */
struct rnn_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rnn_backward_dynamics(struct rnn_state *);
int /*<<< orphan*/ rnn_forward_dynamics(struct rnn_state *);
int /*<<< orphan*/ rnn_set_likelihood(struct rnn_state *);
void rnn_forward_backward_dynamics(struct rnn_state *rnn_s) {
  rnn_forward_dynamics(rnn_s);
  rnn_set_likelihood(rnn_s);
  rnn_backward_dynamics(rnn_s);
}


x86 assembly (clang, -O0):
<rnn_forward_backward_dynamics>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <rnn_forward_dynamics@plt>
mov    -0x8(%rbp),%rdi
call   1030 <rnn_set_likelihood@plt>
mov    -0x8(%rbp),%rdi
call   1040 <rnn_backward_dynamics@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnn_forward_backward_dynamics>:
push   %rbx
mov    %rdi,%rbx
call   1050 <rnn_forward_dynamics@plt>
mov    %rbx,%rdi
call   1030 <rnn_set_likelihood@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <rnn_backward_dynamics@plt>

LLVM IR (-O0):
%struct.rnn_state = type { i32 }
define void @rnn_forward_backward_dynamics(%struct.rnn_state* %0) {
%2 = alloca %struct.rnn_state*
store %struct.rnn_state* %0, %struct.rnn_state** %2
%3 = load %struct.rnn_state*, %struct.rnn_state** %2
%4 = call i32 @rnn_forward_dynamics(%struct.rnn_state* %3)
%5 = load %struct.rnn_state*, %struct.rnn_state** %2
%6 = call i32 @rnn_set_likelihood(%struct.rnn_state* %5)
%7 = load %struct.rnn_state*, %struct.rnn_state** %2
%8 = call i32 @rnn_backward_dynamics(%struct.rnn_state* %7)
ret void
}

LLVM IR (-O2):
%struct.rnn_state = type { i32 }
define void @rnn_forward_backward_dynamics(%struct.rnn_state* %0) {
%2 = tail call i32 @rnn_forward_dynamics(%struct.rnn_state* %0)
%3 = tail call i32 @rnn_set_likelihood(%struct.rnn_state* %0)
%4 = tail call i32 @rnn_backward_dynamics(%struct.rnn_state* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
void print_int(const int *n) { printf("%d ", *n); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_int(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
void array_copy(int *dest, int *src, size_t length) {
  memcpy(dest, src, sizeof(int) * length);
}


x86 assembly (clang, -O0):
<array_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_copy>:
shl    $0x2,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @array_copy(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i64, i64* %6
%10 = mul i64 4, %9
%11 = trunc i64 %10 to i32
%12 = call i32 @memcpy(i32* %7, i32* %8, i32 %11)
ret void
}

LLVM IR (-O2):
define void @array_copy(i32* %0, i32* %1, i64 %2) {
%4 = trunc i64 %2 to i32
%5 = shl i32 %4, 2
%6 = tail call i32 @memcpy(i32* %0, i32* %1, i32 %5)
ret void
}