xunge/DecIR huggingface dataset:
int test_imm_33uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x33 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_33uint64_midword_mem>:
testb  $0x33,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_33uint64_midword_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, 16
%6 = and i64 %5, 51
%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_33uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 3342336
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
RX0RX1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if ((p0[x0]) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<RX0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jg     114a <RX0RX1+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <RX0RX1+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RX0RX1>:
movslq %edx,%rax
mov    (%r8,%rax,1),%dl
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,1),%dl
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @RX0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i8* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
%9 = load i8, i8* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i8, i8* %5, i64 %10
%12 = load i8, i8* %11
%13 = icmp ule i8 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
float M_PI;
float lw6sys_math_deg2rad(float deg) { return deg * M_PI / 180.0f; }


x86 assembly (clang, -O0):
<lw6sys_math_deg2rad>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
mulss  (%rax),%xmm0
movss  0xedf(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lw6sys_math_deg2rad>:
mov    0x2ee1(%rip),%rax
mulss  (%rax),%xmm0
divss  0xeed(%rip),%xmm0
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @lw6sys_math_deg2rad(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* @M_PI
%5 = fmul float %3, %4
%6 = fdiv float %5, 1.800000e+02
ret float %6
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @lw6sys_math_deg2rad(float %0) {
%2 = load float, float* @M_PI
%3 = fmul float %2, %0
%4 = fdiv float %3, 1.800000e+02
ret float %4
}
void comment(char const *msg) {}


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

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

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

LLVM IR (-O2):
define void @comment(i8* nocapture %0) {
ret void
}
int b_twist_f2_on_midperm(mperm)
int mperm;
{
  int temp_arr[4];
  b_midperm_unpack(mperm, temp_arr);
  two_cycle(temp_arr, 0, 1);
  return b_midperm_pack(temp_arr);
}


x86 assembly (clang, -O0):
<b_twist_f2_on_midperm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1030 <b_midperm_unpack@plt>
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1050 <two_cycle@plt>
lea    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1040 <b_midperm_pack@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_twist_f2_on_midperm>:
push   %rbx
sub    $0x10,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <b_midperm_unpack@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <two_cycle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <b_midperm_pack@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @b_twist_f2_on_midperm(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @b_midperm_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @two_cycle to i32 (i32*, i32, i32, ...)*)(i32* %7, i32 0, i32 1)
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @b_midperm_pack to i32 (i32*, ...)*)(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @b_twist_f2_on_midperm(i32 %0) {
%2 = alloca [4 x i32]
%3 = bitcast [4 x i32]* %2 to i8*
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @b_midperm_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @two_cycle to i32 (i32*, i32, i32, ...)*)(i32* %4, i32 0, i32 1)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @b_midperm_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void test_no_clause() {
  int i;
#pragma omp sections
  { foo(); }
#pragma omp sections
  ++i;
#pragma omp sections
  {
    foo();
    foo();
  }
}


x86 assembly (clang, -O0):
<test_no_clause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_no_clause>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @test_no_clause() {
%1 = alloca i32
%2 = call i32 (...) @foo()
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
%5 = call i32 (...) @foo()
%6 = call i32 (...) @foo()
ret void
}

LLVM IR (-O2):
define void @test_no_clause() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @foo()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void handler(int signum) { exit(-1); }


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

x86 assembly (clang, -O2):
<handler>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @handler(i32 %0) {
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int g(int);
int foo(int i) { return g(i); }


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

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <g@plt>

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @g(i32 %0)
ret i32 %2
}
/* Variables and functions */
int syscall_lseek(int, int, int);
int lseek(int file, int ptr, int dir) { return syscall_lseek(file, ptr, dir); }


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

x86 assembly (clang, -O2):
<lseek>:
jmp    1030 <syscall_lseek@plt>

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

LLVM IR (-O2):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall_lseek(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void display_weather(void) { printf("Meteotime weather\n"); }


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"Meteotime weather\00"
define void @display_weather() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setup_done();
int f1(int f1arg) {
  int f1loc;
  f1loc = f1arg - 1;
  setup_done();
  return f1loc;
}


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

x86 assembly (clang, -O2):
<f1>:
push   %rbx
lea    -0x1(%rdi),%ebx
xor    %eax,%eax
call   1030 <setup_done@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = tail call i32 (...) @setup_done()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_int_vecotr(int *vector, int size) {
  int i;
  for (i = 0; i < size; i++) {
    printf("%d ", vector[i]);
  }
}


x86 assembly (clang, -O0):
<print_int_vecotr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <print_int_vecotr+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_int_vecotr+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int_vecotr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <print_int_vecotr+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_int_vecotr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_int_vecotr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
void pair_udp_send_char(int *, int, char);
__attribute__((__unused__)) void pair_udp_send(int fds[], int num) {
  return pair_udp_send_char(fds, num, 'a');
}


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

x86 assembly (clang, -O2):
<pair_udp_send>:
mov    $0x61,%edx
jmp    1030 <pair_udp_send_char@plt>

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

LLVM IR (-O2):
define void @pair_udp_send(i32* %0, i32 %1) {
tail call void @pair_udp_send_char(i32* %0, i32 %1, i8 signext 97)
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
void time_start(struct timeval *t) { gettimeofday(t, NULL); }


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

x86 assembly (clang, -O2):
<time_start>:
xor    %esi,%esi
jmp    1030 <gettimeofday@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @time_start(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @time_start(%struct.timeval* nocapture %0) {
%2 = tail call i32 @gettimeofday(%struct.timeval* %0, i32* null)
ret void
}
int test_imm_B6uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xB6 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B6uint64_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, 182
%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_B6uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 781684047872
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t sign_extend(uint16_t x, int bit_count) {
  if ((x >> bit_count) & 0x1) {
    return x | (0xFFFF << bit_count);
  }
  return x;
}


x86 assembly (clang, -O0):
<sign_extend>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1137 <sign_extend+0x37>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0xffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <sign_extend+0x3d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign_extend>:
mov    %esi,%ecx
mov    $0xffff,%edx
shl    %cl,%edx
xor    %eax,%eax
bt     %esi,%edi
cmovb  %edx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @sign_extend(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = ashr i32 %6, %7
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = shl i32 65535, %13
%15 = or i32 %12, %14
store i32 %15, i32* %3
br label %18
16: ; preds = %2
%17 = load i32, i32* %4
store i32 %17, i32* %3
br label %18
18: ; preds = %16, %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @sign_extend(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
%6 = shl i32 65535, %1
%7 = select i1 %5, i32 0, i32 %6
%8 = or i32 %7, %0
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fc8180_isr(void *);
void bbm_com_isr(void *handle) { fc8180_isr(handle); }


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

x86 assembly (clang, -O2):
<bbm_com_isr>:
jmp    1030 <fc8180_isr@plt>

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

LLVM IR (-O2):
define void @bbm_com_isr(i8* %0) {
%2 = tail call i32 @fc8180_isr(i8* %0)
ret void
}
void single_enter() { ("single_enter"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"single_enter\00"
define void @single_enter() {
ret void
}

LLVM IR (-O2):
define void @single_enter() {
ret void
}
char *langDbgMemScc() { return "Memory"; }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"Memory\00"
define i8* @langDbgMemScc() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
int int_greater(void *a, void *b) { return *(int *)a > *(int *)b; }


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

x86 assembly (clang, -O2):
<int_greater>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret

LLVM IR (-O0):
define i32 @int_greater(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp sgt i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @int_greater(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
char *_cgiDir() { return ""; }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @_cgiDir() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @_cgiDir() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ generateTable();
int main(int argc, char **argv) {
  generateTable();
  exit(0);
}


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    $0x0,%al
call   1030 <generateTable@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <generateTable@plt>
xor    %edi,%edi
call   1040 <exit@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 = call i32 (...) @generateTable()
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @generateTable()
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int print(char **, char const *, int /*<<< orphan*/);
int vsprintf(char *str, const char *format, va_list args) {
  return print(&str, format, args);
}


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

x86 assembly (clang, -O2):
<vsprintf>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <print@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @vsprintf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
store i8* %0, i8** %4
%5 = call i32 @print(i8** %4, i8* %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, int, int, int, int,
                          int, int, int);
void version() {
  printf("v%s build %s %s %d:%d:%d,%d:%d:%d,%d\r\n", "1.2.6", "Mar 17 2022",
         "12:46:09", 100, 1024, 4096, 10, 3, 100, 64);
  return;
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xee1(%rip),%rdi
lea    0xf01(%rip),%rsi
lea    0xf00(%rip),%rdx
lea    0xf05(%rip),%rcx
mov    $0x64,%r8d
mov    $0x400,%r9d
movl   $0x1000,(%rsp)
movl   $0xa,0x8(%rsp)
movl   $0x3,0x10(%rsp)
movl   $0x64,0x18(%rsp)
movl   $0x40,0x20(%rsp)
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rax
sub    $0x8,%rsp
lea    0xee4(%rip),%rdi
lea    0xf04(%rip),%rsi
lea    0xf03(%rip),%rdx
lea    0xf08(%rip),%rcx
mov    $0x64,%r8d
mov    $0x400,%r9d
push   $0x40
push   $0x64
push   $0x3
push   $0xa
push   $0x1000
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [39 x i8] c"v%s build %s %s %d:%d:%d,%d:%d:%d,%d\0D\0A\00"
@.str.1 = [6 x i8] c"1.2.6\00"
@.str.2 = [12 x i8] c"Mar 17 2022\00"
@.str.3 = [9 x i8] c"12:46:09\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 100, i32 1024, i32 4096, i32 10, i32 3, i32 100, i32 64)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"v%s build %s %s %d:%d:%d,%d:%d:%d,%d\0D\0A\00"
@.str.1 = [6 x i8] c"1.2.6\00"
@.str.2 = [12 x i8] c"Mar 17 2022\00"
@.str.3 = [9 x i8] c"12:46:09\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 100, i32 1024, i32 4096, i32 10, i32 3, i32 100, i32 64)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xd4() {
  Assert_real((isgraph(212) == 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_isgraph.c",
              1065, ("isgraph should be 0 for 0xd4"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xd4>:
push   %rax
mov    $0xd4,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x429,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xd4\00"
define void @t_isgraph_0xd4() {
%1 = call i64 @isgraph(i32 212)
%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 1065, i8* getelementptr inbounds ([29 x i8], [29 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xd4\00"
define void @t_isgraph_0xd4() {
%1 = tail call i64 @isgraph(i32 212)
%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 1065, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ connectToServer();
int main() {
  connectToServer();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <connectToServer@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @connectToServer()
ret i32 0
}
/* Variables and functions */
int nrfx_usbd_errata_type_52833();
bool nrfx_usbd_errata_type_52833_eng_a_or_later(void) {
  return nrfx_usbd_errata_type_52833();
}


x86 assembly (clang, -O0):
<nrfx_usbd_errata_type_52833_eng_a_or_later>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrfx_usbd_errata_type_52833@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @nrfx_usbd_errata_type_52833_eng_a_or_later() {
%1 = call i32 (...) @nrfx_usbd_errata_type_52833()
ret i32 %1
}

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_type_52833_eng_a_or_later() {
%1 = tail call i32 (...) @nrfx_usbd_errata_type_52833()
ret i32 %1
}
int rawcast(float x) {
  union {
    float f;
    int i;
  } u;
  u.f = x;
  return u.i;
}


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

x86 assembly (clang, -O2):
<rawcast>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { float }
define i32 @rawcast(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 i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rawcast(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
double R_dist_binary(double *x, int nr, int nc, int i1, int i2) {
  int total, count, dist;
  int j;
  total = 0;
  count = 0;
  dist = 0;
  if (total == 0)
    return 1.0;
  if (count == 0)
    return 0;
  return (double)dist / count;
}


x86 assembly (clang, -O0):
<R_dist_binary>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    1146 <R_dist_binary+0x46>
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1170 <R_dist_binary+0x70>
cmpl   $0x0,-0x28(%rbp)
jne    115d <R_dist_binary+0x5d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1170 <R_dist_binary+0x70>
cvtsi2sdl -0x2c(%rbp),%xmm0
cvtsi2sdl -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @R_dist_binary(double* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca double
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store double* %0, double** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
%16 = load i32, i32* %12
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %5
store double 1.000000e+00, double* %6
br label %29
19: ; preds = %5
%20 = load i32, i32* %13
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %19
store double 0.000000e+00, double* %6
br label %29
23: ; preds = %19
%24 = load i32, i32* %14
%25 = sitofp i32 %24 to double
%26 = load i32, i32* %13
%27 = sitofp i32 %26 to double
%28 = fdiv double %25, %27
store double %28, double* %6
br label %29
29: ; preds = %23, %22, %18
%30 = load double, double* %6
ret double %30
}

LLVM IR (-O2):
define double @R_dist_binary(double* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret double 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ g(int *);
void f(void) {
  int b[1 / 0];
  g(b);
}


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

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i8*
%2 = alloca i64
%3 = call i8* @llvm.stacksave()
store i8* %3, i8** %1
%4 = alloca i32, i64 poison
store i64 poison, i64* %2
%5 = call i32 @g(i32* %4)
%6 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
define void @f() {
%1 = tail call i32 @g(i32* null)
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int usec_from_tv(struct timeval *);
long long currtime_millis(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return usec_from_tv(&tv) / 1000;
}


x86 assembly (clang, -O0):
<currtime_millis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
lea    -0x8(%rbp),%rdi
call   1030 <usec_from_tv@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<currtime_millis>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    %rbx,%rdi
call   1030 <usec_from_tv@plt>
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i64 @currtime_millis() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = call i32 @usec_from_tv(%struct.timeval* %1)
%4 = sdiv i32 %3, 1000
%5 = sext i32 %4 to i64
ret i64 %5
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i64 @currtime_millis() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = call i32 @usec_from_tv(%struct.timeval* %1)
%5 = sdiv i32 %4, 1000
%6 = sext i32 %5 to i64
ret i64 %6
}
int ft_isalphauppercase(int c) {
  if (c >= 65 && c <= 90)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isalphauppercase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1127 <ft_isalphauppercase+0x27>
cmpl   $0x5a,-0x8(%rbp)
jg     1127 <ft_isalphauppercase+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <ft_isalphauppercase+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalphauppercase>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalphauppercase(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @ft_isalphauppercase(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
double kernel__Float___47d(double self, double p0) {
  double var;
  double var1;
  var1 = self / p0;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


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

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

LLVM IR (-O0):
define double @kernel__Float___47d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fdiv double %7, %8
store double %9, double* %6
%10 = load double, double* %6
store double %10, double* %5
br label %11
11: ; preds = %2
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
define double @kernel__Float___47d(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ localtime(int /*<<< orphan*/ const *);
int /*<<< orphan*/ memcpy(struct tm *, int /*<<< orphan*/, int);
struct tm *localtime_r(const time_t *timer, struct tm *result) {
  memcpy(result, localtime(timer), sizeof(struct tm));
  return result;
}


x86 assembly (clang, -O0):
<localtime_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<localtime_r>:
push   %rbx
mov    %rsi,%rbx
call   1030 <localtime@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @localtime_r(i32* %0, %struct.tm* %1) {
%3 = alloca i32*
%4 = alloca %struct.tm*
store i32* %0, i32** %3
store %struct.tm* %1, %struct.tm** %4
%5 = load %struct.tm*, %struct.tm** %4
%6 = load i32*, i32** %3
%7 = call i32 @localtime(i32* %6)
%8 = call i32 @memcpy(%struct.tm* %5, i32 %7, i32 4)
%9 = load %struct.tm*, %struct.tm** %4
ret %struct.tm* %9
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @localtime_r(i32* %0, %struct.tm* returned %1) {
%3 = tail call i32 @localtime(i32* %0)
%4 = tail call i32 @memcpy(%struct.tm* %1, i32 %3, i32 4)
ret %struct.tm* %1
}
int hydra_open_link(i)
int i;
{ return (i); }


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

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

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

LLVM IR (-O2):
define i32 @hydra_open_link(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
struct t_weechat_plugin {
  int dummy;
};
struct t_plugin_script {
  int dummy;
};
struct t_gui_buffer {
  int dummy;
};

/* Variables and functions */
int plugin_script_api_command_options(struct t_weechat_plugin *,
                                      struct t_plugin_script *,
                                      struct t_gui_buffer *, char const *,
                                      int /*<<< orphan*/ *);
int plugin_script_api_command(struct t_weechat_plugin *weechat_plugin,
                              struct t_plugin_script *script,
                              struct t_gui_buffer *buffer,
                              const char *command) {
  return plugin_script_api_command_options(weechat_plugin, script, buffer,
                                           command, NULL);
}


x86 assembly (clang, -O0):
<plugin_script_api_command>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <plugin_script_api_command_options@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_script_api_command>:
xor    %r8d,%r8d
jmp    1030 <plugin_script_api_command_options@plt>

LLVM IR (-O0):
%struct.t_weechat_plugin = type { i32 }
%struct.t_plugin_script = type { i32 }
%struct.t_gui_buffer = type { i32 }
define i32 @plugin_script_api_command(%struct.t_weechat_plugin* %0, %struct.t_plugin_script* %1, %struct.t_gui_buffer* %2, i8* %3) {
%5 = alloca %struct.t_weechat_plugin*
%6 = alloca %struct.t_plugin_script*
%7 = alloca %struct.t_gui_buffer*
%8 = alloca i8*
store %struct.t_weechat_plugin* %0, %struct.t_weechat_plugin** %5
store %struct.t_plugin_script* %1, %struct.t_plugin_script** %6
store %struct.t_gui_buffer* %2, %struct.t_gui_buffer** %7
store i8* %3, i8** %8
%9 = load %struct.t_weechat_plugin*, %struct.t_weechat_plugin** %5
%10 = load %struct.t_plugin_script*, %struct.t_plugin_script** %6
%11 = load %struct.t_gui_buffer*, %struct.t_gui_buffer** %7
%12 = load i8*, i8** %8
%13 = call i32 @plugin_script_api_command_options(%struct.t_weechat_plugin* %9, %struct.t_plugin_script* %10, %struct.t_gui_buffer* %11, i8* %12, i32* null)
ret i32 %13
}

LLVM IR (-O2):
%struct.t_weechat_plugin = type { i32 }
%struct.t_plugin_script = type { i32 }
%struct.t_gui_buffer = type { i32 }
define i32 @plugin_script_api_command(%struct.t_weechat_plugin* %0, %struct.t_plugin_script* %1, %struct.t_gui_buffer* %2, i8* %3) {
%5 = tail call i32 @plugin_script_api_command_options(%struct.t_weechat_plugin* %0, %struct.t_plugin_script* %1, %struct.t_gui_buffer* %2, i8* %3, i32* null)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ insertaDesde(char *, char *, char);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s1[20] = "manuel";
  char s2[] = "javi";
  insertaDesde(s1, s2, 'm');
  printf("%s\n", s1);
}


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    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec7(%rip),%eax
mov    %eax,-0x25(%rbp)
mov    0xec2(%rip),%al
mov    %al,-0x21(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x25(%rbp),%rsi
mov    $0x6d,%edx
call   1040 <insertaDesde@plt>
lea    -0x20(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x20(%rsp)
movb   $0x0,0xc(%rsp)
movl   $0x6976616a,0x8(%rsp)
69
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x6d,%edx
call   1040 <insertaDesde@plt>
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.s1 = [20 x i8] c"manuel\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.s2 = [5 x i8] c"javi\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @insertaDesde(i8* %3, i8* %4, i8 signext 109)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
void grid_xsub_out(__attribute__((unused)) struct grid_sockbase *self,
                   __attribute__((unused)) struct grid_pipe *pipe) {}


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

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

LLVM IR (-O0):
%struct.grid_sockbase = type opaque
%struct.grid_pipe = type opaque
define void @grid_xsub_out(%struct.grid_sockbase* %0, %struct.grid_pipe* %1) {
%3 = alloca %struct.grid_sockbase*
%4 = alloca %struct.grid_pipe*
store %struct.grid_sockbase* %0, %struct.grid_sockbase** %3
store %struct.grid_pipe* %1, %struct.grid_pipe** %4
ret void
}

LLVM IR (-O2):
%struct.grid_sockbase = type opaque
%struct.grid_pipe = type opaque
define void @grid_xsub_out(%struct.grid_sockbase* nocapture %0, %struct.grid_pipe* nocapture %1) {
ret void
}
float vdot(float const *v1, float const *v2) {
  {
    return ((float)((*(v1 + 0) * *(v2 + 0) + *(v1 + 1) * *(v2 + 1)) +
                    *(v1 + 2) * *(v2 + 2)));
  }
}


x86 assembly (clang, -O0):
<vdot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdot>:
movss  0x4(%rdi),%xmm0
mulss  0x4(%rsi),%xmm0
movss  (%rdi),%xmm1
mulss  (%rsi),%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  0x8(%rsi),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @vdot(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %21, float %24, float %18)
ret float %25
}

LLVM IR (-O2):
define float @vdot(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}
int db5500_prcmu_get_arm_opp(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @db5500_prcmu_get_arm_opp() {
ret i32 0
}