xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
char *strdup(char *);
char *abac_xstrdup(char *source) {
  char *ret;
  if (source == NULL)
    return NULL;
  ret = strdup(source);
  if (ret == NULL)
    err(1, "strdup");
  return ret;
}


x86 assembly (clang, -O0):
<abac_xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <abac_xstrdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1175 <abac_xstrdup+0x55>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116d <abac_xstrdup+0x4d>
mov    $0x1,%edi
lea    0xe98(%rip),%rsi
call   1030 <err@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abac_xstrdup>:
push   %rax
test   %rdi,%rdi
je     1143 <abac_xstrdup+0x23>
call   1040 <strdup@plt>
test   %rax,%rax
je     1132 <abac_xstrdup+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"strdup\00"
define i8* @abac_xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %17
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strdup(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %8
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %15, %7
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [7 x i8] c"strdup\00"
define noalias i8* @abac_xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %3, %6, %1
%9 = phi i8* [ null, %1 ], [ null, %6 ], [ %4, %3 ]
ret i8* %9
}
int main() {
  int day, month;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRB7_get(void) { return U_WMRCORENONE_get("U_WMRB7"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRB7\00"
define i32 @U_WMRB7_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRB7\00"
define i32 @U_WMRB7_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
unsigned char t13(unsigned input) {
  unsigned char output;
  __asm__("nop" : "=a"(output) : "0"(input));
  return output;
}


x86 assembly (clang, -O0):
<t13>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
nop
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t13>:
mov    %edi,%eax
nop
ret

LLVM IR (-O0):
define zeroext i8 @t13(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm "nop", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 %4)
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %3
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @t13(i32 %0) {
%2 = tail call i32 asm "nop", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 %0)
%3 = trunc i32 %2 to i8
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, double);
char *str_replace(char *, char *, char *);
char *dtoa(double d) {
  char *s = malloc(10);
  char *formated;
  sprintf(s, "%.2f", d);
  formated = str_replace(".", ",", s);
  free(s);
  return formated;
}


x86 assembly (clang, -O0):
<dtoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0xa,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xe95(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x10(%rbp),%rdx
lea    0xe8a(%rip),%rdi
lea    0xe85(%rip),%rsi
call   1040 <str_replace@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtoa>:
push   %r14
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
mov    $0xa,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xea3(%rip),%rsi
mov    %rax,%rdi
movsd  (%rsp),%xmm0
call   1060 <sprintf@plt>
lea    0xe94(%rip),%rdi
lea    0xe8f(%rip),%rsi
mov    %rbx,%rdx
call   1040 <str_replace@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.2f\00"
@.str.1 = [2 x i8] c".\00"
@.str.2 = [2 x i8] c",\00"
define i8* @dtoa(double %0) {
%2 = alloca double
%3 = alloca i8*
%4 = alloca i8*
store double %0, double* %2
%5 = call i8* @malloc(i32 10)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load double, double* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %7)
%9 = load i8*, i8** %3
%10 = call i8* @str_replace(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %3
%12 = call i32 @free(i8* %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.2f\00"
@.str.1 = [2 x i8] c".\00"
@.str.2 = [2 x i8] c",\00"
define i8* @dtoa(double %0) {
%2 = tail call dereferenceable_or_null(10) i8* @malloc(i32 10)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %0)
%4 = tail call i8* @str_replace(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%5 = tail call i32 @free(i8* %2)
ret i8* %4
}
type(ch, s) char *s;
{
  register char *p;
  for (p = s; *p++;)
    ;
  --p;
  write(ch, s, p - s);
  return (p - s);
}


x86 assembly (clang, -O0):
<type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
cmpb   $0x0,(%rax)
je     1144 <type+0x34>
jmp    1127 <type+0x17>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rax
sub    %rax,%rdx
mov    $0x0,%al
call   1030 <write@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<type>:
push   %rbx
mov    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rsi,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1120 <type+0x10>
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <write@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @type(i32 %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = ptrtoint i8* %4 to i64
%10 = ptrtoint i8* %1 to i64
%11 = sub i64 %9, %10
%12 = tail call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %0, i8* %1, i64 %11)
%13 = trunc i64 %11 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ esc(char *);
void decid(void) { esc("Z"); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"Z\00"
define void @decid() {
%1 = call i32 @esc(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"Z\00"
define void @decid() {
%1 = tail call i32 @esc(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void help(const char *prg) {
  fprintf(stderr,
          "Usage: %s TIMESPAN\n"
          "Returns the sum of TIMESPAN in seconds.\n\n"
          "Example: %s 5h4m11s",
          prg);
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [80 x i8] c"Usage: %s TIMESPAN\0AReturns the sum of TIMESPAN in seconds.\0A\0AExample: %s 5h4m11s\00"
@EXIT_FAILURE = global i32 0
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [80 x i8] c"Usage: %s TIMESPAN\0AReturns the sum of TIMESPAN in seconds.\0A\0AExample: %s 5h4m11s\00"
@EXIT_FAILURE = global i32 0
define void @help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void gtk_image_set_from_stock() {}


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

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

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

LLVM IR (-O2):
define void @gtk_image_set_from_stock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, int /*<<< orphan*/);
int /*<<< orphan*/ sin(double);
int main(void) {
  double angle = 30.00;
  printf("sin(%.2lf)=%.2lf\n", angle, sin(angle * 3.14159265 / 180));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeba(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xea5(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  -0x18(%rbp),%xmm0
mov    %eax,%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <sin@plt>
lea    0xedb(%rip),%rdi
movsd  0xecb(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"sin(%.2lf)=%.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 3.000000e+01, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 0x400921FB53C8D4F1
%6 = fdiv double %5, 1.800000e+02
%7 = call i32 @sin(double %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %3, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"sin(%.2lf)=%.2lf\0A\00"
define i32 @main() {
%1 = tail call i32 @sin(double 0x3FE0C15237DB38A1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double 3.000000e+01, i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void getVect(int v[], int *n) {
  int j;
  scanf("%d", n);
  for (j = 0; j < *n; j++) {
    scanf("%d", &v[j]);
  }
}


x86 assembly (clang, -O0):
<getVect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    116f <getVect+0x5f>
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea4(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <getVect+0x27>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getVect>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
lea    0xedb(%rip),%rdi
call   1030 <scanf@plt>
cmpl   $0x0,(%r14)
jle    115b <getVect+0x4b>
xor    %ebx,%ebx
lea    0xec7(%rip),%r15
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r12,%rsi
call   1030 <scanf@plt>
add    $0x1,%rbx
movslq (%r14),%rax
add    $0x4,%r12
cmp    %rax,%rbx
jl     1140 <getVect+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @getVect(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32 0, i32* %5
br label %8
8: ; preds = %19, %2
%9 = load i32, i32* %5
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %22
13: ; preds = %8
%14 = load i32*, i32** %3
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
br label %19
19: ; preds = %13
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %8
22: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @getVect(i32* %0, i32* %1) {
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %2, %6
%7 = phi i64 [ %10, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%10 = add nuw nsw i64 %7, 1
%11 = load i32, i32* %1
%12 = sext i32 %11 to i64
%13 = icmp slt i64 %10, %12
br i1 %13, label %6, label %14
14: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
char *getfname(char *);
void doOpenCommand(FILE **f, char *fname) {
  *f = NULL;
  if (!fname) {
    fname = getfname("Open file name:");
  }
  if (fname) {
    *f = fopen(fname, "r");
  };
}


x86 assembly (clang, -O0):
<doOpenCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x10(%rbp)
jne    1156 <doOpenCommand+0x36>
lea    0xeb3(%rip),%rdi
call   1030 <getfname@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     117b <doOpenCommand+0x5b>
mov    -0x10(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doOpenCommand>:
push   %rbx
mov    %rdi,%rbx
movq   $0x0,(%rdi)
test   %rsi,%rsi
jne    1144 <doOpenCommand+0x24>
lea    0xec9(%rip),%rdi
call   1030 <getfname@plt>
mov    %rax,%rsi
test   %rax,%rax
je     1159 <doOpenCommand+0x39>
lea    0xec5(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1040 <fopen@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Open file name:\00"
@.str.1 = [2 x i8] c"r\00"
define void @doOpenCommand(i32** %0, i8* %1) {
%3 = alloca i32**
%4 = alloca i8*
store i32** %0, i32*** %3
store i8* %1, i8** %4
%5 = load i32**, i32*** %3
store i32* null, i32** %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i8* @getfname(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i8* %9, i8** %4
br label %10
10: ; preds = %8, %2
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i8*, i8** %4
%15 = call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32**, i32*** %3
store i32* %15, i32** %16
br label %17
17: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Open file name:\00"
@.str.1 = [2 x i8] c"r\00"
define void @doOpenCommand(i32** nocapture writeonly %0, i8* %1) {
store i32* null, i32** %0
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i8* @getfname(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %2, %4
%8 = phi i8* [ %5, %4 ], [ %1, %2 ]
%9 = tail call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %9, i32** %0
br label %10
10: ; preds = %7, %4
ret void
}
int mul(int a, int b) {
  if (b == 1)
    return a;
  else
    return a + mul(a, b - 1);
}


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1133 <mul+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1151 <mul+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <mul@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul>:
lea    -0x1(%rsi),%ecx
imul   %edi,%ecx
xor    %eax,%eax
cmp    $0x1,%esi
cmovne %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @mul(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* %5
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
store i32 %9, i32* %3
br label %17
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = sub nsw i32 %13, 1
%15 = call i32 @mul(i32 %12, i32 %14)
%16 = add nsw i32 %11, %15
store i32 %16, i32* %3
br label %17
17: ; preds = %10, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @mul(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 1
%4 = add i32 %1, -1
%5 = mul i32 %4, %0
%6 = select i1 %3, i32 0, i32 %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int sancus_time_is_lt_zero(const struct timespec *a) {
  return (a->tv_sec < 0) || (a->tv_nsec < 0);
}


x86 assembly (clang, -O0):
<sancus_time_is_lt_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmpq   $0x0,(%rcx)
mov    %al,-0x9(%rbp)
jl     112a <sancus_time_is_lt_zero+0x2a>
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sancus_time_is_lt_zero>:
cmpq   $0x0,(%rdi)
js     110f <sancus_time_is_lt_zero+0xf>
mov    0x8(%rdi),%rax
shr    $0x3f,%rax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i32 @sancus_time_is_lt_zero(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = icmp slt i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = load %struct.timespec*, %struct.timespec** %2
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = icmp slt i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ true, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i32 @sancus_time_is_lt_zero(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%7 = load i64, i64* %6
%8 = lshr i64 %7, 63
%9 = trunc i64 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 1, %1 ], [ %9, %5 ]
ret i32 %11
}
double Ess(double l, double m, double n) { return -0.05907; }


x86 assembly (clang, -O0):
<Ess>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee5(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ess>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @Ess(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
ret double -5.907000e-02
}

LLVM IR (-O2):
define double @Ess(double %0, double %1, double %2) {
ret double -5.907000e-02
}
/* Variables and functions */
double __infer_nondet_double();
double erf(double x) { return __infer_nondet_double(); }


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

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

LLVM IR (-O0):
define double @erf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @__infer_nondet_double()
ret double %3
}

LLVM IR (-O2):
define double @erf(double %0) {
%2 = tail call double (...) @__infer_nondet_double()
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *freopen(char const *, char const *, int /*<<< orphan*/ *);
FILE *_freopen(const char *path, const char *mode, FILE *file) {
  return freopen(path, mode, file);
}


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

x86 assembly (clang, -O2):
<_freopen>:
jmp    1030 <freopen@plt>

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

LLVM IR (-O2):
define i32* @_freopen(i8* %0, i8* %1, i32* %2) {
%4 = tail call i32* @freopen(i8* %0, i8* %1, i32* %2)
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ print_verbose(char *);
void print_try_address() {
  print_verbose("Will now try to contact node by address\n");
}


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"Will now try to contact node by address\0A\00"
define void @print_try_address() {
%1 = call i32 @print_verbose(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"Will now try to contact node by address\0A\00"
define void @print_try_address() {
%1 = tail call i32 @print_verbose(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned int *, unsigned int const *, size_t const);
unsigned int *uivector(size_t const);
unsigned int *clone_uivector(const unsigned int *v, const size_t n) {
  unsigned int *clone = uivector(n);
  memcpy(clone, v, n * sizeof(int unsigned));
  return clone;
}


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

x86 assembly (clang, -O2):
<clone_uivector>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <uivector@plt>
mov    %rax,%r15
shl    $0x2,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32* @clone_uivector(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32*
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call i32* @uivector(i64 %6)
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32*, i32** %3
%10 = load i64, i64* %4
%11 = mul i64 %10, 4
%12 = call i32 @memcpy(i32* %8, i32* %9, i64 %11)
%13 = load i32*, i32** %5
ret i32* %13
}

LLVM IR (-O2):
define i32* @clone_uivector(i32* %0, i64 %1) {
%3 = tail call i32* @uivector(i64 %1)
%4 = shl i64 %1, 2
%5 = tail call i32 @memcpy(i32* %3, i32* %0, i64 %4)
ret i32* %3
}
/* Type definitions */
struct mem_pool {
  int dummy;
};

/* Variables and functions */
char *mem_pool_alloc(struct mem_pool *, size_t);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
char *mem_pool_strdup(struct mem_pool *pool, const char *string) {
  size_t length = strlen(string);
  char *result = mem_pool_alloc(pool, length + 1);
  strcpy(result, string);
  return result;
}


x86 assembly (clang, -O0):
<mem_pool_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
call   1050 <mem_pool_alloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_pool_strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %r14,%rdi
call   1050 <mem_pool_alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.mem_pool = type { i32 }
define i8* @mem_pool_strdup(%struct.mem_pool* %0, i8* %1) {
%3 = alloca %struct.mem_pool*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store %struct.mem_pool* %0, %struct.mem_pool** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %5
%9 = load %struct.mem_pool*, %struct.mem_pool** %3
%10 = load i64, i64* %5
%11 = add i64 %10, 1
%12 = call i8* @mem_pool_alloc(%struct.mem_pool* %9, i64 %11)
store i8* %12, i8** %6
%13 = load i8*, i8** %6
%14 = load i8*, i8** %4
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %6
ret i8* %16
}

LLVM IR (-O2):
%struct.mem_pool = type { i32 }
define i8* @mem_pool_strdup(%struct.mem_pool* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add i64 %3, 1
%5 = tail call i8* @mem_pool_alloc(%struct.mem_pool* %0, i64 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* %1)
ret i8* %5
}
extern void libvampsdk_v_2_3_present(void) {}


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

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

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

LLVM IR (-O2):
define void @libvampsdk_v_2_3_present() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_help(void) {
  fprintf(stderr,
          "Usage: xopo [options] format [fields]\n"
          "    --help                Display this help text\n"
          "    --option <opts> -or -O <opts> Give formatting options\n"
          "    --output <file> -or -o <file> Use file as output destination\n"
          "    --po <file> or -f <file> Generate new msgid's for a po file\n"
          "    --simplify <text> OR -s <text> Show simplified form of the "
          "format string\n"
          "    --version             Display version information\n"
          "    --warn OR -W          Display warnings in text on stderr\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [467 x i8] c"Usage: xopo [options] format [fields]\0A --help Display this help text\0A --option <opts> -or -O <opts> Give formatting options\0A --output <file> -or -o <file> Use file as output destination\0A --po <file> or -f <file> Generate new msgid's for a po file\0A --simplify <text> OR -s <text> Show simplified form of the format string\0A --version Display version information\0A --warn OR -W Display warnings in text on stderr\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([467 x i8], [467 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [467 x i8] c"Usage: xopo [options] format [fields]\0A --help Display this help text\0A --option <opts> -or -O <opts> Give formatting options\0A --output <file> -or -o <file> Use file as output destination\0A --po <file> or -f <file> Generate new msgid's for a po file\0A --simplify <text> OR -s <text> Show simplified form of the format string\0A --version Display version information\0A --warn OR -W Display warnings in text on stderr\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([467 x i8], [467 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int PCF_RdSingle(int);
bool digitalRead(uint8_t mask) {
  uint8_t iolines = PCF_RdSingle(0x3F);
  if (iolines & mask)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<digitalRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x3f,%edi
call   1030 <PCF_RdSingle@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     1143 <digitalRead+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <digitalRead+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<digitalRead>:
push   %rbx
mov    %edi,%ebx
mov    $0x3f,%edi
call   1030 <PCF_RdSingle@plt>
xor    %ecx,%ecx
test   %ebx,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @digitalRead(i32 %0) {
%2 = tail call i32 @PCF_RdSingle(i32 63)
%3 = and i32 %2, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fputs(char *, int /*<<< orphan*/ *);
int idris_writeStr(void *h, char *str) {
  FILE *f = (FILE *)h;
  if (fputs(str, f)) {
    return 0;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<idris_writeStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <fputs@plt>
cmp    $0x0,%rax
je     114b <idris_writeStr+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1152 <idris_writeStr+0x42>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idris_writeStr>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <fputs@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @idris_writeStr(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %6
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = call i64 @fputs(i8* %9, i32* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %15
14: ; preds = %2
store i32 -1, i32* %3
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @idris_writeStr(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i64 @fputs(i8* %1, i32* %3)
%5 = icmp eq i64 %4, 0
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void show_item(const char *p) { printf("Item [%s]\n", p); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Item [%s]\0A\00"
define void @show_item(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void drop_all_views() {}


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

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

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

LLVM IR (-O2):
define void @drop_all_views() {
ret void
}
/* Type definitions */
struct feed_line {
  int dummy;
};
struct feed_client {
  int dummy;
};

/* Variables and functions */
char feed_line_init(struct feed_line *const, struct feed_client *const);
char feed_line_init_cb(void *const p_object, struct feed_client *const p_client,
                       void const *const p_descriptor) {
  char b_result;
  struct feed_line *const p_line = (struct feed_line *)(p_object);
  (void)(p_descriptor);
  b_result = feed_line_init(p_line, p_client);
  return b_result;
}


x86 assembly (clang, -O0):
<feed_line_init_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <feed_line_init@plt>
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<feed_line_init_cb>:
jmp    1030 <feed_line_init@plt>

LLVM IR (-O0):
%struct.feed_client = type { i32 }
%struct.feed_line = type { i32 }
define signext i8 @feed_line_init_cb(i8* %0, %struct.feed_client* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca %struct.feed_client*
%6 = alloca i8*
%7 = alloca i8
%8 = alloca %struct.feed_line*
store i8* %0, i8** %4
store %struct.feed_client* %1, %struct.feed_client** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to %struct.feed_line*
store %struct.feed_line* %10, %struct.feed_line** %8
%11 = load i8*, i8** %6
%12 = load %struct.feed_line*, %struct.feed_line** %8
%13 = load %struct.feed_client*, %struct.feed_client** %5
%14 = call signext i8 @feed_line_init(%struct.feed_line* %12, %struct.feed_client* %13)
store i8 %14, i8* %7
%15 = load i8, i8* %7
ret i8 %15
}

LLVM IR (-O2):
%struct.feed_client = type { i32 }
%struct.feed_line = type { i32 }
define signext i8 @feed_line_init_cb(i8* %0, %struct.feed_client* %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to %struct.feed_line*
%5 = tail call signext i8 @feed_line_init(%struct.feed_line* %4, %struct.feed_client* %1)
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ write_register(int, int);
void start_video_mode() {
  write_register(0x4, 0x00);
  write_register(0x1, 1024);
  write_register(0x2, 768);
  write_register(0x3, 32);
  write_register(0x4, 0x01);
}


x86 assembly (clang, -O0):
<start_video_mode>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <write_register@plt>
mov    $0x1,%edi
mov    $0x400,%esi
call   1030 <write_register@plt>
mov    $0x2,%edi
mov    $0x300,%esi
call   1030 <write_register@plt>
mov    $0x3,%edi
mov    $0x20,%esi
call   1030 <write_register@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <write_register@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_video_mode>:
push   %rax
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <write_register@plt>
mov    $0x1,%edi
mov    $0x400,%esi
call   1030 <write_register@plt>
mov    $0x2,%edi
mov    $0x300,%esi
call   1030 <write_register@plt>
mov    $0x3,%edi
mov    $0x20,%esi
call   1030 <write_register@plt>
mov    $0x4,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <write_register@plt>

LLVM IR (-O0):
define void @start_video_mode() {
%1 = call i32 @write_register(i32 4, i32 0)
%2 = call i32 @write_register(i32 1, i32 1024)
%3 = call i32 @write_register(i32 2, i32 768)
%4 = call i32 @write_register(i32 3, i32 32)
%5 = call i32 @write_register(i32 4, i32 1)
ret void
}

LLVM IR (-O2):
define void @start_video_mode() {
%1 = tail call i32 @write_register(i32 4, i32 0)
%2 = tail call i32 @write_register(i32 1, i32 1024)
%3 = tail call i32 @write_register(i32 2, i32 768)
%4 = tail call i32 @write_register(i32 3, i32 32)
%5 = tail call i32 @write_register(i32 4, i32 1)
ret void
}
void create_low_side_drivers(int pwm2, int pwm1, int pwm0) {}


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

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

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

LLVM IR (-O2):
define void @create_low_side_drivers(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ iconv_t;

/* Variables and functions */
int iconv_close(int /*<<< orphan*/);
int hs_iconv_close(iconv_t cd) { return iconv_close(cd); }


x86 assembly (clang, -O0):
<hs_iconv_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <iconv_close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hs_iconv_close>:
jmp    1030 <iconv_close@plt>

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

LLVM IR (-O2):
define i32 @hs_iconv_close(i32 %0) {
%2 = tail call i32 @iconv_close(i32 %0)
ret i32 %2
}
int WIFI_GET_STATUS(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @WIFI_GET_STATUS() {
ret i32 1
}
void usicConfigureIIC(const unsigned int cbase) { ; }


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

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

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

LLVM IR (-O2):
define void @usicConfigureIIC(i32 %0) {
ret void
}
__attribute__((no)) long trampoline_take_addr_and_gen_cfg(unsigned long n1) {
  long ret;
  __asm__ __volatile__("leaq 1f(%%rip), %%r11\n\t"
                       "movq %%r11, %%fs:0x20\n\t"
                       "jmpq *%%gs:0x10000+"
                       "0xD0"
                       "\n\t"
                       "1:\n\t"
                       : "=a"(ret)
                       : "D"(n1)
                       : "memory");
  return ret;
}


x86 assembly (clang, -O0):
<trampoline_take_addr_and_gen_cfg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x11(%rip),%r11
mov    %r11,%fs:0x20
jmp    *%gs:0x100d0
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trampoline_take_addr_and_gen_cfg>:
lea    0x11(%rip),%r11
mov    %r11,%fs:0x20
jmp    *%gs:0x100d0
ret

LLVM IR (-O0):
define i64 @trampoline_take_addr_and_gen_cfg(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 asm sideeffect "leaq 1f(%rip), %r11\0A\09movq %r11, %fs:0x20\0A\09jmpq *%gs:0x10000+0xD0\0A\091:\0A\09", "={ax},{di},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @trampoline_take_addr_and_gen_cfg(i64 %0) {
%2 = tail call i64 asm sideeffect "leaq 1f(%rip), %r11\0A\09movq %r11, %fs:0x20\0A\09jmpq *%gs:0x10000+0xD0\0A\091:\0A\09", "={ax},{di},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
unsigned xrop3_246_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ S;
  stk1 = T | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_246_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_246_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    $0xff,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_246_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
ret i32 %28
}

LLVM IR (-O2):
define i32 @xrop3_246_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, 255
%8 = or i32 %6, %7
ret i32 %8
}