xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int dist;
  scanf("%i", &dist);
  printf("%i minutos\n", dist * 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
shl    $0x1,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
add    %esi,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [12 x i8] c"%i minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 2
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [12 x i8] c"%i minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = 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 = shl nsw i32 %4, 1
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ eventfd_t;

/* Variables and functions */
int read(int, int /*<<< orphan*/ *, int);
int eventfd_read(int fd, eventfd_t *counter) {
  int ret = read(fd, counter, sizeof(*counter));
  if (ret == sizeof(*counter))
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<eventfd_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <read@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x4,%rax
jne    114d <eventfd_read+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1154 <eventfd_read+0x44>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eventfd_read>:
push   %rax
mov    $0x4,%edx
call   1030 <read@plt>
xor    %ecx,%ecx
cmp    $0x4,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @eventfd_read(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = call i32 @read(i32 %7, i32* %8, i32 4)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = icmp eq i64 %11, 4
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 @eventfd_read(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @read(i32 %0, i32* %1, i32 4)
%4 = icmp ne i32 %3, 4
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ rotate(int *, int *, int *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  rotate(&a, &b, &c);
  printf("%d %d %d", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <rotate@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebe(%rip),%r14
lea    0x14(%rsp),%rbx
lea    0x10(%rsp),%r15
lea    0xc(%rsp),%r12
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1040 <rotate@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
mov    %r14,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%6 = call i32 @rotate(i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = call i32 @rotate(i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
ret i32 0
}
/* Variables and functions */
void Reserved_Handler2(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Reserved_Handler2>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Reserved_Handler2+0x9>
jmp    1109 <Reserved_Handler2+0x9>

x86 assembly (clang, -O2):
<Reserved_Handler2>:
jmp    1100 <Reserved_Handler2>

LLVM IR (-O0):
define void @Reserved_Handler2() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Reserved_Handler2() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void ignr_rd_init(const char *fname) {
  fatal("IGNRando"
        ": This build excluded \""
        "IGNRando"
        "\" input support because expat was not installed.\n");
}


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

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

LLVM IR (-O0):
@.str = [89 x i8] c"IGNRando: This build excluded \22IGNRando\22 input support because expat was not installed.\0A\00"
define void @ignr_rd_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @fatal(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [89 x i8] c"IGNRando: This build excluded \22IGNRando\22 input support because expat was not installed.\0A\00"
define void @ignr_rd_init(i8* nocapture readnone %0) {
%2 = tail call i32 @fatal(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0))
ret void
}
main() {
  static int x = sizeof(int *){(int[]){1, 2, 3}};
  if (x != sizeof(int *))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movslq 0x2f02(%rip),%rax
cmp    $0x8,%rax
je     1135 <main+0x25>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@main.x = internal global i32 8
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @main.x
%3 = sext i32 %2 to i64
%4 = icmp ne i64 %3, 8
br i1 %4, label %5, label %6
5: ; preds = %0
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int abs(int);
int dist(int x1, int y1, int x2, int y2) {
  return (abs(x1 - x2) + abs(y1 - y2));
}


x86 assembly (clang, -O0):
<dist>:
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    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist>:
sub    %edx,%edi
mov    %edi,%edx
neg    %edx
cmovs  %edi,%edx
sub    %ecx,%esi
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @dist(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %7
%11 = sub nsw i32 %9, %10
%12 = call i32 @abs(i32 %11)
%13 = load i32, i32* %6
%14 = load i32, i32* %8
%15 = sub nsw i32 %13, %14
%16 = call i32 @abs(i32 %15)
%17 = add nsw i32 %12, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @dist(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %0, %2
%6 = tail call i32 @llvm.abs.i32(i32 %5, i1 true)
%7 = sub nsw i32 %1, %3
%8 = tail call i32 @llvm.abs.i32(i32 %7, i1 true)
%9 = add nuw nsw i32 %8, %6
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void visit(int t) { printf("%d ", t); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @visit(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void rfkill_deinit(struct rfkill_data *rfkill) {}


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

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

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

LLVM IR (-O2):
%struct.rfkill_data = type opaque
define void @rfkill_deinit(%struct.rfkill_data* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef scalar_t__ u_long;
typedef int /*<<< orphan*/ u_int;
struct TYPE_3__ {
  scalar_t__ x_base;
  scalar_t__ x_private;
};
typedef TYPE_1__ XDR;

/* Variables and functions */
u_int xdrmem_getpos(XDR *xdrs) {
  return (u_int)((u_long)xdrs->x_private - (u_long)xdrs->x_base);
}


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

x86 assembly (clang, -O2):
<xdrmem_getpos>:
mov    0x8(%rdi),%eax
sub    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
define i32 @xdrmem_getpos(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
%5 = load i64, i64* %4
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sub nsw i64 %5, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64, i64 }
define i32 @xdrmem_getpos(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
%3 = load i64, i64* %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%5 = load i64, i64* %4
%6 = sub nsw i64 %3, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ AltitudeHoldStatusHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void AltitudeHoldStatusLogging() { UAVObjLogging(AltitudeHoldStatusHandle()); }


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

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

LLVM IR (-O0):
define void @AltitudeHoldStatusLogging() {
%1 = call i32 (...) @AltitudeHoldStatusHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AltitudeHoldStatusLogging() {
%1 = tail call i32 (...) @AltitudeHoldStatusHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int max(int /*<<< orphan*/, int);
int /*<<< orphan*/ min(int, int);
int clamp(int x, int minval, int maxval) { return max(min(x, maxval), minval); }


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <min@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1040 <max@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
push   %rbx
mov    %esi,%ebx
mov    %edx,%esi
call   1030 <min@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <max@plt>

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

LLVM IR (-O2):
define i32 @clamp(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @min(i32 %0, i32 %2)
%5 = tail call i32 @max(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ TidyUp();
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
void TermHandler(int sig) {
  TidyUp();
  _exit(0);
}


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

x86 assembly (clang, -O2):
<TermHandler>:
push   %rax
xor    %eax,%eax
call   1040 <TidyUp@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @TermHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @TidyUp()
%4 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @TermHandler(i32 %0) {
%2 = tail call i32 (...) @TidyUp()
%3 = tail call i32 @_exit(i32 0)
unreachable
}
void ft_strrpl(char *s, char c, char c2) {
  while (*s) {
    if (*s == c)
      *s = c2;
    s++;
  }
}


x86 assembly (clang, -O0):
<ft_strrpl>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <ft_strrpl+0x4d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    113c <ft_strrpl+0x3c>
mov    -0xa(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <ft_strrpl+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strrpl>:
mov    (%rdi),%al
test   %al,%al
je     1125 <ft_strrpl+0x25>
add    $0x1,%rdi
jmp    111b <ft_strrpl+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1125 <ft_strrpl+0x25>
cmp    %sil,%al
jne    1110 <ft_strrpl+0x10>
mov    %dl,-0x1(%rdi)
jmp    1110 <ft_strrpl+0x10>
ret

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

LLVM IR (-O2):
define void @ft_strrpl(i8* nocapture %0, i8 signext %1, i8 signext %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %11
%7 = phi i8 [ %13, %11 ], [ %4, %3 ]
%8 = phi i8* [ %12, %11 ], [ %0, %3 ]
%9 = icmp eq i8 %7, %1
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 %2, i8* %8
br label %11
11: ; preds = %10, %6
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %11, %3
ret void
}
void gtk_editable_set_editable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_editable_set_editable() {
ret void
}
int test_imm_26int64_midword_reg(long long val) {
  return ((val >> 16) & (0x26 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_26int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x26,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_26int64_midword_reg>:
test   $0x260000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_26int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 38
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_26int64_midword_reg(i64 %0) {
%2 = and i64 %0, 2490368
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void plls_off() { *(volatile unsigned long *)((void *)0xfffffc00 + 0x2c) = 0; }


x86 assembly (clang, -O0):
<plls_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffc00,%eax
movq   $0x0,0x2c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<plls_off>:
mov    $0xfffffc2c,%eax
movq   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @plls_off() {
store volatile i64 0, i64* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 4294966272 to i8*), i64 44) to i64*)
ret void
}

LLVM IR (-O2):
define void @plls_off() {
store volatile i64 0, i64* inttoptr (i64 4294966316 to i64*)
ret void
}
char *one_argument(char *argument, char *arg_first) {
  return (char *)one_argument((const char *)argument, arg_first);
}


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

x86 assembly (clang, -O2):
<one_argument>:
jmp    1100 <one_argument>

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

LLVM IR (-O2):
define noalias i8* @one_argument(i8* nocapture readnone %0, i8* nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t factorial(int n) {
  if (n < 0 || n > 20)
    return -1;
  if (n == 0)
    return 1;
  return n * factorial(n - 1);
}


x86 assembly (clang, -O0):
<factorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     112f <factorial+0x1f>
cmpl   $0x14,-0x8(%rbp)
jle    113b <factorial+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <factorial+0x5d>
cmpl   $0x0,-0x8(%rbp)
jne    1151 <factorial+0x41>
movl   $0x1,-0x4(%rbp)
jmp    116d <factorial+0x5d>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorial>:
mov    $0xffffffff,%eax
cmp    $0x14,%edi
ja     1137 <factorial+0x37>
lea    -0x16(%rdi),%edx
mov    $0x1,%ecx
mov    $0x1,%eax
mov    %edi,%esi
nopl   0x0(%rax)
sub    $0x1,%esi
jb     1134 <factorial+0x34>
imul   %edi,%eax
mov    %esi,%edi
cmp    $0xffffffea,%edx
ja     1120 <factorial+0x20>
mov    $0xffffffff,%ecx
imul   %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @factorial(i32 %0) {
%2 = icmp ugt i32 %0, 20
br i1 %2, label %17, label %3
3: ; preds = %1
%4 = add i32 %0, -22
%5 = icmp ult i32 %4, -21
br label %6
6: ; preds = %3, %10
%7 = phi i32 [ %11, %10 ], [ %0, %3 ]
%8 = phi i32 [ %12, %10 ], [ 1, %3 ]
%9 = icmp eq i32 %7, 0
br i1 %9, label %13, label %10
10: ; preds = %6
%11 = add nsw i32 %7, -1
%12 = mul nsw i32 %7, %8
br i1 %5, label %13, label %6
13: ; preds = %6, %10
%14 = phi i32 [ %12, %10 ], [ %8, %6 ]
%15 = phi i32 [ -1, %10 ], [ 1, %6 ]
%16 = mul nsw i32 %15, %14
br label %17
17: ; preds = %13, %1
%18 = phi i32 [ %16, %13 ], [ -1, %1 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int x[] = {1, 2, 3};
  printf("%d %d %d\n", x[0], x[1], x[2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.x = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%6 = load i32, i32* %5
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3)
ret i32 0
}
int isfielder(char fielder) {
  return ((fielder >= '1' && fielder <= '9') || fielder == '?');
}


x86 assembly (clang, -O0):
<isfielder>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x31,%eax
jl     1129 <isfielder+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    1136 <isfielder+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x3f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isfielder>:
lea    -0x31(%rdi),%eax
cmp    $0x9,%al
setb   %al
cmp    $0x3f,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isfielder(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 49
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %14, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 63
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isfielder(i8 signext %0) {
%2 = add i8 %0, -49
%3 = icmp ult i8 %2, 9
%4 = icmp eq i8 %0, 63
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ getid(float);
int /*<<< orphan*/ log(float);
int /*<<< orphan*/ print(int /*<<< orphan*/);
int main() {
  float a = 0;
  int i = 0;
  getid(a);
  print(log(a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <getid@plt>
movss  -0x8(%rbp),%xmm0
call   1050 <log@plt>
mov    %eax,%edi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xorps  %xmm0,%xmm0
call   1030 <getid@plt>
xorps  %xmm0,%xmm0
call   1050 <log@plt>
mov    %eax,%edi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store i32 0, i32* %3
%4 = load float, float* %2
%5 = call i32 @getid(float %4)
%6 = load float, float* %2
%7 = call i32 @log(float %6)
%8 = call i32 @print(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @getid(float 0.000000e+00)
%2 = tail call i32 @log(float 0.000000e+00)
%3 = tail call i32 @print(i32 %2)
ret i32 0
}
void tegra210_emc_timing_invalidate(void) { return; }


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

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

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

LLVM IR (-O2):
define void @tegra210_emc_timing_invalidate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_print(char a, char b) {
  ft_putchar(a);
  ft_putchar(b);
  ft_putchar(',');
  ft_putchar(' ');
}


x86 assembly (clang, -O0):
<ft_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x2(%rbp),%edi
call   1030 <ft_putchar@plt>
mov    $0x2c,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print>:
push   %rbx
mov    %esi,%ebx
call   1030 <ft_putchar@plt>
mov    %ebx,%edi
call   1030 <ft_putchar@plt>
mov    $0x2c,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
pop    %rbx
jmp    1030 <ft_putchar@plt>

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

LLVM IR (-O2):
define void @ft_print(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @ft_putchar(i8 signext %0)
%4 = tail call i32 @ft_putchar(i8 signext %1)
%5 = tail call i32 @ft_putchar(i8 signext 44)
%6 = tail call i32 @ft_putchar(i8 signext 32)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void unlock(FILE *file, const char *filename) {}


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

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

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

LLVM IR (-O2):
define void @unlock(i32* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int min, km;
  scanf("%d", &km);
  min = km * 2;
  printf("%d minutos\n", min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
add    %esi,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 2
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = 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 = shl nsw i32 %4, 1
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void rpi_car_right() {
  printf("### RPi Car Right Turn ###\n");
  ;
  ;
  ;
  ;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"### RPi Car Right Turn ###\0A\00"
define void @rpi_car_right() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"### RPi Car Right Turn ###\00"
define void @rpi_car_right() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void write_flashram_commandd() { printf("write_flashram_commandd\n"); }


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

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

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

LLVM IR (-O2):
@str = [24 x i8] c"write_flashram_commandd\00"
define void @write_flashram_commandd() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
void MUSIC_RegisterTimbreBank(unsigned char *timbres) {}


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

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

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

LLVM IR (-O2):
define void @MUSIC_RegisterTimbreBank(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
main(void) {
  int c;
  int lines = 0;
  while ((c = getchar()) != EOF) {
    if (c == '\n')
      lines++;
  }
  printf("%d\n", lines);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0x8(%rbp)
jne    1162 <main+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1156 <main+0x36>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}
void to_double_store(__float128 a, double *p) { *p = (double)a; }


x86 assembly (clang, -O0):
<to_double_store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movaps %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movaps -0x10(%rbp),%xmm0
call   1130 <__trunctfdf2>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret
nopw   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<to_double_store>:
push   %rbx
mov    %rdi,%rbx
call   1110 <__trunctfdf2>
movsd  %xmm0,(%rbx)
pop    %rbx
ret
nop

LLVM IR (-O0):
define void @to_double_store(fp128 %0, double* %1) {
%3 = alloca fp128
%4 = alloca double*
store fp128 %0, fp128* %3
store double* %1, double** %4
%5 = load fp128, fp128* %3
%6 = fptrunc fp128 %5 to double
%7 = load double*, double** %4
store double %6, double* %7
ret void
}

LLVM IR (-O2):
define void @to_double_store(fp128 %0, double* nocapture writeonly %1) {
%3 = fptrunc fp128 %0 to double
store double %3, double* %1
ret void
}
/* Variables and functions */
scalar_t__ strstr(char *, char const *);
void quick_switch(char *format, const char *search, _Bool *option,
                  _Bool option_value) {
  if (strstr(format, search)) {
    *option = option_value;
  }
}


x86 assembly (clang, -O0):
<quick_switch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
and    $0x1,%al
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     114e <quick_switch+0x3e>
mov    -0x19(%rbp),%cl
mov    -0x18(%rbp),%rax
and    $0x1,%cl
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_switch>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
call   1030 <strstr@plt>
test   %rax,%rax
je     1125 <quick_switch+0x15>
mov    %bpl,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @quick_switch(i8* %0, i8* %1, i8* %2, i1 zeroext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%9 = zext i1 %3 to i8
store i8 %9, i8* %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i64 @strstr(i8* %10, i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %4
%15 = load i8, i8* %8
%16 = trunc i8 %15 to i1
%17 = load i8*, i8** %7
%18 = zext i1 %16 to i8
store i8 %18, i8* %17
br label %19
19: ; preds = %14, %4
ret void
}

LLVM IR (-O2):
define void @quick_switch(i8* %0, i8* %1, i8* nocapture writeonly %2, i1 zeroext %3) {
%5 = tail call i64 @strstr(i8* %0, i8* %1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = zext i1 %3 to i8
store i8 %8, i8* %2
br label %9
9: ; preds = %7, %4
ret void
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  unsigned int i;
  i = 0;
  while (*(s + i)) {
    (*f)(i, (s + i));
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     1149 <ft_striteri+0x49>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%ecx
add    %rcx,%rsi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <ft_striteri+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
cmpb   $0x0,(%rdi)
je     1133 <ft_striteri+0x33>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
mov    %rdi,%rsi
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   *%r14
add    $0x1,%ebx
lea    (%r15,%rbx,1),%rsi
cmpb   $0x0,(%r15,%rbx,1)
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %10, %5 ], [ %0, %2 ]
%7 = phi i32 [ %8, %5 ], [ 0, %2 ]
tail call void %1(i32 %7, i8* %6)
%8 = add i32 %7, 1
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpackhi_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i foo1(__m128i s1, __m128i s2) { return _mm_unpackhi_epi64(s1, s2); }


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

x86 assembly (clang, -O2):
<foo1>:
jmp    1030 <_mm_unpackhi_epi64@plt>

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

LLVM IR (-O2):
define i32 @foo1(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpackhi_epi64(i32 %0, i32 %1)
ret i32 %3
}
OP(ed, a6) { illegal_2(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
long next_octagonal_num(void) {
  static long last_index = 0;
  static long last_num = 0;
  last_num += 6 * last_index + 1;
  last_index++;
  return last_num;
}


x86 assembly (clang, -O0):
<next_octagonal_num>:
push   %rbp
mov    %rsp,%rbp
imul   $0x6,0x2f1c(%rip),%rax
06
add    $0x1,%rax
add    0x2f19(%rip),%rax
mov    %rax,0x2f12(%rip)
mov    0x2f03(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2ef8(%rip)
mov    0x2ef9(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_octagonal_num>:
mov    0x2f21(%rip),%rcx
lea    (%rcx,%rcx,2),%rax
mov    0x2f1e(%rip),%rdx
lea    (%rdx,%rax,2),%rax
add    $0x1,%rax
mov    %rax,0x2f0f(%rip)
add    $0x1,%rcx
mov    %rcx,0x2efc(%rip)
ret

LLVM IR (-O0):
@next_octagonal_num.last_index = internal global i64 0
@next_octagonal_num.last_num = internal global i64 0
define i64 @next_octagonal_num() {
%1 = load i64, i64* @next_octagonal_num.last_index
%2 = mul nsw i64 6, %1
%3 = add nsw i64 %2, 1
%4 = load i64, i64* @next_octagonal_num.last_num
%5 = add nsw i64 %4, %3
store i64 %5, i64* @next_octagonal_num.last_num
%6 = load i64, i64* @next_octagonal_num.last_index
%7 = add nsw i64 %6, 1
store i64 %7, i64* @next_octagonal_num.last_index
%8 = load i64, i64* @next_octagonal_num.last_num
ret i64 %8
}

LLVM IR (-O2):
@next_octagonal_num.last_index = internal unnamed_addr global i64 0
@next_octagonal_num.last_num = internal unnamed_addr global i64 0
define i64 @next_octagonal_num() {
%1 = load i64, i64* @next_octagonal_num.last_index
%2 = mul nsw i64 %1, 6
%3 = or i64 %2, 1
%4 = load i64, i64* @next_octagonal_num.last_num
%5 = add nsw i64 %3, %4
store i64 %5, i64* @next_octagonal_num.last_num
%6 = add nsw i64 %1, 1
store i64 %6, i64* @next_octagonal_num.last_index
ret i64 %5
}
double squared_distance(double x, double y) { return (x - y) * (x - y); }


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

x86 assembly (clang, -O2):
<squared_distance>:
subsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @squared_distance(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fsub double %8, %9
%11 = fmul double %7, %10
ret double %11
}

LLVM IR (-O2):
define double @squared_distance(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fmul double %3, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ create_connect();
int /*<<< orphan*/ create_disconnect();
int /*<<< orphan*/ printf(char *);
void create_reconnect() {
  printf("Create communication lost;\nattempting reconnection.\n");
  create_disconnect();
  create_connect();
}


x86 assembly (clang, -O0):
<create_reconnect>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <create_disconnect@plt>
mov    $0x0,%al
call   1030 <create_connect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_reconnect>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <create_disconnect@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <create_connect@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"Create communication lost;\0Aattempting reconnection.\0A\00"
define void @create_reconnect() {
%1 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @create_disconnect()
%3 = call i32 (...) @create_connect()
ret void
}

LLVM IR (-O2):
@str = [52 x i8] c"Create communication lost;\0Aattempting reconnection.\00"
define void @create_reconnect() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @create_disconnect()
%3 = tail call i32 (...) @create_connect()
ret void
}
void PWM0Generator3_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<PWM0Generator3_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <PWM0Generator3_Handler+0x9>
jmp    1109 <PWM0Generator3_Handler+0x9>

x86 assembly (clang, -O2):
<PWM0Generator3_Handler>:
jmp    1100 <PWM0Generator3_Handler>

LLVM IR (-O0):
define void @PWM0Generator3_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @PWM0Generator3_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned char tcp_steg_recv() {}


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

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

LLVM IR (-O0):
define zeroext i8 @tcp_steg_recv() {
%1 = alloca i8
%2 = load i8, i8* %1
ret i8 %2
}

LLVM IR (-O2):
define zeroext i8 @tcp_steg_recv() {
ret i8 undef
}