xunge/DecIR huggingface dataset:
/* Variables and functions */
int lace_builtin_time2sec_main(int, char **, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  return lace_builtin_time2sec_main(argc, argv, NULL, NULL);
}


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

x86 assembly (clang, -O2):
<main>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <lace_builtin_time2sec_main@plt>

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @lace_builtin_time2sec_main(i32 %6, i8** %7, i32* null, i32* null)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @lace_builtin_time2sec_main(i32 %0, i8** %1, i32* null, i32* null)
ret i32 %3
}
void make_binary_string(int nbits, int i, char *s) {
  char *p;
  int bit;
  p = s;
  for (bit = 1 << (nbits - 1); bit > 0; bit = bit >> 1, p++)
    *p = (i & bit) ? '1' : '0';
  *p = '\0';
}


x86 assembly (clang, -O0):
<make_binary_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    1168 <make_binary_string+0x68>
mov    -0x8(%rbp),%edx
and    -0x1c(%rbp),%edx
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x1c(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1126 <make_binary_string+0x26>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_binary_string>:
add    $0xffffffff,%edi
cmp    $0x1f,%edi
je     113d <make_binary_string+0x3d>
mov    $0x1,%r8d
mov    %edi,%ecx
shl    %cl,%r8d
mov    %r8d,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %r8d,%edi
and    %esi,%edi
cmp    $0x1,%edi
mov    $0x31,%al
sbb    $0x0,%al
mov    %al,(%rdx)
shr    %ecx
add    $0x1,%rdx
cmp    $0x1,%r8d
mov    %ecx,%r8d
ja     1120 <make_binary_string+0x20>
movb   $0x0,(%rdx)
ret

LLVM IR (-O0):
define void @make_binary_string(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
store i8* %9, i8** %7
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = shl i32 1, %11
store i32 %12, i32* %8
br label %13
13: ; preds = %25, %3
%14 = load i32, i32* %8
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %30
16: ; preds = %13
%17 = load i32, i32* %5
%18 = load i32, i32* %8
%19 = and i32 %17, %18
%20 = icmp ne i32 %19, 0
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 49, i32 48
%23 = trunc i32 %22 to i8
%24 = load i8*, i8** %7
store i8 %23, i8* %24
br label %25
25: ; preds = %16
%26 = load i32, i32* %8
%27 = ashr i32 %26, 1
store i32 %27, i32* %8
%28 = load i8*, i8** %7
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %7
br label %13
30: ; preds = %13
%31 = load i8*, i8** %7
store i8 0, i8* %31
ret void
}

LLVM IR (-O2):
define void @make_binary_string(i32 %0, i32 %1, i8* nocapture writeonly %2) {
%4 = add nsw i32 %0, -1
%5 = icmp eq i32 %4, 31
br i1 %5, label %17, label %6
6: ; preds = %3
%7 = shl nuw i32 1, %4
br label %8
8: ; preds = %6, %8
%9 = phi i32 [ %14, %8 ], [ %7, %6 ]
%10 = phi i8* [ %15, %8 ], [ %2, %6 ]
%11 = and i32 %9, %1
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i8 48, i8 49
store i8 %13, i8* %10
%14 = lshr i32 %9, 1
%15 = getelementptr inbounds i8, i8* %10, i64 1
%16 = icmp ult i32 %9, 2
br i1 %16, label %17, label %8
17: ; preds = %8, %3
%18 = phi i8* [ %2, %3 ], [ %15, %8 ]
store i8 0, i8* %18
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ vetor;

/* Variables and functions */
int estrito(int, int *);
int /*<<< orphan*/ printf(char *, int);
void main(void) {
  int vetor[] = {0, 0, -1, -2, 1, 2};
  int size = sizeof(vetor) / sizeof(int);
  printf("%d\n", estrito(size, vetor));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x24(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1040 <estrito@plt>
mov    %eax,%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x6,%edi
call   1040 <estrito@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.vetor = [6 x i32] [i32 0, i32 0, i32 -1, i32 -2, i32 1, i32 2]
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @estrito(i32 6, i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
int xmlc_white_space(int u) {
  return u == '\t' || u == '\n' || u == '\r' || u == ' ';
}


x86 assembly (clang, -O0):
<xmlc_white_space>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <xmlc_white_space+0x3e>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <xmlc_white_space+0x3e>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <xmlc_white_space+0x3e>
cmpl   $0x20,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlc_white_space>:
cmp    $0xd,%edi
ja     1115 <xmlc_white_space+0x15>
mov    $0x1,%eax
mov    $0x2600,%ecx
bt     %edi,%ecx
jae    1115 <xmlc_white_space+0x15>
ret
xor    %eax,%eax
cmp    $0x20,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @xmlc_white_space(i32 %0) {
switch i32 %0, label %2 [
i32 13, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 32
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
unsigned xrop3_67_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = D & S;
  stk3 = ~stk3;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_67_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %3, -1
%8 = and i32 %6, %7
%9 = xor i32 %4, %8
%10 = xor i32 %9, -1
ret i32 %10
}
long grib_op_eq(long a, long b) { return a == b; }


x86 assembly (clang, -O0):
<grib_op_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_op_eq>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i64 @grib_op_eq(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @grib_op_eq(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t bits_per_uint8(uint32_t value) { return (value >> 3); }


x86 assembly (clang, -O0):
<bits_per_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_per_uint8>:
mov    %edi,%eax
sar    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @bits_per_uint8(i32 %0) {
%2 = ashr i32 %0, 3
ret i32 %2
}
div(string1, string2) { return (binstr(strbin(string1) / strbin(string2))); }


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

x86 assembly (clang, -O2):
<div>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
xor    %eax,%eax
call   1040 <strbin@plt>
mov    %eax,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <strbin@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    %eax,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <binstr@plt>

LLVM IR (-O0):
define i32 @div(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 = call i32 (i32, ...) bitcast (i32 (...)* @strbin to i32 (i32, ...)*)(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 (i32, ...) bitcast (i32 (...)* @strbin to i32 (i32, ...)*)(i32 %7)
%9 = sdiv i32 %6, %8
%10 = call i32 (i32, ...) bitcast (i32 (...)* @binstr to i32 (i32, ...)*)(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @div(i32 %0, i32 %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @strbin to i32 (i32, ...)*)(i32 %0)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @strbin to i32 (i32, ...)*)(i32 %1)
%5 = sdiv i32 %3, %4
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @binstr to i32 (i32, ...)*)(i32 %5)
ret i32 %6
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ basic_test(int);
int /*<<< orphan*/ cleanup_test();
int /*<<< orphan*/ init_test();
int log_write_middle(int);
void write_two_pages_middle(void) {
  ssize_t n;
  init_test();
  n = log_write_middle(8192);
  basic_test(n == 8192);
  cleanup_test();
}


x86 assembly (clang, -O0):
<write_two_pages_middle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <init_test@plt>
mov    $0x2000,%edi
call   1040 <log_write_middle@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x2000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <basic_test@plt>
mov    $0x0,%al
call   1050 <cleanup_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_two_pages_middle>:
push   %rax
xor    %eax,%eax
call   1060 <init_test@plt>
mov    $0x2000,%edi
call   1040 <log_write_middle@plt>
xor    %edi,%edi
cmp    $0x2000,%eax
sete   %dil
call   1030 <basic_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cleanup_test@plt>

LLVM IR (-O0):
define void @write_two_pages_middle() {
%1 = alloca i32
%2 = call i32 (...) @init_test()
%3 = call i32 @log_write_middle(i32 8192)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 8192
%6 = zext i1 %5 to i32
%7 = call i32 @basic_test(i32 %6)
%8 = call i32 (...) @cleanup_test()
ret void
}

LLVM IR (-O2):
define void @write_two_pages_middle() {
%1 = tail call i32 (...) @init_test()
%2 = tail call i32 @log_write_middle(i32 8192)
%3 = icmp eq i32 %2, 8192
%4 = zext i1 %3 to i32
%5 = tail call i32 @basic_test(i32 %4)
%6 = tail call i32 (...) @cleanup_test()
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int nrf_802154_timer_coord_timestamp_get(scalar_t__ *);
uint32_t last_rx_frame_timestamp_get(void) {
  uint32_t timestamp;
  bool timestamp_received = nrf_802154_timer_coord_timestamp_get(&timestamp);
  if (!timestamp_received) {
    timestamp = 0;
  } else {
    if (timestamp == 0) {
      timestamp++;
    }
  }
  return timestamp;
}


x86 assembly (clang, -O0):
<last_rx_frame_timestamp_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1030 <nrf_802154_timer_coord_timestamp_get@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    113b <last_rx_frame_timestamp_get+0x2b>
movq   $0x0,-0x8(%rbp)
jmp    1157 <last_rx_frame_timestamp_get+0x47>
cmpq   $0x0,-0x8(%rbp)
jne    1152 <last_rx_frame_timestamp_get+0x42>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <last_rx_frame_timestamp_get+0x47>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<last_rx_frame_timestamp_get>:
push   %rax
mov    %rsp,%rdi
call   1030 <nrf_802154_timer_coord_timestamp_get@plt>
mov    (%rsp),%rcx
test   %rcx,%rcx
mov    $0x1,%edx
cmovne %rcx,%rdx
xor    %ecx,%ecx
test   %eax,%eax
cmovne %rdx,%rcx
mov    %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @last_rx_frame_timestamp_get() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @nrf_802154_timer_coord_timestamp_get(i64* %1)
%4 = icmp eq i32 %3, 0
%5 = load i64, i64* %1
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i64 1, i64 %5
%8 = select i1 %4, i64 0, i64 %7
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("\n"
       "****************************************************************\n"
       " This test cannot be run without FFTW (http://www.fftw.org/).\n"
       " Both the real and the complex versions of the library are\n"
       " required.");
  puts("****************************************************************\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [198 x i8] c"\0A****************************************************************\0A This test cannot be run without FFTW (http://www.fftw.org/).\0A Both the real and the complex versions of the library are\0A required.\00"
@.str.1 = [66 x i8] c"****************************************************************\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([198 x i8], [198 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [198 x i8] c"\0A****************************************************************\0A This test cannot be run without FFTW (http://www.fftw.org/).\0A Both the real and the complex versions of the library are\0A required.\00"
@.str.1 = [66 x i8] c"****************************************************************\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([198 x i8], [198 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void Usage(char *pname) {
  printf("Usage: %s [-r -d -x]\n", pname);
  printf(" where -r  hard Resets the system\n");
  printf("       -d  powers Down the system\n");
  printf("       -x  show eXtra debug messages\n");
}


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

x86 assembly (clang, -O2):
<Usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Usage: %s [-r -d -x]\0A\00"
@.str.1 = [35 x i8] c" where -r hard Resets the system\0A\00"
@.str.2 = [35 x i8] c" -d powers Down the system\0A\00"
@.str.3 = [38 x i8] c" -x show eXtra debug messages\0A\00"
define void @Usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Usage: %s [-r -d -x]\0A\00"
@str = [34 x i8] c" where -r hard Resets the system\00"
@str.4 = [34 x i8] c" -d powers Down the system\00"
@str.5 = [37 x i8] c" -x show eXtra debug messages\00"
define void @Usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.5, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void pfn_notify(const char *errinfo, const void *private_info, size_t cb,
                void *user_data) {
  fprintf(stderr, "OpenCL Error (via pfn_notify): %s\n", errinfo);
}


x86 assembly (clang, -O0):
<pfn_notify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pfn_notify>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"OpenCL Error (via pfn_notify): %s\0A\00"
define void @pfn_notify(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"OpenCL Error (via pfn_notify): %s\0A\00"
define void @pfn_notify(i8* %0, i8* nocapture readnone %1, i64 %2, i8* nocapture readnone %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void MMfree(char *obj) {
  if (obj != 0) {
    free(obj);
  }
}


x86 assembly (clang, -O0):
<MMfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <MMfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMfree>:
test   %rdi,%rdi
je     111a <MMfree+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @MMfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x70() {
  Assert_real((isdigit(112) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              565, ("isdigit should be 0 for p"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for p\00"
define void @t_isdigit_0x70() {
%1 = tail call i64 @isdigit(i32 112)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 565, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ hostfile;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
scalar_t__ readFile(char *, int, char *);
int /*<<< orphan*/ strcat(char *, char *);
int getPort(char *portstr, int size, char *ipfile) {
  char hostfile[17];
  memset(hostfile, 0, sizeof(hostfile));
  strcat(hostfile, ipfile);
  if (readFile(portstr, size, hostfile) < 0) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<getPort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x11,%edx
call   1030 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1050 <readFile@plt>
cmp    $0x0,%rax
jge    1186 <getPort+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    118d <getPort+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rsp,%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x11,%edx
call   1030 <memset@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <strcat@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
call   1050 <readFile@plt>
sar    $0x3f,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getPort(i8* %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca [17 x i8]
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%9 = getelementptr inbounds [17 x i8], [17 x i8]* %8, i64 0, i64 0
%10 = call i32 @memset(i8* %9, i32 0, i32 17)
%11 = getelementptr inbounds [17 x i8], [17 x i8]* %8, i64 0, i64 0
%12 = load i8*, i8** %7
%13 = call i32 @strcat(i8* %11, i8* %12)
%14 = load i8*, i8** %5
%15 = load i32, i32* %6
%16 = getelementptr inbounds [17 x i8], [17 x i8]* %8, i64 0, i64 0
%17 = call i64 @readFile(i8* %14, i32 %15, i8* %16)
%18 = icmp slt i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %3
store i32 -1, i32* %4
br label %21
20: ; preds = %3
store i32 0, i32* %4
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @getPort(i8* %0, i32 %1, i8* %2) {
%4 = alloca [17 x i8]
%5 = getelementptr inbounds [17 x i8], [17 x i8]* %4, i64 0, i64 0
%6 = call i32 @memset(i8* %5, i32 0, i32 17)
%7 = call i32 @strcat(i8* %5, i8* %2)
%8 = call i64 @readFile(i8* %0, i32 %1, i8* %5)
%9 = ashr i64 %8, 63
%10 = trunc i64 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_ldrh(int /*<<< orphan*/);
int /*<<< orphan*/ t16_memio_reg_op();
void t16_ldrh_reg() { arm_memio_ldrh(t16_memio_reg_op()); }


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

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

LLVM IR (-O0):
define void @t16_ldrh_reg() {
%1 = call i32 (...) @t16_memio_reg_op()
%2 = call i32 @arm_memio_ldrh(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_ldrh_reg() {
%1 = tail call i32 (...) @t16_memio_reg_op()
%2 = tail call i32 @arm_memio_ldrh(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close_keyboard();
int /*<<< orphan*/ close_realjoy();
int /*<<< orphan*/ sound_close();
int /*<<< orphan*/ tv_off();
void cleanup(void) {
  close_keyboard();
  close_realjoy();
  tv_off();
  sound_close();
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <close_keyboard@plt>
mov    $0x0,%al
call   1040 <close_realjoy@plt>
mov    $0x0,%al
call   1050 <tv_off@plt>
mov    $0x0,%al
call   1030 <sound_close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
xor    %eax,%eax
call   1060 <close_keyboard@plt>
xor    %eax,%eax
call   1040 <close_realjoy@plt>
xor    %eax,%eax
call   1050 <tv_off@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <sound_close@plt>

LLVM IR (-O0):
define void @cleanup() {
%1 = call i32 (...) @close_keyboard()
%2 = call i32 (...) @close_realjoy()
%3 = call i32 (...) @tv_off()
%4 = call i32 (...) @sound_close()
ret void
}

LLVM IR (-O2):
define void @cleanup() {
%1 = tail call i32 (...) @close_keyboard()
%2 = tail call i32 (...) @close_realjoy()
%3 = tail call i32 (...) @tv_off()
%4 = tail call i32 (...) @sound_close()
ret void
}
void H010ToAB30() {}


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

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

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

LLVM IR (-O2):
define void @H010ToAB30() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writesysreq(char);
void poweroff() { writesysreq('o'); }


x86 assembly (clang, -O0):
<poweroff>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6f,%edi
call   1030 <writesysreq@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<poweroff>:
mov    $0x6f,%edi
jmp    1030 <writesysreq@plt>

LLVM IR (-O0):
define void @poweroff() {
%1 = call i32 @writesysreq(i8 signext 111)
ret void
}

LLVM IR (-O2):
define void @poweroff() {
%1 = tail call i32 @writesysreq(i8 signext 111)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t SWAP32(uint32_t x) {
  return (x >> 24) | ((x >> 8) & 0x0000FF00L) | ((x & 0x0000FF00L) << 8) |
         (x << 24);
}


x86 assembly (clang, -O0):
<SWAP32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
cltq
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
movslq %ecx,%rcx
and    $0xff00,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SWAP32>:
mov    %edi,%eax
sar    $0x18,%eax
mov    %edi,%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
mov    %edi,%edx
shl    $0x8,%edx
and    $0xff0000,%edx
shl    $0x18,%edi
or     %edi,%eax
or     %ecx,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @SWAP32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 24
%5 = sext i32 %4 to i64
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = sext i32 %7 to i64
%9 = and i64 %8, 65280
%10 = or i64 %5, %9
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = and i64 %12, 65280
%14 = shl i64 %13, 8
%15 = or i64 %10, %14
%16 = load i32, i32* %2
%17 = shl i32 %16, 24
%18 = sext i32 %17 to i64
%19 = or i64 %15, %18
%20 = trunc i64 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @SWAP32(i32 %0) {
%2 = ashr i32 %0, 24
%3 = lshr i32 %0, 8
%4 = and i32 %3, 65280
%5 = shl i32 %0, 8
%6 = and i32 %5, 16711680
%7 = shl i32 %0, 24
%8 = or i32 %7, %2
%9 = or i32 %8, %4
%10 = or i32 %9, %6
ret i32 %10
}
unsigned char inb(unsigned short port) {
  char value;
  asm volatile("inb %w1, %b0" : "=a"(value) : "d"(port));
  return value;
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb ${1:w}, ${0:b}", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb ${1:w}, ${0:b}", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
void limpar(int alpha[]) {
  int j = 97, i;
  for (i = 0; i < 26; i++) {
    alpha[j] = 0;
    j++;
  }
}


x86 assembly (clang, -O0):
<limpar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x61,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x1a,-0x10(%rbp)
jge    1146 <limpar+0x46>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <limpar+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<limpar>:
xorps  %xmm0,%xmm0
movups %xmm0,0x1d4(%rdi)
movups %xmm0,0x1c4(%rdi)
movups %xmm0,0x1b4(%rdi)
movups %xmm0,0x1a4(%rdi)
movups %xmm0,0x194(%rdi)
movups %xmm0,0x184(%rdi)
movq   $0x0,0x1e4(%rdi)
ret

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

LLVM IR (-O2):
define void @limpar(i32* nocapture writeonly %0) {
%2 = getelementptr i32, i32* %0, i64 97
%3 = bitcast i32* %2 to i8*
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
float stdlib_strided_snanmeanpn(int /*<<< orphan*/ const, float const *,
                                int /*<<< orphan*/ const);
float stdlib_strided_snanmean(const int64_t N, const float *X,
                              const int64_t stride) {
  return stdlib_strided_snanmeanpn(N, X, stride);
}


x86 assembly (clang, -O0):
<stdlib_strided_snanmean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <stdlib_strided_snanmeanpn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_strided_snanmean>:
jmp    1030 <stdlib_strided_snanmeanpn@plt>

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

LLVM IR (-O2):
define float @stdlib_strided_snanmean(i32 %0, float* %1, i32 %2) {
%4 = tail call float @stdlib_strided_snanmeanpn(i32 %0, float* %1, i32 %2)
ret float %4
}
void debug_puts(const char *str) {
  const char *c;
  for (c = str; *c; c++) {
    (*((volatile char *)0x91)) = *c;
  }
}


x86 assembly (clang, -O0):
<debug_puts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     113b <debug_puts+0x3b>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    $0x91,%eax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <debug_puts+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_puts>:
mov    (%rdi),%al
test   %al,%al
je     1122 <debug_puts+0x22>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
mov    %al,0x91
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <debug_puts+0x10>
ret

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

LLVM IR (-O2):
define void @debug_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %8, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
store volatile i8 %5, i8* inttoptr (i64 145 to i8*)
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printRedirect(char *file) {
  printf("<html>\n<head>\n<meta "
         "http-equiv=\"REFRESH\"\ncontent=\"0;url=%s\">\n</head>\n</html>\n",
         file);
}


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

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

LLVM IR (-O0):
@.str = [78 x i8] c"<html>\0A<head>\0A<meta http-equiv=\22REFRESH\22\0Acontent=\220;url=%s\22>\0A</head>\0A</html>\0A\00"
define void @printRedirect(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [78 x i8] c"<html>\0A<head>\0A<meta http-equiv=\22REFRESH\22\0Acontent=\220;url=%s\22>\0A</head>\0A</html>\0A\00"
define void @printRedirect(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int string_length(char *string) {
  int i;
  for (i = 0; string[i] != '\0'; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<string_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <string_length+0x37>
jmp    1129 <string_length+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <string_length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_length>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <string_length+0x10>
ret

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

LLVM IR (-O2):
define i32 @string_length(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ max_byte1;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
unsigned get_XFontStruct_max_byte1(void *_p) {
  return (unsigned)((XFontStruct *)_p)->max_byte1;
}


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

x86 assembly (clang, -O2):
<get_XFontStruct_max_byte1>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define i32 @get_XFontStruct_max_byte1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @get_XFontStruct_max_byte1(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void procedimentoN(int N) {
  printf("Ola, mundo! Eu sou o procedimento %d!\n", N);
}


x86 assembly (clang, -O0):
<procedimentoN>:
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):
<procedimentoN>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Ola, mundo! Eu sou o procedimento %d!\0A\00"
define void @procedimentoN(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Ola, mundo! Eu sou o procedimento %d!\0A\00"
define void @procedimentoN(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
int /*<<< orphan*/ stdout;
void cutils_cout_signed_char_print(signed char character) {
  fprintf(stdout, "%d\n", character);
}


x86 assembly (clang, -O0):
<cutils_cout_signed_char_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xed2(%rip),%rsi
movsbl -0x1(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cout_signed_char_print>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define void @cutils_cout_signed_char_print(i8 signext %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
void i_enable() { __asm__("sti"); }


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

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

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

LLVM IR (-O2):
define void @i_enable() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int seek(int seconds) {
  int unsuccessful = 1;
  long pos = seconds * 1000;
  if (pos <= 0)
    pos = 0;
  return !unsuccessful;
}


x86 assembly (clang, -O0):
<seek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
imul   $0x3e8,-0x4(%rbp),%eax
cltq
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jg     112e <seek+0x2e>
movq   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @seek(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %2
store i32 1, i32* %3
%5 = load i32, i32* %2
%6 = mul nsw i32 %5, 1000
%7 = sext i32 %6 to i64
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = icmp sle i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i64 0, i64* %4
br label %11
11: ; preds = %10, %1
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @seek(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ quit(int /*<<< orphan*/);
void bye() { quit(0); }


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

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

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

LLVM IR (-O2):
define void @bye() {
%1 = tail call i32 @quit(i32 0)
ret void
}
double divide_doubles(double a, double b) { return a / b; }


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

x86 assembly (clang, -O2):
<divide_doubles>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @divide_doubles(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 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @divide_doubles(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *background_task(void *ptr) {
  printf("Printing from the thread!\n");
  return NULL;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Printing from the thread!\0A\00"
define i8* @background_task(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@str = [26 x i8] c"Printing from the thread!\00"
define noalias i8* @background_task(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i8* null
}