xunge/DecIR huggingface dataset:
unsigned long gsp_time_to_timestamp(int wno, int tow) {
  return 604800 * wno + 315964800 + tow;
}


x86 assembly (clang, -O0):
<gsp_time_to_timestamp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x93a80,-0x4(%rbp),%eax
add    $0x12d53d80,%eax
add    -0x8(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsp_time_to_timestamp>:
imul   $0x93a80,%edi,%eax
add    %esi,%eax
add    $0x12d53d80,%eax
cltq
ret

LLVM IR (-O0):
define i64 @gsp_time_to_timestamp(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 = mul nsw i32 604800, %5
%7 = add nsw i32 %6, 315964800
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
define i64 @gsp_time_to_timestamp(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 604800
%4 = add nsw i32 %3, 315964800
%5 = add nsw i32 %4, %1
%6 = sext i32 %5 to i64
ret i64 %6
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int htonl(int);
uint64_t htonll(uint64_t n_id) {
  int num = 42;
  if (*(char *)&num == 42) {
    uint32_t high_part = htonl((uint32_t)(n_id >> 32));
    uint32_t low_part = htonl((uint32_t)(n_id & 0xFFFFFFFFLL));
    return (((uint64_t)low_part) << 32) | high_part;
  } else {
    return n_id;
  }
}


x86 assembly (clang, -O0):
<htonll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x2a,-0xc(%rbp)
movsbl -0xc(%rbp),%eax
cmp    $0x2a,%eax
jne    1171 <htonll+0x61>
mov    -0x8(%rbp),%edi
mov    $0x20,%ecx
sar    %cl,%edi
call   1030 <htonl@plt>
mov    %eax,-0x10(%rbp)
movslq -0x8(%rbp),%rax
movabs $0xffffffff,%rcx
and    %rcx,%rax
mov    %eax,%edi
call   1030 <htonl@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <htonll+0x67>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htonll>:
push   %rbx
mov    %edi,%ebx
call   1030 <htonl@plt>
mov    %ebx,%edi
call   1030 <htonl@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @htonll(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 42, i32* %4
%7 = bitcast i32* %4 to i8*
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 42
br i1 %10, label %11, label %24
11: ; preds = %1
%12 = load i32, i32* %3
%13 = ashr i32 %12, 32
%14 = call i32 @htonl(i32 %13)
store i32 %14, i32* %5
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = and i64 %16, 4294967295
%18 = trunc i64 %17 to i32
%19 = call i32 @htonl(i32 %18)
store i32 %19, i32* %6
%20 = load i32, i32* %6
%21 = shl i32 %20, 32
%22 = load i32, i32* %5
%23 = or i32 %21, %22
store i32 %23, i32* %2
br label %26
24: ; preds = %1
%25 = load i32, i32* %3
store i32 %25, i32* %2
br label %26
26: ; preds = %24, %11
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @htonll(i32 returned %0) {
%2 = tail call i32 @htonl(i32 poison)
%3 = tail call i32 @htonl(i32 %0)
ret i32 %0
}
void IgnitionFireISR() {}


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

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

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

LLVM IR (-O2):
define void @IgnitionFireISR() {
ret void
}
void ff_hevc_put_hevc_qpel_v32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_v32_12_sse4() {
ret void
}
long random(void) {}


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

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

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

LLVM IR (-O2):
define i64 @random() {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("This module is called: \n");
  printf("\t Programming \n");
  printf("This program is written in: ");
  printf("C\n");
  printf("Experiment on a new line\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 <printf@plt>
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"This module is called: \0A\00"
@.str.1 = [16 x i8] c"\09 Programming \0A\00"
@.str.2 = [29 x i8] c"This program is written in: \00"
@.str.3 = [3 x i8] c"C\0A\00"
@.str.4 = [26 x i8] c"Experiment on a new line\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [29 x i8] c"This program is written in: \00"
@str = [24 x i8] c"This module is called: \00"
@str.5 = [15 x i8] c"\09 Programming \00"
@str.6 = [2 x i8] c"C\00"
@str.7 = [25 x i8] c"Experiment on a new line\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.7, i64 0, i64 0))
ret i32 0
}
unsigned long insert_sh6(unsigned long insn, long value,
                         int dialect __attribute__((unused)),
                         const char **errmsg __attribute__((unused))) {
  return insn | ((value & 0x1f) << 11) | ((value & 0x20) >> 4);
}


x86 assembly (clang, -O0):
<insert_sh6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shl    $0xb,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
and    $0x20,%rcx
sar    $0x4,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_sh6>:
mov    %esi,%eax
shl    $0xb,%eax
movzwl %ax,%eax
or     %rdi,%rax
shr    $0x4,%rsi
and    $0x2,%esi
or     %rsi,%rax
ret

LLVM IR (-O0):
define i64 @insert_sh6(i64 %0, i64 %1, i32 %2, i8** %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
%8 = alloca i8**
store i64 %0, i64* %5
store i64 %1, i64* %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = and i64 %10, 31
%12 = shl i64 %11, 11
%13 = or i64 %9, %12
%14 = load i64, i64* %6
%15 = and i64 %14, 32
%16 = ashr i64 %15, 4
%17 = or i64 %13, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @insert_sh6(i64 %0, i64 %1, i32 %2, i8** nocapture readnone %3) {
%5 = shl i64 %1, 11
%6 = and i64 %5, 63488
%7 = or i64 %6, %0
%8 = lshr i64 %1, 4
%9 = and i64 %8, 2
%10 = or i64 %7, %9
ret i64 %10
}
/* Variables and functions */
scalar_t__ isalpha(int);
int aanum(int ch) {
  static const int aacvs[] = {999, 0,  20, 4,  3,  6,  13, 7,  8,
                              9,   22, 11, 10, 12, 2,  22, 14, 5,
                              1,   15, 16, 22, 19, 17, 22, 18, 21};
  return (isalpha(ch) ? aacvs[ch & 31] : 22);
}


x86 assembly (clang, -O0):
<aanum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
je     1148 <aanum+0x38>
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
movslq %eax,%rcx
lea    0xec3(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <aanum+0x45>
mov    $0x16,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <aanum+0x45>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aanum>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalpha@plt>
test   %rax,%rax
je     112c <aanum+0x1c>
and    $0x1f,%ebx
lea    0xed9(%rip),%rax
mov    (%rax,%rbx,4),%eax
pop    %rbx
ret
mov    $0x16,%eax
pop    %rbx
ret

LLVM IR (-O0):
@aanum.aacvs = internal constant [27 x i32] [i32 999, i32 0, i32 20, i32 4, i32 3, i32 6, i32 13, i32 7, i32 8, i32 9, i32 22, i32 11, i32 10, i32 12, i32 2, i32 22, i32 14, i32 5, i32 1, i32 15, i32 16, i32 22, i32 19, i32 17, i32 22, i32 18, i32 21]
define i32 @aanum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isalpha(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %2
%8 = and i32 %7, 31
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [27 x i32], [27 x i32]* @aanum.aacvs, i64 0, i64 %9
%11 = load i32, i32* %10
br label %13
12: ; preds = %1
br label %13
13: ; preds = %12, %6
%14 = phi i32 [ %11, %6 ], [ 22, %12 ]
ret i32 %14
}

LLVM IR (-O2):
@aanum.aacvs = internal unnamed_addr constant [27 x i32] [i32 999, i32 0, i32 20, i32 4, i32 3, i32 6, i32 13, i32 7, i32 8, i32 9, i32 22, i32 11, i32 10, i32 12, i32 2, i32 22, i32 14, i32 5, i32 1, i32 15, i32 16, i32 22, i32 19, i32 17, i32 22, i32 18, i32 21]
define i32 @aanum(i32 %0) {
%2 = tail call i64 @isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = and i32 %0, 31
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds [27 x i32], [27 x i32]* @aanum.aacvs, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %4
%10 = phi i32 [ %8, %4 ], [ 22, %1 ]
ret i32 %10
}
/* Variables and functions */
float clamp(float, float, float);
float smoothStep(float low, float high, float v) {
  return clamp((v - low) / (high - low), 0.0f, 1.0f);
}


x86 assembly (clang, -O0):
<smoothStep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
movss  0xeb6(%rip),%xmm2
call   1030 <clamp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smoothStep>:
movaps %xmm2,%xmm3
subss  %xmm0,%xmm3
subss  %xmm0,%xmm1
divss  %xmm1,%xmm3
movss  0xed9(%rip),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm3,%xmm0
jmp    1030 <clamp@plt>

LLVM IR (-O0):
define float @smoothStep(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %4
%9 = fsub float %7, %8
%10 = load float, float* %5
%11 = load float, float* %4
%12 = fsub float %10, %11
%13 = fdiv float %9, %12
%14 = call float @clamp(float %13, float 0.000000e+00, float 1.000000e+00)
ret float %14
}

LLVM IR (-O2):
define float @smoothStep(float %0, float %1, float %2) {
%4 = fsub float %2, %0
%5 = fsub float %1, %0
%6 = fdiv float %4, %5
%7 = tail call float @clamp(float %6, float 0.000000e+00, float 1.000000e+00)
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a, b, c;
  a = 5;
  b = 6;
  c = 7;
  b = a;
  a = c;
  c = b;
  printf("%d %d %d", a, b, c);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 7, i32 5, i32 5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void draw_finish(FILE *fp) {
  fprintf(fp, "/* end of BDD drawing */\n");
  fflush(fp);
}


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

x86 assembly (clang, -O2):
<draw_finish>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"/* end of BDD drawing */\0A\00"
define void @draw_finish(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fflush(i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"/* end of BDD drawing */\0A\00"
define void @draw_finish(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 25, i64 1, i32* %0)
%3 = tail call i32 @fflush(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(size_t *, char *, int);
size_t vec_len(void const *v) {
  size_t ret;
  memcpy(&ret, (char *)v - sizeof ret, sizeof ret);
  return ret;
}


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

x86 assembly (clang, -O2):
<vec_len>:
push   %rax
lea    -0x8(%rdi),%rsi
mov    %rsp,%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @vec_len(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 -8
%6 = call i32 @memcpy(i64* %3, i8* %5, i32 8)
%7 = load i64, i64* %3
ret i64 %7
}

LLVM IR (-O2):
define i64 @vec_len(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = getelementptr inbounds i8, i8* %0, i64 -8
%5 = call i32 @memcpy(i64* %2, i8* %4, i32 8)
%6 = load i64, i64* %2
ret i64 %6
}
unsigned myremu(unsigned x, unsigned y) { return x % y; }


x86 assembly (clang, -O0):
<myremu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myremu>:
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @myremu(i32 %0, i32 %1) {
%3 = urem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ collatzConjectureIterative(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("Lack of input. Terminating program.\n");
    return;
  }
  collatzConjectureIterative(atoi(argv[1]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    115a <main+0x2a>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    116e <main+0x3e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <collatzConjectureIterative@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x1,%edi
jg     1141 <main+0x11>
lea    0xec4(%rip),%rdi
jmp    1030 <puts@plt>
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <collatzConjectureIterative@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Lack of input. Terminating program.\0A\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 2
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %15
9: ; preds = %2
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
%14 = call i32 @collatzConjectureIterative(i32 %13)
br label %15
15: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"Lack of input. Terminating program.\00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
br label %11
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
%10 = tail call i32 @collatzConjectureIterative(i32 %9)
br label %11
11: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int bar(int);
int main(void) {
  if (bar(1) != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <bar@plt>
cmp    $0x1,%eax
je     1149 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <bar@plt>
cmp    $0x1,%eax
jne    1134 <main+0x14>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @bar(i32 1)
%3 = icmp ne i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @bar(i32 1)
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
int test_imm_53uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x53 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_53uint64_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, 83
%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_53uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 356482285568
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int greater(int a, int b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<greater>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <greater+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <greater+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<greater>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @greater(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @greater(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void gpio_usbotg_hs_inactive(void) {}


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

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

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

LLVM IR (-O2):
define void @gpio_usbotg_hs_inactive() {
ret void
}
void foo343(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo343(i32 %0) {
ret void
}
int foo(int a) {
  int z = a | 1;
  return z != 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = or i32 %4, 1
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int a = 0;
  if (a > 0) {
    printf("a > 0");
  } else if (a < 0) {
    printf("a < 0");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    115c <main+0x4c>
cmpl   $0x0,-0x8(%rbp)
jge    1157 <main+0x47>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    115c <main+0x4c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int test_imm_63int32_mem(int *val) {
  return ((*val) & (0x63 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_63int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x63,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_63int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 99
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void mvVecSub3(float *r, const float *a, const float *b) {
  r[0] = a[0] + b[0];
  r[1] = a[1] + b[1];
  r[2] = a[2] + b[2];
}


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

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

LLVM IR (-O0):
define void @mvVecSub3(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %6
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fadd float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fadd float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %5
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fadd float %27, %30
%32 = load float*, float** %4
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
ret void
}

LLVM IR (-O2):
define void @mvVecSub3(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fadd float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fadd float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %2, i64 2
%16 = load float, float* %15
%17 = fadd float %14, %16
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x5d() {
  Assert_real((isodigit(93) == 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_isodigit.c",
              470, ("isodigit should be 0 for ]"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for ]\00"
define void @t_isodigit_0x5d() {
%1 = tail call i64 @isodigit(i32 93)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 470, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *memcpy(char *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *strcpy(char *dest, const char *src) {
  return memcpy(dest, src, strlen(src));
}


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

x86 assembly (clang, -O2):
<strcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

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

LLVM IR (-O2):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i8* @memcpy(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ loop_samples();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int err;
  err = 0;
  err += loop_samples();
  if (err == 0)
    exit(0);
  printf("%d Errors found\n", err);
  exit(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <loop_samples@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    116b <main+0x3b>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <loop_samples@plt>
test   %eax,%eax
jne    1143 <main+0x13>
xor    %edi,%edi
call   1050 <exit@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [17 x i8] c"%d Errors found\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @loop_samples()
%2 = trunc i64 %1 to i32
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
%7 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2)
%8 = tail call i32 @exit(i32 1)
unreachable
}
int fun498() { return 498; }


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

x86 assembly (clang, -O2):
<fun498>:
mov    $0x1f2,%eax
ret

LLVM IR (-O0):
define i32 @fun498() {
ret i32 498
}

LLVM IR (-O2):
define i32 @fun498() {
ret i32 498
}
/* Variables and functions */
int fline__setup(char *);
int setup(char *file_path) { return fline__setup(file_path); }


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

x86 assembly (clang, -O2):
<setup>:
jmp    1030 <fline__setup@plt>

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

LLVM IR (-O2):
define i32 @setup(i8* %0) {
%2 = tail call i32 @fline__setup(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ethernet_srcaddr(int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/, int /*<<< orphan*/ const *, int);
void ethernet_set_srcaddr(uint8_t *p_ethernet, const uint8_t *p_addr) {
  memcpy(ethernet_srcaddr(p_ethernet), p_addr, 6);
}


x86 assembly (clang, -O0):
<ethernet_set_srcaddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ethernet_srcaddr@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    $0x6,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ethernet_set_srcaddr>:
push   %rbx
mov    %rsi,%rbx
call   1040 <ethernet_srcaddr@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0x6,%edx
pop    %rbx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @ethernet_set_srcaddr(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 @ethernet_srcaddr(i32* %5)
%7 = load i32*, i32** %4
%8 = call i32 @memcpy(i32 %6, i32* %7, i32 6)
ret void
}

LLVM IR (-O2):
define void @ethernet_set_srcaddr(i32* %0, i32* %1) {
%3 = tail call i32 @ethernet_srcaddr(i32* %0)
%4 = tail call i32 @memcpy(i32 %3, i32* %1, i32 6)
ret void
}
int a_fetch_add(volatile int *x, int v) {
  __asm__("lock ; .byte 0x67\n\txadd %0, %1"
          : "=r"(v), "=m"(*x)
          : "0"(v)
          : "memory");
  return v;
}


x86 assembly (clang, -O0):
<a_fetch_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
lock xadd %eax,(%ecx)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_fetch_add>:
mov    %esi,%eax
lock xadd %eax,(%edi)
ret

LLVM IR (-O0):
define i32 @a_fetch_add(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 asm "lock ; .byte 0x67\0A\09xadd $0, $1", "=r,=*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @a_fetch_add(i32* %0, i32 %1) {
%3 = tail call i32 asm "lock ; .byte 0x67\0A\09xadd $0, $1", "=r,=*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32 %1)
ret i32 %3
}
void andler(int sig) {}


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

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

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

LLVM IR (-O2):
define void @andler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
void _print_ptr(void *ptr) { printf("<%p>", ptr); }


x86 assembly (clang, -O0):
<_print_ptr>:
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):
<_print_ptr>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"<%p>\00"
define void @_print_ptr(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xb1() {
  Assert_real((ispunct(177) == 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_ispunct.c",
              890, ("ispunct should be 0 for 0xb1"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xb1>:
push   %rax
mov    $0xb1,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37a,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xb1\00"
define void @t_ispunct_0xb1() {
%1 = call i64 @ispunct(i32 177)
%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 890, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xb1\00"
define void @t_ispunct_0xb1() {
%1 = tail call i64 @ispunct(i32 177)
%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 890, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ return_int5();
int /*<<< orphan*/ take_int5(int /*<<< orphan*/);
void test_int5() { take_int5(return_int5()); }


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

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

LLVM IR (-O0):
define void @test_int5() {
%1 = call i32 (...) @return_int5()
%2 = call i32 @take_int5(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_int5() {
%1 = tail call i32 (...) @return_int5()
%2 = tail call i32 @take_int5(i32 %1)
ret void
}
/* Type definitions */
struct record_header {
  int dummy;
};
struct file_header {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_dbppc_restart(char *, char *, int, char,
                                       struct file_header *);
void print_db_restart(int *tab, int action, char *cur_date, char *cur_time,
                      int utc, struct file_header *file_hdr,
                      struct record_header *record_hdr) {
  if (action == 0x02) {
    print_dbppc_restart(cur_date, cur_time, utc, ';', file_hdr);
  }
}


x86 assembly (clang, -O0):
<print_db_restart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x2,-0xc(%rbp)
jne    1156 <print_db_restart+0x46>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%r8
mov    $0x3b,%ecx
call   1030 <print_dbppc_restart@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_db_restart>:
cmp    $0x2,%esi
jne    112b <print_db_restart+0x1b>
mov    %rdx,%rdi
mov    %rcx,%rsi
mov    %r8d,%edx
mov    $0x3b,%ecx
mov    %r9,%r8
jmp    1030 <print_dbppc_restart@plt>
ret

LLVM IR (-O0):
%struct.file_header = type { i32 }
%struct.record_header = type { i32 }
define void @print_db_restart(i32* %0, i32 %1, i8* %2, i8* %3, i32 %4, %struct.file_header* %5, %struct.record_header* %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca %struct.file_header*
%14 = alloca %struct.record_header*
store i32* %0, i32** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store %struct.file_header* %5, %struct.file_header** %13
store %struct.record_header* %6, %struct.record_header** %14
%15 = load i32, i32* %9
%16 = icmp eq i32 %15, 2
br i1 %16, label %17, label %23
17: ; preds = %7
%18 = load i8*, i8** %10
%19 = load i8*, i8** %11
%20 = load i32, i32* %12
%21 = load %struct.file_header*, %struct.file_header** %13
%22 = call i32 @print_dbppc_restart(i8* %18, i8* %19, i32 %20, i8 signext 59, %struct.file_header* %21)
br label %23
23: ; preds = %17, %7
ret void
}

LLVM IR (-O2):
%struct.file_header = type { i32 }
%struct.record_header = type { i32 }
define void @print_db_restart(i32* nocapture readnone %0, i32 %1, i8* %2, i8* %3, i32 %4, %struct.file_header* %5, %struct.record_header* nocapture readnone %6) {
%8 = icmp eq i32 %1, 2
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 @print_dbppc_restart(i8* %2, i8* %3, i32 %4, i8 signext 59, %struct.file_header* %5)
br label %11
11: ; preds = %9, %7
ret void
}
int take_b(char cc) {
  printf("%s -- start\n", __func__);
  printf("%s -- exit\n", __func__);
  return 0;
}


x86 assembly (clang, -O0):
<take_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"%s -- start\0A\00"
@__func__.take_b = [7 x i8] c"take_b\00"
@.str.1 = [12 x i8] c"%s -- exit\0A\00"
define i32 @take_b(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.take_b, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.take_b, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s -- start\0A\00"
@__func__.take_b = [7 x i8] c"take_b\00"
@.str.1 = [12 x i8] c"%s -- exit\0A\00"
define i32 @take_b(i8 signext %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.take_b, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.take_b, i64 0, i64 0))
ret i32 0
}
void c_pomp_task_begin_(struct ompregdescr *r) { (void)0; }


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

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

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

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_task_begin_(%struct.ompregdescr* nocapture %0) {
ret void
}