xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  long quot;
  long rem;
};
typedef TYPE_1__ ldiv_t;

/* Variables and functions */
ldiv_t ldiv(long int count, long int deniminator) {
  ldiv_t data;
  data.quot = (long int)(count / deniminator);
  data.rem = (long int)(count % deniminator);
  return data;
}


x86 assembly (clang, -O0):
<ldiv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
cqto
idiv   %rcx
mov    %rdx,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldiv>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1115 <ldiv+0x15>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
define { i64, i64 } @ldiv(i64 %0, i64 %1) {
%3 = alloca %struct.TYPE_3__
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = sdiv i64 %6, %7
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i64 %8, i64* %9
%10 = load i64, i64* %4
%11 = load i64, i64* %5
%12 = srem i64 %10, %11
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
store i64 %12, i64* %13
%14 = bitcast %struct.TYPE_3__* %3 to { i64, i64 }*
%15 = load { i64, i64 }, { i64, i64 }* %14
ret { i64, i64 } %15
}

LLVM IR (-O2):
define { i64, i64 } @ldiv(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
%4 = srem i64 %0, %1
%5 = insertvalue { i64, i64 } poison, i64 %3, 0
%6 = insertvalue { i64, i64 } %5, i64 %4, 1
ret { i64, i64 } %6
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void my_free(int *q) { free(q); }


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

x86 assembly (clang, -O2):
<my_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @my_free(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
scalar_t__ system(char *);
int cat(char *a, char *b) {
  char shellCommand[32];
  sprintf(shellCommand, "cat %s >> %s", b, a);
  if (0 != system(shellCommand)) {
    return -1;
  }
  puts("haha");
  return 0;
}


x86 assembly (clang, -O0):
<cat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xead(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x40(%rbp),%rdi
call   1040 <system@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     117b <cat+0x4b>
movl   $0xffffffff,-0x4(%rbp)
jmp    118e <cat+0x5e>
lea    0xe8b(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cat>:
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%rdx
mov    %rdi,%rcx
lea    0xebe(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1170 <cat+0x40>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"cat %s >> %s\00"
@.str.1 = [5 x i8] c"haha\00"
define i32 @cat(i8* %0, i8* %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%6 = call i64 @system(i8* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ 0, %8 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
void memcpy(void *dest, void *src, int nLen) {}


x86 assembly (clang, -O0):
<memcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @memcpy(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
ret void
}

LLVM IR (-O2):
define void @memcpy(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
progerr(s) char *s;
{ error("program error ", s); }


x86 assembly (clang, -O0):
<progerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<progerr>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"program error \00"
define i32 @progerr(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [15 x i8] c"program error \00"
define i32 @progerr(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Variables and functions */
long double remainder(double, double);
long double remainderl(long double x, long double y) {
  return remainder((double)x, (double)y);
}


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

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

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

LLVM IR (-O2):
define x86_fp80 @remainderl(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call x86_fp80 @remainder(double %3, double %4)
ret x86_fp80 %5
}
void sortByNomeComponenteUm() {}


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

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

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

LLVM IR (-O2):
define void @sortByNomeComponenteUm() {
ret void
}
g() {
  int x[2];
  if (_Generic((0, x), int * : 1, int[2] : 3) != 1)
    abort();
}


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

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

LLVM IR (-O0):
define i32 @g() {
%1 = alloca i32
%2 = alloca [2 x i32]
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @g() {
ret i32 undef
}
/* Variables and functions */
int pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int N;
  printf("Enter the value of N: \n");
  scanf("%d", &N);
  int ans = pow((N * (N + 1) / 2), 2);
  printf("%d", ans);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
lea    0x1(%rax),%ecx
imul   %eax,%ecx
mov    %ecx,%edi
shr    $0x1f,%edi
add    %ecx,%edi
sar    %edi
mov    $0x2,%esi
call   1060 <pow@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Enter the value of N: \0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = mul nsw i32 %6, %8
%10 = sdiv i32 %9, 2
%11 = call i32 @pow(i32 %10, i32 2)
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [23 x i8] c"Enter the value of N: \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
%7 = mul nsw i32 %6, %5
%8 = sdiv i32 %7, 2
%9 = call i32 @pow(i32 %8, i32 2)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf(
      "Usage: "
      "fsex"
      " [options] [action] [sources [destination]]\n"
      "\navailable options:\n"
      "    -a --address port	ALSA sequencer port (default "
      "20:0"
      ")\n"
      "    -d --device id	MIDI device ID (default 0x10)\n"
      "    -f --force		Overwrite destination if already exists\n"
      "    -q --quiet		Don't print messages to stdout\n"
      "\navailable actions:\n"
      "    -D --detect		Detect synth model\n"
      "    -h --help		Show short description and exit\n"
      "    -r --receive name	Retrieve bank b patch n from Juno-G\n"
      "    -s --send num	Send temporary patch to Juno-G\n"
      "    -V --version	Print version information\n");
}


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

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

LLVM IR (-O0):
@.str = [538 x i8] c"Usage: fsex [options] [action] [sources [destination]]\0A\0Aavailable options:\0A -a --address port\09ALSA sequencer port (default 20:0)\0A -d --device id\09MIDI device ID (default 0x10)\0A -f --force\09\09Overwrite destination if already exists\0A -q --quiet\09\09Don't print messages to stdout\0A\0Aavailable actions:\0A -D --detect\09\09Detect synth model\0A -h --help\09\09Show short description and exit\0A -r --receive name\09Retrieve bank b patch n from Juno-G\0A -s --send num\09Send temporary patch to Juno-G\0A -V --version\09Print version information\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([538 x i8], [538 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [537 x i8] c"Usage: fsex [options] [action] [sources [destination]]\0A\0Aavailable options:\0A -a --address port\09ALSA sequencer port (default 20:0)\0A -d --device id\09MIDI device ID (default 0x10)\0A -f --force\09\09Overwrite destination if already exists\0A -q --quiet\09\09Don't print messages to stdout\0A\0Aavailable actions:\0A -D --detect\09\09Detect synth model\0A -h --help\09\09Show short description and exit\0A -r --receive name\09Retrieve bank b patch n from Juno-G\0A -s --send num\09Send temporary patch to Juno-G\0A -V --version\09Print version information\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([537 x i8], [537 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void session_timeout(int foo) { exit(0); }


x86 assembly (clang, -O0):
<session_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<session_timeout>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @session_timeout(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @session_timeout(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int rand();
long number_mm(void) { return rand() >> 6; }


x86 assembly (clang, -O0):
<number_mm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
sar    $0x6,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_mm>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
sar    $0x6,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @number_mm() {
%1 = call i32 (...) @rand()
%2 = ashr i32 %1, 6
%3 = sext i32 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
define i64 @number_mm() {
%1 = tail call i32 (...) @rand()
%2 = ashr i32 %1, 6
%3 = sext i32 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xd6() {
  Assert_real((isbdigit(214) == 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_isbdigit.c",
              1075, ("isbdigit should be 0 for 0xd6"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xd6>:
push   %rax
mov    $0xd6,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x433,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xd6\00"
define void @t_isbdigit_0xd6() {
%1 = call i64 @isbdigit(i32 214)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1075, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xd6\00"
define void @t_isbdigit_0xd6() {
%1 = tail call i64 @isbdigit(i32 214)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1075, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ trim_lspace(char *);
char *trim_tspace(int /*<<< orphan*/);
char *trim_space(char *s) {
  assert(s != NULL);
  return trim_tspace(trim_lspace(s));
}


x86 assembly (clang, -O0):
<trim_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <trim_lspace@plt>
mov    %eax,%edi
call   1050 <trim_tspace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim_space>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <trim_lspace@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <trim_tspace@plt>

LLVM IR (-O0):
define i8* @trim_space(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @trim_lspace(i8* %7)
%9 = call i8* @trim_tspace(i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @trim_space(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @trim_lspace(i8* %0)
%6 = tail call i8* @trim_tspace(i32 %5)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
void travatela() {
  printf("Digite ENTER para continuar\n");
  getchar();
}


x86 assembly (clang, -O0):
<travatela>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"Digite ENTER para continuar\0A\00"
define void @travatela() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"Digite ENTER para continuar\00"
define void @travatela() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  char input[20];
  printf("Please provide your input: ");
  fgets(input, 20, stdin);
  printf("Your input was: %s", input);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
mov    $0x14,%esi
call   1040 <fgets@plt>
lea    -0x30(%rbp),%rsi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x14,%esi
call   1040 <fgets@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Please provide your input: \00"
@stdin = global i32 0
@.str.1 = [19 x i8] c"Your input was: %s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [20 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 20, i32 %9)
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Please provide your input: \00"
@stdin = global i32 0
@.str.1 = [19 x i8] c"Your input was: %s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %4, i32 20, i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
main() {
  double precio1 = 0, precio2 = 0;
  precio1 = 1100.25;
  precio2 = 900;
  printf("Precio 1 = %g, precio 2 = %g\n", precio1, precio2);
  ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Precio 1 = %g, precio 2 = %g\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
store double 0.000000e+00, double* %1
store double 0.000000e+00, double* %2
store double 1.100250e+03, double* %1
store double 9.000000e+02, double* %2
%3 = load double, double* %1
%4 = load double, double* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double %3, double %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Precio 1 = %g, precio 2 = %g\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double 1.100250e+03, double 9.000000e+02)
ret i32 0
}
rect_to_polar(x, y, radiusp, thetap) double x, y, *radiusp, *thetap;
{
  *radiusp = sqrt(x * x + y * y);
  *thetap = atan2(y, x);
}


x86 assembly (clang, -O0):
<rect_to_polar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rect_to_polar>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm1,%xmm3
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1151 <rect_to_polar+0x31>
sqrtsd %xmm0,%xmm0
jmp    116e <rect_to_polar+0x4e>
movsd  %xmm2,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm3
movsd  0x10(%rsp),%xmm2
movsd  %xmm0,(%rbx)
movapd %xmm3,%xmm0
movapd %xmm2,%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @rect_to_polar(double %0, double %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double*
%9 = alloca double*
store double %0, double* %6
store double %1, double* %7
store double* %2, double** %8
store double* %3, double** %9
%10 = load double, double* %6
%11 = load double, double* %6
%12 = load double, double* %7
%13 = load double, double* %7
%14 = fmul double %12, %13
%15 = call double @llvm.fmuladd.f64(double %10, double %11, double %14)
%16 = call double @sqrt(double %15)
%17 = load double*, double** %8
store double %16, double* %17
%18 = load double, double* %7
%19 = load double, double* %6
%20 = call double @atan2(double %18, double %19)
%21 = load double*, double** %9
store double %20, double* %21
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @rect_to_polar(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fmul double %1, %1
%6 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %5)
%7 = tail call double @sqrt(double %6)
store double %7, double* %2
%8 = tail call double @atan2(double %1, double %0)
store double %8, double* %3
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, int);
int has_partitions(int);
int is_accessible(int device) {
  int mask;
  mask = has_partitions(device);
  if (!mask)
    die("is_accessible:  Not a valid device  0x%04X", device);
  mask = device & ~mask;
  return (mask <= 4);
}


x86 assembly (clang, -O0):
<is_accessible>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <has_partitions@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    114f <is_accessible+0x2f>
mov    -0x4(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <die@plt>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_accessible>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <has_partitions@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    113e <is_accessible+0x1e>
lea    0xec9(%rip),%rdi
mov    %ebx,%esi
call   1030 <die@plt>
not    %ebp
and    %ebx,%ebp
xor    %eax,%eax
cmp    $0x5,%ebp
setl   %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [43 x i8] c"is_accessible: Not a valid device 0x%04X\00"
define i32 @is_accessible(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @has_partitions(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @die(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %1
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = xor i32 %13, -1
%15 = and i32 %12, %14
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 4
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@.str = [43 x i8] c"is_accessible: Not a valid device 0x%04X\00"
define i32 @is_accessible(i32 %0) {
%2 = tail call i32 @has_partitions(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %1
%7 = xor i32 %2, -1
%8 = and i32 %7, %0
%9 = icmp slt i32 %8, 5
%10 = zext i1 %9 to i32
ret i32 %10
}
double real_dec(const void *buf) { return *((double *)buf); }


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

x86 assembly (clang, -O2):
<real_dec>:
movsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @real_dec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to double*
%5 = load double, double* %4
ret double %5
}

LLVM IR (-O2):
define double @real_dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to double*
%3 = load double, double* %2
ret double %3
}
void glGetVertexAttribiv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetVertexAttribiv() {
ret void
}
/* Variables and functions */
size_t base32hex_len(size_t len) {
  const size_t mod = (len % 5);
  return 8 * (len / 5) + 2 * mod - (mod > 2);
}


x86 assembly (clang, -O0):
<base32hex_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x5,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x5,%ecx
xor    %edx,%edx
div    %rcx
shl    $0x3,%rax
mov    -0x10(%rbp),%rcx
shl    $0x1,%rcx
add    %rcx,%rax
cmpq   $0x2,-0x10(%rbp)
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base32hex_len>:
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mov    %rdi,%rax
mul    %rcx
shr    $0x2,%rdx
lea    (%rdx,%rdx,4),%rax
sub    %rax,%rdi
lea    (%rdi,%rdi,1),%rax
lea    (%rax,%rdx,8),%rax
cmp    $0x3,%rdi
adc    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @base32hex_len(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = urem i64 %4, 5
store i64 %5, i64* %3
%6 = load i64, i64* %2
%7 = udiv i64 %6, 5
%8 = mul i64 8, %7
%9 = load i64, i64* %3
%10 = mul i64 2, %9
%11 = add i64 %8, %10
%12 = load i64, i64* %3
%13 = icmp ugt i64 %12, 2
%14 = zext i1 %13 to i32
%15 = sext i32 %14 to i64
%16 = sub i64 %11, %15
ret i64 %16
}

LLVM IR (-O2):
define i64 @base32hex_len(i64 %0) {
%2 = urem i64 %0, 5
%3 = udiv i64 %0, 5
%4 = shl i64 %3, 3
%5 = shl nuw nsw i64 %2, 1
%6 = add i64 %4, %5
%7 = icmp ugt i64 %2, 2
%8 = sext i1 %7 to i64
%9 = add i64 %6, %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ P(int, int /*<<< orphan*/);
int /*<<< orphan*/ V(int, int);
int /*<<< orphan*/ printf(char *);
int semget(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
void mainpb() {
  int semid = semget(0XA, 0, 0);
  while (1) {
    P(semid, 0);
    printf("B\n");
    sleep(1);
    V(semid, 3);
  }
}


x86 assembly (clang, -O0):
<mainpb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <semget@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <P@plt>
lea    0xe86(%rip),%rdi
call   1060 <printf@plt>
mov    $0x1,%edi
call   1070 <sleep@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1050 <V@plt>
jmp    1169 <mainpb+0x19>

x86 assembly (clang, -O2):
<mainpb>:
push   %r14
push   %rbx
push   %rax
mov    $0xa,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <semget@plt>
mov    %eax,%ebx
lea    0xe95(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <P@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1070 <sleep@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1060 <V@plt>
jmp    1170 <mainpb+0x20>

LLVM IR (-O0):
@.str = [3 x i8] c"B\0A\00"
define void @mainpb() {
%1 = alloca i32
%2 = call i32 @semget(i32 10, i32 0, i32 0)
store i32 %2, i32* %1
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %1
%5 = call i32 @P(i32 %4, i32 0)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @sleep(i32 1)
%8 = load i32, i32* %1
%9 = call i32 @V(i32 %8, i32 3)
br label %3
}

LLVM IR (-O2):
@str = [2 x i8] c"B\00"
define void @mainpb() {
%1 = tail call i32 @semget(i32 10, i32 0, i32 0)
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @P(i32 %1, i32 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i32 @V(i32 %1, i32 3)
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(unsigned char);
void cmp_m32_imm8(unsigned int *m32, unsigned char imm8) {
  put8(0x83);
  put8(0x3D);
  put32((unsigned int)(m32));
  put8(imm8);
}


x86 assembly (clang, -O0):
<cmp_m32_imm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    $0x83,%edi
call   1030 <put8@plt>
mov    $0x3d,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
movzbl -0x9(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_m32_imm8>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x83,%edi
call   1030 <put8@plt>
mov    $0x3d,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
call   1040 <put32@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @cmp_m32_imm8(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = call i32 @put8(i8 zeroext -125)
%6 = call i32 @put8(i8 zeroext 61)
%7 = load i32*, i32** %3
%8 = ptrtoint i32* %7 to i32
%9 = call i32 @put32(i32 %8)
%10 = load i8, i8* %4
%11 = call i32 @put8(i8 zeroext %10)
ret void
}

LLVM IR (-O2):
define void @cmp_m32_imm8(i32* %0, i8 zeroext %1) {
%3 = tail call i32 @put8(i8 zeroext -125)
%4 = tail call i32 @put8(i8 zeroext 61)
%5 = ptrtoint i32* %0 to i64
%6 = trunc i64 %5 to i32
%7 = tail call i32 @put32(i32 %6)
%8 = tail call i32 @put8(i8 zeroext %1)
ret void
}
double F(double t, double x, double v) {
  double k, l, m;
  k = 0.0;
  l = 1.0;
  m = 0.1;
  return -l * x - m * v;
}


x86 assembly (clang, -O0):
<F>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xee5(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<F>:
movapd %xmm2,%xmm0
mulsd  0xef4(%rip),%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @F(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store double 0.000000e+00, double* %7
store double 1.000000e+00, double* %8
store double 1.000000e-01, double* %9
%10 = load double, double* %8
%11 = fneg double %10
%12 = load double, double* %5
%13 = load double, double* %9
%14 = load double, double* %6
%15 = fmul double %13, %14
%16 = fneg double %15
%17 = call double @llvm.fmuladd.f64(double %11, double %12, double %16)
ret double %17
}

LLVM IR (-O2):
define double @F(double %0, double %1, double %2) {
%4 = fmul double %2, -1.000000e-01
%5 = tail call double @llvm.fmuladd.f64(double %1, double -1.000000e+00, double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ reply(int /*<<< orphan*/);
void ack(void) { reply(0); }


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

x86 assembly (clang, -O2):
<ack>:
xor    %edi,%edi
jmp    1030 <reply@plt>

LLVM IR (-O0):
define void @ack() {
%1 = call i32 @reply(i32 0)
ret void
}

LLVM IR (-O2):
define void @ack() {
%1 = tail call i32 @reply(i32 0)
ret void
}
/* Variables and functions */
int geraAleatorio(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int main(void) {
  srand((unsigned)time(NULL));
  printf("%d\n", geraAleatorio(10, 20));
  printf("%d\n", geraAleatorio(10, 20));
  printf("%d\n", geraAleatorio(30, 40));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0xa,%edi
mov    $0x14,%esi
call   1040 <geraAleatorio@plt>
mov    %eax,%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
mov    $0x14,%esi
call   1040 <geraAleatorio@plt>
mov    %eax,%esi
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1e,%edi
mov    $0x28,%esi
call   1040 <geraAleatorio@plt>
mov    %eax,%esi
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0xa,%edi
mov    $0x14,%esi
call   1040 <geraAleatorio@plt>
lea    0xe9b(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xa,%edi
mov    $0x14,%esi
call   1040 <geraAleatorio@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1e,%edi
mov    $0x28,%esi
call   1040 <geraAleatorio@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = call i32 @srand(i32 %2)
%4 = call i32 @geraAleatorio(i32 10, i32 20)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @geraAleatorio(i32 10, i32 20)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @geraAleatorio(i32 30, i32 40)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 @geraAleatorio(i32 10, i32 20)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @geraAleatorio(i32 10, i32 20)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 @geraAleatorio(i32 30, i32 40)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}
__attribute__((always_)) void trace_kfree(unsigned long call_site,
                                          const void *ptr) {}


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

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

LLVM IR (-O0):
define void @trace_kfree(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @trace_kfree(i64 %0, i8* nocapture %1) {
ret void
}
double
f4_cb_send_pre_double_double_double_double_double_double_double_double_int(
    double (*cb)(double, double, double, double, double, double, double, double,
                 int)) {
  int r = 44;
  return cb(8.25, 9.25, 10.25, 11.25, 12.25, 13.25, 14.25, 15.25, r) + 1.0;
}


x86 assembly (clang, -O0):
<f4_cb_send_pre_double_double_double_double_double_double_double_double_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2c,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
movsd  0xee6(%rip),%xmm0
movsd  0xee6(%rip),%xmm1
movsd  0xee6(%rip),%xmm2
movsd  0xee6(%rip),%xmm3
movsd  0xee6(%rip),%xmm4
movsd  0xee6(%rip),%xmm5
movsd  0xee6(%rip),%xmm6
movsd  0xee6(%rip),%xmm7
call   *%rax
movsd  0xe9c(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_cb_send_pre_double_double_double_double_double_double_double_double_int>:
push   %rax
mov    %rdi,%rax
movsd  0xef4(%rip),%xmm0
movsd  0xef4(%rip),%xmm1
movsd  0xef4(%rip),%xmm2
movsd  0xef4(%rip),%xmm3
movsd  0xef4(%rip),%xmm4
movsd  0xef4(%rip),%xmm5
movsd  0xef4(%rip),%xmm6
movsd  0xef4(%rip),%xmm7
mov    $0x2c,%edi
call   *%rax
addsd  0xeed(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4_cb_send_pre_double_double_double_double_double_double_double_double_int(double (double, double, double, double, double, double, double, double, i32)* %0) {
%2 = alloca double (double, double, double, double, double, double, double, double, i32)*
%3 = alloca i32
store double (double, double, double, double, double, double, double, double, i32)* %0, double (double, double, double, double, double, double, double, double, i32)** %2
store i32 44, i32* %3
%4 = load double (double, double, double, double, double, double, double, double, i32)*, double (double, double, double, double, double, double, double, double, i32)** %2
%5 = load i32, i32* %3
%6 = call double %4(double 8.250000e+00, double 9.250000e+00, double 1.025000e+01, double 1.125000e+01, double 1.225000e+01, double 1.325000e+01, double 1.425000e+01, double 1.525000e+01, i32 %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f4_cb_send_pre_double_double_double_double_double_double_double_double_int(double (double, double, double, double, double, double, double, double, i32)* nocapture %0) {
%2 = tail call double %0(double 8.250000e+00, double 9.250000e+00, double 1.025000e+01, double 1.125000e+01, double 1.225000e+01, double 1.325000e+01, double 1.425000e+01, double 1.525000e+01, i32 44)
%3 = fadd double %2, 1.000000e+00
ret double %3
}
/* Variables and functions */
int nice(int /*<<< orphan*/);
int main(void) { return nice(0); }


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

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
jmp    1030 <nice@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @nice(i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcscmp(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void uninivar_wcscmp(void) {
  wchar_t *str1;
  wchar_t *str2;
  (void)wcscmp(str1, str2);
}


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

x86 assembly (clang, -O2):
<uninivar_wcscmp>:
jmp    1030 <wcscmp@plt>

LLVM IR (-O0):
define void @uninivar_wcscmp() {
%1 = alloca i32*
%2 = alloca i32*
%3 = load i32*, i32** %1
%4 = load i32*, i32** %2
%5 = call i32 @wcscmp(i32* %3, i32* %4)
ret void
}

LLVM IR (-O2):
define void @uninivar_wcscmp() {
%1 = tail call i32 @wcscmp(i32* undef, i32* undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void screen_set_cursor(int row, int cursor, int hpadding, int vpadding) {
  int real_cursor = cursor - hpadding + 1;
  printf("\033[%d;%df", row - vpadding + 1, real_cursor < 1 ? 1 : real_cursor);
}


x86 assembly (clang, -O0):
<screen_set_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x14(%rbp)
jge    1153 <screen_set_cursor+0x43>
mov    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1159 <screen_set_cursor+0x49>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_set_cursor>:
sub    %edx,%esi
sub    %ecx,%edi
lea    0x1(%rdi),%eax
xor    %edx,%edx
test   %esi,%esi
cmovns %esi,%edx
add    $0x1,%edx
lea    0xed8(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%df\00"
define void @screen_set_cursor(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %1, %2
%6 = add i32 %0, 1
%7 = sub i32 %6, %3
%8 = icmp sgt i32 %5, 0
%9 = select i1 %8, i32 %5, i32 0
%10 = add nuw nsw i32 %9, 1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10)
ret void
}
void foo782(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo782(i32 %0) {
ret void
}
int ft_isprint(int c) { return (32 <= c && c < 127); }


x86 assembly (clang, -O0):
<ft_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x20,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <ft_isprint+0x24>
cmpl   $0x7f,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 32, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 127
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}