xunge/DecIR huggingface dataset:
/* Type definitions */
struct RotorStack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_char_fast(struct RotorStack *, unsigned int,
                                 unsigned int);
void set_char(struct RotorStack *stk, unsigned int char_pos, unsigned int c) {
  set_char_fast(stk, char_pos, c);
}


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

x86 assembly (clang, -O2):
<set_char>:
jmp    1030 <set_char_fast@plt>

LLVM IR (-O0):
%struct.RotorStack = type { i32 }
define void @set_char(%struct.RotorStack* %0, i32 %1, i32 %2) {
%4 = alloca %struct.RotorStack*
%5 = alloca i32
%6 = alloca i32
store %struct.RotorStack* %0, %struct.RotorStack** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.RotorStack*, %struct.RotorStack** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @set_char_fast(%struct.RotorStack* %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
%struct.RotorStack = type { i32 }
define void @set_char(%struct.RotorStack* %0, i32 %1, i32 %2) {
%4 = tail call i32 @set_char_fast(%struct.RotorStack* %0, i32 %1, i32 %2)
ret void
}
int sq(int n) {
  if (n == 1)
    return 1;
  return (n * n) + (sq(n - 1));
}


x86 assembly (clang, -O0):
<sq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1131 <sq+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1150 <sq+0x40>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <sq@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sq>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     114b <sq+0x4b>
lea    -0x2(%rdi),%ecx
mov    %ecx,%eax
imul   %edi,%eax
add    $0x1,%eax
imul   %ecx,%eax
mov    $0x3,%esi
sub    %edi,%esi
sub    %edi,%esi
lea    -0x3(%rdi),%edx
imul   %rcx,%rdx
lea    -0x4(%rdi),%ecx
imul   %rdx,%rcx
shr    %rdx
imul   %esi,%edx
shr    %rcx
imul   $0x55555556,%ecx,%ecx
imul   %edi,%edi
add    %eax,%edi
add    %edx,%edi
lea    (%rcx,%rdi,1),%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @sq(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %28, label %3
3: ; preds = %1
%4 = add i32 %0, -2
%5 = mul i32 %4, %0
%6 = add i32 %5, 1
%7 = mul i32 %4, %6
%8 = mul i32 %0, -2
%9 = add i32 %8, 3
%10 = zext i32 %4 to i33
%11 = add i32 %0, -3
%12 = zext i32 %11 to i33
%13 = mul i33 %10, %12
%14 = lshr i33 %13, 1
%15 = trunc i33 %14 to i32
%16 = mul i32 %9, %15
%17 = add i32 %0, -4
%18 = zext i32 %17 to i33
%19 = mul i33 %13, %18
%20 = lshr i33 %19, 1
%21 = trunc i33 %20 to i32
%22 = mul i32 %21, 1431655766
%23 = mul i32 %0, %0
%24 = add i32 %23, %7
%25 = add i32 %24, %16
%26 = add i32 %25, %22
%27 = add i32 %26, 1
br label %28
28: ; preds = %3, %1
%29 = phi i32 [ 1, %1 ], [ %27, %3 ]
ret i32 %29
}
int test_imm_98uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x98 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_98uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x98,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_98uint64_highword_mem>:
testb  $0x98,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_98uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 652835028992
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int set_output(char *x) {
  int err = 0;
  FILE *f_out;
  if ((f_out = fopen("out.txt", "w")) != NULL) {
    fprintf(f_out, "%s", x);
    fclose(f_out);
  } else {
    err = 2;
  }
  return err;
}


x86 assembly (clang, -O0):
<set_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeb6(%rip),%rdi
lea    0xeb7(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1186 <set_output+0x56>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe97(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
jmp    118d <set_output+0x5d>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_output>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xec2(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1169 <set_output+0x39>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <fputs@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
jmp    116e <set_output+0x3e>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"out.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @set_output(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32*
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %5, i32** %4
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32*, i32** %4
%9 = load i8*, i8** %2
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %9)
%11 = load i32*, i32** %4
%12 = call i32 @fclose(i32* %11)
br label %14
13: ; preds = %1
store i32 2, i32* %3
br label %14
14: ; preds = %13, %7
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [8 x i8] c"out.txt\00"
@.str.1 = [2 x i8] c"w\00"
define i32 @set_output(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @fputs(i8* %0, i32* %2)
%6 = tail call i32 @fclose(i32* %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ 0, %4 ], [ 2, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)());
int /*<<< orphan*/ system(char *);
void sighup() {
  system("open -s -l bash");
  signal(SIGHUP, sighup);
}


x86 assembly (clang, -O0):
<sighup>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <system@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    0x2ea0(%rip),%rsi
call   1040 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighup>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
mov    0x2ea3(%rip),%rsi
pop    %rax
jmp    1040 <signal@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"open -s -l bash\00"
@SIGHUP = global i32 0
define void @sighup() {
%1 = call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @SIGHUP
%3 = call i32 @signal(i32 %2, void (...)* bitcast (void ()* @sighup to void (...)*))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"open -s -l bash\00"
@SIGHUP = global i32 0
define void @sighup() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @SIGHUP
%3 = tail call i32 @signal(i32 %2, void (...)* bitcast (void ()* @sighup to void (...)*))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void TimerMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value) {
  ;

  ;
  if (ui32Timer & 0x000000FF) {
    (*((volatile unsigned long *)(ui32Base + 0x00000030))) = ui32Value;
  }
  if (ui32Timer & 0x0000FF00) {
    (*((volatile unsigned long *)(ui32Base + 0x00000034))) = ui32Value;
  }
}


x86 assembly (clang, -O0):
<TimerMatchSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
cmp    $0x0,%eax
je     112d <TimerMatchSet+0x2d>
movslq -0xc(%rbp),%rcx
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
and    $0xff00,%eax
cmp    $0x0,%eax
je     114d <TimerMatchSet+0x4d>
movslq -0xc(%rbp),%rcx
mov    -0x4(%rbp),%eax
add    $0x34,%eax
cltq
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerMatchSet>:
movslq %edx,%rax
movslq %edi,%rcx
test   %sil,%sil
je     110f <TimerMatchSet+0xf>
mov    %rax,0x30(%rcx)
test   $0xff00,%esi
je     111b <TimerMatchSet+0x1b>
mov    %rax,0x34(%rcx)
ret

LLVM IR (-O0):
define void @TimerMatchSet(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* %5
%8 = and i32 %7, 255
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %3
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 48
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i64*
store volatile i64 %12, i64* %16
br label %17
17: ; preds = %10, %3
%18 = load i32, i32* %5
%19 = and i32 %18, 65280
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %28
21: ; preds = %17
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 52
%26 = sext i32 %25 to i64
%27 = inttoptr i64 %26 to i64*
store volatile i64 %23, i64* %27
br label %28
28: ; preds = %21, %17
ret void
}

LLVM IR (-O2):
define void @TimerMatchSet(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, 255
%5 = icmp eq i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = sext i32 %2 to i64
%8 = add nsw i32 %0, 48
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i64*
store volatile i64 %7, i64* %10
br label %11
11: ; preds = %6, %3
%12 = and i32 %1, 65280
%13 = icmp eq i32 %12, 0
br i1 %13, label %19, label %14
14: ; preds = %11
%15 = sext i32 %2 to i64
%16 = add nsw i32 %0, 52
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i64*
store volatile i64 %15, i64* %18
br label %19
19: ; preds = %14, %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void flow_error(const char *msg) { fputs(msg, stderr); }


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

x86 assembly (clang, -O2):
<flow_error>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @flow_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @flow_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
ret void
}
long int __signbitf(float x) {
  union {
    unsigned long int lval;
    float fval;
  } z;
  z.fval = x;
  return ((z.lval & 0x80000000) != 0);
}


x86 assembly (clang, -O0):
<__signbitf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movabs $0x80000000,%rax
and    -0x10(%rbp),%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<__signbitf>:
movmskps %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
%union.anon = type { i64 }
define i64 @__signbitf(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.anon* %3 to float*
store float %4, float* %5
%6 = bitcast %union.anon* %3 to i64*
%7 = load i64, i64* %6
%8 = and i64 %7, 2147483648
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
%11 = sext i32 %10 to i64
ret i64 %11
}

LLVM IR (-O2):
define i64 @__signbitf(float %0) {
%2 = bitcast float %0 to i32
%3 = lshr i32 %2, 31
%4 = zext i32 %3 to i64
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ GPIOPadConfigSet(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void GPIOPinTypeI2CSCL(uint32_t ui32Port, uint8_t ui8Pins) {
  ;
  GPIODirModeSet(ui32Port, ui8Pins, 0x00000002);
  GPIOPadConfigSet(ui32Port, ui8Pins, 0x00000001, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeI2CSCL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeI2CSCL>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeI2CSCL(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 @GPIODirModeSet(i32 %5, i32 %6, i32 2)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeI2CSCL(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 8)
ret void
}
/* Type definitions */
struct qbman_result {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ qbman_result_is_DQ(struct qbman_result const *);
int qbman_result_is_SCN(const struct qbman_result *dq) {
  return !qbman_result_is_DQ(dq);
}


x86 assembly (clang, -O0):
<qbman_result_is_SCN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <qbman_result_is_DQ@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qbman_result_is_SCN>:
push   %rax
call   1030 <qbman_result_is_DQ@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.qbman_result = type { i32 }
define i32 @qbman_result_is_SCN(%struct.qbman_result* %0) {
%2 = alloca %struct.qbman_result*
store %struct.qbman_result* %0, %struct.qbman_result** %2
%3 = load %struct.qbman_result*, %struct.qbman_result** %2
%4 = call i32 @qbman_result_is_DQ(%struct.qbman_result* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.qbman_result = type { i32 }
define i32 @qbman_result_is_SCN(%struct.qbman_result* %0) {
%2 = tail call i32 @qbman_result_is_DQ(%struct.qbman_result* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
unsigned long LONG_MAX;
unsigned long _dictNextPower(unsigned long size) {
  unsigned long i = 16;
  if (size >= LONG_MAX)
    return LONG_MAX;
  while (1) {
    if (i >= size)
      return i;
    i *= 2;
  }
}


x86 assembly (clang, -O0):
<_dictNextPower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x10,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ec5(%rip),%rcx
cmp    (%rcx),%rax
jb     1137 <_dictNextPower+0x37>
mov    0x2eb5(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <_dictNextPower+0x68>
jmp    113c <_dictNextPower+0x3c>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1157 <_dictNextPower+0x57>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <_dictNextPower+0x68>
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    113c <_dictNextPower+0x3c>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dictNextPower>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
cmp    %rdi,%rax
jbe    112b <_dictNextPower+0x2b>
mov    $0x10,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rcx,%rax
add    %rcx,%rcx
cmp    %rdi,%rax
jb     1120 <_dictNextPower+0x20>
ret

LLVM IR (-O0):
@LONG_MAX = global i64 0
define i64 @_dictNextPower(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 16, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* @LONG_MAX
%7 = icmp uge i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i64, i64* @LONG_MAX
store i64 %9, i64* %2
br label %20
10: ; preds = %1
br label %11
11: ; preds = %10, %17
%12 = load i64, i64* %4
%13 = load i64, i64* %3
%14 = icmp uge i64 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i64, i64* %4
store i64 %16, i64* %2
br label %20
17: ; preds = %11
%18 = load i64, i64* %4
%19 = mul i64 %18, 2
store i64 %19, i64* %4
br label %11
20: ; preds = %15, %8
%21 = load i64, i64* %2
ret i64 %21
}

LLVM IR (-O2):
@LONG_MAX = global i64 0
define i64 @_dictNextPower(i64 %0) {
%2 = load i64, i64* @LONG_MAX
%3 = icmp ugt i64 %2, %0
br i1 %3, label %4, label %8
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 16, %1 ]
%6 = icmp ult i64 %5, %0
%7 = shl i64 %5, 1
br i1 %6, label %4, label %8
8: ; preds = %4, %1
%9 = phi i64 [ %2, %1 ], [ %5, %4 ]
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ RegWriteA_lc898122_sharp(int, int);
void GyOutSignal_lc898122_sharp(void) {
  RegWriteA_lc898122_sharp(0x0283, 0x45);
  RegWriteA_lc898122_sharp(0x0284, 0x43);
  RegWriteA_lc898122_sharp(0x0280, 0x02);
}


x86 assembly (clang, -O0):
<GyOutSignal_lc898122_sharp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x283,%edi
mov    $0x45,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x284,%edi
mov    $0x43,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x280,%edi
mov    $0x2,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GyOutSignal_lc898122_sharp>:
push   %rax
mov    $0x283,%edi
mov    $0x45,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x284,%edi
mov    $0x43,%esi
call   1030 <RegWriteA_lc898122_sharp@plt>
mov    $0x280,%edi
mov    $0x2,%esi
pop    %rax
jmp    1030 <RegWriteA_lc898122_sharp@plt>

LLVM IR (-O0):
define void @GyOutSignal_lc898122_sharp() {
%1 = call i32 @RegWriteA_lc898122_sharp(i32 643, i32 69)
%2 = call i32 @RegWriteA_lc898122_sharp(i32 644, i32 67)
%3 = call i32 @RegWriteA_lc898122_sharp(i32 640, i32 2)
ret void
}

LLVM IR (-O2):
define void @GyOutSignal_lc898122_sharp() {
%1 = tail call i32 @RegWriteA_lc898122_sharp(i32 643, i32 69)
%2 = tail call i32 @RegWriteA_lc898122_sharp(i32 644, i32 67)
%3 = tail call i32 @RegWriteA_lc898122_sharp(i32 640, i32 2)
ret void
}
/* Variables and functions */
int gcd(int, int);
int lcm(int a, int b) { return a / gcd(a, b) * b; }


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
imul   -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
imul   %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @lcm(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* %3
%7 = load i32, i32* %4
%8 = call i32 @gcd(i32 %6, i32 %7)
%9 = sdiv i32 %5, %8
%10 = load i32, i32* %4
%11 = mul nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @lcm(i32 %0, i32 %1) {
%3 = tail call i32 @gcd(i32 %0, i32 %1)
%4 = sdiv i32 %0, %3
%5 = mul nsw i32 %4, %1
ret i32 %5
}
/* Variables and functions */
scalar_t__ EINVAL;
int /*<<< orphan*/ assert(int);
scalar_t__ errno;
scalar_t__ timerfd_create(int, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  assert(timerfd_create(-1, 0) < 0 && errno == EINVAL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <timerfd_create@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jge    116e <main+0x4e>
mov    0x2e85(%rip),%rax
mov    (%rax),%rax
mov    0x2e73(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <timerfd_create@plt>
test   %rax,%rax
sets   %al
mov    0x2ea6(%rip),%rcx
mov    (%rcx),%rcx
mov    0x2e94(%rip),%rdx
cmp    (%rdx),%rcx
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
@EINVAL = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 @timerfd_create(i32 -1, i32 0)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i64, i64* @errno
%10 = load i64, i64* @EINVAL
%11 = icmp eq i64 %9, %10
br label %12
12: ; preds = %8, %2
%13 = phi i1 [ false, %2 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret i32 0
}

LLVM IR (-O2):
@errno = global i64 0
@EINVAL = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @timerfd_create(i32 -1, i32 0)
%4 = icmp slt i64 %3, 0
%5 = load i64, i64* @errno
%6 = load i64, i64* @EINVAL
%7 = icmp eq i64 %5, %6
%8 = select i1 %4, i1 %7, i1 false
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
ret i32 0
}
int *ivector(nl, nh)
long nh, nl;
{
  int *v;
  v = (int *)malloc((unsigned int)((nh - nl + 1 + 1) * sizeof(int)));
  return v - nl + 1;
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
add    $0x1,%rax
add    $0x1,%rax
shl    $0x2,%rax
mov    %eax,%eax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x4,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %rbx
mov    %rdi,%rbx
sub    %ebx,%esi
lea    0x8(,%rsi,4),%edi
call   1030 <malloc@plt>
shl    $0x2,%rbx
neg    %rbx
add    %rbx,%rax
add    $0x4,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @ivector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = zext i32 %12 to i64
%14 = call i8* @malloc(i64 %13)
%15 = bitcast i8* %14 to i32*
store i32* %15, i32** %5
%16 = load i32*, i32** %5
%17 = load i64, i64* %3
%18 = sub i64 0, %17
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = getelementptr inbounds i32, i32* %19, i64 1
ret i32* %20
}

LLVM IR (-O2):
define noalias i32* @ivector(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = shl i64 %3, 2
%5 = add i64 %4, 8
%6 = and i64 %5, 4294967292
%7 = tail call i8* @malloc(i64 %6)
%8 = bitcast i8* %7 to i32*
%9 = sub i64 0, %0
%10 = getelementptr inbounds i32, i32* %8, i64 %9
%11 = getelementptr inbounds i32, i32* %10, i64 1
ret i32* %11
}
/* Variables and functions */
int /*<<< orphan*/ rep_hist_reset_conn_stats(int /*<<< orphan*/);
void rep_hist_conn_stats_term(void) { rep_hist_reset_conn_stats(0); }


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

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

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

LLVM IR (-O2):
define void @rep_hist_conn_stats_term() {
%1 = tail call i32 @rep_hist_reset_conn_stats(i32 0)
ret void
}
char *getOtherEndpoint() { return "distant"; }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"distant\00"
define i8* @getOtherEndpoint() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"distant\00"
define i8* @getOtherEndpoint() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int uint64_compare_func(const void *_a, const void *_b) {
  uint64_t a, b;
  a = *(const uint64_t *)_a;
  b = *(const uint64_t *)_b;
  return a < b ? -1 : (a > b ? 1 : 0);
}


x86 assembly (clang, -O0):
<uint64_compare_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    113d <uint64_compare_func+0x3d>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1155 <uint64_compare_func+0x55>
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmovg  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint64_compare_func>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @uint64_compare_func(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp slt i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %23
17: ; preds = %2
%18 = load i64, i64* %5
%19 = load i64, i64* %6
%20 = icmp sgt i64 %18, %19
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 1, i32 0
br label %23
23: ; preds = %17, %16
%24 = phi i32 [ -1, %16 ], [ %22, %17 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @uint64_compare_func(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp slt i64 %4, %6
%8 = icmp sgt i64 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
extern char *esa_device_str(int id) {
  switch (id) {
  case 0x2:
    return "ESA_LEON2";
  case 0xF:
    return "ESA_MCTRL";
  default:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<esa_device_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x2,%eax
je     112c <esa_device_str+0x2c>
jmp    111b <esa_device_str+0x1b>
mov    -0x10(%rbp),%eax
sub    $0xf,%eax
je     113c <esa_device_str+0x3c>
jmp    114c <esa_device_str+0x4c>
lea    0xecd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <esa_device_str+0x59>
lea    0xec7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <esa_device_str+0x59>
jmp    1151 <esa_device_str+0x51>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<esa_device_str>:
xor    %ecx,%ecx
cmp    $0xf,%edi
lea    0xefe(%rip),%rax
cmove  %rax,%rcx
cmp    $0x2,%edi
lea    0xee6(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"ESA_LEON2\00"
@.str.1 = [10 x i8] c"ESA_MCTRL\00"
define i8* @esa_device_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 2, label %5
i32 15, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
br label %8
8: ; preds = %7
store i8* null, i8** %2
br label %9
9: ; preds = %8, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [10 x i8] c"ESA_LEON2\00"
@.str.1 = [10 x i8] c"ESA_MCTRL\00"
define i8* @esa_device_str(i32 %0) {
%2 = icmp eq i32 %0, 15
%3 = select i1 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 2
%5 = select i1 %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
scalar_t__ DBL_EPSILON;
scalar_t__ fabs(double);
bool cutils_fcmp_double_compare(double a, double b) {
  return fabs(a - b) < DBL_EPSILON;
}


x86 assembly (clang, -O0):
<cutils_fcmp_double_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
mov    0x2eb0(%rip),%rcx
cmp    (%rcx),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_fcmp_double_compare>:
push   %rax
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    0x2ec7(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
setl   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@DBL_EPSILON = global i64 0
define i32 @cutils_fcmp_double_compare(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 = call i64 @fabs(double %7)
%9 = load i64, i64* @DBL_EPSILON
%10 = icmp slt i64 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@DBL_EPSILON = global i64 0
define i32 @cutils_fcmp_double_compare(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call i64 @fabs(double %3)
%5 = load i64, i64* @DBL_EPSILON
%6 = icmp slt i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ write(int, unsigned char *, int);
void chronopic_solicitar_estado(int serial_fd) {
  unsigned char trama[10];
  trama[0] = 'E';
  write(serial_fd, trama, 1);
}


x86 assembly (clang, -O0):
<chronopic_solicitar_estado>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x45,-0xe(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xe(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chronopic_solicitar_estado>:
sub    $0x18,%rsp
movb   $0x45,0xe(%rsp)
lea    0xe(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @chronopic_solicitar_estado(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
store i8 69, i8* %4
%5 = load i32, i32* %2
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%7 = call i32 @write(i32 %5, i8* %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @chronopic_solicitar_estado(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
store i8 69, i8* %3
%4 = call i32 @write(i32 %0, i8* %3, i32 1)
ret void
}
int ctoi(int c) { return c - '0'; }


x86 assembly (clang, -O0):
<ctoi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctoi>:
lea    -0x30(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ctoi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 48
ret i32 %4
}

LLVM IR (-O2):
define i32 @ctoi(i32 %0) {
%2 = add nsw i32 %0, -48
ret i32 %2
}
/* Variables and functions */
int core5_swap(char *, int);
int U_EMRSETMETARGN_swap(char *record, int torev) {
  return (core5_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRSETMETARGN_swap>:
jmp    1030 <core5_swap@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSETMETARGN_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core5_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ pow(int, int);
double sqrt(scalar_t__);
double calculateDistance(int *goldX, int *goldY, int *charX, int *charY) {
  return sqrt(pow(*goldY - *charY, 2) + pow(*goldX - *charX, 2));
}


x86 assembly (clang, -O0):
<calculateDistance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
sub    (%rax),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
sub    (%rax),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    -0x28(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateDistance>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rdi,%r15
mov    (%rsi),%edi
sub    (%rcx),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,%rbx
mov    (%r15),%edi
sub    (%r14),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @calculateDistance(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** %6
%10 = load i32, i32* %9
%11 = load i32*, i32** %8
%12 = load i32, i32* %11
%13 = sub nsw i32 %10, %12
%14 = call i64 @pow(i32 %13, i32 2)
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = load i32*, i32** %7
%18 = load i32, i32* %17
%19 = sub nsw i32 %16, %18
%20 = call i64 @pow(i32 %19, i32 2)
%21 = add nsw i64 %14, %20
%22 = call double @sqrt(i64 %21)
ret double %22
}

LLVM IR (-O2):
define double @calculateDistance(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3) {
%5 = load i32, i32* %1
%6 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
%8 = tail call i64 @pow(i32 %7, i32 2)
%9 = load i32, i32* %0
%10 = load i32, i32* %2
%11 = sub nsw i32 %9, %10
%12 = tail call i64 @pow(i32 %11, i32 2)
%13 = add nsw i64 %12, %8
%14 = tail call double @sqrt(i64 %13)
ret double %14
}
__attribute__((weak)) int write_stderr(const unsigned char *ptr,
                                       unsigned int len) {
  do {
    (void)(ptr);
  } while (0);
  do {
    (void)(len);
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<write_stderr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
jmp    1110 <write_stderr+0x10>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define weak i32 @write_stderr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %2
%6 = load i8*, i8** %3
br label %7
7: ; preds = %5
br label %8
8: ; preds = %7
%9 = load i32, i32* %4
br label %10
10: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define weak i32 @write_stderr(i8* %0, i32 %1) {
ret i32 0
}
int init_reset(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @init_reset() {
ret i32 0
}

LLVM IR (-O2):
define i32 @init_reset() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int i;
  for (i = 0; i < 10; ++i)
    printf("Alonso Cerpa\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114a <main+0x3a>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Alonso Cerpa\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void _Z15_Jv_create_coreP14_Jv_core_chainPN4java4lang6StringE(void) {}


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

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

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

LLVM IR (-O2):
define void @_Z15_Jv_create_coreP14_Jv_core_chainPN4java4lang6StringE() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
unsigned bar(unsigned i) {
  if (i == 1 << (sizeof(unsigned) * 8 - 1)) {
    i = i << 1;
    if (i != 0)
      link_error();
  }
  return i;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x80000000,-0x4(%rbp)
jne    1147 <bar+0x37>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1142 <bar+0x32>
mov    $0x0,%al
call   1030 <link_error@plt>
jmp    1147 <bar+0x37>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
xor    %eax,%eax
cmp    $0x80000000,%edi
cmovne %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = icmp eq i32 %0, -2147483648
%3 = select i1 %2, i32 0, i32 %0
ret i32 %3
}
/* Variables and functions */
float getRate(int);
float parkingCharge(int type, float hrs) { return hrs * getRate(type); }


x86 assembly (clang, -O0):
<parkingCharge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <getRate@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parkingCharge>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <getRate@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @parkingCharge(i32 %0, float %1) {
%3 = tail call float @getRate(i32 %0)
%4 = fmul float %3, %1
ret float %4
}
void INT_Excep_POE_OEI4(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_POE_OEI4() {
ret void
}
/* Variables and functions */
int suspend(long);
extern int concurrent_util_suspend(long seconds) { return suspend(seconds); }


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

x86 assembly (clang, -O2):
<concurrent_util_suspend>:
jmp    1030 <suspend@plt>

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

LLVM IR (-O2):
define i32 @concurrent_util_suspend(i64 %0) {
%2 = tail call i32 @suspend(i64 %0)
ret i32 %2
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c;
  while ((c = getchar()) != EOF) {
    putchar(c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1155 <main+0x35>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i32, i32* %2
%9 = call i32 @putchar(i32 %8)
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = tail call i32 (...) @getchar()
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_cvolume_inc_clamp() {
  printf("NOT IMPLEMENTED:"
         "pa_cvolume_inc_clamp"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"NOT IMPLEMENTED:pa_cvolume_inc_clamp\0A\00"
define i32 @pa_cvolume_inc_clamp() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_cvolume_inc_clamp\00"
define i32 @pa_cvolume_inc_clamp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}