xunge/DecIR huggingface dataset:
void wait_for_adc() {
  while (((*((volatile unsigned int *)(0x44e0d000 + 0x28))) & (1 << 1)) == 0) {
  }
  (*((volatile unsigned int *)(0x44e0d000 + 0x28))) |= (1 << 1);
}


x86 assembly (clang, -O0):
<wait_for_adc>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <wait_for_adc+0x9>
mov    $0x44e0d028,%eax
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    1121 <wait_for_adc+0x21>
jmp    1109 <wait_for_adc+0x9>
mov    $0x44e0d028,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    $0x44e0d028,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_adc>:
testl  $0x2,0x44e0d028
je     1100 <wait_for_adc>
orl    $0x2,0x44e0d028
02
ret

LLVM IR (-O0):
define void @wait_for_adc() {
br label %1
1: ; preds = %5, %0
%2 = load volatile i32, i32* inttoptr (i64 1155584040 to i32*)
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
%7 = load volatile i32, i32* inttoptr (i64 1155584040 to i32*)
%8 = or i32 %7, 2
store volatile i32 %8, i32* inttoptr (i64 1155584040 to i32*)
ret void
}

LLVM IR (-O2):
define void @wait_for_adc() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i32, i32* inttoptr (i64 1155584040 to i32*)
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 1155584040 to i32*)
%7 = or i32 %6, 2
store volatile i32 %7, i32* inttoptr (i64 1155584040 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xe9() {
  Assert_real((isupper(233) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              1170, ("isupper should be 0 for 0xe9"));
}


x86 assembly (clang, -O0):
<t_isupper_0xe9>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe9,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x492,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0xe9>:
push   %rax
mov    $0xe9,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x492,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xe9\00"
define void @t_isupper_0xe9() {
%1 = call i64 @isupper(i32 233)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1170, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xe9\00"
define void @t_isupper_0xe9() {
%1 = tail call i64 @isupper(i32 233)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1170, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void limpar(int *array, int size) {
  while (size--, size > -1) {
    array[size] = 0;
  }
}


x86 assembly (clang, -O0):
<limpar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jle    1132 <limpar+0x32>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    110b <limpar+0xb>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @limpar(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() {
  enum sz { one, two, three = 1, four, five = 2 } a, b, c;
  for (a = one; a <= five; a++)
    printf("*");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
ja     1143 <main+0x33>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @putchar(i32 42)
%2 = tail call i32 @putchar(i32 42)
%3 = tail call i32 @putchar(i32 42)
ret void
}
double min(double x, double y) {
  double min_xy;
  min_xy = x < y ? x : y;
  return min_xy;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <min+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    113b <min+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
char *malloc(size_t);
char *memcpy(char *, char const *, size_t);
char *xstrndup(const char *s, size_t n) {
  size_t len = n;
  char *new = malloc(len + 1);
  if (new == NULL)
    return NULL;
  new[len] = '\0';
  return memcpy(new, s, len);
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1161 <xstrndup+0x41>
movq   $0x0,-0x8(%rbp)
jmp    1182 <xstrndup+0x62>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114f <xstrndup+0x2f>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @xstrndup(i8* nocapture %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %7
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %4, i8* align 1 %0, i64 %1, i1 false)
br label %8
8: ; preds = %2, %6
ret i8* %4
}
double _Complex bar(double _Complex arg) { return foo(arg); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    $0x2,%al
call   1030 <foo@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
mov    $0x2,%al
call   1030 <foo@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xorps  %xmm1,%xmm1
pop    %rax
ret

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

LLVM IR (-O2):
define { double, double } @bar(double %0, double %1) {
%3 = tail call i32 (double, double, ...) bitcast (i32 (...)* @foo to i32 (double, double, ...)*)(double %0, double %1)
%4 = sitofp i32 %3 to double
%5 = insertvalue { double, double } poison, double %4, 0
%6 = insertvalue { double, double } %5, double 0.000000e+00, 1
ret { double, double } %6
}
/* Variables and functions */
int LOG_CONS;
int LOG_PID;
int /*<<< orphan*/ LOG_USER;
int /*<<< orphan*/ LOG_WARNING;
int /*<<< orphan*/ closelog();
int /*<<< orphan*/ openlog(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char *);
void logWarningMessage(char *message) {
  openlog("dt228Yr4", LOG_PID | LOG_CONS, LOG_USER);
  syslog(LOG_WARNING, "%s", message);
  closelog();
}


x86 assembly (clang, -O0):
<logWarningMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%esi
mov    0x2e7c(%rip),%rax
or     (%rax),%esi
mov    0x2e93(%rip),%rax
mov    (%rax),%edx
lea    0xea2(%rip),%rdi
call   1050 <openlog@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe92(%rip),%rsi
call   1040 <syslog@plt>
mov    $0x0,%al
call   1030 <closelog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logWarningMessage>:
push   %rbx
mov    %rdi,%rbx
mov    0x2e95(%rip),%rax
mov    0x2e86(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    0xeaa(%rip),%rdi
call   1050 <openlog@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
mov    %rbx,%rdx
call   1040 <syslog@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <closelog@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"dt228Yr4\00"
@LOG_PID = global i32 0
@LOG_CONS = global i32 0
@LOG_USER = global i32 0
@LOG_WARNING = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @logWarningMessage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_PID
%4 = load i32, i32* @LOG_CONS
%5 = or i32 %3, %4
%6 = load i32, i32* @LOG_USER
%7 = call i32 @openlog(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* @LOG_WARNING
%9 = load i8*, i8** %2
%10 = call i32 @syslog(i32 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = call i32 (...) @closelog()
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"dt228Yr4\00"
@LOG_PID = global i32 0
@LOG_CONS = global i32 0
@LOG_USER = global i32 0
@LOG_WARNING = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @logWarningMessage(i8* %0) {
%2 = load i32, i32* @LOG_PID
%3 = load i32, i32* @LOG_CONS
%4 = or i32 %3, %2
%5 = load i32, i32* @LOG_USER
%6 = tail call i32 @openlog(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = load i32, i32* @LOG_WARNING
%8 = tail call i32 @syslog(i32 %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%9 = tail call i32 (...) @closelog()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  char hello[20] = "Hello world!";
  printf("ONLINE_JUDGE not defined\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.hello = [20 x i8] c"Hello world!\00\00\00\00\00\00\00\00"
@.str = [26 x i8] c"ONLINE_JUDGE not defined\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = bitcast [20 x i8]* %2 to i8*
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"ONLINE_JUDGE not defined\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct iax_ie_data {
  int dummy;
};

/* Variables and functions */
int iax_ie_append_raw(struct iax_ie_data *, unsigned char, char const *, int);
scalar_t__ strlen(char const *);
int iax_ie_append_str(struct iax_ie_data *ied, unsigned char ie,
                      const char *str) {
  return iax_ie_append_raw(ied, ie, str, (int)strlen(str));
}


x86 assembly (clang, -O0):
<iax_ie_append_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    %rax,%rcx
mov    -0x19(%rbp),%al
movzbl %al,%esi
call   1040 <iax_ie_append_raw@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iax_ie_append_str>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rdx,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <iax_ie_append_raw@plt>

LLVM IR (-O0):
%struct.iax_ie_data = type { i32 }
define i32 @iax_ie_append_str(%struct.iax_ie_data* %0, i8 zeroext %1, i8* %2) {
%4 = alloca %struct.iax_ie_data*
%5 = alloca i8
%6 = alloca i8*
store %struct.iax_ie_data* %0, %struct.iax_ie_data** %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = load %struct.iax_ie_data*, %struct.iax_ie_data** %4
%8 = load i8, i8* %5
%9 = load i8*, i8** %6
%10 = load i8*, i8** %6
%11 = call i64 @strlen(i8* %10)
%12 = trunc i64 %11 to i32
%13 = call i32 @iax_ie_append_raw(%struct.iax_ie_data* %7, i8 zeroext %8, i8* %9, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.iax_ie_data = type { i32 }
define i32 @iax_ie_append_str(%struct.iax_ie_data* %0, i8 zeroext %1, i8* %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%5 = trunc i64 %4 to i32
%6 = tail call i32 @iax_ie_append_raw(%struct.iax_ie_data* %0, i8 zeroext %1, i8* %2, i32 %5)
ret i32 %6
}
void backlight_disable(void) {}


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

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

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

LLVM IR (-O2):
define void @backlight_disable() {
ret void
}
RCU_DEF_INIT_FUNC(user_m4_init, param) {}


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

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

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

LLVM IR (-O2):
define i32 @RCU_DEF_INIT_FUNC(i32 %0, i32 %1) {
ret i32 undef
}
void sk_free(void) {}


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

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

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

LLVM IR (-O2):
define void @sk_free() {
ret void
}
int *fun_3(int *p) {
  *(p - 1) = 1;
  *(p - 2) = 1;
  return p - 2;
}


x86 assembly (clang, -O0):
<fun_3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,-0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,-0x8(%rax)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_3>:
movabs $0x100000001,%rax
mov    %rax,-0x8(%rdi)
lea    -0x8(%rdi),%rax
ret

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

LLVM IR (-O2):
define i32* @fun_3(i32* writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 -1
store i32 1, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 -2
store i32 1, i32* %3
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ ActuatorDesiredHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void ActuatorDesiredUpdated() { UAVObjUpdated(ActuatorDesiredHandle()); }


x86 assembly (clang, -O0):
<ActuatorDesiredUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ActuatorDesiredHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ActuatorDesiredUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <ActuatorDesiredHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @ActuatorDesiredUpdated() {
%1 = call i32 (...) @ActuatorDesiredHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ActuatorDesiredUpdated() {
%1 = tail call i32 (...) @ActuatorDesiredHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort_report(char *, char const *, ...);
scalar_t__ mkdir(char const *, int);
void smkdir(const char *path, int perms) {
  if ((mkdir(path, perms)) < 0)
    (2 == 1) ? abort_report("Could not create directory %s", path, "")
             : abort_report("Could not create directory %s", path);
}


x86 assembly (clang, -O0):
<smkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
jge    1157 <smkdir+0x37>
mov    -0x8(%rbp),%rsi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1040 <abort_report@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smkdir>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mkdir@plt>
test   %rax,%rax
js     1130 <smkdir+0x10>
pop    %rbx
ret
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <abort_report@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Could not create directory %s\00"
define void @smkdir(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i64 @mkdir(i8* %5, i32 %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = call i32 (i8*, i8*, ...) @abort_report(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Could not create directory %s\00"
define void @smkdir(i8* %0, i32 %1) {
%3 = tail call i64 @mkdir(i8* %0, i32 %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (i8*, i8*, ...) @abort_report(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void beep_alarm(int alarmmode, int len) {
  printf("beep_alarm(%d,%d)\n", alarmmode, len);
}


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

x86 assembly (clang, -O2):
<beep_alarm>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"beep_alarm(%d,%d)\0A\00"
define void @beep_alarm(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 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"beep_alarm(%d,%d)\0A\00"
define void @beep_alarm(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int fabs(float);
float sqrt(float a) {
  float x0, x1;
  x0 = 1.0;
  do {
    x1 = a / (2 * x0) + x0 / 2;
    if (fabs(x0 - x1) < 10e-3)
      break;
    x0 = x1;
  } while (1);
  return x0;
}


x86 assembly (clang, -O0):
<sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xecd(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xeb7(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe93(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1184 <sqrt+0x74>
jmp    119d <sqrt+0x8d>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    112a <sqrt+0x1a>
jmp    119d <sqrt+0x8d>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt>:
sub    $0x18,%rsp
movss  %xmm0,0x10(%rsp)
movss  0xede(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movaps %xmm2,%xmm3
movaps %xmm2,%xmm0
addss  %xmm2,%xmm0
movss  0x10(%rsp),%xmm1
divss  %xmm0,%xmm1
mulss  0xeb8(%rip),%xmm2
addss  %xmm1,%xmm2
movss  %xmm2,0x14(%rsp)
movss  %xmm3,0xc(%rsp)
movaps %xmm3,%xmm0
subss  %xmm2,%xmm0
call   1030 <fabs@plt>
movss  0x14(%rsp),%xmm2
test   %eax,%eax
jg     1130 <sqrt+0x20>
movss  0xc(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @sqrt(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
store float 1.000000e+00, float* %3
br label %5
5: ; preds = %22, %1
%6 = load float, float* %2
%7 = load float, float* %3
%8 = fmul float 2.000000e+00, %7
%9 = fdiv float %6, %8
%10 = load float, float* %3
%11 = fdiv float %10, 2.000000e+00
%12 = fadd float %9, %11
store float %12, float* %4
%13 = load float, float* %3
%14 = load float, float* %4
%15 = fsub float %13, %14
%16 = call i32 @fabs(float %15)
%17 = sitofp i32 %16 to double
%18 = fcmp olt double %17, 1.000000e-02
br i1 %18, label %19, label %20
19: ; preds = %5
br label %23
20: ; preds = %5
%21 = load float, float* %4
store float %21, float* %3
br label %22
22: ; preds = %20
br i1 true, label %5, label %23
23: ; preds = %22, %19
%24 = load float, float* %3
ret float %24
}

LLVM IR (-O2):
define float @sqrt(float %0) {
br label %2
2: ; preds = %2, %1
%3 = phi float [ 1.000000e+00, %1 ], [ %7, %2 ]
%4 = fmul float %3, 2.000000e+00
%5 = fdiv float %0, %4
%6 = fmul float %3, 5.000000e-01
%7 = fadd float %6, %5
%8 = fsub float %3, %7
%9 = tail call i32 @fabs(float %8)
%10 = icmp slt i32 %9, 1
br i1 %10, label %11, label %2
11: ; preds = %2
ret float %3
}
double acos(x)
double x;
{ return arcsine(x, 1); }


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

x86 assembly (clang, -O2):
<acos>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%al
call   1030 <arcsine@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @acos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 (double, i32, ...) bitcast (i32 (...)* @arcsine to i32 (double, i32, ...)*)(double %3, i32 1)
%5 = sitofp i32 %4 to double
ret double %5
}

LLVM IR (-O2):
define double @acos(double %0) {
%2 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @arcsine to i32 (double, i32, ...)*)(double %0, i32 1)
%3 = sitofp i32 %2 to double
ret double %3
}
int fib(int n) {
  if (n == 0)
    return 1;
  if (n == 1)
    return 1;
  return fib(n - 1) + fib(n - 2);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fib+0x21>
movl   $0x1,-0x4(%rbp)
jmp    116a <fib+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fib+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fib+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jb     1145 <fib+0x35>
mov    %edi,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
add    $0xfffffffe,%ebx
add    %eax,%ebp
cmp    $0x1,%ebx
ja     1130 <fib+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %8, 2
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
void BREAKIF(int cond) {
  if (cond) {
    raise(SIGINT);
  }
}


x86 assembly (clang, -O0):
<BREAKIF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1133 <BREAKIF+0x23>
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BREAKIF>:
test   %edi,%edi
je     1122 <BREAKIF+0x12>
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
jmp    1030 <raise@plt>
ret

LLVM IR (-O0):
@SIGINT = global i32 0
define void @BREAKIF(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @SIGINT
%7 = call i32 @raise(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
define void @BREAKIF(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* @SIGINT
%5 = tail call i32 @raise(i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ translit_text(char *const, int const, char, char);
void newline_to_nul(char *const s, const int len) {
  translit_text(s, len, '\n', '\0');
}


x86 assembly (clang, -O0):
<newline_to_nul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0xa,%edx
xor    %ecx,%ecx
call   1030 <translit_text@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newline_to_nul>:
mov    $0xa,%edx
xor    %ecx,%ecx
jmp    1030 <translit_text@plt>

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

LLVM IR (-O2):
define void @newline_to_nul(i8* %0, i32 %1) {
%3 = tail call i32 @translit_text(i8* %0, i32 %1, i8 signext 10, i8 signext 0)
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int /*<<< orphan*/, int, int /*<<< orphan*/);
extern struct SN_env *norwegian_UTF_8_create_env(void) {
  return SN_create_env(0, 2, 0);
}


x86 assembly (clang, -O0):
<norwegian_UTF_8_create_env>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x2,%esi
mov    %edx,%edi
call   1030 <SN_create_env@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<norwegian_UTF_8_create_env>:
xor    %edi,%edi
mov    $0x2,%esi
xor    %edx,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @norwegian_UTF_8_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 0, i32 2, i32 0)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @norwegian_UTF_8_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 0, i32 2, i32 0)
ret %struct.SN_env* %1
}
int ft_isalpha(int c) {
  if (c >= 'a' && c <= 'z')
    return (1);
  if (c >= 'A' && c <= 'Z')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1127 <ft_isalpha+0x27>
cmpl   $0x7a,-0x8(%rbp)
jg     1127 <ft_isalpha+0x27>
movl   $0x1,-0x4(%rbp)
jmp    114e <ft_isalpha+0x4e>
cmpl   $0x41,-0x8(%rbp)
jl     1147 <ft_isalpha+0x47>
cmpl   $0x5a,-0x8(%rbp)
jg     1147 <ft_isalpha+0x47>
movl   $0x1,-0x4(%rbp)
jmp    114e <ft_isalpha+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %18
10: ; preds = %6, %1
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 65
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 90
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %2
br label %18
17: ; preds = %13, %10
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
__attribute__((visibility("default"))) void nonleaf(void) {}


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

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

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

LLVM IR (-O2):
define void @nonleaf() {
ret void
}
const char *ccnxPortalClientAbout_LongNotice(void) {
  return "Copyright (c) 2017 Cisco and/or its affiliates.\nLicensed under the "
         "Apache License, Version 2.0 (the \"License\");\nyou may not use this "
         "file except in compliance with the License.\nYou may obtain a copy "
         "of the License at:\n\n    "
         "http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by "
         "applicable law or agreed to in writing, software\ndistributed under "
         "the License is distributed on an \"AS IS\" BASIS,\nWITHOUT "
         "WARRANTIES OR CONDITIONS OF ANY KIND, either express or "
         "implied.\nSee the License for the specific language governing "
         "permissions and\nlimitations under the License.\n";
}


x86 assembly (clang, -O0):
<ccnxPortalClientAbout_LongNotice>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccnxPortalClientAbout_LongNotice>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [574 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0ALicensed under the Apache License, Version 2.0 (the \22License\22);\0Ayou may not use this file except in compliance with the License.\0AYou may obtain a copy of the License at:\0A\0A http://www.apache.org/licenses/LICENSE-2.0\0A\0AUnless required by applicable law or agreed to in writing, software\0Adistributed under the License is distributed on an \22AS IS\22 BASIS,\0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\0ASee the License for the specific language governing permissions and\0Alimitations under the License.\0A\00"
define i8* @ccnxPortalClientAbout_LongNotice() {
ret i8* getelementptr inbounds ([574 x i8], [574 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [574 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0ALicensed under the Apache License, Version 2.0 (the \22License\22);\0Ayou may not use this file except in compliance with the License.\0AYou may obtain a copy of the License at:\0A\0A http://www.apache.org/licenses/LICENSE-2.0\0A\0AUnless required by applicable law or agreed to in writing, software\0Adistributed under the License is distributed on an \22AS IS\22 BASIS,\0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\0ASee the License for the specific language governing permissions and\0Alimitations under the License.\0A\00"
define i8* @ccnxPortalClientAbout_LongNotice() {
ret i8* getelementptr inbounds ([574 x i8], [574 x i8]* @.str, i64 0, i64 0)
}
int toup(int c) { return (c >= 'a' && c <= 'z') ? c - 'a' + 'A' : c; }


x86 assembly (clang, -O0):
<toup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     112c <toup+0x2c>
cmpl   $0x7a,-0x4(%rbp)
jg     112c <toup+0x2c>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <toup+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @toup(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 %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 97
%11 = add nsw i32 %10, 65
br label %14
12: ; preds = %5, %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ %11, %8 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @toup(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
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int __attribute__((no)) baz(int x) { abort(); }


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<baz>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @baz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @baz(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
void gtk_arrow_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_arrow_type_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
unsigned int aarch64_banked_spsr_index(unsigned int el) {
  static const unsigned int map[4] = {
      [1] = 0,
      [2] = 6,
      [3] = 7,
  };
  assert(el >= 1 && el <= 3);
  return map[el];
}


x86 assembly (clang, -O0):
<aarch64_banked_spsr_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jb     1134 <aarch64_banked_spsr_index+0x24>
cmpl   $0x3,-0x4(%rbp)
setbe  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0xeb3(%rip),%rax
mov    (%rax,%rcx,4),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aarch64_banked_spsr_index>:
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%eax
xor    %edi,%edi
cmp    $0x3,%eax
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
lea    0xed3(%rip),%rcx
mov    (%rcx,%rax,4),%eax
pop    %rbx
ret

LLVM IR (-O0):
@aarch64_banked_spsr_index.map = internal constant [4 x i32] [i32 0, i32 0, i32 6, i32 7]
define i32 @aarch64_banked_spsr_index(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp uge i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ule i32 %6, 3
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds [4 x i32], [4 x i32]* @aarch64_banked_spsr_index.map, i64 0, i64 %13
%15 = load i32, i32* %14
ret i32 %15
}

LLVM IR (-O2):
@aarch64_banked_spsr_index.map = internal unnamed_addr constant [4 x i32] [i32 0, i32 0, i32 6, i32 7]
define i32 @aarch64_banked_spsr_index(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 3
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = zext i32 %0 to i64
%7 = getelementptr inbounds [4 x i32], [4 x i32]* @aarch64_banked_spsr_index.map, i64 0, i64 %6
%8 = load i32, i32* %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ outchar(char);
int main() { outchar('A'); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x41,%edi
call   1030 <outchar@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @outchar(i8 signext 65)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @outchar(i8 signext 65)
ret i32 0
}
/* Type definitions */
struct FiFileInfo {
  int dummy;
};

/* Variables and functions */
size_t fi_file_get_content_hash(struct FiFileInfo *file) {
  if (!file)
    return 0;
  return 0;
}


x86 assembly (clang, -O0):
<fi_file_get_content_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <fi_file_get_content_hash+0x20>
movq   $0x0,-0x8(%rbp)
jmp    1128 <fi_file_get_content_hash+0x28>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.FiFileInfo = type { i32 }
define i64 @fi_file_get_content_hash(%struct.FiFileInfo* %0) {
%2 = alloca i64
%3 = alloca %struct.FiFileInfo*
store %struct.FiFileInfo* %0, %struct.FiFileInfo** %3
%4 = load %struct.FiFileInfo*, %struct.FiFileInfo** %3
%5 = icmp ne %struct.FiFileInfo* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i64 0, i64* %2
br label %8
7: ; preds = %1
store i64 0, i64* %2
br label %8
8: ; preds = %7, %6
%9 = load i64, i64* %2
ret i64 %9
}

LLVM IR (-O2):
%struct.FiFileInfo = type { i32 }
define i64 @fi_file_get_content_hash(%struct.FiFileInfo* nocapture readnone %0) {
ret i64 0
}
void dummy_circle(long r) { r = r; }


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

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

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

LLVM IR (-O2):
define void @dummy_circle(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char **argv) {
  fprintf(stderr, "%s user [ttyname]\n", argv[0]);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xecc(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"%s user [ttyname]\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"%s user [ttyname]\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
double percent_of(double percent, double source) {
  if (percent <= 0 || percent > 100 || source == 0) {
    return -1;
  }
  percent = percent / 100.0;
  return (source * percent);
}


x86 assembly (clang, -O0):
<percent_of>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jae    114b <percent_of+0x4b>
movsd  -0x10(%rbp),%xmm0
movsd  0xed7(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     114b <percent_of+0x4b>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    115d <percent_of+0x5d>
jp     115d <percent_of+0x5d>
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1182 <percent_of+0x82>
movsd  -0x10(%rbp),%xmm0
movsd  0xe96(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<percent_of>:
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm2,%xmm0
movsd  0xeec(%rip),%xmm0
jae    113c <percent_of+0x3c>
ucomisd 0xeea(%rip),%xmm2
ja     113c <percent_of+0x3c>
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm1
jne    112c <percent_of+0x2c>
jnp    113c <percent_of+0x3c>
divsd  0xed4(%rip),%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @percent_of(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = fcmp ole double %6, 0.000000e+00
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = load double, double* %4
%10 = fcmp ogt double %9, 1.000000e+02
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load double, double* %5
%13 = fcmp oeq double %12, 0.000000e+00
br i1 %13, label %14, label %15
14: ; preds = %11, %8, %2
store double -1.000000e+00, double* %3
br label %21
15: ; preds = %11
%16 = load double, double* %4
%17 = fdiv double %16, 1.000000e+02
store double %17, double* %4
%18 = load double, double* %5
%19 = load double, double* %4
%20 = fmul double %18, %19
store double %20, double* %3
br label %21
21: ; preds = %15, %14
%22 = load double, double* %3
ret double %22
}

LLVM IR (-O2):
define double @percent_of(double %0, double %1) {
%3 = fcmp ole double %0, 0.000000e+00
%4 = fcmp ogt double %0, 1.000000e+02
%5 = or i1 %3, %4
%6 = fcmp oeq double %1, 0.000000e+00
%7 = or i1 %5, %6
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = fdiv double %0, 1.000000e+02
%10 = fmul double %9, %1
br label %11
11: ; preds = %2, %8
%12 = phi double [ %10, %8 ], [ -1.000000e+00, %2 ]
ret double %12
}