xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void adts_set_copy(uint8_t *p_adts, bool b_copy) {
  if (!b_copy)
    p_adts[3] &= ~0x20;
  else
    p_adts[3] |= 0x20;
}


x86 assembly (clang, -O0):
<adts_set_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1127 <adts_set_copy+0x27>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0xffffffdf,%ecx
mov    %ecx,0xc(%rax)
jmp    1134 <adts_set_copy+0x34>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
or     $0x20,%ecx
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<adts_set_copy>:
xor    %eax,%eax
test   %esi,%esi
setne  %al
mov    0xc(%rdi),%ecx
and    $0xffffffdf,%ecx
shl    $0x5,%eax
or     %ecx,%eax
mov    %eax,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @adts_set_copy(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = getelementptr inbounds i32, i32* %0, i64 3
%5 = load i32, i32* %4
%6 = and i32 %5, -33
%7 = select i1 %3, i32 0, i32 32
%8 = or i32 %6, %7
store i32 %8, i32* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int /*<<< orphan*/ hea_set_u64_bits(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void hea_cq_aer_reserv_facility_access_err_reset(__u64 *aer) {
  *aer = hea_set_u64_bits(*aer, 0, 10, 36);
}


x86 assembly (clang, -O0):
<hea_cq_aer_reserv_facility_access_err_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
xor    %esi,%esi
mov    $0xa,%edx
mov    $0x24,%ecx
call   1030 <hea_set_u64_bits@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hea_cq_aer_reserv_facility_access_err_reset>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
xor    %esi,%esi
mov    $0xa,%edx
mov    $0x24,%ecx
call   1030 <hea_set_u64_bits@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @hea_cq_aer_reserv_facility_access_err_reset(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @hea_set_u64_bits(i32 %4, i32 0, i32 10, i32 36)
%6 = load i32*, i32** %2
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @hea_cq_aer_reserv_facility_access_err_reset(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @hea_set_u64_bits(i32 %2, i32 0, i32 10, i32 36)
store i32 %3, i32* %0
ret void
}
void FATAL() {}


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

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

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

LLVM IR (-O2):
define void @FATAL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void printbits(void *ptr, size_t len) {
  unsigned char *buf = ptr;
  for (len *= 8; len > -1; len--)
    printf("%u", !!((*buf >> len) & 1));
  puts("");
}


x86 assembly (clang, -O0):
<printbits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jbe    118b <printbits+0x6b>
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
sar    %cl,%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1144 <printbits+0x24>
lea    0xe70(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printbits>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
@.str.1 = [1 x i8] zeroinitializer
define void @printbits(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i64, i64* %4
%8 = mul i64 %7, 8
store i64 %8, i64* %4
br label %9
9: ; preds = %25, %2
%10 = load i64, i64* %4
%11 = icmp ugt i64 %10, -1
br i1 %11, label %12, label %28
12: ; preds = %9
%13 = load i8*, i8** %5
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = load i64, i64* %4
%17 = trunc i64 %16 to i32
%18 = ashr i32 %15, %17
%19 = and i32 %18, 1
%20 = icmp ne i32 %19, 0
%21 = xor i1 %20, true
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
%24 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %12
%26 = load i64, i64* %4
%27 = add i64 %26, -1
store i64 %27, i64* %4
br label %9
28: ; preds = %9
%29 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @printbits(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i32 @putchar(i32 10)
ret void
}
int do_294() { return 294; }


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

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

LLVM IR (-O0):
define i32 @do_294() {
ret i32 294
}

LLVM IR (-O2):
define i32 @do_294() {
ret i32 294
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void sigcatch(int signal) {
  {
    fprintf(stderr, "Timeout...\n");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<sigcatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigcatch>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"Timeout...\0A\00"
@EXIT_FAILURE = global i32 0
define void @sigcatch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"Timeout...\0A\00"
@EXIT_FAILURE = global i32 0
define void @sigcatch(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void OptickAPI_AttachTag_Point(uint64_t inEventDescription, float x, float y,
                               float z) {}


x86 assembly (clang, -O0):
<OptickAPI_AttachTag_Point>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @OptickAPI_AttachTag_Point(i32 %0, float %1, float %2, float %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 %0, i32* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
ret void
}

LLVM IR (-O2):
define void @OptickAPI_AttachTag_Point(i32 %0, float %1, float %2, float %3) {
ret void
}
int execute_io_setup() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_io_setup() {
ret i32 0
}
char *skipSharp(char *p) {
  while (*p == '#')
    ++p;
  return p;
}


x86 assembly (clang, -O0):
<skipSharp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1129 <skipSharp+0x29>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipSharp+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipSharp>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x23,0x1(%rax)
lea    0x1(%rax),%rax
je     1110 <skipSharp+0x10>
ret

LLVM IR (-O0):
define i8* @skipSharp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 35
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @skipSharp(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 35
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i8* %3
}
void f_acc_loop(void) {
  int i;
#pragma acc loop
  for (i = 0; i < 2; ++i) {
#pragma omp atomic write
    i = 0;
  }
}


x86 assembly (clang, -O0):
<f_acc_loop>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    112a <f_acc_loop+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <f_acc_loop+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @f_acc_loop() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 2
br i1 %4, label %5, label %9
5: ; preds = %2
store i32 0, i32* %1
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
char *version() { return "alerts.sl (Linux - 64 bit) V1.2 Aug 15, 2008"; }


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"alerts.sl (Linux - 64 bit) V1.2 Aug 15, 2008\00"
define i8* @version() {
ret i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [45 x i8] c"alerts.sl (Linux - 64 bit) V1.2 Aug 15, 2008\00"
define i8* @version() {
ret i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0)
}
int duble(int val) { return 2 * val; }


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

x86 assembly (clang, -O2):
<duble>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @duble(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
int dif_min(int m1, int m2) {
  int difm = 0;
  difm = 60 - m1 + m2;
  if (difm >= 60) {
    difm += -60;
  }
  return difm;
}


x86 assembly (clang, -O0):
<dif_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x3c,%eax
sub    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3c,-0xc(%rbp)
jl     1132 <dif_min+0x32>
mov    -0xc(%rbp),%eax
add    $0xffffffc4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dif_min>:
sub    %edi,%esi
lea    0x3c(%rsi),%eax
cmp    $0x3c,%eax
cmovge %esi,%eax
ret

LLVM IR (-O0):
define i32 @dif_min(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
%6 = load i32, i32* %3
%7 = sub nsw i32 60, %6
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 60
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %5
%14 = add nsw i32 %13, -60
store i32 %14, i32* %5
br label %15
15: ; preds = %12, %2
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @dif_min(i32 %0, i32 %1) {
%3 = sub nsw i32 60, %0
%4 = add nsw i32 %3, %1
%5 = icmp sgt i32 %4, 59
%6 = add nsw i32 %4, -60
%7 = select i1 %5, i32 %6, i32 %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ north_occluded_fill(int, int);
void north_occluded_fill_test(void **state) {
  assert_int_equal(
      north_occluded_fill(0x0000002400000000ul, 0x00FFFFFFFFFFFF00ul),
      0x0024242400000000ul);
}


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

x86 assembly (clang, -O2):
<north_occluded_fill_test>:
push   %rax
xor    %edi,%edi
mov    $0xffffff00,%esi
call   1030 <north_occluded_fill@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @north_occluded_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @north_occluded_fill(i32 0, i32 -256)
%4 = call i32 @assert_int_equal(i32 %3, i32 0)
ret void
}

LLVM IR (-O2):
define void @north_occluded_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @north_occluded_fill(i32 0, i32 -256)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 0)
ret void
}
void foo(float *output) {
  int i = 0;
  for (i = 0; i < 32; i++)
    output[i] = 4.25;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1143 <foo+0x43>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  0xed0(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <foo+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x70(%rdi)
ret

LLVM IR (-O0):
define void @foo(float* %0) {
%2 = alloca float*
%3 = alloca i32
store float* %0, float** %2
store i32 0, i32* %3
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 32
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load float*, float** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds float, float* %8, i64 %10
store float 4.250000e+00, float* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @foo(float* nocapture writeonly %0) {
%2 = bitcast float* %0 to <4 x float>*
store <4 x float> <float 4.250000e+00, float 4.250000e+00, float 4.250000e+00, float 4.250000e+00>, <4 x float>* %2
%3 = getelementptr inbounds float, float* %0, i64 4
%4 = bitcast float* %3 to <4 x float>*
store <4 x float> <float 4.250000e+00, float 4.250000e+00, float 4.250000e+00, float 4.250000e+00>, <4 x float>* %4
%5 = getelementptr inbounds float, float* %0, i64 8
%6 = bitcast float* %5 to <4 x float>*
store <4 x float> <float 4.250000e+00, float 4.250000e+00, float 4.250000e+00, float 4.250000e+00>, <4 x float>* %6
%7 = getelementptr inbounds float, float* %0, i64 12
%8 = bitcast float* %7 to <4 x float>*
store <4 x float> <float 4.250000e+00, float 4.250000e+00, float 4.250000e+00, float 4.250000e+00>, <4 x float>* %8
%9 = getelementptr inbounds float, float* %0, i64 16
%10 = bitcast float* %9 to <4 x float>*
store <4 x float> <float 4.250000e+00, float 4.250000e+00, float 4.250000e+00, float 4.250000e+00>, <4 x float>* %10
%11 = getelementptr inbounds float, float* %0, i64 20
%12 = bitcast float* %11 to <4 x float>*
store <4 x float> <float 4.250000e+00, float 4.250000e+00, float 4.250000e+00, float 4.250000e+00>, <4 x float>* %12
%13 = getelementptr inbounds float, float* %0, i64 24
%14 = bitcast float* %13 to <4 x float>*
store <4 x float> <float 4.250000e+00, float 4.250000e+00, float 4.250000e+00, float 4.250000e+00>, <4 x float>* %14
%15 = getelementptr inbounds float, float* %0, i64 28
%16 = bitcast float* %15 to <4 x float>*
store <4 x float> <float 4.250000e+00, float 4.250000e+00, float 4.250000e+00, float 4.250000e+00>, <4 x float>* %16
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 2, j = 3, k;
  k = i + j;
  { printf("%d\n", k); }
  printf("%d\n", k);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
/* Type definitions */
struct component {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_object(int, short *);
void free_component(struct component *cmp) { free_object(17, (short *)cmp); }


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

x86 assembly (clang, -O2):
<free_component>:
mov    %rdi,%rsi
mov    $0x11,%edi
jmp    1030 <free_object@plt>

LLVM IR (-O0):
%struct.component = type { i32 }
define void @free_component(%struct.component* %0) {
%2 = alloca %struct.component*
store %struct.component* %0, %struct.component** %2
%3 = load %struct.component*, %struct.component** %2
%4 = bitcast %struct.component* %3 to i16*
%5 = call i32 @free_object(i32 17, i16* %4)
ret void
}

LLVM IR (-O2):
%struct.component = type { i32 }
define void @free_component(%struct.component* %0) {
%2 = bitcast %struct.component* %0 to i16*
%3 = tail call i32 @free_object(i32 17, i16* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void stop_motor() { printf("Stop Stepper\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Stop Stepper\00"
define void @stop_motor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
signed int f10(signed long long v_x, signed int v_y) {
  signed long long v_shr6 = ((unsigned long long)v_x) >> 48;
  signed int v_conv = (unsigned int)v_shr6;
  signed int v_and1 = v_y & -16777216;
  signed int v_or = v_conv | v_and1;
  return v_or;
}


x86 assembly (clang, -O0):
<f10>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x30,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff000000,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f10>:
shr    $0x30,%rdi
and    $0xff000000,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @f10(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%9 = load i64, i64* %3
%10 = lshr i64 %9, 48
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = trunc i64 %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %4
%14 = and i32 %13, -16777216
store i32 %14, i32* %7
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = or i32 %15, %16
store i32 %17, i32* %8
%18 = load i32, i32* %8
ret i32 %18
}

LLVM IR (-O2):
define i32 @f10(i64 %0, i32 %1) {
%3 = lshr i64 %0, 48
%4 = trunc i64 %3 to i32
%5 = and i32 %1, -16777216
%6 = or i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int /*<<< orphan*/);
void TOSH_SET_FLASH_SELECT_PIN() { set_io_bit(0x37, 0); }


x86 assembly (clang, -O0):
<TOSH_SET_FLASH_SELECT_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x37,%edi
xor    %esi,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_FLASH_SELECT_PIN>:
mov    $0x37,%edi
xor    %esi,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_FLASH_SELECT_PIN() {
%1 = call i32 @set_io_bit(i32 55, i32 0)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_FLASH_SELECT_PIN() {
%1 = tail call i32 @set_io_bit(i32 55, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf(
      "USAGE : test_client ip port processor_count total_processing_count\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [68 x i8] c"USAGE : test_client ip port processor_count total_processing_count\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [67 x i8] c"USAGE : test_client ip port processor_count total_processing_count\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solve_by_standard_homotopy_continuation(int number_of_tasks) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(16, &number_of_tasks, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solve_by_standard_homotopy_continuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x10,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_by_standard_homotopy_continuation>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x10,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solve_by_standard_homotopy_continuation(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 16, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @solve_by_standard_homotopy_continuation(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 16, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
void my_strcpy(char *dest, const char *src) {
  for (int i = 0; src[i]; i++) {
    dest[i] = src[i];
  }
}


x86 assembly (clang, -O0):
<my_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1149 <my_strcpy+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <my_strcpy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcpy>:
mov    (%rsi),%al
test   %al,%al
je     1120 <my_strcpy+0x20>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rdi,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <my_strcpy+0x10>
ret

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

LLVM IR (-O2):
define void @my_strcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %2
ret void
6: ; preds = %2, %6
%7 = phi i64 [ %10, %6 ], [ 0, %2 ]
%8 = phi i8 [ %12, %6 ], [ %3, %2 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %8, i8* %9
%10 = add nuw nsw i64 %7, 1
%11 = getelementptr inbounds i8, i8* %1, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %5, label %6
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/cyc-lib/cyc_include.h",
                        283));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11b,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11b,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/cyc-lib/cyc_include.h\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 283)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/cyc-lib/cyc_include.h\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 283)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int num_inverso(int);
int /*<<< orphan*/ printf(char *);
void num_palindromo(int p) {
  if (p == num_inverso(p)) {
    printf("\nEl nombre introducido ES un palindromo");
  } else {
    printf("\nEl nombre introducido NO es un palindromo");
  }
}


x86 assembly (clang, -O0):
<num_palindromo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <num_inverso@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
jne    1157 <num_palindromo+0x37>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1163 <num_palindromo+0x43>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_palindromo>:
push   %rbx
mov    %edi,%ebx
call   1040 <num_inverso@plt>
cmp    %ebx,%eax
lea    0xecf(%rip),%rax
lea    0xef0(%rip),%rdi
cmove  %rax,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"\0AEl nombre introducido ES un palindromo\00"
@.str.1 = [43 x i8] c"\0AEl nombre introducido NO es un palindromo\00"
define void @num_palindromo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @num_inverso(i32 %4)
%6 = icmp eq i32 %3, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %11
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"\0AEl nombre introducido ES un palindromo\00"
@.str.1 = [43 x i8] c"\0AEl nombre introducido NO es un palindromo\00"
define void @num_palindromo(i32 %0) {
%2 = tail call i32 @num_inverso(i32 %0)
%3 = icmp eq i32 %2, %0
%4 = select i1 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @printf(i8* dereferenceable(1) %4)
ret void
}
/* Variables and functions */
int fread(void *, int, int, void *);
int input_ascii_file_stream_read(void *buf, int size, void *file) {
  return fread(buf, 1, size, file);
}


x86 assembly (clang, -O0):
<input_ascii_file_stream_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_ascii_file_stream_read>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    $0x1,%esi
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define i32 @input_ascii_file_stream_read(i8* nocapture %0, i32 %1, i8* nocapture %2) {
%4 = tail call i32 @fread(i8* %0, i32 1, i32 %1, i8* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ test_case;

/* Variables and functions */
int /*<<< orphan*/ assert_test(int, char **, char **);
void t_inner_counting(void *context) {
  char *test_case[] = {"1.10", "1.2"};
  char *expected[] = {"1.2", "1.10"};
  assert_test(sizeof(test_case) / sizeof(char *), test_case, expected);
}


x86 assembly (clang, -O0):
<t_inner_counting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2cdd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cd4(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x2,%edi
call   1030 <assert_test@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_inner_counting>:
sub    $0x28,%rsp
movaps 0x2ce5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2ce9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x2,%edi
call   1030 <assert_test@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"1.10\00"
@.str.1 = [4 x i8] c"1.2\00"
@__const.t_inner_counting.test_case = [2 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0)]
@__const.t_inner_counting.expected = [2 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)]
define void @t_inner_counting(i8* %0) {
%2 = alloca i8*
%3 = alloca [2 x i8*]
%4 = alloca [2 x i8*]
store i8* %0, i8** %2
%5 = bitcast [2 x i8*]* %3 to i8*
%6 = bitcast [2 x i8*]* %4 to i8*
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
%9 = call i32 @assert_test(i32 2, i8** %7, i8** %8)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"1.10\00"
@.str.1 = [4 x i8] c"1.2\00"
@__const.t_inner_counting.test_case = [2 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0)]
@__const.t_inner_counting.expected = [2 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)]
define void @t_inner_counting(i8* nocapture readnone %0) {
%2 = alloca [2 x i8*]
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %2 to i8*
%5 = bitcast [2 x i8*]* %3 to i8*
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%8 = call i32 @assert_test(i32 2, i8** %6, i8** %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void _jx_term_die(char const *in_error) {
  fprintf(stderr, "JxTermLib: %s", in_error);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<_jx_term_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_jx_term_die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"JxTermLib: %s\00"
@EXIT_FAILURE = global i32 0
define void @_jx_term_die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"JxTermLib: %s\00"
@EXIT_FAILURE = global i32 0
define void @_jx_term_die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ core3_print(char *, char *, char const *);
void U_EMRSETBKMODE_print(const char *contents) {
  core3_print("U_EMRSETBKMODE", "iMode:", contents);
}


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

x86 assembly (clang, -O2):
<U_EMRSETBKMODE_print>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <core3_print@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"U_EMRSETBKMODE\00"
@.str.1 = [7 x i8] c"iMode:\00"
define void @U_EMRSETBKMODE_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core3_print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"U_EMRSETBKMODE\00"
@.str.1 = [7 x i8] c"iMode:\00"
define void @U_EMRSETBKMODE_print(i8* %0) {
%2 = tail call i32 @core3_print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int ddsGetGreenMask(unsigned const char *buffer) {
  return (buffer[96] & 0xFF) | (buffer[97] & 0xFF) << 8 |
         (buffer[98] & 0xFF) << 16 | (buffer[99] & 0xFF) << 24;
}


x86 assembly (clang, -O0):
<ddsGetGreenMask>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x60(%rax),%eax
and    $0xff,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x61(%rcx),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x62(%rcx),%ecx
and    $0xff,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x63(%rcx),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ddsGetGreenMask(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 96
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, 255
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 97
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = and i32 %11, 255
%13 = shl i32 %12, 8
%14 = or i32 %7, %13
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 98
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = and i32 %18, 255
%20 = shl i32 %19, 16
%21 = or i32 %14, %20
%22 = load i8*, i8** %2
%23 = getelementptr inbounds i8, i8* %22, i64 99
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = and i32 %25, 255
%27 = shl i32 %26, 24
%28 = or i32 %21, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @ddsGetGreenMask(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 96
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 97
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 98
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 16
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 99
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl nuw i32 %17, 24
%19 = or i32 %14, %18
ret i32 %19
}
_Noreturn void die(const char *msg) {
  warn(msg);
  dien();
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <warn@plt>
mov    $0x0,%al
call   1040 <dien@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<die>:
push   %rax
xor    %eax,%eax
call   1030 <warn@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <dien@plt>

LLVM IR (-O0):
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @warn to i32 (i8*, ...)*)(i8* %3)
%5 = call i32 (...) @dien()
ret void
}

LLVM IR (-O2):
define void @die(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @warn to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i32 (...) @dien()
ret void
}
/* Variables and functions */
char toupper(int /*<<< orphan*/);
int LNat_Str_To_Upper(const char *str, char *dest) {
  while ((*(dest++) = toupper(*(str++)))) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<LNat_Str_To_Upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1155 <LNat_Str_To_Upper+0x45>
jmp    1120 <LNat_Str_To_Upper+0x10>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LNat_Str_To_Upper>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   (%rax)
movsbl (%r15,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
test   %al,%al
jne    1120 <LNat_Str_To_Upper+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @LNat_Str_To_Upper(i8* nocapture %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %6, %3 ]
%5 = phi i8* [ %1, %2 ], [ %10, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = tail call signext i8 @toupper(i32 %8)
%10 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %9, i8* %5
%11 = icmp eq i8 %9, 0
br i1 %11, label %12, label %3
12: ; preds = %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mksort(char const **, int, int /*<<< orphan*/, int);
void sortMultiKey(const char *x[], int num, int maxdepth) {
  mksort(x, num, 0, maxdepth);
}


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

x86 assembly (clang, -O2):
<sortMultiKey>:
mov    %edx,%ecx
xor    %edx,%edx
jmp    1030 <mksort@plt>

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

LLVM IR (-O2):
define void @sortMultiKey(i8** %0, i32 %1, i32 %2) {
%4 = tail call i32 @mksort(i8** %0, i32 %1, i32 0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ ctcp_emit(char *, char *, char *);
void handle_ctcp(char *usr, char *src, char *msg, char **caps, int ncaps) {
  char *message;
  assert(ncaps >= 1);
  message = caps[0];
  ctcp_emit(usr, src, message);
}


x86 assembly (clang, -O0):
<handle_ctcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <ctcp_emit@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_ctcp>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %r8d,%r8d
setg   %dil
call   1040 <assert@plt>
mov    (%r15),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <ctcp_emit@plt>

LLVM IR (-O0):
define void @handle_ctcp(i8* %0, i8* %1, i8* %2, i8** %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8**
%10 = alloca i32
%11 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8** %3, i8*** %9
store i32 %4, i32* %10
%12 = load i32, i32* %10
%13 = icmp sge i32 %12, 1
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i8**, i8*** %9
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
store i8* %18, i8** %11
%19 = load i8*, i8** %6
%20 = load i8*, i8** %7
%21 = load i8*, i8** %11
%22 = call i32 @ctcp_emit(i8* %19, i8* %20, i8* %21)
ret void
}

LLVM IR (-O2):
define void @handle_ctcp(i8* %0, i8* %1, i8* nocapture readnone %2, i8** nocapture %3, i32 %4) {
%6 = icmp sgt i32 %4, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = load i8*, i8** %3
%10 = tail call i32 @ctcp_emit(i8* %0, i8* %1, i8* %9)
ret void
}
/* Variables and functions */
int atoi(char const *);
int sumOfNumber(const char *s1, const char *s2) { return atoi(s1) + atoi(s2); }


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

x86 assembly (clang, -O2):
<sumOfNumber>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <atoi@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <atoi@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sumOfNumber(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 = call i32 @atoi(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @atoi(i8* %7)
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @sumOfNumber(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @atoi(i8* %0)
%4 = tail call i32 @atoi(i8* %1)
%5 = add nsw i32 %4, %3
ret i32 %5
}